finds the next key that is in the set that is less than the given key

public short get previous ( short key ) { if ( ( key < 0 ) | | ( key > = size ) ) { throw new index out of bounds exception ( ) ; } / / find the leaf node for the given key int node index = key + power 2 ; / / while we are not at the root , search upward until we find a left / / sibling that is " on " while ( node index ! = 1 ) { / / check if we are a right node int odd = node index % 2 ; / / if we are the right child see if my sibling on the left is " on " / / if so , then the previous key must be in that subtree if ( odd = = 1 ) { if ( is bit set ( node index - 1 ) ) { node index - - ; break ; } } node index = node index / 2 ; } / / if we went all the way to the root then there is no previous key , return - 1 if ( node index = = 1 ) { return ( short ) - 1 ; } / / follow the rightmost trail of " on " bits to an " on " leaf bit this bit / / represents the previous key in the set while ( node index < power 2 ) { node index * = 2 ; if ( is bit set ( node index + 1 ) ) { node index + + ; } } return ( short ) ( node index - power 2 ) ; }


private void run ( ) { int reg count = ssa meth get reg count ( ) ; for ( int reg = 0 ; reg < reg count ; reg + + ) { ssa insn definsn = ssa meth get definition for register ( reg ) ; if ( definsn ! = null & & ( definsn get result ( ) get basic type ( ) = = type bt void ) ) { worklist set ( reg ) ; } } int reg ; while ( 0 < = ( reg = worklist next set bit ( 0 ) ) ) { worklist clear ( reg ) ; / * * definitions on the worklist have a type of bt void , which * must have originated from a phi insn * / phi insn definsn = ( phi insn ) ssa meth get definition for register ( reg ) ; if ( resolve result type ( definsn ) ) { / * * if the result type has changed , re - resolve all phis * that use this * / list < ssa insn > use list = ssa meth get use list for register ( reg ) ; int sz = use list size ( ) ; for ( int i = 0 ; i < sz ; i + + ) { ssa insn use insn = use list get ( i ) ; register spec result reg = use insn get result ( ) ; if ( result reg ! = null & & use insn instanceof phi insn ) { worklist set ( result reg get reg ( ) ) ; } } } } }


returns a new builder the generated builder is equivalent to the builder created by the { @ link builder } constructor

public static < e > builder < e > builder ( ) { return new builder < e > ( ) ; }


< code > optional string msg = 1 ; < code >

public com google protobuf byte string get msg bytes ( ) { object ref = msg ; if ( ref instanceof string ) { com google protobuf byte string b = com google protobuf byte string copy from utf 8 ( ( string ) ref ) ; msg = b ; return b ; } else { return ( com google protobuf byte string ) ref ; } }


set up directories for tests each rolled file is 10 txns long a failed file is 2 txns long

