short - circuit ? : no threadsemaphore : thread thread pool full ? : no thread pool queue full ? : no timeout : no execution result : success

public void test execution hook thread success ( ) { assert hooks on success ( new func 0 < test hystrix command < integer > > ( ) { @ override public test hystrix command < integer > call ( ) { return get command ( execution isolation strategy thread , abstract test hystrix command execution result success ) ; } } , new action 1 < test hystrix command < integer > > ( ) { @ override public void call ( test hystrix command < integer > command ) { testable execution hook hook = command get builder ( ) execution hook ; assert true ( hook command emissions match ( 1 , 0 , 1 ) ) ; assert true ( hook execution events match ( 1 , 0 , 1 ) ) ; assert true ( hook fallback events match ( 0 , 0 , 0 ) ) ; assert equals ( " on start - on thread start - ! on run start - on execution start - on execution emit - ! on run success - ! on complete - on emit - on execution success - on thread complete - on success - " , hook execution sequence to string ( ) ) ; } } ) ; }


returns the name of the correlating algorithm


public long get debug start offset ( ) { return internals get debug start offset ( ) ; }


build a new < code > argument captor < code > note that an < code > argument captor < code > < b > doesn ' t do any type checks < b > it is only there to avoid casting in your code this might however change ( type checks could be added ) in a future major release

public static < u , s extends u > argument captor < u > for class ( class < s > clazz ) { return new argument captor < u > ( clazz ) ; }


public create index request settings ( settings settings ) { this settings = settings ; return this ; }


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


adds a bundled theme to the list , and mark it if it ' s the current theme

private static void add bundled theme ( final default action group group , final m t themeable theme , final m t themeable current , final icon our current action , final icon our not current action ) { final icon theme icon = theme get icon ( ) ! = null ? theme get icon ( ) : our not current action ; group add ( new dumb aware action ( theme get name ( ) , theme get editor colors scheme ( ) , theme = = current ? our current action : theme icon ) { @ override public void action performed ( @ not null final an action event e ) { / / install theme if not installed final m t theme facade external theme = m t themes install theme ( theme ) ; m t theme manager activate ( external theme , true ) ; m t analytics get instance ( ) track value ( m t analytics select theme , external theme ) ; } } ) ; }


