the minimum length a suggest text term must have in order to be corrected defaults to { @ code 4 }

public term suggestion builder min word length ( int min word length ) { if ( min word length < 1 ) { throw new illegal argument exception ( " min word length must be greater or equal to 1 " ) ; } this min word length = min word length ; return this ; }


public task unregister ( task task ) { logger trace ( " unregister task for id : { } " , task get id ( ) ) ; if ( task instanceof cancellable task ) { cancellable task holder holder = cancellable tasks remove ( task get id ( ) ) ; if ( holder ! = null ) { holder finish ( ) ; return holder get task ( ) ; } else { return null ; } } else { return tasks remove ( task get id ( ) ) ; } }


delegates the callbacks received in the adapter to the controller

public void teardown sticky header view ( @ not null view sticky header ) { epoxy controller teardown sticky header view ( sticky header ) ; }


removes the script info object for the specified file

public void remove metadata ( resource file script file ) { script file to info map remove ( script file ) ; string name = script file get name ( ) ; list < resource file > files = script name to files map get ( name ) ; if ( files ! = null ) { files remove ( script file ) ; if ( files is empty ( ) ) { script name to files map remove ( name ) ; } } }


public void set id ( long id ) { this id = id ; }


guaranteed to throw an exception and leave the table unmodified

public final v put ( r row key , c column key , v value ) { throw new unsupported operation exception ( ) ; }


protected map < string , list < field > > parse pk values ( table records records ) { return parse pk values ( records get rows ( ) , records get table meta ( ) get primary key only name ( ) ) ; }


