compares { @ code a } and { @ code b } " fuzzily , " with a tolerance for nearly - equal values this method is equivalent to { @ code fuzzy equals ( a , b , tolerance ) ? 0 : double compare ( a , b ) } in particular , like { @ link double # compare ( double , double ) } , it treats all na n values as equal and greater than all other values ( including { @ link double # positive infinity } ) this is not a total ordering and is not suitable for use in { @ link comparable # compare to } implementations in particular , it is not transitive

public static int fuzzy compare ( double a , double b , double tolerance ) { if ( fuzzy equals ( a , b , tolerance ) ) { return 0 ; } else if ( a < b ) { return - 1 ; } else if ( a > b ) { return 1 ; } else { return booleans compare ( double is na n ( a ) , double is na n ( b ) ) ; } }


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


moves the cursor to the next editable field

protected boolean locate next edit field ( int current row ) { int row = current row ; int model column = model get column ( ) ; boolean found editable = false ; / / get the current row ( index ) and column ( field num ) int index = row ; int field num = table convert column index to view ( model column ) ; int num fields = model get column count ( ) ; int num comps = model get row count ( ) ; do { / / determine the new location for the cursor if ( index < num comps ) { / / on component row if ( + + field num < ( num fields ) ) { / / not on last field if ( model is cell editable ( index , table convert column index to model ( field num ) ) ) { found editable = true ; } } else if ( ( + + index < num comps ) / / on last field for other than last component | | ( index = = num comps ) ) { / / last field and row but unlocked field num = 0 ; / / set it to first field if ( model is cell editable ( index , table convert column index to model ( field num ) ) ) { found editable = true ; } } else { break ; } } else { break ; } } while ( ! found editable ) ; if ( found editable ) { row = index ; model column = table convert column index to model ( field num ) ; table set row selection interval ( row , row ) ; model set row ( row ) ; model set column ( model column ) ; } return found editable ; }


public polygon builder hole ( line string builder hole , boolean coerce ) { if ( coerce ) { hole close ( ) ; } validate linear ring ( hole ) ; holes add ( hole ) ; return this ; }


aborts this output stream and releases any system resources associated with this stream

void abort ( ) throws i o exception { final multiple i o exception builder b = new multiple i o exception builder ( ) ; synchronized ( this ) { if ( is closed ( ) ) { return ; } get streamer ( ) get last exception ( ) set ( new i o exception ( " lease timeout of " + ( dfs client get conf ( ) get hdfs timeout ( ) / 1000 ) + " seconds expired " ) ) ; try { close threads ( true ) ; } catch ( i o exception e ) { b add ( e ) ; } } final i o exception ioe = b build ( ) ; if ( ioe ! = null ) { throw ioe ; } }


public void add instance ( string namespace id , string service name , boolean ephemeral , instance ips ) throws nacos exception { string key = key builder build instance list key ( namespace id , service name , ephemeral ) ; service service = get service ( namespace id , service name ) ; synchronized ( service ) { list < instance > instance list = add ip addresses ( service , ephemeral , ips ) ; instances instances = new instances ( ) ; instances set instance list ( instance list ) ; consistency service put ( key , instances ) ; } }


public rules rules ( ) { return rules ( new rules ( ) ) ; }


removes the given { @ link controller listener }

public void remove listener ( controller listener listener ) ;


writes the specified string to the file using the default charset parent directories will be created if necessary

public void write string ( string string , boolean append ) { write string ( string , append , null ) ; }


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


reads a variable - length nul - terminated string as defined in socks4

private static string read string ( string field name , byte buf in ) { int length = in bytes before ( max field length + 1 , ( byte ) 0 ) ; if ( length < 0 ) { throw new decoder exception ( " field ' " + field name + " ' longer than " + max field length + " chars " ) ; } string value = in read slice ( length ) to string ( charset util us ascii ) ; in skip bytes ( 1 ) ; / / skip the nul return value ; }


converts this { @ code vector 2 } to a string in the format { @ code ( x , y ) }

public string to string ( ) { return " ( " + x + " , " + y + " ) " ; }


public io grpc testing integration messages client configure response configure ( io grpc testing integration messages client configure request request ) { return io grpc stub client calls blocking unary call ( get channel ( ) , get configure method ( ) , get call options ( ) , request ) ; }


adds a new enrich policy or overwrites an existing policy if there is already a policy with the same name this method can only be invoked on the elected master node

public static void put policy ( final string name , final enrich policy policy , final cluster service cluster service , final index name expression resolver index name expression resolver , final consumer < exception > handler ) { assert cluster service local node ( ) is master node ( ) ; if ( strings is null or empty ( name ) ) { throw new illegal argument exception ( " name is missing or empty " ) ; } if ( policy = = null ) { throw new illegal argument exception ( " policy is missing " ) ; } / / the policy name is used to create the enrich index name and / / therefor a policy name has the same restrictions as an index name metadata create index service validate index or alias name ( name , ( policy name , error ) - > new illegal argument exception ( " invalid policy name [ " + policy name + " ] , " + error ) ) ; if ( name to lower case ( locale root ) equals ( name ) = = false ) { throw new illegal argument exception ( " invalid policy name [ " + name + " ] , must be lowercase " ) ; } set < string > supported policy types = set of ( enrich policy supported policy types ) ; if ( supported policy types contains ( policy get type ( ) ) = = false ) { throw new illegal argument exception ( " unsupported policy type [ " + policy get type ( ) + " ] , supported types are " + arrays to string ( enrich policy supported policy types ) ) ; } final enrich policy final policy ; if ( policy get elasticsearch version ( ) = = null ) { final policy = new enrich policy ( policy get type ( ) , policy get query ( ) , policy get indices ( ) , policy get match field ( ) , policy get enrich fields ( ) , version current ) ; } else { final policy = policy ; } update cluster state ( cluster service , handler , current - > { for ( string index expression : final policy get indices ( ) ) { / / indices field in policy can contain wildcards , aliases etc string [ ] concrete indices = index name expression resolver concrete index names ( current , indices options strict expand open ( ) , index expression ) ; for ( string concrete index : concrete indices ) { index metadata imd = current get metadata ( ) index ( concrete index ) ; assert imd ! = null ; mapping metadata mapping = imd mapping ( ) ; if ( mapping = = null ) { throw new illegal argument exception ( " source index [ " + concrete index + " ] has no mapping " ) ; } map < string , object > mapping source = mapping get source as map ( ) ; enrich policy runner validate mappings ( name , final policy , concrete index , mapping source ) ; } } final map < string , enrich policy > policies = get policies ( current ) ; if ( policies get ( name ) ! = null ) { throw new resource already exists exception ( " policy [ { } ] already exists " , name ) ; } policies put ( name , final policy ) ; return policies ; } ) ; }


public string get quadrilateral type ( ) { return quadrilateral type ; }


returns a view collection containing the value from each key - value pair contained in this multimap , without collapsing duplicates ( so { @ code values ( ) size ( ) = = size ( ) } ) changes to the returned collection will update the underlying multimap , and vice versa however , adding to the returned collection is not possible


create directory junctions then assert their existence each key in the map is a junction path , relative to { @ link # scratch root } these are the link names each value in the map is a directory or junction path , also relative to { @ link # scratch root } these are the link targets

public void create junctions ( map < string , string > links ) throws exception { for ( map entry < string , string > e : links entry set ( ) ) { windows file operations create junction ( scratch root + " / " + e get key ( ) , scratch root + " / " + e get value ( ) ) ; } for ( map entry < string , string > e : links entry set ( ) ) { assert with message ( string format ( " could not create junction ' % s ' - > ' % s ' " , e get key ( ) , e get value ( ) ) ) that ( new file ( scratch root , e get key ( ) ) exists ( ) ) is true ( ) ; } }


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 " ) ; }


registers a cache aspect < pre class = " code " > & lt ; bean id = " cache aspect " class = " org springframework cache aspectj annotation cache aspect " factory - method = " aspect of " & gt ; & lt ; property name = " cache manager " ref = " cache manager " & gt ; & lt ; property name = " key generator " ref = " key generator " & gt ; & lt ; bean & gt ;

private static void register cache aspect ( element element , parser context parser context ) { if ( ! parser context get registry ( ) contains bean definition ( cache management config utils cache aspect bean name ) ) { root bean definition def = new root bean definition ( ) ; def set bean class name ( cache aspect class name ) ; def set factory method name ( " aspect of " ) ; parse cache resolution ( element , def , false ) ; cache namespace handler parse key generator ( element , def ) ; parser context register bean component ( new bean component definition ( def , cache management config utils cache aspect bean name ) ) ; } }


public object value ( ) { return this value ; }


public list < integer > get name wrapped array ( ) { return name wrapped array ; }


delegate method to perform the actual compilation subclasses can override this template method to perform their own compilation invoked after this base class ' s compilation is complete

protected void compile internal ( ) { data source data source = get jdbc template ( ) get data source ( ) ; assert state ( data source ! = null , " no data source set " ) ; this table meta data context process meta data ( data source , get column names ( ) , get generated key names ( ) ) ; this insert string = this table meta data context create insert string ( get generated key names ( ) ) ; this insert types = this table meta data context create insert types ( ) ; if ( logger is debug enabled ( ) ) { logger debug ( " compiled insert object : insert string is [ " + this insert string + " ] " ) ; } on compile internal ( ) ; }


end an object this method most be called to balance calls to < code > object < code >

public j s o n writer end object ( ) throws j s o n exception { return this end ( ' k ' , ' }


gets a fast digest for the given path , or { @ code null } if there isn ' t one available or the filesystem doesn ' t support them this digest should be suitable for detecting changes to the file

protected byte [ ] get fast digest ( path path ) throws i o exception { return null ; }


transform a path to an { @ link output file provider }

public static output file provider create ( path path ) throws i o exception { if ( files is directory ( path ) ) { return new directory output file provider ( path ) ; } else { return new zip output file provider ( path ) ; } }


separate the job ids into open and closing job ids and validate if a job is failed it is will not be closed unless the force parameter in request is true it is an error if the datafeed the job uses is not stopped

void validate ( collection < string > expanded job ids , boolean force close , persistent tasks custom metadata tasks metadata , action listener < open and closing ids > listener ) { check datafeeds have stopped ( expanded job ids , tasks metadata , action listener wrap ( response - > { open and closing ids ids = new open and closing ids ( ) ; list < string > failed jobs = new array list < > ( ) ; for ( string job id : expanded job ids ) { add job according to state ( job id , tasks metadata , ids open job ids , ids closing job ids , failed jobs ) ; } if ( force close = = false & & failed jobs size ( ) > 0 ) { if ( expanded job ids size ( ) = = 1 ) { listener on failure ( exceptions helper conflict status exception ( " cannot close job [ { } ] because it failed , use force close " , expanded job ids iterator ( ) next ( ) ) ) ; return ; } listener on failure ( exceptions helper conflict status exception ( " one or more jobs have state failed , use force close " ) ) ; return ; } / / if there are failed jobs force close is true ids open job ids add all ( failed jobs ) ; listener on response ( ids ) ; } , listener : : on failure ) ) ; }


returns the total number of test shards 0 means no sharding , whereas 1 means degenerate sharding

public int get total shards ( ) { return test action get execution settings ( ) get total shards ( ) ; }


get the original function info and save it off in the undo map ; set the function info using the new info object

private void set function ( listing listing , address addr , code unit info info ) { function function = listing get function at ( addr ) ; if ( function = = null ) { return ; } string fn name = info get function name ( ) ; if ( fn name ! = null ) { try { function set name ( fn name , info get primary symbol source ( ) ) ; } catch ( duplicate name exception e ) { messages append ( " could not set function name - - duplicate name : " + fn name ) append ( ' \ n ' ) ; } catch ( invalid input exception e ) { / / shouldn ' t happen } } / / string [ ] function comments = info get function comments ( ) ; / / if ( function comments ! = null ) { / / string buffer sb = new string buffer ( ) ; / / for ( int i = 0 ; i < function comments length ; i + + ) { / / sb append ( function comments [ i ] ) ; / / if ( i < function comments length - 1 ) { / / sb append ( " \ n " ) ; / / } / / } / / string comment = sb to string ( ) ; / / string old comment = function get comment ( ) ; / / if ( old comment ! = null & & old comment length ( ) ! = 0 ) { / / comment = old comment + " \ n " + comment ; / / } / / function set comment ( comment ) ; / / } string [ ] stack var names = info get stack variable names ( ) ; if ( stack var names length ! = 0 ) { string [ ] stack var comments = info get stack variable comments ( ) ; source type [ ] stack var sources = info get stack variable sources ( ) ; int [ ] stack offsets = info get stack offsets ( ) ; int [ ] stack var first use offsets = info get stack var first use offsets ( ) ; variable [ ] stack vars = function get variables ( variable filter stack variable filter ) ; for ( int i = 0 ; i < stack offsets length ; i + + ) { variable var = find stack var ( stack vars , stack offsets [ i ] , stack var first use offsets [ i ] ) ; if ( var ! = null ) { try { var set name ( stack var names [ i ] , stack var sources [ i ] ) ; } catch ( duplicate name exception e ) { messages append ( " could not set stack variable name - - duplicate name : " + fn name ) append ( ' \ n ' ) ; } catch ( invalid input exception e ) { / / shouldn ' t happen } if ( stack var comments [ i ] ! = null ) { var set comment ( stack var comments [ i ] ) ; } } } } string [ ] var names = info get variable names ( ) ; if ( var names length ! = 0 ) { string [ ] var comments = info get variable comments ( ) ; source type [ ] var sources = info get variable sources ( ) ; address [ ] var addrs = info get var addresses ( ) ; int [ ] reg var first use offsets = info get var first use offsets ( ) ; variable [ ] vars = function get all variables ( ) ; for ( int i = 0 ; i < var addrs length ; i + + ) { variable var = find var ( vars , var addrs [ i ] , reg var first use offsets [ i ] ) ; if ( var ! = null ) { try { var set name ( var names [ i ] , var sources [ i ] ) ; } catch ( duplicate name exception e ) { messages append ( " could not set variable name - - duplicate name : " + fn name ) append ( ' \ n ' ) ; } catch ( invalid input exception e ) { / / shouldn ' t happen } if ( var comments [ i ] ! = null ) { var set comment ( var comments [ i ] ) ; } } } } }


public synchronized void set job priority ( string priority ) throws i o exception { try { job set priority ( org apache hadoop mapreduce job priority value of ( priority ) ) ; } catch ( interrupted exception ie ) { throw new i o exception ( ie ) ; } }


public byte next ( ) throws memory access exception { if ( count = = 0 ) { address range range = addr set iterator ( ) next ( ) ; address start = range get min address ( ) ; long size = range get length ( ) ; if ( size > buf size ) { range = new address range impl ( start , start add ( buf size - 1 ) ) ; size = buf size ; } count = ( int ) size ; pos = 0 ; addr set delete ( range ) ; mem get bytes ( start , buf , 0 , count ) ; } count - - ; return buf [ pos + + ] ; }


public indices aliases request builder remove alias ( string index , string [ ] aliases ) { request add alias action ( alias actions remove ( ) index ( index ) aliases ( aliases ) ) ; return this ; }


return the required type of the missing bean , if it was a lookup by type that failed

public class < ? > get bean type ( ) { return ( this resolvable type ! = null ? this resolvable type resolve ( ) : null ) ; }


public void set config ( element conf ) { / / get the flag from the config ( defaults to true if not set ) create queue = get create flag ( conf ) ; / / no config can be set when no policy is defined and we use defaults if ( conf ! = null ) { default queue name = conf get attribute ( " queue " ) ; / / a queue read from the config could be illegal check it : fall back to / / the config default if it is the case / / however we cannot clean the name as a nested name is allowed if ( ! is valid queue name ( default queue name ) ) { log error ( " default rule configured with an illegal queue name : ' { } ' " , default queue name ) ; default queue name = null ; } } / / the queue name does not have to be set and we really use " default " if ( default queue name = = null | | default queue name is empty ( ) ) { default queue name = assure root ( yarn configuration default queue name ) ; } else { default queue name = assure root ( default queue name ) ; } log debug ( " default rule instantiated with queue name : { } , " + " and create flag : { } " , default queue name , create queue ) ; }


returns an error describing why the build file in this directory cannot be loaded as a package , if there is one and it can ' t be otherwise returns { @ code null } if this returns non - { @ code null } , then { @ link # is directory package ( ) } returns { @ code false }

public abstract string get error message ( ) ;


specify an analyzer to use for the query

public simple query string builder analyzer ( string analyzer ) { this analyzer = analyzer ; return this ; }


resource definitions corresponding to an android package < code > repeated aapt pb package package = 2 ; < code >

public builder add package ( com android aapt resources package builder builder for value ) { copy on write ( ) ; instance add package ( builder for value ) ; return this ; }


private void coordinate ( long checkpoint id , map < string , list < path > > part files ) { function < path , long > size func = path - > { try { return file system get file status ( path ) get len ( ) ; } catch ( i o exception e ) { throw new unchecked i o exception ( e ) ; } } ; / / we need a stable compaction algorithm map < string , list < list < path > > > compact units = new hash map < > ( ) ; part files for each ( ( p , files ) - > { / / sort files for stable compaction algorithm files sort ( comparator comparing ( path : : get path ) ) ; compact units put ( p , bin packing pack ( files , size func , target file size ) ) ; } ) ; / / now , send this stable pack list to compactor / / note , use broadcast emitting ( because it needs to emit checkpoint barrier ) , / / operators will pick its units by unit id and task id int unit id = 0 ; for ( map entry < string , list < list < path > > > units entry : compact units entry set ( ) ) { string partition = units entry get key ( ) ; for ( list < path > unit : units entry get value ( ) ) { output collect ( new stream record < > ( new compaction unit ( unit id , partition , unit ) ) ) ; unit id + + ; } } log debug ( " coordinate checkpoint - { } , compaction units are : { } " , checkpoint id , compact units ) ; / / emit checkpoint barrier output collect ( new stream record < > ( new end compaction ( checkpoint id ) ) ) ; }


public surface get surface ( ) { return m surface ; }


public put index template request builder set source ( x content builder template builder ) { request source ( template builder ) ; return this ; }


create a new { @ code k table } by transforming the value of each record in this { @ code k table } into a new value ( with possibly a new type ) in the new { @ code k table } , with default serializers , deserializers , and state store for each { @ code k table } update the provided { @ link value mapper with key } is applied to the value of the update record and computes a new value for it , resulting in an updated record for the result { @ code k table } thus , an input record { @ code < k , v > } can be transformed into an output record { @ code < k : v ' > } this is a stateless record - by - record operation the example below counts the number of token of value and key strings { @ code k table < string , string > input table = builder table ( " topic " ) ; k table < string , integer > output table = input table map values ( ( read only key , value ) - > read only key split ( " " ) length + value split ( " " ) length ) ; } note that the key is read - only and should not be modified , as this can lead to corrupt partitioning this operation preserves data co - location with respect to the key thus , no internal data redistribution is required if a key based operator ( like a join ) is applied to the result { @ code k table } note that { @ code map values } for a changelog stream works differently than { @ link k stream # map values ( value mapper with key ) record stream filters } , because { @ link key value records } with { @ code null } values ( so - called tombstone records ) have delete semantics thus , for tombstones the provided value - mapper is not evaluated but the tombstone record is forwarded directly to delete the corresponding record in the result { @ code k table }

< vr > k table < k , vr > map values ( final value mapper with key < ? super k , ? super v , ? extends vr > mapper ) ;


returns whether the channel is terminated terminated channels have no running calls and relevant resources released ( like tcp connections )

public abstract boolean is terminated ( ) ;


public void handle item import ( item item , int amount ) { export get ( item , export stat : : new ) counter - = amount ; }


test large headers that exceed { @ link default http 2 frame writer # max frame size } the remaining headers will be sent in a continuation frame

public void write large headers ( ) throws exception { int stream id = 1 ; http 2 headers headers = new default http 2 headers ( ) method ( " get " ) path ( " / " ) authority ( " foo com " ) scheme ( " https " ) ; headers = dummy headers ( headers , 20 ) ; http 2 headers encoder configuration ( ) max header list size ( integer max value ) ; frame writer headers configuration ( ) max header list size ( integer max value ) ; frame writer max frame size ( http 2 codec util max frame size lower bound ) ; frame writer write headers ( ctx , stream id , headers , 0 , true , promise ) ; byte [ ] expected payload = header payload ( stream id , headers ) ; / / first frame : header ( length = 0x 4 0 0 0 , flags = 0x 0 1 ) assert equals ( http 2 codec util max frame size lower bound , outbound read unsigned medium ( ) ) ; assert equals ( 0x 0 1 , outbound read byte ( ) ) ; assert equals ( 0x 0 1 , outbound read byte ( ) ) ; assert equals ( stream id , outbound read int ( ) ) ; byte [ ] first payload = new byte [ http 2 codec util max frame size lower bound ] ; outbound read bytes ( first payload ) ; int remain payload length = expected payload length - http 2 codec util max frame size lower bound ; / / second frame : continuation ( length = remain payload length , flags = 0x 0 4 ) assert equals ( remain payload length , outbound read unsigned medium ( ) ) ; assert equals ( 0x 0 9 , outbound read byte ( ) ) ; assert equals ( 0x 0 4 , outbound read byte ( ) ) ; assert equals ( stream id , outbound read int ( ) ) ; byte [ ] second payload = new byte [ remain payload length ] ; outbound read bytes ( second payload ) ; assert array equals ( arrays copy of range ( expected payload , 0 , first payload length ) , first payload ) ; assert array equals ( arrays copy of range ( expected payload , first payload length , expected payload length ) , second payload ) ; }


public void set timeout ( int timeout secs ) { this timeout = timeout secs ; }


create a pool stats instance that will be used by metrics tracking , with a pollable resolution of 1 second

private pool stats get pool stats ( ) { return new pool stats ( seconds to millis ( 1 ) ) { @ override protected void update ( ) { this pending threads = hikari pool this get threads awaiting connection ( ) ; this idle connections = hikari pool this get idle connections ( ) ; this total connections = hikari pool this get total connections ( ) ; this active connections = hikari pool this get active connections ( ) ; this max connections = config get maximum pool size ( ) ; this min connections = config get minimum idle ( ) ; } } ; }


public void set foreground ( color c ) { super set foreground ( c ) ; repaint ( ) ; }


represent a mutual exclusion use case the boolean flag exclude one of the two operation

public long get or put ( object id , boolean flag ) { return this counter get and increment ( ) ; }


add a profile to the current set of active profiles

void add active profile ( string profile ) ;


public void set naming policy ( naming policy naming policy ) { if ( naming policy = = null ) naming policy = default naming policy instance ; this naming policy = naming policy ; }


adds a nested set as a transitive member to the set to be built the relative left - to - right order of transitive members is preserved from the sequence of calls to { @ link # add transitive } since the traversal { @ link order } controls whether direct members appear before or after transitive ones , the interleaving of { @ link # add } { @ link # add all } with { @ link # add transitive } does not matter the { @ link order } of the added set must be compatible with the order of this builder ( see { @ link order # is compatible } ) this is true even if the added set is empty strictly speaking , it is not technically necessary that two nested sets have compatible orders for them to be combined as part of one larger set but checking for it helps readability and protects against bugs since { @ link order # stable order } is compatible with everything , it effectively disables the check this can be used as an escape hatch to mix and match the set arbitrarily , including sharing the set as part of multiple other larger sets that have disagreeing orders the relative order of the elements of an added set are preserved , unless it has duplicates or overlaps with other added sets , or its order is different from that of the builder

public nested set builder < e > add transitive ( nested set < ? extends e > subset ) { preconditions check not null ( subset ) ; preconditions check argument ( order is compatible ( subset get order ( ) ) , " order mismatch : % s ! = % s " , subset get order ( ) get starlark name ( ) , order get starlark name ( ) ) ; if ( ! subset is empty ( ) ) { if ( transitive sets = = null ) { transitive sets = compact hash set create ( ) ; } transitive sets add ( subset ) ; } return this ; }


protected string listing string 0 ( boolean note indices ) { if ( code size ( ) = = 0 ) { return null ; } return " nop / / spacer " ; }


{ @ inherit doc } the default implementation does nothing

@ override public void enter aliased query ( sql base parser aliased query context ctx ) { }


returns the original element list , unchanged

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


private static final void parse time ( string date str , parser state state , string time str ) throws calendar parser exception { int place = place hour ; string tmp time ; final char last char = time str char at ( time str length ( ) - 1 ) ; if ( last char ! = ' m ' & & last char ! = ' m ' ) { if ( debug ) { system err println ( " no am / pm in \ " " + time str + " \ " ( time ) " ) ; } tmp time = time str ; } else { final char pre last = time str char at ( time str length ( ) - 2 ) ; if ( pre last = = ' a ' | | pre last = = ' a ' ) { state set time post meridian ( false ) ; } else if ( pre last = = ' p ' | | pre last = = ' p ' ) { state set time post meridian ( true ) ; } else { throw new calendar parser exception ( " bad time \ " " + time str + " \ " in date \ " " + date str + " \ " " ) ; } tmp time = time str substring ( 0 , time str length ( ) - 2 ) ; if ( debug ) { system err println ( " found " + ( state is time post meridian ( ) ? " pm " : " am " ) + " now \ " " + tmp time + " \ " ( time ) " ) ; } } string [ ] t list = tmp time split ( " [ : \ \ ] " ) ; for ( string token : t list ) { if ( debug ) { system err println ( " hour " + ( state is hour set ( ) ? integer to string ( state get hour ( ) ) : " unset " ) + " , minute " + ( state is minute set ( ) ? integer to string ( state get minute ( ) ) : " unset " ) + " , second " + ( state is second set ( ) ? integer to string ( state get second ( ) ) : " unset " ) + " , millisecond " + ( state is millisecond set ( ) ? integer to string ( state get millisecond ( ) ) : " unset " ) + " , token = \ " " + token + " \ " " ) ; } final int val ; try { val = integer parse int ( token ) ; } catch ( number format exception nfe ) { throw new calendar parser exception ( " bad " + get time place string ( place ) + " string \ " " + token + " \ " in \ " " + date str + " \ " " ) ; } switch ( place ) { case place hour : try { state set hour ( val ) ; } catch ( calendar parser exception dfe ) { throw new calendar parser exception ( dfe get message ( ) + " in \ " " + date str + " \ " " ) ; } if ( debug ) { system err println ( " set hour to " + val ) ; } place = place minute ; break ; case place minute : try { state set minute ( val ) ; } catch ( calendar parser exception dfe ) { throw new calendar parser exception ( dfe get message ( ) + " in \ " " + date str + " \ " " ) ; } if ( debug ) { system err println ( " set minute to " + val ) ; } place = place second ; break ; case place second : try { state set second ( val ) ; } catch ( calendar parser exception dfe ) { throw new calendar parser exception ( dfe get message ( ) + " in \ " " + date str + " \ " " ) ; } if ( debug ) { system err println ( " set second to " + val ) ; } place = place milli ; break ; case place milli : try { state set millisecond ( val ) ; } catch ( calendar parser exception dfe ) { throw new calendar parser exception ( dfe get message ( ) + " in \ " " + date str + " \ " " ) ; } if ( debug ) { system err println ( " set millisecond to " + val ) ; } place = place unknown ; break ; default : throw new calendar parser exception ( " unexpected place value " + place ) ; } } }


public final void set ( double new value ) { long next = double to raw long bits ( new value ) ; value set ( next ) ; }


public input stream get unicode stream ( string column label ) throws s q l exception { return null ; }


re - initialize the iterator , start from begin row


public b var put var ( string name ) { if ( vars contains key ( name ) ) { return vars get ( name ) ; } else { b var var = new b var ( last var + + ) ; vars put ( name , var ) ; return var ; } }


test init a queue configuration , children ' s capacity for a given label doesn ' t equals to 100 % this expect illegal argument exception thrown

public void test queue parsing fail when sum of children non labeled capacity not 1 0 0 percent ( ) throws i o exception { node label manager add to cluser node labels with default exclusivity ( immutable set of ( " red " , " blue " ) ) ; yarn configuration conf = new yarn configuration ( ) ; capacity scheduler configuration cs conf = new capacity scheduler configuration ( conf ) ; setup queue configuration ( cs conf ) ; cs conf set capacity ( capacity scheduler configuration root + " c c 2 " , 5 ) ; capacity scheduler capacity scheduler = new capacity scheduler ( ) ; r m context impl rm context = new r m context impl ( null , null , null , null , null , null , new r m container token secret manager ( cs conf ) , new n m token secret manager in r m ( cs conf ) , new client to a m token secret manager in r m ( ) , null ) ; rm context set node label manager ( node label manager ) ; capacity scheduler set conf ( cs conf ) ; capacity scheduler set r m context ( rm context ) ; capacity scheduler init ( cs conf ) ; capacity scheduler start ( ) ; service operations stop quietly ( capacity scheduler ) ; }


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


returns whether this node is marked as deleted

public boolean is cut ( ) { return is cut ; }


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


returns a dict of provider names to their values for a configured target this map is intended to be used from starlark query output methods , so all values must be accessible in starlark if the value of a provider is not convertible to a starlark value , that namevalue pair is left out of the map

public static dict < string , object > get providers dict ( abstract configured target target , transitive info provider map providers ) { dict builder < string , object > res = dict builder ( ) ; for ( int i = 0 ; i < providers get provider count ( ) ; i + + ) { / / the key may be of many types , but we need a string for the intended use object key = providers get provider key at ( i ) ; object v = providers get provider instance at ( i ) ; string key as string ; if ( key instanceof string ) { key as string = key to string ( ) ; } else if ( key instanceof provider key ) { if ( key instanceof starlark provider key ) { starlark provider key k = ( starlark provider key ) key ; key as string = k get extension label ( ) to string ( ) + " % " + k get exported name ( ) ; } else { key as string = key to string ( ) ; } } else if ( key instanceof class ) { key as string = ( ( class ) key ) get simple name ( ) ; } else { / / ? ? ? continue ; } try { res put ( key as string , starlark from java ( v , null ) ) ; } catch ( illegal argument exception ex ) { / / this is ok if this is not a valid starlark value , we just leave it out of the map } } return res build immutable ( ) ; }


public void set up ( ) { super set up ( ) ; do answer ( new answer < void > ( ) { @ override public void answer ( invocation on mock invocation ) throws throwable { stream listener message producer producer = ( stream listener message producer ) invocation get arguments ( ) [ 0 ] ; input stream message ; while ( ( message = producer next ( ) ) ! = null ) { listener message queue add ( message ) ; } return null ; } } ) when ( listener ) messages available ( argument matchers < stream listener message producer > any ( ) ) ; }


public list < integer > get wrapped array ( ) { return wrapped array ; }


apply any revision control set by the policy if it is to be enforced on the server

public boolean maybe apply constraint ( final get object request request ) { if ( policy get mode ( ) = = change detection policy mode server & & revision id ! = null ) { policy apply revision constraint ( request , revision id ) ; return true ; } return false ; }


long get file part size ( ) { return file part size ; }


processes the contents of an archive ( { @ code zip } , { @ code jar } , or { @ code apk } )

private boolean process archive ( file file ) throws i o exception { zip file zip = new zip file ( file ) ; array list < ? extends zip entry > entries list = collections list ( zip entries ( ) ) ; if ( sort ) { collections sort ( entries list , new comparator < zip entry > ( ) { public int compare ( zip entry a , zip entry b ) { return compare class names ( a get name ( ) , b get name ( ) ) ; } } ) ; } consumer on process archive start ( file ) ; byte array output stream baos = new byte array output stream ( 40000 ) ; byte [ ] buf = new byte [ 20000 ] ; boolean any = false ; for ( zip entry one : entries list ) { final boolean is directory = one is directory ( ) ; string path = one get name ( ) ; if ( filter accept ( path ) ) { final byte [ ] bytes ; if ( ! is directory ) { input stream in = zip get input stream ( one ) ; baos reset ( ) ; int read ; while ( ( read = in read ( buf ) ) ! = - 1 ) { baos write ( buf , 0 , read ) ; } in close ( ) ; bytes = baos to byte array ( ) ; } else { bytes = new byte [ 0 ] ; } any | = consumer process file bytes ( path , one get time ( ) , bytes ) ; } } zip close ( ) ; return any ; }


public set < warning > get warnings ( ) { return this warnings ; }


base type defs without a name should resolve directly to the ghidra basetype instance

public void test anon base type ( ) throws cancelled exception , i o exception , d w a r f exception { debug info entry base d i e = add base type ( null , 4 , d w a r f encoding dw ate signed , cu ) ; import all data types ( ) ; data type base type d t = dwarf d t m get data type ( base d i e get offset ( ) , null ) ; assert true ( base type d t instanceof abstract integer data type ) ; assert true ( ( ( abstract integer data type ) base type d t ) is signed ( ) = = true ) ; }


return the parent document , or null if this is the root document

public document get parent ( ) { return parent ; }


returns the per - package configured runfiles

public static nested set < artifact > compute per package data ( rule context rule context , java toolchain provider toolchain ) { / / do not use streams here as they create excessive garbage nested set builder < artifact > data = nested set builder naive link order ( ) ; for ( java package configuration provider provider : toolchain package configuration ( ) ) { if ( provider matches ( rule context get label ( ) ) ) { data add transitive ( provider data ( ) ) ; } } return data build ( ) ; }


gets the shutdown hook thread if it exists

thread get shutdown hook thread ( ) { return shutdown hook thread ; }


removes the given slot from the slot manager

private void remove slot ( slot i d slot id , exception cause ) { task manager slot slot = slots remove ( slot id ) ; if ( null ! = slot ) { free slots remove ( slot id ) ; if ( slot get state ( ) = = slot state pending ) { / / reject the pending slot request - - > triggering a new allocation attempt reject pending slot request ( slot get assigned slot request ( ) , cause ) ; } allocation i d old allocation id = slot get allocation id ( ) ; if ( old allocation id ! = null ) { fulfilled slot requests remove ( old allocation id ) ; resource actions notify allocation failure ( slot get job id ( ) , old allocation id , cause ) ; } } else { log debug ( " there was no slot registered with slot id { } " , slot id ) ; } }


quick check whether the given { @ link ray } and { @ link bounding box } intersect

static public boolean intersect ray bounds fast ( ray ray , bounding box box ) { return intersect ray bounds fast ( ray , box get center ( tmp 1 ) , box get dimensions ( tmp 2 ) ) ; }


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 " ) ; }


returns an implementation that checks for each fixed interval if there are threads that have invoked { @ link # register ( matcher ) } and not { @ link # unregister ( matcher ) } and have been in this state for longer than the specified max execution interval and then interrupts these threads

static matcher watchdog new instance ( long interval , long max execution time , long supplier relative time supplier , bi consumer < long , runnable > scheduler ) { return new default ( interval , max execution time , relative time supplier , scheduler ) ; }


set the storage policy for this entity ( default = { @ link hdfs constants # block storage policy id unspecified } )

public builder storage policy ( byte storage policy ) { this storage policy = storage policy ; return this ; }


run a service this method is called after { @ link service # start ( ) } the return value becomes the exit code of the launched process if an exception is raised , the policy is : any subset of { @ link org apache hadoop util exit util exit exception } : the exception is passed up unmodified any exception which implements { @ link org apache hadoop util exit code provider } : a new { @ link service launch exception } is created with the exit code and message of the thrown exception ; the thrown exception becomes the cause any other exception : a new { @ link service launch exception } is created with the exit code { @ link launcher exit codes # exit exception thrown } and the message of the original exception ( which becomes the cause )


signals to this supplier that it should asynchronously begin work necessary to provide the return value of { @ link # get }


set the spring task executor to use for executing the listener once a message has been received by the provider default is none , that is , to run in the jms provider ' s own receive thread , blocking the provider ' s receive endpoint while executing the listener specify a task executor for executing the listener in a different thread , rather than blocking the jms provider , usually integrating with an existing thread pool this allows to keep the number of concurrent consumers low ( 1 ) while still processing messages concurrently ( decoupled from receiving ! ) < b > note : specifying a task executor for listener execution affects acknowledgement semantics < b > messages will then always get acknowledged before listener execution , with the underlying session immediately reused for receiving the next message using this in combination with a transacted session or with client acknowledgement will lead to unspecified results ! < b > note : concurrent listener execution via a task executor will lead to concurrent processing of messages that have been received by the same underlying session < b > as a consequence , it is not recommended to use this setting with a { @ link session aware message listener } , at least not if the latter performs actual work on the given session a standard { @ link javax jms message listener } will work fine , in general

public void set task executor ( executor task executor ) { this task executor = task executor ; }


creates a time limiter instance using the given executor service to execute method calls < b > warning : < b > using a bounded executor may be counterproductive ! if the thread pool fills up , any time callers spend waiting for a thread may count toward their time limit , and in this case the call may even time out before the target method is ever invoked

public static simple time limiter create ( executor service executor ) { return new simple time limiter ( executor ) ; }


get the trace parent spans for this packet will always be non - null protected by the d f s output stream data queue lock

public span id [ ] get trace parents ( ) { / / remove duplicates from the array int len = trace parents used ; arrays sort ( trace parents , 0 , len ) ; int i = 0 , j = 0 ; span id prev val = span id invalid ; while ( true ) { if ( i = = len ) { break ; } span id val = trace parents [ i ] ; if ( ! val equals ( prev val ) ) { trace parents [ j ] = val ; j + + ; prev val = val ; } i + + ; } if ( j < trace parents length ) { trace parents = arrays copy of ( trace parents , j ) ; trace parents used = trace parents length ; } return trace parents ; }


variant of { @ link # to entity flux ( class ) } with a { @ link parameterized type reference }

< t > mono < response entity < flux < t > > > to entity flux ( parameterized type reference < t > element type reference ) ;


public list < instance > all i ps ( ) { list < instance > result = new array list < > ( ) ; for ( map entry < string , cluster > entry : cluster map entry set ( ) ) { result add all ( entry get value ( ) all i ps ( ) ) ; } return result ; }


default void on removal ( shard id shard id , string field name , boolean was evicted , long size in bytes ) { }


merge url parameters the order is : override > - d > consumer > provider

private url merge url ( url provider url ) { provider url = cluster utils merge provider url ( provider url , query map ) ; / / merge the consumer side parameters provider url = override with configurator ( provider url ) ; provider url = provider url add parameter ( constants check key , string value of ( false ) ) ; / / do not check whether the connection is successful or not , always create invoker ! if ( ( provider url get path ( ) = = null | | provider url get path ( ) length ( ) = = 0 ) & & dubbo protocol equals ( provider url get protocol ( ) ) ) { / / compatible version 1 0 / / fix by tony chenl dubbo - 44 string path = get consumer url ( ) get parameter ( interface key ) ; if ( path ! = null ) { int i = path index of ( ' / ' ) ; if ( i > = 0 ) { path = path substring ( i + 1 ) ; } i = path last index of ( ' : ' ) ; if ( i > = 0 ) { path = path substring ( 0 , i ) ; } provider url = provider url set path ( path ) ; } } return provider url ; }


the credential name stands for a unique identifier that can be used to identify the server certificate and the private key the credential name appended with suffix " - cacert " is used to identify the ca certificates associated with this server gateway workloads capable of fetching credentials from a remote credential store such as kubernetes secrets , will be configured to retrieve the server certificate and the private key using credential name , instead of using the file system paths specified above if using mutual tls , gateway workload instances will retrieve the ca certificates using credential name - cacert the semantics of the name are platform dependent in kubernetes , the default istio supplied credential server expects the credential name to match the name of the kubernetes secret that holds the server certificate , the private key , and the ca certificate ( if using mutual tls ) set the ` istio meta user sds ` metadata variable in the gateway ' s proxy to enable the dynamic credential fetching feature < code > string credential name = 10 ; < code >

public java lang string get credential name ( ) { java lang object ref = credential name ; if ( ref instanceof java lang string ) { return ( java lang string ) ref ; } else { com google protobuf byte string bs = ( com google protobuf byte string ) ref ; java lang string s = bs to string utf 8 ( ) ; credential name = s ; return s ; } }


public enum string enum get enum string ( ) { return enum string ; }


return the object being encapsulated in the { @ link transferable object }


just like assert false ( b ) , but additionally recording ( using thread record failure ) any assertion failed error thrown , so that the current testcase will fail

public void thread assert false ( boolean b ) { try { assert false ( b ) ; } catch ( assertion failed error t ) { thread record failure ( t ) ; throw t ; } }


returns true if { @ code annotations } contains an instance of { @ code cls }

static boolean is annotation present ( annotation [ ] annotations , class < ? extends annotation > cls ) { for ( annotation annotation : annotations ) { if ( cls is instance ( annotation ) ) { return true ; } } return false ; }


returns the field indices of primary key in the physical columns of this schema ( not include computed columns or metadata columns )

public static int [ ] get primary key indices ( table schema schema ) { if ( schema get primary key ( ) is present ( ) ) { list < string > field names = data type utils flatten to names ( schema to physical row data type ( ) ) ; return schema get primary key ( ) get ( ) get columns ( ) stream ( ) map to int ( field names : : index of ) to array ( ) ; } else { return new int [ 0 ] ; } }


add the specified interface to the list of interfaces to introduce

public void add interface ( class < ? > ifc ) { assert not null ( ifc , " interface must not be null " ) ; if ( ! ifc is interface ( ) ) { throw new illegal argument exception ( " specified class [ " + ifc get name ( ) + " ] must be an interface " ) ; } this interfaces add ( ifc ) ; }


returns the portion of this domain name that is one level beneath the { @ linkplain # is registry suffix ( ) registry suffix } for example , for { @ code x adwords google co uk } it returns { @ code google co uk } , since { @ code co uk } is a registry suffix similarly , for { @ code myblog blogspot com } it returns { @ code blogspot com } , since { @ code com } is a registry suffix if { @ link # is top domain under registry suffix ( ) } is true , the current domain name instance is returned < b > warning : < b > this method should not be used to determine whether a domain is probably the highest level for which cookies may be set use { @ link # is top private domain ( ) } for that purpose

public internet domain name top domain under registry suffix ( ) { if ( is top domain under registry suffix ( ) ) { return this ; } check state ( is under registry suffix ( ) , " not under a registry suffix : % s " , name ) ; return ancestor ( registry suffix index - 1 ) ; }


parses the required attribute as a decimal number , returning its long integer value note , using { @ link long # min value } andor { @ link long # max value } as lower and upper bounds is problematic and should be avoided as the range check will become a no - op and always succeed

public static long parse optional bounded long attr ( element ele , string attr name , long default value , long min value , long max value ) throws number format exception { string value = ele get attribute value ( attr name ) ; if ( value = = null | | value is empty ( ) ) { return default value ; } try { return parse bounded long ( value , min value , max value ) ; } catch ( number format exception nfe ) { throw new number format exception ( " attribute ' " + attr name + " ' bad value : " + nfe get message ( ) + " in " + to string ( ele ) ) ; } }


given a set of features , add to it all the features directly or indirectly implied by any of them , and return it

public static set < feature < ? > > add implied features ( set < feature < ? > > features ) { queue < feature < ? > > queue = new array deque < > ( features ) ; while ( ! queue is empty ( ) ) { feature < ? > feature = queue remove ( ) ; for ( feature < ? > implied : feature get implied features ( ) ) { if ( features add ( implied ) ) { queue add ( implied ) ; } } } return features ; }


same as { @ link runnable # run ( ) } with a possibility of exception in execution


registers an object to be closed when the plugin shuts down

public synchronized void register closeable ( closeable c ) { close set add ( c ) ; }


an outbound message has been passed to the stream this is called as soon as the stream knows about the message , but doesn ' t have further guarantee such as whether the message is serialized or not

public void outbound message ( int seq no ) { }


int argument greater than the given value see examples in javadoc for { @ link additional matchers } class

public static int gt ( int value ) { report matcher ( new greater than < integer > ( value ) ) ; return 0 ; }


checks if a new compressor object is needed for the stream identified by { @ code stream id } this method will modify the { @ code content - encoding } header contained in { @ code headers }

private embedded channel new compressor ( channel handler context ctx , http 2 headers headers , boolean end of stream ) throws http 2 exception { if ( end of stream ) { return null ; } char sequence encoding = headers get ( content encoding ) ; if ( encoding = = null ) { encoding = identity ; } final embedded channel compressor = new content compressor ( ctx , encoding ) ; if ( compressor ! = null ) { char sequence target content encoding = get target content encoding ( encoding ) ; if ( identity content equals ignore case ( target content encoding ) ) { headers remove ( content encoding ) ; } else { headers set ( content encoding , target content encoding ) ; } / / the content length will be for the decompressed data since we will compress the data / / this content - length will not be correct instead of queuing messages or delaying sending / / header frames just remove the content - length header headers remove ( content length ) ; } return compressor ; }


close the { @ link channel } of the { @ link channel promise } and notify the { @ link channel promise } once the operation was complete

void close ( channel promise promise ) ;


is the information in this object sufficiently up to date for valid task assignment decisions to be made using it ?

public boolean is recently refreshed ( ) { return is recently refreshed ( reassignment recheck interval ) ; }


notifies this view updater of a new metric that should be regularly updated

public void notify of added view ( view view ) { synchronized ( lock ) { to add add ( view ) ; } }


specify the quartz { @ link scheduler } instance to operate on if not specified , this accessor will try to retrieve a default { @ link scheduler } bean from the containing application context

public void set scheduler ( scheduler scheduler ) { this scheduler = scheduler ; }


determines whether the given cache can be converted to a local cache by { @ link # to local cache } without throwing an exception

static boolean has local cache ( cache < ? , ? > cache ) { return ( check not null ( cache ) instanceof local loading cache ) ; }


true if this binding requires a view otherwise only a context is needed

public boolean constructor needs view ( ) { return has view bindings ( ) / / | | ( parent binding ! = null & & parent binding constructor needs view ( ) ) ; }


throws the excpetion for when an attempt is made to write past the end of the instance

private static void throw bounds ( ) { throw new index out of bounds exception ( " attempt to write past the end " ) ; }


returns true if the given files exist , are not directories , and contain the same bytes

public static boolean equal ( file file 1 , file file 2 ) throws i o exception { check not null ( file 1 ) ; check not null ( file 2 ) ; if ( file 1 = = file 2 | | file 1 equals ( file 2 ) ) { return true ; } / * * some operating systems may return zero as the length for files denoting system - dependent * entities such as devices or pipes , in which case we must fall back on comparing the bytes * directly * / long len 1 = file 1 length ( ) ; long len 2 = file 2 length ( ) ; if ( len 1 ! = 0 & & len 2 ! = 0 & & len 1 ! = len 2 ) { return false ; } return as byte source ( file 1 ) content equals ( as byte source ( file 2 ) ) ; }


returns an ( unmodifiable , ordered ) collection containing all the declared output files of this rule all implicit output files ( declared in the { @ link rule class } ) are listed first , followed by any explicit files ( declared via the ' outs ' attribute ) additionally both implicit and explicit outputs will retain the relative order in which they were declared this ordering is useful because it is propagated through to the list of targets returned by get outs ( ) and allows targets to access their implicit outputs easily via { @ code get outs ( ) get ( n ) } ( providing that n is less than the number of implicit outputs ) the fact that the relative order of the explicit outputs is also retained is less obviously useful but is still well defined

public collection < output file > get output files ( ) { return output files ; }


returns a representation of { @ code a } as an instance of type { @ code b }

public final b convert ( @ nullable decl a a ) { return corrected do forward ( a ) ; }


returns the default equivalence strategy used to compare and hash keys or values referenced at this strength this strategy will be used unless the user explicitly specifies an alternate strategy

abstract equivalence < object > default equivalence ( ) ;


adds a few essential rules to a builder , such that it is usable but does not contain all the rule classes known to the production environment

public static void add minimal rules ( configured rule class provider builder builder ) { / / todo ( bazel - team ) : see also trimmable test configuration fragments # install fragments and native rules / / for alternative / additional setup consider factoring that one to use this method builder set tools repository ( " @ " ) set runfiles prefix ( " test " ) set prerequisite validator ( new minimal prerequisite validator ( ) ) ; core rules instance init ( builder ) ; builder add configuration options ( core options class ) ; platform rules instance init ( builder ) ; config rules instance init ( builder ) ; }


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


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 ; }


set request config , which can set socket timeout , connect timeout and so on by request

public builder set request config ( request config request config ) { this request config = request config ; return this ; }


this interface handles one task at a time

public void handle task ( task task ) throws interrupted exception { var time = task get time ( ) ; thread sleep ( time ) ; logger info ( " it takes " + time + " milliseconds to finish the task " ) ; task set finished ( ) ; }


adds all the rule classes supported internally within the build tool to the given builder

public static void add standard rules ( configured rule class provider builder builder ) { try { class < ? > provider class = class for name ( test constants test rule class provider ) ; method setup method = provider class get method ( " setup " , configured rule class provider builder class ) ; setup method invoke ( null , builder ) ; } catch ( exception e ) { throw new illegal state exception ( e ) ; } }


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

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


initiate a selection task for the specified selection type

void select ( navigatable action context context , int selection type ) { try { select by flow task task = new select by flow task ( context , selection type ) ; tool execute ( task , 750 ) ; } catch ( invalid input exception e ) { tool set status info ( e get message ( ) , true ) ; } }


public cancellable put calendar async ( put calendar request request , request options options , action listener < put calendar response > listener ) { return rest high level client perform request async and parse entity ( request , m l request converters : : put calendar , options , put calendar response : : from x content , listener , collections empty set ( ) ) ; }


add into the flow address set those addresses we flow to from the specified code unit when flowing forward or the addresses that flow to the code unit when determining flows in the backward direction for data , ensure that those primitive data elements followed are contained within the start addresses

private void get code unit flow ( task monitor monitor , address set start addresses , address set flow address set , code unit code unit , boolean forward ) { if ( code unit instanceof data ) { get indirect code flow ( monitor , start addresses , flow address set , ( data ) code unit , forward ) ; } else if ( code unit instanceof instruction ) { get instruction flow ( monitor , flow address set , ( instruction ) code unit , forward ) ; } }


get the user log directory for the job jobid

public static file get job dir ( job i d jobid ) { return new file ( get user log dir ( ) , jobid to string ( ) ) ; }


public static string local server ( ) { return inet utils get self i p ( ) + i p util ip port spliter + env util get port ( ) ; }


this test verifies that the output is reasonable for a nested query

public void test bool ( ) throws exception { create index ( " test " ) ; ensure green ( ) ; int num docs = random int between ( 100 , 150 ) ; index request builder [ ] docs = new index request builder [ num docs ] ; for ( int i = 0 ; i < num docs ; i + + ) { docs [ i ] = client ( ) prepare index ( " test " ) set id ( string value of ( i ) ) set source ( " field 1 " , english int to english ( i ) , " field 2 " , i ) ; } index random ( true , docs ) ; query builder q = query builders bool query ( ) must ( query builders match query ( " field 1 " , " one " ) ) must ( query builders match query ( " field 1 " , " two " ) ) ; search response resp = client ( ) prepare search ( ) set query ( q ) set profile ( true ) set search type ( search type query then fetch ) get ( ) ; map < string , profile shard result > p = resp get profile results ( ) ; assert not null ( p ) ; assert that ( " profile response should not be an empty array " , resp get profile results ( ) size ( ) , not ( 0 ) ) ; for ( map entry < string , profile shard result > shard result : resp get profile results ( ) entry set ( ) ) { for ( query profile shard result search profiles : shard result get value ( ) get query profile results ( ) ) { for ( profile result result : search profiles get query results ( ) ) { assert equals ( result get query name ( ) , " boolean query " ) ; assert equals ( result get lucene description ( ) , " + field 1 : one + field 1 : two " ) ; assert that ( result get time ( ) , greater than ( 0l ) ) ; assert not null ( result get time breakdown ( ) ) ; assert equals ( result get profiled children ( ) size ( ) , 2 ) ; / / check the children list < profile result > children = result get profiled children ( ) ; assert equals ( children size ( ) , 2 ) ; profile result child profile = children get ( 0 ) ; assert equals ( child profile get query name ( ) , " term query " ) ; assert equals ( child profile get lucene description ( ) , " field 1 : one " ) ; assert that ( child profile get time ( ) , greater than ( 0l ) ) ; assert not null ( child profile get time breakdown ( ) ) ; assert equals ( child profile get profiled children ( ) size ( ) , 0 ) ; child profile = children get ( 1 ) ; assert equals ( child profile get query name ( ) , " term query " ) ; assert equals ( child profile get lucene description ( ) , " field 1 : two " ) ; assert that ( child profile get time ( ) , greater than ( 0l ) ) ; assert not null ( child profile get time breakdown ( ) ) ; } collector result result = search profiles get collector result ( ) ; assert that ( result get name ( ) , is ( not ( empty or null string ( ) ) ) ) ; assert that ( result get time ( ) , greater than ( 0l ) ) ; } } }


public class < v > value type ( ) { return value type ; }


adds display image task to execution pool image will be set to image aware when it ' s turn < br > < b > note : < b > { @ link # init ( image loader configuration ) } method must be called before this method call

public void display image ( string uri , image aware image aware , display image options options , image loading listener listener ) { display image ( uri , image aware , options , listener , null ) ; }


protected model and view handle request internal ( http servlet request request , http servlet response response ) throws exception { assert state ( this servlet instance ! = null , " no servlet instance " ) ; this servlet instance service ( request , response ) ; return null ; }


public e get ( int index ) { e match = null ; if ( first ! = null ) { node < e > c = first ; while ( c n ! = null & & c index < index ) { c = c n ; } if ( c index = = index ) { match = c value ; } } return match ; }


sets the arguments to be passed to the external demangler executable

public void set demangler application arguments ( string args ) { this demangler application arguments = args ; }


request cache updates from the state store for this resolver

private void register cache external ( ) { if ( this state store ! = null ) { this state store register cache external ( this ) ; } }


build an adapted { @ link annotated element } for the given annotations , typically for use with other methods on { @ link annotated element utils }

public static annotated element for annotations ( annotation annotations ) { return new annotated element for annotations ( annotations ) ; }


get the value of the ' { @ code type } ' attribute subclasses can override this to change the type of ' { @ code input } ' element rendered default value is ' { @ code submit } '

protected string get type ( ) { return " submit " ; }


creates a package " a " with a genrule " a " that depends on a target in a created package " b " , and a test rule " a test "

private void create packages ( ) throws i o exception { scratch file ( " a / build " , " genrule ( name = ' a ' , cmd = ' ' , srcs = [ ' / / b : b txt ' ] , outs = [ ' a out ' ] ) " , " sh test ( name = ' a test ' , size = ' small ' , srcs = [ ' a test sh ' ] ) " ) ; scratch file ( " b / build " , " exports files ( [ ' b txt ' ] ) " ) ; }


check all the existing striped data streamer and find newly failed streamers

private set < striped data streamer > check streamers ( ) throws i o exception { set < striped data streamer > new failed = new hash set < > ( ) ; for ( striped data streamer s : streamers ) { if ( ! s is healthy ( ) & & ! failed streamers contains ( s ) ) { new failed add ( s ) ; } } final int fail count = failed streamers size ( ) + new failed size ( ) ; if ( log is debug enabled ( ) ) { log debug ( " check streamers : " + streamers ) ; log debug ( " healthy streamer count = " + ( num all blocks - fail count ) ) ; log debug ( " original failed streamers : " + failed streamers ) ; log debug ( " newly failed streamers : " + new failed ) ; } if ( fail count > ( num all blocks - num data blocks ) ) { close all streamers ( ) ; throw new i o exception ( " failed : the number of failed blocks = " + fail count + " > the number of parity blocks = " + ( num all blocks - num data blocks ) ) ; } return new failed ; }


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


retrieves a fully qualified table if the path is not yet fully qualified use { @ link # qualify identifier ( unresolved identifier ) } first

public optional < table lookup result > get table ( object identifier object identifier ) { preconditions check not null ( schema resolver , " schema resolver should not be null " ) ; catalog base table temporary table = temporary tables get ( object identifier ) ; if ( temporary table ! = null ) { table schema resolved schema = resolve table schema ( temporary table ) ; return optional of ( table lookup result temporary ( temporary table , resolved schema ) ) ; } else { return get permanent table ( object identifier ) ; } }


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


find a suitable parent for a method reference the method owner is not always a valid parent to dispatch to for instance , take the following example : < code > package a ; public class a { public void public method ( ) ; } package a ; class b extends a { public void public method ( ) ; } package b ; public class c extends b { } < code > when instrumenting c , the first method reference for " public method " is on class b which we cannot invoke directly since it ' s present on a private package b which is not located in the same package as c however c can still call the " public method " since it ' s defined on a which is a public class we cannot just blindly take the top most definition of " public method " hoping this is the accessible one since you can very well do : < code > package a ; class a { public void public method ( ) ; } package a ; public class b extends a { public void public method ( ) ; } package b ; public class c extends b { } < code > in that case , the top most parent class is the one defined the unaccessible method reference therefore , the solution is to walk up the hierarchy until we find the same method defined on an accessible class , if we cannot find such a method , the suitable parent is the parent class of the visited class which is legal ( but might consume a dex id )

string find parent class for method ( @ non null method reference method reference ) { logger verbose ( " method ref % 1 $ s access ( % 2 $ s ) - > owner % 3 $ s access ( % 4 $ s ) " , method reference method name , method reference method access , method reference owner name , method reference owner access ) ; / / if the method owner class is accessible from the visited class , just use that if ( is parent class visible ( method reference owner , class node ) ) { return method reference owner name ; } logger verbose ( " found an inaccessible method reference % 1 $ s " , method reference method name ) ; / / walk up the hierarchy , starting at the method reference owner iterator < class node > parent iterator = parent nodes iterator ( ) ; class node parent = parent iterator next ( ) ; while ( ! parent name equals ( method reference owner name ) & & parent iterator has next ( ) ) { parent = parent iterator next ( ) ; } while ( parent iterator has next ( ) ) { class node node = parent iterator next ( ) ; / / check that this parent is visible , there might be several layers of package / / private classes if ( is parent class visible ( node , class node ) ) { / / noinspection unchecked : asm api for ( method node method node : ( list < method node > ) node methods ) { / / do not reference bridge methods , they might not be translated into dex , or / / might disappear in the next javac compiler for that use case if ( method node name equals ( method reference method name ) & & method node desc equals ( method reference method desc ) & & ( method node access & ( opcodes acc bridge | opcodes acc abstract ) ) = = 0 ) { logger verbose ( " using class % 1 $ s for dispatching % 2 $ s : % 3 $ s " , node name , method reference method name , method reference method desc ) ; return node name ; } } } } logger verbose ( " using immediate parent for dispatching % 1 $ s " , method reference method desc ) ; return class node super name ; }


{ @ inherit doc } the default implementation does nothing

@ override public void enter limit clause ( sql base parser limit clause context ctx ) { }


public static < k > atomic long map < k > create ( ) { return new atomic long map < k > ( new concurrent hash map < k , atomic long > ( ) ) ; }


modify register value to eliminate non - flowing bits

public final register value get flow value ( register value value ) { if ( value = = null | | ! has non flowing context | | ! value get register ( ) is processor context ( ) ) { return value ; } return value clear bit values ( non flowing context register mask ) ; }


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


return whether this cache manager accepts and converts { @ code null } values for all of its caches

public boolean is allow null values ( ) { return this allow null values ; }


return the i o exception thrown by the remote server wrapped in service exception as cause

public static i o exception get remote exception ( service exception se ) { throwable e = se get cause ( ) ; if ( e = = null ) { return new i o exception ( se ) ; } return e instanceof i o exception ? ( i o exception ) e : new i o exception ( se ) ; }


creates a new , empty { @ code linked hash multiset } using the default initial capacity

public static < e > linked hash multiset < e > create ( ) { return create ( object count hash map default size ) ; }


kills yarn application and stops yarn client use this method to kill the app before it has been properly deployed

private void fail session during deployment ( yarn client yarn client , yarn client application yarn application ) { log info ( " killing yarn application " ) ; try { yarn client kill application ( yarn application get new application response ( ) get application id ( ) ) ; } catch ( exception e ) { / / we only log a debug message here because the " kill application " call is a best - effort / / call ( we don ' t know if the application has been deployed when the error occurred ) log debug ( " error while killing yarn application " , e ) ; } }


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

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


sort the items accessed through the given indexed sortable over the given range of logical indices from the perspective of the sort algorithm , each index between l ( inclusive ) and r ( exclusive ) is an addressable entry

void sort ( indexed sortable s , int l , int r ) ;


makes dependencies non - transitive gradle allows setting all dependencies as non - transitive very easily sadly this mechanism does not translate into maven pom generation in order to effectively make the pom act as if it has no transitive dependencies , we must exclude each transitive dependency of each direct dependency determining the transitive deps of a dependency which has been resolved as non - transitive is difficult because the process of resolving removes the transitive deps to sidestep this issue , we create a configuration per direct dependency version this specially named and unique configuration will contain all of the transitive dependencies of this particular dependency we can then use this configuration during pom generation to iterate the transitive dependencies and add excludes

public static void configure configurations ( project project ) { / / we want to test compile only deps ! configuration compile only config = project get configurations ( ) get by name ( java plugin compile only configuration name ) ; configuration test implementation config = project get configurations ( ) get by name ( java plugin test implementation configuration name ) ; test implementation config extends from ( compile only config ) ; / / we are not shipping these jars , we act like dumb consumers of these things if ( project get path ( ) starts with ( " : test : fixtures " ) | | project get path ( ) equals ( " : build - tools " ) ) { return ; } / / fail on any conflicting dependency versions project get configurations ( ) all ( configuration - > { if ( configuration get name ( ) ends with ( " fixture " ) ) { / / just a self contained test - fixture configuration , likely transitive and hellacious return ; } configuration resolution strategy ( resolution strategy : : fail on version conflict ) ; } ) ; / / force all dependencies added directly to compile / test implementation to be non - transitive , except for es itself consumer < string > disable transitive deps = config name - > { configuration config = project get configurations ( ) get by name ( config name ) ; config get dependencies ( ) all ( dep - > { if ( dep instanceof module dependency & & dep instanceof project dependency = = false & & dep get group ( ) starts with ( " org elasticsearch " ) = = false ) { ( ( module dependency ) dep ) set transitive ( false ) ; } } ) ; } ; disable transitive deps accept ( java plugin api configuration name ) ; disable transitive deps accept ( java plugin implementation configuration name ) ; disable transitive deps accept ( java plugin compile only configuration name ) ; disable transitive deps accept ( java plugin runtime only configuration name ) ; disable transitive deps accept ( java plugin test implementation configuration name ) ; }


returns the { @ link socks auth scheme } of this { @ link socks init response }

public socks auth scheme auth scheme ( ) { return auth scheme ; }


the time the job was finished or < code > null < code > if not finished

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


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


public static string format ( string str , object args ) { string text = str ; if ( text ! = null ) { if ( args ! = null & & args length > 0 ) { try { text = string format ( str , args ) ; } catch ( illegal format exception e ) { e print stack trace ( ) ; } } } return text ; }


like { @ link # assert one compat rest exact ( string , string , string , long ) , except a context is given

protected void assert one compat rest exact ( string assembly , string instr , string ctxstr , long addr , string disassemblies ) { set < string > disasm = new hash set < > ( arrays as list ( disassemblies ) ) ; run test ( assembly , instr , disasm , addr , ctxstr , true , true , false , false ) ; }


creates a batch of mails that can be taken with { @ link # try take from batch ( ) } the batch does not affect { @ link # try take ( int ) } and { @ link # take ( int ) } ; that is , they return the same mails even if no batch would have been created the default batch is empty thus , this method must be invoked once before { @ link # try take from batch ( ) } if a batch is not completely consumed by { @ link # try take from batch ( ) } , its elements are carried over to the new batch must be called from the mailbox thread ( { @ link # is mailbox thread ( ) }


returns a synchronized ( thread - safe ) table backed by the specified table in order to guarantee serial access , it is critical that < b > all < b > access to the backing table is accomplished through the returned table it is imperative that the user manually synchronize on the returned table when accessing any of its collection views : { @ code table < r , c , v > table = tables synchronized table ( hash based table < r , c , v > create ( ) ) ; map < c , v > row = table row ( row key ) ; needn ' t be in synchronized block synchronized ( table ) { synchronizing on table , not row ! iterator < entry < c , v > > i = row entry set ( ) iterator ( ) ; must be in synchronized block while ( i has next ( ) ) { foo ( i next ( ) ) ; } } } failure to follow this advice may result in non - deterministic behavior the returned table will be serializable if the specified table is serializable

public static < r , c , v > table < r , c , v > synchronized table ( table < r , c , v > table ) { return synchronized table ( table , null ) ; }


callback for { @ link job graph } instances removed by a different { @ link job graph store } instance

void on removed job graph ( job i d job id ) ;


public static image type get image type ( final string file path ) { return get image type ( utils bridge get file by path ( file path ) ) ; }


start reading all the transactions from the given zxid

public txn iterator read ( long zxid ) throws i o exception { return read ( zxid , true ) ; }


sets autoscale restriction for axis min value as enableddisabled

public void set use auto scale min restriction ( boolean is enabled ) { m use auto scale restriction min = is enabled ; }


get one or more delegation tokens associated with the filesystem normally a file system returns a single delegation token a file system that manages multiple file systems underneath , could return set of delegation tokens for all the file systems it manages

public list < token < ? > > get delegation tokens ( string renewer ) throws i o exception { return collections empty list ( ) ; }


returns the configured flink resource implementation , or a { @ link local standalone flink resource } if none is configured

static flink resource get ( ) { return get ( flink resource setup builder ( ) build ( ) ) ; }


method used to determine if or not node descriptors fetching script is configured and whether it is fit to run returns true if following conditions are met : path to the script is not empty the script file exists

protected void verify configured script ( string script path ) throws i o exception { boolean invalid configuration ; if ( script path = = null | | script path trim ( ) is empty ( ) ) { invalid configuration = true ; } else { file f = new file ( script path ) ; invalid configuration = ! f exists ( ) | | ! file util can execute ( f ) ; } if ( invalid configuration ) { throw new i o exception ( " node descriptors provider script \ " " + script path + " \ " is not configured properly please check whether " + " the script path exists , owner and the access rights " + " are suitable for nm process to execute it " ) ; } }


apply alpha of dark for the view ' s background

public static void apply pressed bg dark ( view view , float dark alpha ) { apply pressed bg style ( view , pressed bg dark style , dark alpha ) ; }


public long add cache directive ( cache directive info info , enum set < cache flag > flags ) throws i o exception { statistics increment write ops ( 1 ) ; storage statistics increment op counter ( op type add cache directive ) ; preconditions check not null ( info get path ( ) ) ; path path = new path ( get path name ( fix relative part ( info get path ( ) ) ) ) make qualified ( get uri ( ) , get working directory ( ) ) ; return dfs add cache directive ( new cache directive info builder ( info ) set path ( path ) build ( ) , flags ) ; }


void record metrics ( package identifier pkg id , package metrics metrics ) ;


we will accept the selection in the workbench to see if we can initialize from it

public void init ( i workbench workbench , i structured selection selection ) { }


creates a new instance of the class represented by the supplied class

static public < t > t new instance ( class < t > c ) throws reflection exception { try { return c new instance ( ) ; } catch ( instantiation exception e ) { throw new reflection exception ( " could not instantiate instance of class : " + c get name ( ) , e ) ; } catch ( illegal access exception e ) { throw new reflection exception ( " could not instantiate instance of class : " + c get name ( ) , e ) ; } }


performs the given action for each remaining element in { @ link bulk format reader } until all elements have been processed or the action throws an exception

public static < t > void for each remaining ( final bulk format reader < t > reader , final consumer < ? super t > action ) throws i o exception { bulk format record iterator < t > batch ; record and position < t > record ; try { while ( ( batch = reader read batch ( ) ) ! = null ) { while ( ( record = batch next ( ) ) ! = null ) { action accept ( record get record ( ) ) ; } batch release batch ( ) ; } } finally { reader close ( ) ; } }


extract the relevant elements to work with from the round environment before they ' re passed on to { @ link spec model factory # create ( elements , types , type element , messager , enum set , dependency injection helper , inter stage store ) }

public set < element > extract ( round environment round environment ) { return ( set < element > ) round environment get elements annotated with ( test spec class ) ; }


protected void finalize encode ( final request abstract type authn request , final base s a m l 2 message encoder encoder , final t saml response , final string relay state ) throws exception { encoder initialize ( ) ; encoder encode ( ) ; }


public static void finish all activities ( @ anim res final int enter anim , @ anim res final int exit anim ) { list < activity > activity list = utils bridge get activity list ( ) ; for ( activity act : activity list ) { / / s activity list remove the index activity at on activity destroyed act finish ( ) ; act override pending transition ( enter anim , exit anim ) ; } }


creates a { @ link request indexer } that is able to work with { @ link bulk processor } binary compatible

default request indexer create bulk processor indexer ( bulk processor bulk processor , boolean flush on checkpoint , atomic long num pending requests ref ) { return new pre elasticsearch 6 bulk processor indexer ( bulk processor , flush on checkpoint , num pending requests ref ) ; }


the following methods are customized for the requirement of dubbo ' s rpc protocol implementation legacy protocol implementation will try to write map , throwable and null value directly to the stream , which does not meet the restrictions of all serialization protocols see how protobuf serialization , kryo serialization implemented these methods for more details the binding of rpc protocol and biz serialization protocol is not a good practice encoding of rpc protocol should be highly independent and portable , easy to cross platforms and languages , for example , like the http headers , restricting the content of headers attachments to ascii strings and uses iso 8859 1 to encode them https : tools ietf orghtmlrfc 7 5 4 0 # section - 8 1 2

default throwable read throwable ( ) throws i o exception , class not found exception { object obj = read object ( ) ; if ( ! ( obj instanceof throwable ) ) { throw new i o exception ( " response data error , expect throwable , but get " + obj ) ; } return ( throwable ) obj ; }


{ @ link r m app attempt state # failed }

private void test app attempt failed state ( container container , string diagnostics ) { send attempt update saved event ( application attempt ) ; assert equals ( r m app attempt state failed , application attempt get app attempt state ( ) ) ; assert equals ( diagnostics , application attempt get diagnostics ( ) ) ; assert equals ( 0 , application attempt get just finished containers ( ) size ( ) ) ; assert equals ( container , application attempt get master container ( ) ) ; assert equals ( 0 0 , ( double ) application attempt get progress ( ) , 0 0001 ) ; assert equals ( 0 , application get ran nodes ( ) size ( ) ) ; / / check events verify ( application , times ( 1 ) ) handle ( any ( r m app failed attempt event class ) ) ; verify token count ( application attempt get app attempt id ( ) , 1 ) ; verify attempt final state saved ( ) ; verify application attempt finished ( r m app attempt state failed ) ; }


public void annotate ( exception with context ex ) { ex add context ( " ( locals array set ; primary ) " ) ; primary annotate ( ex ) ; int sz = secondaries size ( ) ; for ( int label = 0 ; label < sz ; label + + ) { locals array la = secondaries get ( label ) ; if ( la ! = null ) { ex add context ( " ( locals array set : primary for caller " + hex u 2 ( label ) + ' ) ' ) ; la get primary ( ) annotate ( ex ) ; } } }


public zip entry with code ( status code ) { this code = code ; return this ; }


reads the object ' s internal data from the given data input view

void read ( data input view in ) throws i o exception ;


converts list of entities to list of d t os

public final list < t > create from entities ( final collection < u > entities ) { return entities stream ( ) map ( this : : convert from entity ) collect ( collectors to list ( ) ) ; }


process an exception generated against the change policy if the exception indicates the file has changed , this method throws { @ code remote file changed exception } with the original exception as the cause

public void process exception ( sdk base exception e , string operation ) throws remote file changed exception { if ( e instanceof amazon service exception ) { amazon service exception service exception = ( amazon service exception ) e ; / / this isn ' t really going to be hit due to / / https : / / github com / aws / aws - sdk - java / issues / 1644 if ( service exception get status code ( ) = = sc precondition failed ) { version mismatches version mismatch error ( ) ; throw new remote file changed exception ( uri , operation , string format ( remote file changed exception preconditions failed + " on % s " + " version % s was unavailable " , get source ( ) , get revision id ( ) ) , service exception ) ; } } }


the private key , as a new byte array generally should be in pkcs # 8 format if encrypted , { @ link # get private key password } is the decryption key if unencrypted , the password will be { @ code null }

public byte [ ] get private key ( ) { return arrays copy of ( private key , private key length ) ; }


public void set orientation ( vector 2 orientation ) { this vals [ cos ] = orientation x ; this vals [ sin ] = orientation y ; }


prints out a note about the gpl if pro guard is linked against unknown code

public static void check ( ) { byte array output stream out = new byte array output stream ( ) ; new exception ( ) print stack trace ( new print stream ( out ) ) ; line number reader reader = new line number reader ( new input stream reader ( new byte array input stream ( out to byte array ( ) ) ) ) ; set unknown package names = unknown package names ( reader ) ; if ( unknown package names size ( ) > 0 ) { string unique package names = unique package names ( unknown package names ) ; system out println ( " pro guard is released under the gnu general public license you therefore " ) ; system out println ( " must ensure that programs that link to it ( " + unique package names + " ) " ) ; system out println ( " carry the gnu general public license as well alternatively , you can " ) ; system out println ( " apply for an exception with the author of pro guard " ) ; } }


public void error ( supplier < ? extends char sequence > message supplier ) { if ( this log is error enabled ( ) ) { this log error ( log message of ( message supplier ) ) ; } }


public void upload file test ( ) { long pet id = null ; string additional metadata = null ; file file = null ; / / model api response response = api upload file ( pet id , additional metadata , file ) ; / / todo : test validations }


{ @ inherit doc } the default implementation returns the result of calling { @ link # visit children } on { @ code ctx }

@ override public t visit newobject ( painless parser newobject context ctx ) { return visit children ( ctx ) ; }


public void deserialize ( record input rin ) throws i o exception { this deserialize ( rin , " " ) ; }


protected synchronized void set start time ( long start time ) { super set start time ( start time ) ; }


in version { @ code # version tokens index introduced } security tokens were moved into a separate index , away from the other entities in the main security index , due to their ephemeral nature they moved " seamlessly " - without manual user intervention in this way , new tokens are created in the new index , while the existing ones were left in place - to be accessed from the old index - and due to be removed automatically by the { @ code expired token remover } periodic job therefore , in general , when searching for a token we need to consider both the new and the old indices

private security index manager get tokens index for version ( version version ) { if ( version on or after ( version tokens index introduced ) ) { return security tokens index ; } else { return security main index ; } }


returns all listeners currently registered modifying this array will result in undefined behaviour

static public array < controller listener > get listeners ( ) { initialize ( ) ; return get manager ( ) get listeners ( ) ; }


files exported from jars are exported into a certain folder so that we can rebuild them when the related jar file changes

private static string get jar file prefix ( @ non null file input file ) { / / get the filename string name = input file get name ( ) ; / / remove the extension int pos = name last index of ( ' ' ) ; if ( pos ! = - 1 ) { name = name substring ( 0 , pos ) ; } / / add a hash of the original file path string input = input file get absolute path ( ) ; hash function hash function = hashing sha 1 ( ) ; hash code hash code = hash function hash string ( input , charsets utf 16le ) ; return name + " - " + hash code to string ( ) ; }


returns the name of the wchar charset in use for pdb processing

public string get wide char charset name ( ) { return two byte charset name ; }


returns the fully qualified metric name , for example { @ code " host - 7 taskmanager - 2 window word count my - mapper metric name " }

string get metric identifier ( string metric name ) ;


mono < entity response < t > > build ( ) ;


add cop instruction for exercising nfctx context ( consumes 2 - bytes ) location will not be added to defined instruction address list

public void add bytes cop instruction ( long offset ) throws memory access exception { add bytes cop instruction ( to hex ( offset ) ) ; }


returns the { @ code float } value of a header with the specified { @ code name } and removes the header from this object if there is more than one value for the specified name , the first value in insertion order is returned in any case all values for { @ code name } are removed if an exception occurs during the translation from type { @ code t } all entries with { @ code name } may still be removed


protected void configure git hub client ( final collection < indirect client > properties ) { val pac 4j properties = cas properties get authn ( ) get pac 4j ( ) ; val github = pac 4j properties get github ( ) ; if ( github is enabled ( ) & & string utils is not blank ( github get id ( ) ) & & string utils is not blank ( github get secret ( ) ) ) { val client = new git hub client ( github get id ( ) , github get secret ( ) ) ; configure client ( client , github ) ; if ( string utils is not blank ( github get scope ( ) ) ) { client set scope ( github get scope ( ) ) ; } logger debug ( " created client [ { } ] with identifier [ { } ] " , client get name ( ) , client get key ( ) ) ; properties add ( client ) ; } }


this is a regression test for antlrantlr 4 # 500 " array index out of bounds " https : github comantlrantlr 4issues 5 0 0

@ test public void test token named e o f ( ) { string grammar = " lexer grammar a ; \ n " + " ws : ' ' ; \ n " + " eof : ' a ' ; \ n " ; string expected = " error ( " + error type reserved rule name code + " ) : a g 4 : 3 : 1 : cannot declare a rule with reserved name eof \ n " ; string [ ] pair = new string [ ] { grammar , expected } ; super test errors ( pair , true ) ; }


removes the element at the given index and swaps it with the last available element

public void remove element ( int index ) { int last = size - 1 ; / / swap for ( channel stride array : arrays ) { stride array swap ( index , last ) ; } size = last ; }


adds the specified value to the specified element of this big array

public void add ( long index , int value ) { array [ segment ( index ) ] [ offset ( index ) ] + = value ; }


helper method which unrolls a generic multibucket agg prefer to use the other overload as a consumer of the api

private static < a extends internal multi bucket aggregation < a , b > , b extends internal bucket , t extends internal multi bucket aggregation < a , b > > internal aggregation unroll multi bucket ( t source , t original , t current tree , tri function < internal bucket , long , internal aggregations , b > bucket factory ) { map < object , internal bucket > original keys = new hash map < > ( ) ; map < object , internal bucket > current keys = new hash map < > ( ) ; if ( original ! = null ) { original get buckets ( ) for each ( b - > original keys put ( b get key ( ) , b ) ) ; } if ( current tree ! = null ) { current tree get buckets ( ) for each ( b - > current keys put ( b get key ( ) , b ) ) ; } / / iterate over the buckets in the multibucket list < b > buckets = source get buckets ( ) stream ( ) filter ( b - > original keys contains key ( b get key ( ) ) = = false ) / / if the original has this key , ignore the rolled version map ( bucket - > { / / grab the value from the count agg ( if it exists ) , which represents this bucket ' s doc count long bucket count = get agg count ( source , bucket get aggregations ( ) get as map ( ) ) ; / / don ' t generate buckets if the doc count is zero if ( bucket count = = 0 ) { return null ; } / / current , partially merged tree contains this key defer to the existing doc count if it is non - zero if ( current keys contains key ( bucket get key ( ) ) & & current keys get ( bucket get key ( ) ) get doc count ( ) ! = 0 ) { / / unlike above where we return null if doc count is zero , we return a doc count : 0 bucket / / here because it may have sub - aggs that need merging , whereas above the bucket was just empty / null bucket count = 0 ; } / / then iterate over the sub aggs in the bucket internal aggregations sub aggs = unroll sub aggs from multi ( bucket , original keys get ( bucket get key ( ) ) , current keys get ( bucket get key ( ) ) ) ; return bucket factory apply ( bucket , bucket count , sub aggs ) ; } ) filter ( objects : : non null ) collect ( collectors to list ( ) ) ; return source create ( buckets ) ; }


void set listener ( binding listener binding listener ) ;


returns the oem identifier ( for e oeminfo )

public short e oemid ( ) { return e oemid ; }


gets the plugin object from its short name this allows url { @ code hudsonplugin i d } to be served by the views of the plugin class

public plugin get plugin ( string short name ) { plugin wrapper p = plugin manager get plugin ( short name ) ; if ( p = = null ) return null ; return p get plugin ( ) ; }