public static n n storage setup edits ( list < uri > edit uris , int numrolls , boolean close on finish , abort spec abort at rolls ) throws i o exception { list < abort spec > aborts = new array list < abort spec > ( arrays as list ( abort at rolls ) ) ; n n storage storage = new n n storage ( get conf ( ) , collections < uri > empty list ( ) , edit uris ) ; storage format ( new namespace info ( ) ) ; / / verify permissions local file system fs = local file system get local ( get conf ( ) ) ; for ( uri uri : edit uris ) { string curr dir = uri get path ( ) + path separator + storage storage dir current ; file status file status = fs get file link status ( new path ( curr dir ) ) ; fs permission permission = file status get permission ( ) ; assert equals ( get conf ( ) get int ( d f s config keys dfs journal edits dir permission key , 700 ) , permission to octal ( ) ) ; } f s edit log editlog = get f s edit log ( storage ) ; / / open the edit log and add two transactions / / log generation stamp is used , simply because it doesn ' t / / require complex arguments editlog init journals for write ( ) ; editlog open for write ( name node layout version current layout version ) ; for ( int i = 2 ; i < txns per roll ; i + + ) { editlog log generation stamp ( ( long ) 0 ) ; } editlog log sync ( ) ; / / go into edit log rolling loop / / on each roll , the abort at rolls abort specs are / / checked to see if an abort is required if so the / / the specified journal is aborted it will be brought / / back into rotation automatically by roll edit log for ( int i = 0 ; i < numrolls ; i + + ) { editlog roll edit log ( name node layout version current layout version ) ; editlog log generation stamp ( ( long ) i ) ; editlog log sync ( ) ; while ( aborts size ( ) > 0 & & aborts get ( 0 ) roll = = ( i + 1 ) ) { abort spec spec = aborts remove ( 0 ) ; editlog get journals ( ) get ( spec logindex ) abort ( ) ; } for ( int j = 3 ; j < txns per roll ; j + + ) { editlog log generation stamp ( ( long ) i ) ; } editlog log sync ( ) ; } if ( close on finish ) { editlog close ( ) ; } f s image test util log storage contents ( log , storage ) ; return storage ; }


restarts the cluster with a c ls enabled or disabled

private static void restart ( boolean acls enabled ) throws exception { shutdown ( ) ; init cluster ( false , acls enabled ) ; }


public void join ( ) throws interrupted exception { sucker join ( ) ; }


configure the intercepting point on constructor

public constructor point builder on constructor ( final element matcher < ? super method description > matcher ) { return new constructor point builder ( this , matcher ) ; }


sets the interval of the date histogram using fixed units ( ` 1ms ` , ` 1s ` , ` 1 0m ` , ` 4h ` , etc ) these are not calendar aware and are simply multiples of fixed , si units this is mutually exclusive with { @ link date interval wrapper # calendar interval ( date histogram interval ) }

public void fixed interval ( date histogram interval interval ) { if ( interval = = null | | strings is null or empty ( interval to string ( ) ) ) { throw new illegal argument exception ( " [ interval ] must not be null : [ date histogram ] " ) ; } set interval type ( interval type enum fixed ) ; / / parse to make sure it is a valid fixed too time value parse time value ( interval to string ( ) , date histogram aggregation builder name + " fixed interval " ) ; this date histogram interval = interval ; }


returns the number of times { @ link cache } lookup methods have returned either a cached or uncached value this is defined as { @ code hit count + miss count } < b > note : < b > the values of the metrics are undefined in case of overflow ( though it is guaranteed not to throw an exception ) if you require specific handling , we recommend implementing your own stats collector

public long request count ( ) { return saturated add ( hit count , miss count ) ; }


returns the { @ link merge scheduler config }

public merge scheduler config get merge scheduler config ( ) { return merge scheduler config ; }


positive test to verify file delete with sticky bit on parent

public void test single file delete with sticky bit positive ( ) throws throwable { path parent dir = new path ( " / test single file delete with sticky bit positive " ) ; path test path = new path ( parent dir , " test dat " ) ; authorizer add auth rule for owner ( " / " , write , true ) ; authorizer add auth rule for owner ( parent dir to string ( ) , write , true ) ; fs update wasb authorizer ( authorizer ) ; try { fs create ( test path ) ; contract test utils assert path exists ( fs , " test path was not created " , test path ) ; / / set stickybit on parent directory fs set permission ( parent dir , new fs permission ( stickybit permission constant ) ) ; assert true ( fs delete ( test path , true ) ) ; contract test utils assert path does not exist ( fs , " test path exists after deletion ! " , test path ) ; } finally { allow recursive delete ( fs , parent dir to string ( ) ) ; fs delete ( parent dir , true ) ; } }


update query and header parameters based on authentication settings

protected void update params for auth ( string [ ] auth names , auth info auth info , list < pair > query params , multi map header params , multi map cookie params ) { for ( string auth name : auth names ) { authentication auth ; if ( auth info ! = null & & auth info authentications contains key ( auth name ) ) { auth = auth info authentications get ( auth name ) ; } else { auth = authentications get ( auth name ) ; } if ( auth = = null ) throw new runtime exception ( " authentication undefined : " + auth name ) ; auth apply to params ( query params , header params , cookie params ) ; } }


applies an aggregation that gives the current element with the maximum value at the given position by the given key an independent aggregate is kept per key if more elements have the maximum value at the given position , the operator returns the first one by default

public single output stream operator < t > max by ( string position to max by ) { return this max by ( position to max by , true ) ; }


parse the given value into a month { @ code bits cron field } , the fifth entry of a cron expression

public static bits cron field parse month ( string value ) { return bits cron field parse field ( value , type month ) ; }


returns the total size , in bytes , of this file

public long get size ( ) { return st size ; }


convert an exception to an { @ code exit exception } this process may just be a simple pass through , otherwise a new exception is created with an exit code , the text of the supplied exception , and the supplied exception as an inner cause if is already the right type , pass it through if it implements { @ link exit code provider # get exit code ( ) } , the exit code is extracted and used in the new exception otherwise , the exit code { @ link launcher exit codes # exit exception thrown } is used

protected static exit util exit exception convert to exit exception ( throwable thrown ) { exit util exit exception exit exception ; / / get the exception message string message = thrown to string ( ) ; int exit code ; if ( thrown instanceof exit code provider ) { / / the exception provides a status code - extract it exit code = ( ( exit code provider ) thrown ) get exit code ( ) ; message = thrown get message ( ) ; if ( message = = null ) { / / some exceptions do not have a message ; fall back / / to the string value message = thrown to string ( ) ; } } else { / / no exception code : use the default exit code = exit exception thrown ; } / / construct the new exception with the original message and / / an exit code exit exception = new service launch exception ( exit code , thrown , message ) ; return exit exception ; }


public static date begin of year ( @ not null final date date ) { return date utils truncate ( date , calendar year ) ; }


fake endpoint to test group parameters ( optional ) fake endpoint to test group parameters ( optional )

public void test group parameters ( integer required string group , boolean required boolean group , long required int 6 4 group , integer string group , boolean boolean group , long int 6 4 group ) throws api exception { object local var post body = null ; / / verify the required parameter ' required string group ' is set if ( required string group = = null ) { throw new api exception ( 400 , " missing the required parameter ' required string group ' when calling test group parameters " ) ; } / / verify the required parameter ' required boolean group ' is set if ( required boolean group = = null ) { throw new api exception ( 400 , " missing the required parameter ' required boolean group ' when calling test group parameters " ) ; } / / verify the required parameter ' required int 6 4 group ' is set if ( required int 6 4 group = = null ) { throw new api exception ( 400 , " missing the required parameter ' required int 6 4 group ' when calling test group parameters " ) ; } / / create path and map variables string local var path = " / fake " ; / / query params list < pair > local var query params = new array list < pair > ( ) ; list < pair > local var collection query params = new array list < pair > ( ) ; map < string , string > local var header params = new hash map < string , string > ( ) ; map < string , string > local var cookie params = new hash map < string , string > ( ) ; map < string , object > local var form params = new hash map < string , object > ( ) ; local var query params add all ( api client parameter to pair ( " required string group " , required string group ) ) ; local var query params add all ( api client parameter to pair ( " required int 6 4 group " , required int 6 4 group ) ) ; local var query params add all ( api client parameter to pair ( " string group " , string group ) ) ; local var query params add all ( api client parameter to pair ( " int 6 4 group " , int 6 4 group ) ) ; if ( required boolean group ! = null ) local var header params put ( " required boolean group " , api client parameter to string ( required boolean group ) ) ; if ( boolean group ! = null ) local var header params put ( " boolean group " , api client parameter to string ( boolean group ) ) ; final string [ ] local var accepts = { } ; final string local var accept = api client select header accept ( local var accepts ) ; final string [ ] local var content types = { } ; final string local var content type = api client select header content type ( local var content types ) ; string [ ] local var auth names = new string [ ] { } ; api client invoke a p i ( local var path , " delete " , local var query params , local var collection query params , local var post body , local var header params , local var cookie params , local var form params , local var accept , local var content type , local var auth names , null ) ; }


the field with which to construct the terms grouping

public builder set field ( string field ) { this field = field ; return this ; }


public void set top nodes ( int top nodes ) { this top nodes = top nodes ; }


creates a first admin user account this can be run by anyone , but only to create the very first user account

public void do create first account ( stapler request req , stapler response rsp ) throws i o exception , servlet exception { if ( has some user ( ) ) { rsp send error ( sc unauthorized , " first user was already created " ) ; return ; } user u = create account ( req , rsp , false , " first user jelly " ) ; if ( u ! = null ) { try to make admin ( u ) ; login and take back ( req , rsp , u ) ; } }


removes a { @ link graph binding } this means any nodes that only belonged to that binding will be removed from the graph

public synchronized void unregister ( graph binding binding ) { if ( ! m bindings remove ( binding ) ) { throw new runtime exception ( " tried to unregister non - existent binding " ) ; } unregister nodes ( binding ) ; if ( m bindings is empty ( ) ) { m timing source stop ( ) ; m sorted nodes clear ( ) ; if ( ! m node states is empty ( ) ) { throw new runtime exception ( " failed to clean up all nodes " ) ; } } m is dirty = true ; }


check if current active library equals to passed

public final boolean is library ( string library ) { return library equals ( this library ) ; }


convert the given object to string with each line indented by 4 spaces ( except the first line )

private string to indented string ( object o ) { if ( o = = null ) { return " null " ; } return o to string ( ) replace ( " \ n " , " \ n " ) ; }


applies an aggregation that sums every window of the data stream at the given position

public single output stream operator < t > sum ( int position to sum ) { return aggregate ( new sum aggregator < > ( position to sum , input get type ( ) , input get execution config ( ) ) ) ; }


return { @ code true } if the given { @ link event loop } is compatible with this instance

protected abstract boolean is compatible ( event loop loop ) ;


method used to check if the end of the input is reached

public boolean reached end ( ) throws i o exception { return ! ensure batch ( ) ; }


turn onoff the caching of the xslt templates the default value is " true " only set this to " false " in development , where caching does not seriously impact performance

public void set cache templates ( boolean cache templates ) { this cache templates = cache templates ; }


extracts the local state directories as defined by { @ link checkpointing options # local recovery task manager state root dirs }

public static string [ ] parse local state directories ( configuration configuration ) { string config value = configuration get string ( checkpointing options local recovery task manager state root dirs , " " ) ; return split paths ( config value ) ; }


sets a predicate for dynamically determining if this action should be included in an impending pop - up menu if this predicate is not set , the action ' s will be included in an impending pop - up , if it is enabled see { @ link docking action if # is add to popup ( action context ) }

public void popup when ( predicate < action context > predicate ) { popup predicate = predicate ; }


tr td ( string selector , string cdata ) ;


returns the mapping files containing file dependency information among the translated obj c source files when flag - - j 2objc dead code removal is specified , they are used to strip unused object files inside j 2 obj c static libraries before the linking action at binary level

public nested set < artifact > get dependency mapping files ( ) { return dependency mapping files ; }


restore the request attributes after an include

private void restore attributes after include ( http servlet request request , map < ? , ? > attributes snapshot ) { / / need to copy into separate collection here , to avoid side effects / / on the enumeration when removing attributes set < string > attrs to check = new hash set < > ( ) ; enumeration < ? > attr names = request get attribute names ( ) ; while ( attr names has more elements ( ) ) { string attr name = ( string ) attr names next element ( ) ; if ( this cleanup after include | | attr name starts with ( default strategies prefix ) ) { attrs to check add ( attr name ) ; } } / / add attributes that may have been removed attrs to check add all ( ( set < string > ) attributes snapshot key set ( ) ) ; / / iterate over the attributes to check , restoring the original value / / or removing the attribute , respectively , if appropriate for ( string attr name : attrs to check ) { object attr value = attributes snapshot get ( attr name ) ; if ( attr value = = null ) { request remove attribute ( attr name ) ; } else if ( attr value ! = request get attribute ( attr name ) ) { request set attribute ( attr name , attr value ) ; } } }


invoked when the given model should be loaded

public static void start new session ( string model model ) { log probs = new model log probabilities ( ascii char count ) ; load string models ( model ) ; }


get the fid hasher object suitable for producing fid hash quad objects for functions coming from a particular program

public fid hasher get hasher ( program program ) { list < instruction skipper > list = skippers get ( program get language ( ) get processor ( ) ) ; if ( list = = null ) { list = collections empty list ( ) ; } fid hasher fid hasher = new message digest fid hasher ( generator , short hash code unit length , digest factory , list ) ; return fid hasher ; }


returns true if null is a legal value for this dependency

public boolean is nullable ( ) { return nullable ; }


test access when file does not exist and permissions match

public void test access file does not exist ( ) throws throwable { expected ex expect ( file not found exception class ) ; configuration conf = fs get conf ( ) ; fs set conf ( conf ) ; final path test path = new path ( " / test access file does not exist " ) ; authorizer init ( conf ) ; authorizer add auth rule for owner ( test path to string ( ) , read , true ) ; authorizer add auth rule for owner ( test path to string ( ) , write , true ) ; fs update wasb authorizer ( authorizer ) ; assert path does not exist ( fs , " test path exists " , test path ) ; fs access ( test path , fs action all ) ; }


test ( de ) serialization on all previous released versions

public void test serialization b w c ( ) throws i o exception { for ( version version : version utils all released versions ( ) ) { nested query builder test query = create test query builder ( ) ; assert serialization ( test query , version ) ; } }


changes the permission status on the given key

public void change permission status ( string key , permission status new permission ) throws azure exception { try { check container ( container access type read then write ) ; cloud blob wrapper blob = get blob reference ( key ) ; blob download attributes ( get instrumented context ( ) ) ; store permission status ( blob , new permission ) ; blob upload metadata ( get instrumented context ( ) ) ; } catch ( exception e ) { throw new azure exception ( e ) ; } }


fetch the wrapped client use this to make calls that don ' t set { @ link action request # set parent task ( task id ) }

public client unwrap ( ) { return in ( ) ; }


public static vector plus ( vector vec 1 , vector vec 2 ) { return vec 1 plus ( vec 2 ) ; }


test to ensure nameservice specific keys in the configuration are copied to generic keys when the namenode starts

public void test conf modification federation only ( ) { final hdfs configuration conf = new hdfs configuration ( ) ; string ns id = " ns 1 " ; conf set ( dfs nameservices , ns id ) ; conf set ( dfs nameservice id , ns id ) ; / / set the nameservice specific keys with nameservice id in the config key for ( string key : name node namenode specific keys ) { / / note : value is same as the key conf set ( d f s util add key suffixes ( key , ns id ) , key ) ; } / / initialize generic keys from specific keys name node initialize generic keys ( conf , ns id , null ) ; / / retrieve the keys without nameservice id and ensure generic keys are set / / to the correct value for ( string key : name node namenode specific keys ) { assert equals ( key , conf get ( key ) ) ; } }


generate a new create snapshot request from this policy the name of the snapshot is generated at this time based on any date math expressions in the " name " field

public create snapshot request to request ( ) { create snapshot request req = new create snapshot request ( repository , generate snapshot name ( this name ) ) ; map < string , object > merged configuration = configuration = = null ? new hash map < > ( ) : new hash map < > ( configuration ) ; @ suppress warnings ( " unchecked " ) map < string , object > metadata = ( map < string , object > ) merged configuration get ( " metadata " ) ; map < string , object > metadata with added policy name = add policy name to metadata ( metadata ) ; merged configuration put ( " metadata " , metadata with added policy name ) ; req source ( merged configuration ) ; req wait for completion ( true ) ; return req ; }


public void set ( string string ) { try { byte buffer bb = encode ( string , true ) ; bytes = bb array ( ) ; length = bb limit ( ) ; text length = string length ( ) ; } catch ( character coding exception e ) { throw new runtime exception ( " should not have happened " , e ) ; } }


sets the boolean operator of the query parser used to parse the query string in default mode ( { @ link operator # or } ) terms without any modifiers are considered optional : for example < code > capital of hungary < code > is equal to < code > capital or of or hungary < code > in { @ link operator # and } mode terms are considered to be in conjunction : the above mentioned query is parsed as < code > capital and of and hungary < code >

public query string query builder default operator ( operator default operator ) { this default operator = default operator = = null ? default operator : default operator ; return this ; }


requests the disposal of this view - it should be called again

public void shoul exit ( ) { should exit = true ; }


gets the exception handling decode format for the indicated code

public static dwarf e h data decode format value of ( int code ) { for ( dwarf e h data decode format mod : dwarf e h data decode format values ( ) ) { if ( mod code = = code ) { return mod ; } } return null ; }


public static void main ( string [ ] args ) { customer registry customer registry = customer registry get instance ( ) ; var john = new customer ( " 1 " , " john " ) ; customer registry add customer ( john ) ; var julia = new customer ( " 2 " , " julia " ) ; customer registry add customer ( julia ) ; logger info ( " john { } " , customer registry get customer ( " 1 " ) ) ; logger info ( " julia { } " , customer registry get customer ( " 2 " ) ) ; }


get the ultimate target object of the supplied { @ code candidate } object , unwrapping not only a top - level proxy but also any number of nested proxies if the supplied { @ code candidate } is a spring { @ linkplain aop utils # is aop proxy proxy } , the ultimate target of all nested proxies will be returned ; otherwise , the { @ code candidate } will be returned as is

public static < t > t get ultimate target object ( object candidate ) { assert not null ( candidate , " candidate must not be null " ) ; try { if ( aop utils is aop proxy ( candidate ) & & candidate instanceof advised ) { object target = ( ( advised ) candidate ) get target source ( ) get target ( ) ; if ( target ! = null ) { return ( t ) get ultimate target object ( target ) ; } } } catch ( throwable ex ) { throw new illegal state exception ( " failed to unwrap proxied object " , ex ) ; } return ( t ) candidate ; }


returns the { @ link method } instance for { @ link # test put all null key unsupported ( ) } so that tests can suppress it with { @ code feature specific test suite builder suppressing ( ) } until < a href = " http : bugs sun combugdatabaseview bug do ? bug id = 5045147 " > sun bug 5045147 is fixed

public static method get put all null key unsupported method ( ) { return helpers get method ( map put all tester class , " test put all null key unsupported " ) ; }


public static void print ( logger log , s 3 a test utils metric diff metrics ) { for ( s 3 a test utils metric diff metric : metrics ) { log info ( metric to string ( ) ) ; } }


creates a tumbling window tumbling windows are fixed - size , consecutive , non - overlapping windows of a specified fixed length for example , a tumbling window of 5 minutes size groups elements in 5 minutes intervals

public static tumble with size over ( string size ) { return over ( expression parser parse expression ( size ) ) ; }


sets a variable as high as possible ( highest parent )

protected void set variable ( string variable name , object value , execution entity source execution , boolean fetch all variables ) { if ( fetch all variables = = true ) { / / if it ' s in the cache , it ' s more recent if ( used variables cache contains key ( variable name ) ) { update variable instance ( used variables cache get ( variable name ) , value , source execution ) ; } / / if the variable exists on this scope , replace it if ( has variable local ( variable name ) ) { set variable local ( variable name , value , source execution , true ) ; return ; } / / otherwise , go up the hierarchy ( we ' re trying to put it as high as possible ) variable scope impl parent variable scope = get parent variable scope ( ) ; if ( parent variable scope ! = null ) { if ( source execution = = null ) { parent variable scope set variable ( variable name , value ) ; } else { parent variable scope set variable ( variable name , value , source execution , true ) ; } return ; } / / we ' re as high as possible and the variable doesn ' t exist yet , so / / we ' re creating it if ( source execution ! = null ) { create variable local ( variable name , value , source execution ) ; } else { create variable local ( variable name , value ) ; } } else { / / check local cache first if ( used variables cache contains key ( variable name ) ) { update variable instance ( used variables cache get ( variable name ) , value , source execution ) ; } else if ( variable instances ! = null & & variable instances contains key ( variable name ) ) { update variable instance ( variable instances get ( variable name ) , value , source execution ) ; } else { / / not in local cache , check if defined on this scope / / create it if it doesn ' t exist yet variable instance entity variable = get specific variable ( variable name ) ; if ( variable ! = null ) { update variable instance ( variable , value , source execution ) ; used variables cache put ( variable name , variable ) ; } else { variable scope impl parent = get parent variable scope ( ) ; if ( parent ! = null ) { if ( source execution = = null ) { parent set variable ( variable name , value , fetch all variables ) ; } else { parent set variable ( variable name , value , source execution , fetch all variables ) ; } return ; } variable = create variable instance ( variable name , value , source execution ) ; used variables cache put ( variable name , variable ) ; } } } }


assumes that { @ link # update requirements from metadata ( ) } has been called recently

private map < string , bundle requirement > get computed reqs ( ) { map < string , bundle requirement > deduped reqs = new hash map < > ( ) ; source file to requirements values ( ) stream ( ) flat map ( list : : stream ) for each ( r - > deduped reqs put if absent ( r to string ( ) , r ) ) ; return deduped reqs ; }


associates { @ code key } with { @ code value } in the built map duplicate keys are not allowed , and will cause { @ link # build } to fail

public < t extends b > builder < b > put ( type token < t > key , t value ) { map builder put ( key reject type variables ( ) , value ) ; return this ; }


public void shutdown now ( ) { if ( dispatch executor ! = null ) { dispatch executor shutdown now ( ) ; } }


gets the agent node of the give name , hooked under this jenkins

public @ check for null node get node ( string name ) { return nodes get node ( name ) ; }


discard upstream media chunks from { @ code chunk index } and corresponding samples from sample queues

private base media chunk discard upstream media chunks from index ( int chunk index ) { base media chunk first removed chunk = media chunks get ( chunk index ) ; util remove range ( media chunks , / * from index = * / chunk index , / * to index = * / media chunks size ( ) ) ; next notify primary format media chunk index = max ( next notify primary format media chunk index , media chunks size ( ) ) ; primary sample queue discard upstream samples ( first removed chunk get first sample index ( 0 ) ) ; for ( int i = 0 ; i < embedded sample queues length ; i + + ) { embedded sample queues [ i ] discard upstream samples ( first removed chunk get first sample index ( i + 1 ) ) ; } return first removed chunk ; }


sets the number of entries actually in the zip file if the value is larger than 0xffff , the file is set to zip 6 4 mode

private void set num entries ( long num entries ) { this num entries = num entries ; if ( num entries > 0xffff ) { set zip 6 4 ( true ) ; } }


public void set conf ( configuration conf ) { this conf = conf ; if ( this next interceptor ! = null ) { this next interceptor set conf ( conf ) ; } }


disposes this worker and terminates its thread

public void dispose ( ) { concurrent q set monitor ( null , false ) ; concurrent q cancel all tasks ( true ) ; is disposed = true ; }


public static void main ( string [ ] args ) { system out println ( ( byte ) 5 < ( byte ) 250 ) ; system out println ( unsigned less than ( ( byte ) 5 , ( byte ) 250 ) ) ; system out println ( 0x 5 < 0x 8 7 6 5 4 3 2 1 ) ; system out println ( unsigned less than ( 0x 5 , 0x 8 7 6 5 4 3 2 1 ) ) ; }


this method is only called by tests and by event - deserialization , like checkpoint barriers because such events are not used for bounded intermediate results , this method currently executes only in tests

public byte buffer get nio buffer readable ( ) { try { final byte buffer buffer = byte buffer allocate direct ( buffer size ( ) ) ; buffer reader writer util read byte buffer fully ( file channel , buffer , position ( ) ) ; buffer flip ( ) ; return buffer ; } catch ( i o exception e ) { / / this is not very pretty , but given that this code runs only in tests / / the exception wrapping here is simpler than updating the method signature / / to declare i o exceptions , as would be necessary for a proper " lazy buffer " throw new flink runtime exception ( e get message ( ) , e ) ; } }


convert the given object to string with each line indented by 4 spaces ( except the first line )

private string to indented string ( object o ) { if ( o = = null ) { return " null " ; } return o to string ( ) replace ( " \ n " , " \ n " ) ; }


this testcase tests whether an illegal argument exception will be thrown when a negative value is retrieved by d f s util # get invalidate work pct per iteration

public void test get invalidate work pct per iteration negative value ( ) { configuration conf = new configuration ( ) ; float blocks invalidate work pct = d f s util get invalidate work pct per iteration ( conf ) ; assert true ( blocks invalidate work pct > 0 ) ; conf set ( d f s config keys dfs namenode invalidate work pct per iteration , " - 0 5f " ) ; exception expect ( illegal argument exception class ) ; blocks invalidate work pct = d f s util get invalidate work pct per iteration ( conf ) ; }


updates the tree props map with outputs from all { @ link on create tree prop } methods

protected tree props get tree props for children ( section context c , @ nullable tree props previous tree props ) { return previous tree props ; }


configure the maximum allowable frame payload length setting this value to your application ' s requirement may reduce denial of service attacks using long data frames corresponds to the argument with the same name in the constructor of { @ link io netty handler codec http websocketx web socket server handshaker factory web socket server handshaker factory } in netty by default set to 65536 ( 64k )

public void set max frame payload length ( int max frame payload length ) { this max frame payload length = max frame payload length ; }


register the specified bean as dependent on the autowired beans

private void register dependent beans ( @ nullable string bean name , set < string > autowired bean names ) { if ( bean name ! = null ) { for ( string autowired bean name : autowired bean names ) { if ( this bean factory ! = null & & this bean factory contains bean ( autowired bean name ) ) { this bean factory register dependent bean ( autowired bean name , bean name ) ; } if ( logger is trace enabled ( ) ) { logger trace ( " autowiring by type from bean name ' " + bean name + " ' to bean named ' " + autowired bean name + " ' " ) ; } } } }


public vector 3 scl ( float vx , float vy , float vz ) { return this set ( this x * vx , this y * vy , this z * vz ) ; }


list of all products in an entity representation

public list < product > get products ( ) { return products ; }


public cancellable get auto follow pattern async ( get auto follow pattern request request , request options options , action listener < get auto follow pattern response > listener ) { return rest high level client perform request async and parse entity ( request , ccr request converters : : get auto follow pattern , options , get auto follow pattern response : : from x content , listener , collections empty set ( ) ) ; }


get the request handle to expose to { @ link # render merged output model } , i e to the view the default implementation wraps the original request for exposure of spring beans as request attributes ( if demanded )

protected http servlet request get request to expose ( http servlet request original request ) { if ( this expose context beans as attributes | | this exposed context bean names ! = null ) { web application context wac = get web application context ( ) ; assert state ( wac ! = null , " no web application context " ) ; return new context exposing http servlet request ( original request , wac , this exposed context bean names ) ; } return original request ; }


get the the number of bytes written to an output stream this is for testing

public static long get bytes written ( f s data output stream output stream ) { swift native output stream snos = get swift native output stream ( output stream ) ; return snos get bytes written ( ) ; }


delete storeorder { order id } : delete purchase order by id for valid response try integer i ds with value & lt ; 1000 anything above 1000 or nonintegers will generate api errors

default response entity < void > delete order ( string order id ) { return new response entity < > ( http status not implemented ) ; }


sets the { @ code input spec } and returns a reference to this builder so that the methods can be chained together

public builder with input spec ( string input spec ) { if ( input spec ! = null ) { this input spec = input spec ; } return this ; }


where the entry was defined < code > optional aapt pb source source = 1 ; < code >

public builder clear source ( ) { copy on write ( ) ; instance clear source ( ) ; return this ; }


returns the checksum with the given name

checksum algorithm get checksum for ( string checksum name ) { for ( checksum algorithm res : checksum list ) { if ( res get name ( ) equals ( checksum name ) ) { return res ; } } return null ; }


return the access key and secret for s3 api use or indicated in the user info of the name uri param

public static s 3x login helper login get a w s access keys ( uri name , configuration conf ) throws i o exception { s 3x login helper reject secrets in u r is ( name ) ; configuration c = provider utils exclude incompatible credential providers ( conf , s 3 a file system class ) ; string bucket = name ! = null ? name get host ( ) : " " ; / / get the secrets from the configuration / / get the access key string access key = lookup password ( bucket , c , access key ) ; / / and the secret string secret key = lookup password ( bucket , c , secret key ) ; return new s 3x login helper login ( access key , secret key ) ; }


make sure the property names are canonical ( not camel case ) otherwise app won ' t start spring boot { @ link org springframework boot context properties migrator properties migration listener } will prevent startup if property names aren ' t valid it may be that some replacement properties need array syntax but none should contain [ 0 ]

public void verify meta data ( ) throws i o exception { val resource = cas configuration properties class get class loader ( ) get resource ( " meta - inf / additional - spring - configuration - metadata json " ) ; assert not null ( resource ) ; val additional metadata json file = resource loader get resource ( resource to string ( ) ) ; val additional props = get properties ( additional metadata json file ) ; for ( val prop : additional props ) { try { configuration property name of ( prop get name ( ) ) ; } catch ( final invalid configuration property name exception e ) { fail ( e : : get message ) ; } val deprecation = prop get deprecation ( ) ; if ( deprecation ! = null & & string utils is not blank ( deprecation get replacement ( ) ) ) { configuration property name of ( deprecation get replacement ( ) ) ; if ( deprecation get replacement ( ) ends with ( " [ 0 ] " ) ) { / * array references may work , but not at the end * / fail ( " deprecation replacement should not end in [ 0 ] " ) ; } } } }


returns a list of parameters for invoking an overload of check state , check argument or check not null

private static immutable list < immutable list < class < ? > > > all signatures ( class < ? > predicate type ) { immutable set builder < immutable list < class < ? > > > all overloads = immutable set builder ( ) ; / / the first two are for the overloads that don ' t take formatting args , e g / / check argument ( boolean ) and check argument ( boolean , object ) all overloads add ( immutable list < class < ? > > of ( predicate type ) ) ; all overloads add ( immutable list < class < ? > > of ( predicate type , object class ) ) ; list < list < class < ? > > > types lists = new array list < > ( ) ; for ( int i = 0 ; i < 2 ; i + + ) { types lists add ( possible param types ) ; for ( list < class < ? > > curr : lists cartesian product ( types lists ) ) { all overloads add ( immutable list < class < ? > > builder ( ) add ( predicate type ) add ( string class ) / / the format string add all ( curr ) build ( ) ) ; } } return all overloads build ( ) as list ( ) ; }


developers might use standalone mode ( which is the default for one server ) this test checks ssl works in standalone mode of zk server note that in this test the zk server has only secure client port

public void test secure standalone server ( ) throws exception { integer secure client port = port assignment unique ( ) ; main thread mt = new main thread ( main thread unset myid , " " , secure client port , false ) ; mt start ( ) ; zoo keeper zk = client base create z k client ( " 127 0 0 1 : " + secure client port , timeout ) ; zk create ( " / test " , " " get bytes ( ) , zoo defs ids open acl unsafe , create mode persistent ) ; zk delete ( " / test " , - 1 ) ; zk close ( ) ; mt shutdown ( ) ; }


sets whether to force use the default drm license server uri even if the media specifies its own drm license server uri if { @ link # set uri } is passed a non - null { @ code uri } , the drm force default license flag is used to create a { @ link playback properties } object otherwise it will be ignored

public builder set drm force default license uri ( boolean force default license uri ) { this drm force default license uri = force default license uri ; return this ; }


frees the specified objects from the { @ link # get ( class ) pool } null objects within the array are silently ignored

static public void free all ( array objects , boolean same pool ) { if ( objects = = null ) throw new illegal argument exception ( " objects cannot be null " ) ; pool pool = null ; for ( int i = 0 , n = objects size ; i < n ; i + + ) { object object = objects get ( i ) ; if ( object = = null ) continue ; if ( pool = = null ) { pool = type pools get ( object get class ( ) ) ; if ( pool = = null ) continue ; / / ignore freeing an object that was never retained } pool free ( object ) ; if ( ! same pool ) pool = null ; } }


construct an answer from a two parameter answer interface

public static < t , a , b > answer < t > to answer ( final answer 2 < t , a , b > answer ) { return new answer < t > ( ) { @ suppress warnings ( " unchecked " ) public t answer ( invocation on mock invocation ) throws throwable { return answer answer ( ( a ) invocation get argument ( 0 ) , ( b ) invocation get argument ( 1 ) ) ; } } ; }


message displayed in the top page can be null includes html

public string get description ( ) { return description ; }


called when the playback speed is changed

void on playback speed changed ( float playback speed ) ;


stop the heartbeat of a datanode in the mini d f s cluster

private data node stop data node heartbeat ( mini d f s cluster cluster , string host name ) { for ( data node dn : cluster get data nodes ( ) ) { if ( dn get datanode id ( ) get host name ( ) equals ( host name ) ) { data node test utils set heartbeats disabled for tests ( dn , true ) ; return dn ; } } return null ; }


sets the playback controls timeout the playback controls are automatically hidden after this duration of time has elapsed without user input and with playback or buffering in progress

public void set controller show timeout ms ( int controller show timeout ms ) { assertions check state not null ( controller ) ; this controller show timeout ms = controller show timeout ms ; if ( controller is fully visible ( ) ) { / / update the controller ' s timeout if necessary show controller ( ) ; } }


the " base 6 4 " base encoding specified by < a href = " http : tools ietf orghtmlrfc 4 6 4 8 # section - 4 " > rfc 4648 section 4 , base 64 encoding ( this is the same as the base 64 encoding from < a href = " http : tools ietf orghtmlrfc 3 5 4 8 # section - 3 " > rfc 3548 ) the character { @ code ' = ' } is used for padding , but can be { @ linkplain # omit padding ( ) omitted } or { @ linkplain # with pad char ( char ) replaced } no line feeds are added by default , as per < a href = " http : tools ietf orghtmlrfc 4 6 4 8 # section - 3 1 " > rfc 4648 section 3 1 , line feeds in encoded data line feeds may be added using { @ link # with separator ( string , int ) }

public static base encoding base 6 4 ( ) { return base64 ; }


creates a { @ link top docs collector context } from the provided < code > search context < code >

static top docs collector context create top docs collector context ( search context search context , boolean has filter collector ) throws i o exception { final index reader reader = search context searcher ( ) get index reader ( ) ; final query query = search context query ( ) ; / / top collectors don ' t like a size of 0 final int total num docs = math max ( 1 , reader num docs ( ) ) ; if ( search context size ( ) = = 0 ) { / / no matter what the value of from is return new empty top docs collector context ( reader , query , search context sort ( ) , search context track total hits up to ( ) , has filter collector ) ; } else if ( search context scroll context ( ) ! = null ) { / / we can disable the tracking of total hits after the initial scroll query / / since the total hits is preserved in the scroll context int track total hits up to = search context scroll context ( ) total hits ! = null ? search context track total hits disabled : search context track total hits accurate ; / / no matter what the value of from is int num docs = math min ( search context size ( ) , total num docs ) ; return new scrolling top docs collector context ( reader , query , search context scroll context ( ) , search context sort ( ) , num docs , search context track scores ( ) , search context number of shards ( ) , track total hits up to , has filter collector ) ; } else if ( search context collapse ( ) ! = null ) { boolean track scores = search context sort ( ) = = null ? true : search context track scores ( ) ; int num docs = math min ( search context from ( ) + search context size ( ) , total num docs ) ; return new collapsing top docs collector context ( search context collapse ( ) , search context sort ( ) , num docs , track scores ) ; } else { int num docs = math min ( search context from ( ) + search context size ( ) , total num docs ) ; final boolean rescore = search context rescore ( ) is empty ( ) = = false ; if ( rescore ) { assert search context sort ( ) = = null ; for ( rescore context rescore context : search context rescore ( ) ) { num docs = math max ( num docs , rescore context get window size ( ) ) ; } } return new simple top docs collector context ( reader , query , search context sort ( ) , search context search after ( ) , num docs , search context track scores ( ) , search context track total hits up to ( ) , has filter collector ) { @ override boolean should rescore ( ) { return rescore ; } } ; } }


public static void head ( string path , string accept type , template view route route , template engine engine ) { get instance ( ) head ( path , accept type , route , engine ) ; }


public builder add providers ( transitive info provider providers ) { return add providers ( arrays as list ( providers ) ) ; }


returns true if the attribute doc is of a common attribute type

public boolean is common type ( ) { return common type ! = null ; }


if the mouse is over a picked vertex , drag all picked vertices with the mouse if the mouse is not over a vertex , draw the rectangle to select multiple vertices

public void mouse dragged ( mouse event e ) { if ( locked = = false ) { visualization viewer < v , e > vv = ( visualization viewer < v , e > ) e get source ( ) ; if ( vertex ! = null ) { point p = e get point ( ) ; point 2 d graph point = vv get render context ( ) get multi layer transformer ( ) inverse transform ( p ) ; point 2 d graph down = vv get render context ( ) get multi layer transformer ( ) inverse transform ( down ) ; layout < v , e > layout = vv get graph layout ( ) ; double dx = graph point get x ( ) - graph down get x ( ) ; double dy = graph point get y ( ) - graph down get y ( ) ; picked state < v > ps = vv get picked vertex state ( ) ; for ( v v : ps get picked ( ) ) { point 2 d vp = layout apply ( v ) ; vp set location ( vp get x ( ) + dx , vp get y ( ) + dy ) ; layout set location ( v , vp ) ; } down = p ; } else { point 2 d out = e get point ( ) ; if ( e get modifiers ex ( ) = = this add to selection modifiers | | e get modifiers ex ( ) = = modifiers ) { rect set frame from diagonal ( down , out ) ; } } if ( vertex ! = null ) { e consume ( ) ; } vv repaint ( ) ; } }


parse the { @ code mime types } file found in the resources format is : < code > # comments begin with a ' # ' < br > # the format is & lt ; mime type > & lt ; space separated file extensions > < br > # for example : < br > textplain txt text < br > # this would map file txt and file text to < br > # the mime type " textplain " < br > < code >

private static multi value map < string , media type > parse mime types ( ) { input stream is = media type factory class get resource as stream ( mime types file name ) ; try ( buffered reader reader = new buffered reader ( new input stream reader ( is , standard charsets us ascii ) ) ) { multi value map < string , media type > result = new linked multi value map < > ( ) ; string line ; while ( ( line = reader read line ( ) ) ! = null ) { if ( line is empty ( ) | | line char at ( 0 ) = = ' # ' ) { continue ; } string [ ] tokens = string utils tokenize to string array ( line , " \ t \ n \ r \ f " ) ; media type media type = media type parse media type ( tokens [ 0 ] ) ; for ( int i = 1 ; i < tokens length ; i + + ) { string file extension = tokens [ i ] to lower case ( locale english ) ; result add ( file extension , media type ) ; } } return result ; } catch ( i o exception ex ) { throw new illegal state exception ( " could not load ' " + mime types file name + " ' " , ex ) ; } }


one or more endpoints associated with the service < code > repeated istio networking v 1alpha 3 service entry endpoint endpoints = 6 ; < code >

public com alibaba nacos istio model naming service entry endpoint builder get endpoints builder ( int index ) { return get endpoints field builder ( ) get builder ( index ) ; }


reads a potentially huffman encoded byte string

byte string read byte string ( ) throws i o exception { int first byte = read byte ( ) ; boolean huffman decode = ( first byte & 0x 8 0 ) = = 0x 8 0 ; / / 1nnnnnnn int length = read int ( first byte , prefix 7 bits ) ; if ( huffman decode ) { return byte string of ( io grpc okhttp internal framed huffman get ( ) decode ( source read byte array ( length ) ) ) ; } else { return source read byte string ( length ) ; } }


private void close view ( string url path ) { if ( url path equals ( close all open views ) ) { close all views ( ) ; return ; } / / close the named view url url = ghidra u r l to u r l ( url path ) ; close view ( url ) ; }


public okhttp 3 call delete order call ( string order id , final api callback callback ) throws api exception { object local var post body = null ; / / create path and map variables string local var path = " / store / order / { order id } " replace all ( " \ \ { " + " order id " + " \ \ } " , local var api client escape string ( order id to string ( ) ) ) ; list < pair > local var query params = new array list < pair > ( ) ; list < pair > local var collection query params = new array list < pair > ( ) ; map < string , string > local var header params = new hash map < string , string > ( ) ; map < string , string > local var cookie params = new hash map < string , string > ( ) ; map < string , object > local var form params = new hash map < string , object > ( ) ; final string [ ] local var accepts = { } ; final string local var accept = local var api client select header accept ( local var accepts ) ; if ( local var accept ! = null ) { local var header params put ( " accept " , local var accept ) ; } final string [ ] local var content types = { } ; final string local var content type = local var api client select header content type ( local var content types ) ; local var header params put ( " content - type " , local var content type ) ; string [ ] local var auth names = new string [ ] { } ; return local var api client build call ( local var path , " delete " , local var query params , local var collection query params , local var post body , local var header params , local var cookie params , local var form params , local var auth names , callback ) ; }


returns the index of the last matching bmp character in a character sequence , or { @ code - 1 } if no matching character is present the default implementation iterates over the sequence in reverse order calling { @ link # matches } for each character

public int last index in ( char sequence sequence ) { for ( int i = sequence length ( ) - 1 ; i > = 0 ; i - - ) { if ( matches ( sequence char at ( i ) ) ) { return i ; } } return - 1 ; }


decrypt the encrypted text with aes algorithm

public static string aes decrypt ( string encrypted text ) { if ( text utils is empty ( encrypted text ) ) { return encrypted text ; } try { return a e s crypt decrypt ( aes key , encrypted text ) ; } catch ( exception e ) { e print stack trace ( ) ; } return null ; }


post fake : fake endpoint for testing various parameters 가짜 엔드 포인트 fake endpoint for testing various parameters 가짜 엔드 포인트

default response entity < void > test endpoint parameters ( big decimal number , double double , string pattern without delimiter , byte [ ] byte , integer integer , integer int 3 2 , long int 6 4 , float float , string string , multipart file binary , local date date , offset date time date time , string password , string param callback ) { return new response entity < > ( http status not implemented ) ; }


judge if the field is char or character type

private boolean is char type ( field field ) { string type = field get type ( ) get name ( ) ; return type equals ( " char " ) | | type ends with ( " character " ) ; }


gets the base address of the type table the base address is the last byte ( maximum address ) of the type table the type table is ordered in reverse

public address get t type base address ( ) { return ttype addr ; }


previous valuable entity or attribute manipulation keyword all functions , aggregate operators and other keywords are ignored

public string get prev key word ( ) { return prev key word ; }


determine if a string is { @ code null } or { @ link string # is empty ( ) } returns { @ code true }

private static boolean is null or empty ( string s ) { return s = = null | | s is empty ( ) ; }


public boolean is left reference ( ) { return is l ref ; }


public map < string , big integer > get value map ( ) { return values ; }


public void pet id test ( ) { / / todo : test pet id }


takes url as an method argument and return new instance of cache store implemented by lfu cache

protected cache create cache ( url url ) { return new lfu cache ( url ) ; }


a test where the blob cache must use the blob server and the connection fails too often which eventually fails the get request

private static void test blob fetch with too many failures ( final configuration config , final blob store blob store , @ nullable final job i d job id , blob key blob type blob type ) throws i o exception { final byte [ ] data = new byte [ ] { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 } ; try ( blob server server = new testing failing blob server ( config , blob store , 0 , 10 ) ; blob cache service cache = new blob cache service ( config , new void blob store ( ) , new inet socket address ( " localhost " , server get port ( ) ) ) ) { server start ( ) ; / / upload some blob final blob key key = put ( server , job id , data , blob type ) ; / / trigger a download - it should fail eventually try { verify contents ( cache , job id , key , data ) ; fail ( " this should fail " ) ; } catch ( i o exception e ) { / / as we expected } } }


creates a new test { @ link keyed state handle } for the given key - group

public static keyed state handle create new keyed state handle ( key group range key group range ) { return new dummy keyed state handle ( key group range ) ; }


sets the selection to only the selected index

public void set selected index ( int index ) { if ( index < - 1 | | index > = items size ) throw new illegal argument exception ( " index must be > = - 1 and < " + items size + " : " + index ) ; if ( index = = - 1 ) { selection clear ( ) ; } else { selection set ( items get ( index ) ) ; } }


public abstract json writer value ( @ nullable boolean value ) throws i o exception ;


creates a simple animation backend that cycles through a list of colors

public static animation backend create sample color animation backend ( resources resources ) { / / get the animation duration in ms for each color frame int frame duration ms = resources get integer ( android r integer config medium anim time ) ; / / create and return the backend return new example color backend ( sample data colors , frame duration ms ) ; }


like { @ code inputs to string ( ) } , but with the nonsense { @ code to string } representations replaced with the name of each future from { @ link # all futures }

string smart to string ( immutable set < listenable future < string > > inputs ) { iterable < string > input names = iterables transform ( inputs , name getter ) ; return joiner on ( " , " ) join ( input names ) ; }


returns whether the callback was applied

public < t > boolean apply value callback ( t property , @ nullable lottie value callback < t > callback ) { if ( property = = transform anchor point ) { if ( anchor point = = null ) { anchor point = new value callback keyframe animation ( callback , new point f ( ) ) ; } else { anchor point set value callback ( ( lottie value callback < point f > ) callback ) ; } } else if ( property = = transform position ) { if ( position = = null ) { position = new value callback keyframe animation ( callback , new point f ( ) ) ; } else { position set value callback ( ( lottie value callback < point f > ) callback ) ; } } else if ( property = = transform position x & & position instanceof split dimension path keyframe animation ) { ( ( split dimension path keyframe animation ) position ) set x value callback ( ( lottie value callback < float > ) callback ) ; } else if ( property = = transform position y & & position instanceof split dimension path keyframe animation ) { ( ( split dimension path keyframe animation ) position ) set y value callback ( ( lottie value callback < float > ) callback ) ; } else if ( property = = transform scale ) { if ( scale = = null ) { scale = new value callback keyframe animation ( callback , new scale x y ( ) ) ; } else { scale set value callback ( ( lottie value callback < scale x y > ) callback ) ; } } else if ( property = = transform rotation ) { if ( rotation = = null ) { rotation = new value callback keyframe animation ( callback , 0f ) ; } else { rotation set value callback ( ( lottie value callback < float > ) callback ) ; } } else if ( property = = transform opacity ) { if ( opacity = = null ) { opacity = new value callback keyframe animation ( callback , 100 ) ; } else { opacity set value callback ( ( lottie value callback < integer > ) callback ) ; } } else if ( property = = transform start opacity & & start opacity ! = null ) { if ( start opacity = = null ) { start opacity = new value callback keyframe animation ( callback , 100 ) ; } else { start opacity set value callback ( ( lottie value callback < float > ) callback ) ; } } else if ( property = = transform end opacity & & end opacity ! = null ) { if ( end opacity = = null ) { end opacity = new value callback keyframe animation ( callback , 100 ) ; } else { end opacity set value callback ( ( lottie value callback < float > ) callback ) ; } } else if ( property = = transform skew & & skew ! = null ) { if ( skew = = null ) { skew = new float keyframe animation ( collections singleton list ( new keyframe < float > ( 0f ) ) ) ; } skew set value callback ( ( lottie value callback < float > ) callback ) ; } else if ( property = = transform skew angle & & skew angle ! = null ) { if ( skew angle = = null ) { skew angle = new float keyframe animation ( collections singleton list ( new keyframe < float > ( 0f ) ) ) ; } skew angle set value callback ( ( lottie value callback < float > ) callback ) ; } else { return false ; } return true ; }


get a datanode descriptor given corresponding datanode u u i d

public datanode descriptor get datanode ( final string datanode uuid ) { if ( datanode uuid = = null ) { return null ; } synchronized ( this ) { return datanode map get ( datanode uuid ) ; } }


public map < string , big decimal > get map number ( ) { return map number ; }


returns the label by which it was referred to in the build file for non - alias rules , it ' s the label of the rule itself , for alias rules , it ' s the label of the alias rule

public static label get dependency label ( transitive info collection dep ) { alias provider alias provider = dep get provider ( alias provider class ) ; return alias provider ! = null ? alias provider get alias chain ( ) get ( 0 ) : dep get label ( ) ; }


waits for the j dialog with the given title < p > note : sometimes the task dialog might have the same title as the dialog you pop up and you want to get yours instead of the one for the task monitor

public static j dialog wait for j dialog ( string title ) { int total time = 0 ; while ( total time < = default window timeout ) { set < window > win list = get all windows ( ) ; iterator < window > iter = win list iterator ( ) ; while ( iter has next ( ) ) { window w = iter next ( ) ; if ( ( w instanceof j dialog ) & & w is showing ( ) ) { string window title = get title for window ( w ) ; if ( title equals ( window title ) ) { return ( j dialog ) w ; } } } total time + = sleep ( default wait delay ) ; } throw new assertion failed error ( " timed - out waiting for window with title ' " + title + " ' " ) ; }


returns a retained slice of this buffer ' s sub - region modifying the content of the returned buffer or this buffer affects each other ' s content while they maintain separate indexes and marks this method does not modify { @ code reader index } or { @ code writer index } of this buffer note that this method returns a { @ linkplain # retain ( ) retained } buffer unlike { @ link # slice ( int , int ) } this method behaves similarly to { @ code slice ( ) retain ( ) } except that this method may return a buffer implementation that produces less garbage

public abstract byte buf retained slice ( int index , int length ) ;


creates all the mappings of a sandbox this lambda runs holding a big lock around sandboxfs and is called in the critical path of all running actions as a result , this lambda should not block ( which includes not doing any io other than writing to the sandboxfs stream via { @ code mapper } )

void create ( sandbox mapper mapper ) throws i o exception ;


public integer get integer ( ) { return integer ; }


guaranteed to throw an exception and leave the map unmodified

public void put all ( map < ? extends type token < ? extends b > , ? extends b > map ) { throw new unsupported operation exception ( ) ; }


call to check if the query is cancelled or timed - out if so a { @ link runtime exception } is thrown


test for the choose replica to delete are processed based on block locality and free space

public void test choose replica to delete ( ) throws exception { list < datanode storage info > replica list = new array list < > ( ) ; final map < string , list < datanode storage info > > rack map = new hash map < string , list < datanode storage info > > ( ) ; storages [ 0 ] set remaining for tests ( 4 * 1024 * 1024 ) ; data nodes [ 0 ] set remaining ( calculate remaining ( data nodes [ 0 ] ) ) ; replica list add ( storages [ 0 ] ) ; storages [ 1 ] set remaining for tests ( 3 * 1024 * 1024 ) ; data nodes [ 1 ] set remaining ( calculate remaining ( data nodes [ 1 ] ) ) ; replica list add ( storages [ 1 ] ) ; storages [ 2 ] set remaining for tests ( 2 * 1024 * 1024 ) ; data nodes [ 2 ] set remaining ( calculate remaining ( data nodes [ 2 ] ) ) ; replica list add ( storages [ 2 ] ) ; / / even if this node has the most space , because the storage [ 5 ] has / / the lowest it should be chosen in case of block delete storages [ 4 ] set remaining for tests ( 100 * 1024 * 1024 ) ; storages [ 5 ] set remaining for tests ( 512 * 1024 ) ; data nodes [ 5 ] set remaining ( calculate remaining ( data nodes [ 5 ] ) ) ; replica list add ( storages [ 5 ] ) ; / / refresh the last update time for all the datanodes for ( int i = 0 ; i < data nodes length ; i + + ) { d f s test util reset last updates with offset ( data nodes [ i ] , 0 ) ; } list < datanode storage info > first = new array list < > ( ) ; list < datanode storage info > second = new array list < > ( ) ; replicator split nodes with rack ( replica list , replica list , rack map , first , second ) ; / / storages [ 0 ] and storages [ 1 ] are in first set as their rack has two / / replica nodes , while storages [ 2 ] and data nodes [ 5 ] are in second set assert equals ( 2 , first size ( ) ) ; assert equals ( 2 , second size ( ) ) ; list < storage type > excess types = new array list < > ( ) ; { / / test returning null excess types add ( storage type ssd ) ; assert null ( ( ( block placement policy default ) replicator ) choose replica to delete ( first , second , excess types , rack map ) ) ; } excess types add ( storage type default ) ; datanode storage info chosen = ( ( block placement policy default ) replicator ) choose replica to delete ( first , second , excess types , rack map ) ; / / within all storages , storages [ 5 ] with least free space assert equals ( chosen , storages [ 5 ] ) ; replicator adjust sets with chosen replica ( rack map , first , second , chosen ) ; assert equals ( 2 , first size ( ) ) ; assert equals ( 1 , second size ( ) ) ; / / within first set , storages [ 1 ] with less free space excess types add ( storage type default ) ; chosen = ( ( block placement policy default ) replicator ) choose replica to delete ( first , second , excess types , rack map ) ; assert equals ( chosen , storages [ 1 ] ) ; }


gets the distribution this operation represents

distribution get distribution ( ) { return distribution ; }


whether to log form data at debug level , and headers at trace level both may contain sensitive information by default set to { @ code false } so that request details are not shown

void enable logging request details ( boolean enable ) ;


constructs a { @ code linked hash multimap } with the same mappings as the specified multimap if a key - value mapping appears multiple times in the input multimap , it only appears once in the constructed multimap the new multimap has the same { @ link multimap # entries ( ) } iteration order as the input multimap , except for excluding duplicate mappings

public static < k , v > linked hash multimap < k , v > create ( multimap < ? extends k , ? extends v > multimap ) { linked hash multimap < k , v > result = create ( multimap key set ( ) size ( ) , default value set capacity ) ; result put all ( multimap ) ; return result ; }


appends the specified bytes to the fingerprint message same as { @ link # add bytes ( byte [ ] ) } , but faster when only a { @ link byte string } is available the fingerprint directly injects the bytes with no framing or tags added thus , not guaranteed to be unambiguous ; especially if input length is data - dependent

public fingerprint add bytes ( byte string bytes ) { try { coded out write raw bytes ( bytes ) ; } catch ( i o exception e ) { throw new illegal state exception ( " failed to write bytes " , e ) ; } return this ; }


returns true is this symbol represents a function for example , " function name @ 4 " or " my function @ 22 "

final static boolean is function ( program program , string symbol , address addr , int length ) { int atpos = symbol last index of ( ' @ ' ) ; if ( atpos > 0 ) { string s = symbol substring ( atpos + 1 ) ; try { integer parse int ( s ) ; } catch ( number format exception e ) { return false ; } / / check to make sure it is all code pseudo disassembler dis = new pseudo disassembler ( program ) ; address tmp = addr ; while ( tmp subtract ( addr ) < length ) { try { pseudo instruction instr = dis disassemble ( tmp ) ; tmp = tmp add ( instr get length ( ) ) ; } catch ( exception e ) { return false ; } } return true ; } return false ; } / / final static void ensure size ( int expected length , composite composite , message log log ) { / / int actual length = composite get length ( ) ; / / if ( actual length < expected length ) { / / / / composite set internally aligned ( false ) ; / / if ( composite instanceof structure ) { / / structure struct = ( structure ) composite ; / / / / if this is an empty structure , the structure will lie to us / / / / and say it has one element so add 1 to growth factor / / struct grow structure ( / / expected length - actual length + ( struct is not yet defined ( ) ? 1 : 0 ) ) ; / / } / / / / must be a union data type / / else { / / data type datatype = new array data type ( data type default , expected length , / / data type default get length ( ) ) ; / / composite add ( datatype ) ; / / } / / } / / else if ( actual length > expected length ) { / / log append msg ( " pdb " , " composite data type generated from pdb has size mismatch " + / / composite get name ( ) + " : expected 0x " + integer to hex string ( expected length ) + / / " , but was 0x " + integer to hex string ( actual length ) ) ; / / } / / }


static public string number to string ( number n ) throws j s o n exception { if ( n = = null ) { throw new j s o n exception ( " null pointer " ) ; } test validity ( n ) ; / / shave off trailing zeros and decimal point , if possible string s = n to string ( ) ; if ( s index of ( ' ' ) > 0 & & s index of ( ' e ' ) < 0 & & s index of ( ' e ' ) < 0 ) { while ( s ends with ( " 0 " ) ) { s = s substring ( 0 , s length ( ) - 1 ) ; } if ( s ends with ( " " ) ) { s = s substring ( 0 , s length ( ) - 1 ) ; } } return s ; }


convert the given object to string with each line indented by 4 spaces ( except the first line )

private string to indented string ( object o ) { if ( o = = null ) { return " null " ; } return o to string ( ) replace ( " \ n " , " \ n " ) ; }


guides the allowed concurrency among update operations used as a hint for internal sizing the table is internally partitioned to try to permit the indicated number of concurrent updates without contention because assignment of entries to these partitions is not necessarily uniform , the actual concurrency observed may vary ideally , you should choose a value to accommodate as many threads as will ever concurrently modify the table using a significantly higher value than you need can waste space and time , and a significantly lower value can lead to thread contention but overestimates and underestimates within an order of magnitude do not usually have much noticeable impact a value of one permits only one thread to modify the map at a time , but since read operations can proceed concurrently , this still yields higher concurrency than full synchronization defaults to 4 < b > note : < b > prior to guava release 9 0 , the default was 16 it is possible the default will change again in the future if you care about this value , you should always choose it explicitly

public map maker concurrency level ( int concurrency level ) { check state ( this concurrency level = = unset int , " concurrency level was already set to % s " , this concurrency level ) ; check argument ( concurrency level > 0 ) ; this concurrency level = concurrency level ; return this ; }


paint a 4 - bitpixel code string , as defined by etsi en 300 743 7 2 5 2 , to a canvas

private static int paint 4 bit pixel code string ( parsable bit array data , int [ ] clut entries , @ nullable byte [ ] clut map table , int column , int line , @ nullable paint paint , canvas canvas ) { boolean end of pixel code string = false ; do { int run length = 0 ; int clut index = 0 ; int peek = data read bits ( 4 ) ; if ( peek ! = 0x 0 0 ) { run length = 1 ; clut index = peek ; } else if ( ! data read bit ( ) ) { peek = data read bits ( 3 ) ; if ( peek ! = 0x 0 0 ) { run length = 2 + peek ; clut index = 0x 0 0 ; } else { end of pixel code string = true ; } } else if ( ! data read bit ( ) ) { run length = 4 + data read bits ( 2 ) ; clut index = data read bits ( 4 ) ; } else { switch ( data read bits ( 2 ) ) { case 0x 0 0 : run length = 1 ; break ; case 0x 0 1 : run length = 2 ; break ; case 0x 0 2 : run length = 9 + data read bits ( 4 ) ; clut index = data read bits ( 4 ) ; break ; case 0x 0 3 : run length = 25 + data read bits ( 8 ) ; clut index = data read bits ( 4 ) ; break ; } } if ( run length ! = 0 & & paint ! = null ) { paint set color ( clut entries [ clut map table ! = null ? clut map table [ clut index ] : clut index ] ) ; canvas draw rect ( column , line , column + run length , line + 1 , paint ) ; } column + = run length ; } while ( ! end of pixel code string ) ; return column ; }


in case of an incomplete part which had not reached the minimum part size at the time of snapshotting , this returns a file containing the in - progress part at which writing can be resumed

optional < file > get incomplete part ( ) ;


applies a group combine function on a grouped { @ link data set } a combine function is similar to a group reduce function but does not perform a full data exchange instead , the combine function calls the combine method once per partition for combining a group of results this operator is suitable for combining values into an intermediate format before doing a proper group reduce where the data is shuffled across the node for further reduction the group reduce operator can also be supplied with a combiner by implementing the rich group reduce function the combine method of the rich group reduce function demands input and output type to be the same the combine function , on the other side , can have an arbitrary output type

public < r > group combine operator < t , r > combine group ( group combine function < t , r > combiner ) { if ( combiner = = null ) { throw new null pointer exception ( " group combine function must not be null " ) ; } type information < r > result type = type extractor get group combine return types ( combiner , this get input data set ( ) get type ( ) , utils get call location name ( ) , true ) ; return new group combine operator < > ( this , result type , input data set clean ( combiner ) , utils get call location name ( ) ) ; }


see { @ link gif drawable # get loop count ( ) }

public int get loop count ( ) { return m gif info handle get loop count ( ) ; }


parses the { @ code refresh token status } from the token document and throws an exception if the document is malformed returns the parsed { @ code refresh token status } together with an { @ code optional } validation exception that encapsulates the various logic about when and by who a token can be refreshed

private static tuple < refresh token status , optional < elasticsearch security exception > > check token document for refresh ( instant refresh requested , authentication client auth , map < string , object > source ) throws illegal state exception , date time exception { final refresh token status refresh token status = parse token and refresh status ( source ) v 2 ( ) ; final elasticsearch security exception validation exception = check token document expired ( refresh requested , source ) or else get ( ( ) - > { if ( refresh token status is invalidated ( ) ) { return invalid grant exception ( " token has been invalidated " ) ; } else { return check client can refresh ( refresh token status , client auth ) or else ( check multiple refreshes ( refresh requested , refresh token status ) or else ( null ) ) ; } } ) ; return new tuple < > ( refresh token status , optional of nullable ( validation exception ) ) ; }


update the build view : syncs the package cache ; loads and analyzes the given labels

protected analysis result update ( event bus event bus , flag builder config , immutable set < string > explicit target patterns , immutable list < string > aspects , string labels ) throws exception { set < flag > flags = config flags ; loading options loading options = options parser get options ( loading options class ) ; analysis options view options = options parser get options ( analysis options class ) ; / / update - - keep going option if test requested it boolean keep going = flags contains ( flag keep going ) ; boolean discard analysis cache = view options discard analysis cache ; view options skyframe prepare analysis = flags contains ( flag skyframe prepare analysis ) ; package options package options = options parser get options ( package options class ) ; path package locator path package locator = path package locator create ( output base , package options package path , reporter , root directory , root directory , bazel skyframe executor constants build files by priority ) ; package options show loading progress = true ; package options globbing threads = 7 ; build language options build language options = options parser get options ( build language options class ) ; skyframe executor prepare package loading ( path package locator , package options , build language options , uuid random u u i d ( ) , immutable map < string , string > of ( ) , new timestamp granularity monitor ( blaze clock instance ( ) ) ) ; skyframe executor set action env ( immutable map < string , string > of ( ) ) ; skyframe executor invalidate files under path for testing ( reporter , modified file set everything modified , root from path ( root directory ) ) ; target pattern phase value loading result = skyframe executor load target patterns with filters ( reporter , immutable list copy of ( labels ) , path fragment empty fragment , loading options , loading phase threads , keep going , / * determine tests = * / false ) ; build request options request options = options parser get options ( build request options class ) ; immutable sorted set < string > multi cpu = immutable sorted set copy of ( request options multi cpus ) ; analysis result = build view update ( loading result , build options , multi cpu , explicit target patterns , aspects , view options , keep going , loading phase threads , analysis test util top level artifact context , reporter , event bus ) ; if ( discard analysis cache ) { build view clear analysis cache ( analysis result get targets to build ( ) , analysis result get aspects map ( ) key set ( ) ) ; } master config = analysis result get configuration collection ( ) ; return analysis result ; }


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


public object get anytype 2 ( ) { return anytype 2 ; }


get the response object of the underlying rpc protocol , e g http servlet response

public object get response ( ) { return response ; }


get the precedence level for the top - most precedence rule

public final int get precedence ( ) { if ( precedence stack is empty ( ) ) { return - 1 ; } return precedence stack peek ( ) ; }


public web socket rtm ( http url url , web socket listener listener ) { return http client new web socket ( new request builder ( ) url ( url ) build ( ) , listener ) ; }


flushes any buffered data in the framer to the sink

public void flush ( ) { if ( buffer ! = null & & buffer readable bytes ( ) > 0 ) { commit to sink ( false , true ) ; } }


returns pet inventories by status returns a map of status codes to quantities

public map < string , integer > get inventory ( ) throws api exception { object local var post body = null ; / / create path and map variables string local var path = " / store / inventory " replace all ( " \ \ { format \ \ } " , " json " ) ; / / query params list < pair > local var query params = new array list < pair > ( ) ; / / header params map < string , string > local var header params = new hash map < string , string > ( ) ; / / form params map < string , string > local var form params = new hash map < string , string > ( ) ; string [ ] local var content types = { } ; string local var content type = local var content types length > 0 ? local var content types [ 0 ] : " application / json " ; if ( local var content type starts with ( " multipart / form - data " ) ) { / / file uploading multipart entity builder local var builder = multipart entity builder create ( ) ; local var post body = local var builder build ( ) ; } else { / / normal form params } try { string local var response = api invoker invoke a p i ( base path , local var path , " get " , local var query params , local var post body , local var header params , local var form params , local var content type ) ; if ( local var response ! = null ) { return ( map < string , integer > ) api invoker deserialize ( local var response , " map " , integer class ) ; } else { return null ; } } catch ( api exception ex ) { throw ex ; } }


attempt to find the data type whose dt name and specified namespace match a stored data type within the specified data type manager the best match will be returned the namespace will be used in checking data type parent categories , however if no type corresponds to the namespace another type whose name matches may be returned

public static data type find data type ( data type manager data type manager , namespace namespace , string dt name , class < ? extends data type > class constraint ) { return find data type ( data type manager , dt name , class constraint , category path - > has preferred namespace category ( category path , namespace ) ) ; }


public void stop maintenance ( ) { admin state = null ; }


set the color that indicates gaps in memory

void set separator color ( color c ) { index factory set missing value color ( c ) ; for ( int i = 0 ; i < view list size ( ) ; i + + ) { byte viewer component comp = view list get ( i ) ; comp set separator color ( c ) ; } }


boolean encode gn ( ) { if ( char at ( m current + 1 ) = = ' n ' ) { / / ' align ' ' sign ' , ' resign ' but not ' resignation ' / / also ' impugn ' , ' impugnable ' , but not ' repugnant ' if ( ( ( m current > 1 ) & & ( ( string at ( ( m current - 1 ) , 1 , " i " , " u " , " e " , " " ) | | string at ( ( m current - 3 ) , 9 , " lorgnette " , " " ) | | string at ( ( m current - 2 ) , 9 , " lagniappe " , " " ) | | string at ( ( m current - 2 ) , 6 , " cognac " , " " ) | | string at ( ( m current - 3 ) , 7 , " chagnon " , " " ) | | string at ( ( m current - 5 ) , 9 , " compagnie " , " " ) | | string at ( ( m current - 4 ) , 6 , " bologn " , " " ) ) / / exceptions : following are cases where ' g ' is pronounced / / in " assign " ' g ' is silent , but not in " assignation " & & ! ( string at ( ( m current + 2 ) , 5 , " ation " , " " ) | | string at ( ( m current + 2 ) , 4 , " ator " , " " ) | | string at ( ( m current + 2 ) , 3 , " ate " , " ity " , " " ) / / exception to exceptions , not pronounced : | | ( string at ( ( m current + 2 ) , 2 , " an " , " ac " , " ia " , " um " , " " ) & & ! ( string at ( ( m current - 3 ) , 8 , " poignant " , " " ) | | string at ( ( m current - 2 ) , 6 , " cognac " , " " ) ) ) | | string at ( 0 , 7 , " spigner " , " stegner " , " " ) | | ( string at ( 0 , 5 , " signe " , " " ) & & ( m length = = 5 ) ) | | string at ( ( m current - 2 ) , 5 , " ligni " , " ligno " , " regna " , " digni " , " wegne " , " tigne " , " rigne " , " regne " , " tigno " , " " ) | | string at ( ( m current - 2 ) , 6 , " signal " , " signif " , " signat " , " " ) | | string at ( ( m current - 1 ) , 5 , " ignit " , " " ) ) & & ! string at ( ( m current - 2 ) , 6 , " signet " , " ligneo " , " " ) ) ) / / not e g ' cagney ' , ' magna ' | | ( ( ( m current + 2 ) = = m last ) & & string at ( m current , 3 , " gne " , " gna " , " " ) & & ! string at ( ( m current - 2 ) , 5 , " signa " , " magna " , " signe " , " " ) ) ) { metaph add exact approx ( " n " , " gn " , " n " , " kn " ) ; } else { metaph add exact approx ( " gn " , " kn " ) ; } m current + = 2 ; return true ; } return false ; }


public string resolve interface class name ( ) { class interface class = null ; / / first , try to get the value from " interface name " attribute string interface name = resolve attribute ( " interface name " ) ; if ( is empty ( interface name ) ) { / / if not found , try " interface class " interface class = resolve attribute ( " interface class " ) ; } else { interface class = resolve class ( interface name , get class ( ) get class loader ( ) ) ; } if ( is generic class ( interface class ) ) { interface name = interface class get name ( ) ; } else { interface name = null ; } if ( is empty ( interface name ) ) { / / if not fund , try to get the first interface from the service type class [ ] interfaces = service type get interfaces ( ) ; if ( is not empty ( interfaces ) ) { interface name = interfaces [ 0 ] get name ( ) ; } } return interface name ; }


public global transactional get transaction annotation ( ) { return transaction annotation ; }


create an empty { @ link http host builder } the expectation is that you then explicitly build the { @ link http host } piece - by - piece for example : < code > http host localhost = http host builder builder ( ) host ( " localhost " ) build ( ) ; http : localhost : 9200 http host explicit localhost = http host builder builder ( ) scheme ( scheme http ) host ( " localhost " ) port ( 9200 ) build ( ) ; http : localhost : 9200 http host secure localhost = http host builder builder ( ) scheme ( scheme https ) host ( " localhost " ) build ( ) ; https : localhost : 9200 http host different port = http host builder builder ( ) host ( " my host " ) port ( 19200 ) build ( ) ; https : my host : 19200 http host ip based = http host builder builder ( ) host ( " 192 168 0 11 " ) port ( 80 ) build ( ) ; https : 192 168 0 11 : 80 < code >

public static http host builder builder ( ) { return new http host builder ( ) ; }


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


initiate a duration tracking operation by creatingreturning an object whose { @ code close ( ) } call will update the statistics the statistics counter with the key name will be incremented by the given count the expected use is within a try - with - resources clause

duration tracker track duration ( string key , long count ) ;


test the use of chained - buffers for record storage chained - buffers will not utilize an index buffer

public void test insert single chained buffer fixed key record ( ) throws i o exception { insert one fixed key record ( false , false , buffer size / 4 ) ; }


{ @ inherit doc } this implementation is guaranteed to throw an { @ link unsupported operation exception }

public final entry < e > poll first entry ( ) { throw new unsupported operation exception ( ) ; }


returns the given attribute represented as a list of strings for " normal " attributes , this should just be a list of size one containing the attribute ' s value for configurable attributes , there should be one entry for each possible value the attribute may take note that for backwards compatibility , tristate and boolean attributes are returned as int using the values { @ code 0 , 1 } and { @ code - 1 } if there is no such attribute , this method returns an empty list

iterable < string > get attr as string ( t target , string attr name ) ;


flush the underlying session to the datastore , if applicable : for example , a hibernate j p a session


returns the ciphers preferred to use during tests they may be chosen because they are widely available or because they are fast there is no requirement that they provide confidentiality or integrity

public static list < string > preferred test ciphers ( ) { string [ ] ciphers ; try { ciphers = s s l context get default ( ) get default s s l parameters ( ) get cipher suites ( ) ; } catch ( no such algorithm exception ex ) { throw new runtime exception ( ex ) ; } list < string > ciphers minus gcm = new array list < > ( ) ; for ( string cipher : ciphers ) { / / the gcm implementation in java is very slow ( ~ 1 mb / s ) if ( cipher contains ( " gcm " ) ) { continue ; } ciphers minus gcm add ( cipher ) ; } return collections unmodifiable list ( ciphers minus gcm ) ; }


load the given resource from the class path < b > not to be overridden by application developers , who should obtain instances of this class from the static { @ link # get instance ( ) } method < b > protected for testability

protected resource load resource ( string path ) { return new class path resource ( path , get class ( ) get class loader ( ) ) ; }


public address get execution address ( ) { return emulator get execute address ( ) ; }


queues the channel if not already enqueued , potentially raising the priority

private boolean queue channel unsafe ( input channel channel , boolean priority ) { assert thread holds lock ( input channels with data ) ; final boolean already enqueued = enqueued input channels with data get ( channel get channel index ( ) ) ; if ( already enqueued & & ( ! priority | | input channels with data contains priority element ( channel ) ) ) { / / already notified / prioritized ( double notification ) , ignore return false ; } input channels with data add ( channel , priority , already enqueued ) ; if ( ! already enqueued ) { enqueued input channels with data set ( channel get channel index ( ) ) ; } return true ; }


returns type information for a java { @ link java util list } a list must not be null null values in elements are not supported by default , lists are untyped and treated as a generic type in flink ; therefore , it is useful to pass type information whenever a list is used note : flink does not preserve the concrete { @ link list } type it converts a list into { @ link array list } when copying or deserializing

public static < e > type information < list < e > > list ( type information < e > element type ) { return new list type info < > ( element type ) ; }


returns all child configurations resulting from a given split transition on a given configuration

protected list < build configuration > get split configurations ( build configuration configuration , split transition split transition ) throws interrupted exception , options parsing exception , invalid configuration exception { immutable list builder < build configuration > split configs = immutable list builder ( ) ; build options view fragment restricted options = new build options view ( configuration get options ( ) , split transition requires option fragments ( ) ) ; for ( build options split options : split transition split ( fragment restricted options , event collector ) values ( ) ) { split configs add ( get skyframe executor ( ) get configuration for testing ( reporter , configuration fragment classes ( ) , split options ) ) ; } return split configs build ( ) ; }


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


public fed balance context build ( ) { fed balance context context = new fed balance context ( ) ; context src = this src ; context dst = this dst ; context mount = this mount ; context conf = this conf ; context force close open files = this force close open files ; context use mount read only = this use mount read only ; context map num = this map num ; context bandwidth limit = this bandwidth limit ; context trash opt = this trash opt ; context delay duration = this delay duration ; context diff threshold = this diff threshold ; return context ; }


public static boolean finish to activity ( @ non null final class < ? extends activity > clz , final boolean is include self , @ anim res final int enter anim , @ anim res final int exit anim ) { list < activity > activities = utils bridge get activity list ( ) ; for ( activity act : activities ) { if ( act get class ( ) equals ( clz ) ) { if ( is include self ) { finish activity ( act , enter anim , exit anim ) ; } return true ; } finish activity ( act , enter anim , exit anim ) ; } return false ; }


create a readable and parseable audit log string for a successful event

public static void log success ( string user , string operation , string target ) { if ( log is info enabled ( ) ) { log info ( create success log ( user , operation , target , null , null , null , null ) ) ; } }


creates a new blocking - style stub that supports unary and streaming output calls on the service

public static xds update health service blocking stub new blocking stub ( io grpc channel channel ) { io grpc stub abstract stub stub factory < xds update health service blocking stub > factory = new io grpc stub abstract stub stub factory < xds update health service blocking stub > ( ) { @ java lang override public xds update health service blocking stub new stub ( io grpc channel channel , io grpc call options call options ) { return new xds update health service blocking stub ( channel , call options ) ; } } ; return xds update health service blocking stub new stub ( factory , channel ) ; }


convert this builder into an array of char [ ] s where the maximum index is the value of the highest character that has been seen the array will be sparse in the sense that any unseen index will default to null

public char [ ] [ ] to array ( ) { char [ ] [ ] result = new char [ max + 1 ] [ ] ; for ( entry < character , string > entry : map entry set ( ) ) { result [ entry get key ( ) ] = entry get value ( ) to char array ( ) ; } return result ; }


returns the original element list , unchanged

public list < object > order ( list < object > insertion order ) { return insertion order ; }


public string get property class ( ) { return property class ; }


returns the expected number of distinct elements given the specified elements the number of distinct elements is only computed if { @ code elements } is an instance of { @ code multiset } ; otherwise the default value of 11 is returned

static int infer distinct elements ( iterable < ? > elements ) { if ( elements instanceof multiset ) { return ( ( multiset < ? > ) elements ) element set ( ) size ( ) ; } return 11 ; / / initial capacity will be rounded up to 16 }


returns true iff this path denotes an existing directory

public boolean is directory ( symlinks follow symlinks ) { return file system is directory ( this , follow symlinks to boolean ( ) ) ; }


add a minimum statistic to dynamically return the latest value of the source

public dynamic i o statistics builder with atomic integer minimum ( string key , atomic integer source ) { with long function minimum ( key , s - > source get ( ) ) ; return this ; }


returns the corresponding object for the given row

public t get row object ( int view row ) { list < t > data = get model data ( ) ; if ( view row < 0 | | view row > = data size ( ) ) { return null ; } return data get ( view row ) ; }


public transaction attribute source get transaction attribute source ( ) { return this transaction attribute source ; }


find an element matching an example element

int find element to remove ( object key ) { if ( key = = null | | size ( ) = = 0 ) { return invalid index ; } int slot = slot ( elements , key ) ; int best slot = invalid index ; for ( int seen = 0 ; seen < elements length ; seen + + ) { element element = elements [ slot ] ; if ( element = = null ) { return best slot ; } if ( key = = element ) { return slot ; } else if ( element element keys are equal ( key ) ) { best slot = slot ; } slot = ( slot + 1 ) % elements length ; } return invalid index ; }


construct the preferred type of sequence file writer

public static writer create writer ( file system fs , configuration conf , path name , class key class , class val class , compression type compression type , compression codec codec , progressable progress ) throws i o exception { return create writer ( conf , writer file ( name ) , writer filesystem ( fs ) , writer key class ( key class ) , writer value class ( val class ) , writer compression ( compression type , codec ) , writer progressable ( progress ) ) ; }


checks if { @ code advertised provider set } satisfies this { @ code required providers } instance

public boolean is satisfied by ( advertised provider set advertised provider set ) { return constraint satisfies ( advertised provider set , this , null ) ; }


public boolean get namespace boolean ( ) { return namespace boolean ; }


execute the task sometime in the future , using thread pools

synchronized void execute ( fs volume impl volume , runnable task ) { if ( executors = = null ) { throw new runtime exception ( " async disk service is already shutdown " ) ; } if ( volume = = null ) { throw new runtime exception ( " a null volume does not have a executor " ) ; } thread pool executor executor = executors get ( volume get storage i d ( ) ) ; if ( executor = = null ) { throw new runtime exception ( " cannot find volume " + volume + " for execution of task " + task ) ; } else { executor execute ( task ) ; } }


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


registers a kv state instance for the given key group index

void unregister kv state ( key group range key group range ) { if ( key group range get start key group ( ) < 0 | | key group range get end key group ( ) > = num key groups ) { throw new index out of bounds exception ( " key group index " ) ; } for ( int kg idx = key group range get start key group ( ) ; kg idx < = key group range get end key group ( ) ; + + kg idx ) { if ( kv state ids [ kg idx ] = = null | | kv state addresses [ kg idx ] = = null ) { throw new illegal argument exception ( " not registered probably registration / unregistration race " ) ; } num registered key groups - - ; kv state ids [ kg idx ] = null ; kv state addresses [ kg idx ] = null ; } }


returns the table row associated with the top of the viewport

public int get viewport position as row ( ) { return viewport get view position ( ) y / table get row height ( ) ; }


void remove from version ( ) { prev version next version = next version ; next version prev version = prev version ; next version = null ; prev version = null ; }