name of the category for this management link exists so that plugins with core dependency pre - dating the version when this was introduced can define a category plugins with newer core dependency override { @ link # get category ( ) } instead

protected @ non null string get category name ( ) { return " uncategorized " ; }


gets a binding implementation first , it check to see if the parent has a binding if the parent has a binding and the binding is scoped , it will use that binding otherwise , this checks for an explicit binding if no explicit binding is found , it looks for a just - in - time binding

public < t > binding impl < t > get binding or throw ( key < t > key , errors errors ) throws errors exception { / / check explicit bindings , i e bindings created by modules binding impl < t > binding = state get explicit binding ( key ) ; if ( binding ! = null ) { return binding ; } / / look for an on - demand binding return get just in time binding ( key , errors ) ; }


invoked when the user has set a new target state ( e g paused )

void on connector target state change ( string connector ) ;


returns { @ code true } if the running jvm is either < a href = " https : developer ibm comjavasdk " > ibm j9 or < a href = " https : www eclipse orgopenj 9 " > eclipse open j 9 , { @ code false } otherwise

public static boolean is j 9 jvm ( ) { return is j9 jvm ; }


get userlogout : logs out current logged in user session

com netflix hystrix hystrix command < response entity < void > > logout user ( ) ;


disassociates given { @ link callback } if callback is not associated , nothing happens

public void remove view ( final callback callback ) { for ( int i = 0 ; i < m callbacks size ( ) ; i + + ) { final callback weak reference reference = m callbacks get ( i ) ; final callback item = reference get ( ) ; if ( item = = null | | item = = callback ) { / / always remove null references to reduce list size m callbacks remove ( reference ) ; } } }


writes a d w a r fv 3 - style unsigned leb128 integer for details , see the " dalvik executable format " document or dwarf v 3 section 7 6

public int write uleb 1 2 8 ( int value ) ;


merge multiple { @ link cc debug info context } s into one

public static cc debug info context merge ( collection < cc debug info context > contexts ) { nested set builder < artifact > transitive dwo files = nested set builder stable order ( ) ; nested set builder < artifact > transitive pic dwo files = nested set builder stable order ( ) ; for ( cc debug info context context : contexts ) { transitive dwo files add transitive ( context get transitive dwo files ( ) ) ; transitive pic dwo files add transitive ( context get transitive pic dwo files ( ) ) ; } return new cc debug info context ( transitive dwo files build ( ) , transitive pic dwo files build ( ) ) ; }


public static void hide soft input ( @ non null final view view ) { input method manager imm = ( input method manager ) utils get app ( ) get system service ( context input method service ) ; if ( imm = = null ) return ; imm hide soft input from window ( view get window token ( ) , 0 ) ; }


returns the last { @ code number of builds } builds with a build result ≥ { @ code threshold }

public list < run t > get last builds over threshold ( int number of builds , result threshold ) { run t r = get last build ( ) ; return r get builds over threshold ( number of builds , threshold ) ; }


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


show the toast for a long period of time

public static void show long ( @ string res final int res id ) { show ( utils bridge get string ( res id ) , toast length long , default maker ) ; }


nodes on which the containers for this { @ link r m app } ran


return an html formatted rendering of a function

public static string get tool tip text ( function function , boolean include symbol details ) { string builder buf = new string builder ( html ) ; external location ext loc = function get external location ( ) ; if ( ext loc ! = null ) { buf append ( " external " ) append ( html space ) ; } else if ( function is thunk ( ) ) { buf append ( " thunk " ) append ( html space ) ; } if ( include symbol details ) { buf append ( " function " ) ; buf append ( html space ) append ( " - " ) append ( html space ) ; buf append ( friendly encode h t m l ( function get symbol ( ) get name ( true ) ) ) ; if ( ext loc ! = null ) { address addr = ext loc get address ( ) ; if ( addr ! = null ) { buf append ( html space ) append ( " @ " ) append ( html space ) ; buf append ( addr to string ( true ) ) ; } } buf append ( br ) ; } buf append ( get function signature preview ( function ) ) ; buf append ( br ) ; buf append ( " < table cellspacing = 0 callpadding = 0 border = 0 > " ) ; buf append ( get parameter detail row ( function get return ( ) ) ) ; for ( parameter p : function get parameters ( ) ) { buf append ( get parameter detail row ( p ) ) ; } if ( ext loc ! = null ) { string original imported name = ext loc get original imported name ( ) ; if ( original imported name ! = null ) { buf append ( " imported " ) append ( html space ) append ( " name : " ) append ( html space ) append ( friendly encode h t m l ( original imported name ) ) ; } } buf append ( " < / table > < / html > " ) ; return buf to string ( ) ; }


copy a single object in the bucket via a copy operation there ' s no update of metadata , directory markers , etc callers must implement

private copy result copy file ( string src key , string dst key , long size , s 3 object attributes src attributes , s 3 a read op context read context ) throws i o exception , interrupted i o exception { log debug ( " copy file { } - > { } " , src key , dst key ) ; progress listener progress listener = progress event - > { switch ( progress event get event type ( ) ) { case transfer part completed event : increment write operations ( ) ; break ; default : break ; } } ; change tracker change tracker = new change tracker ( key to qualified path ( src key ) to string ( ) , change detection policy , read context get s 3 a statistics context ( ) new input stream statistics ( ) get change tracker statistics ( ) , src attributes ) ; string action = " copy file ( " + src key + " , " + dst key + " ) " ; invoker read invoker = read context get read invoker ( ) ; object metadata srcom ; try { srcom = once ( action , src key , ( ) - > get object metadata ( src key , change tracker , read invoker , " copy " ) ) ; } catch ( file not found exception e ) { / / if rename fails at this point it means that the expected file was not / / found / / the cause is believed to always be one of / / - file was deleted since list / s 3 guard metastore list ( ) knew of it / / - s 3 guard is asking for a specific version and it ' s been removed by / / lifecycle rules / / - there ' s a 404 cached in the s3 load balancers log debug ( " get object metadata ( { } ) failed to find an expected file " , src key , e ) ; / / we create an exception , but the text depends on the s 3 guard state string message = has metadata store ( ) ? remote file changed exception file never found : remote file changed exception file not found single attempt ; throw new remote file changed exception ( key to qualified path ( src key ) to string ( ) , action , message , e ) ; } object metadata dstom = clone object metadata ( srcom ) ; set optional object metadata ( dstom ) ; return read invoker retry ( action , src key , true , ( ) - > { copy object request copy object request = new copy object request ( bucket , src key , bucket , dst key ) ; change tracker maybe apply constraint ( copy object request ) ; set optional copy object request parameters ( srcom , copy object request ) ; copy object request set canned access control list ( canned a c l ) ; copy object request set new object metadata ( dstom ) ; optional of nullable ( srcom get storage class ( ) ) if present ( copy object request : : set storage class ) ; increment statistic ( object copy requests ) ; copy copy = transfers copy ( copy object request ) ; copy add progress listener ( progress listener ) ; copy outcome copy outcome = copy outcome wait for copy ( copy ) ; interrupted exception interrupted exception = copy outcome get interrupted exception ( ) ; if ( interrupted exception ! = null ) { / / copy interrupted : convert to an i o exception throw ( i o exception ) new interrupted i o exception ( " interrupted copying " + src key + " to " + dst key + " , cancelling " ) init cause ( interrupted exception ) ; } sdk base exception aws exception = copy outcome get aws exception ( ) ; if ( aws exception ! = null ) { change tracker process exception ( aws exception , " copy " ) ; throw aws exception ; } copy result result = copy outcome get copy result ( ) ; change tracker process response ( result ) ; increment write operations ( ) ; instrumentation files copied ( 1 , size ) ; return result ; } ) ; }


public void delete pet test ( test context test context ) { async async = test context async ( ) ; long pet id = null ; string api key = null ; api delete pet ( pet id , api key , result - > { / / todo : test validations async complete ( ) ; } ) ; }


determine if the array set contains all of the values in the given collection

public boolean contains all ( collection < ? > collection ) { iterator < ? > it = collection iterator ( ) ; while ( it has next ( ) ) { if ( ! contains ( it next ( ) ) ) { return false ; } } return true ; }


ensure that the given address is valid and has a port specified

private static boolean check address ( url addr ) { return addr get port ( ) ! = 0 ; }


updates this sub memory block to have a new owning memory block and offset within that block this is used when splitting a block and entire sub blocks have to be moved to the new split block

protected void set parent id and starting offset ( long key , long starting offset ) throws i o exception { this sub block offset = starting offset ; record set long value ( memory map d b adapter sub parent id col , key ) ; record set long value ( memory map d b adapter sub start offset col , starting offset ) ; adapter update sub block record ( record ) ; }


public float get angular damping ( ) { return jni get angular damping ( addr ) ; }


return if this transaction is defined as read - only transaction

public boolean is read only ( ) { return this read only ; }


private byte [ ] encode ( dex file file , string prefix , print writer debug print , annotated output out , boolean consume ) { byte [ ] result = encode 0 ( file , prefix , debug print , out , consume ) ; if ( enable encoder self check & & ( file ! = null ) ) { try { debug info decoder validate encode ( result , file , ref , code , is static ) ; } catch ( runtime exception ex ) { / / reconvert , annotating to system err encode 0 ( file , " " , new print writer ( system err , true ) , null , false ) ; throw ex ; } } return result ; }


public located block get ( int index ) { return blocks get ( index ) ; }


get user { username } : get user by user name

default completable future < response entity < user > > get user by name ( @ api param ( value = " the name that needs to be fetched use user 1 for testing " , required = true ) @ path variable ( " username " ) string username ) { return completable future supply async ( ( ) - > { get request ( ) if present ( request - > { for ( media type media type : media type parse media types ( request get header ( " accept " ) ) ) { if ( media type is compatible with ( media type value of ( " application / json " ) ) ) { string example string = " { \ " first name \ " : \ " first name \ " , \ " last name \ " : \ " last name \ " , \ " password \ " : \ " password \ " , \ " user status \ " : 6 , \ " phone \ " : \ " phone \ " , \ " id \ " : 0 , \ " email \ " : \ " email \ " , \ " username \ " : \ " username \ " } " ; api util set example response ( request , " application / json " , example string ) ; break ; } if ( media type is compatible with ( media type value of ( " application / xml " ) ) ) { string example string = " < user > < id > 123456789 < / id > < username > aeiou < / username > < first name > aeiou < / first name > < last name > aeiou < / last name > < email > aeiou < / email > < password > aeiou < / password > < phone > aeiou < / phone > < user status > 123 < / user status > < / user > " ; api util set example response ( request , " application / xml " , example string ) ; break ; } } } ) ; return new response entity < > ( http status not implemented ) ; } , runnable : : run ) ; }


prepare this context for refreshing , setting its startup date and active flag as well as performing any initialization of property sources

protected void prepare refresh ( ) { / / switch to active this startup date = system current time millis ( ) ; this closed set ( false ) ; this active set ( true ) ; if ( logger is debug enabled ( ) ) { if ( logger is trace enabled ( ) ) { logger trace ( " refreshing " + this ) ; } else { logger debug ( " refreshing " + get display name ( ) ) ; } } / / initialize any placeholder property sources in the context environment init property sources ( ) ; / / validate that all properties marked as required are resolvable : / / see configurable property resolver # set required properties get environment ( ) validate required properties ( ) ; / / store pre - refresh application listeners if ( this early application listeners = = null ) { this early application listeners = new linked hash set < > ( this application listeners ) ; } else { / / reset local application listeners to pre - refresh state this application listeners clear ( ) ; this application listeners add all ( this early application listeners ) ; } / / allow for the collection of early application events , / / to be published once the multicaster is available this early application events = new linked hash set < > ( ) ; }


this is overridden to ensure that this class ' s create ( ) method is ultimately called { @ inherit doc }

public f s data output stream builder append file ( path path ) { return create data output stream builder ( this , path ) append ( ) ; }


returns a css selector that selects all elements with { @ code class = class name } and all their descendants

public static string css all class descendants selector ( string class name ) { return " " + class name + " , " + class name + " * " ; }


long name to checkpoint i d ( string name ) ;


finds pets by status multiple status values can be provided with comma separated strings

public void find pets by status test ( ) throws api exception { list < string > status = null ; / / list < pet > response = api find pets by status ( status ) ; / / todo : test validations }


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


public api response < void > logout user with http info ( ) throws api exception { http request builder local var request builder = logout user request builder ( ) ; try { http response < input stream > local var response = member var http client send ( local var request builder build ( ) , http response body handlers of input stream ( ) ) ; if ( member var response interceptor ! = null ) { member var response interceptor accept ( local var response ) ; } if ( local var response status code ( ) / 100 ! = 2 ) { throw new api exception ( local var response status code ( ) , " logout user call received non - success response " , local var response headers ( ) , local var response body ( ) = = null ? null : new string ( local var response body ( ) read all bytes ( ) ) ) ; } return new api response < void > ( local var response status code ( ) , local var response headers ( ) map ( ) , null ) ; } catch ( i o exception e ) { throw new api exception ( e ) ; } catch ( interrupted exception e ) { thread current thread ( ) interrupt ( ) ; throw new api exception ( e ) ; } }


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

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


if true , then bookmark conflicts will be overwritten

public boolean is overwrite bookmark conflicts ( ) { return overwrite bookmark conflicts ; }


returns a request builder to load the given { @ link file } note - this method caches data for files using only the file path itself as the cache key the data in the file can change so using this method can lead to displaying stale data if you expect the data in the file to change , consider using { @ link com bumptech glide request request options # signature ( com bumptech glide load key ) } to mixin a signature you create that identifies the data currently in the file that will invalidate the cache if that data changes alternatively , using { @ link com bumptech glide load engine disk cache strategy # none } andor { @ link com bumptech glide request request options # skip memory cache ( boolean ) } may be appropriate

public request builder < transcode type > load ( @ nullable file file ) { return load generic ( file ) ; }


get the setting for { @ link # force unigrams ( ) }

public boolean force unigrams ( ) { return this force unigrams ; }


if you have image assets and use { @ link lottie drawable } directly , you must call this yourself calling recycle bitmaps ( ) doesn ' t have to be final and { @ link lottie drawable } will recreate the bitmaps if needed but they will leak if you don ' t recycle them

@ suppress warnings ( " weaker access " ) public void recycle bitmaps ( ) { if ( image asset bitmap manager ! = null ) { image asset bitmap manager recycle bitmaps ( ) ; } }


perform the operation that a shutdown hook would have

public void delete temporary files ( ) { if ( ! should reap ( ) ) { return ; } for ( file file : temporary files ) { try { file handler delete ( file ) ; } catch ( unchecked i o exception ignore ) { / / ignore ; an interrupt will already have been logged } } }


returns how the scores from the matching child documents are mapped into the nested parent document

public score mode score mode ( ) { return score mode ; }


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


gets the action index to use for calls to { @ link recognizer # action }

public int get action index ( ) { return action index ; }


public string get endpoint id ( ) { return endpoint id ; }


get the value of the ' { @ code disabled } ' attribute

public boolean is disabled ( ) { return this disabled ; }


return a new and not started { @ link stopwatch }

public static stopwatch create not started ( ) { return new stopwatch ( ) ; }


this method will be removed or it ' s visibility will be changed in a certain version after april 5 , 2020 , so please do not use this method

public void send message back ( message ext msg , int delay level ) throws remoting exception , m q broker exception , interrupted exception , m q client exception { msg set topic ( with namespace ( msg get topic ( ) ) ) ; this default m q pull consumer impl send message back ( msg , delay level , null ) ; }


writes { @ code count } characters from { @ code str } starting at { @ code offset } to the target

public void write ( string str , int offset , int count ) throws i o exception { if ( count < 0 ) { / / other cases tested by get chars ( ) throw new string index out of bounds exception ( ) ; } char buf [ ] = new char [ count ] ; str get chars ( offset , offset + count , buf , 0 ) ; synchronized ( lock ) { write ( buf , 0 , buf length ) ; } }


public long get physical memory size ( ) { return get conf ( ) get long ( maxpmem testing property , - 1 ) ; }


public map < string , list < string > > get response headers ( ) { return response headers ; }


creates a view from the given { @ link data stream } in a given path with specified field names registered views can be referenced in sql queries there are two modes for mapping original fields to the fields of the view : 1 reference input fields by name : all fields in the schema definition are referenced by name ( and possibly renamed using an alias ( as ) moreover , we can define proctime and rowtime attributes at arbitrary positions using arbitrary names ( except those that exist in the result schema ) in this mode , fields can be reordered and projected out this mode can be used for any input type , including p o j os example : { @ code data stream < tuple 2 < string , long > > stream = reorder the fields , rename the original ' f 0 ' field to ' name ' and add event - time attribute named ' rowtime ' table env create temporary view ( " cat db my table " , stream , " f 1 , rowtime rowtime , f 0 as ' name ' " ) ; } 2 reference input fields by position : in this mode , fields are simply renamed event - time attributes can replace the field on their position in the input data ( if it is of correct type ) or be appended at the end proctime attributes must be appended at the end this mode can only be used if the input type has a defined field order ( tuple , case class , row ) and none of the { @ code fields } references a field of the input type example : { @ code data stream < tuple 2 < string , long > > stream = rename the original fields to ' a ' and ' b ' and extract the internally attached timestamp into an event - time attribute named ' rowtime ' table env create temporary view ( " cat db my table " , stream , " a , b , rowtime rowtime " ) ; } temporary objects can shadow permanent ones if a permanent object in a given path exists , it will be inaccessible in the current session to make the permanent object available again you can drop the corresponding temporary object

< t > void create temporary view ( string path , data stream < t > data stream , string fields ) ;


get number of zeros needed to pad the string to the specified alignment

private int get string pad length ( program program , address end address ) { address next addr = end address next ( ) ; if ( next addr = = null ) { return 0 ; } long mod result = next addr get offset ( ) % end alignment ; if ( mod result = = 0 ) { return 0 ; } int pad bytes needed = end alignment - ( int ) mod result ; try { byte [ ] bytes = new byte [ pad bytes needed ] ; if ( program get memory ( ) get bytes ( next addr , bytes ) = = pad bytes needed ) { for ( byte b : bytes ) { if ( b ! = 0 ) { return 0 ; } } } } catch ( exception e ) { return 0 ; } return pad bytes needed ; }


public static o auth 2 0 response mode types get response mode type ( final j e e context context ) { val response type = context get request parameter ( o auth 2 0 constants response mode ) map ( string : : value of ) or else ( string utils empty ) ; val type = arrays stream ( o auth 2 0 response mode types values ( ) ) filter ( t - > t get type ( ) equals ignore case ( response type ) ) find first ( ) or else ( o auth 2 0 response mode types none ) ; logger debug ( " o auth response type is [ { } ] " , type ) ; return type ; }


determine if this { @ code merged context configuration } instance has class - based resources

public boolean has classes ( ) { return ! object utils is empty ( get classes ( ) ) ; }


unregister default callback for language defined pcodeops ( call other ) warning ! using this method may circumvent the default callother emulation support when supplied by the processor module

public void unregister default call other callback ( ) { emulator get break table ( ) unregister pcode callback ( " * " ) ; }


public static options get cancel options ( ) { return cancel options ; }


returns the mean time spent playing or actively waiting for playback per foreground playback , in milliseconds , or { @ link c # time unset } if no playback has been in foreground

public long get mean play and wait time ms ( ) { return foreground playback count = = 0 ? c time unset : get total play and wait time ms ( ) / foreground playback count ; }


call this after execute merge ( ) if you expect to get a prompt from one of the merge manager ' s " choose " dialogs it will give the initial automerge a chance to occur before you begin trying to programmatically choose buttons this currently waits up to 5 seconds for prompting to begin

protected void wait for prompting ( ) { wait for prompting ( max merge timeout ) ; }


called when a { @ link cache span } is removed from the cache

void on span removed ( cache cache , cache span span ) ;


public map < string , list < integer > > get map array integer ( ) { return map array integer ; }


groups the elements on some grouping keys use this before a selection with aggregations to perform the aggregation on a per - group basis similar to a sql group by statement scala example : { @ code tab group by ( $ ( " key " ) ) select ( $ ( " key " ) , $ ( " value " ) avg ( ) ) ; } scala example : { @ code tab group by ( $ " key " ) select ( $ " key " , $ " value " avg ) }

grouped table group by ( expression fields ) ;


in this test , we block a and also give it an empty data frame to send all bytes should be delegated to by c and d here ' s a view of the tree ( stream a is blocked ) 0 \ [ a ] ( 0 ) b \ c d

public void blocked stream with data and not allowed to send should spread data to children ( ) throws http 2 exception { / / a cannot stream init state ( stream a , 0 , true , false ) ; blocked stream should spread data to children ( false ) ; }


create a new { @ link channel future } which is marked as succeeded already so { @ link channel future # is success ( ) } will return { @ code true } all { @ link future listener } added to it will be notified directly also every call of blocking methods will just return without blocking

channel future new succeeded future ( ) ;


compute the path where the output of magic task attempts are stored

public static path get magic task attempts path ( string job u u i d , path dest ) { return new path ( get magic job attempt path ( job u u i d , dest ) , " tasks " ) ; }


public void start up ( ) { descriptor = method descriptor < string , integer > new builder ( ) set type ( method descriptor method type unknown ) set full method name ( " a service / method " ) set request marshaller ( string marshaller ) set response marshaller ( int marshaller ) build ( ) ; when ( channel new call ( same ( descriptor ) , any ( call options class ) ) ) then return ( call ) ; do return ( " localhost : 443 " ) when ( channel ) authority ( ) ; interceptor = new client auth interceptor ( credentials , executor ) ; }


tests that the { @ link future # get ( long , time unit ) } method times out correctly

public void test timeout on get works correctly ( ) throws interrupted exception , execution exception { / / the task thread waits for the latch , so we expect a timeout here try { future get ( 20 , time unit milliseconds ) ; fail ( " should have timed out trying to get the value " ) ; } catch ( timeout exception expected ) { } finally { latch count down ( ) ; } }


this method retrieves all the node labels in the cluster , and it is reachable by using { @ link r m w s consts # get node labels }

node labels info get cluster node labels ( http servlet request hsr ) throws i o exception ;


test that old in - progress logs are properly purged

public void test old in progress ( ) throws i o exception { test case description tc = new test case description ( ) ; tc add root ( " / foo 1 " , name node dir type image and edits ) ; tc add image ( " / foo 1 / current / " + get image file name ( 100 ) , true ) ; tc add image ( " / foo 1 / current / " + get image file name ( 200 ) , true ) ; tc add image ( " / foo 1 / current / " + get image file name ( 300 ) , false ) ; tc add image ( " / foo 1 / current / " + get image file name ( 400 ) , false ) ; tc add log ( " / foo 1 / current / " + get in progress edits file name ( 101 ) , true ) ; run test ( tc ) ; }


find the fields constant that matches field id , or null if its not found

public static fields find by thrift id ( int field id ) { switch ( field id ) { case 1 : / / component id return component id ; case 2 : / / stream id return stream id ; default : return null ; } }


returns the last build that didn ' t fail before this build

public @ check for null run t get previous not failed build ( ) { run t r = get previous build ( ) ; while ( r ! = null & & r get result ( ) = = result failure ) r = r get previous build ( ) ; return r ; }


add a bdo ( bidirectional override ) element

special bdo ( dir dir , string cdata ) ;


add the child node to parent and , if child is a file , update block map this method is only used for image loading so that synchronization , modification time update and space count update are not needed

private void add to parent ( i node directory parent , i node child ) throws illegal reserved path exception { f s directory fs dir = namesystem dir ; if ( parent = = fs dir root dir ) { child set local name ( rename reserved root component on upgrade ( child get local name bytes ( ) , get layout version ( ) ) ) ; } / / note : this does not update space counts for parents if ( ! parent add child ( child ) ) { return ; } namesystem dir cache name ( child ) ; if ( child is file ( ) ) { update blocks map ( child as file ( ) ) ; } }


public void set comment ( string comment ) throws zip exception { set comment ( get bytes ( comment ) ) ; }


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


this method is deprecated and will be removed in the future releases handle async db operation in your own logic instead

public static update or delete executor update all async ( final string table name , final content values values , final string conditions ) { final update or delete executor executor = new update or delete executor ( ) ; runnable runnable = new runnable ( ) { @ override public void run ( ) { synchronized ( lite pal support class ) { final int rows affected = update all ( table name , values , conditions ) ; if ( executor get listener ( ) ! = null ) { operator get handler ( ) post ( new runnable ( ) { @ override public void run ( ) { executor get listener ( ) on finish ( rows affected ) ; } } ) ; } } } } ; executor submit ( runnable ) ; return executor ; }


public cancellable delete script async ( delete stored script request request , request options options , action listener < acknowledged response > listener ) { return perform request async and parse entity ( request , request converters : : delete script , options , acknowledged response : : from x content , listener , empty set ( ) ) ; }


getter method for property < tt > hosts < tt >

public list < ip address info > get hosts ( ) { return hosts ; }


gets the name of the host where the attempt executed

public string get hostname ( ) { return hostname ; }


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


for debugging : display this parse tree via the given stream

public void print ( print stream out ) { print ( out , " " ) ; }


generate the name to use to set the header defined by the specified { @ code property name } to the { @ link message headers } instance

protected string to header name ( string property name ) { string header name = property name ; if ( string utils has text ( this inbound prefix ) & & ! header name starts with ( this inbound prefix ) ) { header name = this inbound prefix + property name ; } return header name ; }


public string get resource id ( ) { return resource id ; }


returns the list of { @ link spawn strategy } s that should be used to execute the given spawn

public list < ? extends spawn strategy > resolve ( spawn spawn , action execution context action execution context ) throws user exec exception { list < ? extends spawn strategy > strategies = action execution context get context ( spawn strategy registry class ) get strategies ( spawn , action execution context get event handler ( ) ) ; strategies = strategies stream ( ) filter ( spawn action context - > spawn action context can exec ( spawn , action execution context ) ) collect ( collectors to list ( ) ) ; if ( strategies is empty ( ) ) { string message = string format ( " no usable spawn strategy found for spawn with mnemonic % s your " + " - - spawn strategy , - - genrule strategy and / or - - strategy flags are probably too " + " strict visit https : / / github com / bazelbuild / bazel / issues / 7480 for " + " migration advice " , spawn get mnemonic ( ) ) ; throw new user exec exception ( failure detail new builder ( ) set message ( message ) set spawn ( failure details spawn new builder ( ) set code ( code no usable strategy found ) ) build ( ) ) ; } return strategies ; }


protected map < string , list < object > > resolve attributes from principal attribute repository ( final principal principal , final registered service registered service ) { val repository = object utils default if null ( this principal attributes repository , get principal attributes repository from application context ( ) ) ; if ( repository ! = null ) { logger debug ( " using principal attribute repository [ { } ] to retrieve attributes " , repository ) ; return repository get attributes ( principal , registered service ) ; } return principal get attributes ( ) ; }


set the < code > relax locality < code > of the request

public resource request builder relax locality ( boolean relax locality ) { resource request set relax locality ( relax locality ) ; return this ; }


checks whether this graph stores reverse dependencies

default boolean stores reverse deps ( ) { return true ; }


sets the latest timestamp that serves as an indication of the current point in time before calling this method make sure all the associated calls to { @ link # increment } were already made

public void set latest timestamp ( instant new latest timestamp ) { objects require non null ( new latest timestamp ) ; if ( this latest timestamp ! = null ) { instant next window start timestamp = this latest timestamp truncated to ( window unit ) plus ( window size ) ; if ( new latest timestamp compare to ( next window start timestamp ) > = 0 ) { / / when we cross the boundary between windows , we update the exponential average with metric values accumulated so far in / / incremental metric value ms variable this previous exponential average ms = get current exponential average ms ( ) ; this incremental metric value ms = 0 0 ; } } else { / / this is the first time { @ link # set latest record timestamp } is called on this object } if ( this latest timestamp = = null | | new latest timestamp is after ( this latest timestamp ) ) { this latest timestamp = new latest timestamp ; } }


get authentications ( key : authentication name , value : authentication )

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


tests the create of a file on root where the path is matching to an existing file on fallback ' s file on root

public void test create file on root with fallback with file already exist ( ) throws exception { configuration conf = new configuration ( ) ; path fallback target = new path ( target test root , " fallback dir " ) ; path test file = new path ( fallback target , " test file " ) ; / / pre - creating test file in fallback fs target create ( test file ) close ( ) ; config util add link ( conf , " / user 1 / hive / " , new path ( target test root to string ( ) ) to uri ( ) ) ; config util add link fallback ( conf , fallback target to uri ( ) ) ; abstract file system vfs = abstract file system get ( view fs default cluster uri , conf ) ; path vfs test file = new path ( " / test file " ) ; assert true ( fs target exists ( test file ) ) ; vfs create ( vfs test file , enum set of ( create ) , options create opts perms ( fs permission get default ( ) ) ) close ( ) ; }


returns a fixed - size list backed by the specified array , similar to { @ link arrays # as list ( object [ ] ) } the list supports { @ link list # set ( int , object ) } , but any attempt to set a value to { @ code null } will result in a { @ link null pointer exception } the returned list maintains the values , but not the identities , of { @ code double } objects written to or read from it for example , whether { @ code list get ( 0 ) = = list get ( 0 ) } is true for the returned list is unspecified the returned list may have unexpected behavior if it contains { @ code na n } , or if { @ code na n } is used as a parameter to any of its methods < b > note : < b > when possible , you should represent your data as an { @ link immutable double array } instead , which has an { @ link immutable double array # as list as list } view

public static list < double > as list ( double backing array ) { if ( backing array length = = 0 ) { return collections empty list ( ) ; } return new double array as list ( backing array ) ; }


returns a new { @ link ima ads loader } with the specified sideloaded ads response

public ima ads loader build for ads response ( string ads response ) { return new ima ads loader ( context , get configuration ( ) , ima factory , / * ad tag uri = * / null , ads response ) ; }


override this when custom census module presence is different from { @ link # metrics expected ( ) }

protected boolean custom census module present ( ) { return metrics expected ( ) ; }


match input parameter values with the parameters declared to be used in the call

public map < string , object > match in parameter values with call parameters ( sql parameter source parameter source ) { / / for parameter source lookups we need to provide case - insensitive lookup support / / since the database meta - data is not necessarily providing case sensitive parameter names map < string , string > case insensitive parameter names = sql parameter source utils extract case insensitive parameter names ( parameter source ) ; map < string , string > call parameter names = collection utils new hash map ( this call parameters size ( ) ) ; map < string , object > matched parameters = collection utils new hash map ( this call parameters size ( ) ) ; for ( sql parameter parameter : this call parameters ) { if ( parameter is input value provided ( ) ) { string parameter name = parameter get name ( ) ; string parameter name to match = obtain meta data provider ( ) parameter name to use ( parameter name ) ; if ( parameter name to match ! = null ) { call parameter names put ( parameter name to match to lower case ( ) , parameter name ) ; } if ( parameter name ! = null ) { if ( parameter source has value ( parameter name ) ) { matched parameters put ( parameter name , sql parameter source utils get typed value ( parameter source , parameter name ) ) ; } else { string lower case name = parameter name to lower case ( ) ; if ( parameter source has value ( lower case name ) ) { matched parameters put ( parameter name , sql parameter source utils get typed value ( parameter source , lower case name ) ) ; } else { string english lower case name = parameter name to lower case ( locale english ) ; if ( parameter source has value ( english lower case name ) ) { matched parameters put ( parameter name , sql parameter source utils get typed value ( parameter source , english lower case name ) ) ; } else { string property name = jdbc utils convert underscore name to property name ( parameter name ) ; if ( parameter source has value ( property name ) ) { matched parameters put ( parameter name , sql parameter source utils get typed value ( parameter source , property name ) ) ; } else { if ( case insensitive parameter names contains key ( lower case name ) ) { string source name = case insensitive parameter names get ( lower case name ) ; matched parameters put ( parameter name , sql parameter source utils get typed value ( parameter source , source name ) ) ; } else if ( logger is info enabled ( ) ) { logger info ( " unable to locate the corresponding parameter value for ' " + parameter name + " ' within the parameter values provided : " + case insensitive parameter names values ( ) ) ; } } } } } } } } if ( logger is debug enabled ( ) ) { logger debug ( " matching " + case insensitive parameter names values ( ) + " with " + call parameter names values ( ) ) ; logger debug ( " found match for " + matched parameters key set ( ) ) ; } return matched parameters ; }


gets current instance that can be used to invoke { @ link # cache key method } or for another needs

public object get target ( ) { return target ; }


guaranteed to throw an exception and leave the table unmodified

public final v remove ( object row key , object column key ) { throw new unsupported operation exception ( ) ; }


makes sure that foreign key doesn ' t reconnect to itself or try to create a relationship which already exists

public boolean can execute ( ) { boolean return val = true ; e r d element foreign key entity = relationship get source entity ( ) ; if ( foreign key entity equals ( target entity ) ) { return val = false ; } else { list < e r d association > relationships = target entity get references ( ) ; for ( e r d association relationship : relationships ) { if ( relationship get source entity ( ) equals ( source entity ) & & relationship get target entity ( ) equals ( target entity ) ) { return val = false ; break ; } } } return return val ; }


do a test to make sure the edit log can recover edits even after a non - clean shutdown this does a simulated crash by copying over the edits directory while the nn is still running , then shutting it down , and restoring that edits directory

private void test crash recovery ( int num transactions ) throws exception { mini d f s cluster cluster = null ; configuration conf = get conf ( ) ; conf set int ( d f s config keys dfs namenode checkpoint txns key , checkpoint on startup min txns ) ; try { log info ( " \ n = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = \ n " + " starting empty cluster " ) ; cluster = new mini d f s cluster builder ( conf ) num data nodes ( num data nodes ) format ( true ) build ( ) ; cluster wait active ( ) ; file system fs = cluster get file system ( ) ; for ( int i = 0 ; i < num transactions ; i + + ) { fs mkdirs ( new path ( " / test " + i ) ) ; } / / directory layout looks like : / / test / data / dfs / name n / current / { fsimage n , edits } file name dir = new file ( cluster get name dirs ( 0 ) iterator ( ) next ( ) get path ( ) ) ; file dfs dir = name dir get parent file ( ) ; assert equals ( dfs dir get name ( ) , " dfs " ) ; / / make sure we got right dir log info ( " copying data directory aside to a hot backup " ) ; file backup dir = new file ( dfs dir get parent file ( ) , " dfs backup - while - running " ) ; file utils copy directory ( dfs dir , backup dir ) ; log info ( " shutting down cluster # 1 " ) ; cluster shutdown ( ) ; cluster = null ; / / now restore the backup file util fully delete contents ( dfs dir ) ; dfs dir delete ( ) ; backup dir rename to ( dfs dir ) ; / / directory layout looks like : / / test / data / dfs / name n / current / { fsimage n , edits } file current dir = new file ( name dir , " current " ) ; / / we should see the file as in - progress file edits file = new file ( current dir , n n storage get in progress edits file name ( 1 ) ) ; assert true ( " edits file " + edits file + " should exist " , edits file exists ( ) ) ; file image file = f s image test util find newest image file ( current dir get absolute path ( ) ) ; assert not null ( " no image found in " + name dir , image file ) ; assert equals ( n n storage get image file name ( 0 ) , image file get name ( ) ) ; / / try to start a new cluster log info ( " \ n = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = \ n " + " starting same cluster after simulated crash " ) ; cluster = new mini d f s cluster builder ( conf ) num data nodes ( num data nodes ) format ( false ) build ( ) ; cluster wait active ( ) ; / / we should still have the files we wrote prior to the simulated crash fs = cluster get file system ( ) ; for ( int i = 0 ; i < num transactions ; i + + ) { assert true ( fs exists ( new path ( " / test " + i ) ) ) ; } long expected tx id ; if ( num transactions > checkpoint on startup min txns ) { / / it should have saved a checkpoint on startup since there / / were more unfinalized edits than configured expected tx id = num transactions + 1 ; } else { / / otherwise , it shouldn ' t have made a checkpoint expected tx id = 0 ; } image file = f s image test util find newest image file ( current dir get absolute path ( ) ) ; assert not null ( " no image found in " + name dir , image file ) ; assert equals ( n n storage get image file name ( expected tx id ) , image file get name ( ) ) ; / / started successfully shut it down and make sure it can restart cluster shutdown ( ) ; cluster = null ; cluster = new mini d f s cluster builder ( conf ) num data nodes ( num data nodes ) format ( false ) build ( ) ; cluster wait active ( ) ; } finally { if ( cluster ! = null ) { cluster shutdown ( ) ; } } }


this method retrieves the cluster information , and it is reachable by using { @ link r m w s consts # info }


this method will update the get map for the short name provided , depending on how many queues are present with the same shortname

private void update get map for short name ( string short name ) { / / we protect the root , since root can be both a full path and a short name / / we simply deny adding root as a shortname to the get map if ( short name equals ( capacity scheduler configuration root ) ) { return ; } / / getting all queues with the same short name set < string > full names = this short name to long names get ( short name ) ; / / if there is only one queue we add it to the get map if ( full names ! = null & & full names size ( ) = = 1 ) { get map put ( short name , full name queues get ( full names iterator ( ) next ( ) ) ) ; } else { / / in all other cases using only short name cannot disambigously identifiy / / a queue get map remove ( short name ) ; } }


asserts that there were no verification errors during the current test , failing immediately if any are found

public void check for verification errors ( ) { string verification error string = verification errors to string ( ) ; clear verification errors ( ) ; if ( ! " " equals ( verification error string ) ) { fail ( verification error string ) ; } }


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


trigger { @ code after completion } callbacks

private mono < void > trigger after completion ( transaction synchronization manager synchronization manager , generic reactive transaction status , int completion status ) { if ( status is new synchronization ( ) ) { list < transaction synchronization > synchronizations = synchronization manager get synchronizations ( ) ; synchronization manager clear synchronization ( ) ; if ( ! status has transaction ( ) | | status is new transaction ( ) ) { if ( status is debug ( ) ) { logger trace ( " triggering after completion synchronization " ) ; } / / no transaction or new transaction for the current scope - > / / invoke the after completion callbacks immediately return invoke after completion ( synchronization manager , synchronizations , completion status ) ; } else if ( ! synchronizations is empty ( ) ) { / / existing transaction that we participate in , controlled outside / / of the scope of this spring transaction manager - > try to register / / an after completion callback with the existing ( jta ) transaction return register after completion with existing transaction ( synchronization manager , status get transaction ( ) , synchronizations ) ; } } return mono empty ( ) ; }


returns the resource type id for example , rt cursor , rt bitmap , etc returns - 1 if this is a named resource

public int get type i d ( ) { return type i d ; }


public void set read only ( boolean read only ) throws s q l exception { if ( throw exception ) { throw new s q l exception ( ) ; } }


provide a string representation of the { @ linkplain # get test class ( ) test class } , { @ linkplain # get locations ( ) locations } , { @ linkplain # get classes ( ) annotated classes } , { @ linkplain # get context initializer classes ( ) context initializer classes } , { @ linkplain # get active profiles ( ) active profiles } , { @ linkplain # get property source locations ( ) property source locations } , { @ linkplain # get property source properties ( ) property source properties } , { @ linkplain # get context customizers ( ) context customizers } , { @ linkplain # get resource base path ( ) resource base path } , the name of the { @ link # get context loader ( ) context loader } , and the { @ linkplain # get parent ( ) parent configuration }

public string to string ( ) { return new to string creator ( this ) append ( " test class " , get test class ( ) ) append ( " locations " , object utils null safe to string ( get locations ( ) ) ) append ( " classes " , object utils null safe to string ( get classes ( ) ) ) append ( " context initializer classes " , object utils null safe to string ( get context initializer classes ( ) ) ) append ( " active profiles " , object utils null safe to string ( get active profiles ( ) ) ) append ( " property source locations " , object utils null safe to string ( get property source locations ( ) ) ) append ( " property source properties " , object utils null safe to string ( get property source properties ( ) ) ) append ( " context customizers " , get context customizers ( ) ) append ( " resource base path " , get resource base path ( ) ) append ( " context loader " , null safe class name ( get context loader ( ) ) ) append ( " parent " , get parent ( ) ) to string ( ) ; }


returns true if the start addresses of the memory blocks differ

public boolean is start address different ( ) { return ( diff flags & start address ) ! = 0 ; }


public void dispose ( ) { for ( int i = 0 ; i < panels length ; i + + ) { remove listeners ( panels [ i ] ) ; } panels = null ; }


sets the < code > attribute number < code > property

public xml item attribute number ( big decimal attribute number ) { this attribute number = attribute number ; return this ; }


returns the schema descriptor for this service a schema descriptor is an object that is not used by g r p c core but includes information related to the service the type of the object is specific to the consumer , so both the code setting the schema descriptor and the code calling { @ link # get schema descriptor ( ) } must coordinate for example , protobuf generated code sets this value , in order to be consumed by the server reflection service see also : { @ code io grpc protobuf proto file descriptor supplier }

public object get schema descriptor ( ) { return schema descriptor ; }


update to new groups , resetting the current index

public void update groups ( list < equivalent address group > new groups ) { address groups = new groups ; reset ( ) ; }


update the moving average with a new value

public void update ( long n ) { uncounted add ( n ) ; }


get the maximum width of the annotated output this is advisory : implementations of this interface are encouraged to deal with too - wide output , but annotaters are encouraged to attempt to avoid exceeding the indicated width


records the provided object in { @ link # method argument } and sets { @ link # method called } this method is called reflectively by subscriber during tests , and must remain public

public void recording method ( object arg ) { assert false ( method called ) ; method called = true ; method argument = arg ; }


verify text command outputs a useful representation for map writable

public void test to string ( ) { map writable map = new map writable ( ) ; final int writable key = new int writable ( 5 ) ; final text value = new text ( " value " ) ; map put ( key , value ) ; assert equals ( " { 5 = value } " , map to string ( ) ) ; }


return the string of decode html - encode string

public static char sequence html decode ( final string input ) { if ( input = = null | | input length ( ) = = 0 ) return " " ; if ( build version sdk int > = build version codes n ) { return html from html ( input , html from html mode legacy ) ; } else { return html from html ( input ) ; } }


set the passcode header applies to the connect frame

public void set passcode ( @ nullable string passcode ) { set ( passcode , passcode ) ; }


a given grammar t , return the listener name such as t listener java , if we ' re using the java target

public string get listener file name ( boolean header ) { assert gen g name ! = null ; st ext s t = get templates ( ) get instance of ( " code file extension " ) ; string listener name = gen g name + " listener " ; return listener name + ext s t render ( ) ; }


creates a throwable whose stack trace is based upon the current call stack , with any information coming before , and including , the given classes removed this method can take multiple classes , but you really only need to pass the oldest class of disinterest

public static throwable create throwable with stack older than ( class < ? > classes ) { list < string > to find = arrays stream ( classes ) map ( c - > c get name ( ) ) collect ( collectors to list ( ) ) ; if ( to find is empty ( ) ) { / / always ignore our class we get this for free if the client passes in any / / classes to find add ( 0 , reflection utilities class get name ( ) ) ; } throwable t = new throwable ( ) ; stack trace element [ ] trace = t get stack trace ( ) ; int last ignore index = - 1 ; for ( int i = 0 ; i < trace length ; i + + ) { stack trace element element = trace [ i ] ; string class name = element get class name ( ) ; int name index = to find index of ( class name ) ; if ( name index ! = - 1 ) { last ignore index = i ; } else { / / not a class of interest ; if we have already seen our muse , then we are done if ( last ignore index ! = - 1 ) { break ; } } } if ( last ignore index = = - 1 ) { throw new assert exception ( " did not find the following classes in the call stack : " + arrays to string ( classes ) ) ; } if ( last ignore index = = trace length - 1 ) { throw new assert exception ( " call stack only contains the classes to ignore : " + arrays to string ( classes ) ) ; } int start index = last ignore index + 1 ; stack trace element [ ] updated trace = arrays copy of range ( trace , start index , trace length ) ; t set stack trace ( updated trace ) ; return t ; }


public void int 3 2 test ( ) { / / todo : test int 3 2 }


returns the right { @ link blob key } subclass for the given parameters

static blob key create key ( blob type type , byte [ ] key ) { if ( type = = permanent blob ) { return new permanent blob key ( key ) ; } else { return new transient blob key ( key ) ; } }


returns the { @ link objc provider } to use as input to the support controlling link actoins ; dylib symbols should be subtracted from this provider

abstract objc provider objc link provider ( ) ;


clear all oustanding inconsistent keys after calling this function , listings should behave normally ( no failure injection ) , until additional keys are matched for delay , e g via put object ( ) , delete object ( )

public void clear inconsistency ( ) { log info ( " clearing all delayed puts / deletes " ) ; delayed deletes clear ( ) ; delayed put keys clear ( ) ; }


public boolean needs dictionary ( ) { return false ; }


public void processed ( ) { processed = true ; }


public result set get generated keys ( ) throws s q l exception { return new stub result set ( ) ; }


remove that specified prefix from this locator ' s list of imports

public void remove import ( string prefix ) { this known package prefixes remove ( prefix ) ; }


logs a message at the { @ link # deprecation } level the message is also sent to the header warning logger , so that it can be returned to the client

public deprecation logger builder deprecate ( final string key , final string msg , final object params ) { return new deprecation logger builder ( ) with deprecation ( key , msg , params ) ; }


protected string arg string ( ) { return constant to human ( ) ; }


creates command to transfer child column to after column ( in another table )

protected command create add command ( edit part child , edit part after ) { / * if ( ! ( child instanceof attribute part ) ) return null ; if ( ! ( after instanceof attribute part ) ) return null ; e r d entity attribute to move = ( e r d entity attribute ) child get model ( ) ; e r d entity attribute after model = ( e r d entity attribute ) after get model ( ) ; entity part original entity part = ( entity part ) child get parent ( ) ; e r d entity original table = ( e r d entity ) original entity part get model ( ) ; entity part new entity part = ( entity part ) after get parent ( ) ; e r d entity new table = new entity part get table ( ) ; int old index = original entity part get children ( ) index of ( child ) ; int new index = new entity part get children ( ) index of ( after ) ; attribute transfer command command = new attribute transfer command ( to move , after model , original table , new table , old index , new index ) ; return command ; * / return null ; }


public void test delayed allocation ( ) throws exception { buffer pool pool = new buffer pool ( 5 * 1024 , 1024 , metrics , time , metric group ) ; byte buffer buffer = pool allocate ( 1024 , max block time ms ) ; count down latch do dealloc = async deallocate ( pool , buffer ) ; count down latch allocation = async allocate ( pool , 5 * 1024 ) ; assert equals ( 1l , allocation get count ( ) , " allocation shouldn ' t have happened yet , waiting on memory " ) ; do dealloc count down ( ) ; / / return the memory assert true ( allocation await ( 1 , time unit seconds ) , " allocation should succeed soon after de - allocation " ) ; }


searches a method with a similar signature as desired using { @ link # is similar signature ( java lang reflect method , string , class [ ] ) } first public methods are searched in the class hierarchy , then private methods on the declaring class if a method could be found , it is returned , otherwise a { @ code no such method exception } is thrown

private method similar method ( string name , class < ? > [ ] types ) throws no such method exception { class < ? > t = type ( ) ; / / first priority : find a public method with a " similar " signature in class hierarchy / / similar interpreted in when primitive argument types are converted to their wrappers for ( method method : t get methods ( ) ) { if ( is similar signature ( method , name , types ) ) { return method ; } } / / second priority : find a non - public method with a " similar " signature on declaring class do { for ( method method : t get declared methods ( ) ) { if ( is similar signature ( method , name , types ) ) { return method ; } } t = t get superclass ( ) ; } while ( t ! = null ) ; throw new no such method exception ( " no similar method " + name + " with params " + arrays to string ( types ) + " could be found on type " + type ( ) + " " ) ; }


returns all { @ link typed published events } that match the given predicate after applying the given mapping step

< s > typed published events < t > matching mapped ( function < t , s > mapper , predicate < ? super s > predicate ) ;


gets the producer value for the specified variable , without disturbing it

public value get producer value ( int index ) { return producer variables get value ( index ) ; }


appends the string representation of the specified { @ code char sequence } if the { @ code char sequence } is { @ code null } , then the string { @ code " null " } is appended

public string builder append ( char sequence csq ) { if ( csq = = null ) { append null ( ) ; } else if ( csq instanceof string builder ) { string builder builder = ( string builder ) csq ; append 0 ( builder chars , 0 , builder length ) ; } else { append 0 ( csq to string ( ) ) ; } return this ; }


public long get parent pointer ( ) { return parent pointer ; }


given a label ( which has typically , but not necessarily , just been built ) , returns the configured target for it using the request configuration

protected configured target get configured target ( string target ) throws label syntax exception , no such package exception , no such target exception , interrupted exception , transition exception , invalid configuration exception { get package manager ( ) get target ( events reporter ( ) , label parse absolute ( target , immutable map of ( ) ) ) ; return get skyframe executor ( ) get configured target for testing ( events reporter ( ) , label ( target ) , get target configuration ( ) ) ; }


create a path to a service under a user and service class

public static string service path ( string user , string service class , string service name ) { return join ( serviceclass path ( user , service class ) , service name ) ; }


http post create a new resource by p o s ting the given object to the http request url request params are expanded using the given query { @ link query } { @ code response type } can be an http rest result or http rest result data { @ code t } type

public < t > http rest result < t > post ( string url , header header , query query , object body , type response type ) throws exception { return execute ( url , http method post , new request http entity ( header , query , body ) , response type ) ; }


test if two < code > int < code > s are equal

public equals builder append ( int lhs , int rhs ) { is equals & = ( lhs = = rhs ) ; return this ; }


gets the test write location according to the coding guidelines

private static file get write loc ( ) { string write loc = system get property ( test data prop , " build / test / data / " ) ; file write dir = new file ( write loc , " slive " ) ; write dir mkdirs ( ) ; return write dir ; }


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


test the use of chained - buffers for record storage chained - buffers will be forced to utilize 3 buffers for storing indexes

public void test get very large chained buffers long key record ( ) throws i o exception { insert one long key record ( false , true , 2 * buffer size * ( buffer size / 4 ) ) ; }


specify whether to always translate the exception ( " true " ) , or whether throw the raw exception when declared , i e when the originating method signature ' s exception declarations allow for the raw exception to be thrown ( " false " ) default is " false " switch this flag to " true " in order to always translate applicable exceptions , independent from the originating method signature note that the originating method does not have to declare the specific exception any base class will do as well , even { @ code throws exception } : as long as the originating method does explicitly declare compatible exceptions , the raw exception will be rethrown if you would like to avoid throwing raw exceptions in any case , switch this flag to " true "

public void set always translate ( boolean always translate ) { this always translate = always translate ; }


the map of toolchain type to resolved toolchain to be used

immutable set multimap < toolchain type info , label > toolchain type to resolved ( ) ;


string generate device user code ( string provided code ) ;


invokes { @ code future } { @ link future # get ( ) get ( ) } uninterruptibly similar methods : to retrieve a result from a { @ code future } that is already done , use { @ link futures # get done futures get done } to treat { @ link interrupted exception } uniformly with other exceptions , use { @ link futures # get checked ( future , class ) futures get checked } to get uninterruptibility and remove checked exceptions , use { @ link futures # get unchecked }

public static < v > v get uninterruptibly ( future < v > future ) throws execution exception { boolean interrupted = false ; try { while ( true ) { try { return future get ( ) ; } catch ( interrupted exception e ) { interrupted = true ; } } } finally { if ( interrupted ) { thread current thread ( ) interrupt ( ) ; } } }


set the bean name generator to use for detected bean classes default is a { @ link annotation bean name generator }

public void set bean name generator ( @ nullable bean name generator bean name generator ) { this bean name generator = ( bean name generator ! = null ? bean name generator : annotation bean name generator instance ) ; }


checks a file to make sure it should be packaged as standard resources

public static boolean check file for packaging ( @ non null string file name , @ non null string extension , boolean allow class files ) { / / ignore hidden files and backup files return ! ( file name char at ( 0 ) = = ' ' | | file name char at ( file name length ( ) - 1 ) = = ' ~ ' ) & & ! is of non resources extensions ( extension , allow class files ) & & ! is not a resource file ( file name ) ; }


patch fake : to test \ & quot ; client \ & quot ; model to test \ & quot ; client \ & quot ; model

default completable future < response entity < client > > test client model ( @ api param ( value = " client model " , required = true ) @ valid @ request body client body ) { return completable future supply async ( ( ) - > { get request ( ) if present ( request - > { for ( media type media type : media type parse media types ( request get header ( " accept " ) ) ) { if ( media type is compatible with ( media type value of ( " application / json " ) ) ) { string example string = " { \ " client \ " : \ " client \ " } " ; api util set example response ( request , " application / json " , example string ) ; break ; } } } ) ; return new response entity < > ( http status not implemented ) ; } , runnable : : run ) ; }


create a new { @ link cogrouped k stream } from the this grouped k stream to allow cogrouping other { @ code k grouped stream } to it { @ link cogrouped k stream } is an abstraction of multiple grouped record streams of { @ link key value } pairs it is an intermediate representation after a grouping of { @ link k stream } s , before the aggregations are applied to the new partitions resulting in a { @ link k table } the specified { @ link aggregator } is applied in the actual { @ link cogrouped k stream # aggregate ( initializer ) aggregation } step for each input record and computes a new aggregate using the current aggregate ( or for the very first record per key using the initial intermediate aggregation result provided via the { @ link initializer } that is passed into { @ link cogrouped k stream # aggregate ( initializer ) } ) and the record ' s value

< v out > cogrouped k stream < k , v out > cogroup ( final aggregator < ? super k , ? super v , v out > aggregator ) ;


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

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


disables scrolling in a direction the widget will be sized to the flick scroll pane in the disabled direction

public void set scrolling disabled ( boolean x , boolean y ) { disable x = x ; disable y = y ; invalidate ( ) ; }


get the list of components composed by this component this will not include any { @ link view } s that are mounted by this component as those are not components use { @ link this # get mounted view } for that

public list < inspectable component > get child components ( ) { final list < debug component > debug components = m component get child components ( ) ; final list < inspectable component > res = new array list < > ( debug components size ( ) ) ; for ( debug component debug component : debug components ) { res add ( new inspectable component ( debug component ) ) ; } return res ; }


returns the raw source text of the literal

public string get raw ( ) { return raw ; }


init peer certificates that can be obtained via { @ link # get peer certificate chain ( ) } and { @ link # get peer certificates ( ) }

private void init peer certs ( ) { / / return the full chain from the jni layer byte [ ] [ ] chain = ssl get peer cert chain ( ssl ) ; if ( client mode ) { if ( is empty ( chain ) ) { peer certs = empty arrays empty certificates ; x 5 0 9 peer certs = empty arrays empty javax x509 certificates ; } else { peer certs = new certificate [ chain length ] ; x 5 0 9 peer certs = new x 5 0 9 certificate [ chain length ] ; init certs ( chain , 0 ) ; } } else { / / if used on the server side ssl get peer cert chain ( ) will not include the remote peer / / certificate we use ssl get peer certificate to get it in this case and add it to our / / array later / / / / see https : / / www openssl org / docs / ssl / ssl get peer cert chain html byte [ ] client cert = ssl get peer certificate ( ssl ) ; if ( is empty ( client cert ) ) { peer certs = empty arrays empty certificates ; x 5 0 9 peer certs = empty arrays empty javax x509 certificates ; } else { if ( is empty ( chain ) ) { peer certs = new certificate [ ] { new open ssl x 5 0 9 certificate ( client cert ) } ; x 5 0 9 peer certs = new x 5 0 9 certificate [ ] { new open ssl javax x 5 0 9 certificate ( client cert ) } ; } else { peer certs = new certificate [ chain length + 1 ] ; x 5 0 9 peer certs = new x 5 0 9 certificate [ chain length + 1 ] ; peer certs [ 0 ] = new open ssl x 5 0 9 certificate ( client cert ) ; x 5 0 9 peer certs [ 0 ] = new open ssl javax x 5 0 9 certificate ( client cert ) ; init certs ( chain , 1 ) ; } } } }


optional method for plugins to pick up settings from the configuration

default void configure ( configuration config ) { }


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


given an inet address , checks to see if the address is a local address , by comparing the address with all the interfaces on the node

public static boolean is local address ( inet address addr ) { / / check if the address is any local or loop back boolean local = addr is any local address ( ) | | addr is loopback address ( ) ; / / check if the address is defined on any interface if ( ! local ) { try { local = network interface get by inet address ( addr ) ! = null ; } catch ( socket exception e ) { local = false ; } } return local ; }


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


find a suitable { @ link security module factory } based on canonical name

public static security module factory find module factory ( string security module factory class ) throws no match security factory exception { return find factory internal ( security module factory class , security module factory class , security module factory class get class loader ( ) ) ; }


internal method that breaks out the flag values from the aggregate integral type

protected void process flags ( long flags in ) { is lexical scope = ( ( flags in & 0x 0 0 0 1 ) = = 0x 0 0 0 1 ) ; flags in > > = 1 ; returns to parent = ( ( flags in & 0x 0 0 0 1 ) = = 0x 0 0 0 1 ) ; }


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


encodes the byte array into a newly created hex char array , without allocating any other temporary variables

static char [ ] to hex char array ( byte [ ] bytes ) { objects require non null ( bytes ) ; final char [ ] result = new char [ 2 * bytes length ] ; for ( int i = 0 ; i < bytes length ; i + + ) { byte b = bytes [ i ] ; result [ 2 * i ] = hex digits [ b > > 4 & 0xf ] ; result [ 2 * i + 1 ] = hex digits [ b & 0xf ] ; } return result ; }


determine the validation mode for the specified { @ link resource } if no explicit validation mode has been configured , then the validation mode gets { @ link # detect validation mode detected } from the given resource override this method if you would like full control over the validation mode , even when something other than { @ link # validation auto } was set

protected int get validation mode for resource ( resource resource ) { int validation mode to use = get validation mode ( ) ; if ( validation mode to use ! = validation auto ) { return validation mode to use ; } int detected mode = detect validation mode ( resource ) ; if ( detected mode ! = validation auto ) { return detected mode ; } / / hmm , we didn ' t get a clear indication let ' s assume xsd , / / since apparently no dtd declaration has been found up until / / detection stopped ( before finding the document ' s root tag ) return validation xsd ; }


compute the path where the output of a committed task is stored until the entire job is committed

path get committed task path ( task attempt context context ) { path out = get output path ( context ) ; return out = = null ? null : org apache hadoop mapreduce lib output file output committer get committed task path ( context , out ) ; }


replaces the resource at the specified index and returns the old resource

public subscription replace resource ( int index , subscription resource ) { for ( ; ; ) { subscription o = get ( index ) ; if ( o = = subscription helper cancelled ) { if ( resource ! = null ) { resource cancel ( ) ; } return null ; } if ( compare and set ( index , o , resource ) ) { return o ; } } }


attempts to migrate a given exporter ' s alerts

private void delete alerts from open exporter ( exporter exporter , action listener < exporter resource status > listener ) { assert exporter is open ( ) ; try { exporter remove alerts ( status - > { logger debug ( " exporter [ { } ] : completed setup with status [ { } ] " , exporter config ( ) name ( ) , status is complete ( ) ) ; / / exporter completed its setup ( teardown ) successfully or unsuccessfully listener on response ( status ) ; } ) ; } catch ( exception e ) { logger debug ( " exporter [ " + exporter config ( ) name ( ) + " ] : exception encountered during refresh " , e ) ; listener on failure ( e ) ; } }


returns a string containing all non - matching characters of a character sequence , in order for example : { @ code char matcher is ( ' a ' ) remove from ( " bazaar " ) } returns { @ code " bzr " }

public string remove from ( char sequence sequence ) { string string = sequence to string ( ) ; int pos = index in ( string ) ; if ( pos = = - 1 ) { return string ; } char [ ] chars = string to char array ( ) ; int spread = 1 ; / / this unusual loop comes from extensive benchmarking out : while ( true ) { pos + + ; while ( true ) { if ( pos = = chars length ) { break out ; } if ( matches ( chars [ pos ] ) ) { break ; } chars [ pos - spread ] = chars [ pos ] ; pos + + ; } spread + + ; } return new string ( chars , 0 , pos - spread ) ; }


return the current pool size requires an underlying { @ link scheduled thread pool executor }

public int get pool size ( ) { if ( this scheduled executor = = null ) { / / not initialized yet : assume initial pool size return this pool size ; } return get scheduled thread pool executor ( ) get pool size ( ) ; }


this test creates some directories inside the to be deleted directory and then start the async disk service async disk service will create tasks to delete the content inside the to be deleted directories

public void test m r async disk service startup cleaning ( ) throws throwable { file system local file system = file system get local ( new configuration ( ) ) ; string [ ] vols = new string [ ] { test root dir + " / 0 " , test root dir + " / 1 " } ; string a = " a " ; string b = " b " ; string c = " b / c " ; string d = " d " ; / / create directories inside subdir string suffix = path separator char + m r async disk service tobedeleted ; file fa = new file ( vols [ 0 ] + suffix , a ) ; file fb = new file ( vols [ 1 ] + suffix , b ) ; file fc = new file ( vols [ 1 ] + suffix , c ) ; file fd = new file ( vols [ 1 ] + suffix , d ) ; / / create the directories fa mkdirs ( ) ; fb mkdirs ( ) ; fc mkdirs ( ) ; fd mkdirs ( ) ; assert true ( fa exists ( ) ) ; assert true ( fb exists ( ) ) ; assert true ( fc exists ( ) ) ; assert true ( fd exists ( ) ) ; / / create the async disk service which will delete all contents inside subdir m r async disk service service = new m r async disk service ( local file system , vols ) ; / / make sure everything is cleaned up make sure cleaned up ( vols , service ) ; }


public void small camel test ( ) { / / todo : test small camel }


set the time the resource was last changed , as specified by the { @ code last - modified } header

b last modified ( zoned date time last modified ) ;


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


get the key for the given bucket date histograms must return the number of millis since epoch of the bucket key while numeric histograms must return the double value of the key

number get key ( multi buckets aggregation bucket bucket ) ;


if set , the recycler view adapter will have stable id support turned on this is ideally what we want to do always but for now we need this as a parameter to make sure stable ids are not breaking anything

public builder enable stable ids ( boolean enable stable ids ) { this enable stable ids = enable stable ids ; return this ; }


decode a specific range of bytes of the given byte array to a string using utf8

public static string bytes 2 string ( byte [ ] bytes , int offset , int length ) { return d f s util client bytes 2 string ( bytes , 0 , bytes length ) ; }


returns the values of the specified matched arguments ( wildcard or not )

public int [ ] matched arguments ( int [ ] arguments ) { int [ ] matched arguments = new int [ arguments length ] ; for ( int index = 0 ; index < arguments length ; index + + ) { matched arguments [ index ] = matched argument ( arguments [ index ] ) ; } return matched arguments ; }


returns a duplicated buffer that shares its content with this buffer the duplicated buffer ' s position , limit , capacity and mark are the same as this buffer the duplicated buffer ' s read - only property and byte order are the same as this buffer ' s the new buffer shares its content with this buffer , which means either buffer ' s change of content will be visible to the other the two buffer ' s position , limit and mark are independent

public abstract short buffer duplicate ( ) ;


replay the wrapped collector , but only on a selection of buckets

public void prepare selected buckets ( long selected buckets ) throws i o exception { finish leaf ( ) ; if ( this selected buckets ! = null ) { throw new illegal state exception ( " already been replayed " ) ; } this selected buckets = new long hash ( selected buckets length , big arrays non recycling instance ) ; for ( long ord : selected buckets ) { this selected buckets add ( ord ) ; } boolean needs scores = score mode ( ) needs scores ( ) ; weight weight = null ; if ( needs scores ) { query query = is global ? new match all docs query ( ) : top level query ; weight = searcher create weight ( searcher rewrite ( query ) , score mode complete , 1f ) ; } for ( entry entry : entries ) { assert entry doc deltas size ( ) > 0 : " segment should have at least one document to replay , got 0 " ; try { final leaf bucket collector leaf collector = collector get leaf collector ( entry context ) ; doc id set iterator score it = null ; if ( needs scores ) { scorer scorer = weight scorer ( entry context ) ; / / we don ' t need to check if the scorer is null / / since we are sure that there are documents to replay ( entry doc deltas it not empty ) score it = scorer iterator ( ) ; leaf collector set scorer ( scorer ) ; } final packed long values iterator doc delta iterator = entry doc deltas iterator ( ) ; final packed long values iterator buckets = entry buckets iterator ( ) ; int doc = 0 ; for ( long i = 0 , end = entry doc deltas size ( ) ; i < end ; + + i ) { doc + = doc delta iterator next ( ) ; final long bucket = buckets next ( ) ; final long rebased bucket = this selected buckets find ( bucket ) ; if ( rebased bucket ! = - 1 ) { if ( needs scores ) { if ( score it doc i d ( ) < doc ) { score it advance ( doc ) ; } / / aggregations should only be replayed on matching documents assert score it doc i d ( ) = = doc ; } leaf collector collect ( doc , rebased bucket ) ; } } } catch ( collection terminated exception e ) { / / collection was terminated prematurely / / continue with the following leaf } } }


sets the height that the root { @ link com facebook rendercore host } should take on the next measure pass and then requests a layout this should be called from animation - driving code on each frame to animate the size of the root { @ link com facebook rendercore host }

void set animated height ( int height ) ;


judge a table is a special table or not currently table schema is a special table

private boolean is special table ( string table name ) { return const table schema table name equals ignore case ( table name ) ; }


visits an instance field access the field could be of the visited class or it could be an accessible field from the class being visited ( unless it ' s private ) for private instance fields , the access instruction is rewritten to calls to reflection to access the fields value : pseudo code for get : < code > value = $ instance field name ; < code > becomes : < code > value = ( unbox ) $ package android instant runtime get private field ( $ instance , $ field name ) ; < code > pseudo code for set : < code > $ instance field name = value ; < code > becomes : < code > $ package android instant runtime set private field ( $ instance , value , $ field name ) ; < code >

private boolean visit field access ( int opcode , string owner , string name , string desc , access right access right ) { / / if the accessed field is anything but public , we must go through reflection boolean use reflection = access right ! = access right public ; / / if the accessed field is accessed from within a constructor , it might be a public / / final field that cannot be set by anything but the original constructor unless / / we use reflection if ( ! use reflection ) { use reflection = is constructor & & ( owner equals ( visited class name ) ) ; } if ( use reflection ) { / / we should make this more efficient , have a per field access type method / / for getting and setting field values switch ( opcode ) { case opcodes getfield : if ( debug ) { system out println ( " get field " ) ; } / / push declaring class visit ldc insn ( type get type ( " l " + owner + " ; " ) ) ; / / the instance of the owner class we are getting the field value from / / is on top of the stack it could be " this " push ( name ) ; / / stack : < receiver > / / < field declaring class > / / < field name > invoke static ( ali runtime type , method get method ( " object get private field ( object , class , string ) " ) ) ; / / stack : < field value > byte code utils unbox ( this , type get type ( desc ) ) ; break ; case opcodes putfield : if ( debug ) { system out println ( " set field " ) ; } / / the instance of the owner class we are getting the field value from / / is second on the stack it could be " this " / / top of the stack is the new value we are trying to set , box it box ( type get type ( desc ) ) ; / / push declaring class visit ldc insn ( type get type ( " l " + owner + " ; " ) ) ; / / push the field name push ( name ) ; / / stack : < receiver > / / < boxed field value > / / < field declaring class > / / < field name > invoke static ( ali runtime type , method get method ( " void set private field ( object , object , class , string ) " ) ) ; break ; default : throw new runtime exception ( " visit field access called with wrong opcode " + opcode ) ; } return true ; } / / if this is a public field , no need to change anything we can access it from the / / $ override class return false ; }


returns true if ' item ' is currently being completely shown in this < code > grid < code > ' s visible on - screen area < p > here , " completely " only refers to the item ' s height , not its width this means this method returns true also if some cells are horizontally scrolled away

private boolean is shown ( int row ) { check widget ( ) ; if ( row = = - 1 ) swt error ( swt error invalid argument ) ; int first visible index = get top index ( ) ; int last visible index = get bottom index ( ) ; return ( row > = first visible index & & row < last visible index ) | | ( row = = last visible index & & bottom index shown completely ) ; }


if some version of this plugin is currently installed , return { @ link plugin wrapper } otherwise null

public plugin wrapper get installed ( ) { plugin manager pm = jenkins get ( ) get plugin manager ( ) ; return pm get plugin ( name ) ; }


return whether the given jdbc driver supports jdbc 2 0 batch updates typically invoked right before execution of a given set of statements : to decide whether the set of sql statements should be executed through the jdbc 2 0 batch mechanism or simply in a traditional one - by - one fashion logs a warning if the " supports batch updates " methods throws an exception and simply returns { @ code false } in that case

public static boolean supports batch updates ( connection con ) { try { database meta data dbmd = con get meta data ( ) ; if ( dbmd ! = null ) { if ( dbmd supports batch updates ( ) ) { logger debug ( " jdbc driver supports batch updates " ) ; return true ; } else { logger debug ( " jdbc driver does not support batch updates " ) ; } } } catch ( s q l exception ex ) { logger debug ( " jdbc driver ' supports batch updates ' method threw exception " , ex ) ; } return false ; }


returns a { @ link char source } that reads from the given url using the given character set

public static char source as char source ( url url , charset charset ) { return as byte source ( url ) as char source ( charset ) ; }


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


public void set double ( int parameter index , double x ) throws s q l exception { }


create a cast where the original type will be boxed , and then the cast will be performed

public static painless cast box original type ( class < ? > original type , class < ? > target type , boolean explicit cast , class < ? > box original type ) { objects require non null ( original type ) ; objects require non null ( target type ) ; objects require non null ( box original type ) ; return new painless cast ( original type , target type , explicit cast , null , null , box original type , null ) ; }


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

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


the implementation of this ( servlet 3 1 + ) method calls { @ link mock http session # change session id ( ) } if the session is a mock session otherwise it simply returns the current session id

public string change session id ( ) { assert is true ( this session ! = null , " the request does not have a session " ) ; if ( this session instanceof mock http session ) { return ( ( mock http session ) this session ) change session id ( ) ; } return this session get id ( ) ; }


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


used to avoid http : bugs sun comview bug do ? bug id = 6558557

static < t > multiset < t > cast ( iterable < t > iterable ) { return ( multiset < t > ) iterable ; }


static data type find data type ( data type manager data type manager , demangled namespace , string dt name ) { list < data type > list = new array list < > ( ) ; data type manager find data types ( dt name , list ) ; if ( list is empty ( ) ) { return null ; } / / use the datatype that exists in the root category , / / otherwise just pick the first one data type any dt = null ; data type preferred data type = null ; for ( data type existing d t : list ) { if ( existing d t instanceof built in ) { / / not sure if this is good - built - ins handled explicitly by get data type ( ) continue ; } if ( namespace = = null ) { if ( existing d t get category path ( ) equals ( category path root ) ) { return existing d t ; } any dt = existing d t ; } if ( is namespace category match ( existing d t , namespace ) ) { preferred data type = existing d t ; } } if ( preferred data type ! = null ) { return preferred data type ; } return any dt ; }


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


capture the operation that should be performed by the privileged operation executor

public static list < privileged operation > capture privileged operations ( privileged operation executor mock executor , int invocation count , boolean grab output ) throws privileged operation exception { argument captor < privileged operation > op captor = argument captor for class ( privileged operation class ) ; / / one or more invocations expected / / due to type erasure + mocking , this verification requires a suppress / / warning annotation on the entire method verify ( mock executor , times ( invocation count ) ) execute privileged operation ( any ( ) , op captor capture ( ) , any ( ) , any ( map class ) , eq ( grab output ) , eq ( false ) ) ; / / verification completed we need to isolate specific invications / / hence , reset mock here mockito reset ( mock executor ) ; return op captor get all values ( ) ; }


returns http response headers that should be added to a cors preflight response an intermediary like a load balancer might require that a cors preflight request have certain headers set this enables such headers to be added

public cors config builder preflight response header ( final char sequence name , final object values ) { if ( values length = = 1 ) { preflight headers put ( name , new constant value generator ( values [ 0 ] ) ) ; } else { preflight response header ( name , arrays as list ( values ) ) ; } return this ; }


associates the specified starlark thread with the current os thread returns the starlark thread previously associated with it , if any

static starlark thread set starlark thread ( starlark thread thread ) { if ( thread = = null ) { return threads remove ( gettid ( ) ) ; } else { return threads put ( gettid ( ) , thread ) ; } }


returns { @ code true } if apply function variables is " on "

public boolean apply function variables ( ) { return apply function variables ; }


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


clears the record after this operation , the record will have zero fields

public void clear ( ) { if ( this num fields > 0 ) { this num fields = 0 ; this first modified pos = 0 ; } }


public static void set record length ( configuration conf , int record length ) { conf set int ( fixed record length , record length ) ; }