translates a set of { @ link dependency key } objects with configuration transition requests to the same objects with resolved configurations this method must preserve the original label ordering of each attribute for example , if { @ code dependency keys get ( " data " ) } is { @ code [ " : a " , " : b " ] } , the resolved variant must also be { @ code [ " : a " , " : b " ] } in the same order for split transitions , { @ code dependency keys get ( " data " ) = [ " : a " , " : b " ] } can produce the output { @ code [ " : a " < config 1 > , " : a " < config 2 > , , " : b " < config 1 > , " : b " < config 2 > , ] } all instances of " : a " still appear before all instances of " : b " but the { @ code [ " : a " < config 1 > , " : a " < config 2 > " ] } subset may be in any ( deterministic ) order in particular , this may not be the same order as { @ link split transition # split } if needed , this code can be modified to use that order , but that involves more runtime in performance - critical code , so we won ' t make that change without a clear need if { @ link build configuration # trim configurations ( ) } is true , these configurations only contain the fragments needed by the dep and its transitive closure else they unconditionally include all fragments this method is heavily performance - optimized because { @ link com google devtools build lib skyframe configured target function } calls it over every edge in the configured target graph , small inefficiencies can have observable impact on analysis time keep this in mind when making modifications and performance - test any changes you make

public ordered set multimap < dependency kind , dependency > resolve configurations ( ordered set multimap < dependency kind , dependency key > dependency keys ) throws dependency evaluation exception , interrupted exception { try { ordered set multimap < dependency kind , dependency > resolved deps = ordered set multimap create ( ) ; for ( map entry < dependency kind , dependency key > entry : dependency keys entries ( ) ) { dependency kind dependency kind = entry get key ( ) ; dependency key dependency key = entry get value ( ) ; resolved deps put all ( dependency kind , resolve configuration ( dependency kind , dependency key ) ) ; } return resolved deps ; } catch ( value missing exception e ) { return null ; } }


initialize global build parameters this method accepts and a initialization function which in turn accepts a { @ link mutable build params } initialization can be done in " stages " , therefore changes override existing values , and values from previous calls to { @ link # init ( consumer ) } carry forward in cases where you want to clear existing values { @ link mutable build params # reset ( ) } may be used

public static void init ( consumer < mutable build params > initializer ) { initializer accept ( mutable build params instance ) ; }


returns the server builder used to create server for each test run return { @ code null } if it shouldn ' t start a server in the same process

protected server builder < ? > get server builder ( ) { return null ; }


public long get heap usage ( ) { return heap usage ; }


obtain user selected media path list in the starting activity or fragment

public static list < string > obtain path result ( intent data ) { return data get string array list extra ( matisse activity extra result selection path ) ; }


post fake { pet id } upload image with required file : uploads an image ( required )

response entity < model api response > upload file with required file ( @ api param ( value = " id of pet to update " , required = true ) @ path variable ( " pet id " ) long pet id , @ api param ( value = " file to upload " ) @ valid @ request part ( value = " required file " , required = true ) multipart file required file , @ api param ( value = " additional data to pass to server " ) @ valid @ request part ( value = " additional metadata " , required = false ) string additional metadata ) ;


moves the scheduler ' s clock forward by a specified amount of time

public void advance time by ( long delay time , time unit unit ) { advance time to ( time + unit to nanos ( delay time ) , time unit nanoseconds ) ; }


iterates through { @ code metadata entries } and checks each one to see if contains wrapped metadata if it does , then we recursively decode the wrapped metadata if it doesn ' t ( recursion base - case ) , we add the { @ link metadata entry } to { @ code decoded entries } ( output parameter )

private void decode wrapped metadata ( metadata metadata , list < metadata entry > decoded entries ) { for ( int i = 0 ; i < metadata length ( ) ; i + + ) { @ nullable format wrapped metadata format = metadata get ( i ) get wrapped metadata format ( ) ; if ( wrapped metadata format ! = null & & decoder factory supports format ( wrapped metadata format ) ) { metadata decoder wrapped metadata decoder = decoder factory create decoder ( wrapped metadata format ) ; / / wrapped metadata format ! = null so wrapped metadata bytes must be non - null too byte [ ] wrapped metadata bytes = assertions check not null ( metadata get ( i ) get wrapped metadata bytes ( ) ) ; buffer clear ( ) ; buffer ensure space for write ( wrapped metadata bytes length ) ; cast non null ( buffer data ) put ( wrapped metadata bytes ) ; buffer flip ( ) ; @ nullable metadata inner metadata = wrapped metadata decoder decode ( buffer ) ; if ( inner metadata ! = null ) { / / the decoding succeeded , so we ' ll try another level of unwrapping decode wrapped metadata ( inner metadata , decoded entries ) ; } } else { / / entry doesn ' t contain any wrapped metadata , so output it directly decoded entries add ( metadata get ( i ) ) ; } } }


creates { @ link validation exception } instance initialized with given error messages

public static validation exception with error ( string error ) { return with errors ( arrays as list ( error ) ) ; }


advances the internally tracked event time of this input topic each time a record without explicitly defined timestamp is piped , the current topic event time is used as record timestamp note : advancing the event time on the input topic , does not advance the tracked stream time in { @ link topology test driver } as long as no new input records are piped furthermore , it does not advance the wall - clock time of { @ link topology test driver }

public void advance time ( final duration advance ) { if ( advance is negative ( ) ) { throw new illegal argument exception ( " advance must be positive " ) ; } current time = current time plus ( advance ) ; }


checks that the given provider class either refers to an interface or to a value class

public static < t extends transitive info provider > void check provider ( class < t > clazz ) { / / write this check in terms of get name ( ) rather than get simple name ( ) ; the latter is expensive if ( ! clazz is interface ( ) & & clazz get name ( ) contains ( " auto value " ) ) { / / we must have a superclass due to the generic bound above throw new illegal argument exception ( clazz + " is generated by @ auto value ; use " + clazz get superclass ( ) + " instead " ) ; } }


may be called on receipt of a publish response from the given source node

public optional < apply commit request > handle publish response ( discovery node source node , publish response publish response ) { if ( election won = = false ) { logger debug ( " handle publish response : ignored response as election not won " ) ; throw new coordination state rejected exception ( " election not won " ) ; } if ( publish response get term ( ) ! = get current term ( ) ) { logger debug ( " handle publish response : ignored publish response due to term mismatch ( expected : [ { } ] , actual : [ { } ] ) " , get current term ( ) , publish response get term ( ) ) ; throw new coordination state rejected exception ( " incoming term " + publish response get term ( ) + " does not match current term " + get current term ( ) ) ; } if ( publish response get version ( ) ! = last published version ) { logger debug ( " handle publish response : ignored publish response due to version mismatch ( expected : [ { } ] , actual : [ { } ] ) " , last published version , publish response get version ( ) ) ; throw new coordination state rejected exception ( " incoming version " + publish response get version ( ) + " does not match current version " + last published version ) ; } logger trace ( " handle publish response : accepted publish response for version [ { } ] and term [ { } ] from [ { } ] " , publish response get version ( ) , publish response get term ( ) , source node ) ; publish votes add vote ( source node ) ; if ( is publish quorum ( publish votes ) ) { logger trace ( " handle publish response : value committed for version [ { } ] and term [ { } ] " , publish response get version ( ) , publish response get term ( ) ) ; return optional of ( new apply commit request ( local node , publish response get term ( ) , publish response get version ( ) ) ) ; } return optional empty ( ) ; }


equivalent to { @ link # peek fully ( byte [ ] , int , int , boolean ) peek fully ( target , offset , length , false ) }

void peek fully ( byte [ ] target , int offset , int length ) throws i o exception ;


sets the fields to < code > null < code > using the given bit mask the bits correspond to the individual columns : < code > ( 1 = = nullify , 0 = = keep ) < code >

public void set null ( long [ ] mask ) { for ( int mask pos = 0 , i = 0 ; i < this num fields ; ) { long curr mask = mask [ mask pos ] ; for ( int k = 64 ; i < this num fields & & k > 0 ; - - k , i + + , curr mask > > > = 1 ) { if ( ( curr mask & 0x 1 ) ! = 0 ) { internally set field ( i , null ) ; } } } }


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


to test the collection format in query parameters

public void test query parameter collection format test ( ) { list < string > pipe = null ; list < string > ioutil = null ; list < string > http = null ; list < string > url = null ; list < string > context = null ; api test query parameter collection format ( pipe , ioutil , http , url , context ) ; / / todo : test validations }


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


invoked when a processing - time timer fires

void on processing time ( internal timer < k , n > timer ) throws exception ;


private void read c r l f ( ) throws i o exception { int cr = in read ( ) ; int lf = in read ( ) ; if ( ( cr ! = ' \ r ' ) | | ( lf ! = ' \ n ' ) ) { throw new i o exception ( " crlf expected at end of chunk : " + cr + " / " + lf ) ; } }


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


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

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


public synchronized boolean add ( final metric name metric name , final measurable stat stat , final metric config config ) { if ( has expired ( ) ) { return false ; } else if ( metrics contains key ( metric name ) ) { return true ; } else { final metric config stat config = config = = null ? this config : config ; final kafka metric metric = new kafka metric ( metric lock ( ) , objects require non null ( metric name ) , objects require non null ( stat ) , stat config , time ) ; registry register metric ( metric ) ; metrics put ( metric metric name ( ) , metric ) ; stats add ( new stat and config ( objects require non null ( stat ) , metric : : config ) ) ; return true ; } }


returns the collection of string values for the given key if the key does not exist it will return null

public collection < string > get multi parameter ( string key ) { add to defaults ( key , null ) ; unrequested parameters remove ( key ) ; return data get or default ( key , null ) ; }


public model and view handle request ( final http servlet request request , final http servlet response response ) throws exception { ensure session replication is autoconfigured if need be ( request ) ; val context = new j e e context ( request , response , get o auth configuration context ( ) get session store ( ) ) ; val manager = new profile manager < common profile > ( context ) ; if ( context get request attribute ( o auth 2 0 constants error ) is present ( ) ) { val mv = get o auth configuration context ( ) get oauth invalid authorization response builder ( ) build ( context ) ; if ( ! mv is empty ( ) & & mv has view ( ) ) { return mv ; } } val client id = context get request parameter ( o auth 2 0 constants client id ) map ( string : : value of ) or else ( string utils empty ) ; val registered service = get registered service by client id ( client id ) ; registered service access strategy utils ensure service access is allowed ( client id , registered service ) ; if ( is request authenticated ( manager ) ) { val mv = get o auth configuration context ( ) get consent approval view resolver ( ) resolve ( context , registered service ) ; if ( ! mv is empty ( ) & & mv has view ( ) ) { logger debug ( " redirecting to consent - approval view with model [ { } ] " , mv get model ( ) ) ; return mv ; } } return redirect to callback redirect url ( manager , registered service , context , client id ) ; }


configure view resolution for supporting template engines

protected void configure view resolvers ( view resolver registry registry ) { }


test the case where the futures are fulfilled prior to constructing the list future there was a bug where the loop that connects a listener to each of the futures would die on the last loop - check as done ( ) on list future nulled out the variable being looped over ( the list of futures )

public void test all as list done futures ( ) throws exception { / / create input and output settable future < string > future 1 = settable future create ( ) ; settable future < string > future 2 = settable future create ( ) ; settable future < string > future 3 = settable future create ( ) ; / / satisfy each input prior to creating compound and check the output future 1 set ( data1 ) ; future 2 set ( data2 ) ; future 3 set ( data3 ) ; @ suppress warnings ( " unchecked " ) / / array is never modified listenable future < list < string > > compound = all as list ( future 1 , future 2 , future 3 ) ; / / attach a listener single call listener listener = new single call listener ( ) ; listener expect call ( ) ; compound add listener ( listener , direct executor ( ) ) ; assert true ( listener was called ( ) ) ; list < string > results = get done ( compound ) ; assert that ( results ) contains exactly ( data1 , data2 , data3 ) in order ( ) ; }


tests that track selector will select audio track with language that match preferred language given by { @ link parameters }

public void select tracks select preferred audio language ( ) throws exception { format builder format builder = audio format build upon ( ) ; format fr audio format = format builder set language ( " fra " ) build ( ) ; format en audio format = format builder set language ( " eng " ) build ( ) ; track group array track groups = wrap formats ( fr audio format , en audio format ) ; track selector set parameters ( default parameters build upon ( ) set preferred audio language ( " eng " ) ) ; track selector result result = track selector select tracks ( new renderer capabilities [ ] { all audio format supported renderer capabilities } , wrap formats ( fr audio format , en audio format ) , period id , timeline ) ; assert fixed selection ( result selections get ( 0 ) , track groups , en audio format ) ; }


public pair < string , string > get grammar ( ) { string grammar = null ; final class loader loader = thread current thread ( ) get context class loader ( ) ; final url stuff = loader get resource ( " org / antlr / v 4 / test / runtime / large lexer g 4 " ) ; try { grammar = new string ( files read all bytes ( paths get ( stuff to u r i ( ) ) ) ) ; } catch ( exception e ) { system err println ( " cannot find grammar org / antlr / v 4 / test / runtime / large lexer g 4 " ) ; } return new pair < > ( grammar name , grammar ) ; }


retrieves , but does not remove , the least element of this queue , or returns { @ code null } if the queue is empty

public e peek first ( ) { return peek ( ) ; }


get the world linear velocity of a world point attached to this body

public vector 2 get linear velocity from world point ( vector 2 world point ) { tmp set ( world point x , world point y ) ; vec 2 lv = body get linear velocity from world point ( tmp ) ; return lin vel world set ( lv x , lv y ) ; }


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


returns the ghidra version string ( used to create the library )

public string get ghidra version ( ) { return record get string ( ghidra version col ) ; }


calls { @ link # add ( object ) } with all the arguments

public synchronized void add all ( t nodes ) { for ( t node : nodes ) { add internal ( node , default replication ) ; } refresh table ( ) ; }


this method starts the sender and receiver threads

public void start ( ) { this messenger start ( ) ; }


developers might use standalone mode ( which is the default for one server ) this test checks metrics for authz failure in standalone server

public void test secure standalone server auth n failure ( ) throws exception { final integer client port = port assignment unique ( ) ; final integer secure client port = port assignment unique ( ) ; zoo keeper server main test main thread mt = new zoo keeper server main test main thread ( client port , secure client port , true , null ) ; mt start ( ) ; try { zoo keeper zk = create z k clnt ( " 127 0 0 1 : " + secure client port ) ; fail ( " should not be reached " ) ; } catch ( exception e ) { / / expected } server stats server stats = mt get secure cnxn factory ( ) get zoo keeper server ( ) server stats ( ) ; assert true ( server stats get auth failed count ( ) > = 1 ) ; mt shutdown ( ) ; }


same as { @ link # get implicit output artifact ( implicit outputs function ) } but includes the option to use a content - based path for this artifact ( see { @ link build configuration # use content based output paths ( ) } )

public artifact get implicit output artifact ( implicit outputs function function , boolean content based path ) throws interrupted exception { iterable < string > result ; try { result = function get implicit outputs ( get analysis environment ( ) get event handler ( ) , raw attribute mapper of ( rule ) ) ; } catch ( eval exception e ) { / / it ' s ok as long as we don ' t use this method from starlark throw new illegal state exception ( e ) ; } return get implicit output artifact ( iterables get only element ( result ) , content based path ) ; }


encodes a starlark value as json an application - defined subclass of starlark value may define its own json encoding by implementing the { @ link encodable } interface otherwise , the encoder tests for the { @ link map } , { @ link starlark iterable } , and { @ link structure } interfaces , in that order , resulting in dict - like , list - like , and struct - like encoding , respectively see the starlark documentation annotation for more detail encoding any other value yields an error

public string encode ( object x ) throws eval exception { encoder enc = new encoder ( ) ; try { enc encode ( x ) ; } catch ( stack overflow error unused ) { throw starlark errorf ( " nesting depth limit exceeded " ) ; } return enc out to string ( ) ; }


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


suitable for { @ link job # remove run }

public final void remove run ( run t run ) { if ( ! builds remove ( run ) ) { logger log ( level warning , " { 0 } did not contain { 1 } to begin with " , new object [ ] { as job ( ) , run } ) ; } }


gets client channel max idle time seconds

public int get channel max write idle seconds ( ) { return max write idle seconds ; }


returns list of shards that being restore and their status

public immutable open map < shard id , shard restore status > shards ( ) { return this shards ; }


create a new { @ link merged annotation } instance of the specified annotation type with attribute values supplied by a map

static < a extends annotation > merged annotation < a > of ( class < a > annotation type , @ nullable map < string , ? > attributes ) { return of ( null , annotation type , attributes ) ; }


encodes the specified cookie into a cookie header value

public string encode ( string name , string value ) { return encode ( new default cookie ( name , value ) ) ; }


set the active animation , replacing any current animation

public animation desc set animation ( final string id , int loop count ) { return set animation ( id , loop count , 1 0f , null ) ; }


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


sets the width used for drawing borders around the bars if border width = = 0 , no border will be drawn

public void set bar border width ( float width ) { m bar border width = width ; }


public final clear scroll response clear scroll ( clear scroll request clear scroll request , request options options ) throws i o exception { return perform request and parse entity ( clear scroll request , request converters : : clear scroll , options , clear scroll response : : from x content , empty set ( ) ) ; }


return a resource bundle for the given basename and locale , fetching already generated resource bundle from the cache

protected resource bundle get resource bundle ( string basename , locale locale ) { if ( get cache millis ( ) > = 0 ) { / / fresh resource bundle get bundle call in order to let resource bundle / / do its native caching , at the expense of more extensive lookup steps return do get bundle ( basename , locale ) ; } else { / / cache forever : prefer locale cache over repeated get bundle calls map < locale , resource bundle > locale map = this cached resource bundles get ( basename ) ; if ( locale map ! = null ) { resource bundle bundle = locale map get ( locale ) ; if ( bundle ! = null ) { return bundle ; } } try { resource bundle bundle = do get bundle ( basename , locale ) ; if ( locale map = = null ) { locale map = this cached resource bundles compute if absent ( basename , bn - > new concurrent hash map < > ( ) ) ; } locale map put ( locale , bundle ) ; return bundle ; } catch ( missing resource exception ex ) { if ( logger is warn enabled ( ) ) { logger warn ( " resource bundle [ " + basename + " ] not found for message source : " + ex get message ( ) ) ; } / / assume bundle not found / / - > do not throw the exception to allow for checking parent message source return null ; } } }


void clear password ( ) { if ( password ! = null ) { arrays fill ( password , ' ' ) ; } }


get the rest value used for determining the displacement of the spring

public double get end value ( ) { return m end value ; }


this creates a directory with a child and then deletes it the parent dir must be found and declared as empty when deleting markers , that forces the recreation of a new marker

public void test delete single file in dir ( ) throws throwable { describe ( " delete a file " ) ; s 3 a file system fs = get file system ( ) ; / / creates the marker path dir = dir ( method path ( ) ) ; / / file creation may have deleted that marker , but it may / / still be there path simple file = file ( new path ( dir , " simple txt " ) ) ; boolean raw and keeping = is raw ( ) & & is deleting ( ) ; boolean raw and deleting = is raw ( ) & & is deleting ( ) ; verify metrics ( ( ) - > { fs delete ( simple file , false ) ; return " after fs delete ( simple file ) " + get metric summary ( ) ; } , probe ( raw and keeping , object metadata requests , filestatus file probe h ) , / / if deleting markers , look for the parent too probe ( raw and deleting , object metadata requests , filestatus file probe h + filestatus dir probe h ) , with when raw ( object list request , filestatus file probe l + filestatus dir probe l ) , with ( directories deleted , 0 ) , with ( files deleted , 1 ) , / / a single delete call is made to delete the object with ( object delete request , delete object request ) , / / keeping : create no parent dirs or delete parents with when keeping ( directories created , 0 ) , with when keeping ( object bulk delete request , 0 ) , / / deleting : create a parent and delete any of its parents with when deleting ( directories created , 1 ) , / / a bulk delete for all parents is issued / / the number of objects in it depends on the depth of the tree ; / / don ' t worry about that with when deleting ( object bulk delete request , delete marker request ) ) ; / / there is an empty dir for a parent s 3 a file status status = verify raw inner get file status ( dir , true , status probe enum all , get file status on dir ) ; assert empty dir status ( status , tristate true ) ; }


this is how the i ds were formed in v 5 4

public static string v 5 4 document id ( string job id ) { return job id + " - " + type ; }


private completable future < string > execute command ( string ip , int port , string api , map < string , string > params , boolean use http post ) { return execute command ( null , ip , port , api , params , use http post ) ; }


public static string internal delegate ( string methods interceptor ) { return methods interceptor + " internal " ; }


specifies that this pattern is greedy this means as many events as possible will be matched to this pattern

public pattern < t , f > greedy ( ) { check if no not pattern ( ) ; check if no group pattern ( ) ; this quantifier greedy ( ) ; return this ; }


sets the optional stream keys by which the manifest is filtered ( only used for adaptive streams ) { @ code null } or an empty { @ link list } can be used for a reset if { @ link # set uri } is passed a non - null { @ code uri } , the stream keys are used to create a { @ link playback properties } object otherwise they will be ignored

public builder set stream keys ( @ nullable list < stream key > stream keys ) { this stream keys = stream keys ! = null & & ! stream keys is empty ( ) ? collections unmodifiable list ( new array list < > ( stream keys ) ) : collections empty list ( ) ; return this ; }


returns a resource on the classpath as a reader object

public static reader get resource as reader ( string resource ) throws i o exception { reader reader ; if ( charset = = null ) { reader = new input stream reader ( get resource as stream ( resource ) ) ; } else { reader = new input stream reader ( get resource as stream ( resource ) , charset ) ; } return reader ; }


queues the glyphs in the nehe character set ( codepoints 32 through 128 ) to be loaded note that the glyphs are not actually loaded until { @ link # load glyphs ( ) } is called

public void add nehe glyphs ( ) { add glyphs ( 32 , 32 + 96 ) ; }


creates random suggestion builder , renders it to x content and back to new instance that should be equal to original

public void test from x content ( ) throws i o exception { for ( int runs = 0 ; runs < number of testbuilders ; runs + + ) { sb suggestion builder = random test builder ( ) ; x content builder x content builder = x content factory content builder ( random from ( x content type values ( ) ) ) ; if ( random boolean ( ) ) { x content builder pretty print ( ) ; } x content builder start object ( ) ; suggestion builder to x content ( x content builder , to x content empty params ) ; x content builder end object ( ) ; x content builder shuffled = shuffle x content ( x content builder , shuffle protected fields ( ) ) ; try ( x content parser parser = create parser ( shuffled ) ) { / / we need to skip the start object and the name , those will be parsed by outer suggest builder parser next token ( ) ; suggestion builder < ? > second suggestion builder = suggestion builder from x content ( parser ) ; assert not same ( suggestion builder , second suggestion builder ) ; assert equals ( suggestion builder , second suggestion builder ) ; assert equals ( suggestion builder hash code ( ) , second suggestion builder hash code ( ) ) ; } } }


sets the ssl system properties such that the given x 5 0 9 util object can be used to create ssl contexts that will use the trust store and key store files created by this test context example usage : x 5 0 9 test context test context = ; create the test context x 5 0 9 util x 5 0 9 util = new quorum x 5 0 9 util ( ) ; test context set system properties ( x 5 0 9 util , key store file type jks , key store file type jks ) ; the returned context will use the key store and trust store created by the test context s s l context ctx = x 5 0 9 util get default s s l context ( ) ;

public void set system properties ( x 5 0 9 util x 5 0 9 util , key store file type key store file type , key store file type trust store file type ) throws i o exception { system set property ( x 5 0 9 util get ssl keystore location property ( ) , this get key store file ( key store file type ) get absolute path ( ) ) ; system set property ( x 5 0 9 util get ssl keystore passwd property ( ) , this get key store password ( ) ) ; system set property ( x 5 0 9 util get ssl keystore type property ( ) , key store file type get property value ( ) ) ; system set property ( x 5 0 9 util get ssl truststore location property ( ) , this get trust store file ( trust store file type ) get absolute path ( ) ) ; system set property ( x 5 0 9 util get ssl truststore passwd property ( ) , this get trust store password ( ) ) ; system set property ( x 5 0 9 util get ssl truststore type property ( ) , trust store file type get property value ( ) ) ; if ( hostname verification ! = null ) { system set property ( x 5 0 9 util get ssl hostname verification enabled property ( ) , hostname verification to string ( ) ) ; } else { system clear property ( x 5 0 9 util get ssl hostname verification enabled property ( ) ) ; } }


public static job conf create value aggregator job ( string args [ ] , class < ? > caller ) throws i o exception { configuration conf = new configuration ( ) ; generic options parser generic parser = new generic options parser ( conf , args ) ; args = generic parser get remaining args ( ) ; if ( args length < 2 ) { system out println ( " usage : input dirs out dir " + " [ num of reducer [ textinputformat | seq [ specfile [ job name ] ] ] ] " ) ; generic options parser print generic command usage ( system out ) ; system exit ( 1 ) ; } string input dir = args [ 0 ] ; string output dir = args [ 1 ] ; int num of reducers = 1 ; if ( args length > 2 ) { num of reducers = integer parse int ( args [ 2 ] ) ; } class < ? extends input format > the input format = text input format class ; if ( args length > 3 & & args [ 3 ] compare to ignore case ( " textinputformat " ) = = 0 ) { the input format = text input format class ; } else { the input format = sequence file input format class ; } path spec file = null ; if ( args length > 4 ) { spec file = new path ( args [ 4 ] ) ; } string job name = " " ; if ( args length > 5 ) { job name = args [ 5 ] ; } job conf the job = new job conf ( conf ) ; if ( spec file ! = null ) { the job add resource ( spec file ) ; } string user jar file = the job get ( " user jar file " ) ; if ( user jar file = = null ) { the job set jar by class ( caller ! = null ? caller : value aggregator job class ) ; } else { the job set jar ( user jar file ) ; } the job set job name ( " value aggregator job : " + job name ) ; file input format add input paths ( the job , input dir ) ; the job set input format ( the input format ) ; the job set mapper class ( value aggregator mapper class ) ; file output format set output path ( the job , new path ( output dir ) ) ; the job set output format ( text output format class ) ; the job set map output key class ( text class ) ; the job set map output value class ( text class ) ; the job set output key class ( text class ) ; the job set output value class ( text class ) ; the job set reducer class ( value aggregator reducer class ) ; the job set combiner class ( value aggregator combiner class ) ; the job set num map tasks ( 1 ) ; the job set num reduce tasks ( num of reducers ) ; return the job ; }


creates the program ' s { @ link plan } the plan is a description of all data sources , data sinks , and operations and how they interact , as an isolated unit that can be executed with an { @ link pipeline executor } obtaining a plan and starting it with an executor is an alternative way to run a program and is only possible if the program consists only of distributed operations

public plan create program plan ( string job name , boolean clear sinks ) { check not null ( job name ) ; if ( this sinks is empty ( ) ) { if ( was executed ) { throw new runtime exception ( " no new data sinks have been defined since the " + " last execution the last execution refers to the latest call to " + " ' execute ( ) ' , ' count ( ) ' , ' collect ( ) ' , or ' print ( ) ' " ) ; } else { throw new runtime exception ( " no data sinks have been created yet " + " a program needs at least one sink that consumes data " + " examples are writing the data set or printing it " ) ; } } final plan generator generator = new plan generator ( sinks , config , get parallelism ( ) , cache file , job name ) ; final plan plan = generator generate ( ) ; / / clear all the sinks such that the next execution does not redo everything if ( clear sinks ) { this sinks clear ( ) ; was executed = true ; } return plan ; }


returns the translog location for this version value or null this is optional and might not be tracked all the time

public translog location get location ( ) { return null ; }


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


public memory get memory ( ) { return program get memory ( ) ; }


public declaration of object ' s { @ code clone ( ) } method delegates to { @ link # clone bean definition ( ) }

public object clone ( ) { return clone bean definition ( ) ; }


checks if the task is currently present in the list and has the right allocation id

public boolean has task ( string task id , long allocation id ) { persistent task < ? > task in progress = tasks get ( task id ) ; if ( task in progress ! = null ) { return task in progress get allocation id ( ) = = allocation id ; } return false ; }


when false , the scroll bars don ' t respond to touch or mouse events default is true

public void set scroll bar touch ( boolean scroll bar touch ) { this scroll bar touch = scroll bar touch ; }


multiplies all components of this color with the given value

public color mul ( float value ) { this r * = value ; this g * = value ; this b * = value ; this a * = value ; return clamp ( ) ; }


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


sets the minimum frame that the animation will start from when playing or looping

public void set min frame ( final int min frame ) { if ( composition = = null ) { lazy composition tasks add ( new lazy composition task ( ) { @ override public void run ( lottie composition composition ) { set min frame ( min frame ) ; } } ) ; return ; } animator set min frame ( min frame ) ; }


whether named parameters enabled or disabled in prepared s q ls

public boolean get named parameters enabled ( ) { return this named parameters enabled ; }


the subset of the replicas that are in sync , that is caught - up to the leader and ready to take over as leader if the leader should fail

public node [ ] in sync replicas ( ) { return in sync replicas ; }


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


get the entry for a corresponding highlight object

public entry get entry for highlight ( highlight highlight ) { if ( highlight get data set index ( ) > = m data sets size ( ) ) return null ; else { return m data sets get ( highlight get data set index ( ) ) get entry for x value ( highlight get x ( ) , highlight get y ( ) ) ; } }


returns a newly - created { @ code immutable set } based on the contents of the { @ code builder }

public immutable set < e > build ( ) { switch ( size ) { case 0 : return of ( ) ; case 1 : return ( immutable set < e > ) of ( contents [ 0 ] ) ; default : immutable set < e > result ; if ( hash table ! = null & & choose table size ( size ) = = hash table length ) { object [ ] unique elements = should trim ( size , contents length ) ? arrays copy of ( contents , size ) : contents ; result = new regular immutable set < e > ( unique elements , hash code , hash table , hash table length - 1 , size ) ; } else { result = construct ( size , contents ) ; / / construct has the side effect of deduping contents , so we update size / / accordingly size = result size ( ) ; } force copy = true ; hash table = null ; return result ; } }


takes ownership of the supplied array of class object [ ] class , and returns a new starlark list instance that initially wraps the array the caller must not subsequently modify the array , but the starlark list instance may do so

static < t > starlark list < t > wrap ( @ nullable mutability mutability , object [ ] elems ) { return new starlark list < > ( mutability , elems , elems length ) ; }


sets next field with volatile write semantics ( see above about use of put ordered object )

final void set next ( hash entry < k , v > n ) { unsafe put ordered object ( this , next offset , n ) ; }


gets a view of log records per agent matching this recorder

public map < computer , list < log record > > get slave log records ( ) { map < computer , list < log record > > result = new tree map < > ( new comparator < computer > ( ) { final collator coll = collator get instance ( ) ; public int compare ( computer c 1 , computer c 2 ) { return coll compare ( c 1 get display name ( ) , c 2 get display name ( ) ) ; } } ) ; for ( computer c : jenkins get ( ) get computers ( ) ) { if ( c get name ( ) length ( ) = = 0 ) { continue ; / / master } list < log record > recs = new array list < > ( ) ; try { for ( log record rec : c get log records ( ) ) { for ( target t : targets ) { if ( t includes ( rec ) ) { recs add ( rec ) ; break ; } } } } catch ( i o exception | interrupted exception x ) { continue ; } if ( ! recs is empty ( ) ) { result put ( c , recs ) ; } } return result ; }


public void test create leaf queue ( ) { f s queue q 1 = queue manager create queue ( " root queue 1 " , f s queue type leaf ) ; assert not null ( " leaf queue root queue 1 was not created " , queue manager get leaf queue ( " root queue 1 " , false ) ) ; assert equals ( " create queue ( ) returned wrong queue " , " root queue 1 " , q 1 get name ( ) ) ; }


maps 500 internal server errors to the provided route

public synchronized void internal server error ( route route ) { custom error pages add ( 500 , route ) ; }


updates the index an iterator is pointing to after a call to remove : returns the index of the entry that should be looked at after a removal on index removed , with index before remove as the index that was the next entry that would be looked at

int adjust after remove ( int index before remove , @ suppress warnings ( " unused " ) int index removed ) { return index before remove - 1 ; }


returns an immutable array containing the same values as { @ code this } array this is logically a no - op , and in some circumstances { @ code this } itself is returned however , if this instance is a { @ link # sub array } view of a larger array , this method will copy only the appropriate range of values , resulting in an equivalent array with a smaller memory footprint

public immutable long array trimmed ( ) { return is partial view ( ) ? new immutable long array ( to array ( ) ) : this ; }


clicks in the middle of the given element equivalent to : actions move to element ( on element ) click ( )

public actions click ( web element target ) { if ( is building actions ( ) ) { action add action ( new click action ( json mouse , ( locatable ) target ) ) ; } return move in ticks ( target , 0 , 0 ) click in ticks ( left ) ; }


public synchronized void reset all counters ( ) { litho stats reset all counters ( ) ; }


get the list of parent model names from the schemas ( all of , any of , one of )

public static list < string > get all parents name ( composed schema composed schema , map < string , schema > all schemas , boolean include ancestors ) { list < schema > interfaces = get interfaces ( composed schema ) ; list < string > names = new array list < string > ( ) ; if ( interfaces ! = null & & ! interfaces is empty ( ) ) { for ( schema schema : interfaces ) { / / get the actual schema if ( string utils is not empty ( schema get $ ref ( ) ) ) { string parent name = get simple ref ( schema get $ ref ( ) ) ; schema s = all schemas get ( parent name ) ; if ( s = = null ) { logger error ( " failed to obtain schema from { } " , parent name ) ; names add ( " unknown parent name " ) ; } else if ( has or inherits discriminator ( s , all schemas ) ) { / / discriminator property name is used names add ( parent name ) ; if ( include ancestors & & s instanceof composed schema ) { names add all ( get all parents name ( ( composed schema ) s , all schemas , true ) ) ; } } else { / / not a parent since discriminator property name is not set } } else { / / not a ref , doing nothing } } } / / ensure ` all parents ` always includes ` parent ` / / this is more robust than keeping logic in get parent name ( ) and get all parents name ( ) in sync string parent name = get parent name ( composed schema , all schemas ) ; if ( parent name ! = null & & ! names contains ( parent name ) ) { names add ( parent name ) ; } return names ; }


try to call { @ link reference counted # release ( ) } if the specified message implements { @ link reference counted } if the specified message doesn ' t implement { @ link reference counted } , this method does nothing

public static boolean release ( object msg ) { if ( msg instanceof reference counted ) { return ( ( reference counted ) msg ) release ( ) ; } return false ; }


get { @ link processor slot chain } of the resource new { @ link processor slot chain } will be created if the resource doesn ' t relate one same resource ( { @ link resource wrapper # equals ( object ) } ) will share the same { @ link processor slot chain } globally , no matter in which { @ link context } < p > note that total { @ link processor slot } count must not exceed { @ link constants # max slot chain size } , otherwise null will return

processor slot < object > look process chain ( resource wrapper resource wrapper ) { processor slot chain chain = chain map get ( resource wrapper ) ; if ( chain = = null ) { synchronized ( lock ) { chain = chain map get ( resource wrapper ) ; if ( chain = = null ) { / / entry size limit if ( chain map size ( ) > = constants max slot chain size ) { return null ; } chain = slot chain provider new slot chain ( ) ; map < resource wrapper , processor slot chain > new map = new hash map < resource wrapper , processor slot chain > ( chain map size ( ) + 1 ) ; new map put all ( chain map ) ; new map put ( resource wrapper , chain ) ; chain map = new map ; } } } return chain ; }


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

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


< code > merge equates < code > merges the equate differences in the specified address set

public void merge equates ( address set view origin address set , task monitor monitor ) throws cancelled exception , unsupported operation exception { if ( ! origin to result translator is one for one translator ( ) ) { string message = origin to result translator get class ( ) get name ( ) + " is not a one for one translator and can ' t merge equates " ; throw new unsupported operation exception ( message ) ; } monitor set message ( " applying equates " ) ; if ( origin address set is empty ( ) ) { return ; } address iterator addresses = origin address set get addresses ( true ) ; / / get each equate out of the equate address iterator and set it in the merged program for ( long count = 0 ; addresses has next ( ) & & ! monitor is cancelled ( ) ; count + + ) { monitor check canceled ( ) ; address address = addresses next ( ) ; if ( count = = progress counter granularity ) { monitor set message ( " applying equates " + address to string ( true , false ) ) ; count = 0 ; } merge equates ( address ) ; } }


gets the annotations out of a given class , similar to { @ link # get annotations } , also including annotations for translations of class - level attributes { @ code enclosing method } and { @ code inner classes } , if present additionally , if the class is an annotation class , then this also includes a representation of all the { @ code annotation default } values

public static annotations get class annotations ( direct class file cf , cf options args ) { cst type this class = cf get this class ( ) ; attribute list attribs = cf get attributes ( ) ; annotations result = get annotations ( attribs ) ; annotation enclosing method = translate enclosing method ( attribs ) ; try { annotations inner class annotations = translate inner classes ( this class , attribs , enclosing method = = null ) ; if ( inner class annotations ! = null ) { result = annotations combine ( result , inner class annotations ) ; } } catch ( warning warn ) { args warn println ( " warning : " + warn get message ( ) ) ; } if ( enclosing method ! = null ) { result = annotations combine ( result , enclosing method ) ; } if ( access flags is annotation ( cf get access flags ( ) ) ) { annotation annotation default = translate annotation defaults ( cf ) ; if ( annotation default ! = null ) { result = annotations combine ( result , annotation default ) ; } } return result ; }


apply the given cache seconds and generate corresponding http headers , i e allow caching for the given number of seconds in case of a positive value , prevent caching if given a 0 value , do nothing else does not tell the browser to revalidate the resource

protected final void apply cache seconds ( http servlet response response , int cache seconds ) { if ( this use expires header | | ! this use cache control header ) { / / deprecated http 1 0 cache behavior , as in previous spring versions if ( cache seconds > 0 ) { cache for seconds ( response , cache seconds ) ; } else if ( cache seconds = = 0 ) { prevent caching ( response ) ; } } else { cache control c control ; if ( cache seconds > 0 ) { c control = cache control max age ( cache seconds , time unit seconds ) ; if ( this always must revalidate ) { c control = c control must revalidate ( ) ; } } else if ( cache seconds = = 0 ) { c control = ( this use cache control no store ? cache control no store ( ) : cache control no cache ( ) ) ; } else { c control = cache control empty ( ) ; } apply cache control ( response , c control ) ; } }


returns if the list contains an extra data record with the specified id

public boolean contains ( short id ) { return entries contains key ( id ) ; }


returns the original element list , unchanged

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


returns whether approximate local recovery is enabled

public boolean is approximate local recovery enabled ( ) { return approximate local recovery ; }


the list of subject alternate names allowed for workload instances that implement this service this information is used to enforce [ secure - naming ] ( https : istio iodocsconceptssecurity # secure - naming ) if specified , the proxy will verify that the server certificate ' s subject alternate name matches one of the specified values < code > repeated string subject alt names = 8 ; < code >

public builder add subject alt names bytes ( com google protobuf byte string value ) { if ( value = = null ) { throw new null pointer exception ( ) ; } check byte string is utf 8 ( value ) ; ensure subject alt names is mutable ( ) ; subject alt names add ( value ) ; on changed ( ) ; return this ; }


returns all colors used across all data set objects this object represents

public int [ ] get colors ( ) { if ( m data sets = = null ) return null ; int clrcnt = 0 ; for ( int i = 0 ; i < m data sets size ( ) ; i + + ) { clrcnt + = m data sets get ( i ) get colors ( ) size ( ) ; } int [ ] colors = new int [ clrcnt ] ; int cnt = 0 ; for ( int i = 0 ; i < m data sets size ( ) ; i + + ) { list < integer > clrs = m data sets get ( i ) get colors ( ) ; for ( integer clr : clrs ) { colors [ cnt ] = clr ; cnt + + ; } } return colors ; }


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

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


returns { @ code true } if and only if the specified address has been resolved

boolean is resolved ( socket address address ) ;


checks if a string is a valid path component for instance , components cannot contain a " : " or " " , and cannot be equal to a reserved component like " snapshot " the primary use of this method is for validating paths when loading the f s image during normal nn operation , paths are sometimes allowed to contain reserved components

public static boolean is valid name for component ( string component ) { if ( component equals ( " " ) | | component equals ( " " ) | | component index of ( " : " ) > = 0 | | component index of ( " / " ) > = 0 ) { return false ; } return ! is reserved path component ( component ) ; }


sets whether the fast forward button is shown

public void set show fast forward button ( boolean show fast forward button ) { assertions check state not null ( controller ) ; controller set show fast forward button ( show fast forward button ) ; }


whether this status code is in the http series { @ link org springframework http http status series # successful } this is a shortcut for checking the value of { @ link # series ( ) }

public boolean is 2xx successful ( ) { return ( series ( ) = = series successful ) ; }


returns a { @ link bitmap transition options } object that enables a cross fade animation

public static bitmap transition options with cross fade ( @ non null drawable cross fade factory builder builder ) { return new bitmap transition options ( ) cross fade ( builder ) ; }


check the leases beginning from the oldest

synchronized boolean check leases ( ) { return check leases ( get expired candidate leases ( ) ) ; }


true iff the named path is a regular file note : avoid using this method instead reuse the file status returned by { @ link # get file status ( path ) } or list status ( ) methods

public boolean is file ( path f ) throws i o exception { try { return get file status ( f ) is file ( ) ; } catch ( file not found exception e ) { return false ; / / f does not exist } }


serializable save ( string entity name , object entity ) throws data access exception ;


returns the user ' s selection or null if the user has not made a selection note : the the value returned from this method may not match the text in the field in the case that the user has selected a value and then typed some text

public t get selected value ( ) { return selected value ; }


provide a function to map specific error status codes to an error signal to be propagated downstream instead of the response by default , if there are no matching status handlers , responses with status codes > = 400 are mapped to { @ link web client response exception } which is created with { @ link client response # create exception ( ) } to suppress the treatment of a status code as an error and process it as a normal response , return { @ code mono empty ( ) } from the function the response will then propagate downstream to be processed to ignore an error response completely , and propagate neither response nor error , use a { @ link exchange filter function filter } , or add { @ code on error resume } downstream , for example : < pre class = " code " > web client get ( ) uri ( " https : abc comaccount 1 2 3 " ) retrieve ( ) body to mono ( account class ) on error resume ( web client response exception class , ex - > ex get raw status code ( ) = = 404 ? mono empty ( ) : mono error ( ex ) ) ;

response spec on status ( predicate < http status > status predicate , function < client response , mono < ? extends throwable > > exception function ) ;


register a check that a parameter update will cause a conflict , using the minimal mapping as a base

public void register conflict check ( string param , checked consumer < x content builder , i o exception > update ) throws i o exception { conflict checks put ( param , new conflict check ( top mapping ( b - > b start object ( field name ( ) ) end object ( ) ) , top mapping ( b - > { b start object ( field name ( ) ) ; update accept ( b ) ; b end object ( ) ; } ) ) ) ; }


delegates to the { @ link log # warn ( object ) } method of the underlying { @ link log } instance however , this form avoids superfluous object creation when the logger is disabled for level warn

public void warn ( string format , object arg ) { if ( logger is warn enabled ( ) ) { formatting tuple ft = message formatter format ( format , arg ) ; logger warn ( ft get message ( ) , ft get throwable ( ) ) ; } }


quick validation on the input to check some obvious fail conditions ( fail fast ) the input and returns the appropriate { @ link plan } associated with the specified { @ link queue } or throws an exception message illustrating the details of any validation check failures

public plan validate reservation submission request ( reservation system reservation system , reservation submission request request , reservation id reservation id ) throws yarn exception { string message ; if ( reservation id = = null ) { message = " reservation id cannot be null please try again specifying " + " a valid reservation id by creating a new reservation id " ; throw r p c util get remote exception ( message ) ; } / / check if it is a managed queue string queue = request get queue ( ) ; plan plan = get plan from queue ( reservation system , queue , audit constants submit reservation request ) ; validate reservation definition ( reservation id , request get reservation definition ( ) , plan , audit constants submit reservation request ) ; return plan ; }


when linking a shared library fully or mostly static then we need to link in all dependent files , not just what the shared library needs for its own code this is done by wrapping all objectslibraries with - wl , - whole - archive and - wl , - no - whole - archive for this case the global need whole archive parameter must be set to true otherwise only library objects ( lo ) need to be wrapped with - wl , - whole - archive and - wl , - no - whole - archive todo : factor out of the bazel binary into build variables for crosstool action configs

public collected libraries to link collect libraries to link ( ) { nested set builder < string > library search directories = nested set builder link order ( ) ; nested set builder < string > runtime library search directories = nested set builder link order ( ) ; immutable set builder < string > rpath roots for explicit so deps = immutable set builder ( ) ; nested set builder < linker input > expanded linker inputs builder = nested set builder link order ( ) ; / / list of command line parameters that need to be placed * outside * of / / - - whole - archive - - no - whole - archive sequence builder libraries to link = new sequence builder ( ) ; string toolchain libraries solib name = toolchain libraries solib dir ! = null ? toolchain libraries solib dir get base name ( ) : null ; if ( is native deps & & cpp configuration share native deps ( ) ) { if ( need toolchain libraries rpath ) { runtime library search directories add ( " / " + toolchain libraries solib name + " / " ) ; } } else { / / for all other links , calculate the relative path from the output file to solib [ arch ] / / ( the directory where all shared libraries are stored , which resides under the blaze - bin / / directory in other words , given blaze - bin / my / package / binary , rpath root would be / / " / / solib [ arch ] " if ( need toolchain libraries rpath ) { runtime library search directories add ( strings repeat ( " / " , output artifact get root relative path ( ) segment count ( ) - 1 ) + toolchain libraries solib name + " / " ) ; } if ( is native deps ) { / / we also retain the $ origin / path to solibs that are in solib < arch > , as opposed to / / the package directory ) if ( need toolchain libraries rpath ) { runtime library search directories add ( " / " + toolchain libraries solib name + " / " ) ; } } } if ( need toolchain libraries rpath ) { if ( is native deps ) { runtime library search directories add ( " " ) ; } runtime library search directories add ( toolchain libraries solib name + " / " ) ; } pair < boolean , boolean > include solibs pair = add linker inputs ( library search directories , rpath roots for explicit so deps , libraries to link , expanded linker inputs builder ) ; boolean include solib dir = include solibs pair first ; boolean include toolchain libraries solib dir = include solibs pair second ; preconditions check state ( lto map = = null | | lto map is empty ( ) , " still have lto objects left : % s " , lto map ) ; nested set builder < string > all runtime library search directories = nested set builder link order ( ) ; / / rpath ordering matters for performance ; first add the one where most libraries are found if ( include solib dir ) { all runtime library search directories add ( rpath root ) ; } all runtime library search directories add all ( rpath roots for explicit so deps build ( ) ) ; if ( include toolchain libraries solib dir ) { all runtime library search directories add transitive ( runtime library search directories build ( ) ) ; } return new collected libraries to link ( libraries to link , expanded linker inputs builder build ( ) , library search directories build ( ) , all runtime library search directories build ( ) ) ; }


if a write would exceed the capacity of the direct buffers , it is set aside to be loaded by this function while the compressed data are consumed

synchronized void set input from saved data ( ) { if ( 0 > = user buf len ) { return ; } finished = false ; uncompressed direct buf len = math min ( user buf len , direct buffer size ) ; ( ( byte buffer ) uncompressed direct buf ) put ( user buf , user buf off , uncompressed direct buf len ) ; / / note how much data is being fed to lz 4 user buf off + = uncompressed direct buf len ; user buf len - = uncompressed direct buf len ; }


fetch message queues of topic < code > topic < code > , to which we may sendpublish messages

public list < message queue > fetch publish message queues ( string topic ) throws m q client exception { return this default m q producer impl fetch publish message queues ( with namespace ( topic ) ) ; }


check whether the given class matches the user - specified type name

public static boolean matches type name ( class < ? > clazz , @ nullable string type name ) { return ( type name ! = null & & ( type name equals ( clazz get type name ( ) ) | | type name equals ( clazz get simple name ( ) ) ) ) ; }


returns { @ code true } iff this test cluster should use a dummy geo shape field mapper

protected boolean add mock geo shape field mapper ( ) { return true ; }


determine the property type for the specified property , either checking the property descriptor or checking the value in case of an indexed or mapped element

class < ? > get property type ( string property name ) throws beans exception ;


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


validates that target execution framework can satisfy join filters if the join filter cannot be satisfied ( for example , if it is { @ code l c 1 > r c 2 } and the join only supports equi - join ) , removes the filter from { @ code join filters } and adds it to { @ code above filters } the default implementation does nothing ; i e the join can handle all conditions

protected void validate join filters ( list < rex node > above filters , list < rex node > join filters , join join , join rel type join type ) { final iterator < rex node > filter iter = join filters iterator ( ) ; while ( filter iter has next ( ) ) { rex node exp = filter iter next ( ) ; if ( ! predicate apply ( join , join type , exp ) ) { above filters add ( exp ) ; filter iter remove ( ) ; } } }


returns the current state of the panel as an enum

public panel state get panel state ( ) { return m slide state ; }


reads the map following a < code > type map < code > code

public tree map read map ( ) throws i o exception { int length = read map header ( ) ; tree map result = new tree map ( ) ; for ( int i = 0 ; i < length ; i + + ) { object key = read ( ) ; object value = read ( ) ; result put ( key , value ) ; } return result ; }


check if the replica has an associated mmap that has been fully loaded must be called with the cache lock held

public boolean has mmap ( ) { return ( ( mmap data ! = null ) & & ( mmap data instanceof mapped byte buffer ) ) ; }


public void set angular velocity ( float angular velocity ) { this angular velocity = angular velocity ; }


wraps the parent ' s child with a scale type drawable

static scale type drawable wrap child with scale type ( drawable parent parent , scaling utils scale type scale type ) { drawable child = parent set drawable ( s empty drawable ) ; child = maybe wrap with scale type ( child , scale type ) ; parent set drawable ( child ) ; preconditions check not null ( child , " parent has no child drawable ! " ) ; return ( scale type drawable ) child ; }


public list < snapshot files > snapshots ( ) { return this shard snapshots ; }


public static void wait until active ( final dynamo db client dynamo , final string table name ) throws exception { wait until active ( dynamo , table name , default wait timeout , default wait interval ) ; }


returns a new { @ link string data instance } that points to the string characters that start at { @ code byte offset } from the start of this instance if the requested offset is not valid , the base string instance ( itself ) will be returned instead of a new instance

public string data instance get byte offcut ( int byte offset ) { if ( is bad char size ( ) | | is probe ( ) | | ! is valid offcut offset ( byte offset ) ) { return null instance ; } int new length = math max ( 0 , length - byte offset ) ; string data instance sub = new string data instance ( this , get offcut layout ( ) , new wrapped mem buffer ( buf , byte offset ) , new length , charset name ) ; return sub ; }


public boolean use long keys ( ) { return schema use long key nodes ( ) ; }


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


public static void build ( mesh part builder builder , float x 1 , float y 1 , float z 1 , float x 2 , float y 2 , float z 2 , float cap length , float stem thickness , int divisions ) { vector 3 begin = obtain v 3 ( ) set ( x 1 , y 1 , z 1 ) , end = obtain v 3 ( ) set ( x 2 , y 2 , z 2 ) ; float length = begin dst ( end ) ; float cone height = length * cap length ; float cone diameter = 2 * ( float ) ( cone height * math sqrt ( 1f / 3 ) ) ; float stem length = length - cone height ; float stem diameter = cone diameter * stem thickness ; vector 3 up = obtain v 3 ( ) set ( end ) sub ( begin ) nor ( ) ; vector 3 forward = obtain v 3 ( ) set ( up ) crs ( vector 3 z ) ; if ( forward is zero ( ) ) forward set ( vector 3 x ) ; forward crs ( up ) nor ( ) ; vector 3 left = obtain v 3 ( ) set ( up ) crs ( forward ) nor ( ) ; vector 3 direction = obtain v 3 ( ) set ( end ) sub ( begin ) nor ( ) ; / / matrices matrix 4 user transform = builder get vertex transform ( obtain m 4 ( ) ) ; matrix 4 transform = obtain m 4 ( ) ; float [ ] val = transform val ; val [ matrix 4 m00 ] = left x ; val [ matrix 4 m01 ] = up x ; val [ matrix 4 m02 ] = forward x ; val [ matrix 4 m10 ] = left y ; val [ matrix 4 m11 ] = up y ; val [ matrix 4 m12 ] = forward y ; val [ matrix 4 m20 ] = left z ; val [ matrix 4 m21 ] = up z ; val [ matrix 4 m22 ] = forward z ; matrix 4 temp = obtain m 4 ( ) ; / / stem transform set translation ( obtain v 3 ( ) set ( direction ) scl ( stem length / 2 ) add ( x 1 , y 1 , z 1 ) ) ; builder set vertex transform ( temp set ( transform ) mul ( user transform ) ) ; cylinder shape builder build ( builder , stem diameter , stem length , stem diameter , divisions ) ; / / cap transform set translation ( obtain v 3 ( ) set ( direction ) scl ( stem length ) add ( x 1 , y 1 , z 1 ) ) ; builder set vertex transform ( temp set ( transform ) mul ( user transform ) ) ; cone shape builder build ( builder , cone diameter , cone height , cone diameter , divisions ) ; builder set vertex transform ( user transform ) ; free all ( ) ; }


sets the color the transparent - circle should have

public void set transparent circle color ( int color ) { paint p = ( ( pie chart renderer ) m renderer ) get paint transparent circle ( ) ; int alpha = p get alpha ( ) ; p set color ( color ) ; p set alpha ( alpha ) ; }


parses all items in the text input field and adds them as new tags

private void process creates ( ) { if ( program = = null ) { msg show info ( this , tool get active window ( ) , " no program " , " you must load a program before trying to create tags " ) ; return ; } list < string > dropped = new array list < > ( ) ; list < string > names = get input names ( ) ; for ( string name : names ) { / / only execute the create command if a tag with the given name does not already exist / / ( note : this could fail if the model is not yet loaded , but this is unlikely the / / only fallout is that the error message would not be shown - - the database will not add / / the tag twice ) if ( source panel tag exists ( name ) ) { dropped add ( name ) ; } else { command cmd = new create function tag cmd ( name ) ; tool execute ( cmd , program ) ; } } if ( ! dropped is empty ( ) ) { string text = string utils join ( dropped , " , " ) ; msg show info ( this , tool get active window ( ) , " duplicate tag names " , " tags aleady exist ignoring the following tags : " + text ) ; } swing run later ( ( ) - > tag input field set text ( " " ) ) ; }


invalidates a collection of access token and refresh token that were retrieved by { @ link token service # invalidate active tokens for realm and user }

private void invalidate all tokens ( collection < user token > user tokens , action listener < tokens invalidation result > listener ) { maybe start token remover ( ) ; / / invalidate the refresh tokens first so that they cannot be used to get new / / access tokens while we invalidate the access tokens we currently know about final iterator < time value > backoff = default backoff iterator ( ) ; index invalidation ( user tokens , backoff , " refresh token " , null , action listener wrap ( result - > index invalidation ( user tokens , backoff , " access token " , result , listener ) , listener : : on failure ) ) ; }


creates a new instance of this { @ code fragment options } with all flags adjusted as needed to represent the host platform

public fragment options get host ( ) { return get default ( ) ; }


connect a { @ link channel } to the remote peer

public channel future connect ( socket address remote address ) { object util check not null ( remote address , " remote address " ) ; validate ( ) ; return do resolve and connect ( remote address , config local address ( ) ) ; }


returns a highlight object corresponding to the given x - and y - touch positions in pixels

highlight get highlight ( float x , float y ) ;


refresh the resource based on identity passed in

collection < refresh response > refresh ( string identifier , string [ ] args ) throws i o exception ;


public non resident name table get non resident name table ( ) { return non res name table ; }


returns true if the tree should not show pointers

public boolean filter pointers ( ) { return filter pointers ; }


public static cookie generation context build cookie generation context ( final ticket granting cookie properties cookie ) { val remember me max age = ( int ) beans new duration ( cookie get remember me max age ( ) ) get seconds ( ) ; val builder = build cookie generation context builder ( cookie ) ; return builder remember me max age ( remember me max age ) build ( ) ; }


returns the id of the associated quorum peer , which will do for a unique id of this server

public long get server id ( ) { return self get id ( ) ; }


returns the retargeted class member of the given class member

private member update referenced member ( member referenced member , string name , string type , clazz new referenced class ) { if ( referenced member = = null ) { return null ; } return referenced member instanceof field ? ( member ) new referenced class find field ( name , type ) : ( member ) new referenced class find method ( name , type ) ; }


get app placement allocator related to the placement type requested

public static app placement allocator < scheduler node > get app placement allocator ( string app placement allocator name , app scheduling info app scheduling info , scheduler request key scheduler request key , r m context rm context ) { class < ? > policy class ; try { if ( app placement allocator name = = null ) { policy class = application scheduling config default application placement type class ; } else { policy class = class for name ( app placement allocator name ) ; } } catch ( class not found exception e ) { policy class = application scheduling config default application placement type class ; } if ( ! app placement allocator class is assignable from ( policy class ) ) { policy class = application scheduling config default application placement type class ; } @ suppress warnings ( " unchecked " ) app placement allocator < scheduler node > placement allocator instance = ( app placement allocator < scheduler node > ) reflection utils new instance ( policy class , null ) ; placement allocator instance initialize ( app scheduling info , scheduler request key , rm context ) ; return placement allocator instance ; }


validate a test where each result has the same values

private static < t > void validate ( graph < t , null value , null value > graph , long count , double score ) throws exception { data set < result < t > > pr = new page rank < t , null value , null value > ( damping factor , accuracy ) set include zero degree vertices ( true ) run ( graph ) ; list < result < t > > results = pr collect ( ) ; assert equals ( count , results size ( ) ) ; for ( result < t > result : results ) { assert equals ( score , result get page rank score ( ) get value ( ) , accuracy ) ; } }


public static configurable application context get configurable application context ( ) { return ( configurable application context ) context ; }


public list < list < read only first > > get array array of model ( ) { return array array of model ; }


public http headers get response headers ( ) { return response headers ; }


returns { @ code true } if the desugar tool transforms given invocation site in an adapter strategy , that is to replace the original invocation with its corresponding adapter method

static boolean should use api type adapter ( method invocation site verbatim invocation site , boot class path digest boot class path digest ) { return verbatim invocation site invocation kind ( ) ! = member use kind invokespecial & & verbatim invocation site owner ( ) is android domain type ( ) & & boot class path digest contains type ( verbatim invocation site owner ( ) ) & & verbatim invocation site method ( ) get header type name set ( ) stream ( ) any match ( class name : : is desugar shadowed type ) ; }


find beans annotated with { @ link controller advice @ controller advice } in the given { @ link application context } and wrap them as { @ code controller advice bean } instances as of spring framework 5 2 , the { @ code controller advice bean } instances in the returned list are sorted using { @ link order comparator # sort ( list ) }

public static list < controller advice bean > find annotated beans ( application context context ) { listable bean factory bean factory = context ; if ( context instanceof configurable application context ) { / / use internal bean factory for potential downcast to configurable bean factory above bean factory = ( ( configurable application context ) context ) get bean factory ( ) ; } list < controller advice bean > advice beans = new array list < > ( ) ; for ( string name : bean factory utils bean names for type including ancestors ( bean factory , object class ) ) { if ( ! scoped proxy utils is scoped target ( name ) ) { controller advice controller advice = bean factory find annotation on bean ( name , controller advice class ) ; if ( controller advice ! = null ) { / / use the @ controller advice annotation found by find annotation on bean ( ) / / in order to avoid a subsequent lookup of the same annotation advice beans add ( new controller advice bean ( name , bean factory , controller advice ) ) ; } } } order comparator sort ( advice beans ) ; return advice beans ; }


retrieve snapshot lifecycle statistics see https : www elastic coguideenelasticsearchclientjava - restcurrent java - rest - high - ilm - slm - get - snapshot - lifecycle - stats html for more

public get snapshot lifecycle stats response get snapshot lifecycle stats ( get snapshot lifecycle stats request request , request options options ) throws i o exception { return rest high level client perform request and parse entity ( request , index lifecycle request converters : : get snapshot lifecycle stats , options , get snapshot lifecycle stats response : : from x content , empty set ( ) ) ; }


generate xml for comments of a certain type

private void generate comment x m l ( address set view addrset , address addr , string builder buf , int commenttype ) { string typename ; switch ( commenttype ) { case code unit eol comment : typename = " user 1 " ; break ; case code unit pre comment : typename = " user 2 " ; break ; case code unit post comment : typename = " user 3 " ; break ; case code unit plate comment : typename = " header " ; break ; default : typename = " " ; break ; } address iterator iter = listing get comment address iterator ( commenttype , addrset , true ) ; while ( iter has next ( ) ) { address commaddr = iter next ( ) ; string text = listing get comment ( commenttype , commaddr ) ; if ( text ! = null ) { if ( commenttype = = code unit plate comment ) { / / plate comments on the function entry / / address are considered part of the header if ( commaddr equals ( addr ) ) { continue ; } } buf append ( " < comment " ) ; spec xml utils encode string attribute ( buf , " type " , typename ) ; buf append ( " > \ n " ) ; buf append ( varnode build x m l address ( addr ) ) ; buf append ( varnode build x m l address ( commaddr ) ) ; buf append ( " \ n < text > " ) ; spec xml utils xml escape ( buf , text ) ; buf append ( " < / text > \ n " ) ; buf append ( " < / comment > \ n " ) ; } } }


returns human - friendly help for the generator provide the consumer with help tips , parameters here

public string get help ( ) { return " generates a rust client / server library ( beta ) using the openapi - generator project " ; }


sets the settings and mappings as a single source

public create index request builder set source ( map < string , ? > source ) { request source ( source , logging deprecation handler instance ) ; return this ; }


drops existing columns the field expressions should be field reference expressions example : { @ code tab drop columns ( " a , b " ) }


public static void assert gauge ( string name , long expected , metrics record builder rb ) { assert assert equals ( " bad value for metric " + name , expected , get long gauge ( name , rb ) ) ; }


specify the uri by through a { @ link uri builder }

s uri ( function < uri builder , uri > uri function ) ;


set input ( ) takes a custom query and a separate " bounding query " to use instead of the custom " count query " used by d b input format

public static void set input ( job job , class < ? extends d b writable > input class , string input query , string input bounding query ) { d b input format set input ( job , input class , input query , " " ) ; job get configuration ( ) set ( d b configuration input bounding query , input bounding query ) ; job set input format class ( data driven d b input format class ) ; }


invoked by { @ link default generator } after all models have been post - processed , allowing for a last pass of codegen - specific model cleanup

public map < string , object > post process all models ( map < string , object > objs ) { final map < string , object > processed = super post process all models ( objs ) ; post process enum refs ( processed ) ; update value type property ( processed ) ; update nullable type property ( processed ) ; return processed ; }


public static process engine get process engine ( string process engine name ) { if ( ! is initialized ( ) ) { init ( ) ; } return process engines get ( process engine name ) ; }


encodes all initial vowels to a encodes non - initial vowels to a if m encode vowels is true

void encode vowels ( ) { if ( m current = = 0 ) { / / all init vowels map to ' a ' / / as of double metaphone metaph add ( " a " ) ; } else if ( m encode vowels ) { if ( char at ( m current ) ! = ' e ' ) { if ( skip silent ue ( ) ) { return ; } if ( o silent ( ) ) { m current + + ; return ; } / / encode all vowels and / / diphthongs to the same value metaph add ( " a " ) ; } else { encode e pronounced ( ) ; } } if ( ! ( ! is vowel ( m current - 2 ) & & string at ( ( m current - 1 ) , 4 , " lewa " , " lewo " , " lewi " , " " ) ) ) { m current = skip vowels ( m current ) ; } else { m current + + ; } }


public void flush ( ) throws i o exception { writer flush ( ) ; }


helper method to set api key prefix for the first api key authentication

public void set api key prefix ( string api key prefix ) { for ( authentication auth : authentications values ( ) ) { if ( auth instanceof api key auth ) { ( ( api key auth ) auth ) set api key prefix ( api key prefix ) ; return ; } } throw new runtime exception ( " no api key authentication configured ! " ) ; }


helper method to determine if an unsigned int value fits in a byte

protected static boolean unsigned fits in byte ( int value ) { return value = = ( value & 0xff ) ; }


sets whether audio offload scheduling is enabled if enabled , exo player ' s main loop will as rarely as possible when playing an audio stream using audio offload only use this scheduling mode if the player is not displaying anything to the user for example when the application is in the background , or the screen is off the player state ( including position ) is rarely updated ( roughly between every 10 seconds and 1 minute ) while offload scheduling is enabled , player events may be delivered severely delayed and apps should not interact with the player when returning to the foreground , disable offload scheduling and wait for { @ link player event listener # on experimental offload scheduling enabled changed ( boolean ) } to be called with { @ code offload scheduling enabled = false } before interacting with the player this mode should save significant power when the phone is playing offload audio with the screen off this mode only has an effect when playing an audio track in offload mode , which requires all the following : audio offload rendering is enabled in { @ link default renderers factory # set enable audio offload } or the equivalent option passed to { @ link default audio sink # default audio sink ( audio capabilities , default audio sink audio processor chain , boolean , boolean , boolean ) } an audio track is playing in a format that the device supports offloading ( for example , mp3 or aac ) the { @ link audio sink } is playing with an offload { @ link audio track } this method is experimental , and will be renamed or removed in a future release

void experimental set offload scheduling enabled ( boolean offload scheduling enabled ) ;


the preferred way to perform a batch update note that performing a batch update differs from performing a single update , in that an implementation of this class will continue to update properties if a < b > recoverable < b > error ( such as a type mismatch , but < b > not < b > an invalid field name or the like ) is encountered , throwing a { @ link property batch update exception } containing all the individual errors this exception can be examined later to see all binding errors properties that were successfully updated remain changed does not allow unknown fields or invalid fields

void set property values ( property values pvs ) throws beans exception ;


public boolean update cell value ( @ not null d b d attribute binding attr , @ not null result set row row , @ nullable object value ) { return update cell value ( attr , row , value , true ) ; }


register the status of network changed listener

public static void register network status changed listener ( final on network status changed listener listener ) { network changed receiver get instance ( ) register listener ( listener ) ; }


determines whether or not this filter is equal to the object that is passed in

public boolean equals ( object obj ) { if ( obj instanceof program diff filter ) { return ( ( program diff filter ) obj ) filter flags = = filter flags ; } return false ; }


gets the list of { @ link build } s that include changes by this user , by the timestamp order

public @ non null run list get builds ( ) { return run list from jobs ( ( iterable ) jenkins get ( ) all items ( job class ) ) filter ( ( predicate < run < ? , ? > > ) r - > r instanceof abstract build & & related to ( ( abstract build < ? , ? > ) r ) ) ; }


public principal peer principal ( ) { return principal ; }


append query properties to the redirect url stringifies , url - encodes and formats model attributes as query properties

protected void append query properties ( string builder target url , map < string , object > model , string encoding scheme ) throws unsupported encoding exception { / / extract anchor fragment , if any string fragment = null ; int anchor index = target url index of ( " # " ) ; if ( anchor index > - 1 ) { fragment = target url substring ( anchor index ) ; target url delete ( anchor index , target url length ( ) ) ; } / / if there aren ' t already some parameters , we need a " ? " boolean first = ( target url to string ( ) index of ( ' ? ' ) < 0 ) ; for ( map entry < string , object > entry : query properties ( model ) entry set ( ) ) { object raw value = entry get value ( ) ; collection < ? > values ; if ( raw value ! = null & & raw value get class ( ) is array ( ) ) { values = collection utils array to list ( raw value ) ; } else if ( raw value instanceof collection ) { values = ( ( collection < ? > ) raw value ) ; } else { values = collections singleton ( raw value ) ; } for ( object value : values ) { if ( first ) { target url append ( ' ? ' ) ; first = false ; } else { target url append ( ' & ' ) ; } string encoded key = url encode ( entry get key ( ) , encoding scheme ) ; string encoded value = ( value ! = null ? url encode ( value to string ( ) , encoding scheme ) : " " ) ; target url append ( encoded key ) append ( ' = ' ) append ( encoded value ) ; } } / / append anchor fragment , if any , to end of url if ( fragment ! = null ) { target url append ( fragment ) ; } }


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


create a < code > version < code > file for datanode inside the specified parent directory if such a file already exists , it will be overwritten the given version string will be written to the file as the layout version none of the parameters may be null

public static void create data node version file ( file [ ] parent , storage info version , string bpid , configuration conf ) throws i o exception { create data node version file ( parent , version , bpid , bpid , conf ) ; }


this method will " expand " the type arguments of the given type , only if the type is a { @ link class names # diff } or a { @ link java util collection } otherwise the type arguments won ' t be traversed and recorded

public static type spec generate type spec ( type mirror type ) { final type spec default value = new type spec ( safely get type name ( type ) , type get kind ( ) ! = type kind error ) ; return type accept ( new simple type visitor 6 < type spec , void > ( default value ) { @ override public type spec visit declared ( declared type t , void a void ) { final type element type element = ( type element ) t as element ( ) ; final string qualified name = type element get qualified name ( ) to string ( ) ; final supplier < type spec > superclass = new simple memoizing supplier < > ( ( ) - > { final type mirror mirror = type element get superclass ( ) ; return mirror get kind ( ) ! = type kind declared ? null : generate type spec ( mirror ) ; } ) ; final supplier < immutable list < type spec > > superinterfaces = new simple memoizing supplier < > ( ( ) - > { final list < ? extends type mirror > mirrors = type element get interfaces ( ) ; return immutable list copy of ( mirrors ! = null & & ! mirrors is empty ( ) ? mirrors stream ( ) filter ( mirror - > mirror get kind ( ) = = type kind declared ) map ( spec model utils : : generate type spec ) collect ( collectors to list ( ) ) : collections empty list ( ) ) ; } ) ; final supplier < immutable list < type spec > > type arguments = new simple memoizing supplier < > ( ( ) - > immutable list copy of ( class name best guess ( qualified name ) equals ( class names diff ) | | superinterfaces get ( ) stream ( ) any match ( type spec - > type spec is sub interface ( class names collection ) ) ? ( ( declared type ) type ) get type arguments ( ) stream ( ) map ( spec model utils : : generate type spec ) collect ( collectors to list ( ) ) : collections empty list ( ) ) ) ; return new type spec declared type spec ( safely get type name ( t ) , qualified name , superclass , superinterfaces , type arguments ) ; } } , null ) ; }


test will timeout if secure random implementation always returns a constant value

public void test random float ( ) throws exception { os secure random random = get os secure random ( ) ; float rand 1 = random next float ( ) ; float rand 2 = random next float ( ) ; while ( rand 1 = = rand 2 ) { rand 2 = random next float ( ) ; } random close ( ) ; }


the timestamp of the last processed record when this instance was created

public date get timestamp ( ) { return timestamp ; }


return the second key at { @ code 0 & lt ; = index & lt ; = capacity ( ) } the result is undefined if the slot is unused

public long get key 2 ( long id ) { return keys get ( 2 * id + 1 ) ; }


returns the set of superclasses and interfaces that are used in ' instanceof ' tests

private set instanceofed super classes ( clazz clazz ) { set set = new hash set ( ) ; / / visit all superclasses and interfaces , collecting the ones that are / / used in an ' instanceof ' test clazz hierarchy accept ( true , true , true , false , new instanceof class filter ( new class collector ( set ) ) ) ; return set ; }


add elements from { @ code names } into { @ code enabled } if they are in { @ code supported }

static void add if supported ( set < string > supported , list < string > enabled , string names ) { for ( string n : names ) { if ( supported contains ( n ) ) { enabled add ( n ) ; } } }


takes the given string and puts spaces on the boundaries defined by the groups passed in eg : if the source is " aa bbbb cc dddddd " and the groups are { 2 , 1 , 4 } , and the whitespace list is { 5 , 1 } the returned string will be " aabb bb ccdddddd " note that the mode passed in determines how we interpret group sizes if the mode is hex then a group size of ' 2 ' will mean 4 characters ( 2 bytes ) , but if the mode is binary then we ' ll grab 16 characters for that group of 2

private string restore grouping and whitespace ( string source , list < integer > groups , list < string > whitespace , input mode mode ) { / / first remove all whitespace source = source replace all ( " \ \ s " , " " ) ; / / now set up the mode modifier int mode modifier = ( mode = = input mode binary ) ? 8 : 2 ; / / now set up a counter to track our position in the whitespace list int whitespace index = 0 ; / / now loop over all the groups , breaking up our source string and adding whitespaces string builder sb = new string builder ( ) ; for ( integer group : groups ) { sb append ( source substring ( 0 , group * mode modifier ) ) ; if ( whitespace index < whitespace size ( ) ) { sb append ( whitespace get ( whitespace index ) ) ; whitespace index + + ; } / / and chop off the part of the string we just processed for the next iteration source = source substring ( group * mode modifier ) ; } return sb to string ( ) ; }


public static string get branch ( ) { return yarn version info get branch ( ) ; }


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


true if work should not happen ; false for normal path highlighting operations


run a given command in a subprocess , including threads to copy its stdout and stderr to our stdout and stderr

static process run client ( list < string > command , map < string , string > env ) throws i o exception { process builder builder = new process builder ( command ) ; if ( env ! = null ) { builder environment ( ) put all ( env ) ; } process result = builder start ( ) ; return result ; }


unique id for the router , typically the hostname : port string for the router ' s rpc server this id may be null on router startup before the rpc server has bound to a port

public string get router id ( ) { return this router id ; }


stop the given span , if and only if this one is the top element of { @ link # active span stack } because the tracing core must make sure the span must match in a stack module , like any program did

public boolean stop span ( abstract span span ) { abstract span last span = peek ( ) ; if ( last span = = span ) { if ( last span instanceof abstract tracing span ) { abstract tracing span to finish span = ( abstract tracing span ) last span ; if ( to finish span finish ( segment ) ) { pop ( ) ; } } else { pop ( ) ; } } else { throw new illegal state exception ( " stopping the unexpected span = " + span ) ; } finish ( ) ; return active span stack is empty ( ) ; }


public static list < string > to upper list ( list < string > source list ) { if ( is empty ( source list ) ) { return source list ; } list < string > dest list = new array list < > ( source list size ( ) ) ; for ( string element : source list ) { if ( element ! = null ) { dest list add ( element to upper case ( ) ) ; } else { dest list add ( null ) ; } } return dest list ; }


public static void put next value pointer ( memory segment memory segment , int offset , long next value pointer ) { memory segment put long ( offset + next value pointer offset , next value pointer ) ; }


public void test nested rewrites ( ) throws i o exception { field sort builder sort builder = new field sort builder ( mapped string fieldname ) ; range query builder range query = new range query builder ( " field name " ) { @ override public query builder do rewrite ( query rewrite context query shard context ) throws i o exception { return new match none query builder ( ) ; } } ; nested sort builder nested sort = new nested sort builder ( " path " ) ; nested sort set filter ( range query ) ; sort builder set nested sort ( nested sort ) ; field sort builder rewritten = sort builder rewrite ( create mock shard context ( ) ) ; assert not same ( range query , rewritten get nested sort ( ) get filter ( ) ) ; }


creates a new chm with an aggressive concurrency level , aimed at high concurrent update rate long living maps

public static < k , v > concurrent map < k , v > new concurrent map with aggressive concurrency ( ) { return new concurrent map with aggressive concurrency ( 16 ) ; }


called when the user clicks through an ad ( for example , following a ' learn more ' link )


base 6 4 encoded sha - 512 checksum of the downloaded file , if it could be computed

public string get computed s h a 5 1 2 ( ) { return computed s h a 5 1 2 ; }


public long get exception handler offset ( ) { return exception handler offset ; }


attempt to reserve the given amount of memory with the cache manager

boolean reserve locked memory ( long bytes needed ) { if ( cache manager reserve ( bytes needed ) > 0 ) { return true ; } / / round up bytes needed to os page size and attempt to evict / / one more more blocks to free up the reservation bytes needed = cache manager round up page size ( bytes needed ) ; evict lazy persist blocks ( bytes needed ) ; return cache manager reserve ( bytes needed ) > 0 ; }