get the v0 indexed - file - system instance file system storage should first be pre - qualified as an having indexed storage using the { @ link # is indexed ( string ) } method

static indexed local file system get file system ( string root path , boolean is versioned , boolean read only , boolean enable asyncronous dispatching ) throws i o exception { try { return new indexed local file system ( root path , is versioned , read only , enable asyncronous dispatching , false ) ; } catch ( index read exception e ) { if ( read only ) { throw e ; / / don ' t attempt repair if read - only } msg error ( local file system class , " indexed filesystem error : " + e get message ( ) ) ; msg info ( local file system class , " attempting index rebuild : " + root path ) ; if ( ! indexed local file system rebuild ( new file ( root path ) ) ) { throw e ; } / / retry after index rebuild return new indexed local file system ( root path , is versioned , read only , enable asyncronous dispatching , false ) ; } }


to test special tags to test special tags and operation id starting with number

public void call 1 2 3test special tags test ( ) { client body = null ; client response = api call 1 2 3test special tags ( body ) ; / / todo : test validations }


public void show error ( ) { show error ( false ) ; }


generates an array of random bytes with the specified length

private static byte [ ] build test data ( int length , int seed ) { byte [ ] source = new byte [ length ] ; new random ( seed ) next bytes ( source ) ; return source ; }


public datanode registration get d n registration for b p ( string bpid ) throws i o exception { data node fault injector get ( ) no registration ( ) ; b p offer service bpos = block pool manager get ( bpid ) ; if ( bpos = = null | | bpos bp registration = = null ) { throw new i o exception ( " cannot find b p offer service for bpid = " + bpid ) ; } return bpos bp registration ; }


the size of the serialized , uncompressed value in bytes if value is null , the returned size is - 1

public int serialized value size ( ) { return this serialized value size ; }


returns the packed width considering the { @ link # rotate } value , if it is true then it returns the packed height , otherwise it returns the packed width

public float get rotated packed width ( ) { return rotate ? packed height : packed width ; }


call this to transfer the services between two { @ link section } with the same global scope

protected void transfer service ( section context c , section old section , section new section ) { }


tests to check number of bytes failed to upload in { @ link abfs output stream }

public void test abfs output stream bytes failed ( ) { describe ( " testing number of bytes failed during upload in abfs output steam " ) ; abfs output stream statistics impl abfs output stream statistics = new abfs output stream statistics impl ( ) ; / / test for zero bytes uploaded assert equals ( " mismatch in number of bytes failed to upload " , 0 , abfs output stream statistics get bytes upload failed ( ) ) ; / / populating small random value for bytes failed int random bytes failed = new random ( ) next int ( low range for random value ) ; abfs output stream statistics upload failed ( random bytes failed ) ; / / test for bytes failed to upload assert equals ( " mismatch in number of bytes failed to upload " , random bytes failed , abfs output stream statistics get bytes upload failed ( ) ) ; / / reset statistics for the next test abfs output stream statistics = new abfs output stream statistics impl ( ) ; / * * entering multiple random values for bytes failed to check correct * summation of values * / int expected bytes failed = 0 ; for ( int i = 0 ; i < operations ; i + + ) { random bytes failed = new random ( ) next int ( high range for random value ) ; abfs output stream statistics upload failed ( random bytes failed ) ; expected bytes failed + = random bytes failed ; } / / test for bytes failed to upload assert equals ( " mismatch in number of bytes failed to upload " , expected bytes failed , abfs output stream statistics get bytes upload failed ( ) ) ; }


performs the load , returning on completion or cancellation


try to determine the persistence unit root url based on the given " default persistence unit root location "

private url determine default persistence unit root url ( ) { if ( this default persistence unit root location = = null ) { return null ; } try { url url = this resource pattern resolver get resource ( this default persistence unit root location ) get u r l ( ) ; return ( resource utils is jar u r l ( url ) ? resource utils extract jar file u r l ( url ) : url ) ; } catch ( i o exception ex ) { throw new persistence exception ( " unable to resolve persistence unit root url " , ex ) ; } }


gets the stream if it exists if not , returns { @ code null }

http 2 stream stream ( int stream id ) ;


wrap the supplied { @ link statement } with a { @ code run after test method callbacks } statement

private statement with after test method callbacks ( statement next , method test method , object test instance , test context manager test context manager ) { return new run after test method callbacks ( next , test instance , test method , test context manager ) ; }


public static bitmap get bitmap ( @ non null final string key , final bitmap default value , @ non null final cache disk utils cache disk utils ) { return cache disk utils get bitmap ( key , default value ) ; } / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / about drawable / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /


provides the list of this plugin ' s custom thread pools , empty if none

public list < executor builder < ? > > get executor builders ( settings settings ) { return collections empty list ( ) ; }


public void array of string test ( ) { / / todo : test array of string }


called when the playback parameters changed

default void on playback parameters changed ( event time event time , playback parameters playback parameters ) { }


get any decoded identifier from the bound dt ; empty if not bound

public optional < abstract s 3 a token identifier > get decoded identifier ( ) { return decoded identifier ; }


collect transitions from layout time , mount time and from state updates

static void collect all transitions ( final extension state < transitions extension state > extension state , transitions extension input input ) { final transitions extension state state = extension state get state ( ) ; assert main thread ( ) ; if ( state m transitions has been collected ) { return ; } final array list < transition > all transitions = new array list < > ( ) ; if ( input get transitions ( ) ! = null ) { all transitions add all ( input get transitions ( ) ) ; } transitions extension collect mount time transitions ( input , all transitions ) ; transition root bounds transition root width transition = new transition root bounds transition ( ) ; transition root bounds transition root height transition = new transition root bounds transition ( ) ; final transition id root transition id = input get root transition id ( ) ; if ( root transition id ! = null ) { for ( int i = 0 , size = all transitions size ( ) ; i < size ; i + + ) { final transition transition = all transitions get ( i ) ; if ( transition = = null ) { throw new illegal state exception ( " null transition when collecting root bounds anim root : " + input get root name ( ) + " , root transition id : " + root transition id ) ; } transition utils collect root bounds transitions ( root transition id , transition , animated properties width , root width transition ) ; transition utils collect root bounds transitions ( root transition id , transition , animated properties height , root height transition ) ; } } root width transition = root width transition has transition ? root width transition : null ; root height transition = root height transition has transition ? root height transition : null ; input set initial root bounds for animation ( root width transition , root height transition ) ; state m root transition = transition manager get root transition ( all transitions ) ; state m transitions has been collected = true ; }


returns the hostname of the syslog server

public string get host ( ) { return host ; }


determine if the supplied { @ link parameter } can potentially be autowired from an { @ link autowire capable bean factory } returns { @ code true } if the supplied parameter is annotated or meta - annotated with { @ link autowired @ autowired } , { @ link qualifier @ qualifier } , or { @ link value @ value } note that { @ link # resolve dependency } may still be able to resolve the dependency for the supplied parameter even if this method returns { @ code false }

public static boolean is autowirable ( parameter parameter , int parameter index ) { assert not null ( parameter , " parameter must not be null " ) ; annotated element annotated parameter = get effective annotated parameter ( parameter , parameter index ) ; return ( annotated element utils has annotation ( annotated parameter , autowired class ) | | annotated element utils has annotation ( annotated parameter , qualifier class ) | | annotated element utils has annotation ( annotated parameter , value class ) ) ; }


obtains the type of the field in the index position

class < ? > get field type at ( int index ) ;


return the value or { @ code null } if it has been reclaimed by the garbage collector


initialize the bodies , anchors , lengths , max lengths , and ratio using the world anchors

public void initialize ( body b 1 , body b 2 , vec 2 ga 1 , vec 2 ga 2 , vec 2 anchor 1 , vec 2 anchor 2 , float r ) { body a = b 1 ; body b = b 2 ; ground anchor a = ga 1 ; ground anchor b = ga 2 ; local anchor a = body a get local point ( anchor 1 ) ; local anchor b = body b get local point ( anchor 2 ) ; vec 2 d 1 = anchor 1 sub ( ga 1 ) ; length a = d 1 length ( ) ; vec 2 d 2 = anchor 2 sub ( ga 2 ) ; length b = d 2 length ( ) ; ratio = r ; assert ( ratio > settings epsilon ) ; }


given a list of [ flag name , flag value ] pairs for native blaze flags , returns true if flag name = = flag value for every item in the list under this configuration , false otherwise this also sets { @ code required fragment options } to the { @ link fragment options } that options read by this { @ code config setting } belong to

private static boolean matches config ( collection < map entry < string , string > > expected settings , transitive option details options , immutable set builder < string > required fragment options , rule context rule context ) { / / rather than returning fast when we find a mismatch , continue looking at the other flags / / to check they ' re indeed valid flag specifications boolean found mismatch = false ; for ( map entry < string , string > setting : expected settings ) { string option name = setting get key ( ) ; string expected raw value = setting get value ( ) ; class < ? extends fragment options > option class = options get option class ( option name ) ; if ( option class = = null ) { rule context attribute error ( config setting rule settings attribute , string format ( parse error message + " unknown option : ' % s ' " , option name ) ) ; found mismatch = true ; continue ; } if ( option name equals ( " define " ) ) { / / - - define is more like user - defined build flags than traditional native flags report it / / like user - defined flags : the dependency is directly on the flag vs the fragment that / / contains the flag this frees a rule that depends on " - - define a = 1 " from preserving / / another rule ' s dependency on " - - define b = 2 " in other words , if both rules simply said / / " i require core options " ( which is the fragment options - - define belongs to ) , that would / / hide the reality that they really have orthogonal dependencies : removing / / " - - define b = 2 " is perfectly safe for the rule that needs " - - define a = 1 " int equals index = expected raw value index of ( ' = ' ) ; required fragment options add ( " - - define : " + ( equals index > 0 ? expected raw value substring ( 0 , equals index ) : expected raw value ) ) ; } else { / / for other native flags , it ' s reasonable to report the fragment they belong to required fragment options add ( class name get simple name with outer ( option class ) ) ; } select restriction select restriction = options get select restriction ( option name ) ; if ( select restriction ! = null ) { boolean under tools package = is under tools package ( rule context get rule ( ) get label ( ) , get tools repository ( rule context ) ) ; if ( ! ( select restriction is visible within tools package ( ) & & under tools package ) ) { string error message = string format ( " option ' % s ' cannot be used in a config setting " , option name ) ; if ( select restriction is visible within tools package ( ) ) { error message + = string format ( " ( it is allowlisted to % s / / tools / only ) " , get tools repository ( rule context ) get default canonical form ( ) ) ; } if ( select restriction get error message ( ) ! = null ) { error message + = " " + select restriction get error message ( ) ; } rule context attribute error ( config setting rule settings attribute , error message ) ; found mismatch = true ; continue ; } } options parser parser ; try { parser = options parser builder ( ) options classes ( option class ) build ( ) ; parser parse ( " - - " + option name + " = " + expected raw value ) ; } catch ( options parsing exception ex ) { rule context attribute error ( config setting rule settings attribute , parse error message + ex get message ( ) ) ; found mismatch = true ; continue ; } object expected parsed value = parser get options ( option class ) as map ( ) get ( option name ) ; if ( ! option matches ( options , option name , expected parsed value ) ) { found mismatch = true ; } } return ! found mismatch ; }


gets the matrix that transforms image - absolute coordinates to view - absolute coordinates the zoomable transformation is taken into account internal matrix is exposed for performance reasons and is not to be modified by the callers

public matrix get transform ( ) { return m active transform ; }


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


get a configuration which a small blocksize reported to callers

public configuration get conf ( ) { configuration conf = super get conf ( ) ; / * * set to 4kb * / conf set int ( swift protocol constants swift blocksize , swift read blocksize ) ; return conf ; }


when disabled , the data andor highlights will not be clipped to content rect disabling this option can be useful , when the data lies fully within the content rect , but is drawn in such a way ( such as thick lines ) that there is unwanted clipping

public boolean is clip data to content enabled ( ) { return m clip data to content ; }


return the number of corrupted replicas of the given block

public int corrupt block on data nodes ( extended block block ) throws i o exception { return corrupt block on data nodes helper ( block , false ) ; }


returns the local variable listing string for a single register spec

public static string local string ( register spec spec ) { return spec reg string ( ) + ' ' + spec get local item ( ) to string ( ) + " : " + spec get type bearer ( ) to human ( ) ; }


public scan info volume report call ( ) throws i o exception { string [ ] bp list = volume get block pool list ( ) ; scan info volume report result = new scan info volume report ( volume , arrays as list ( bp list ) ) ; perf timer start ( ) ; throttle timer start ( ) ; for ( string bpid : bp list ) { list < scan info > report = new array list < > ( default map size ) ; perf timer reset ( ) start ( ) ; throttle timer reset ( ) start ( ) ; try { / / scan infos are added directly to ' report ' list volume compile report ( bpid , report , this ) ; result add all ( bpid , report ) ; } catch ( interrupted exception ex ) { / / exit quickly and flag the scanner to do the same result = null ; break ; } } log trace ( " scanner volume report : { } " , result ) ; return result ; }


from a possibly null long value , return a valid readahead

public static long validate readahead ( @ nullable long readahead ) { if ( readahead = = null ) { return constants default readahead range ; } else { preconditions check argument ( readahead > = 0 , e negative readahead value ) ; return readahead ; } }


same to { @ link # request ( message , request callback , long ) } with target message selector specified

public void request ( final message msg , final message queue selector selector , final object arg , final request callback request callback , final long timeout ) throws m q client exception , remoting exception , interrupted exception , m q broker exception { msg set topic ( with namespace ( msg get topic ( ) ) ) ; this default m q producer impl request ( msg , selector , arg , request callback , timeout ) ; }


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


register a field error for the specified field of the current object ( respecting the current nested path , if any ) , using the given error description the field name may be { @ code null } or empty string to indicate the current object itself rather than a field of it this may result in a corresponding field error within the nested object graph or a global error if the current object is the top object

void reject value ( @ nullable string field , string error code , string default message ) ;


the name of the resource ( in the form package : typename ) < code > optional string resource name = 1 ; < code >

private void clear resource name ( ) { bit field 0 = ( bit field 0 & ~ 0x 0 0 0 0 0 0 0 1 ) ; resource name = get default instance ( ) get resource name ( ) ; }


reader and writer have the same fields checks that fields are read in correctly

public void test values are read in correctly ( ) throws i o exception { list < string > reader fields = new array list < > ( arrays as list ( " field a " , " field b " , " field c " ) ) ; list < string > writer fields = new array list < > ( arrays as list ( " field a " , " field b " , " field c " ) ) ; list < string > writer data = new array list < > ( arrays as list ( " field a value " , " field b value " , " field c value " ) ) ; type reader type = get type ( reader fields ) ; type writer type = get type ( writer fields ) ; write ( temp file , writer type , writer data ) ; row block read block = read ( temp file , reader type ) ; list actual = ( list ) reader type get object value ( session get sql function properties ( ) , read block , 0 ) ; assert equals ( actual size ( ) , reader fields size ( ) ) ; assert equals ( actual get ( 0 ) , " field a value " ) ; assert equals ( actual get ( 1 ) , " field b value " ) ; assert equals ( actual get ( 2 ) , " field c value " ) ; }


constant time equality check of strings to avoid potential timing attacks

public static boolean constant time equals ( string a , string b ) { objects require non null ( a , " strings must not be null for constant time equals " ) ; objects require non null ( b , " strings must not be null for constant time equals " ) ; if ( a length ( ) ! = b length ( ) ) { return false ; } int equals = 0 ; for ( int i = 0 ; i < a length ( ) ; i + + ) { equals | = a char at ( i ) ^ b char at ( i ) ; } return equals = = 0 ; }


must be used with { @ code start activity for result }

public static @ non null intent get sms role intent ( @ non null context context ) { if ( build version sdk int > = 29 ) { role manager role manager = context compat get system service ( context , role manager class ) ; return role manager create request role intent ( role manager role sms ) ; } else { intent intent = new intent ( telephony sms intents action change default ) ; intent put extra ( telephony sms intents extra package name , context get package name ( ) ) ; return intent ; } }


removes the first occurrence of the specified element from this deque if the deque does not contain the element , it is unchanged more formally , removes the first element { @ code e } such that { @ code o equals ( e ) } ( if such an element exists ) returns { @ code true } if this deque contained the specified element ( or equivalently , if this deque changed as a result of the call ) < p > this method is equivalent to { @ link # remove first occurrence ( object ) remove first occurrence }

public boolean remove ( object o ) { return remove first occurrence ( o ) ; }


get the start index start index in inclusive

long get start index ( ) { return start index ; }


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


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


public void set sql datetime sub ( int sql datetime sub ) { this sql datetime sub = sql datetime sub ; }


returns true if a vary header contains an asterisk such responses cannot be cached

public boolean has vary all ( ) { return vary fields contains ( " * " ) ; }


this tests task executor receive submit task before offer slot response

public void test submit task before accept slot ( ) throws exception { final instance i d registration id = new instance i d ( ) ; final one shot latch task executor is registered = new one shot latch ( ) ; final completable future < tuple 3 < instance i d , slot i d , allocation i d > > available slot future = new completable future < > ( ) ; final testing resource manager gateway resource manager gateway = create rm with tm register and notify slot hooks ( registration id , task executor is registered , available slot future ) ; final allocation i d allocation id 1 = new allocation i d ( ) ; final allocation i d allocation id 2 = new allocation i d ( ) ; final slot offer offer 1 = new slot offer ( allocation id 1 , 0 , resource profile any ) ; final one shot latch offer slots latch = new one shot latch ( ) ; final one shot latch task in terminal state = new one shot latch ( ) ; final completable future < collection < slot offer > > offer result future = new completable future < > ( ) ; final testing job master gateway job master gateway = create job master with slot offer and task termination hooks ( offer slots latch , task in terminal state , offer result future ) ; rpc register gateway ( resource manager gateway get address ( ) , resource manager gateway ) ; rpc register gateway ( job master gateway get address ( ) , job master gateway ) ; final task slot table < task > task slot table = task slot utils create task slot table ( 2 ) ; final task manager services task manager services = create task manager services with task slot table ( task slot table ) ; final testing task executor task manager = create testing task executor ( task manager services ) ; try { task manager start ( ) ; task manager wait until started ( ) ; final task executor gateway tm gateway = task manager get self gateway ( task executor gateway class ) ; / / wait until registered at the rm task executor is registered await ( ) ; / / request 2 slots for the given allocation ids request slots ( tm gateway , arrays as list ( allocation id 1 , allocation id 2 ) , resource manager gateway get fencing token ( ) , job master gateway get address ( ) ) ; / / notify job leader to start slot offering job manager leader retriever notify listener ( job master gateway get address ( ) , job master gateway get fencing token ( ) to u u i d ( ) ) ; / / wait until slots have been offered offer slots latch await ( ) ; submit no op invokable task ( allocation id 1 , job master gateway , tm gateway ) ; / / acknowledge the offered slots offer result future complete ( collections singleton ( offer 1 ) ) ; / / check that the rejected slot will be made available again final tuple 3 < instance i d , slot i d , allocation i d > instance i d slot i d allocation i d tuple 3 = available slot future get ( ) ; assert that ( instance i d slot i d allocation i d tuple 3 f 2 , equal to ( allocation id 2 ) ) ; / / wait for the task completion task in terminal state await ( ) ; } finally { rpc utils terminate rpc endpoint ( task manager , timeout ) ; } }


public void acquire lock test ( branch session branch session ) throws exception { boolean result = lock manager acquire lock ( branch session ) ; assertions assert true ( result ) ; branch session unlock ( ) ; }


test that drawable mount items are laid out in the correct positions for ltr and rtl layout directions

public void test drawable children layout direction ( ) { final simple mount spec tester child 1 = simple mount spec tester create ( m context ) build ( ) ; final simple mount spec tester child 2 = simple mount spec tester create ( m context ) build ( ) ; final litho view litho view = mount component ( m context , new inline layout spec ( ) { @ override protected component on create layout ( component context c ) { return row create ( c ) layout direction ( ltr ) child ( wrapper create ( c ) delegate ( child 1 ) width px ( 10 ) height px ( 10 ) ) child ( wrapper create ( c ) delegate ( child 2 ) width px ( 10 ) height px ( 10 ) ) build ( ) ; } } , 20 , 10 ) ; drawable drawable 1 = litho view get drawables ( ) get ( 0 ) ; drawable drawable 2 = litho view get drawables ( ) get ( 1 ) ; assert that ( drawable 1 get bounds ( ) ) is equal to ( new rect ( 0 , 0 , 10 , 10 ) ) ; assert that ( drawable 2 get bounds ( ) ) is equal to ( new rect ( 10 , 0 , 20 , 10 ) ) ; mount component ( m context , litho view , new inline layout spec ( ) { @ override protected component on create layout ( component context c ) { return row create ( c ) layout direction ( rtl ) child ( wrapper create ( c ) delegate ( child 1 ) width px ( 10 ) height px ( 10 ) ) child ( wrapper create ( c ) delegate ( child 2 ) width px ( 10 ) height px ( 10 ) ) build ( ) ; } } , 20 , 10 ) ; drawable 1 = litho view get drawables ( ) get ( 0 ) ; drawable 2 = litho view get drawables ( ) get ( 1 ) ; assert that ( drawable 1 get bounds ( ) ) is equal to ( new rect ( 10 , 0 , 20 , 10 ) ) ; assert that ( drawable 2 get bounds ( ) ) is equal to ( new rect ( 0 , 0 , 10 , 10 ) ) ; }


public static double read double ( byte [ ] bytes , int start ) { return double long bits to double ( read long ( bytes , start ) ) ; }


public pet get pet by id ( long pet id ) throws api exception { return get pet by id with http info ( pet id ) get data ( ) ; }


writes string value of enum to data output

public static void write enum ( data output out , enum < ? > enum val ) throws i o exception { text write string ( out , enum val name ( ) ) ; }


public void multi ( iterable < op > ops , multi callback cb , object ctx ) { list < op result > results = validate path ( ops ) ; if ( results size ( ) > 0 ) { cb process result ( keeper exception code badarguments int value ( ) , null , ctx , results ) ; return ; } multi internal ( generate multi transaction ( ops ) , cb , ctx ) ; }


returns the dash path effect that is set for axis line

public dash path effect get axis line dash path effect ( ) { return m axis line dash path effect ; }


returns an immutable multimap containing the specified entries the returned multimap iterates over keys in the order they were first encountered in the input , and the values for each key are iterated in the order they were encountered

public static < k , v > immutable multimap < k , v > copy of ( iterable < ? extends entry < ? extends k , ? extends v > > entries ) { return immutable list multimap copy of ( entries ) ; }


tests that the settings are actually serializable

public void test is java serializable ( ) throws exception { job checkpointing settings settings = new job checkpointing settings ( arrays as list ( new job vertex i d ( ) , new job vertex i d ( ) ) , arrays as list ( new job vertex i d ( ) , new job vertex i d ( ) ) , arrays as list ( new job vertex i d ( ) , new job vertex i d ( ) ) , new checkpoint coordinator configuration ( 1231231 , 1231 , 112 , 12 , checkpoint retention policy retain on failure , false , false , false , 0 ) , new serialized value < > ( new memory state backend ( ) ) ) ; job checkpointing settings copy = common test utils create copy serializable ( settings ) ; assert equals ( settings get vertices to acknowledge ( ) , copy get vertices to acknowledge ( ) ) ; assert equals ( settings get vertices to confirm ( ) , copy get vertices to confirm ( ) ) ; assert equals ( settings get vertices to trigger ( ) , copy get vertices to trigger ( ) ) ; assert equals ( settings get checkpoint coordinator configuration ( ) , copy get checkpoint coordinator configuration ( ) ) ; assert not null ( copy get default state backend ( ) ) ; assert true ( copy get default state backend ( ) deserialize value ( this get class ( ) get class loader ( ) ) get class ( ) = = memory state backend class ) ; }


public static void refresh super user groups configuration ( ) { / / load server side configuration ; refresh super user groups configuration ( new configuration ( ) ) ; }


returns a formated output line based on the given format mask , file status and file name

private string format line atime ( string line format ) { return string format ( line format , ( is dir ( ) ? " d " : " - " ) , get permission ( ) , ( is file ( ) ? get replication ( ) : " - " ) , get owner ( ) , get group ( ) , string value of ( get length ( ) ) , date format format ( new date ( get atime ( ) ) ) , get pathname ( ) ) ; }


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


uses an editor to update a field nested in an object path with the value of a flipper dynamic if no editor is available then it returns null the path as defined by flipper starts with either " props " or " state " followed by the call chain into the object fields retain their name , positions in an array use their index

public static @ nullable boolean update component ( string [ ] path , field field , object o , final @ nullable set data operations flipper value hint hint , flipper dynamic dynamic ) { editor value edit = parse editor value ( hint , dynamic ) ; / / strip props / state with - 1 and the field name with > 1 for ( int i = path length - 1 ; i > 1 ; i - - ) { hash map < string , editor value > content = new hash map < > ( ) ; content put ( path [ i ] , edit ) ; edit = editor value shape ( content ) ; } return editor registry write ( field get type ( ) , field , o , edit ) ; }


this interface will be removed in a future release

public json node get cluster states ( ) { return jackson utils transfer to json node ( service manager get my self cluster state ( ) ) ; }


verify boot fails with a metrics provider with fails to start

public void test faulty metrics provider on start ( ) throws exception { client base setup test env ( ) ; / / setup the logger to capture all logs byte array output stream os = new byte array output stream ( ) ; writer appender appender = get console appender ( os , level warn ) ; logger qlogger = logger get logger ( " org apache zookeeper server quorum " ) ; qlogger add appender ( appender ) ; try { final int client port qp1 = port assignment unique ( ) ; string quorum cfg section = " server 1 = 127 0 0 1 : " + port assignment unique ( ) + " : " + port assignment unique ( ) + " ; " + client port qp1 + " \ n " + " server 2 = 127 0 0 1 : " + port assignment unique ( ) + " : " + port assignment unique ( ) + " ; " + client port qp1 + " \ n " + " metrics provider class name = " + base test metrics provider metrics provider with error in start class get name ( ) + " \ n " ; main thread q 1 = new main thread ( 1 , client port qp1 , quorum cfg section ) ; q 1 start ( ) ; boolean isup = client base wait for server up ( " 127 0 0 1 : " + client port qp1 , 5000 ) ; assert false ( isup , " server never came up " ) ; q 1 shutdown ( ) ; assert true ( client base wait for server down ( " 127 0 0 1 : " + client port qp1 , client base connection timeout ) , " waiting for server 1 down " ) ; } finally { qlogger remove appender ( appender ) ; } line number reader r = new line number reader ( new string reader ( os to string ( ) ) ) ; string line ; boolean found = false ; pattern p = pattern compile ( " * metrics provider life cycle exception * " ) ; while ( ( line = r read line ( ) ) ! = null ) { found = p matcher ( line ) matches ( ) ; if ( found ) { break ; } } assert true ( found , " complains about metrics provider metrics provider life cycle exception " ) ; }


record a value at a known time this method is slightly faster than { @ link # record ( double ) } since it will reuse the time stamp

public void record ( double value , long time ms ) { if ( should record ( ) ) { record internal ( value , time ms , true ) ; } }


the boost of the query it should typically be incorporated into the score as a multiplicative factor

public float get boost ( ) { return boost ; }


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

static < k , v > constant loader < k , v > constant loader ( @ nullable decl v constant ) { return new constant loader < > ( constant ) ; }


check if access should be allowed user i d is not checked if null this method doesn ' t check if token password is correct it should be used only when token password has already been verified ( e g , in the rpc layer ) some places need to check the access using storage types and for other places the storage types is not relevant

public void check access ( block token identifier id , string user id , extended block block , block token identifier access mode mode , storage type [ ] storage types ) throws invalid token { check access ( id , user id , block , mode ) ; if ( array utils is not empty ( storage types ) ) { check access ( id get storage types ( ) , storage types , " storage types " ) ; } }


< code > replace function var args < code > changes whether the function has var args in program 1 if it doesn ' t match the use of var args in the function in program 2 at the specified entry point address

public void replace function var args ( address entry 2 , task monitor monitor ) { address entry = origin to result translator get address ( entry 2 ) ; function f 1 = result program get function manager ( ) get function at ( entry ) ; function f 2 = origin program get function manager ( ) get function at ( entry 2 ) ; if ( f 1 ! = null & & f 2 ! = null ) { boolean has var args 1 = f 1 has var args ( ) ; boolean has var args 2 = f 2 has var args ( ) ; if ( has var args 1 ! = has var args 2 ) { f 1 set var args ( has var args 2 ) ; } } }


public static < t > void do if not null ( final t input , final consumer < t > true function ) { try { if ( input ! = null ) { true function accept ( input ) ; } } catch ( final throwable e ) { logging utils warn ( logger , e ) ; } }


see { @ link socket # set traffic class ( int ) } calling this method does not trigger mode detection

public void set traffic class ( int tc ) throws socket exception { get socket allow unknown mode ( ) set traffic class ( tc ) ; }


begin creating a { @ link web test client } by providing the { @ code @ controller } instance ( s ) to handle requests with internally this is delegated to and equivalent to using { @ link org springframework test web servlet setup mock mvc builders # standalone setup ( object ) } to initialize { @ link mock mvc }

static controller spec bind to controller ( object controllers ) { return new standalone mock mvc spec ( controllers ) ; }


manually replaces the manifest { @ link uri }

public void replace manifest uri ( uri manifest uri ) { synchronized ( manifest uri lock ) { this manifest uri = manifest uri ; this initial manifest uri = manifest uri ; } } / / media source implementation


run an immediate heartbeat from all actors used by tests

void trigger heartbeat for tests ( ) throws i o exception { for ( b p service actor actor : bp services ) { actor trigger heartbeat for tests ( ) ; } }


increments a mutable counter and the matching instance i o statistics counter no - op if the counter is not defined , or the count = = 0

public void increment counter ( statistic op , long count ) { string name = op get symbol ( ) ; if ( count ! = 0 ) { increment mutable counter ( name , count ) ; instance i o statistics increment counter ( name , count ) ; } }


get the coordinator if its connection is still active otherwise mark it unknown and return null

protected synchronized node check and get coordinator ( ) { if ( coordinator ! = null & & client is unavailable ( coordinator ) ) { mark coordinator unknown ( true , " coordinator unavailable " ) ; return null ; } return this coordinator ; }


set the body of the response to the given { @ code object } and return it asynchronous response bodies are supported by providing a { @ link completion stage } or { @ link publisher } as body ( or any asynchronous producer of a single entity that can be adapted via the { @ link reactive adapter registry } )


write inf len bytes ( deflated ) to file in test dir using codec records are of the form & lt ; i & gt ; & lt ; b 6 4 rand & gt ; & lt ; i + i & gt ; & lt ; b 6 4 rand & gt ;

private static path write split test file ( file system fs , random rand , compression codec codec , long inf len ) throws i o exception { final int rec size = 1024 ; final path wd = new path ( generic test utils get temp path ( codec get class ( ) get simple name ( ) ) ) make qualified ( fs get uri ( ) , fs get working directory ( ) ) ; final path file = new path ( wd , " test " + codec get default extension ( ) ) ; final byte [ ] b = new byte [ rec size ] ; final base 6 4 b 6 4 = new base 6 4 ( 0 , null ) ; compressor cmp = codec pool get compressor ( codec ) ; try ( data output stream fout = new data output stream ( codec create output stream ( fs create ( file , true ) , cmp ) ) ) { final data output buffer dob = new data output buffer ( rec size * 4 / 3 + 4 ) ; int seq = 0 ; while ( inf len > 0 ) { rand next bytes ( b ) ; final byte [ ] b 6 4enc = b 6 4 encode ( b ) ; / / ensures rand printable , no lf dob reset ( ) ; dob write int ( seq ) ; system arraycopy ( dob get data ( ) , 0 , b 6 4enc , 0 , dob get length ( ) ) ; fout write ( b 6 4enc ) ; fout write ( ' \ n ' ) ; + + seq ; inf len - = b 6 4enc length ; } log info ( " wrote " + seq + " records to " + file ) ; } finally { codec pool return compressor ( cmp ) ; } return file ; }


string get check lockable sql ( string lock table , string param place hold ) ;


invoke the { @ link org springframework beans factory parsing source extractor } to pull the source metadata from the supplied { @ link element }

protected object extract source ( element ele ) { return get reader context ( ) extract source ( ele ) ; }


re - authentication must fail if mechanism changes

public void test cannot reauthenticate with different mechanism ( ) throws exception { string node = " 0 " ; security protocol security protocol = security protocol sasl ssl ; configure mechanisms ( " digest - md5 " , arrays as list ( " digest - md5 " , " plain " ) ) ; configure digest md 5 server callback ( security protocol ) ; server = create echo server ( security protocol ) ; string sasl mechanism = ( string ) sasl client configs get ( sasl configs sasl mechanism ) ; map < string , ? > configs = new test security config ( sasl client configs ) values ( ) ; this channel builder = new alternate sasl channel builder ( mode client , collections singleton map ( sasl mechanism , jaas context load client context ( configs ) ) , security protocol , null , false , sasl mechanism , true , credential cache , null , time ) ; this channel builder configure ( configs ) ; / / initial authentication must succeed this selector = network test utils create selector ( channel builder , time ) ; inet socket address addr = new inet socket address ( " localhost " , server port ( ) ) ; selector connect ( node , addr , buffer size , buffer size ) ; check client connection ( node ) ; / / ensure metrics are as expected before trying to re - authenticate server verify authentication metrics ( 1 , 0 ) ; server verify reauthentication metrics ( 0 , 0 ) ; / * * now re - authenticate with a different mechanism and ensure it fails we have * to sleep long enough so that the next write will trigger a re - authentication * / delay ( ( long ) ( connections max reauth ms value * 1 1 ) ) ; assert throws ( assertion failed error class , ( ) - > check client connection ( node ) ) ; server verify authentication metrics ( 1 , 0 ) ; server verify reauthentication metrics ( 0 , 1 ) ; }


put faketest - query - paramters to test the collection format in query parameters

default response entity < void > test query parameter collection format ( @ not null @ api param ( value = " " , required = true ) @ valid @ request param ( value = " pipe " , required = true ) list < string > pipe , @ not null @ api param ( value = " " , required = true ) @ valid @ request param ( value = " ioutil " , required = true ) list < string > ioutil , @ not null @ api param ( value = " " , required = true ) @ valid @ request param ( value = " http " , required = true ) list < string > http , @ not null @ api param ( value = " " , required = true ) @ valid @ request param ( value = " url " , required = true ) list < string > url , @ not null @ api param ( value = " " , required = true ) @ valid @ request param ( value = " context " , required = true ) list < string > context ) { return get delegate ( ) test query parameter collection format ( pipe , ioutil , http , url , context ) ; }


description will be prepended to the assertion error if verification fails

default verification mode description ( string description ) { return verification mode factory description ( this , description ) ; }


remove a register parameter vs change an attribute ( name , dt , comment ) of a register parameter

public void test remove vs change reg param comment ( ) throws exception { mtf initialize ( " diff test pgm 1 " , new original program modifier listener ( ) { @ override public void modify original ( program d b program ) { int tx id = program start transaction ( " modify original program " ) ; boolean commit = false ; try { function apples function = create external function ( program , new string [ ] { " user 3 2 dll " , " apples " } , addr ( program , " 7 7db 1 0 2 0 " ) , new byte data type ( ) , source type user defined ) ; assert not null ( apples function ) ; parameter parameter 1 = new parameter impl ( " p1 " , new d word data type ( ) , program ) ; parameter 1 set comment ( " test parameter comment " ) ; apples function add parameter ( parameter 1 , source type user defined ) ; function oranges function = create external function ( program , new string [ ] { " user 3 2 dll " , " oranges " } ) ; add parameter ( oranges function , " a1 " , source type user defined , new d word data type ( ) , " test a1 comment " ) ; commit = true ; } catch ( exception e ) { assert fail ( e get message ( ) ) ; } finally { program end transaction ( tx id , commit ) ; } } @ override public void modify latest ( program d b program ) { int tx id = program start transaction ( " modify latest program " ) ; boolean commit = false ; try { function func ; func = get external function ( program , new string [ ] { " user 3 2 dll " , " apples " } ) ; func set custom variable storage ( true ) ; func remove parameter ( 0 ) ; func = get external function ( program , new string [ ] { " user 3 2 dll " , " oranges " } ) ; func set custom variable storage ( true ) ; func get parameter ( 0 ) set comment ( " latest comment " ) ; commit = true ; } catch ( exception e ) { e print stack trace ( ) ; assert fail ( e get message ( ) ) ; } finally { program end transaction ( tx id , commit ) ; } } @ override public void modify private ( program d b program ) { int tx id = program start transaction ( " modify my program " ) ; boolean commit = false ; try { function func ; func = get external function ( program , new string [ ] { " user 3 2 dll " , " apples " } ) ; func set custom variable storage ( true ) ; func get parameter ( 0 ) set comment ( " my comment " ) ; func = get external function ( program , new string [ ] { " user 3 2 dll " , " oranges " } ) ; func set custom variable storage ( true ) ; func remove parameter ( 0 ) ; commit = true ; } catch ( exception e ) { e print stack trace ( ) ; assert fail ( e get message ( ) ) ; } finally { program end transaction ( tx id , commit ) ; } } } ) ; execute merge ( ask user ) ; choose radio button ( checked out button name ) ; choose radio button ( checked out button name ) ; wait for merge completion ( ) ; function func = get external function ( result program , new string [ ] { " user 3 2 dll " , " apples " } ) ; parameter [ ] parameters = func get parameters ( ) ; assert equals ( 1 , parameters length ) ; assert equals ( " p1 " , parameters [ 0 ] get name ( ) ) ; assert equals ( " r 1 2 " , parameters [ 0 ] get register ( ) get name ( ) ) ; assert true ( new d word data type ( ) is equivalent ( parameters [ 0 ] get data type ( ) ) ) ; assert equals ( " my comment " , parameters [ 0 ] get comment ( ) ) ; variable [ ] local variables = func get local variables ( ) ; assert equals ( 0 , local variables length ) ; func = get external function ( result program , new string [ ] { " user 3 2 dll " , " oranges " } ) ; parameters = func get parameters ( ) ; assert equals ( 0 , parameters length ) ; local variables = func get local variables ( ) ; assert equals ( 0 , local variables length ) ; }


adds a set of deprecated keys to the global deprecations this method is lockless it works by means of creating a new deprecation context based on the old one , and then atomically swapping in the new context if someone else updated the context in between us reading the old context and swapping in the new one , we try again until we win the race

public static void add deprecations ( deprecation delta [ ] deltas ) { deprecation context prev , next ; do { prev = deprecation context get ( ) ; next = new deprecation context ( prev , deltas ) ; } while ( ! deprecation context compare and set ( prev , next ) ) ; }


invoke the specified { @ link method } against the supplied target object with the supplied arguments the target object can be { @ code null } when invoking a static { @ link method } thrown exceptions are handled via a call to { @ link # handle reflection exception }

public static object invoke method ( method method , @ nullable object target , @ nullable object args ) { try { return method invoke ( target , args ) ; } catch ( exception ex ) { handle reflection exception ( ex ) ; } throw new illegal state exception ( " should never get here " ) ; }


set the jndi environment to use for jndi lookups creates a jndi template with the given environment settings

public void set jndi environment ( @ nullable properties jndi environment ) { this jndi template = new jndi template ( jndi environment ) ; }


gets the length of this policy ' s time interval

public long get size ( ) { return size ; }


test code generation for nullable objects value must be a map of strings to values or the & # 39 ; null & # 39 ; value

public object get object with no declared props nullable ( ) { return object with no declared props nullable or else ( null ) ; }


create labels and areas for popping up editors

private void create ( ) { set layout ( new vertical layout ( 4 ) ) ; editor info list = new array list < > ( option names size ( ) ) ; list < generic options component > comp list = new array list < > ( ) ; create border ( ) ; help service help = help get help service ( ) ; for ( string option name : option names ) { editor state editor state = editor state factory get editor state ( options , option name , editor property change listener ) ; editor info list add ( editor state ) ; help location help loc = options get help location ( option name ) ; generic options component component = generic options component create option component ( editor state ) ; add ( component ) ; if ( help loc = = null ) { help exclude from help ( component ) ; } else { help register help ( component , help loc ) ; } comp list add ( component ) ; } generic options component align labels ( comp list ) ; }


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


format url template using default server variables

public string url ( ) { return url ( null ) ; }


create a new { @ link open ssl key material } which uses the private key that is held by { @ link open ssl private key } when the material is created we increment the reference count of the enclosing { @ link open ssl private key } and decrement it again when the reference count of the { @ link open ssl key material } reaches { @ code 0 }

open ssl key material new key material ( long certificate chain , x 5 0 9 certificate [ ] chain ) { return new open ssl private key material ( certificate chain , chain ) ; }


returns an object that can be used to query information about targets implementations should create a single instance and return that for all calls a class can implement both { @ code query environment } and { @ code target accessor } at the same time , in which case this method simply returns { @ code this }

target accessor < t > get accessor ( ) ;


adds a new header with the specified name and values this method is equivalent to for ( object v : values ) { headers add object ( name , v ) ; }

t add object ( k name , object values ) ;


special test for intervals that don ' t fit evenly into rounding interval in this case , when interval crosses dst transition point , rounding in local time can land in a dst gap which results in wrong utc rounding values


public static void finish all activities ( ) { finish all activities ( false ) ; }


the filesystem path to where the source file originated mainly used to display helpful error messages < code > optional string source path = 3 ; < code >


schedule sniffing to run as soon as possible if it isn ' t already running once such sniffing round runs it will also schedule a new round after sniff after failure delay ms

public void sniff on failure ( ) { / / sniff on failure does nothing until the initial sniffing round has been completed if ( initialized get ( ) ) { / * * if sniffing is already running , there is no point in scheduling another round right after the current one * concurrent calls may be checking the same task state , but only the first skip call on the same task returns true * the task may also get replaced while we check its state , in which case calling skip on it returns false * / if ( this next scheduled task skip ( ) ) { / * * we do not keep track of this future as the task will immediately run and we don ' t intend to cancel it * due to concurrent sniff on failure runs effectively the previous ( now cancelled or skipped ) task will stay * assigned to next task till this on failure round gets run and schedules its corresponding after failure round * / scheduler schedule ( new task ( sniff after failure delay millis ) , 0l ) ; } } }


when in { @ link # esc p } ( " device control " ) sequence

private void do device control ( int b ) { switch ( b ) { case ( byte ) ' \ \ ' : / / end of esc \ string terminator { string dcs = m o s c or device control args to string ( ) ; / / dcs $ q p t st request status string ( decrqss ) if ( dcs starts with ( " $ q " ) ) { if ( dcs equals ( " $ q \ " p " ) ) { / / decscl , conformance level , http : / / www vt 1 0 0 net / docs / vt 5 1 0 - rm / decscl : string csi string = " 64 ; 1 \ " p " ; m session write ( " \ 033p1 $ r " + csi string + " \ 033 \ \ " ) ; } else { finish sequence and log error ( " unrecognized decrqss string : ' " + dcs + " ' " ) ; } } else if ( dcs starts with ( " + q " ) ) { / / request termcap / terminfo string the string following the " q " is a list of names encoded in / / hexadecimal ( 2 digits per character ) separated by ; which correspond to termcap or terminfo key / / names / / two special features are also recognized , which are not key names : co for termcap colors ( or colors / / for terminfo colors ) , and tn for termcap name ( or name for terminfo name ) / / xterm responds with dcs 1 + r p t st for valid requests , adding to p t an = , and the value of the / / corresponding string that xterm would send , or dcs 0 + r p t st for invalid requests the strings are / / encoded in hexadecimal ( 2 digits per character ) / / example : / / : kr = \ eoc : ks = \ e [ ? 1h \ e = : ku = \ eoa : le = ^ h : mb = \ e [ 5m : md = \ e [ 1m : \ / / where / / kd = down - arrow key / / kl = left - arrow key / / kr = right - arrow key / / ku = up - arrow key / / # 2 = key shome , " shifted home " / / # 4 = key sleft , " shift arrow left " / / % i = key sright , " shift arrow right " / / * 7 = key send , " shifted end " / / k 1 = f1 function key / / example : request for ku is " esc p + q 6 b 7 5 esc \ " , where 6b 7d = ku in hexadecimal / / xterm response in normal cursor mode : / / " < 27 > p 1 + r 6 b 7 5 = 1 b 5 b 4 1 " where 0x 1 b 0x 5 b 0x 4 1 = 27 91 65 = esc [ a / / xterm response in application cursor mode : / / " < 27 > p 1 + r 6 b 7 5 = 1 b 5 b 4 1 " where 0x 1 b 0x 4 f 0x 4 1 = 27 91 65 = esc 0 a / / # 4 is " shift arrow left " : / / * * * device control ( dcs ) for ' # 4 ' - ' esc p + q 23 34 esc \ ' / / response : < 27 > p 1 + r 2 3 3 4 = 1 b 5 b 3 1 3 b 3 2 4 4 < 27 > \ / / where 0x 1 b 0x 5 b 0x 3 1 0x 3 b 0x 3 2 0x 4 4 = esc [ 1 ; 2 d / / which we find in : term key listener java : key map put ( keymod shift | keycode dpad left , " \ 033 [ 1 ; 2d " ) ; / / see http : / / h 3 0 0 9 7 www 3 hp com / docs / base doc / documentation / v40g html / man / man4 / 0178 htm for what to / / respond , as well as http : / / www freebsd org / cgi / man cgi ? query = termcap & sektion = 5 # capabilities for / / the meaning of e g " ku " , " kd " , " kr " , " kl " for ( string part : dcs substring ( 2 ) split ( " ; " ) ) { if ( part length ( ) % 2 = = 0 ) { string builder trans buffer = new string builder ( ) ; for ( int i = 0 ; i < part length ( ) ; i + = 2 ) { char c = ( char ) long decode ( " 0x " + part char at ( i ) + " " + part char at ( i + 1 ) ) long value ( ) ; trans buffer append ( c ) ; } string trans = trans buffer to string ( ) ; string response value ; switch ( trans ) { case " co " : case " colors " : response value = " 256 " ; / / number of colors break ; case " tn " : case " name " : response value = " xterm " ; break ; default : response value = key handler get code from termcap ( trans , is decset internal bit set ( decset bit application cursor keys ) , is decset internal bit set ( decset bit application keypad ) ) ; break ; } if ( response value = = null ) { switch ( trans ) { case " % 1 " : / / help key - ignore case " & 8 " : / / undo key - ignore break ; default : log w ( emulator debug log tag , " unhandled termcap / terminfo name : ' " + trans + " ' " ) ; } / / respond with invalid request : m session write ( " \ 033p0 + r " + part + " \ 033 \ \ " ) ; } else { string builder hex encoded = new string builder ( ) ; for ( int j = 0 ; j < response value length ( ) ; j + + ) { hex encoded append ( string format ( " % 02x " , ( int ) response value char at ( j ) ) ) ; } m session write ( " \ 033p1 + r " + part + " = " + hex encoded + " \ 033 \ \ " ) ; } } else { log e ( emulator debug log tag , " invalid device termcap / terminfo name of odd length : " + part ) ; } } } else { if ( log escape sequences ) log e ( emulator debug log tag , " unrecognized device control string : " + dcs ) ; } finish sequence ( ) ; } break ; default : if ( m o s c or device control args length ( ) > max osc string length ) { / / too long m o s c or device control args set length ( 0 ) ; finish sequence ( ) ; } else { m o s c or device control args append code point ( b ) ; continue sequence ( m escape state ) ; } } }


public static internal log id allocate ( class < ? > type , @ nullable string details ) { return allocate ( get class name ( type ) , details ) ; }


reselect , use invokers not in ` selected ` first , if all invokers are in ` selected ` , just pick an available one using loadbalance policy

private invoker < t > reselect ( load balance loadbalance , invocation invocation , list < invoker < t > > invokers , list < invoker < t > > selected , boolean availablecheck ) throws rpc exception { / / allocating one in advance , this list is certain to be used list < invoker < t > > reselect invokers = new array list < > ( invokers size ( ) > 1 ? ( invokers size ( ) - 1 ) : invokers size ( ) ) ; / / first , try picking a invoker not in ` selected ` for ( invoker < t > invoker : invokers ) { if ( availablecheck & & ! invoker is available ( ) ) { continue ; } if ( selected = = null | | ! selected contains ( invoker ) ) { reselect invokers add ( invoker ) ; } } if ( ! reselect invokers is empty ( ) ) { return loadbalance select ( reselect invokers , get url ( ) , invocation ) ; } / / just pick an available invoker using loadbalance policy if ( selected ! = null ) { for ( invoker < t > invoker : selected ) { if ( ( invoker is available ( ) ) / / available first & & ! reselect invokers contains ( invoker ) ) { reselect invokers add ( invoker ) ; } } } if ( ! reselect invokers is empty ( ) ) { return loadbalance select ( reselect invokers , get url ( ) , invocation ) ; } return null ; }


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


get the current working directory for the given file system

public path get working directory ( ) { return working directory ; }


adds the new < tt > value < tt > to the data at the appropriate location based on the sort

void insert ( row object value ) { if ( source ! = null ) { / / always update the master data source insert ( value ) ; } if ( ! passes filter ( value ) ) { return ; / / this item is filtered out of this data } if ( ! is sorted ( ) ) { / / not yet sorted or intentionally unsorted ; just add the item , it will get sorted later data add ( value ) ; return ; } comparator < row object > comparator = sort context get comparator ( ) ; int index = collections binary search ( data , value , comparator ) ; if ( index < 0 ) { / / not yet in the collection - - add it index = - index - 1 ; data add ( index , value ) ; return ; } / / the search thinks the item is in the list because a compare to ( ) result of 0 was / / found if the two objects are not equal ( ) , then add the new value row object existing value = data get ( index ) ; if ( ! objects equals ( value , existing value ) ) { data add ( index , value ) ; } }


public static boolean is data reference ( int operand type ) { return ( operand type & data ) ! = 0 ; }


check if the given class can be converted ( i e check if it is of type range set )

public boolean can convert ( class type ) { return type = = range set class ; }


sets the 4th column to the translation vector

public matrix 4 set translation ( float x , float y , float z ) { val [ m03 ] = x ; val [ m13 ] = y ; val [ m23 ] = z ; return this ; }


static factory method to create a new { @ code bean property row mapper }

public static < t > bean property row mapper < t > new instance ( class < t > mapped class , @ nullable conversion service conversion service ) { bean property row mapper < t > row mapper = new instance ( mapped class ) ; row mapper set conversion service ( conversion service ) ; return row mapper ; }


define the global configuration category the global config of this descriptor is in

public @ non null global configuration category get category ( ) { return global configuration category get ( global configuration category unclassified class ) ; }


create the destination path and then call mkdir , expect it to still work

public void test mkdir trailing exists ( ) throws throwable { path base = path ( " trailingexists " ) ; get file system ( ) mkdirs ( base ) ; try { string dest str = base to string ( ) + " / " ; / / the path already exists is dir ( dest str ) ; mkdirs ( dest str ) ; is dir ( dest str ) ; rmdir ( base to string ( ) ) ; is not found ( dest str ) ; } finally { get file system ( ) delete ( base , true ) ; } }


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


reconstruct this data block and recalculate checksum

private void recalculate checksum ( int err blk index , long block length ) throws i o exception { log debug ( " recalculate checksum for the missing / failed block index { } " , err blk index ) ; byte [ ] err indices = new byte [ 1 ] ; err indices [ 0 ] = ( byte ) err blk index ; striped reconstruction info striped recon info = new striped reconstruction info ( block group , ec policy , block indices , datanodes , err indices ) ; block checksum type group checksum type = get block checksum options ( ) get block checksum type ( ) ; try ( striped block checksum reconstructor checksum recon = group checksum type = = block checksum type composite crc ? new striped block checksum composite crc reconstructor ( get datanode ( ) get erasure coding worker ( ) , striped recon info , block checksum buf , block length ) : new striped block checksum md 5 crc reconstructor ( get datanode ( ) get erasure coding worker ( ) , striped recon info , block checksum buf , block length ) ) { checksum recon reconstruct ( ) ; data checksum checksum = checksum recon get checksum ( ) ; long crc per block = checksum get checksum size ( ) < = 0 ? 0 : checksum recon get checksum data len ( ) / checksum get checksum size ( ) ; set or verify checksum properties ( err blk index , checksum get bytes per checksum ( ) , crc per block , checksum get checksum type ( ) ) ; log debug ( " recalculated checksum for the block index : { } , checksum = { } " , err blk index , checksum recon get digest object ( ) ) ; } }


return active keystore path or preferred keystore path if not yet initialized

private synchronized string get key store ( ) { return wrapped key manager ! = null ? keystore path : get preferred key store ( ) ; }


private set < striped data streamer > wait creating streamers ( set < striped data streamer > healthy streamers ) throws i o exception { set < striped data streamer > failed = new hash set < > ( ) ; final int expected num = healthy streamers size ( ) ; final long socket timeout = dfs client get conf ( ) get socket timeout ( ) ; / / the total wait time should be less than the socket timeout , otherwise / / a slow streamer may cause other streamers to timeout here we wait for / / half of the socket timeout long remaing time = socket timeout > 0 ? socket timeout / 2 : long max value ; final long wait interval = 1000 ; synchronized ( coordinator ) { while ( check streamer updates ( failed , healthy streamers ) < expected num & & remaing time > 0 ) { try { long start = time monotonic now ( ) ; coordinator wait ( wait interval ) ; remaing time - = time monotonic now ( ) - start ; } catch ( interrupted exception e ) { throw d f s util client to interrupted i o exception ( " interrupted when waiting " + " for results of updating striped streamers " , e ) ; } } } synchronized ( coordinator ) { for ( striped data streamer streamer : healthy streamers ) { if ( ! coordinator update streamer map contains key ( streamer ) ) { / / close the streamer if it is too slow to create new connection log info ( " close the slow stream " + streamer ) ; streamer set streamer as closed ( ) ; failed add ( streamer ) ; } } } for ( map entry < striped data streamer , boolean > entry : coordinator update streamer map entry set ( ) ) { if ( ! entry get value ( ) ) { failed add ( entry get key ( ) ) ; } } for ( striped data streamer failed streamer : failed ) { healthy streamers remove ( failed streamer ) ; } return failed ; }


notify in the event that an authentication attempt is considered risky


adds { @ code element } to the { @ code immutable set } if the { @ code immutable set } already contains { @ code element } , then { @ code add } has no effect ( only the previously added element is retained )

public builder < e > add ( e element ) { check not null ( element ) ; if ( hash table ! = null & & choose table size ( size ) < = hash table length ) { add deduping ( element ) ; return this ; } else { hash table = null ; super add ( element ) ; return this ; } }


set the offset part of the address field

public void set value ( string value ) { text field set text ( value ) ; }


creates a new programmatic query to search for { @ link historic task instance } s

historic task instance query create historic task instance query ( ) ;


provision trash root in a snapshottable directory usage : hdfs dfsadmin - provision snapshot trash snapshot dir

public void provision snapshot trash ( string [ ] argv ) throws i o exception { path p = new path ( argv [ 1 ] ) ; final hdfs admin admin = new hdfs admin ( p to uri ( ) , get conf ( ) ) ; path trash root ; try { trash root = admin provision snapshot trash ( p ) ; } catch ( snapshot exception e ) { throw new remote exception ( e get class ( ) get name ( ) , e get message ( ) ) ; } system out println ( " successfully provisioned snapshot trash at " + trash root ) ; }


public builder add exempt generator ( string exempt generator ) { exempt generators add ( exempt generator ) ; return this ; }


computing the features on an empty recon should not fail

public void test compute features ( ) { standard recon config stub stub = new standard recon config stub ( ) ; recon recon = stub create new recon ( 2384738l ) ; stub compute features ( recon , " my string " ) ; assert not null ( recon features ) ; }


saves the current selection in the structure components viewing area

public void set selection ( int [ ] rows ) { if ( updating selection ) { return ; } field selection tmp selection = new field selection ( ) ; int num components = get num components ( ) ; for ( int row 2 : rows ) { / / only add valid component rows ( i e don ' t include blank last line ) if ( row 2 < num components ) { tmp selection add range ( row 2 , row 2 + 1 ) ; } } if ( this selection equals ( tmp selection ) ) { return ; } / / normally if the user makes a new selection , we want to end any field editing / / that is in progress , but if we are fixing up the selection during a begin edit / / then don ' t end field editing since we are in a transition state if ( ! still beginning edit ) { end field editing ( ) ; } this selection = tmp selection ; adjust current row ( ) ; selection changed ( ) ; }


public base adapter helper set on touch listener ( int view id , view on touch listener listener ) { view view = retrieve view ( view id ) ; view set on touch listener ( listener ) ; return this ; }


public float get float ( string key , float def ) { object tmp = m map get ( key ) ; return tmp instanceof number ? ( ( number ) tmp ) float value ( ) : def ; }


public void test has only read only ( ) { / / todo : test has only read only }


returns the maximum size for a decoded frame from the flac stream

public int get max decoded frame size ( ) { return max block size samples * channels * ( bits per sample / 8 ) ; }


gets the high state value of the catches , if there is one , in the try block map entry indicated by the ordinal

public int get catch high ( int try block ordinal ) throws invalid data type exception { check validity ( try block ordinal ) ; data type dt = get data type ( ) ; mem buffer specific mem buffer = get specific mem buffer ( try block ordinal , dt ) ; / / component 2 is the high state value of the catches return e h data type utilities get e h state value ( dt , catch high ordinal , specific mem buffer ) ; }


returns true if this byte block has byte values at the specified index

default public boolean has value ( big integer index ) { return true ; }


( asynchronously ) test serialization of outer boolean types

public okhttp 3 call fake outer boolean serialize async ( boolean body , final api callback < boolean > callback ) throws api exception { okhttp 3 call local var call = fake outer boolean serialize validate before call ( body , callback ) ; type local var return type = new type token < boolean > ( ) { } get type ( ) ; local var api client execute async ( local var call , local var return type , callback ) ; return local var call ; }


append a property with its attributes to a given { # link document } if the property is found in configuration

private synchronized void append x m l property ( document doc , element conf , string property name ) { / / skip writing if given property name is empty or null if ( ! strings is null or empty ( property name ) ) { string value = properties get property ( property name ) ; if ( value ! = null ) { element prop node = doc create element ( " property " ) ; conf append child ( prop node ) ; element name node = doc create element ( " name " ) ; name node append child ( doc create text node ( property name ) ) ; prop node append child ( name node ) ; element value node = doc create element ( " value " ) ; value node append child ( doc create text node ( properties get property ( property name ) ) ) ; prop node append child ( value node ) ; element final node = doc create element ( " final " ) ; final node append child ( doc create text node ( string value of ( final parameters contains ( property name ) ) ) ) ; prop node append child ( final node ) ; if ( updating resource ! = null ) { string [ ] sources = updating resource get ( property name ) ; if ( sources ! = null ) { for ( string s : sources ) { element source node = doc create element ( " source " ) ; source node append child ( doc create text node ( s ) ) ; prop node append child ( source node ) ; } } } } } }


translates a collection of { @ link linkstamp } instances to an immutable mapping from linkstamp to object files in other words , given a set of source files , this method determines the output path to which each file should be compiled

public static immutable map < linkstamp , artifact > map linkstamps to outputs ( immutable set < linkstamp > linkstamps , action construction context action construction context , repository name repository name , build configuration configuration , artifact output binary , link artifact factory link artifact factory ) { immutable map builder < linkstamp , artifact > map builder = immutable map builder ( ) ; path fragment output binary path = output binary get output dir relative path ( configuration is sibling repository layout ( ) ) ; path fragment stamp output directory = output binary path get parent directory ( ) get relative ( cpp helper objs ) get relative ( output binary path get base name ( ) ) ; for ( linkstamp linkstamp : linkstamps ) { path fragment stamp output path = stamp output directory get relative ( file system utils replace extension ( linkstamp get artifact ( ) get root relative path ( ) , " o " ) ) ; map builder put ( linkstamp , / / note that link stamp actions can be shared between link actions that output shared / / native dep libraries link artifact factory create ( action construction context , repository name , configuration , stamp output path ) ) ; } return map builder build ( ) ; }


public void remove acl ( path path ) throws i o exception { map < string , string > params = new hash map < string , string > ( ) ; params put ( op param , operation removeacl to string ( ) ) ; http u r l connection conn = get connection ( operation removeacl get method ( ) , params , path , true ) ; http exception utils validate response ( conn , http u r l connection http ok ) ; }


public configuration get conf ( ) { return this conf ; }


unary promotion all objects are promoted to object

private static class < ? > promote ( class < ? > clazz ) { / / if either is a non - primitive type - > object if ( clazz is primitive ( ) = = false ) { return object class ; } / / always promoted to integer if ( clazz = = byte class | | clazz = = short class | | clazz = = char class | | clazz = = int class ) { return int class ; } else { return clazz ; } }


test that the script stack looks good by implication this tests that we build proper " line numbers " in stack trace these line numbers are really 1 based character numbers

public void test script stack ( ) { for ( string type : new string [ ] { " string " , " def " } ) { / / trigger npe at line 1 of the script script exception exception = expect throws ( script exception class , ( ) - > { exec ( type + " x = null ; boolean y = x is empty ( ) ; \ n " + " return y ; " ) ; } ) ; / / null deref at x is empty ( ) , the ' ' is offset 30 assert script element column ( 30 , exception ) ; assert script stack ( exception , " y = x is empty ( ) ; \ n " , " ^ - - - - here " ) ; assert that ( exception get cause ( ) , instance of ( null pointer exception class ) ) ; / / trigger npe at line 2 of the script exception = expect throws ( script exception class , ( ) - > { exec ( type + " x = null ; \ n " + " return x is empty ( ) ; " ) ; } ) ; / / null deref at x is empty ( ) , the ' ' is offset 25 assert script element column ( 25 , exception ) ; assert script stack ( exception , " return x is empty ( ) ; " , " ^ - - - - here " ) ; assert that ( exception get cause ( ) , instance of ( null pointer exception class ) ) ; / / trigger npe at line 3 of the script exception = expect throws ( script exception class , ( ) - > { exec ( type + " x = null ; \ n " + type + " y = x ; \ n " + " return y is empty ( ) ; " ) ; } ) ; / / null deref at y is empty ( ) , the ' ' is offset 39 assert script element column ( 39 , exception ) ; assert script stack ( exception , " return y is empty ( ) ; " , " ^ - - - - here " ) ; assert that ( exception get cause ( ) , instance of ( null pointer exception class ) ) ; / / trigger npe at line 4 in script ( inside conditional ) exception = expect throws ( script exception class , ( ) - > { exec ( type + " x = null ; \ n " + " boolean y = false ; \ n " + " if ( ! y ) { \ n " + " y = x is empty ( ) ; \ n " + " } \ n " + " return y ; " ) ; } ) ; / / null deref at x is empty ( ) , the ' ' is offset 53 assert script element column ( 53 , exception ) ; assert script stack ( exception , " y = x is empty ( ) ; \ n } \ n " , " ^ - - - - here " ) ; assert that ( exception get cause ( ) , instance of ( null pointer exception class ) ) ; }


verify that the item and path metadata objects hold the same information

private static void verify ( item item , path metadata meta ) { assert not null ( meta ) ; final s 3 a file status status = meta get file status ( ) ; final path path = status get path ( ) ; assert equals ( item get ( parent ) , path to parent key ( path get parent ( ) ) ) ; assert equals ( item get ( child ) , path get name ( ) ) ; boolean is dir = item has attribute ( is dir ) & & item get boolean ( is dir ) ; assert equals ( is dir , status is directory ( ) ) ; long len = item has attribute ( file length ) ? item get long ( file length ) : 0 ; assert equals ( len , status get len ( ) ) ; long b size = item has attribute ( block size ) ? item get long ( block size ) : 0 ; assert equals ( b size , status get block size ( ) ) ; string e tag = item get string ( etag ) ; assert equals ( e tag , status get e tag ( ) ) ; string version id = item get string ( version id ) ; assert equals ( version id , status get version id ( ) ) ; / * * s 3 a file statue # get modification time ( ) reports the current time , so the * following assertion is failing * * long mod time = item has attribute ( mod time ) ? item get long ( mod time ) : 0 ; * assert equals ( mod time , status get modification time ( ) ) ; * / }


protected list < row lock > collect row locks ( string lock key , string resource id , string xid , long transaction id , long branch i d ) { list < row lock > locks = new array list < row lock > ( ) ; string [ ] table grouped lock keys = lock key split ( " ; " ) ; for ( string table grouped lock key : table grouped lock keys ) { int idx = table grouped lock key index of ( " : " ) ; if ( idx < 0 ) { return locks ; } string table name = table grouped lock key substring ( 0 , idx ) ; string merged p ks = table grouped lock key substring ( idx + 1 ) ; if ( string utils is blank ( merged p ks ) ) { return locks ; } string [ ] pks = merged p ks split ( " , " ) ; if ( pks = = null | | pks length = = 0 ) { return locks ; } for ( string pk : pks ) { if ( string utils is not blank ( pk ) ) { row lock row lock = new row lock ( ) ; row lock set xid ( xid ) ; row lock set transaction id ( transaction id ) ; row lock set branch id ( branch i d ) ; row lock set table name ( table name ) ; row lock set pk ( pk ) ; row lock set resource id ( resource id ) ; locks add ( row lock ) ; } } } return locks ; }


static public move by action move by ( float amount x , float amount y ) { return move by ( amount x , amount y , 0 , null ) ; }


get the previous long value in this iterator


verify if tasting the stew actually removes one of each ingredient

public void test drink ( ) { final var stew = new stew ( 1 , 2 , 3 , 4 ) ; stew mix ( ) ; assert equals ( " mixing the stew we find : 1 potatoes , 2 carrots , 3 meat and 4 peppers " , appender get last message ( ) ) ; stew taste ( ) ; assert equals ( " tasting the stew " , appender get last message ( ) ) ; stew mix ( ) ; assert equals ( " mixing the stew we find : 0 potatoes , 1 carrots , 2 meat and 3 peppers " , appender get last message ( ) ) ; }


invoked when the current { @ link channel } has read a message from the peer

void channel read ( channel handler context ctx , object msg ) throws exception ;


wait until an attempt has reached a specified state the timeout can be specified by the parameter

public void wait for state ( application attempt id attempt id , r m app attempt state final state , int timeout msecs ) throws interrupted exception { drain events implicitly ( ) ; r m app app = get r m context ( ) get r m apps ( ) get ( attempt id get application id ( ) ) ; assert assert not null ( " app shouldn ' t be null " , app ) ; r m app attempt attempt = app get r m app attempt ( attempt id ) ; mock r m wait for state ( attempt , final state , timeout msecs ) ; }


gets the registered gateway this returns null until the registration is completed

public g get target gateway ( ) { return target gateway ; }


reset the enum set writable with specified < tt > value < tt > and < tt > element type < tt > if the < tt > value < tt > argument is null or its size is zero , the < tt > element type < tt > argument must not be null if the argument < tt > value < tt > ' s size is bigger than zero , the argument < tt > element type < tt > is not be used

public void set ( enum set < e > value , class < e > element type ) { if ( ( value = = null | | value size ( ) = = 0 ) & & ( this element type = = null & & element type = = null ) ) { throw new illegal argument exception ( " the enum set argument is null , or is an empty set but with no element type provided " ) ; } this value = value ; if ( value ! = null & & value size ( ) > 0 ) { iterator < e > iterator = value iterator ( ) ; this element type = iterator next ( ) get declaring class ( ) ; } else if ( element type ! = null ) { this element type = element type ; } }


sets the primary callback to be executed when this action changes its action state this builder will throw an { @ link illegal state exception } if one of the build methods is called without providing this callback

public multi state action builder < t > on action state changed ( bi consumer < action state < t > , event trigger > bi consumer ) { action state changed callback = bi consumer ; return self ( ) ; }


returns the function defined before the specified address

public final function get function before ( address address ) { function iterator iterator = current program get listing ( ) get functions ( address , false ) ; / / skip over this function / / this is weird , but if you have multiple overlay spaces or address spaces , / / you will miss functions by not using the iterator and doing address math yourself if ( ! iterator has next ( ) ) { return null ; } function func = iterator next ( ) ; / / if the function found starts at the start addres , go to the next one if ( address equals ( func get entry point ( ) ) ) { func = null ; if ( iterator has next ( ) ) { func = iterator next ( ) ; } } return func ; }


validate a value against the set of regular expressions returning the array of matched groups

public string [ ] match ( string value ) { if ( value = = null ) { return null ; } for ( pattern pattern : patterns ) { matcher matcher = pattern matcher ( value ) ; if ( matcher matches ( ) ) { int count = matcher group count ( ) ; string [ ] groups = new string [ count ] ; for ( int j = 0 ; j < count ; j + + ) { groups [ j ] = matcher group ( j + 1 ) ; } return groups ; } } return null ; }


become a follower of an elected leader so that we can begin fetching

public void transition to follower ( int epoch , int leader id ) throws i o exception { if ( leader id = = local id ) { throw new illegal state exception ( " cannot transition to follower with leader id = " + leader id + " and epoch = " + epoch + " since it matches the local broker id = " + local id ) ; } else if ( ! is voter ( leader id ) ) { throw new illegal state exception ( " cannot transition to follower with leader id = " + leader id + " and epoch = " + epoch + " since it is not one of the voters " + voters ) ; } int current epoch = state epoch ( ) ; if ( epoch < current epoch ) { throw new illegal state exception ( " cannot transition to follower with leader id = " + leader id + " and epoch = " + epoch + " since the current epoch " + current epoch + " is larger " ) ; } else if ( epoch = = current epoch & & ( is follower ( ) | | is leader ( ) ) ) { throw new illegal state exception ( " cannot transition to follower with leader id = " + leader id + " and epoch = " + epoch + " from state " + state ) ; } transition to ( new follower state ( time , epoch , leader id , voters , state high watermark ( ) , fetch timeout ms ) ) ; }


return true if the given user is part of the acl for the given { @ link queue a c l } name for the given queue an operation is allowed if all users are provided access for this operation , or if either the user or any of the groups specified is provided access

public synchronized boolean has access ( string queue name , queue a c l q a c l , user group information ugi ) { queue q = leaf queues get ( queue name ) ; if ( q = = null ) { log info ( " queue " + queue name + " is not present " ) ; return false ; } if ( q get children ( ) ! = null & & ! q get children ( ) is empty ( ) ) { log info ( " cannot submit job to parent queue " + q get name ( ) ) ; return false ; } if ( ! are acls enabled ( ) ) { return true ; } if ( log is debug enabled ( ) ) { log debug ( " checking access for the acl " + to full property name ( queue name , q a c l get acl name ( ) ) + " for user " + ugi get short user name ( ) ) ; } access control list acl = q get acls ( ) get ( to full property name ( queue name , q a c l get acl name ( ) ) ) ; if ( acl = = null ) { return false ; } / / check if user is part of the acl return acl is user allowed ( ugi ) ; }


get the minimum storage size in bytes for a given size in bits this does not consider the bit offset which may increase the required storage

public static int get minimum storage size ( int bit size ) { return get minimum storage size ( bit size , 0 ) ; }


returns true if this placeholder ' s component is in a tabbed pane with other components

boolean is stacked ( ) { if ( comp node ! = null ) { return comp node is stacked ( ) ; } return false ; }


a sensible definition of { @ link # first entry ( ) } in terms of { @ code entry set ( ) iterator ( ) } if you override { @ link # entry set ( ) } , you may wish to override { @ link # first entry ( ) } to forward to this implementation

protected entry < e > standard first entry ( ) { iterator < entry < e > > entry iterator = entry set ( ) iterator ( ) ; if ( ! entry iterator has next ( ) ) { return null ; } entry < e > entry = entry iterator next ( ) ; return multisets immutable entry ( entry get element ( ) , entry get count ( ) ) ; }


gets the last used ghidra gradle distribution that ' s defined in the preferences

public static gradle distribution get ghidra last gradle distribution ( ) { i preference store prefs = activator get default ( ) get preference store ( ) ; string pref = prefs get string ( ghidra last gradle distribution ) ; if ( pref ! = null & & ! pref is empty ( ) ) { try { return gradle distribution from string ( pref ) ; } catch ( exception e ) { / / failed to parse the string for some reason fall through to null } } return null ; }


check whether this factory ' s bean creation phase already started , i e whether any bean has been marked as created in the meantime

protected boolean has bean creation started ( ) { return ! this already created is empty ( ) ; }


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


returns true if this header contains a coff file

public boolean is c o f f ( ) { return ! name equals ( coff archive member header slash ) & & ! name equals ( coff archive member header slash slash ) ; }


get the data d b object from the cache ; if it is not in the cache , create a new db object and add it

data d b get data d b ( d b record rec ) { lock acquire ( ) ; try { if ( rec ! = null ) { data d b data = ( data d b ) cache get ( rec ) ; if ( data ! = null ) { return data ; } long addr = rec get key ( ) ; address address = addr map decode address ( addr ) ; long datatype i d = rec get long value ( data d b adapter data type id col ) ; data type dt = data manager get data type ( datatype i d ) ; data = new data d b ( this , cache , addr , address , addr , dt ) ; return data ; } return null ; } finally { lock release ( ) ; } }


public okhttp 3 call upload file async ( long pet id , string additional metadata , file file , final api callback < model api response > callback ) throws api exception { okhttp 3 call local var call = upload file validate before call ( pet id , additional metadata , file , callback ) ; type local var return type = new type token < model api response > ( ) { } get type ( ) ; local var api client execute async ( local var call , local var return type , callback ) ; return local var call ; }


remove the given child from the deleted list , if there is any

public boolean remove deleted child ( final i node child ) { final diff list < directory diff > diff list = as list ( ) ; for ( int i = diff list size ( ) - 1 ; i > = 0 ; i - - ) { final children diff diff = diff list get ( i ) diff ; if ( diff remove deleted ( child ) ) { return true ; } } return false ; }


apply the reverse of this diff to current state in order to obtain the previous state

public list < e > apply 2 current ( final list < e > current ) { return apply 2 previous ( current , get deleted unmodifiable ( ) , get created unmodifiable ( ) ) ; }


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


parse the relocations and line number information for this section

void parse ( binary reader reader , coff file header header , task monitor monitor ) throws i o exception { long orig index = reader get pointer index ( ) ; try { parse relocations ( reader , header , monitor ) ; parse line numbers ( reader , monitor ) ; } finally { reader set pointer index ( orig index ) ; } }


public object [ ] [ ] get mock columns metas return value ( ) { return mock columns metas return value ; }


provide old file rootdirtoold dex , new file rootdirtonew dex , return dirtoold dex or dirtonew dex if any one is not null

protected string get relative dex name ( file old dex file , file new dex file ) { return old dex file ! = null ? get relative path string to old file ( old dex file ) : get relative path string to new file ( new dex file ) ; }


public list < library record > get libraries ( ) throws i o exception { record iterator iterator = table iterator ( ) ; if ( ! iterator has next ( ) ) { return collections empty list ( ) ; } array list < library record > list = new array list < library record > ( ) ; while ( iterator has next ( ) ) { list add ( new library record ( iterator next ( ) ) ) ; } return list ; }


public put user response put user ( put user request request , request options options ) throws i o exception { return rest high level client perform request and parse entity ( request , security request converters : : put user , options , put user response : : from x content , empty set ( ) ) ; }


removes and ignores the unassigned shard ( will be ignored for this run , but will be added back to unassigned once the metadata is constructed again ) typically this is used when an allocation decision prevents a shard from being allocated such that subsequent consumers of this api won ' t try to allocate this shard again

public void remove and ignore ( allocation status attempt , routing changes observer changes ) { nodes ensure mutable ( ) ; inner remove ( ) ; ignore shard ( current , attempt , changes ) ; }


locate a constructor on the type there are three kinds of match that might occur : an exact match where the types of the arguments match the types of the constructor an in - exact match where the types we are looking for are subtypes of those defined on the constructor a match where we are able to convert the arguments into those expected by the constructor , according to the registered type converter

public constructor executor resolve ( evaluation context context , string type name , list < type descriptor > argument types ) throws access exception { try { type converter type converter = context get type converter ( ) ; class < ? > type = context get type locator ( ) find type ( type name ) ; constructor < ? > [ ] ctors = type get constructors ( ) ; arrays sort ( ctors , ( c 1 , c 2 ) - > { int c 1pl = c 1 get parameter count ( ) ; int c 2pl = c 2 get parameter count ( ) ; return integer compare ( c 1pl , c 2pl ) ; } ) ; constructor < ? > close match = null ; constructor < ? > match requiring conversion = null ; for ( constructor < ? > ctor : ctors ) { int param count = ctor get parameter count ( ) ; list < type descriptor > param descriptors = new array list < > ( param count ) ; for ( int i = 0 ; i < param count ; i + + ) { param descriptors add ( new type descriptor ( new method parameter ( ctor , i ) ) ) ; } reflection helper arguments match info match info = null ; if ( ctor is var args ( ) & & argument types size ( ) > = param count - 1 ) { / / * sigh * complicated / / basically we have to have all parameters match up until the varargs one , then the rest of what is / / being provided should be / / the same type whilst the final argument to the method must be an array of that ( oh , how easy not ) - / / or the final parameter / / we are supplied does match exactly ( it is an array already ) match info = reflection helper compare arguments varargs ( param descriptors , argument types , type converter ) ; } else if ( param count = = argument types size ( ) ) { / / worth a closer look match info = reflection helper compare arguments ( param descriptors , argument types , type converter ) ; } if ( match info ! = null ) { if ( match info is exact match ( ) ) { return new reflective constructor executor ( ctor ) ; } else if ( match info is close match ( ) ) { close match = ctor ; } else if ( match info is match requiring conversion ( ) ) { match requiring conversion = ctor ; } } } if ( close match ! = null ) { return new reflective constructor executor ( close match ) ; } else if ( match requiring conversion ! = null ) { return new reflective constructor executor ( match requiring conversion ) ; } else { return null ; } } catch ( evaluation exception ex ) { throw new access exception ( " failed to resolve constructor " , ex ) ; } }


gets the fields to load and return as part of the search request

public list < field and format > fetch fields ( ) { return fetch fields ; }


this implementation returns the underlying file path length

public long content length ( ) throws i o exception { if ( this file ! = null ) { long length = this file length ( ) ; if ( length = = 0l & & ! this file exists ( ) ) { throw new file not found exception ( get description ( ) + " cannot be resolved in the file system for checking its content length " ) ; } return length ; } else { try { return files size ( this file path ) ; } catch ( no such file exception ex ) { throw new file not found exception ( ex get message ( ) ) ; } } }


sets if the progress bar should be vertical

public void set is vertical ( boolean is vertical ) { if ( m is vertical ! = is vertical ) { m is vertical = is vertical ; invalidate self ( ) ; } }


sets the scope of the acl entry if this method is not called , then the builder assumes { @ link acl entry scope # access }

public builder set scope ( acl entry scope scope ) { this scope = scope ; return this ; }


deserializes snapshot failure information from json

public static snapshot shard failure from x content ( x content parser parser ) throws i o exception { return snapshot shard failure parser parse ( parser , null ) ; }


private list < metadata resolver > build single metadata resolver ( final metadata filter metadata filter chain , final resource resource , final document document ) { try { val metadata root = document get document element ( ) ; val metadata provider = new d o m metadata resolver ( metadata root ) ; metadata provider set parser pool ( this config bean get parser pool ( ) ) ; metadata provider set fail fast initialization ( true ) ; metadata provider set require valid metadata ( this require valid metadata ) ; metadata provider set id ( metadata provider get class ( ) get canonical name ( ) ) ; if ( metadata filter chain ! = null ) { metadata provider set metadata filter ( metadata filter chain ) ; } logger debug ( " initializing metadata resolver for [ { } ] " , resource ) ; metadata provider initialize ( ) ; val resolvers = new array list < metadata resolver > ( 1 ) ; resolvers add ( metadata provider ) ; return resolvers ; } catch ( final exception ex ) { logging utils warn ( logger , ex ) ; } return new array list < > ( 0 ) ; }


public int get subroutine address ( ) { return subroutine address ; }


the set of xml attributevalue pairs for this style < code > repeated aapt pb style entry entry = 3 ; < code >

private void set entry ( int index , com android aapt resources style entry value ) { if ( value = = null ) { throw new null pointer exception ( ) ; } ensure entry is mutable ( ) ; entry set ( index , value ) ; }


set the given content as binary stream on the given statement , using the given parameter index might simply invoke { @ code prepared statement set binary stream } or create a blob instance for it , depending on the database and driver

void set blob as binary stream ( prepared statement ps , int param index , @ nullable input stream content stream , int content length ) throws s q l exception ;


executed prior to using a { @ link reader context } that has been retrieved from the active contexts if the context is deemed invalid a runtime exception can be thrown , which will prevent the context from being used

default void validate reader context ( reader context reader context , transport request transport request ) { }


write the status code to the underlying response this method is called once only

protected abstract void apply status code ( ) ;


when the request resources is the first in a stream , the initial resource versions must be populated otherwise , initial resource versions must be omitted the keys are the resources names of the mcp resources known to the mcp client the values in the map are the associated resource level version info < code > map & lt ; string , string & gt ; initial resource versions = 3 ; < code >

public boolean contains initial resource versions ( java lang string key ) { if ( key = = null ) { throw new java lang null pointer exception ( ) ; } return internal get initial resource versions ( ) get map ( ) contains key ( key ) ; }


verifies that the given scheduler does not deliver handled errors to its executing thread ' s { @ link java lang thread uncaught exception handler }

static void handled error is not delivered to thread handler ( scheduler scheduler ) throws interrupted exception { thread uncaught exception handler original handler = thread get default uncaught exception handler ( ) ; try { capturing uncaught exception handler handler = new capturing uncaught exception handler ( ) ; capturing observer < object > observer = new capturing observer < > ( ) ; thread set default uncaught exception handler ( handler ) ; illegal state exception error = new illegal state exception ( " should be delivered to handler " ) ; flowable error ( error ) subscribe on ( scheduler ) subscribe ( observer ) ; if ( ! observer completed await ( 3 , time unit seconds ) ) { fail ( " timed out " ) ; } if ( handler count ! = 0 ) { handler caught print stack trace ( ) ; } assert equals ( " handler should not have received anything : " + handler caught , 0 , handler count ) ; assert equals ( " observer should have received an error " , 1 , observer error count ) ; assert equals ( " observer should not have received a next value " , 0 , observer next count ) ; throwable cause = observer error ; while ( cause ! = null ) { if ( error equals ( cause ) ) { break ; } if ( cause = = cause get cause ( ) ) { break ; } cause = cause get cause ( ) ; } assert equals ( " our error should have been delivered to the observer " , error , cause ) ; } finally { thread set default uncaught exception handler ( original handler ) ; } }


returns the record for the associated record number , which is expected to match the desired class

public abstract ms type get type record ( record number record number ) { return get type record ( record number , abstract ms type class ) ; }


the open interface for other classes in crud package to update using model class to decide which table to update , and id to decide a specific row the value that need to update is stored in content values

public int on update ( class < ? > model class , long id , content values values ) { if ( values size ( ) > 0 ) { convert content values ( values ) ; return m database update ( get table name ( model class ) , values , " id = " + id , null ) ; } return 0 ; }


complete all awaiting futures successfully

void complete all ( long current time ms ) ;