the upper bound of outstanding split count it might be larger than the actual number when called concurrently with other methods

int get buffered internal split count ( ) { return buffered internal split count get ( ) ; }


internal property used by templates , don ' t use during entity definition

public property get pk property ( ) { return pk property ; }


invalidates this actor ' s layout , causing { @ link # layout ( ) } to happen the next time { @ link # validate ( ) } is called this method should be called when state changes in the actor that requires a layout but does not change the minimum , preferred , maximum , or actual size of the actor ( meaning it does not affect the parent actor ' s layout )


returns the windows header from the new executable

public windows header get windows header ( ) { return win header ; }


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


blocks until the value is { @ link # set ( object ) } by another thread and returns the value

public synchronized @ check for null t get ( ) { try { while ( ! set ) wait ( ) ; return value ; } catch ( interrupted exception e ) { / / assume the loading failed , but make sure we process interruption properly later thread current thread ( ) interrupt ( ) ; return null ; } }


tests the " convenience factories " ( string , label , etc ) for types

public void test convenience factories types ( ) throws exception { assert type ( integer , attr ( " x " , integer ) build ( ) ) ; assert type ( integer , attr ( " x " , integer ) value ( starlark int of ( 42 ) ) build ( ) ) ; assert type ( string , attr ( " x " , string ) build ( ) ) ; assert type ( string , attr ( " x " , string ) value ( " foo " ) build ( ) ) ; label label = label parse absolute ( " / / foo : bar " , immutable map of ( ) ) ; assert type ( label , attr ( " x " , label ) legacy allow any file type ( ) build ( ) ) ; assert type ( label , attr ( " x " , label ) legacy allow any file type ( ) value ( label ) build ( ) ) ; list < string > slist = arrays as list ( " foo " , " bar " ) ; assert type ( string list , attr ( " x " , string list ) build ( ) ) ; assert type ( string list , attr ( " x " , string list ) value ( slist ) build ( ) ) ; list < label > llist = arrays as list ( label parse absolute ( " / / foo : bar " , immutable map of ( ) ) , label parse absolute ( " / / foo : wiz " , immutable map of ( ) ) ) ; assert type ( label list , attr ( " x " , label list ) legacy allow any file type ( ) build ( ) ) ; assert type ( label list , attr ( " x " , label list ) legacy allow any file type ( ) value ( llist ) build ( ) ) ; }


the test verifies that zero - fair share queues ( because of zerotiny weight ) can get resources for the am

public void test request a m resource in zero fair share queue ( ) throws exception { conf set ( fair scheduler configuration allocation file , alloc file ) ; allocation file writer create ( ) add queue ( new allocation file queue builder ( " queue 1 " ) weight ( 0 ) max a m share ( 0 5 ) max resources ( " 4 0 9 6mb , 1 0vcores " ) build ( ) ) add queue ( new allocation file queue builder ( " queue 2 " ) weight ( 2 0f ) build ( ) ) add queue ( new allocation file queue builder ( " queue 3 " ) weight ( 0 0 0 0 0 0 1f ) build ( ) ) drf default queue scheduling policy ( ) write to file ( alloc file ) ; scheduler init ( conf ) ; scheduler start ( ) ; scheduler reinitialize ( conf , resource manager get r m context ( ) ) ; r m node node = mock nodes new node info ( 1 , resources create resource ( 8192 , 20 ) , 0 , " 127 0 0 1 " ) ; node added scheduler event node event = new node added scheduler event ( node ) ; node update scheduler event update event = new node update scheduler event ( node ) ; scheduler handle ( node event ) ; scheduler update ( ) ; / / create request for non - zero weight queue create scheduling request ( 1024 , " root queue 2 " , " user 2 " , 1 ) ; scheduler update ( ) ; scheduler handle ( update event ) ; / / a managed am which need 3g memory will not get resource , / / since it request more than the max a m share ( 4g * 0 5 = 2g ) resource am resource = resource new instance ( 1024 , 1 ) ; int am priority = r m app attempt impl am container priority get priority ( ) ; application attempt id att id 1 = create app attempt id ( 1 , 1 ) ; create application with a m resource ( att id 1 , " root queue 1 " , " user 1 " , am resource ) ; create scheduling request existing application ( 3 * 1024 , 1 , am priority , att id 1 ) ; f s app attempt app 1 = scheduler get scheduler app ( att id 1 ) ; scheduler update ( ) ; scheduler handle ( update event ) ; assert equals ( " application 1 should not be running " , 0 , app 1 get live containers ( ) size ( ) ) ; / / a managed am which need 2g memory will get resource , / / since it request no more than the max a m share ( 4g * 0 5 = 2g ) application attempt id att id 2 = create app attempt id ( 2 , 1 ) ; create application with a m resource ( att id 2 , " root queue 1 " , " user 1 " , am resource ) ; create scheduling request existing application ( 2 * 1024 , 1 , am priority , att id 2 ) ; f s app attempt app 2 = scheduler get scheduler app ( att id 2 ) ; scheduler update ( ) ; scheduler handle ( update event ) ; assert equals ( " application 2 should be running " , 1 , app 2 get live containers ( ) size ( ) ) ; / / a managed am which need 1g memory will get resource , even thought its / / fair share is 0 because its weight is tiny ( 0 000001 ) application attempt id att id 3 = create app attempt id ( 3 , 1 ) ; create application with a m resource ( att id 3 , " root queue 3 " , " user 1 " , am resource ) ; create scheduling request existing application ( 1024 , 1 , am priority , att id 3 ) ; f s app attempt app 3 = scheduler get scheduler app ( att id 3 ) ; scheduler update ( ) ; scheduler handle ( update event ) ; assert equals ( " application 3 should be running " , 1 , app 3 get live containers ( ) size ( ) ) ; }


construct a client - side proxy that implements the named protocol , talking to a server at the named address

public static < t > t get proxy ( class < t > protocol , long client version , inet socket address addr , user group information ticket , configuration conf , socket factory factory , int rpc timeout ) throws i o exception { return get protocol proxy ( protocol , client version , addr , ticket , conf , factory , rpc timeout , null ) get proxy ( ) ; }


request log list from the given { @ link task executor }

completable future < collection < log info > > request task manager log list ( resource i d task manager id , @ rpc timeout time timeout ) ;


public double [ ] get column ( int col ) { assert ( col > = 0 & & col < n ) : " invalid column index " ; double [ ] column data = new double [ m ] ; system arraycopy ( this data , col * m , column data , 0 , m ) ; return column data ; }


notepad pdb is here : < tesymbols notepad pdb xml does not exist repo location set to < tesymbols on windows , pdb file should be found on non - windows , pdb file should be found

public void test find pdb 6 ( ) throws exception { created files = create files ( pdb location symbols no subdir , pdb xml location none ) ; file pdb = pdb parser find p d b ( test program , false , symbols folder ) ; assert not null ( pdb ) ; assert equals ( pdb file , pdb ) ; }


called when the current request ignores cache

void on cache ignored ( @ cache ignored reason int reason ) ;


delete user this can only be done by the logged in user

public void delete user ( string username ) { / / todo : implement }


get the current item index the first item has the index 0


allows to override the users roles config file when the { @ link org elasticsearch test e s integ test case cluster scope } is set to { @ link org elasticsearch test e s integ test case scope # suite } or { @ link org elasticsearch test e s integ test case scope # test }

protected string config users roles ( ) { return security default settings config users roles ( ) ; }


check if the given range overlaps any existing field entries if it does return the first entry , otherwise return null

private entry < long , data type > check for overlap ( long offset , int size ) { entry < long , data type > res = offset to data type map floor entry ( offset ) ; if ( res ! = null ) { long last = res get key ( ) long value ( ) + res get value ( ) get length ( ) ; if ( offset < last ) { return res ; } } res = offset to data type map higher entry ( offset ) ; if ( res ! = null ) { long last = offset + size ; if ( res get key ( ) < last ) { return res ; } } return null ; }


creates a monitoring timestamped index using the current template version

protected void create timestamped index ( zoned date time creation date ) { create timestamped index ( creation date , monitoring template utils template version ) ; }


returns a { @ link decision } whether the given shard routing can be allocated on the given node the default is { @ link decision # always }

public decision can allocate ( shard routing shard routing , routing node node , routing allocation allocation ) { return decision always ; }


updated user this can only be done by the logged in user

void update user ( @ param ( " username " ) string username , user body ) ;


given a variable for a specified program , get the corresponding variable from the specified other program

public static variable get variable ( program program , variable var , program other program ) { symbol s = get symbol ( var get symbol ( ) , other program ) ; return s ! = null ? ( variable ) s get object ( ) : null ; }


test for the case when the application tag based placement is enabled and there is only one wrongly qualified user ' userid = ' passed with application tag expected behaviour : the placement is done for the submitting user ' user 1 '

public void test get user name for placement wrongly qualified user name in tag ( ) throws yarn exception { string user = " user 1 " ; string expected queue = " user 1 queue " ; string user name from app tag = " " ; string wrong user id tag = user id prefix ; set application tags ( " tag 1 " , wrong user id tag , " tag 2 " ) ; enable application tag placement ( true , user ) ; verify placement username ( expected queue , user , user name from app tag , user ) ; }


protected principal build resolved principal ( final string id , final map < string , list < object > > attributes , final credential credential , final optional < principal > current principal , final optional < authentication handler > handler ) { return context get principal factory ( ) create principal ( id , attributes ) ; }


gets the target as a relative offset from the given base address , as a code unit this will throw if the value is out of the range of a signed code unit

public final short get target unit ( int base address ) { int relative target = get target ( base address ) ; if ( relative target ! = ( short ) relative target ) { throw new dex exception ( " target out of range : " + hex s 4 ( relative target ) ) ; } return ( short ) relative target ; }


return an iterator wrapping the join collector

protected resetable iterator < tuple writable > get delegate ( ) { return new join delegation iterator ( ) ; }


public string api test filename ( string template name , string tag ) { string suffix = api test template files ( ) get ( template name ) ; return api test file folder ( ) + file separator + to api test filename ( tag ) + suffix ; }


returns true if anonymous access is allowed by the repository

boolean allow anonymous access ( ) { return anonymous access c b ! = null & & anonymous access c b is selected ( ) ; }


public string get owner ( ) { return owner ; }


returns the reason text as per < a href = " https : tools ietf orghtmlrfc 6 4 5 5 # section - 7 4 " > rfc 6455 if a reason text is not supplied , an empty string is returned

public string reason text ( ) { byte buf binary data = content ( ) ; if ( binary data = = null | | binary data capacity ( ) < = 2 ) { return " " ; } binary data reader index ( 2 ) ; string reason text = binary data to string ( charset util utf 8 ) ; binary data reader index ( 0 ) ; return reason text ; }


ensures that the given classes are initialized , as described in < a href = " http : java sun comdocsbooksjlsthird editionhtmlexecution html # 12 4 2 " > jls section 12 4 2 warning : normally it ' s a smell if a class needs to be explicitly initialized , because static state hurts system maintainability and testability in cases when you have no choice while inter - operating with a legacy framework , this method helps to keep the code less ugly

public static void initialize ( class < ? > classes ) { for ( class < ? > clazz : classes ) { try { class for name ( clazz get name ( ) , true , clazz get class loader ( ) ) ; } catch ( class not found exception e ) { throw new assertion error ( e ) ; } } }


the non - virtual proto sources of the { @ code proto library } declaring this provider different from { @ link # get direct proto sources ( ) } if a transitive dependency has { @ code import prefix } or the like

public immutable list < artifact > get original direct proto sources ( ) { return original direct proto sources ; }


signals that transformation has produced a result if { @ code needs more data } , { @ link # process ( ) } will be called again with a new element ( or with { @ link optional # empty ( ) } if there are no more elements ) if not @ { code needs more data } , { @ link # process ( ) } will be called again with the same element

public static < t > transformation state < t > of result ( t result , boolean needs more data ) { return new transformation state < > ( type result , needs more data , optional of ( result ) , optional empty ( ) ) ; }


create an appropriate { @ code job story producer } object for the given trace

protected job story producer create job story producer ( string trace in , configuration conf ) throws i o exception { if ( " - " equals ( trace in ) ) { return new zombie job producer ( system in , null ) ; } return new zombie job producer ( new path ( trace in ) , null , conf ) ; }


short version of execute ( ) action get ( )

public response get ( ) { return execute ( ) action get ( ) ; }


this method parses all data types specifically , it parses void , data indirect types , function indirect types , and all types parsed by parse primary data type ( )

public static m d data type parse data type ( m d mang dmang , boolean is highest ) throws m d exception { m d data type dt ; char code = dmang peek ( ) ; switch ( code ) { case ' ? ' : dmang increment ( ) ; dt = new m d modifier type ( dmang ) ; break ; case ' x ' : / / the wiki document says ' x ' can be void or coclass , but we have never been able / / to make coclass manifest itself , so we are factoring out the code that could / / have allowed it : this was m d mang x void permitted ( ) , which read a flag from / / m d context the ability is also being factored out of m d context dmang increment ( ) ; dt = new m d void data type ( dmang ) ; break ; case m d mang done : throw new m d exception ( " type code not expected : " + code ) ; default : dt = parse primary data type ( dmang , is highest ) ; break ; } return dt ; }


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


test the property ' array array of integer '

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


gets the count of all fields including hidden fields

public int get all field count ( ) { return all fields size ( ) ; }


return the isolation level for the current transaction , if any to be called by resource management code when preparing a newly created resource ( for example , a jdbc connection )

public static integer get current transaction isolation level ( ) { return current transaction isolation level get ( ) ; }


returns a { @ link monitored system } supported by the monitoring bulk api

private static monitored system random system ( ) { return random from ( monitored system logstash , monitored system kibana , monitored system beats ) ; }


if this method is not called , the { @ link # default timeout } will be used

public http request builder timeout ( int time out ) { validate ( ) ; http request set time out ( time out ) ; return this ; }


public static mapping rule result create skip result ( ) { return result skip ; }


get an iterator over a given range of keys this iterator must be closed after use the returned iterator must be safe from { @ link java util concurrent modification exception } s and must not return null values order is not guaranteed as bytes lexicographical ordering might not represent key order

key value iterator < k , v > range ( k from , k to ) ;


gets the size of the byte buffer if it is valid otherwise , an exception is raised

public synchronized int size ( ) { ensure valid ( ) ; return m size ; }


get the node that the allocator will assign the shard to , returning { @ code null } if there is no node to which the shard will be assigned or moved if { @ link # is decision taken ( ) } returns { @ code false } , then invoking this method will throw an { @ code illegal state exception }

public discovery node get target node ( ) { check decision state ( ) ; return target node ; }


protected response build saml 2 response ( final object cas assertion , final request abstract type authn request , final saml registered service service , final saml registered service service provider metadata facade adaptor , final http servlet request request , final http servlet response response , final string binding , final message context message context ) { return ( response ) get saml response builder configuration context ( ) get saml soap response builder ( ) build ( authn request , request , response , cas assertion , service , adaptor , binding , message context ) ; }


public float get float ( ) { return float ; }


retrieves the given blob note that if a { @ link blob cache service } is used , it may try to access the { @ link blob server } to retrieve the blob

static file get ( blob service service , @ nullable job i d job id , blob key key ) throws i o exception { if ( key instanceof permanent blob key ) { return service get permanent blob service ( ) get file ( job id , ( permanent blob key ) key ) ; } else if ( job id = = null ) { return service get transient blob service ( ) get file ( ( transient blob key ) key ) ; } else { return service get transient blob service ( ) get file ( job id , ( transient blob key ) key ) ; } }


return the { @ link version } on which this index has been created this information is typically useful for backward compatibility

public version get creation version ( ) { return index created version ; }


set < endpoint pair < n > > edges ( ) ; / / / / graph properties / /


he did the bash , he did the future bash the future bash , it was a concurrency smash he did the bash , it caught on in a flash he did the bash , he did the future bash

public void test future bash ( ) { final cyclic barrier barrier = new cyclic barrier ( 6 / / for the setter threads + 50 / / for the listeners + 50 / / for the blocking get threads , + 1 ) ; / / for the main thread final executor service executor = executors new fixed thread pool ( barrier get parties ( ) ) ; final atomic reference < abstract future < string > > current future = atomics new reference ( ) ; final atomic integer num successful set calls = new atomic integer ( ) ; callable < void > complete successfully runnable = new callable < void > ( ) { @ override public void call ( ) { if ( current future get ( ) set ( " set " ) ) { num successful set calls increment and get ( ) ; } await unchecked ( barrier ) ; return null ; } } ; callable < void > complete exceptionally runnable = new callable < void > ( ) { exception failure cause = new exception ( " set exception " ) ; @ override public void call ( ) { if ( current future get ( ) set exception ( failure cause ) ) { num successful set calls increment and get ( ) ; } await unchecked ( barrier ) ; return null ; } } ; callable < void > cancel runnable = new callable < void > ( ) { @ override public void call ( ) { if ( current future get ( ) cancel ( true ) ) { num successful set calls increment and get ( ) ; } await unchecked ( barrier ) ; return null ; } } ; callable < void > set future complete successfully runnable = new callable < void > ( ) { listenable future < string > future = futures immediate future ( " set future " ) ; @ override public void call ( ) { if ( current future get ( ) set future ( future ) ) { num successful set calls increment and get ( ) ; } await unchecked ( barrier ) ; return null ; } } ; callable < void > set future complete exceptionally runnable = new callable < void > ( ) { listenable future < string > future = futures immediate failed future ( new exception ( " set future " ) ) ; @ override public void call ( ) { if ( current future get ( ) set future ( future ) ) { num successful set calls increment and get ( ) ; } await unchecked ( barrier ) ; return null ; } } ; callable < void > set future cancel runnable = new callable < void > ( ) { listenable future < string > future = futures immediate cancelled future ( ) ; @ override public void call ( ) { if ( current future get ( ) set future ( future ) ) { num successful set calls increment and get ( ) ; } await unchecked ( barrier ) ; return null ; } } ; final set < object > final results = collections synchronized set ( sets new identity hash set ( ) ) ; runnable collect results runnable = new runnable ( ) { @ override public void run ( ) { try { string result = uninterruptibles get uninterruptibly ( current future get ( ) ) ; final results add ( result ) ; } catch ( execution exception e ) { final results add ( e get cause ( ) ) ; } catch ( cancellation exception e ) { final results add ( cancellation exception class ) ; } finally { await unchecked ( barrier ) ; } } } ; runnable collect results timed get runnable = new runnable ( ) { @ override public void run ( ) { future < string > future = current future get ( ) ; while ( true ) { try { string result = uninterruptibles get uninterruptibly ( future , 0 , time unit seconds ) ; final results add ( result ) ; break ; } catch ( execution exception e ) { final results add ( e get cause ( ) ) ; break ; } catch ( cancellation exception e ) { final results add ( cancellation exception class ) ; break ; } catch ( timeout exception e ) { / / loop } } await unchecked ( barrier ) ; } } ; list < callable < ? > > all tasks = new array list < > ( ) ; all tasks add ( complete successfully runnable ) ; all tasks add ( complete exceptionally runnable ) ; all tasks add ( cancel runnable ) ; all tasks add ( set future complete successfully runnable ) ; all tasks add ( set future complete exceptionally runnable ) ; all tasks add ( set future cancel runnable ) ; for ( int k = 0 ; k < 50 ; k + + ) { / / for each listener we add a task that submits it to the executor directly for the blocking / / get usecase and another task that adds it as a listener to the future to exercise both / / racing add listener calls and add listener calls completing after the future completes final runnable listener = k % 2 = = 0 ? collect results runnable : collect results timed get runnable ; all tasks add ( executors callable ( listener ) ) ; all tasks add ( new callable < void > ( ) { @ override public void call ( ) throws exception { current future get ( ) add listener ( listener , executor ) ; return null ; } } ) ; } assert equals ( all tasks size ( ) + 1 , barrier get parties ( ) ) ; for ( int i = 0 ; i < 1000 ; i + + ) { collections shuffle ( all tasks ) ; final abstract future < string > future = new abstract future < string > ( ) { } ; current future set ( future ) ; for ( callable < ? > task : all tasks ) { @ suppress warnings ( " unused " ) / / https : / / errorprone info / bugpattern / future return value ignored future < ? > possibly ignored error = executor submit ( task ) ; } await unchecked ( barrier ) ; assert that ( future is done ( ) ) is true ( ) ; / / inspect state and ensure it is correct ! / / asserts that all get calling threads received the same value object result = iterables get only element ( final results ) ; if ( result = = cancellation exception class ) { assert true ( future is cancelled ( ) ) ; if ( future was interrupted ( ) ) { / / we were cancelled , it is possible that set future could have succeeded too assert that ( num successful set calls get ( ) ) is in ( range closed ( 1 , 2 ) ) ; } else { assert that ( num successful set calls get ( ) ) is equal to ( 1 ) ; } } else { assert that ( num successful set calls get ( ) ) is equal to ( 1 ) ; } / / reset for next iteration num successful set calls set ( 0 ) ; final results clear ( ) ; } executor shutdown ( ) ; }


returns { @ link ninja token } type of the token for the next non - space and non - comment token atafter current < code > position < code > position

public ninja token next token ( ) { preconditions check state ( step can advance ( ) ) ; while ( step can advance ( ) ) { / / first byte is checked right in constructor if ( step is seen zero ( ) ) { return push ( ninja token zero ) ; } byte b = step start byte ( ) ; switch ( b ) { case ' ' : case ' \ t ' : step skip spaces ( ) ; if ( step get position ( ) = = 0 | | ninja token newline equals ( iterables get last ( tokens , null ) ) ) { return push ( ninja token indent ) ; } / / save trailing whitespace as text in case it is meaningful if ( step get end ( ) = = fragment length ( ) ) { return push ( ninja token text ) ; } / / also treat any whitespace before a new line as trailing whitespace , and save it if ( step get end ( ) < fragment length ( ) ) { byte next byte = fragment byte at ( step get end ( ) ) ; if ( next byte = = ' \ r ' | | next byte = = ' \ n ' ) { return push ( ninja token text ) ; } } break ; case ' \ r ' : expected text kind = text kind identifier ; step process line feed new line ( ) ; return push ( ninja token newline ) ; case ' \ n ' : expected text kind = text kind identifier ; return push ( ninja token newline ) ; case ' # ' : step skip comment ( ) ; break ; case ' = ' : if ( text kind text equals ( expected text kind ) ) { step read text ( ) ; return push ( ninja token text ) ; } return push ( ninja token equals ) ; case ' : ' : return push ( ninja token colon ) ; case ' | ' : if ( text kind text equals ( expected text kind ) ) { step read text ( ) ; return push ( ninja token text ) ; } if ( step try read double pipe ( ) ) { return push ( ninja token pipe2 ) ; } if ( step try read pipe at ( ) ) { return push ( ninja token pipe at ) ; } return push ( ninja token pipe ) ; case ' $ ' : if ( step try skip escaped newline ( ) ) { break ; } if ( step try read variable in brackets ( ) | | step try read simple variable ( ) ) { return push ( ninja token variable ) ; } if ( step try read escaped literal ( ) ) { return push ( ninja token escaped text ) ; } step force error ( " bad $ - escape ( literal $ must be written as $ $ ) " ) ; return push ( ninja token error ) ; default : switch ( expected text kind ) { case text : step read text ( ) ; return push ( ninja token text ) ; case path : step read path ( ) ; return push ( ninja token text ) ; case identifier : step try read identifier ( ) ; if ( step get error ( ) = = null ) { byte [ ] bytes = step get bytes ( ) ; ninja token keyword token = keyword map get ( bytes [ 0 ] ) ; if ( keyword token ! = null & & ! ( interpret pool as variable & & ninja token pool equals ( keyword token ) ) & & arrays equals ( keyword token get bytes ( ) , bytes ) ) { return push ( keyword token ) ; } } return push ( ninja token identifier ) ; } throw new illegal state exception ( ) ; } if ( step can advance ( ) ) { step ensure end ( ) ; / / for all skipping cases : move to the next step step = step next step ( ) ; } } / / since we now capture trailing whitespace , this eof may be unreachable return push ( ninja token eof ) ; }


returns { @ code true } if { @ code elements } is a sorted collection using an ordering equivalent to { @ code comparator }

public static boolean has same comparator ( comparator < ? > comparator , iterable < ? > elements ) { check not null ( comparator ) ; check not null ( elements ) ; comparator < ? > comparator 2 ; if ( elements instanceof sorted set ) { comparator 2 = comparator ( ( sorted set < ? > ) elements ) ; } else if ( elements instanceof sorted iterable ) { comparator 2 = ( ( sorted iterable < ? > ) elements ) comparator ( ) ; } else { return false ; } return comparator equals ( comparator 2 ) ; }


returns path of build file for specified package iff the specified package exists , null otherwise ( e g invalid package name , no build file , or package has been deleted via - - deleted packages ) the package ' s root directory may be computed by calling get parent file ( ) instances of this interface are required to cache the results this method must be thread - safe

path get build file for package ( package identifier package name ) ;


gets the address of the component containing the address of the unwind map , if there is one otherwise , this returns null

public address get component address of unwind map address ( ) throws invalid data type exception { check validity ( ) ; / / component 2 is unwind map pointer or displacement return e h data type utilities get component address ( get data type ( ) , unwind map ordinal , get mem buffer ( ) ) ; }


returns the equate at this operand field location

public equate get equate ( ) { return equate ; }


indicates whether the document ' s version will be included in the search hits

public boolean version ( ) { return version ; }


tests that the { @ link akka rpc service } can execute runnables

public void test execute runnable ( ) throws exception { final one shot latch latch = new one shot latch ( ) ; akka rpc service execute ( latch : : trigger ) ; latch await ( 30l , time unit seconds ) ; }


public abstract span create exit span ( final string operation name , final string remote peer ) { if ( is limit mechanism working ( ) ) { noop exit span span = new noop exit span ( remote peer ) ; return push ( span ) ; } abstract span exit span ; abstract span parent span = peek ( ) ; tracing context owner = this ; if ( parent span ! = null & & parent span is exit ( ) ) { exit span = parent span ; } else { final int parent span id = parent span = = null ? - 1 : parent span get span id ( ) ; exit span = new exit span ( span id generator + + , parent span id , operation name , remote peer , owner ) ; push ( exit span ) ; } exit span start ( ) ; return exit span ; }


public int get map value ( ) { return map value ; }


processes any remaining data { @ link # is ended ( ) } will return { @ code true } when no data remains

void play to end of stream ( ) throws write exception ;


return true if actions were created for the tree

boolean actions created ( ) { return cut action ! = null ; }


display a message in tools status bar this method is unavailable in headless mode

public void set tool status message ( string msg , boolean beep ) throws improper use exception { if ( is running headless ( ) ) { throw new improper use exception ( " the set tool status message ( ) method can only be used when running headed ghidra " ) ; } plugin tool tool = state get tool ( ) ; if ( tool = = null ) { if ( beep ) { printerr ( msg ) ; } return ; } tool set status info ( msg , beep ) ; }


void test deserialize junk data ( ) { try { under test deserialize ( read context , coded input stream new instance ( " junk " get bytes ( standard charsets utf 8 ) ) ) ; fail ( " expected exception " ) ; } catch ( serialization exception | i o exception e ) { / / expected } }


uploads two byte arrays for different jobs into the server via the { @ link blob server } file transfers should be successful

private void test put buffer successful get ( @ nullable job i d job id 1 , @ nullable job i d job id 2 , blob key blob type blob type ) throws i o exception { final configuration config = new configuration ( ) ; config set string ( blob server options storage directory , temporary folder new folder ( ) get absolute path ( ) ) ; try ( blob server server = new blob server ( config , new void blob store ( ) ) ) { server start ( ) ; byte [ ] data = new byte [ 2000000 ] ; rnd next bytes ( data ) ; byte [ ] data 2 = arrays copy of range ( data , 10 , 54 ) ; / / put data for job id 1 and verify blob key key 1a = put ( server , job id 1 , data , blob type ) ; assert not null ( key 1a ) ; / / second upload of same data should yield a different blob key blob key key 1a 2 = put ( server , job id 1 , data , blob type ) ; assert not null ( key 1a 2 ) ; verify key different hash equals ( key 1a , key 1a 2 ) ; blob key key 1b = put ( server , job id 1 , data 2 , blob type ) ; assert not null ( key 1b ) ; verify contents ( server , job id 1 , key 1a , data ) ; verify contents ( server , job id 1 , key 1a 2 , data ) ; verify contents ( server , job id 1 , key 1b , data 2 ) ; / / now put data for job id 2 and verify that both are ok blob key key 2a = put ( server , job id 2 , data , blob type ) ; assert not null ( key 2a ) ; verify key different hash equals ( key 1a , key 2a ) ; blob key key 2b = put ( server , job id 2 , data 2 , blob type ) ; assert not null ( key 2b ) ; verify key different hash equals ( key 1b , key 2b ) ; / / verify the accessibility and the blob contents verify contents ( server , job id 2 , key 2a , data ) ; verify contents ( server , job id 2 , key 2b , data 2 ) ; / / verify the accessibility and the blob contents one more time ( transient b l o bs should / / not be deleted here ) verify contents ( server , job id 1 , key 1a , data ) ; verify contents ( server , job id 1 , key 1a 2 , data ) ; verify contents ( server , job id 1 , key 1b , data 2 ) ; verify contents ( server , job id 2 , key 2a , data ) ; verify contents ( server , job id 2 , key 2b , data 2 ) ; } }


public object get user data ( ) { return user data ; }


given a directory path , return the s3 resource to it

public static string [ ] directory ( path path ) { string host = path to uri ( ) get host ( ) ; string key = path to key ( path ) ; if ( ! key is empty ( ) ) { return new string [ ] { resource ( host , key + " / " , true ) , resource ( host , key , false ) , resource ( host , key + " / " , false ) , } ; } else { return new string [ ] { resource ( host , key , true ) , } ; } }


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


get the mapping from source file to build error

public map < resource file , build error > get all errors ( ) { return collections unmodifiable map ( build errors ) ; }


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


public boolean use logical u r i ( ) { return false ; }


public string get username ( ) { return username ; }


return the string that was parsed into this pattern

public string get original pattern ( ) { return original pattern ; }


set whether to optimize as read - only transaction default is " false " the read - only flag applies to any transaction context , whether backed by an actual resource transaction ( { @ link # propagation required } { @ link # propagation requires new } ) or operating non - transactionally at the resource level ( { @ link # propagation supports } ) in the latter case , the flag will only apply to managed resources within the application , such as a hibernate { @ code session } this just serves as a hint for the actual transaction subsystem ; it will not necessarily cause failure of write access attempts a transaction manager which cannot interpret the read - only hint will not throw an exception when asked for a read - only transaction

public final void set read only ( boolean read only ) { this read only = read only ; }


add a decision node space for the child nodes is allocated

public tree node builder add junction ( int node index , int feature index , boolean is default left , double decision threshold ) { int left child = num nodes + + ; int right child = num nodes + + ; nodes ensure capacity ( node index + 1 ) ; for ( int i = nodes size ( ) ; i < node index + 1 ; i + + ) { nodes add ( null ) ; } tree node builder node = tree node builder ( node index ) set default left ( is default left ) set left child ( left child ) set right child ( right child ) set split feature ( feature index ) set threshold ( decision threshold ) ; nodes set ( node index , node ) ; / / allocate space for the child nodes while ( nodes size ( ) < = right child ) { nodes add ( null ) ; } return node ; }


< code > optional aapt pb raw string raw str = 3 ; < code >

private void merge raw str ( com android aapt resources raw string value ) { if ( raw str ! = null & & raw str ! = com android aapt resources raw string get default instance ( ) ) { raw str = com android aapt resources raw string new builder ( raw str ) merge from ( value ) build partial ( ) ; } else { raw str = value ; } bit field 0 | = 0x 0 0 0 0 0 0 0 4 ; }


the user customised the output of the error messages - flush the buffered content into the main { @ link javax servlet jsp jsp writer }

protected void flush buffered body content ( body content body content ) throws jsp exception { try { body content write out ( body content get enclosing writer ( ) ) ; } catch ( i o exception ex ) { throw new jsp exception ( " unable to write buffered body content " , ex ) ; } }


reads from file and makes sure that it matches the pattern

static void check full file ( file system fs , path name , final long file size ) throws i o exception { / / read in chunks of 128 mb final int read size = pattern length * 16 * 1024 * 1024 ; if ( read size > integer max value ) { throw new i o exception ( " a single read is too large " + read size ) ; } byte [ ] b = new byte [ read size ] ; long bytes to read = file size ; byte [ ] compb = new byte [ read size ] ; / / buffer with correct data for comparison if ( verify data ) { / / initialize compare buffer for ( int j = 0 ; j < read size ; j + + ) { compb [ j ] = pattern [ j % pattern length ] ; } } f s data input stream stm = fs open ( name ) ; while ( bytes to read > 0 ) { / / how many bytes we are reading in this iteration int thisread = ( int ) math min ( read size , bytes to read ) ; stm read fully ( b , 0 , thisread ) ; if ( verify data ) { / / verify data read if ( thisread = = read size ) { assert true ( " file is corrupted at or after byte " + ( file size - bytes to read ) , arrays equals ( b , compb ) ) ; } else { / / b was only partially filled by last read for ( int k = 0 ; k < thisread ; k + + ) { assert true ( " file is corrupted at or after byte " + ( file size - bytes to read ) , b [ k ] = = compb [ k ] ) ; } } } log debug ( " before update : to read : " + bytes to read + " ; read already : " + thisread ) ; bytes to read - = thisread ; log debug ( " after update : to read : " + bytes to read + " ; read already : " + thisread ) ; } stm close ( ) ; }


return the { @ link class loader } that should be used to load additional classes ( only { @ code null } if even the system class loader isn ' t accessible )


public < h extends method proxy > h get method proxy ( string name ) { return ( h ) m internal method proxies get ( name ) ; }


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


same to { @ link # send ( message ) } with message queue selector specified

public send result send ( message msg , message queue selector selector , object arg ) throws m q client exception , remoting exception , m q broker exception , interrupted exception { msg set topic ( with namespace ( msg get topic ( ) ) ) ; return this default m q producer impl send ( msg , selector , arg ) ; }


configure a runtime component catch { @ link runtime exception } and re - throw with a flink internal exception which is processed by cli frontend for display to the user

private void parameterize ( parameterized parameterized ) { try { parameterized configure ( parameters ) ; } catch ( runtime exception ex ) { throw new program parametrization exception ( ex get message ( ) ) ; } }


build a configuration - only copy of this advised support , replacing the target source

advised support get configuration only copy ( ) { advised support copy = new advised support ( ) ; copy copy from ( this ) ; copy target source = empty target source for class ( get target class ( ) , get target source ( ) is static ( ) ) ; copy advisor chain factory = this advisor chain factory ; copy interfaces = this interfaces ; copy advisors = this advisors ; return copy ; }


return the bytes of rsa decryption for hex string

public static byte [ ] decrypt hex string r s a ( final string data , final byte [ ] private key , final int key size , final string transformation ) { return decrypt r s a ( utils bridge hex string 2 bytes ( data ) , private key , key size , transformation ) ; }


returns the directory where object files are created

public static path fragment get obj directory ( label rule label , boolean use pic , boolean sibling repository layout ) { if ( use pic ) { return analysis utils get unique directory ( rule label , pic objs , sibling repository layout ) ; } else { return analysis utils get unique directory ( rule label , objs , sibling repository layout ) ; } }


add the given { @ link byte buf } be aware that this method does not increase the { @ code writer index } of the { @ link composite byte buf } if you need to have it increased use { @ link # add component ( boolean , byte buf ) } { @ link byte buf # release ( ) } ownership of { @ code buffer } is transferred to this { @ link composite byte buf }

public composite byte buf add component ( byte buf buffer ) { return add component ( false , buffer ) ; }


public string get url ( ) { return this url ; }


set the parent of this application context the parent { @ linkplain application context # get environment ( ) environment } is { @ linkplain configurable environment # merge ( configurable environment ) merged } with this ( child ) application context environment if the parent is non - { @ code null } and its environment is an instance of { @ link configurable environment }

public void set parent ( @ nullable application context parent ) { this parent = parent ; if ( parent ! = null ) { environment parent environment = parent get environment ( ) ; if ( parent environment instanceof configurable environment ) { get environment ( ) merge ( ( configurable environment ) parent environment ) ; } } }


use { @ link net utils # create socket addr ( string ) } instead

public static inet socket address create socket addr ( string target ) { return net utils create socket addr ( target ) ; }


private static void sneaky throw ( throwable t ) { class sneaky thrower < t extends throwable > { @ suppress warnings ( " unchecked " ) / / not really safe , but that ' s the point void throw it ( throwable t ) throws t { throw ( t ) t ; } } new sneaky thrower < error > ( ) throw it ( t ) ; }


construct a composed { @ link converter } that first applies this { @ link converter } to its input , and then applies the { @ code after } { @ link converter } to the result

default < u > converter < s , u > and then ( converter < ? super t , ? extends u > after ) { assert not null ( after , " after converter must not be null " ) ; return ( s s ) - > { t initial result = convert ( s ) ; return ( initial result ! = null ? after convert ( initial result ) : null ) ; } ; }


private input stream get test jpeg input stream ( ) { return get test image input stream ( " redsquare jpg " ) ; }


gets the type associated with this instance


returns an array containing containing only elements found in { @ code first } and also in { @ code second } the returned elements are in the same order as in { @ code first }

public static < t > t [ ] intersect ( class < t > array type , t [ ] first , t [ ] second ) { list < t > result = intersect ( first , second ) ; return result to array ( ( t [ ] ) array new instance ( array type , result size ( ) ) ) ; }


example where we subscribe on the computation scheduler for this we need the { @ link hystrix context scheduler } , that passes the { @ link hystrix request context } to the thread that runs the action

public void should collapse requests async ( ) { final hystrix context scheduler context aware scheduler = new hystrix context scheduler ( schedulers computation ( ) ) ; final int no of requests = 10 ; final map < integer , test subscriber < string > > subscribers by number = new hash map < integer , test subscriber < string > > ( no of requests ) ; test subscriber < string > subscriber ; for ( int number = 0 ; number < no of requests ; number + + ) { subscriber = new test subscriber < string > ( ) ; final int final number = number ; / / defer and subscribe on specific scheduler observable defer ( new func 0 < observable < string > > ( ) { @ override public observable < string > call ( ) { return new observable collapser get word for number ( final number ) to observable ( ) ; } } ) subscribe on ( context aware scheduler ) subscribe ( subscriber ) ; subscribers by number put ( number , subscriber ) ; / / wait a little bit after running half of the requests so that we don ' t collapse all of them into one batch / / todo this can probably be improved by using a test scheduler if ( number = = no of requests / 2 ) sleep ( 1000 ) ; } assert that ( subscribers by number size ( ) , is ( no of requests ) ) ; for ( final entry < integer , test subscriber < string > > subscriber by number : subscribers by number entry set ( ) ) { subscriber = subscriber by number get value ( ) ; subscriber await terminal event ( 10 , time unit seconds ) ; assert that ( subscriber get on error events ( ) to string ( ) , subscriber get on error events ( ) size ( ) , is ( 0 ) ) ; assert that ( subscriber get on next events ( ) size ( ) , is ( 1 ) ) ; final string word = subscriber get on next events ( ) get ( 0 ) ; system out println ( " translated " + subscriber by number get key ( ) + " to " + word ) ; assert that ( word , equal to ( number to word ( subscriber by number get key ( ) ) ) ) ; } assert true ( observable collapser get word for number get cmd count ( ) > 1 ) ; assert true ( observable collapser get word for number get cmd count ( ) < no of requests ) ; }


verify whether auth to local rules transform a principal name having a local user name " bar @ foo com " may be harmless , so it is noted at info however if what was intended is a transformation to " bar " it can be difficult to debug , hence this check

protected void validate short name ( ) { failif ( principal = = null , cat kerberos , " no principal defined " ) ; try { kerberos name kn = new kerberos name ( principal ) ; string result = kn get short name ( ) ; if ( non simple pattern matcher ( result ) find ( ) ) { warn ( cat kerberos , principal + " short name : " + result + " still contains @ or / " ) ; } } catch ( i o exception e ) { throw new kerberos diags failure ( cat kerberos , e , " failed to get short name for " + principal , e ) ; } catch ( illegal argument exception e ) { error ( cat kerberos , " kerberos name ( " + principal + " ) failed : % s \ n % s " , e , string utils stringify exception ( e ) ) ; } }


arguments must be the native container type for the corresponding sql types returns a value in the native container type corresponding to the declared sql return type

private object invoke ( built in scalar function implementation function , sql function properties properties , list < object > arguments ) { method handle method = function get method handle ( ) ; / / handle function on instance method , to allow use of fields method = bind instance factory ( method , function ) ; if ( method type ( ) parameter count ( ) > 0 & & method type ( ) parameter type ( 0 ) = = sql function properties class ) { method = method bind to ( properties ) ; } list < object > actual arguments = new array list < > ( ) ; for ( int i = 0 ; i < arguments size ( ) ; i + + ) { object argument = arguments get ( i ) ; argument property argument property = function get argument property ( i ) ; if ( argument property get argument type ( ) = = value type ) { if ( function get argument property ( i ) get null convention ( ) = = return null on null ) { if ( argument = = null ) { return null ; } actual arguments add ( argument ) ; } else if ( function get argument property ( i ) get null convention ( ) = = use null flag ) { boolean is null = argument = = null ; if ( is null ) { argument = defaults default value ( method type ( ) parameter type ( actual arguments size ( ) ) ) ; } actual arguments add ( argument ) ; actual arguments add ( is null ) ; } else { actual arguments add ( argument ) ; } } else { argument = as interface instance ( argument property get lambda interface ( ) , ( method handle ) argument ) ; actual arguments add ( argument ) ; } } try { return method invoke with arguments ( actual arguments ) ; } catch ( throwable throwable ) { throw propagate ( throwable ) ; } }


do something with the given jndi context implementations don ' t need to worry about error handling or cleanup , as the jndi template class will handle this

t do in context ( context ctx ) throws naming exception ;


add a child to this node based upon matched token it creates a terminal node impl rather than using { @ link parser # create terminal node ( parser rule context , token ) } i ' m leaving this in for compatibility but the parser doesn ' t use this anymore

public terminal node add child ( token matched token ) { terminal node impl t = new terminal node impl ( matched token ) ; add any child ( t ) ; t set parent ( this ) ; return t ; }


an icon file path associated to a specific size

public string get icon file path ( string size ) { if ( ! string utils is blank ( get icon file path pattern ( ) ) ) { return get icon file path pattern ( ) replace ( " : size " , size ) ; } return null ; }


method invoked if the request failed there are two main categories of failures : connection failures ( usually { @ link java io i o exception } s , or responses that were treated as errors based on their error response code ( { @ link response exception } s )

void on failure ( exception exception ) ;


public void load ( ) throws i o exception { final file nodes dir = get nodes dir ( ) ; final file [ ] subdirs = nodes dir list files ( new file filter ( ) { public boolean accept ( file child ) { return child is directory ( ) ; } } ) ; final map < string , node > new nodes = new tree map < > ( ) ; if ( subdirs ! = null ) { for ( file subdir : subdirs ) { try { xml file xml file = new xml file ( jenkins xstream , new file ( subdir , " config xml " ) ) ; if ( xml file exists ( ) ) { node node = ( node ) xml file read ( ) ; new nodes put ( node get node name ( ) , node ) ; } } catch ( i o exception e ) { logger get logger ( nodes class get name ( ) ) log ( level warning , " could not load " + subdir , e ) ; } } } queue with lock ( new runnable ( ) { @ override public void run ( ) { nodes entry set ( ) remove if ( string node entry - > ! ( string node entry get value ( ) instanceof ephemeral node ) ) ; nodes put all ( new nodes ) ; jenkins update computer list ( ) ; jenkins trim labels ( ) ; } } ) ; }


called by index shard to record estimated bytes written to translog for the operation

private void record operation bytes ( engine operation operation , engine result result ) { if ( result get result type ( ) = = engine result type success ) { status checker bytes written ( operation estimated size in bytes ( ) ) ; } }


like { @ link # has dependencies } but omitting optional dependencies

public boolean has mandatory dependencies ( ) { return dependencies stream ( ) any match ( d - > ! d optional ) ; }


public void visit switch ( int opcode , int offset , int length , switch list cases , int padding ) { clear ( ) ; }


validate setup generate dist cache data by validating permissions of the distributed cache directories and content of the generated sequence file this includes validation of dist cache file paths and their file sizes

private void validate setup gen d c ( configuration job conf , long [ ] sorted file sizes ) throws i o exception , interrupted exception { / / build things needed for validation long sum of file sizes = 0 ; for ( int i = 0 ; i < sorted file sizes length ; i + + ) { sum of file sizes + = sorted file sizes [ i ] ; } file system fs = file system get ( job conf ) ; assert equals ( " number of distributed cache files to be generated is wrong " , sorted file sizes length , job conf get int ( generate dist cache data gridmix distcache file count , - 1 ) ) ; assert equals ( " total size of dist cache files to be generated is wrong " , sum of file sizes , job conf get long ( generate dist cache data gridmix distcache byte count , - 1 ) ) ; path files list file = new path ( job conf get ( generate dist cache data gridmix distcache file list ) ) ; file status stat = fs get file status ( files list file ) ; assert equals ( " wrong permissions of dist cache files list file " + files list file , new fs permission ( ( short ) 0644 ) , stat get permission ( ) ) ; input split split = new file split ( files list file , 0 , stat get len ( ) , ( string [ ] ) null ) ; task attempt context task context = map reduce test util create dummy map task attempt context ( job conf ) ; record reader < long writable , bytes writable > reader = new generate dist cache data gen d c data format ( ) create record reader ( split , task context ) ; map context < long writable , bytes writable , null writable , bytes writable > map context = new map context impl < long writable , bytes writable , null writable , bytes writable > ( job conf , task context get task attempt i d ( ) , reader , null , null , map reduce test util create dummy reporter ( ) , split ) ; reader initialize ( split , map context ) ; / / start validating setup generate dist cache data do validate setup gen d c ( reader , fs , sorted file sizes ) ; }


public static protos command info uri uri ( mesos artifact resolver resolver , container specification artifact artifact ) { check not null ( resolver ) ; check not null ( artifact ) ; option < url > url = resolver resolve ( artifact dest ) ; if ( url is empty ( ) ) { throw new illegal argument exception ( " unresolvable artifact : " + artifact dest ) ; } return protos command info uri new builder ( ) set value ( url get ( ) to external form ( ) ) set output file ( artifact dest to string ( ) ) set extract ( artifact extract ) set cache ( artifact cachable ) set executable ( artifact executable ) build ( ) ; }


skips the next token , consuming it this method is intended for use when the json token stream contains unrecognized or unhandled names this throws a { @ link json data exception } if this parser has been configured to { @ linkplain # fail on unknown fail on unknown } names

public abstract void skip name ( ) throws i o exception ;


boolean capture open files ( ) { return capture open files ; }


load bean definitions from the given groovy scripts or xml files note that " xml " files will be parsed as xml content ; all other kinds of resources will be parsed as groovy scripts

public void load ( resource resources ) { this reader load bean definitions ( resources ) ; }


boolean append record and insert ( binary row data record , int hash code ) throws i o exception { final int pos hash code = find bucket ( hash code ) ; / / get the bucket for the given hash code final int bucket array pos = pos hash code > > table buckets per segment bits ; final int bucket in segment pos = ( pos hash code & table buckets per segment mask ) < < bucket size bits ; final memory segment bucket = this buckets [ bucket array pos ] ; if ( ! table try distinct build row | | ! partition is in memory ( ) | | ! find first same build row ( bucket , hash code , bucket in segment pos , record ) ) { int pointer = partition insert into build buffer ( record ) ; if ( pointer ! = - 1 ) { / / record was inserted into an in - memory partition a pointer must be inserted into / / the buckets insert to bucket ( bucket , bucket in segment pos , hash code , pointer , true ) ; return true ; } else { return false ; } } else { / / distinct build rows in memory return true ; } }


return the existing bean definition for the same name

public bean definition get existing definition ( ) { return this existing definition ; }


acquires a single permit from this { @ code rate limiter } , blocking until the request can be granted tells the amount of time slept , if any this method is equivalent to { @ code acquire ( 1 ) }

public double acquire ( ) { return acquire ( 1 ) ; }


test to validate fix for act - 1939 : history service loads invalid task local variables for completed task

public void test variable update order historic task instance ( ) throws exception { process instance process instance = runtime service start process instance by key ( " historic task " ) ; task task = task service create task query ( ) process instance id ( process instance get id ( ) ) single result ( ) ; assert that ( task ) is not null ( ) ; / / update task and process - variable 10 times for ( int i = 0 ; i < 10 ; i + + ) { task service set variable local ( task get id ( ) , " task var " , i ) ; runtime service set variable ( task get execution id ( ) , " proc var " , i ) ; } task service complete ( task get id ( ) ) ; / / check if all variables have the value for the latest revision historic task instance task instance = history service create historic task instance query ( ) task id ( task get id ( ) ) include process variables ( ) single result ( ) ; object var value = task instance get process variables ( ) get ( " proc var " ) ; assert that ( var value ) is equal to ( 9 ) ; task instance = history service create historic task instance query ( ) task id ( task get id ( ) ) include task local variables ( ) single result ( ) ; var value = task instance get task local variables ( ) get ( " task var " ) ; assert that ( var value ) is equal to ( 9 ) ; }


see if any of removed storages is " writable " again , and can be returned into service

void attempt restore removed storage ( ) { / / if directory is " alive " - copy the images there if ( ! restore failed storage | | removed storage dirs size ( ) = = 0 ) { return ; / / nothing to restore } / * we don ' t want more than one thread trying to restore at a time * / synchronized ( this restoration lock ) { log info ( " n n storage attempt restore removed storage : check removed ( failed ) " + " storage removed storages size = { } " , removed storage dirs size ( ) ) ; for ( storage directory sd : this removed storage dirs ) { file root = sd get root ( ) ; log info ( " currently disabled dir { } ; type = { } ; canwrite = { } " , root get absolute path ( ) , sd get storage dir type ( ) , file util can write ( root ) ) ; if ( root exists ( ) & & file util can write ( root ) ) { log info ( " restoring dir { } " , sd get root ( ) get absolute path ( ) ) ; this add storage dir ( sd ) ; / / restore this removed storage dirs remove ( sd ) ; } } } }


removes reliable blocks from the block list of a datanode

private void prune reliable blocks ( final datanode descriptor datanode , abstract list < block info > blocks ) { process blocks internal ( datanode , blocks iterator ( ) , null , true ) ; }


public void set parallelism ( int parallelism ) { if ( parallelism < 1 ) { throw new illegal argument exception ( " the parallelism must be at least one " ) ; } this parallelism = parallelism ; }


public static boolean is reserved name ( i node inode ) { return check reserved file names & & arrays equals ( inode get local name bytes ( ) , dot reserved ) ; }


public void update ascii stream ( int column index , input stream x , int length ) throws s q l exception { }


public void options changed ( tool options new options , string option name , object old value , object new value ) { if ( ! model update in progress & & sub option equals ( option name ) ) { set prefered model ( new options ) ; } }


public < t > t get ( @ non null final string key ) { return get ( key , null ) ; }


tests that server accepts connections from a client configured with a valid certificate if client authentication is requested

public void test client authentication requested valid provided ( args args ) throws exception { args ssl server configs put ( broker security configs ssl client auth config , " requested " ) ; verify ssl configs ( args ) ; }


shorthand for { @ link query builder # build ( ) build ( ) } { @ link query # internal rx ( ) }

public rx query < t > rx ( ) { return build ( ) internal rx ( ) ; }


return the configured { @ link # set max frame payload length ( int ) max frame payload length }

public int get max frame payload length ( ) { return get websocket client spec ( ) max frame payload length ( ) ; }


returns the number of key - value pairs in this multimap < b > note : < b > this method does not return the number of distinct keys in the multimap , which is given by { @ code key set ( ) size ( ) } or { @ code as map ( ) size ( ) } see the opening section of the { @ link multimap } class documentation for clarification


test that clone directory works with file : prefix uses the file : prefix rather than file : because it should work on windows or linux

public void verify build with file prefix ( ) throws exception { val props = cas properties get service registry ( ) get git ( ) ; props set repository url ( " https : / / github com / mmoayyed / sample - data git " ) ; props set username ( " casuser " ) ; props set password ( " password " ) ; props set branches to clone ( " master " ) ; props get clone directory ( ) set location ( resource utils get raw resource from ( " file : / / " + file utils get temp directory path ( ) + file separator + uuid random u u i d ( ) to string ( ) ) ) ; val builder = git repository builder new instance ( props ) ; assert does not throw ( builder : : build ) ; }


returns the index of the first undefined symbol

public int get undefined symbol index ( ) { return iundefsym ; }


returns whether the request resulted in a write to the database

private boolean is read ( string line ) { return line char at ( line length ( ) - 1 ) = = ' - ' ; }


public single < void > rx update pet ( pet body , api client auth info auth info ) { return single create ( new io vertx rx java single on subscribe adapter < > ( fut - > delegate update pet ( body , auth info , fut ) ) ) ; }


the id of the process instance associated with this identity link


exposes the best available session mutex

protected object get flash maps mutex ( http servlet request request ) { return web utils get session mutex ( request get session ( ) ) ; }


public builder add lazy string ( @ nullable lazy string value ) { return add object internal ( value ) ; }


return the list of argument resolvers to use for { @ code @ init binder } methods including built - in and custom resolvers

private list < handler method argument resolver > get default init binder argument resolvers ( ) { list < handler method argument resolver > resolvers = new array list < > ( 20 ) ; / / annotation - based argument resolution resolvers add ( new request param method argument resolver ( get bean factory ( ) , false ) ) ; resolvers add ( new request param map method argument resolver ( ) ) ; resolvers add ( new path variable method argument resolver ( ) ) ; resolvers add ( new path variable map method argument resolver ( ) ) ; resolvers add ( new matrix variable method argument resolver ( ) ) ; resolvers add ( new matrix variable map method argument resolver ( ) ) ; resolvers add ( new expression value method argument resolver ( get bean factory ( ) ) ) ; resolvers add ( new session attribute method argument resolver ( ) ) ; resolvers add ( new request attribute method argument resolver ( ) ) ; / / type - based argument resolution resolvers add ( new servlet request method argument resolver ( ) ) ; resolvers add ( new servlet response method argument resolver ( ) ) ; / / custom arguments if ( get custom argument resolvers ( ) ! = null ) { resolvers add all ( get custom argument resolvers ( ) ) ; } / / catch - all resolvers add ( new principal method argument resolver ( ) ) ; resolvers add ( new request param method argument resolver ( get bean factory ( ) , true ) ) ; return resolvers ; }


this is to test backward compatibility of reflection utils for job configurable objects this should be made deprecated along with the mapred package hadoop - 1230 should be removed when mapred package is removed

public void test set conf ( ) { job configurable ob ob = new job configurable ob ( ) ; reflection utils set conf ( ob , new configuration ( ) ) ; assert false ( ob configured ) ; reflection utils set conf ( ob , new job conf ( ) ) ; assert true ( ob configured ) ; }


it is possible to get the token count in a search response

public void test search returns token count ( ) throws i o exception { init ( ) ; assert search returns ( search by id ( " single " ) , " single " ) ; assert search returns ( search by id ( " bulk 1 " ) , " bulk 1 " ) ; assert search returns ( search by id ( " bulk 2 " ) , " bulk 2 " ) ; assert search returns ( search by id ( " multi " ) , " multi " ) ; assert search returns ( search by id ( " multibulk 1 " ) , " multibulk 1 " ) ; assert search returns ( search by id ( " multibulk 2 " ) , " multibulk 2 " ) ; }


public long execute large update ( string sql , int auto generated keys ) throws s q l exception { connection mark commit state dirty ( ) ; return delegate execute large update ( sql , auto generated keys ) ; }


calculate score based on events count big decimal

protected big decimal calculate score based on events count ( final authentication authentication , final collection < ? extends cas event > events , final long count ) { if ( count = = events size ( ) ) { logger debug ( " principal [ { } ] is assigned to the lowest risk score with attempted count of [ { } ] " , authentication get principal ( ) , count ) ; return lowest risk score ; } return get final averaged score ( count , events size ( ) ) ; }


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


gets the physical location of the browser


protected string validate ( aggregation builder parent , af builder ) { return validate ( validation context for inside tree ( parent , null ) , builder ) ; }


return a predicate that represents the logical negation of this predicate

default request predicate negate ( ) { return new request predicates negate request predicate ( this ) ; }


returns a predicate that evaluates to { @ code true } if the object being tested { @ code equals ( ) } the given target or both are null

public static < t > predicate < t > equal to ( @ nullable decl t target ) { return ( target = = null ) ? predicates < t > is null ( ) : new is equal to predicate < t > ( target ) ; }


this parsing method assumes that the leading " suggest " field name has already been parsed by the caller

public static suggest from x content ( x content parser parser ) throws i o exception { ensure expected token ( x content parser token start object , parser current token ( ) , parser ) ; list < suggestion < ? extends entry < ? extends option > > > suggestions = new array list < > ( ) ; while ( ( parser next token ( ) ) ! = x content parser token end object ) { ensure expected token ( x content parser token field name , parser current token ( ) , parser ) ; string current field = parser current name ( ) ; ensure expected token ( x content parser token start array , parser next token ( ) , parser ) ; suggestion < ? extends entry < ? extends option > > suggestion = suggestion from x content ( parser ) ; if ( suggestion ! = null ) { suggestions add ( suggestion ) ; } else { throw new parsing exception ( parser get token location ( ) , string format ( locale root , " could not parse suggestion keyed as [ % s ] " , current field ) ) ; } } return new suggest ( suggestions ) ; } @ suppress warnings ( { " unchecked " , " rawtypes " }


initializes required egl parameters and creates the { @ link surface texture }

public void init ( @ secure mode int secure mode ) { display = get default display ( ) ; e g l config config = choose e g l config ( display ) ; context = create e g l context ( display , config , secure mode ) ; surface = create e g l surface ( display , config , context , secure mode ) ; generate texture ids ( texture id holder ) ; texture = new surface texture ( texture id holder [ 0 ] ) ; texture set on frame available listener ( this ) ; }


derive the model attribute name for the given method parameter based on a { @ code @ model attribute } parameter annotation ( if present ) or falling back on parameter type based conventions

public static string get name for parameter ( method parameter parameter ) { model attribute ann = parameter get parameter annotation ( model attribute class ) ; string name = ( ann ! = null ? ann value ( ) : null ) ; return ( string utils has text ( name ) ? name : conventions get variable name for parameter ( parameter ) ) ; }


static boolean enable erasure coding policy ( final f s namesystem fsn , string ec policy name , final boolean log retry cache ) throws i o exception { preconditions check not null ( ec policy name ) ; boolean success = fsn get erasure coding policy manager ( ) enable policy ( ec policy name ) ; if ( success ) { fsn get edit log ( ) log enable erasure coding policy ( ec policy name , log retry cache ) ; } return success ; }


sets the drawable at the specified index while keeping the old scale type and rounding in case the given drawable is null , scale type gets cleared too

private void set child drawable at index ( int index , @ nullable drawable drawable ) { if ( drawable = = null ) { m fade drawable set drawable ( index , null ) ; return ; } drawable = wrapping utils maybe apply leaf rounding ( drawable , m rounding params , m resources ) ; get parent drawable at index ( index ) set drawable ( drawable ) ; }


the resource names field in discovery request specifies a list of clusters to subscribe to updates for

public io grpc stub stream observer < io envoyproxy envoy api v 2 discovery request > stream endpoints ( io grpc stub stream observer < io envoyproxy envoy api v 2 discovery response > response observer ) { return io grpc stub client calls async bidi streaming call ( get channel ( ) new call ( get stream endpoints method ( ) , get call options ( ) ) , response observer ) ; }


returns true if avoid - first - lastclipping is enabled , false if not

public boolean is avoid first last clipping enabled ( ) { return m avoid first last clipping ; }


get the { @ link http 2 headers encoder configuration } for this { @ link http 2 frame writer }

http 2 headers encoder configuration headers configuration ( ) ;


returns { @ code true } if a character sequence contains no matching bmp characters equivalent to { @ code ! matches any of ( sequence ) } the default implementation iterates over the sequence , invoking { @ link # matches } for each character , until this returns { @ code true } or the end is reached

public boolean matches none of ( char sequence sequence ) { return index in ( sequence ) = = - 1 ; }


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


notification that bytes changed in the block

public void data changed ( memory block block , address addr , byte [ ] old data , byte [ ] new data ) ;


does the pattern at the given index match the given string ?

protected abstract boolean matches ( string pattern , int pattern index ) ;


obtain an instance of a component nested inside the given inspectable component

public inspectable component get nested instance ( component component ) { final queue < debug component > queue = new linked list < > ( m component get child components ( ) ) ; while ( ! queue is empty ( ) ) { final debug component child component = queue remove ( ) ; if ( child component get component ( ) = = component ) { return new inspectable component ( child component ) ; } queue add all ( child component get child components ( ) ) ; } return null ; }


customize the set of property sources with those appropriate for any standard java environment : { @ value # system properties property source name } { @ value # system environment property source name } properties present in { @ value # system properties property source name } will take precedence over those in { @ value # system environment property source name }

protected void customize property sources ( mutable property sources property sources ) { property sources add last ( new properties property source ( system properties property source name , get system properties ( ) ) ) ; property sources add last ( new system environment property source ( system environment property source name , get system environment ( ) ) ) ; }


return the minimal value from a set of values

static < t extends comparable < t > > t get min value script ( map < string , object > vars , t initial value , string field name , function < object , t > converter ) { t retval = initial value ; map < ? , ? > doc = ( map ) vars get ( " doc " ) ; script doc values < ? > values = ( script doc values < ? > ) doc get ( field name ) ; for ( object v : values ) { t value = converter apply ( v ) ; retval = ( value compare to ( retval ) < 0 ) ? value : retval ; } return retval ; }


spawn a thread to do periodic renewals of kerberos credentials never directly call this method this method should only be used for ticket cache based kerberos credentials

void spawn auto renewal thread for user creds ( boolean force ) { if ( ! force & & ( ! should relogin ( ) | | is from keytab ( ) ) ) { return ; } / / spawn thread only if we have kerb credentials kerberos ticket tgt = get t g t ( ) ; if ( tgt = = null ) { return ; } string cmd = conf get ( " hadoop kerberos kinit command " , " kinit " ) ; long next refresh = get refresh time ( tgt ) ; execute auto renewal task ( get user name ( ) , new ticket cache renewal runnable ( tgt , cmd , next refresh ) ) ; }


alter the current program change listener state for this auto - analysis manager note : method only has an affect only when invoked within the analysis thread ( i e , by an analyzer or analysis worker )

public boolean set ignore changes ( boolean state ) { if ( analysis thread ! = thread current thread ( ) ) { msg warn ( this , " auto analysis manager set ignore changes had no affect " + " since it was not invoked within the analysis thread " ) ; return ignore changes ; } return do set ignore changes ( state ) ; }


public void add permission ( string role , string resource , string action ) { string sql = " insert into permissions ( role , resource , action ) values ( ? , ? , ? ) " ; try { jt update ( sql , role , resource , action ) ; } catch ( cannot get jdbc connection exception e ) { log util fatal log error ( " [ db - error ] " + e to string ( ) , e ) ; throw e ; } }


public int join ( ) throws interrupted exception , i o exception { / / show what we are waiting for in the thread title / / since this involves some native work , let ' s have some soak period before enabling this by default thread t = thread current thread ( ) ; string old name = t get name ( ) ; if ( show pid ) { process tree o s process p = process tree get ( ) get ( proc ) ; t set name ( old name + " " + ( p ! = null ? " waiting for pid = " + p get pid ( ) : " waiting for " + name ) ) ; } try { int r = proc wait for ( ) ; / / see https : / / jenkins io / redirect / troubleshooting / process - leaked - file - descriptors / / problems like that shows up as infinite wait in join ( ) , which confuses great many users / / so let ' s do a timed wait here and try to diagnose the problem if ( copier ! = null ) copier join ( time unit seconds to millis ( 10 ) ) ; if ( copier 2 ! = null ) copier 2 join ( time unit seconds to millis ( 10 ) ) ; if ( ( copier ! = null & & copier is alive ( ) ) | | ( copier 2 ! = null & & copier 2 is alive ( ) ) ) { / / looks like handles are leaking / / closing these handles should terminate the threads string msg = " process leaked file descriptors see https : / / jenkins io / redirect / troubleshooting / process - leaked - file - descriptors for more information " ; throwable e = new exception ( ) fill in stack trace ( ) ; logger log ( level warning , msg , e ) ; / / doing proc get input stream ( ) close ( ) hangs in file input stream close 0 ( ) / / it could be either because another thread is blocking on read , or / / it could be a bug in windows jvm who knows / / so i ' m abandoning the idea of closing the stream / / try { / / proc get input stream ( ) close ( ) ; / / } catch ( i o exception x ) { / / logger log ( level fine , " stdin termination failed " , x ) ; / / } / / try { / / proc get error stream ( ) close ( ) ; / / } catch ( i o exception x ) { / / logger log ( level fine , " stderr termination failed " , x ) ; / / } out write ( msg get bytes ( ) ) ; out write ( ' \ n ' ) ; } return r ; } catch ( interrupted exception e ) { / / aborting kill the process destroy ( ) ; throw e ; } finally { t set name ( old name ) ; } }


returns a synchronized ( thread - safe ) { @ code sorted set multimap } backed by the specified multimap you must follow the warnings described in { @ link # synchronized multimap } the returned multimap will be serializable if the specified multimap is serializable

public static < k , v > sorted set multimap < k , v > synchronized sorted set multimap ( sorted set multimap < k , v > multimap ) { return synchronized sorted set multimap ( multimap , null ) ; }


enqueues an event to be run on currently known listeners the { @ code to string } method of the event itself will be used to describe the event in the case of an error

public void enqueue ( event < l > event ) { enqueue helper ( event , event ) ; }


model tests for additional properties boolean

public void test additional properties boolean ( ) { / / todo : test additional properties boolean }


public static string read assets 2 string ( final string assets file path ) { return read assets 2 string ( assets file path , null ) ; }


a simple test to test that for the configured ports , the resolver can return the current sasl properties

public void test resolver ( ) { configuration conf = new configuration ( ) ; conf set ( " ingress port sasl configured ports " , " 444 , 555 , 666 , 777 " ) ; conf set ( " ingress port sasl prop 444 " , " authentication " ) ; conf set ( " ingress port sasl prop 555 " , " authentication , privacy " ) ; conf set ( " ingress port sasl prop 666 " , " privacy " ) ; ingress port based resolver resolver = new ingress port based resolver ( ) ; resolver set conf ( conf ) ; / / the client address does not matter , give it a null assert equals ( " auth " , resolver get server properties ( null , 444 ) get ( sasl qop ) ) ; assert equals ( " auth , auth - conf " , resolver get server properties ( null , 555 ) get ( sasl qop ) ) ; assert equals ( " auth - conf " , resolver get server properties ( null , 666 ) get ( sasl qop ) ) ; assert equals ( " auth - conf " , resolver get server properties ( null , 777 ) get ( sasl qop ) ) ; assert equals ( " auth " , resolver get server properties ( null , 888 ) get ( sasl qop ) ) ; }


obtain a direct stream to read modified blocks of this buffer file based upon the specified change map

public input block stream get input block stream ( byte [ ] change map data ) throws i o exception { return new local random input block stream ( change map data ) ; }


replace the status bar with padded status bar

private static void replace status bar ( @ non nls final u i defaults defaults ) { defaults put ( " ide status bar u i " , m t status bar u i class get name ( ) ) ; defaults put ( m t status bar u i class get name ( ) , m t status bar u i class ) ; defaults put ( mtui status bar ide status bar border , new m t status bar border ( ) ) ; defaults put ( " separator u i " , m t separator u i class get name ( ) ) ; defaults put ( m t separator u i class get name ( ) , m t separator u i class ) ; }


get the dot product between this and the other quaternion ( commutative )

public float dot ( final float x , final float y , final float z , final float w ) { return this x * x + this y * y + this z * z + this w * w ; }


returns { @ code true } if this instance is a category - 2 constant , meaning it takes up two slots in the constant pool , or { @ code false } if this instance is category - 1

public abstract boolean is category 2 ( ) ;


public string get style ( ) { return style ; }


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


convenience method to set this bt indexed mesh to the specified { @ link mesh } the specified mesh must be indexed and triangulated and must outlive this bt indexed mesh the buffers for the vertices and indices are shared amonst both

public void set ( final mesh mesh ) { set ( mesh , mesh , 0 , mesh get num indices ( ) ) ; }


implementation of { @ link # get children } that will catch an interrupted exception and crash

private object get children uninterruptibly ( ) { if ( children instanceof listenable future ) { try { return more futures wait for future and get ( ( listenable future < object [ ] > ) children ) ; } catch ( interrupted exception e ) { system err println ( " an interrupted exception occurred during nested set deserialization , " + " exiting abruptly " ) ; bug report handle crash ( crash from ( e , exit code interrupted ) , crash context halt ( ) ) ; throw new illegal state exception ( " should have halted " , e ) ; } } else { return children ; } }


set the list of components that depend optionally on this plugin

public void set optional dependents ( @ non null set < string > optional dependents ) { this optional dependents = optional dependents ; }


called when a { @ link histogram } is removed from the registry

void on histogram removed ( string name ) ;


create a new builder with a { @ linkplain http status # created created } status and a location header set to the given uri

public static body builder created ( uri location ) { return status ( http status created ) location ( location ) ; }


when adding a series of numbers the order of the numbers should not impact the results this test shows that a naive summation comes up with a different result than kahan summation when you start with either a smaller or larger number in some cases and helps prove our kahan summation is working

public void test add 1 ( ) throws exception { final compensated sum small sum = new compensated sum ( 0 001 , 0 0 ) ; final compensated sum large sum = new compensated sum ( 1000 , 0 0 ) ; compensated sum compensated result 1 = small sum ; compensated sum compensated result 2 = large sum ; double naive result 1 = small sum value ( ) ; double naive result 2 = large sum value ( ) ; for ( int i = 0 ; i < 10 ; i + + ) { compensated result 1 = compensated result 1 add ( small sum ) ; compensated result 2 = compensated result 2 add ( small sum ) ; naive result 1 + = small sum value ( ) ; naive result 2 + = small sum value ( ) ; } compensated result 1 = compensated result 1 add ( large sum ) ; compensated result 2 = compensated result 2 add ( small sum ) ; naive result 1 + = large sum value ( ) ; naive result 2 + = small sum value ( ) ; / / kahan summation gave the same result no matter what order we added assert assert equals ( 1000 011 , compensated result 1 value ( ) , 0 0 ) ; assert assert equals ( 1000 011 , compensated result 2 value ( ) , 0 0 ) ; / / naive addition gave a small floating point error assert assert equals ( 1000 011 , naive result 1 , 0 0 ) ; assert assert equals ( 1000 0109999999997 , naive result 2 , 0 0 ) ; assert assert equals ( compensated result 1 value ( ) , compensated result 2 value ( ) , 0 0 ) ; assert assert equals ( naive result 1 , naive result 2 , 0 0001 ) ; assert assert not equals ( naive result 1 , naive result 2 , 0 0 ) ; }


gets the base address associated with the current cursor this differs from the cursor value when explicitly set ( by { @ link # set base address } ) this is used , in particular , to convey base addresses to switch data payload instructions , whose relative addresses are relative to the address of a dependant switch instruction

public final int base address for cursor ( ) { int index = base address map index of key ( cursor ) ; if ( index < 0 ) { return cursor ; } else { return base address map value at ( index ) ; } }


decodes a byte array from base 6 4 format no blanks or line breaks are allowed within the base 6 4 encoded input data

public static byte [ ] decode ( char [ ] in , int i off , int i len , byte [ ] inverse char map ) { if ( i len % 4 ! = 0 ) { throw new illegal argument exception ( " length of base 6 4 encoded input string is not a multiple of 4 " ) ; } while ( i len > 0 & & in [ i off + i len - 1 ] = = ' = ' ) { i len - - ; } int o len = ( i len * 3 ) / 4 ; byte [ ] out = new byte [ o len ] ; int ip = i off ; int i end = i off + i len ; int op = 0 ; while ( ip < i end ) { int i 0 = in [ ip + + ] ; int i 1 = in [ ip + + ] ; int i 2 = ip < i end ? in [ ip + + ] : ' a ' ; int i 3 = ip < i end ? in [ ip + + ] : ' a ' ; if ( i 0 > 127 | | i 1 > 127 | | i 2 > 127 | | i 3 > 127 ) { throw new illegal argument exception ( " illegal character in base 6 4 encoded data " ) ; } int b 0 = inverse char map [ i 0 ] ; int b 1 = inverse char map [ i 1 ] ; int b 2 = inverse char map [ i 2 ] ; int b 3 = inverse char map [ i 3 ] ; if ( b 0 < 0 | | b 1 < 0 | | b 2 < 0 | | b 3 < 0 ) { throw new illegal argument exception ( " illegal character in base 6 4 encoded data " ) ; } int o 0 = ( b 0 < < 2 ) | ( b 1 > > > 4 ) ; int o 1 = ( ( b 1 & 0xf ) < < 4 ) | ( b 2 > > > 2 ) ; int o 2 = ( ( b 2 & 3 ) < < 6 ) | b 3 ; out [ op + + ] = ( byte ) o 0 ; if ( op < o len ) { out [ op + + ] = ( byte ) o 1 ; } if ( op < o len ) { out [ op + + ] = ( byte ) o 2 ; } } return out ; }


similar factory to above , but takes a package identifier to allow external repository labels to be created

public static label create ( package identifier package id , string target name ) throws label syntax exception { return create unvalidated ( package id , validate target name ( package id , target name ) ) ; }


writes the specified int at the specified index

public void write int ( long index , int value ) throws i o exception { byte [ ] bytes = converter get bytes ( value ) ; provider write bytes ( index , bytes ) ; }


post usercreate with array : creates list of users with given input array

default response entity < void > create users with array input ( @ api param ( value = " list of user object " , required = true ) @ valid @ request body list < user > body ) { return get delegate ( ) create users with array input ( body ) ; }


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


registers a members injector for type { @ code i } guice will use the members injector after its performed its own injections on an instance of { @ code i }

void register ( members injector < ? super i > members injector ) ;


provides local access to an output block stream this method should only be used if the associated { @ link buffer file adapter # is remote ( ) } is false

public output block stream get output block stream ( int block count ) throws i o exception ;


converts a scala { @ link future } to a { @ link completable future }

public static < t , u extends t > completable future < t > to java ( future < u > scala future ) { final completable future < t > result = new completable future < > ( ) ; scala future on complete ( new on complete < u > ( ) { @ override public void on complete ( throwable failure , u success ) { if ( failure ! = null ) { result complete exceptionally ( failure ) ; } else { result complete ( success ) ; } } } , executors direct execution context ( ) ) ; return result ; }


applies the data type at the specified address

public static void apply data ( program program , data type dt , address address ) throws code unit insertion exception , data type conflict exception { data data = program get listing ( ) get defined data at ( address ) ; if ( data ! = null & & data get data type ( ) is equivalent ( dt ) ) { return ; } / / program get listing ( ) clear code units ( address , address add ( dt get length ( ) - 1 ) ) ; program get listing ( ) create data ( address , dt ) ; }


iterate over the primary keys in ascending sorted order starting at the specified start key

public d b field iterator field key iterator ( field start key ) throws i o exception { synchronized ( db ) { if ( schema use long key nodes ( ) ) { throw new assert exception ( ) ; } return new field key iterator ( null , null , start key ) ; } }


returns { @ link list } & lt ; { @ link record number } & gt ; of what appears to be type indices

public list < record number > get type record numbers ( ) { return type record numbers ; }


provides the file name and byte array for a class path element

boolean process file bytes ( string name , long last modified , byte [ ] bytes ) ;


public int get code ( ) { return code ; }


returns the < code > no hide right < code > setting for horizontal custom sash form

public boolean is no hide right ( ) { return no hide down ; }


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


print { @ link mvc result } details to the supplied { @ link writer }

public static result handler print ( writer writer ) { return new print writer printing result handler ( new print writer ( writer , true ) ) ; }


retrieve a single row mapped from the statement using a { @ code result handler }

void select ( string statement , result handler handler ) ;


represents the value for < a href = " https : tools ietf orghtmlrfc 7 5 4 0 # section - 6 5 2 " > settings header table size this method should only be called by netty ( not users ) as a result of a receiving a { @ code settings } frame

void max header table size ( long max ) throws http 2 exception ;


returns the attribute value with the specified name , or if no attribute is found , the text of a child with the name

public int get int ( string name , int default value ) { string value = get ( name , null ) ; if ( value = = null ) return default value ; return integer parse int ( value ) ; }


calculates the determinant of the matrix


void header ( ) { row ( csv file all quotes , " type " , " deleted " , " path " , " is auth dir " , " is empty dir " , " len " , " updated " , " updated s " , " last modified " , " last modified s " , " etag " , " version " ) ; }


variant of { @ link # parse ( uri , string ) } with the encoded { @ link uri # get raw path ( ) raw path }

static request path parse ( string raw path , @ nullable string context path ) { return new default request path ( raw path , context path ) ; }


public static task result value of ( string s ) { int i = 0 ; int j = s index of ( " , duration = " ) ; if ( j < 0 ) throw new illegal argument exception ( " i = " + i + " , j = " + j + " < 0 , s = " + s ) ; final summation sigma = summation value of ( util parse string variable ( " sigma " , s substring ( i , j ) ) ) ; i = j + 2 ; j = s index of ( " ( " , i ) ; if ( j < 0 ) throw new illegal argument exception ( " i = " + i + " , j = " + j + " < 0 , s = " + s ) ; final long duration = util parse long variable ( " duration " , s substring ( i , j ) ) ; return new task result ( sigma , duration ) ; }


tries to read file contents from the file location to determine the number of cores on device

private static int get cores from file info ( string file location ) { input stream is = null ; try { is = new file input stream ( file location ) ; buffered reader buf = new buffered reader ( new input stream reader ( is ) ) ; string file contents = buf read line ( ) ; buf close ( ) ; return get cores from file string ( file contents ) ; } catch ( i o exception e ) { return deviceinfo unknown ; } finally { if ( is ! = null ) { try { is close ( ) ; } catch ( i o exception e ) { / / do nothing } } } }


allows subclasses to block renames for domain - specific reasons generic validation of the new name ( e g , null checking , checking for illegal characters , and checking that the name is not in use ) always happens prior to calling this method

protected void check rename ( @ non null string new name ) throws failure { }


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


copies this { @ code data descriptor } into a writable buffer the copy is made at the buffer ' s current position , and the position is advanced , by the size of the copy

public data descriptor copy ( byte buffer buffer ) { int size = get size ( ) ; data descriptor view = new data descriptor ( buffer slice ( ) ) ; this buffer rewind ( ) ; view buffer put ( this buffer ) flip ( ) ; buffer position ( buffer position ( ) + size ) ; this buffer rewind ( ) ; return view ; }


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


when the incremental mesh config request is a ack or nack message in response to a previous incremental mesh config response , the response nonce must be the nonce in the incremental mesh config response otherwise response nonce must be omitted < code > string response nonce = 4 ; < code >

public builder clear response nonce ( ) { response nonce = get default instance ( ) get response nonce ( ) ; on changed ( ) ; return this ; }


< code > optional string name = 2 ; < code >

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


returns the background color appropriate for the given component this may vary depending upon the current os

protected color get o s dependent background color ( j component parent , int row ) { if ( ! should alternate row background color ( ) ) { return get default background color ( ) ; } / / for now we always alternate row colors - - it actually makes the various la fs look nicer / / leaving the above call in the code so that it can be later found by reference / / if ( ! docking windows look and feel utils is using aqua u i ( parent get u i ( ) ) ) { / / return parent get background ( ) ; / / } return get background color for row ( row ) ; }


appends the string representation of each of { @ code parts } , using the previously configured separator between each , to { @ code appendable }

public final < a extends appendable > a append to ( a appendable , object [ ] parts ) throws i o exception { return append to ( appendable , arrays as list ( parts ) ) ; }


returns the corresponding object for the given row

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


public int get capacity ( ) { return capacity ; }


set the min , max number of worker threads ( simultaneous connections )

public void set threads ( int min , int max ) { queued thread pool pool = ( queued thread pool ) web server get thread pool ( ) ; pool set min threads ( min ) ; pool set max threads ( max ) ; }


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


public string get http address ( ) { return this rm node get http address ( ) ; }


returns the { @ link allocation decision } for moving this shard to another node if { @ link # is decision taken ( ) } returns { @ code false } , then invoking this method will throw an { @ code illegal state exception }

public allocation decision get allocation decision ( ) { return allocation decision ; }


merge the given secure settings into this one

public void merge ( mock secure settings secure settings ) { for ( string setting : secure settings get setting names ( ) ) { if ( setting names contains ( setting ) ) { throw new illegal argument exception ( " cannot overwrite existing secure setting " + setting ) ; } } setting names add all ( secure settings setting names ) ; secure strings put all ( secure settings secure strings ) ; sha 2 5 6 digests put all ( secure settings sha 2 5 6 digests ) ; files put all ( secure settings files ) ; }


visits a method instruction a method instruction is an instruction that invokes a method

public void visit method insn ( final int opcode , final string owner , final string name , final string descriptor , final boolean is interface ) { if ( api < opcodes asm5 & & ( opcode & opcodes source deprecated ) = = 0 ) { if ( is interface ! = ( opcode = = opcodes invokeinterface ) ) { throw new unsupported operation exception ( " invokespecial / static on interfaces requires asm5 " ) ; } visit method insn ( opcode , owner , name , descriptor ) ; return ; } if ( mv ! = null ) { mv visit method insn ( opcode & ~ opcodes source mask , owner , name , descriptor , is interface ) ; } }


gets the repository folder path associated with this connection if an ambiguous path has been specified , the folder path may change after a connection is established ( e g , folder item name will be appended to folder path and item name will become null if item turns out to be a folder )

public string get folder path ( ) { return protocol connector get folder path ( ) ; }


wait till event thread enters waiting state ( i e waiting for new events )

public void wait for event thread to wait ( ) { while ( ! is event thread waiting ( ) ) { thread yield ( ) ; } }


update the partition infos on the assigned resource

private void send update partition info rpc call ( final iterable < partition info > partition infos ) { final logical slot slot = assigned resource ; if ( slot ! = null ) { final task manager gateway task manager gateway = slot get task manager gateway ( ) ; final task manager location task manager location = slot get task manager location ( ) ; completable future < acknowledge > update partitions result future = task manager gateway update partitions ( attempt id , partition infos , rpc timeout ) ; update partitions result future when complete async ( ( ack , failure ) - > { / / fail if there was a failure if ( failure ! = null ) { fail ( new illegal state exception ( " update to task [ " + get vertex with attempt ( ) + " ] on task manager " + task manager location + " failed " , failure ) ) ; } } , get vertex ( ) get execution graph ( ) get job master main thread executor ( ) ) ; } }


the last value the measure funcion associated with this node { @ link component } returned for the height this is used together with { @ link internal node # get last height spec ( ) } to implement measure caching

public float get last measured height ( ) { return m last measured height ; }


shutdown the executor so we don ' t leak threads into other test runs

public void shutdown exec ( ) { executor service shutdown ( ) ; }