public collection < string > local j v m classpath ( ) { return split classpath ( system get property ( " java class path " ) ) ; }


tests that i o exceptions encountered while handling non - mandatory inputs are properly handled

public void test i o exception non mandatory inputs ( ) throws exception { path foo build file = write ( " foo / build " , " cc library ( name = ' foo ' , srcs = [ ' foo cc ' ] , hdrs check = ' loose ' ) " ) ; write ( " foo / foo cc " , " # include \ " foo / foo h \ " " ) ; path foo h file = foo build file get parent directory ( ) get relative ( " foo h " ) ; write absolute ( foo h file , " / / thisisacomment " ) ; custom file system always error ( foo h file ) ; build failed exception e = assert throws ( build failed exception class , ( ) - > build target ( " / / foo " ) ) ; immutable list < cause > root causes = e get root causes ( ) to list ( ) ; assert that ( root causes ) has size ( 1 ) ; assert that ( root causes get ( 0 ) get label ( ) ) is equal to ( label parse absolute unchecked ( " / / foo : foo " ) ) ; assert that ( e get detailed exit code ( ) get exit code ( ) ) is equal to ( exit code build failure ) ; events assert contains error ( " foo / build : 1 : 11 : compiling foo / foo cc failed : missing input file ' foo / foo h ' : nope " ) ; }


public void declawed test ( ) { / / todo : test declawed }


returns a normalized { @ code - werror : } flag

public string to string ( ) { if ( this werrors is empty ( ) ) { return " " ; } map < string , boolean > werrors = new linked hash map < > ( this werrors ) ; string builder sb = new string builder ( " - werror : " ) ; if ( werrors contains key ( " all " ) ) { boolean b = werrors remove ( " all " ) ; sb append ( b ? " " : " - " ) append ( " all , " ) ; } for ( string warning : werrors key set ( ) ) { boolean b = werrors get ( warning ) ; sb append ( b ? " " : " - " ) append ( warning ) append ( " , " ) ; } / / delete trailing " , " sb delete char at ( sb length ( ) - 1 ) ; return sb to string ( ) ; }


builder method for configuration parameter

public builder with configuration ( string configuration ) { this configuration = configuration ; return this ; }


gets the token , which together with the scheme , will be sent as the value of the authorization header

public string get bearer token ( ) { return bearer token ; }


min max avg stats create snapshot ( ) { return new min max avg stats ( min , max , sum , count ) ; }


public void enum integer test ( ) { / / todo : test enum integer }


public static protos resource ports ( protos value range ranges ) { return ports ( unreserved role , ranges ) ; }


public void set text ( string text ) { linker state old = state copy ( ) ; state set text ( text ) ; if ( ! old equals ( state ) ) { sync state later ( ) ; } }


sets the schema using type information json objects are represented as row types the schema might be nested

public json schema ( type information < row > schema type ) { preconditions check not null ( schema type ) ; this schema = type string utils write type info ( schema type ) ; this json schema = null ; this derive schema = null ; return this ; }


default string path ( ) { return request path ( ) path within application ( ) value ( ) ; }


void buffer changed ( int index , boolean empty ) throws i o exception { if ( index > = index cnt ) { return ; / / no need to track new buffers } int byte offset = index / 8 ; byte b ; if ( empty ) { / / clear bit if buffer is removed int bit mask = ~ ( 1 < < ( index % 8 ) ) ; b = ( byte ) ( buffer get byte ( byte offset ) & bit mask ) ; } else { / / set bit if buffer is set int bit mask = 1 < < ( index % 8 ) ; b = ( byte ) ( buffer get byte ( byte offset ) | bit mask ) ; } buffer put byte ( byte offset , b ) ; }


public string service name ( ) { return service name ; }


get the primary symbol for this code unit

public symbol get primary symbol ( ) { if ( program = = null ) return null ; symbol table st = program get symbol table ( ) ; return st get primary symbol ( address ) ; }


public map < string , list < object > > get map array anytype ( ) { return map array anytype ; }


closes the reader to release all resources


gets the { @ link logs } interface used to fetch different types of logs to set the logging preferences { @ link logging preferences }


delete the global transaction it will operate two parts : 1 delete the global session map 2 remove the xid from the global status list if the operate failed , the succeed operates will rollback

private boolean delete global transaction d o ( global transaction d o global transaction d o ) { string global key = build global key by transaction id ( global transaction d o get transaction id ( ) ) ; try ( jedis jedis = jedis pooled factory get jedis instance ( ) ) { map < string , string > global transaction do map = jedis hget all ( global key ) ; string xid = global transaction do map get ( redis key global xid ) ; if ( string utils is empty ( xid ) ) { logger warn ( " global transaction is not exist , xid = { } maybe has been deleted by another tc server " , global transaction d o get xid ( ) ) ; return true ; } pipeline pipelined = jedis pipelined ( ) ; pipelined lrem ( build global status ( global transaction d o get status ( ) ) , 0 , global transaction d o get xid ( ) ) ; pipelined del ( global key ) ; pipelined sync ( ) ; return true ; } catch ( exception ex ) { throw new redis exception ( ex ) ; } }


adds a move instruction to the end of this basic block , just before the last instruction if the result of the final instruction is the source in question , then the move is placed at the beginning of the primary successor block this is for unversioned registers

public void add move to end ( register spec result , register spec source ) { if ( result get reg ( ) = = source get reg ( ) ) { / / sometimes we end up with no - op moves ignore them here return ; } / * * the last insn has to be a normal ssa insn : a phi can ' t branch * or return or cause an exception , etc * / normal ssa insn last insn ; last insn = ( normal ssa insn ) insns get ( insns size ( ) - 1 ) ; if ( last insn get result ( ) ! = null | | last insn get sources ( ) size ( ) > 0 ) { / * * the final insn in this block has a source or result * register , and the moves we may need to place and * schedule may interfere we need to insert this * instruction at the beginning of the primary successor * block instead we know this is safe , because when we * edge - split earlier , we ensured that each successor has * only us as a predecessor * / for ( int i = successors next set bit ( 0 ) ; i > = 0 ; i = successors next set bit ( i + 1 ) ) { ssa basic block succ ; succ = parent get blocks ( ) get ( i ) ; succ add move to beginning ( result , source ) ; } } else { / * * we can safely add a move to the end of the block just * before the last instruction , because the final insn does * not assign to anything * / register spec list sources = register spec list make ( source ) ; normal ssa insn to add = new normal ssa insn ( new plain insn ( rops op move ( result get type ( ) ) , source position no info , result , sources ) , this ) ; insns add ( insns size ( ) - 1 , to add ) ; moves from phis at end + + ; } }


remove all entries from the size alignment map

public void clear size alignment map ( ) { size alignment map remove all ( ) ; }


set flag to respect execute bit on memory if present on any memory

public void set respect execute flag ( boolean respect ) { respect execute flag = respect ; }


public router service state get router state ( ) { return this state ; }


checks whether a scheduled item may be canceled

public boolean has cancel permission ( ) { return task has abort permission ( ) ; }


get the directory on the default fs which will be used for storing files relevant to this dynamometer application this is inside of the { @ value dyno constants # dynamometer storage dir } directory within the submitter ' s home directory

private static path get remote storage path ( configuration conf , application id app id ) throws i o exception { file system remote f s = file system get ( conf ) ; return remote f s make qualified ( new path ( remote f s get home directory ( ) , dyno constants dynamometer storage dir + " / " + app id ) ) ; }


test that a structure array can ' t be added to the same structure

public void test cyclic dependency problem 2 ( ) { array array = create array ( struct , 3 ) ; try { struct add ( array ) ; assert fail ( " shouldn ' t be able to add a structure array to the same structure " ) ; } catch ( illegal argument exception e ) { / / should get an exception from adding the struct to itself } try { struct insert ( 0 , array ) ; assert fail ( " shouldn ' t be able to insert a structure array into the same structure " ) ; } catch ( illegal argument exception e ) { / / should get an exception from inserting the struct to itself } try { struct replace ( 0 , array , array get length ( ) ) ; assert fail ( " shouldn ' t be able to replace a structure component with an array of the same structure " ) ; } catch ( illegal argument exception e ) { / / should get an exception from replacing the struct to itself } }


public string get last name ( ) { return last name ; }


reacquires state for a container - reads the classid from the cgroup being used for the container being reacquired

public list < privileged operation > reacquire container ( container id container id ) throws resource handler exception { return null ; }


public big decimal get name number ( ) { return name number ; }


atomically removes all of the elements from this queue the queue will be empty after this call returns

public void clear ( ) { final e [ ] items = this items ; final monitor monitor = this monitor ; monitor enter ( ) ; try { int i = take index ; int k = count ; while ( k - - > 0 ) { items [ i ] = null ; i = inc ( i ) ; } count = 0 ; put index = 0 ; take index = 0 ; } finally { monitor leave ( ) ; } }


set the maximum motor force , usually in n

public void set max motor force ( float force ) { joint set max motor force ( force ) ; }


sets a composition you can set a default cache strategy if this view was inflated with xml by using { @ link r attr # lottie cache strategy }

public void set composition ( @ non null lottie composition composition ) { if ( l dbg ) { log v ( tag , " set composition \ n " + composition ) ; } lottie drawable set callback ( this ) ; boolean is new composition = lottie drawable set composition ( composition ) ; if ( ! is new composition ) { / / we can avoid re - setting the drawable , and invalidating the view , since the composition / / hasn ' t changed return ; } int screen width = utils get screen width ( get context ( ) ) ; int screen height = utils get screen height ( get context ( ) ) ; int comp width = composition get bounds ( ) width ( ) ; int comp height = composition get bounds ( ) height ( ) ; if ( comp width > screen width | | comp height > screen height ) { float x scale = screen width / ( float ) comp width ; float y scale = screen height / ( float ) comp height ; set scale ( math min ( x scale , y scale ) ) ; log w ( l tag , string format ( " composition larger than the screen % dx % d vs % dx % d scaling down " , comp width , comp height , screen width , screen height ) ) ; } / / if you set a different composition on the view , the bounds will not update unless / / the drawable is different than the original set image drawable ( null ) ; set image drawable ( lottie drawable ) ; this composition = composition ; request layout ( ) ; }


private void resume paused thread ( paused thread state thread , starlark debugging protos stepping stepping ) { paused threads remove ( thread id ) ; debug ready to pause ready to pause = debug step control ( thread thread , debug event helper convert stepping enum ( stepping ) ) ; if ( ready to pause ! = null ) { stepping threads put ( thread id , new stepping thread state ( ready to pause ) ) ; } thread semaphore release ( ) ; }


creates a specific variant for a method entry

private void write method variant ( type spec builder class builder , method entry method entry , boolean to all , boolean forwarded ) { executable element elem = method entry element ; / / create builder method spec builder method = method spec method builder ( elem get simple name ( ) to string ( ) + ( forwarded ? " forward " : " " ) ) / / add except suffix when forwarding add modifiers ( modifier static ) returns ( void class ) ; / / forwarded methods aren ' t intended for use , and are not public if ( ! forwarded ) { method add modifiers ( modifier public ) ; } / / validate client methods to make sure if ( method entry where is client ) { if ( elem get parameters ( ) is empty ( ) ) { base processor err ( " client invoke methods must have a first parameter of type player " , elem ) ; return ; } if ( ! elem get parameters ( ) get ( 0 ) as type ( ) to string ( ) contains ( " player " ) ) { base processor err ( " client invoke methods should have a first parameter of type player " , elem ) ; return ; } } / / if to all is false , it ' s a ' send to one player ' variant , so add the player as a parameter if ( ! to all ) { method add parameter ( class name best guess ( " mindustry net net connection " ) , " player connection " ) ; } / / add sender to ignore if ( forwarded ) { method add parameter ( class name best guess ( " mindustry net net connection " ) , " except connection " ) ; } / / call local method if applicable , shouldn ' t happen when forwarding method as that already happens by default if ( ! forwarded & & method entry local ! = loc none ) { / / add in local checks if ( method entry local ! = loc both ) { method begin control flow ( " if ( " + get check string ( method entry local ) + " | | ! mindustry vars net active ( ) ) " ) ; } / / concatenate parameters int index = 0 ; string builder results = new string builder ( ) ; for ( variable element var : elem get parameters ( ) ) { / / special case : calling local - only methods uses the local player if ( index = = 0 & & method entry where = = loc client ) { results append ( " mindustry vars player " ) ; } else { results append ( var get simple name ( ) ) ; } if ( index ! = elem get parameters ( ) size ( ) - 1 ) results append ( " , " ) ; index + + ; } / / add the statement to call it method add statement ( " $ n " + elem get simple name ( ) + " ( " + results to string ( ) + " ) " , ( ( type element ) elem get enclosing element ( ) ) get qualified name ( ) to string ( ) ) ; if ( method entry local ! = loc both ) { method end control flow ( ) ; } } / / start control flow to check if it ' s actually client / server so no netcode is called method begin control flow ( " if ( " + get check string ( method entry where ) + " ) " ) ; / / add statement to create packet from pool method add statement ( " $ 1n packet = $ 2n obtain ( $ 1n class , $ 1n : : new ) " , " mindustry net packets invoke packet " , " arc util pooling pools " ) ; / / assign priority method add statement ( " packet priority = ( byte ) " + method entry priority ordinal ( ) ) ; / / assign method id method add statement ( " packet type = ( byte ) " + method entry id ) ; / / reset stream method add statement ( " out reset ( ) " ) ; method add type variables ( seq with ( elem get type parameters ( ) ) map ( base processor : : get t v n ) ) ; for ( int i = 0 ; i < elem get parameters ( ) size ( ) ; i + + ) { / / first argument is skipped as it is always the player caller if ( ( ! method entry where is server / * | | method entry mode = = loc both * / ) & & i = = 0 ) { continue ; } variable element var = elem get parameters ( ) get ( i ) ; try { / / add parameter to method method add parameter ( type name get ( var as type ( ) ) , var get simple name ( ) to string ( ) ) ; } catch ( throwable t ) { throw new runtime exception ( " error parsing method " + method entry target method ) ; } / / name of parameter string var name = var get simple name ( ) to string ( ) ; / / name of parameter type string type name = var as type ( ) to string ( ) ; / / captialized version of type name for writing primitives string cap name = type name equals ( " byte " ) ? " " : character to upper case ( type name char at ( 0 ) ) + type name substring ( 1 ) ; / / special case : method can be called from anywhere to anywhere / / thus , only write the player when the server is writing data , since the client is the only one who reads it boolean write player skip check = method entry where = = loc both & & i = = 0 ; if ( write player skip check ) { / / write begin check method begin control flow ( " if ( mindustry vars net server ( ) ) " ) ; } if ( base processor is primitive ( type name ) ) { / / check if it ' s a primitive , and if so write it method add statement ( " write $ l ( $ l ) " , type name equals ( " boolean " ) ? " bool " : type name char at ( 0 ) + " " , var name ) ; } else { / / else , try and find a serializer string ser = serializers writers get ( type name replace ( " mindustry gen " , " " ) , serializer resolver locate ( elem , var as type ( ) , true ) ) ; if ( ser = = null ) { / / make sure a serializer exists ! base processor err ( " no @ write class method to write class type : ' " + type name + " ' " , var ) ; return ; } / / add statement for writing it method add statement ( ser + " ( write , " + var name + " ) " ) ; } if ( write player skip check ) { / / write end check method end control flow ( ) ; } } / / assign packet bytes method add statement ( " packet bytes = out get bytes ( ) " ) ; / / assign packet length method add statement ( " packet length = out size ( ) " ) ; string send string ; if ( forwarded ) { / / forward packet if ( ! method entry local is client ) { / / if the client doesn ' t get it called locally , forward it back after validation send string = " mindustry vars net send ( " ; } else { send string = " mindustry vars net send except ( except connection , " ; } } else if ( to all ) { / / send to all players / to server send string = " mindustry vars net send ( " ; } else { / / send to specific client from server send string = " player connection send ( " ; } / / send the actual packet method add statement ( send string + " packet , " + ( method entry unreliable ? " mindustry net net send mode udp " : " mindustry net net send mode tcp " ) + " ) " ) ; / / end check for server / client method end control flow ( ) ; / / add method to class , finally class builder add method ( method build ( ) ) ; }


set the set of allowed { @ link http method http methods } , as specified by the { @ code allow } header

builder < t > allow ( set < http method > allowed methods ) ;


return the directory relative the the name module ' s data directory ( i e " data " will be prepended to the given path )

public static resource file get module data sub directory ( string module name , string relative path ) throws file not found exception , i o exception { check app initialized ( ) ; return app get data sub directory in module ( relative path , module name ) ; }


protected int compare to 0 ( offsetted item other ) { encoded array item other array = ( encoded array item ) other ; return array compare to ( other array array ) ; }


returns all the providers of the specified type that are listed under the specified attribute of this target in the build file , and that contain the specified provider

public < c extends transitive info provider > iterable < ? extends transitive info collection > get prerequisites if ( string attribute name , class < c > class type ) { analysis utils check provider ( class type ) ; return analysis utils filter by provider ( get prerequisites ( attribute name ) , class type ) ; }


void set hour ( int val ) throws calendar parser exception { final int tmp hour ; if ( time post meridian ) { tmp hour = val + 12 ; time post meridian = false ; } else { tmp hour = val ; } if ( tmp hour < 0 | | tmp hour > 23 ) { throw new calendar parser exception ( " bad hour " + val ) ; } hour = tmp hour ; }


reads an signed integer from { @ code in }

public static int read signed leb 1 2 8 ( byte input in ) { int result = 0 ; int cur ; int count = 0 ; int sign bits = - 1 ; do { cur = in read byte ( ) & 0xff ; result | = ( cur & 0x 7f ) < < ( count * 7 ) ; sign bits < < = 7 ; count + + ; } while ( ( ( cur & 0x 8 0 ) = = 0x 8 0 ) & & count < 5 ) ; if ( ( cur & 0x 8 0 ) = = 0x 8 0 ) { throw new dex exception 2 ( " invalid leb128 sequence " ) ; } / / sign extend if appropriate if ( ( ( sign bits > > 1 ) & result ) ! = 0 ) { result | = sign bits ; } return result ; }


returns the unsigned value for this register if all the appropriate mask bits are " on " otherwise , null is return

public big integer get unsigned value ( ) { if ( is mask on ( ) ) { return get unsigned value ignore mask ( ) ; } return null ; }


resets the state of the writer to write the next batch of rows

public void reset ( ) { root set row count ( 0 ) ; for ( arrow field writer field writer : field writers ) { field writer reset ( ) ; } }


accessor method for blaze version info singleton if set build info was not called , returns an empty blaze version info instance , which should not be persisted

public static synchronized blaze version info instance ( ) { if ( instance = = null ) { return new blaze version info ( immutable map < string , string > of ( ) ) ; } return instance ; }


compares two comment address objects to determine whether the first comment ' s address is effectively less than ( comes before it in memory ) , equal to ( at the same spot in memory ) , or greater than ( comes after it in memory ) the second comment ' s address

public int compare ( object obj 1 , object obj 2 ) { address a 1 = ( address ) obj 1 ; address a 2 = ( address ) obj 2 ; address address 2 compatible with 1 = simple diff utility get compatible address ( program 2 , a 2 , program 1 ) ; return a 1 compare to ( address 2 compatible with 1 ) ; }


public acknowledged response delete calendar ( delete calendar request request , request options options ) throws i o exception { return rest high level client perform request and parse entity ( request , m l request converters : : delete calendar , options , acknowledged response : : from x content , collections empty set ( ) ) ; }


creates a new { @ link time } that represents the given number of seconds

public static time seconds ( long seconds ) { return of ( seconds , time unit seconds ) ; }


the synthetic bridge method for a private static method in a class

public final method decl info bridge of class static method ( ) { return to builder ( ) set method key ( method key ( ) bridge of class static method ( ) ) set member access ( acc static | acc synthetic ) build ( ) ; }


concatenate all elements in the given collection to form a regex pattern

public static pattern concatenate ( final collection < ? > required values , final boolean case insensitive ) { val pattern = required values stream ( ) map ( object : : to string ) collect ( collectors joining ( " | " , " ( " , " ) " ) ) ; return create pattern ( pattern , case insensitive ? pattern case insensitive : 0 ) ; }


draw on the empty edge when swipe moving

void on item swipe moving ( canvas canvas , recycler view view holder view holder , float d x , float d y , boolean is currently active ) ;


public cli stream strings get strings stream ( ) { return strings stream ; }


callback on exception in do lock retry on conflict

protected void on exception ( exception e ) throws exception { }


input stream backed by the internal byte array

byte array input stream get input stream ( ) { byte array input stream bin = new byte array input stream ( this buf , 0 , count ) ; this reset ( ) ; this buf = null ; return bin ; }


helper for { @ link # equals } and { @ link # for comparison equals } , which actually does the test

private boolean equals ( int reg , type bearer type , local item local ) { return ( this reg = = reg ) & & this type equals ( type ) & & ( ( this local = = local ) | | ( ( this local ! = null ) & & this local equals ( local ) ) ) ; }


public offset date time get date time ( ) { return date time ; }


verify that all expected requests set up via { @ link # expect ( request matcher ) } were indeed performed

public void verify ( ) { this expectation manager verify ( ) ; }


public void test zero record length ( ) throws exception { local fs delete ( work dir , true ) ; path file = new path ( work dir , new string ( " test format txt " ) ) ; create file ( file , null , 10 , 10 ) ; job job = job get instance ( default conf ) ; / / set the fixed length record length config property fixed length input format format = new fixed length input format ( ) ; format set record length ( job get configuration ( ) , 0 ) ; file input format set input paths ( job , work dir ) ; list < input split > splits = format get splits ( job ) ; boolean exception thrown = false ; for ( input split split : splits ) { try { task attempt context context = map reduce test util create dummy map task attempt context ( job get configuration ( ) ) ; record reader < long writable , bytes writable > reader = format create record reader ( split , context ) ; map context < long writable , bytes writable , long writable , bytes writable > mcontext = new map context impl < long writable , bytes writable , long writable , bytes writable > ( job get configuration ( ) , context get task attempt i d ( ) , reader , null , null , map reduce test util create dummy reporter ( ) , split ) ; reader initialize ( split , mcontext ) ; } catch ( i o exception ioe ) { exception thrown = true ; log info ( " exception message : " + ioe get message ( ) ) ; } } assert true ( " exception for zero record length : " , exception thrown ) ; }


clears the timeout flag set by the await methods when they timed out history : 2 0 7 - experimental

public final u clear timeout ( ) { timeout = false ; return ( u ) this ; }


private void timing ( timing info timing info , string sub measurement name , consumer < duration > duration consumer ) { timing info t 1 = timing info get sub measurement ( sub measurement name ) ; if ( t 1 ! = null & & t 1 get time taken millis if known ( ) ! = null ) { duration consumer accept ( duration of millis ( t 1 get time taken millis if known ( ) long value ( ) ) ) ; } }


retrieves a { @ link g file } from this filesystem based on its full path and filename

public g file lookup ( string path ) throws i o exception ;


public static long get avatar length ( @ non null context context , @ non null recipient id recipient id ) { return modern encrypting part output stream get plaintext length ( get avatar file ( context , recipient id ) length ( ) ) ; }


test that an error from a user provided observer on next is handled and emitted to the on error

public void on next error ( ) throws interrupted exception { final count down latch latch = new count down latch ( 1 ) ; final atomic reference < throwable > caught error = new atomic reference < > ( ) ; flowable < long > f = flowable interval ( 50 , time unit milliseconds ) ; subscriber < long > subscriber = new default subscriber < long > ( ) { @ override public void on complete ( ) { system out println ( " completed " ) ; latch count down ( ) ; } @ override public void on error ( throwable e ) { system out println ( " error : " + e ) ; caught error set ( e ) ; latch count down ( ) ; } @ override public void on next ( long args ) { throw new runtime exception ( " forced failure " ) ; } } ; f safe subscribe ( subscriber ) ; latch await ( 2000 , time unit milliseconds ) ; assert not null ( caught error get ( ) ) ; }


public auth filter builder < c , p , t > set prefix ( string prefix ) { this prefix = prefix ; return this ; }


iff set to < code > true < code > this settings update will only add settings not already set on an index existing settings remain unchanged

public update settings cluster state update request set preserve existing ( boolean preserve existing ) { this preserve existing = preserve existing ; return this ; }


extracts the specified field out of data map , or alternative falls back to the action value

private string get field ( string action id , string watch id , string name , map < string , object > data , string field name , string default value ) { object obj = data remove ( field name ) ; if ( obj ! = null ) { if ( default value ! = null ) { throw illegal state ( " could not execute action [ { } ] of watch [ { } ] " + " [ ctx payload { } ] or [ ctx payload doc { } ] were set together with action [ { } ] field only set one of them " , action id , watch id , field name , field name , name ) ; } else { return obj to string ( ) ; } } return default value ; }


use the given { @ link hostname verifier } instance note that if { @ link io dropwizard client ssl tls configuration # is verify hostname ( ) } returns false , all host name verification is bypassed , including host name verification performed by a verifier specified through this interface

public jersey client builder using ( hostname verifier verifier ) { apache http client builder using ( verifier ) ; return this ; }


transitions the node from the evaluating to the done state and simultaneously sets it to the given value and error state it then returns the set of reverse dependencies that need to be signaled this is an atomic operation to avoid a race where two threads work on two nodes , where one node depends on another ( b depends on a ) when a finishes , it signals < b > exactly < b > the set of reverse dependencies that are registered at the time of the { @ code set value } call if b comes in before a , it is signaled ( and re - scheduled ) by a , otherwise it needs to do that itself { @ code version } indicates the graph version at which this node is being written if the entry determines that the new value is equal to the previous value , the entry will keep its current version callers can query that version to see if the node considers its value to have changed

set < sky key > set value ( sky value value , version version ) throws interrupted exception ;


abort all pending uploads in the list this operation is used by the magic committer as part of its rollback after a failure during task commit

protected void abort pending uploads ( job context context , list < single pending commit > pending , boolean suppress exceptions ) throws i o exception { if ( pending = = null | | pending is empty ( ) ) { log info ( " { } : no pending commits to abort " , get role ( ) ) ; } else { try ( duration info d = new duration info ( log , " aborting % s uploads " , pending size ( ) ) ; commit operations commit context commit context = initiate commit operation ( ) ) { tasks foreach ( pending ) execute with ( build submitter ( context ) ) suppress exceptions ( suppress exceptions ) run ( commit context : : abort single commit ) ; } } }


inserts an instruction in the output at the given offset

public void insert ( int at , dalv insn insn ) { insns add ( at , insn ) ; update info ( insn ) ; }


rewrites the transform config according to the latest format operations cover : - move deprecated settings to its new place - change configuration options so it stays compatible ( given a newer version )

public static transform config rewrite for update ( final transform config transform config ) { / / quick check if a rewrite is required , if none found just return the original / / a failing quick check , does not mean a rewrite is necessary if ( transform config get version ( ) ! = null & & transform config get version ( ) on or after ( version v 7 11 0 ) & & ( transform config get pivot config ( ) = = null | | transform config get pivot config ( ) get max page search size ( ) = = null ) ) { return transform config ; } builder builder = new builder ( transform config ) ; / / call apply rewrite without config , to only allow reading from the builder return apply rewrite for update ( builder ) ; }


checks whether < code > position < code > resides in a default ( sql ) partition of < code > document < code >

public boolean is default partition ( int position ) { assert ( position > = 0 ) ; assert ( position < = document get length ( ) ) ; try { i typed region region = text utilities get partition ( document , partitioning , position , false ) ; return region get type ( ) equals ( partition ) ; } catch ( bad location exception e ) { / / log debug ( editor messages error bad location exception , e ) ; } return false ; }


returns true if the storage directory on the given directory is already loaded

protected boolean contains storage dir ( storage location location ) throws i o exception { for ( storage directory sd : storage dirs ) { if ( location matches storage directory ( sd ) ) { return true ; } } return false ; }


deserializes accumulators from a task state update this method never throws an exception !

private map < string , accumulator < ? , ? > > deserialize accumulators ( task execution state transition state ) { accumulator snapshot serialized accumulators = state get accumulators ( ) ; if ( serialized accumulators ! = null ) { try { return serialized accumulators deserialize user accumulators ( user class loader ) ; } catch ( throwable t ) { / / we catch throwable here to include all form of linking errors that may / / occur if user classes are missing in the classpath log error ( " failed to deserialize final accumulator results " , t ) ; } } return null ; }


gets local configuration for explanation when it could die , see { @ link # get ( ) }

public static @ non null jenkins location configuration get or die ( ) { jenkins location configuration config = jenkins location configuration get ( ) ; if ( config = = null ) { throw new illegal state exception ( " jenkins location configuration instance is missing probably the jenkins instance is not fully loaded at this time " ) ; } return config ; }


gets the mount path info , which contains the target file system and remaining path to pass to the target file system

public mount path info < file system > get mount path info ( path path , configuration conf ) throws i o exception { inode tree resolve result < file system > res ; try { res = fs state resolve ( get uri path ( path ) , true ) ; file system fs = res is internal dir ( ) ? ( fs state get root fallback link ( ) ! = null ? ( ( ch rooted file system ) fs state get root fallback link ( ) target file system ) get my fs ( ) : fs getter ( ) get ( path to uri ( ) , conf ) ) : ( ( ch rooted file system ) res target file system ) get my fs ( ) ; return new mount path info < file system > ( res remaining path , res resolved path , fs ) ; } catch ( file not found exception e ) { / / no link configured with passed path throw new not in mountpoint exception ( path , " no link found for the given path " ) ; } }


returns height of image aware view this value is used to define scale size for original image can return 0 if height is undefined < br > is called on ui thread if image loader was called on ui thread otherwise - on background thread


convert a path component that contains backslash ecape sequences to a literal string this is necessary when you want to explicitly refer to a path that contains globber metacharacters

private static string unescape path component ( string name ) { return name replace all ( " \ \ \ \ ( ) " , " $ 1 " ) ; }


default o decode ( final i value ) { return decode ( value , array utils empty object array ) ; }


internal method that breaks out the flag values { @ code byte [ 3 ] } array method does not check size

protected void process flags ( byte [ ] flags in ) { int flags byte = flags in [ 0 ] ; language = language name from value ( flags byte ) ; flags byte = flags in [ 1 ] ; pcode present = ( ( flags byte & 0x 0 0 0 1 ) = = 0x 0 0 0 1 ) ; flags byte > > = 1 ; floating precision = ( flags byte & 0x 0 3 ) ; flags byte > > = 2 ; float package = ( flags byte & 0x 0 3 ) ; flags byte > > = 2 ; ambiant data model = ( flags byte & 0x 0 7 ) ; flags byte = flags in [ 2 ] ; ambiant code model = ( flags byte & 0x 0 7 ) ; flags byte > > = 3 ; compiled 3 2 bit mode = ( ( flags byte & 0x 0 0 0 1 ) = = 0x 0 0 0 1 ) ; }


increments by one the value currently associated with { @ code key } , and returns the old value

public long get and increment ( k key ) { return get and add ( key , 1 ) ; }


returns the contents of this instance as a { @ code dex } file , in { @ code byte [ ] } form

public byte [ ] to dex ( writer human out , boolean verbose ) throws i o exception { boolean annotate = ( human out ! = null ) ; byte array annotated output result = to dex 0 ( annotate , verbose ) ; if ( annotate ) { result write annotations to ( human out ) ; } return result get array ( ) ; }


template method for handling { @ code d o m source } s this implementation delegates to { @ code unmarshal dom node } if the given source is empty , an empty source { @ code document } will be created as a placeholder

protected object unmarshal dom source ( d o m source dom source ) throws xml mapping exception { if ( dom source get node ( ) = = null ) { dom source set node ( build document ( ) ) ; } try { return unmarshal dom node ( dom source get node ( ) ) ; } catch ( null pointer exception ex ) { if ( ! is support dtd ( ) ) { throw new unmarshalling failure exception ( " npe while unmarshalling " + " this can happen on jdk 1 6 due to the presence of dtd " + " declarations , which are disabled " , ex ) ; } throw ex ; } }


write a line of text to a file characters are encoded into bytes using utf - 8 this utility method opens the file for writing , creating the file if it does not exist , or overwrites an existing file

public static file system write ( final file system fs , final path path , final char sequence charseq ) throws i o exception { return write ( fs , path , charseq , standard charsets utf 8 ) ; }


get the vocabulary used by the recognizer

public vocabulary get vocabulary ( ) { return vocabulary impl from token names ( get token names ( ) ) ; }


compute the minimum , treating the inputs as unsigned

public static int unsigned min ( int a , int b ) { return ( integer compare unsigned ( a , b ) < 0 ) ? a : b ; }


test create , update and delete events of process instances

public void test process instance events ( ) throws exception { process instance process instance = runtime service start process instance by key ( " one task process " ) ; assert that ( process instance ) is not null ( ) ; / / check create - event assert that ( listener get events received ( ) ) has size ( 6 ) ; assert that ( listener get events received ( ) get ( 0 ) ) is instance of ( activiti entity event class ) ; / / process instance create event activiti entity event event = ( activiti entity event ) listener get events received ( ) get ( 0 ) ; assert that ( event get type ( ) ) is equal to ( activiti event type entity created ) ; assert that ( ( ( process instance ) event get entity ( ) ) get id ( ) ) is equal to ( process instance get id ( ) ) ; assert that ( event get process instance id ( ) ) is equal to ( process instance get id ( ) ) ; assert that ( event get execution id ( ) ) is equal to ( process instance get id ( ) ) ; assert that ( event get process definition id ( ) ) is equal to ( process instance get process definition id ( ) ) ; / / start event create event event = ( activiti entity event ) listener get events received ( ) get ( 1 ) ; assert that ( event get type ( ) ) is equal to ( activiti event type entity created ) ; assert that ( event get process instance id ( ) ) is equal to ( process instance get id ( ) ) ; assert that ( event get execution id ( ) ) is not equal to ( process instance get id ( ) ) ; assert that ( event get process definition id ( ) ) is equal to ( process instance get process definition id ( ) ) ; / / start event create initialized event = ( activiti entity event ) listener get events received ( ) get ( 2 ) ; assert that ( event get type ( ) ) is equal to ( activiti event type entity initialized ) ; assert that ( event get process instance id ( ) ) is equal to ( process instance get id ( ) ) ; assert that ( event get execution id ( ) ) is not equal to ( process instance get id ( ) ) ; assert that ( event get process definition id ( ) ) is equal to ( process instance get process definition id ( ) ) ; event = ( activiti entity event ) listener get events received ( ) get ( 3 ) ; assert that ( event get type ( ) ) is equal to ( activiti event type entity initialized ) ; assert that ( event get process instance id ( ) ) is equal to ( process instance get id ( ) ) ; assert that ( event get execution id ( ) ) is equal to ( process instance get id ( ) ) ; assert that ( event get process definition id ( ) ) is equal to ( process instance get process definition id ( ) ) ; event = ( activiti entity event ) listener get events received ( ) get ( 4 ) ; assert that ( event get type ( ) ) is equal to ( activiti event type entity updated ) ; assert that ( event get process instance id ( ) ) is equal to ( process instance get id ( ) ) ; assert that ( event get process definition id ( ) ) is equal to ( process instance get process definition id ( ) ) ; assert that ( event ) is instance of ( activiti entity event impl class ) ; event = ( activiti entity event ) listener get events received ( ) get ( 5 ) ; assert that ( event get type ( ) ) is equal to ( activiti event type process started ) ; assert that ( event get process instance id ( ) ) is equal to ( process instance get id ( ) ) ; assert that ( event get process definition id ( ) ) is equal to ( process instance get process definition id ( ) ) ; assert that ( event ) is instance of ( activiti process started event class ) ; assert that ( ( ( activiti process started event ) event ) get nested process definition id ( ) ) is null ( ) ; assert that ( ( ( activiti process started event ) event ) get nested process instance id ( ) ) is null ( ) ; listener clear events received ( ) ; / / check update event when suspended / activated runtime service suspend process instance by id ( process instance get id ( ) ) ; runtime service activate process instance by id ( process instance get id ( ) ) ; assert that ( listener get events received ( ) ) has size ( 4 ) ; event = ( activiti entity event ) listener get events received ( ) get ( 0 ) ; assert that ( ( ( process instance ) event get entity ( ) ) get id ( ) ) is equal to ( process instance get id ( ) ) ; assert that ( event get type ( ) ) is equal to ( activiti event type entity suspended ) ; assert that ( event get process instance id ( ) ) is equal to ( process instance get id ( ) ) ; assert that ( event get execution id ( ) ) is equal to ( process instance get id ( ) ) ; assert that ( event get process definition id ( ) ) is equal to ( process instance get process definition id ( ) ) ; event = ( activiti entity event ) listener get events received ( ) get ( 1 ) ; assert that ( event get type ( ) ) is equal to ( activiti event type entity suspended ) ; assert that ( event get process instance id ( ) ) is equal to ( process instance get id ( ) ) ; assert that ( event get execution id ( ) ) is not equal to ( process instance get id ( ) ) ; assert that ( event get process definition id ( ) ) is equal to ( process instance get process definition id ( ) ) ; event = ( activiti entity event ) listener get events received ( ) get ( 2 ) ; assert that ( event get type ( ) ) is equal to ( activiti event type entity activated ) ; assert that ( ( ( process instance ) event get entity ( ) ) get id ( ) ) is equal to ( process instance get id ( ) ) ; assert that ( event get process instance id ( ) ) is equal to ( process instance get id ( ) ) ; assert that ( event get execution id ( ) ) is equal to ( process instance get id ( ) ) ; assert that ( event get process definition id ( ) ) is equal to ( process instance get process definition id ( ) ) ; event = ( activiti entity event ) listener get events received ( ) get ( 3 ) ; assert that ( event get type ( ) ) is equal to ( activiti event type entity activated ) ; assert that ( event get process instance id ( ) ) is equal to ( process instance get id ( ) ) ; assert that ( event get execution id ( ) ) is not equal to ( process instance get id ( ) ) ; assert that ( event get process definition id ( ) ) is equal to ( process instance get process definition id ( ) ) ; listener clear events received ( ) ; / / check update event when process - definition is suspended ( should / / cascade suspend / activate all process instances ) repository service suspend process definition by id ( process instance get process definition id ( ) , true , null ) ; repository service activate process definition by id ( process instance get process definition id ( ) , true , null ) ; assert that ( listener get events received ( ) ) has size ( 4 ) ; event = ( activiti entity event ) listener get events received ( ) get ( 0 ) ; assert that ( ( ( process instance ) event get entity ( ) ) get id ( ) ) is equal to ( process instance get id ( ) ) ; assert that ( event get type ( ) ) is equal to ( activiti event type entity suspended ) ; assert that ( event get process instance id ( ) ) is equal to ( process instance get id ( ) ) ; assert that ( event get execution id ( ) ) is equal to ( process instance get id ( ) ) ; assert that ( event get process definition id ( ) ) is equal to ( process instance get process definition id ( ) ) ; event = ( activiti entity event ) listener get events received ( ) get ( 1 ) ; assert that ( event get type ( ) ) is equal to ( activiti event type entity suspended ) ; assert that ( event get process instance id ( ) ) is equal to ( process instance get id ( ) ) ; assert that ( event get execution id ( ) ) is not equal to ( process instance get id ( ) ) ; assert that ( event get process definition id ( ) ) is equal to ( process instance get process definition id ( ) ) ; event = ( activiti entity event ) listener get events received ( ) get ( 2 ) ; assert that ( event get type ( ) ) is equal to ( activiti event type entity activated ) ; assert that ( ( ( process instance ) event get entity ( ) ) get id ( ) ) is equal to ( process instance get id ( ) ) ; assert that ( event get process instance id ( ) ) is equal to ( process instance get id ( ) ) ; assert that ( event get execution id ( ) ) is equal to ( process instance get id ( ) ) ; assert that ( event get process definition id ( ) ) is equal to ( process instance get process definition id ( ) ) ; event = ( activiti entity event ) listener get events received ( ) get ( 3 ) ; assert that ( event get type ( ) ) is equal to ( activiti event type entity activated ) ; assert that ( event get process instance id ( ) ) is equal to ( process instance get id ( ) ) ; assert that ( event get execution id ( ) ) is not equal to ( process instance get id ( ) ) ; assert that ( event get process definition id ( ) ) is equal to ( process instance get process definition id ( ) ) ; listener clear events received ( ) ; / / check update - event when business - key is updated runtime service update business key ( process instance get id ( ) , " thekey " ) ; assert that ( listener get events received ( ) ) has size ( 1 ) ; event = ( activiti entity event ) listener get events received ( ) get ( 0 ) ; assert that ( ( ( process instance ) event get entity ( ) ) get id ( ) ) is equal to ( process instance get id ( ) ) ; assert that ( event get type ( ) ) is equal to ( activiti event type entity updated ) ; assert that ( event get process instance id ( ) ) is equal to ( process instance get id ( ) ) ; assert that ( event get execution id ( ) ) is equal to ( process instance get id ( ) ) ; assert that ( event get process definition id ( ) ) is equal to ( process instance get process definition id ( ) ) ; listener clear events received ( ) ; runtime service delete process instance ( process instance get id ( ) , " testing events " ) ; list < activiti event > process cancelled events = listener filter events ( activiti event type process cancelled ) ; assert that ( process cancelled events ) has size ( 1 ) ; activiti cancelled event cancelled event = ( activiti cancelled event ) process cancelled events get ( 0 ) ; assert that ( cancelled event get type ( ) ) is equal to ( activiti event type process cancelled ) ; assert that ( cancelled event get process instance id ( ) ) is equal to ( process instance get id ( ) ) ; assert that ( cancelled event get execution id ( ) ) is equal to ( process instance get id ( ) ) ; listener clear events received ( ) ; }


confirm that the requested number of workers are up and running

protected optional < boolean > check workers up ( int num workers , bi function < integer , integer , boolean > comp ) { try { int num up = connect active workers ( ) size ( ) ; return optional of ( comp apply ( num up , num workers ) ) ; } catch ( exception e ) { log error ( " could not check active workers " , e ) ; return optional empty ( ) ; } }


returns a { @ link request builder } for a given item on which { @ link request builder # load ( object ) } } has been called or { @ code null } if no valid load can be started for the preloader to be effective , the { @ link request builder } returned here must use exactly the same size and set of options as the { @ link request builder } used when the ` ` view ` ` is bound you may need to specify a size in both places to ensure that the width and height match exactly if so , you can use { @ link com bumptech glide request request options # override ( int , int ) } to do so the target and context will be provided by the preloader if { @ link request builder # load ( object ) } is not called by this method , the preloader will trigger a { @ link runtime exception } if you don ' t want to load a particular item or position , filter it from the list returned by { @ link # get preload items ( int ) }

request builder < ? > get preload request builder ( @ non null u item ) ;


completed checkpoint stats summary create snapshot ( ) { return new completed checkpoint stats summary ( state size create snapshot ( ) , duration create snapshot ( ) , processed data create snapshot ( ) , persisted data create snapshot ( ) ) ; }


public builder < k , v > put all ( iterable < ? extends entry < ? extends k , ? extends v > > entries ) { super put all ( entries ) ; return this ; }


called from the dialog when the " next diff " button is hit update the buttons in the dialog according to whether there is a next or previous

void next ( ) { address next address = get next address ( ) ; if ( next address ! = null ) { go to ( next address ) ; } }


add a task to the task queue , or throws a { @ link rejected execution exception } if this instance was shutdown before

private void add task ( runnable task ) { task queue add ( object util check not null ( task , " task " ) ) ; }


generate a json snapshot of current beans and their dependencies


retrieve the message for the given code , using the " default html escape " setting

public string get message ( string code , @ nullable list < ? > args , string default message ) { return get message ( code , ( args ! = null ? args to array ( ) : null ) , default message , is default html escape ( ) ) ; }


split this leaf node in half and update tree when a split is performed , the next operation must be performed from the root node since the tree may have been restructured

var key node split ( ) throws i o exception { / / create new leaf int old sibling id = buffer get int ( next leaf id offset ) ; var key record node new leaf = create new leaf ( buffer get id ( ) , old sibling id ) ; data buffer new buf = new leaf buffer ; int new buf id = new buf get id ( ) ; buffer put int ( next leaf id offset , new buf id ) ; if ( old sibling id > = 0 ) { var key record node leaf = ( var key record node ) node mgr get var key node ( old sibling id ) ; leaf buffer put int ( prev leaf id offset , new buf id ) ; } / / split node creating two balanced leaves split data ( new leaf ) ; if ( parent ! = null ) { / / ask parent to insert new node and return root return parent insert ( new leaf ) ; } / / new parent node becomes root return new var key interior node ( node mgr , get key field ( 0 ) , buffer get id ( ) , new leaf get key field ( 0 ) , new buf id ) ; }


validate a test where each result has the same values

private static < t extends comparable < t > & copyable value < t > > void validate ( graph < t , null value , null value > graph , long count , long degree , long triangle count ) throws exception { data set < result < t > > cc = graph run ( new local clustering coefficient < > ( ) ) ; list < result < t > > results = cc collect ( ) ; assert equals ( count , results size ( ) ) ; for ( result < t > result : results ) { assert equals ( degree , result get degree ( ) get value ( ) ) ; assert equals ( triangle count , result get triangle count ( ) get value ( ) ) ; } }


takes a list of resource requests ( asks ) , extracts the key information viz ( priority , resource name , capability ) and adds to the outstanding opportunistic outstanding op reqs map the nested map is required to enforce the current yarn constraint that only a single resource request can exist at a give priority and capability

public void add to outstanding reqs ( list < resource request > resource asks ) { for ( resource request request : resource asks ) { scheduler request key scheduler key = scheduler request key create ( request ) ; map < resource , enriched resource request > req map = outstanding op reqs get ( scheduler key ) ; if ( req map = = null ) { req map = new hash map < > ( ) ; outstanding op reqs put ( scheduler key , req map ) ; } enriched resource request e req = req map get ( request get capability ( ) ) ; if ( e req = = null ) { e req = new enriched resource request ( request ) ; req map put ( request get capability ( ) , e req ) ; } / / set num containers only for any request if ( resource request is any location ( request get resource name ( ) ) ) { e req get request ( ) set resource name ( resource request any ) ; e req get request ( ) set num containers ( request get num containers ( ) ) ; } else { e req add location ( request get resource name ( ) , request get num containers ( ) ) ; } if ( resource request is any location ( request get resource name ( ) ) ) { log info ( " # of outstanding op reqs in any ( at " + " priority = " + scheduler key get priority ( ) + " , allocation req id = " + scheduler key get allocation request id ( ) + " , with capability = " + request get capability ( ) + " ) : " + " , with location = " + request get resource name ( ) + " ) : " + " , num containers = " + e req get request ( ) get num containers ( ) ) ; } } }


is application starved for fairshare or minshare

boolean is starved ( ) { return is starved for fair share ( ) | | ! resources is none ( minshare starvation ) ; }


accept the value and return true if forwarded

boolean accept ( subscriber < ? super u > a , t v ) ;


get list of constructor names with line numbers any debug mode may be used

public list < string > get constructor line numbers ( ) { list < string > list = new array list < string > ( ) ; if ( prototype = = null ) { return list ; } try { sleigh parser context pos = prototype get parser context ( buf , context ) ; parser walker walker = new parser walker ( pos ) ; walker base state ( ) ; dump symbol line numbers ( list , walker ) ; } catch ( exception e ) { / / ignore } return list ; }


true when this type ' s bindings use raw integer values instead of { @ code r } references

private boolean has unqualified resource bindings ( ) { for ( resource binding binding : resource bindings ) { if ( ! binding id ( ) qualifed ) { return true ; } } return false ; }


changes the bytes at the given offset to the given values note , the original bytes can still be accessed via { @ link # get original bytes ( long , byte [ ] ) } if the bytes are changed more than once , only the original values are preserved

synchronized int put bytes ( long offset , byte [ ] b ) throws i o exception { return put bytes ( offset , b , 0 , b length ) ; }


returns an immutable list with all alternative snapshots to restore the raw operator state , in the order in which we should attempt to restore

public list < state object collection < operator state handle > > get prioritized raw operator state ( ) { return prioritized raw operator state ; }


void on image drawn ( string id , info image info , dimensions info dimensions info ) ;


a callback that should never be invoked directly

public void on load started ( @ nullable drawable placeholder ) { / / do nothing }


loads an x 509 certificate from the classpath resources in srcmainresourcescerts

public static x 5 0 9 certificate load x 5 0 9 cert ( string file name ) throws certificate exception , i o exception { certificate factory cf = certificate factory get instance ( " x 509 " ) ; input stream in = test utils class get resource as stream ( " / certs / " + file name ) ; try { return ( x 5 0 9 certificate ) cf generate certificate ( in ) ; } finally { in close ( ) ; } }


public void test json form data ( string param , string param 2 ) throws api exception { test json form data with http info ( param , param 2 ) ; }


returns whether java builders supports running persistent workers in multiplex mode

public boolean get javac supports multiplex workers ( ) { return javac supports multiplex workers ; }


attaches the tool tip from the gui resources that corresponds to the given key , to the given component

private static j component tip ( j component component , string message key ) { component set tool tip text ( msg ( message key ) ) ; return component ; }


returns the merged line execution found in the two given { @ code source file coverage } s

static tree map < integer , line coverage > merge lines ( source file coverage s 1 , source file coverage s 2 ) { return stream of ( s 1 lines , s 2 lines ) map ( map : : entry set ) flat map ( collection : : stream ) collect ( collectors to map ( map entry : : get key , map entry : : get value , line coverage : : merge , tree map : : new ) ) ; }


returns a { @ link weigher } that returns the given { @ code constant } for every request

static weigher < object , object > constant weigher ( int constant ) { return new constant weigher ( constant ) ; }


match needs to return the current input symbol , which gets put into the label for the associated token ref ; e g , x = id

public token get current token ( ) { return input lt ( 1 ) ; }


get the currently installed client authenticator if one has not been installed , this will trigger the installation of a default instance

public static client authenticator get client authenticator ( ) { if ( client authenticator = = null ) { if ( system utilities is in headless mode ( ) ) { set client authenticator ( new headless client authenticator ( ) ) ; } else { set client authenticator ( new default client authenticator ( ) ) ; } } return client authenticator ; }


get parameter with type < code > url < code > from method parameter : test if parameter has method which returns type < code > url < code > if not found , throws illegal state exception

private string generate url assignment indirectly ( method method ) { class < ? > [ ] pts = method get parameter types ( ) ; map < string , integer > getter return url = new hash map < > ( ) ; / / find url getter method for ( int i = 0 ; i < pts length ; + + i ) { for ( method m : pts [ i ] get methods ( ) ) { string name = m get name ( ) ; if ( ( name starts with ( " get " ) | | name length ( ) > 3 ) & & modifier is public ( m get modifiers ( ) ) & & ! modifier is static ( m get modifiers ( ) ) & & m get parameter types ( ) length = = 0 & & m get return type ( ) = = url class ) { getter return url put ( name , i ) ; } } } if ( getter return url size ( ) < = 0 ) { / / getter method not found , throw throw new illegal state exception ( " failed to create adaptive class for interface " + type get name ( ) + " : not found url parameter or url attribute in parameters of method " + method get name ( ) ) ; } integer index = getter return url get ( " get url " ) ; if ( index ! = null ) { return generate get url null check ( index , pts [ index ] , " get url " ) ; } else { map entry < string , integer > entry = getter return url entry set ( ) iterator ( ) next ( ) ; return generate get url null check ( entry get value ( ) , pts [ entry get value ( ) ] , entry get key ( ) ) ; } }


public static string null to blank ( final string string ) { return string = = null ? blank : string ; }


return the additional ( undeclared ) property

public map < string , object > get additional properties ( ) { return additional properties ; }


add multiple sql scripts to execute to initialize or populate the database

public embedded database builder add scripts ( string scripts ) { for ( string script : scripts ) { add script ( script ) ; } return this ; }


register a listener that will be called when this model visibility has changed the listener will contribute to this model ' s hash code state per the { @ link com airbnb epoxy epoxy attribute option # do not hash } rules

public auto layout model view model on visibility changed ( on model visibility changed listener < auto layout model view model , auto layout model view > listener ) { on mutation ( ) ; this on model visibility changed listener epoxy generated model = listener ; return this ; }


should the pointcut apply to the given interface or target class ?

public boolean matches ( class < ? > clazz ) { assert state ( this aspect j type pattern matcher ! = null , " no type pattern has been set " ) ; return this aspect j type pattern matcher matches ( clazz ) ; }


write out the tuples in a temporary file and return it

public void write tuples ( ) throws i o exception { this temp file = file create temp file ( " binary input format " , null ) ; this temp file delete on exit ( ) ; configuration configuration = new configuration ( ) ; configuration set long ( binary output format block size parameter key , this block size ) ; if ( this parallelism = = 1 ) { binary output format < t > output = create output format ( this temp file to u r i ( ) to string ( ) , configuration ) ; for ( int index = 0 ; index < this number of tuples ; index + + ) { output write record ( this get record ( index ) ) ; } output close ( ) ; } else { this temp file delete ( ) ; this temp file mkdir ( ) ; int record index = 0 ; for ( int file index = 0 ; file index < this parallelism ; file index + + ) { binary output format < t > output = create output format ( this temp file to u r i ( ) + " / " + ( file index + 1 ) , configuration ) ; for ( int file count = 0 ; file count < this get number of tuples per file ( file index ) ; file count + + , record index + + ) { output write record ( this get record ( record index ) ) ; } output close ( ) ; } } }


add { @ link abstract config instance } into { @ link config manager } current method will invoked by spring or java ee container automatically , or should be triggered manually

public void add into config manager ( ) { application model get config manager ( ) add config ( this ) ; }


a filter for a field based on several terms matching on any of them

public static terms query builder terms query ( string name , double values ) { return new terms query builder ( name , values ) ; }


make sure we get allocations regardless of timing issues

private void trigger scheduling with n m heart beat ( ) { / / simulate fair scheduler update thread r m context context = yarn cluster get resource manager ( ) get r m context ( ) ; if ( context get scheduler ( ) instanceof fair scheduler ) { fair scheduler scheduler = ( fair scheduler ) context get scheduler ( ) ; scheduler update ( ) ; } / / trigger nm ' s heartbeat to rm and trigger allocations for ( r m node rm node : context get r m nodes ( ) values ( ) ) { context get scheduler ( ) handle ( new node update scheduler event ( rm node ) ) ; } if ( context get scheduler ( ) instanceof fair scheduler ) { fair scheduler scheduler = ( fair scheduler ) context get scheduler ( ) ; scheduler update ( ) ; } }


test verifies removing watcher having namespace

public void test ch root remove watcher ( boolean use async ) throws exception { / / creating the subtree for ch root clients string ch root = " / apps x " ; zk 1 create ( " / apps x " , null , ids open acl unsafe , create mode persistent ) ; if ( zk 1 ! = null ) { zk 1 close ( ) ; } if ( zk 2 ! = null ) { zk 2 close ( ) ; } / / creating ch root client zk 1 = create client ( this host port + ch root ) ; zk 2 = create client ( this host port + ch root ) ; log info ( " creating child znode / node 1 using ch root client " ) ; zk 1 create ( " / node 1 " , null , ids open acl unsafe , create mode persistent ) ; my watcher w 1 = new my watcher ( " / node 1 " , 2 ) ; my watcher w 2 = new my watcher ( " / node 1 " , 1 ) ; log info ( " adding data watcher { } on path { } " , w 1 , " / node 1 " ) ; assert not null ( zk 2 exists ( " / node 1 " , w 1 ) , " didn ' t set data watches " ) ; / / add multiple child watches log info ( " adding child watcher { } on path { } " , w 1 , " / node 1 " ) ; zk 2 get children ( " / node 1 " , w 2 ) ; log info ( " adding child watcher { } on path { } " , w 2 , " / node 1 " ) ; zk 2 get children ( " / node 1 " , w 1 ) ; remove watches ( zk 2 , " / node 1 " , w 1 , watcher type any , false , code ok , use async ) ; assert true ( w 1 matches ( ) , " didn ' t remove child watcher " ) ; assert equals ( 1 , zk 2 get child watches ( ) size ( ) , " didn ' t find child watcher " ) ; remove watches ( zk 2 , " / node 1 " , w 2 , watcher type any , false , code ok , use async ) ; assert true ( w 2 matches ( ) , " didn ' t remove child watcher " ) ; }


public boolean is done ( ) { return done state ; }


sets the colors that should be used fore this data set colors are reused as soon as the number of entries the data set represents is higher than the size of the colors array if you are using colors from the resources , make sure that the colors are already prepared ( by calling get resources ( ) get color ( ) ) before adding them to the data set

public void set colors ( int colors ) { this m colors = color template create colors ( colors ) ; }


returns the function definition being created by this applier

function definition data type get function definition ( ) { return function definition ; }


public big decimal get my number ( ) { return my number ; }


replays the contents of this cache to the given consumer based on its current state and number of items requested by it

void replay ( cache subscription < t > consumer ) { / / make sure there is only one replay going on at a time if ( consumer get and increment ( ) ! = 0 ) { return ; } / / see if there were more replay request in the meantime int missed = 1 ; / / read out state into locals upfront to avoid being re - read due to volatile reads long index = consumer index ; int offset = consumer offset ; node < t > node = consumer node ; atomic long requested = consumer requested ; subscriber < ? super t > downstream = consumer downstream ; int capacity = capacity hint ; for ( ; ; ) { / / first see if the source has terminated , read order matters ! boolean source done = done ; / / and if the number of items is the same as this consumer has received boolean empty = size = = index ; / / if the source is done and we have all items so far , terminate the consumer if ( source done & & empty ) { / / release the node object to avoid leaks through retained consumers consumer node = null ; / / if error is not null then the source failed throwable ex = error ; if ( ex ! = null ) { downstream on error ( ex ) ; } else { downstream on complete ( ) ; } return ; } / / there are still items not sent to the consumer if ( ! empty ) { / / see how many items the consumer has requested in total so far long consumer requested = requested get ( ) ; / / min value indicates a cancelled consumer , we stop replaying if ( consumer requested = = long min value ) { / / release the node object to avoid leaks through retained consumers consumer node = null ; return ; } / / if the consumer has requested more and there is more , we will emit an item if ( consumer requested ! = index ) { / / if the offset in the current node has reached the node capacity if ( offset = = capacity ) { / / switch to the subsequent node node = node next ; / / reset the in - node offset offset = 0 ; } / / emit the cached item downstream on next ( node values [ offset ] ) ; / / move the node offset forward offset + + ; / / move the total consumed item count forward index + + ; / / retry for the next item / terminal event if any continue ; } } / / commit the changed references back consumer index = index ; consumer offset = offset ; consumer node = node ; / / release the changes and see if there were more replay request in the meantime missed = consumer add and get ( - missed ) ; if ( missed = = 0 ) { break ; } } }


assert all values of the response header with a hamcrest { @ link matcher }

public web test client response spec values ( string name , matcher < ? super iterable < string > > matcher ) { list < string > values = get headers ( ) get ( name ) ; this exchange result assert with diagnostics ( ( ) - > { string message = get message ( name ) ; matcher assert assert that ( message , values , matcher ) ; } ) ; return this response spec ; }


return the application ' s width of screen , in pixel

public static int get app screen width ( ) { window manager wm = ( window manager ) utils get app ( ) get system service ( context window service ) ; if ( wm = = null ) return - 1 ; point point = new point ( ) ; wm get default display ( ) get size ( point ) ; return point x ; }


recalculates the direction of the camera to look at the point ( x , y , z ) this function assumes the up vector is normalized

public void look at ( float x , float y , float z ) { tmp vec set ( x , y , z ) sub ( position ) nor ( ) ; if ( ! tmp vec is zero ( ) ) { float dot = tmp vec dot ( up ) ; / / up and direction must always be orthonormal vectors if ( math abs ( dot - 1 ) < 0 0 0 0 0 0 0 0 0 1f ) { / / collinear up set ( direction ) scl ( - 1 ) ; } else if ( math abs ( dot + 1 ) < 0 0 0 0 0 0 0 0 0 1f ) { / / collinear opposite up set ( direction ) ; } direction set ( tmp vec ) ; normalize up ( ) ; } }


add an integer variable that expands { @ code name } to { @ code value }

public builder add integer variable ( string name , int value ) { variables map put ( name , new integer value ( value ) ) ; return this ; }


check all the arguments to the { @ link multipart uploader # put part ( upload handle , int , path , input stream , long ) } operation

protected void check put arguments ( path file path , input stream input stream , int part number , upload handle upload id , long length in bytes ) throws illegal argument exception { check path ( file path ) ; check argument ( input stream ! = null , " null input stream " ) ; check argument ( part number > 0 , " invalid part number : % d " , part number ) ; check argument ( upload id ! = null , " null upload id " ) ; check argument ( length in bytes > = 0 , " invalid part length : % d " , length in bytes ) ; }


find the fields constant that matches field id , throwing an exception if it is not found

public static fields find by thrift id or throw ( int field id ) { fields fields = find by thrift id ( field id ) ; if ( fields = = null ) throw new illegal argument exception ( " field " + field id + " doesn ' t exist ! " ) ; return fields ; }


gets whether this type is a normal reference type a normal reference type is a reference type that is not a return address this method is just convenient shorthand for { @ code get basic type ( ) = = type bt object }

public boolean is reference ( ) { return ( basic type = = bt object ) ; }


return the map of hints to use to customize body extraction


in this test , we root all streams at the connection , block streams c and d , and then verify that data is prioritized toward stream b which has a higher weight than stream a we also verify that the amount that is written is not uniform , and not always the allocation quantum 0 \ \ a b [ c ] [ d ]

public void write should favor priority ( ) throws http 2 exception { / / root the streams at the connection and assign weights set priority ( stream a , 0 , ( short ) 50 , false ) ; set priority ( stream b , 0 , ( short ) 200 , false ) ; set priority ( stream c , 0 , ( short ) 100 , false ) ; set priority ( stream d , 0 , ( short ) 100 , false ) ; init state ( stream a , 1000 , true ) ; init state ( stream b , 1000 , true ) ; init state ( stream c , 1000 , false ) ; init state ( stream d , 1000 , false ) ; / / set allocation quantum to 1 so it is easier to see the ratio of total bytes written between each stream distributor allocation quantum ( 1 ) ; assert true ( write ( 100 ) ) ; assert equals ( 20 , capture writes ( stream a ) ) ; verify write ( times ( 20 ) , stream a , 1 ) ; assert equals ( 80 , capture writes ( stream b ) ) ; verify write ( times ( 0 ) , stream b , 1 ) ; verify never write ( stream c ) ; verify never write ( stream d ) ; assert true ( write ( 100 ) ) ; assert equals ( 40 , capture writes ( stream a ) ) ; verify write ( times ( 40 ) , stream a , 1 ) ; assert equals ( 160 , capture writes ( stream b ) ) ; verify write ( at most ( 1 ) , stream b , 1 ) ; verify never write ( stream c ) ; verify never write ( stream d ) ; assert true ( write ( 1050 ) ) ; assert equals ( 250 , capture writes ( stream a ) ) ; verify write ( times ( 250 ) , stream a , 1 ) ; assert equals ( 1000 , capture writes ( stream b ) ) ; verify write ( at most ( 2 ) , stream b , 1 ) ; verify never write ( stream c ) ; verify never write ( stream d ) ; assert false ( write ( 750 ) ) ; assert equals ( 1000 , capture writes ( stream a ) ) ; verify write ( times ( 1 ) , stream a , 750 ) ; assert equals ( 1000 , capture writes ( stream b ) ) ; verify write ( times ( 0 ) , stream b , 0 ) ; verify never write ( stream c ) ; verify never write ( stream d ) ; }


public void reset filters ( boolean use default filters ) { this include filters clear ( ) ; this exclude filters clear ( ) ; if ( use default filters ) { register default filters ( ) ; } }


creates a new iterator that traverses the entire program ' s address space returning data instances that are strings

public static defined data iterator defined strings ( program program ) { return new defined data iterator ( program , null , data type - > string data instance is string data type ( data type ) , data - > string data instance is string ( data ) ) ; }


this member gives the virtual address at which the first byte of the segment resides in memory

public long get virtual address ( ) { return header adjust address for prelink ( p vaddr ) ; }


handle is valid iff the referent is unmoved in the namespace equivalent to changed ( true ) , moved ( false )

public static handle opt [ ] path ( ) { return new handle opt [ ] { changed ( true ) , moved ( false ) } ; }


adds an alias to an existing well - known name or registers a new instance of a { @ link url path helper } under that well - known name , unless already registered

public static runtime bean reference register url path helper ( @ nullable runtime bean reference url path helper ref , parser context context , @ nullable object source ) { if ( url path helper ref ! = null ) { if ( context get registry ( ) is alias ( url path helper bean name ) ) { context get registry ( ) remove alias ( url path helper bean name ) ; } context get registry ( ) register alias ( url path helper ref get bean name ( ) , url path helper bean name ) ; } else if ( ! context get registry ( ) is alias ( url path helper bean name ) & & ! context get registry ( ) contains bean definition ( url path helper bean name ) ) { root bean definition url path helper def = new root bean definition ( url path helper class ) ; url path helper def set source ( source ) ; url path helper def set role ( bean definition role infrastructure ) ; context get registry ( ) register bean definition ( url path helper bean name , url path helper def ) ; context register component ( new bean component definition ( url path helper def , url path helper bean name ) ) ; } return new runtime bean reference ( url path helper bean name ) ; }


performs sparse conditional constant propagation on a method

public static void process ( ssa method ssa method ) { new sccp ( ssa method ) run ( ) ; }


adds a route to the given handler function that handles http { @ code options } requests

builder options ( handler function < server response > handler function ) ;


waits until the given { @ link org apache flink runtime blob blob service } storage directory does not contain any job - related folders any more

private static void wait for empty blob dir ( file blob dir , duration remaining ) throws interrupted exception { long deadline = system current time millis ( ) + remaining to millis ( ) ; string [ ] blob dir contents ; final filename filter job dir filter = ( dir , name ) - > name starts with ( " job " ) ; do { blob dir contents = blob dir list ( job dir filter ) ; if ( blob dir contents = = null | | blob dir contents length = = 0 ) { return ; } thread sleep ( retry interval ) ; } while ( system current time millis ( ) < deadline ) ; fail ( " timeout while waiting for " + blob dir get absolute path ( ) + " to become empty current contents : " + arrays to string ( blob dir contents ) ) ; }


when provided with a byte offset , this method locates the cached region within which the offset falls , and returns the approximate end position in milliseconds of that region if the byte offset does not fall within a cached region then { @ link # not cached } is returned if the cached region extends to the end of the stream , { @ link # cached to end } is returned

public synchronized int get region end time ms ( long byte offset ) { lookup region start offset = byte offset ; @ nullable region floor region = regions floor ( lookup region ) ; if ( floor region = = null | | byte offset > floor region end offset | | floor region end offset index = = - 1 ) { return not cached ; } int index = floor region end offset index ; if ( index = = chunk index length - 1 & & floor region end offset = = ( chunk index offsets [ index ] + chunk index sizes [ index ] ) ) { return cached to end ; } long segment fraction us = ( chunk index durations us [ index ] * ( floor region end offset - chunk index offsets [ index ] ) ) / chunk index sizes [ index ] ; return ( int ) ( ( chunk index times us [ index ] + segment fraction us ) / 1000 ) ; }


sets or clears the specified bit of the general purpose bit flags

public void set flag ( flag flag , boolean set ) { short mask = ( short ) ( 1 < < flag get bit ( ) ) ; if ( set ) { flags | = mask ; } else { flags = ( short ) ( flags & ~ mask ) ; } }


public void test get seata env ( ) { assertions assert equals ( " test " , parameter parser get seata env ( ) ) ; }


if true , detach components under the hood when recycler binder # detach ( ) is called

public builder enable detach ( boolean enable detach ) { this enable detach = enable detach ; return this ; }


sets the previous nested level as current nested level and removes and returns the current nested level

public object mapper previous level ( ) { return level stack pop ( ) ; }


public static integer get client port from channel ( channel channel ) { string address = get address from channel ( channel ) ; integer port = 0 ; try { if ( address contains ( constants ip port split char ) ) { port = integer parse int ( address substring ( address last index of ( constants ip port split char ) + 1 ) ) ; } } catch ( number format exception exx ) { logger error ( exx get message ( ) ) ; } return port ; }


creates { @ link field element } instances for each given { @ link attributed string }

private field element [ ] create field elements ( list < attributed string > attributed strings ) { list < field element > elements = new array list < > ( ) ; int line num = 0 ; for ( attributed string line : attributed strings ) { field element block element = new text field element ( line , line num , 0 ) ; elements add ( block element ) ; line num + + ; } / / convert to an array field element [ ] elements array = new field element [ elements size ( ) ] ; elements to array ( elements array ) ; return elements array ; }


returns a list with all the windows in the window stack used for testing

public list < window > get windows ( boolean include main ) { array list < window > win list = new array list < > ( ) ; if ( include main ) { win list add ( root get main window ( ) ) ; } iterator < detached window node > it = root get detached windows ( ) iterator ( ) ; while ( it has next ( ) ) { detached window node node = it next ( ) ; window win = node get window ( ) ; if ( win ! = null ) { win list add ( win ) ; } } return win list ; }


creates list of users with given input array ( asynchronously )

public okhttp 3 call create users with list input async ( list < user > body , final api callback < void > callback ) throws api exception { okhttp 3 call local var call = create users with list input validate before call ( body , callback ) ; local var api client execute async ( local var call , callback ) ; return local var call ; }


acquires the index commit that should be included in a snapshot

public final index commit ref acquire index commit for snapshot ( ) throws engine exception { return engine config get snapshot commit supplier ( ) acquire index commit for snapshot ( this ) ; }


the leaf lookup for the lucene segment this script was created for

protected final leaf search lookup get leaf lookup ( ) { return leaf lookup ; }


get maximum retry attempts for the register stream operation

public int get register stream max retries ( ) { return register stream max retries ; }


see { @ link synchronized bi map test } for more tests

public void test synchronized bi map ( ) { bi map < string , integer > bimap = hash bi map create ( ) ; bimap put ( " one " , 1 ) ; bi map < string , integer > sync = maps synchronized bi map ( bimap ) ; bimap put ( " two " , 2 ) ; sync put ( " three " , 3 ) ; assert equals ( immutable set of ( 1 , 2 , 3 ) , bimap inverse ( ) key set ( ) ) ; assert equals ( immutable set of ( 1 , 2 , 3 ) , sync inverse ( ) key set ( ) ) ; }


used in conjunction with { @ link # get quorum timeout increase millis ( long , int ) } to check for pauses

private void restart quorum stop watch ( ) { quorum stop watch reset ( ) start ( ) ; }


helper method to remove a subset of permissions ( remove ) from a given set ( perms )

public static int remove specific perms ( int perms , int remove ) { return perms ^ remove ; }


public integer get integer item ( ) { return integer item ; }


update the shown foreground service notification after making any changes that affect it

void update notification ( ) { if ( m wake lock = = null & & m terminal sessions is empty ( ) & & m background tasks is empty ( ) ) { / / exit if we are updating after the user disabled all locks with no sessions or tasks running stop self ( ) ; } else { ( ( notification manager ) get system service ( context notification service ) ) notify ( notification id , build notification ( ) ) ; } }


parse a { @ link geo point } with a { @ link x content parser } :

public static geo point parse geo point ( x content parser parser ) throws i o exception , elasticsearch parse exception { return parse geo point ( parser , new geo point ( ) ) ; }


key command : ssh - keygen - f openssh - t rsa - b 1024 in this key we remove some lines to break the key

public void load key broken ( ) throws i o exception , general security exception { file file = new file ( this get class ( ) get resource ( " openssh - broken " ) get file ( ) ) ; string password = " password " ; assert throws ( illegal argument exception class , ( ) - > private key provider load key ( file , password ) ) ; }


get spnego keytab key from configuration

public static string get spnego keytab key ( configuration conf , string default key ) { string value = conf get ( d f s config keys dfs web authentication kerberos keytab key ) ; return ( value = = null | | value is empty ( ) ) ? default key : d f s config keys dfs web authentication kerberos keytab key ; }


returns the default port if the file system defines one { @ link file system # get default port ( ) } returns 0 to indicate the default port is undefined however , the logic that consumes this value expects to receive - 1 to indicate the port is undefined , which agrees with the contract of { @ link uri # get port ( ) }

private static int get default port if defined ( file system the fs impl ) { int default port = the fs impl get default port ( ) ; return default port ! = 0 ? default port : delegate to fs default port ; }


public void dispose ( ) { close ( ) ; cleanup ( ) ; }


return the queue connection factory to use for obtaining jms queue connections

protected connection factory get connection factory ( ) { return this connection factory ; }


apply steps applies the current step on to a volume set so that we can compute next steps until we reach the desired goals

private void apply step ( step next step , disk balancer volume set current set , disk balancer volume low volume , disk balancer volume high volume ) throws exception { long used ; if ( next step ! = null ) { used = low volume get used ( ) + next step get bytes to move ( ) ; low volume set used ( used ) ; used = high volume get used ( ) - next step get bytes to move ( ) ; high volume set used ( used ) ; } / / since the volume data changed , we need to recompute the data density current set compute volume data density ( ) ; print queue ( current set get sorted queue ( ) ) ; }


background - thread hand - off - > multiplex - > encoded cache - > disk cache - > ( webp transcode ) - > network fetch

private synchronized producer < encoded image > get background network fetch to encoded memory sequence ( ) { if ( fresco systrace is tracing ( ) ) { fresco systrace begin section ( " producer sequence factory # get background network fetch to encoded memory sequence " ) ; } if ( m background network fetch to encoded memory sequence = = null ) { if ( fresco systrace is tracing ( ) ) { fresco systrace begin section ( " producer sequence factory # get background network fetch to encoded memory sequence : init " ) ; } / / use hand - off producer to ensure that we don ' t do any unnecessary work on the ui thread m background network fetch to encoded memory sequence = m producer factory new background thread handoff producer ( get common network fetch to encoded memory sequence ( ) , m thread handoff producer queue ) ; if ( fresco systrace is tracing ( ) ) { fresco systrace end section ( ) ; } } if ( fresco systrace is tracing ( ) ) { fresco systrace end section ( ) ; } return m background network fetch to encoded memory sequence ; }


public map < string , list < integer > > get map array integer ( ) { return map array integer ; }


retrieve all the erasure coding policies supported by this file system , including enabled , disabled and removed policies , but excluding replication policy

public collection < erasure coding policy info > get all erasure coding policies ( ) throws i o exception { statistics increment read ops ( 1 ) ; storage statistics increment op counter ( op type get ec policies ) ; return arrays as list ( dfs get erasure coding policies ( ) ) ; }


a sensible default implementation of { @ link # add ( object ) } , in terms of { @ link # add ( int , object ) } if you override { @ link # add ( int , object ) } , you may wish to override { @ link # add ( object ) } to forward to this implementation

protected boolean standard add ( e element ) { add ( size ( ) , element ) ; return true ; }


verify the correctness of pending recovery process

private void verify pending recovery tasks ( int num replication blocks , int num e c blocks , int max transfers , int num replication tasks , int num e c tasks ) throws i o exception { f s namesystem fsn = mockito mock ( f s namesystem class ) ; mockito when ( fsn has write lock ( ) ) then return ( true ) ; configuration conf = new configuration ( ) ; datanode manager dm = mockito spy ( mock datanode manager ( fsn , conf ) ) ; datanode descriptor node info = mockito mock ( datanode descriptor class ) ; mockito when ( node info is registered ( ) ) then return ( true ) ; mockito when ( node info get storage infos ( ) ) then return ( new datanode storage info [ 0 ] ) ; if ( num replication blocks > 0 ) { mockito when ( node info get number of replicate blocks ( ) ) then return ( num replication blocks ) ; list < block target pair > tasks = collections n copies ( math min ( num replication tasks , num replication blocks ) , new block target pair ( null , null ) ) ; mockito when ( node info get replication command ( num replication tasks ) ) then return ( tasks ) ; } if ( num e c blocks > 0 ) { mockito when ( node info get number of blocks to be erasure coded ( ) ) then return ( num e c blocks ) ; list < block e c reconstruction info > tasks = collections n copies ( num e c tasks , null ) ; mockito when ( node info get erasure code command ( num e c tasks ) ) then return ( tasks ) ; } datanode registration dn reg = mockito mock ( datanode registration class ) ; mockito when ( dm get datanode ( dn reg ) ) then return ( node info ) ; datanode command [ ] cmds = dm handle heartbeat ( dn reg , new storage report [ 1 ] , " bp - 123 " , 0 , 0 , 10 , max transfers , 0 , null , slow peer reports empty report , slow disk reports empty report ) ; long expected num cmds = arrays stream ( new int [ ] { num replication tasks , num e c tasks } ) filter ( x - > x > 0 ) count ( ) ; assert equals ( expected num cmds , cmds length ) ; int idx = 0 ; if ( num replication tasks > 0 ) { assert true ( cmds [ idx ] instanceof block command ) ; block command cmd = ( block command ) cmds [ 0 ] ; assert equals ( num replication tasks , cmd get blocks ( ) length ) ; assert equals ( num replication tasks , cmd get targets ( ) length ) ; idx + + ; } if ( num e c tasks > 0 ) { assert true ( cmds [ idx ] instanceof block e c reconstruction command ) ; block e c reconstruction command cmd = ( block e c reconstruction command ) cmds [ idx ] ; assert equals ( num e c tasks , cmd get e c tasks ( ) size ( ) ) ; } mockito verify ( node info ) get replication command ( num replication tasks ) ; mockito verify ( node info ) get erasure code command ( num e c tasks ) ; }


ensures that { @ code expression } is { @ code true } , throwing a { @ code verify exception } with a custom message otherwise see { @ link # verify ( boolean , string , object ) } for details

public static void verify ( boolean expression , @ nullable decl string error message template , long p 1 , char p 2 ) { if ( ! expression ) { throw new verify exception ( lenient format ( error message template , p 1 , p 2 ) ) ; } }


private void read next key ( ) throws i o exception { more = in next ( ) ; if ( more ) { data input buffer next key bytes = in get key ( ) ; key in reset ( next key bytes get data ( ) , next key bytes get position ( ) , next key bytes get length ( ) ) ; next key = key deserializer deserialize ( next key ) ; has next = key ! = null & & ( comparator compare ( key , next key ) = = 0 ) ; } else { has next = false ; } }


return a string representation of this joinpoint ( usually a method call ) for use in logging

public string get joinpoint identification ( ) { return this joinpoint identification ; }


assert the existence of the given flash attributes

public result matcher attribute exists ( string names ) { return result - > { for ( string name : names ) { assert not null ( " flash attribute ' " + name + " ' does not exist " , result get flash map ( ) get ( name ) ) ; } } ; }


get authentications ( key : authentication name , value : authentication )

public map < string , authentication > get authentications ( ) { return authentications ; }


adds all of the given entries to the built map duplicate keys are not allowed , and will cause { @ link # build } to fail

public builder < k , v > put all ( iterable < ? extends entry < ? extends k , ? extends v > > entries ) { if ( entries instanceof collection ) { ensure capacity ( size + ( ( collection < ? > ) entries ) size ( ) ) ; } for ( entry < ? extends k , ? extends v > entry : entries ) { put ( entry ) ; } return this ; }


dumps dfs data structures into specified file

public void meta save ( string pathname ) throws i o exception { check open ( ) ; try ( trace scope ignored = tracer new scope ( " meta save " ) ) { namenode meta save ( pathname ) ; } }


commit a single pending commit ; exceptions are caught and converted to an outcome see { @ link commit operations # commit ( single pending commit , string , bulk operation state ) }

public maybe i o e commit ( single pending commit commit , string origin ) { return commit operations this commit ( commit , origin , operation state ) ; }


public void logout user ( handler < async result < void > > result handler ) { delegate logout user ( result handler ) ; }


public void set parser ( xml pull parser parser ) { this parser = parser ; }


register bean definitions contained in a map , using all property keys ( i e not filtering by prefix )

public int register bean definitions ( map < ? , ? > map ) throws beans exception { return register bean definitions ( map , null ) ; }


returns the transform associated with this texture view , either set explicitly by { @ link # set transform ( matrix ) } or computed according to the current scale type

public matrix get transform ( matrix transform ) { if ( transform = = null ) { transform = new matrix ( ) ; } transform set ( m transform ) ; return transform ; }


set the formatter that will be used for objects representing time values this formatter will be used for the { @ link local time } and { @ link offset time } types when specified , the { @ link # set time style time style } and { @ link # set use iso format use iso format } properties will be ignored

public void set time formatter ( date time formatter formatter ) { this formatters put ( type time , formatter ) ; }


public t use transport security ( ) { throw new unsupported operation exception ( ) ; }


sets the < code > name < code > property

public void set name ( string name ) { this name = name ; }


for this test , the body for this request much reference a schema named & # x 6 0 ; file & # x 6 0 ;

public completable future < api response < void > > test body with file schema with http info ( file schema test class body ) throws api exception { try { http request builder local var request builder = test body with file schema request builder ( body ) ; return member var http client send async ( local var request builder build ( ) , http response body handlers of string ( ) ) then compose async ( local var response - > { if ( local var response status code ( ) / 100 ! = 2 ) { return completable future failed future ( get api exception ( " test body with file schema " , local var response ) ) ; } return completable future completed future ( new api response < void > ( local var response status code ( ) , local var response headers ( ) map ( ) , null ) ) ; } ) ; } catch ( api exception e ) { return completable future failed future ( e ) ; } }


a content type returned on a response can be a media type defined outside x content type ( for instance plaintext , plaincsv etc ) this means that the response cannot be parsed default http headers also in testing there is no access to media types defined outside of x content type therefore a null has to be returned if a response content - type has a mediatype not defined in x content type

private x content type get content type ignore exceptions ( string content type ) { try { return x content type from media type ( content type ) ; } catch ( illegal argument exception e ) { return null ; } }


public void namespace boolean test ( ) { / / todo : test namespace boolean }


public void status test ( ) { / / todo : test status }


assert the response status code is { @ code http status requested range not satisfiable } ( 416 )

public result matcher is requested range not satisfiable ( ) { return matcher ( http status requested range not satisfiable ) ; }


returns the sample covariance of the values the count must be greater than one this is not guaranteed to return zero when the dataset consists of the same pair of values multiple times , due to numerical errors < h 3 > non - finite values < h 3 > if the dataset contains any non - finite values ( { @ link double # positive infinity } , { @ link double # negative infinity } , or { @ link double # na n } ) then the result is { @ link double # na n }

public final double sample covariance ( ) { check state ( count ( ) > 1 ) ; return sum of products of deltas / ( count ( ) - 1 ) ; }


check if a specific input type = " submit " parameter was sent in the request , either via a button ( directly with name ) or via an image ( name + " x " or name + " y " )

public static boolean has submit parameter ( servlet request request , string name ) { assert not null ( request , " request must not be null " ) ; if ( request get parameter ( name ) ! = null ) { return true ; } for ( string suffix : submit image suffixes ) { if ( request get parameter ( name + suffix ) ! = null ) { return true ; } } return false ; }


whether or not the rule should be negated ! foo means foo should be removed from previous matches example : \ bak excludes all backup adding ! test bak will include test bak in the project root note : it is not possible to re - include a file if a parent directory of that file is excluded

public boolean get negated ( ) { return this syntax ! = null & & this syntax size ( ) > 0 & & this syntax get ( 0 ) get token ( ) = = ignore line parser token negate ; }


protected void create service warning view state ( final flow flow ) { val state warning = create view state ( flow , cas webflow constants state id show warning view , cas webflow constants view id confirm ) ; create transition for state ( state warning , cas webflow constants transition id success , " finalize warning " ) ; val finalize warn = create action state ( flow , " finalize warning " , " service warning action " ) ; create transition for state ( finalize warn , cas webflow constants state id redirect , cas webflow constants state id redirect ) ; }


enables resetting the strictness to desired level

void set current strictness ( strictness current strictness ) { this current strictness = current strictness ; }


the in - memory store bootstraps itself from the shared cache entries that exist in hdfs

protected void service init ( configuration conf ) throws exception { this start time = system current time millis ( ) ; this initial delay min = get initial delay ( conf ) ; this check period min = get check period ( conf ) ; this staleness minutes = get staleness period ( conf ) ; bootstrap ( conf ) ; thread factory tf = new thread factory builder ( ) set name format ( " in memory s c m store " ) build ( ) ; scheduler = hadoop executors new single thread scheduled executor ( tf ) ; super service init ( conf ) ; }