this is called up - front providing the actual low level { @ link async sender } that performs the low level send request the returned sender is used to send all requests that come in via { @ link transport service # send request ( discovery node , string , transport request , transport response handler ) } or { @ link transport service # send request ( discovery node , string , transport request , transport request options , transport response handler ) } this allows plugins to perform actions on each send request including modifying the request context etc

default async sender intercept sender ( async sender sender ) { return sender ; }


gets the count of all fields including hidden fields

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


produce a readable representation for a given method name with specified arguments

public static string format method for message ( string name , list < type descriptor > argument types ) { string joiner sj = new string joiner ( " , " , " ( " , " ) " ) ; for ( type descriptor type descriptor : argument types ) { if ( type descriptor ! = null ) { sj add ( format class name for message ( type descriptor get type ( ) ) ) ; } else { sj add ( format class name for message ( null ) ) ; } } return name + sj to string ( ) ; }


returns the appropriate image drawable from the style based on the current button state

protected @ null drawable get image drawable ( ) { if ( is disabled ( ) & & style image disabled ! = null ) return style image disabled ; if ( is pressed ( ) ) { if ( is checked ( ) & & style image checked down ! = null ) return style image checked down ; if ( style image down ! = null ) return style image down ; } if ( is over ( ) ) { if ( is checked ( ) ) { if ( style image checked over ! = null ) return style image checked over ; } else { if ( style image over ! = null ) return style image over ; } } if ( is checked ( ) ) { if ( style image checked ! = null ) return style image checked ; if ( is over ( ) & & style image over ! = null ) return style image over ; } return style image up ; }


this is called after the keystore password has been read from the stdin and the keystore is decrypted and loaded the keystore and keystore passwords are available to classes extending { @ link base key store command } using { @ link base key store command # get key store ( ) } and { @ link base key store command # get key store password ( ) } respectively

protected abstract void execute command ( terminal terminal , option set options , environment env ) throws exception ;


creates default implementation of { @ link image downloader } - { @ link base image downloader }

public static image downloader create image downloader ( context context ) { return new base image downloader ( context ) ; }


tests that saslscram clients with invalid password fail authentication with connection close delay if configured

public void test invalid password sasl scram ( ) throws exception { string node = " 0 " ; security protocol security protocol = security protocol sasl ssl ; test jaas config jaas config = configure mechanisms ( " scram - sha - 256 " , collections singleton list ( " scram - sha - 256 " ) ) ; jaas config set client options ( " scram - sha - 256 " , test jaas config username , " invalidpassword " ) ; server = create echo server ( security protocol ) ; create and check client authentication failure ( security protocol , node , " scram - sha - 256 " , null ) ; server verify authentication metrics ( 0 , 1 ) ; }


public integer get int 3 2 ( ) { return int 3 2 ; }


constructs a { @ link build language options } object with random fields must access { @ code rand } using the same sequence of operations ( for the same fields ) as { @ link # build random semantics }

private static build language options build random options ( random rand ) throws exception { return parse options ( / / < = = add new options here in alphabetic order = = > " - - experimental disable external package = " + rand next boolean ( ) , " - - experimental sibling repository layout = " + rand next boolean ( ) , " - - experimental builtins bzl path = " + rand next double ( ) , " - - experimental builtins dummy = " + rand next boolean ( ) , " - - experimental cc skylark api enabled packages = " + rand next double ( ) + " , " + rand next double ( ) , " - - experimental enable android migration apis = " + rand next boolean ( ) , " - - experimental google legacy api = " + rand next boolean ( ) , " - - experimental ninja actions = " + rand next boolean ( ) , " - - experimental platforms api = " + rand next boolean ( ) , " - - experimental starlark config transitions = " + rand next boolean ( ) , " - - incompatible allow tags propagation = " + rand next boolean ( ) , / / flag , java names differ " - - experimental cc shared library = " + rand next boolean ( ) , " - - experimental repo remote exec = " + rand next boolean ( ) , " - - experimental exec groups = " + rand next boolean ( ) , " - - incompatible always check depset elements = " + rand next boolean ( ) , " - - incompatible applicable licenses = " + rand next boolean ( ) , " - - incompatible depset for libraries to link getter = " + rand next boolean ( ) , " - - incompatible disable target provider fields = " + rand next boolean ( ) , " - - incompatible disable depset items = " + rand next boolean ( ) , " - - incompatible disable third party license checking = " + rand next boolean ( ) , " - - incompatible disallow empty glob = " + rand next boolean ( ) , " - - incompatible disallow struct provider syntax = " + rand next boolean ( ) , " - - incompatible do not split linking cmdline = " + rand next boolean ( ) , " - - incompatible java common parameters = " + rand next boolean ( ) , " - - incompatible linkopts to linklibs = " + rand next boolean ( ) , " - - incompatible new actions api = " + rand next boolean ( ) , " - - incompatible no attr license = " + rand next boolean ( ) , " - - incompatible no implicit file export = " + rand next boolean ( ) , " - - incompatible no rule outputs param = " + rand next boolean ( ) , " - - incompatible run shell command string = " + rand next boolean ( ) , " - - incompatible struct has no methods = " + rand next boolean ( ) , " - - incompatible visibility private attributes at definition = " + rand next boolean ( ) , " - - incompatible require linker input cc api = " + rand next boolean ( ) , " - - incompatible restrict string escapes = " + rand next boolean ( ) , " - - incompatible use cc configure from rules cc = " + rand next boolean ( ) , " - - internal starlark flag test canary = " + rand next boolean ( ) , " - - max computation steps = " + rand next long ( ) ) ; }


private void save result and close ( ) { last location text = text get text ( ) ; final result = temp result ; dialog shell close ( ) ; }


to test value and watermark serialization and deserialization with time characteristic : event time producer parallelism = 1 ; kafka partition # = 1 ; consumer parallelism = 1

public void test ser de event time ( ) throws exception { test record ser de ( event time ) ; }


register a listener that will be called when this model is bound to a view the listener will contribute to this model ' s hash code state per the { @ link com airbnb epoxy epoxy attribute option # do not hash } rules you may clear the listener by setting a null value , or by calling { @ link # reset ( ) }

public model factory basic model with attribute on bind ( on model bound listener < model factory basic model with attribute , object > listener ) { on mutation ( ) ; this on model bound listener epoxy generated model = listener ; return this ; }


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


sort the given list with a default order comparator optimized to skip sorting for lists with size 0 or 1 , in order to avoid unnecessary array extraction

public static void sort ( list < ? > list ) { if ( list size ( ) > 1 ) { list sort ( instance ) ; } }


return the full version string of the present spring codebase , or { @ code null } if it cannot be determined

public static string get version ( ) { package pkg = spring version class get package ( ) ; return ( pkg ! = null ? pkg get implementation version ( ) : null ) ; }


test invoker is automatically added to manipulate target

public void test auto invoker ( ) { string name = " hieronymous " ; test bean target = ( test bean ) factory get bean ( " test " ) ; target set name ( name ) ; i test bean auto invoker = ( i test bean ) factory get bean ( " auto invoker " ) ; assert that ( auto invoker get name ( ) equals ( name ) ) is true ( ) ; }


tests nested repeatable and use of @ data bound constructor to process form data

public void test nested enabled top button ( ) throws exception { html page p = create web client ( ) go to ( " self / test nested top button " ) ; html form f = p get form by name ( " config " ) ; try { click button ( p , f , " add " , true ) ; f get input by value ( " " ) set value attribute ( " title one " ) ; click button ( p , f , " add foo " , true ) ; f get input by value ( " " ) set value attribute ( " txt one " ) ; click button ( p , f , " add foo " , false ) ; f get input by value ( " " ) set value attribute ( " txt two " ) ; f get inputs by name ( " bool " ) get ( 1 ) click ( ) ; click button ( p , f , " add " , false ) ; f get input by value ( " " ) set value attribute ( " title two " ) ; f get elements by tag name ( " button " ) get ( 3 ) click ( ) ; / / 2nd " add foo " button f get input by value ( " " ) set value attribute ( " txt 2 1 " ) ; } catch ( exception e ) { system err println ( " html at time of failure : \ n " + p get body ( ) as xml ( ) ) ; throw e ; } bind class = foo list class ; submit ( f ) ; assert equals ( " [ foo list : title one : [ foo : txt one : false , foo : txt two : true ] , " + " foo list : title two : [ foo : txt 2 1 : false ] ] " , bind result to string ( ) ) ; }


private boolean update branch transaction d o ( branch transaction d o branch transaction d o ) { string branch key = build branch key ( branch transaction d o get branch id ( ) ) ; try ( jedis jedis = jedis pooled factory get jedis instance ( ) ) { string previous branch status = jedis hget ( branch key , redis key branch status ) ; if ( string utils is empty ( previous branch status ) ) { throw new store exception ( " branch transaction is not exist , update branch transaction failed " ) ; } map < string , string > map = new hash map < > ( 2 , 1 ) ; map put ( redis key branch status , string value of ( branch transaction d o get status ( ) ) ) ; map put ( redis key branch gmt modified , string value of ( ( new date ( ) ) get time ( ) ) ) ; jedis hmset ( branch key , map ) ; return true ; } catch ( exception ex ) { throw new redis exception ( ex ) ; } }


for each template name wait for the template to be created and for the template version to be equal to the master node version

public static void wait for templates ( rest client client , list < string > expected templates ) throws exception { atomic reference < version > master node version = new atomic reference < > ( ) ; assert busy ( ( ) - > { request request = new request ( " get " , " / cat / nodes " ) ; request add parameter ( " h " , " master , version " ) ; request add parameter ( " error trace " , " true " ) ; string response = entity utils to string ( client perform request ( request ) get entity ( ) ) ; for ( string line : response split ( " \ n " ) ) { if ( line starts with ( " * " ) ) { master node version set ( version from string ( line substring ( 2 ) trim ( ) ) ) ; return ; } } fail ( " no master elected " ) ; } ) ; assert busy ( ( ) - > { final request request = new request ( " get " , " template " ) ; request add parameter ( " error trace " , " true " ) ; string string = entity utils to string ( client perform request ( request ) get entity ( ) ) ; map < string , object > response = x content helper convert to map ( json x content json x content , string , false ) ; final set < string > templates = new tree set < > ( response key set ( ) ) ; final list < string > missing templates = expected templates stream ( ) filter ( each - > templates contains ( each ) = = false ) collect ( collectors to list ( ) ) ; / / while it ' s possible to use a hamcrest matcher for this , the failure is much less legible if ( missing templates is empty ( ) = = false ) { fail ( " some expected templates are missing : " + missing templates + " the templates that exist are : " + templates + " " ) ; } expected templates for each ( template - > { map < ? , ? > template definition = ( map < ? , ? > ) response get ( template ) ; assert that ( " template [ " + template + " ] has unexpected version " , version from id ( ( integer ) template definition get ( " version " ) ) , equal to ( master node version get ( ) ) ) ; } ) ; } ) ; }


private string [ ] args ( string args ) { return args ; }


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


calculate the width ( in meters ) of quadtree cells at a specific level

public static double quad tree cell width ( int level ) { assert level > = 0 ; return earth equator / ( 1l < < level ) ; }


the path of temporary folder used to store downloaded files from endpoints with file response the default value is < code > null < code > , i e using the system ' s default tempopary folder

public string get temp folder path ( ) { return temp folder path ; }


load bean definitions from the specified xml file

public int load bean definitions ( input source input source ) throws bean definition store exception { return load bean definitions ( input source , " resource loaded through sax input source " ) ; }


provide the implementation of the platform bitmap factory for the current platform using the provided pool factory

public static platform bitmap factory build platform bitmap factory ( pool factory pool factory , platform decoder platform decoder , closeable reference factory closeable reference factory ) { if ( build version sdk int > = build version codes lollipop ) { return new art bitmap factory ( pool factory get bitmap pool ( ) , closeable reference factory ) ; } else if ( build version sdk int > = build version codes honeycomb ) { return new honeycomb bitmap factory ( new empty jpeg generator ( pool factory get pooled byte buffer factory ( ) ) , platform decoder , closeable reference factory ) ; } else { return new gingerbread bitmap factory ( ) ; } }


display the list of blacklisted trackers

private void list blacklisted trackers ( cluster cluster ) throws i o exception , interrupted exception { task tracker info [ ] trackers = cluster get black listed task trackers ( ) ; if ( trackers length > 0 ) { system out println ( " black listed node \ t reason " ) ; } for ( task tracker info tracker : trackers ) { system out println ( tracker get task tracker name ( ) + " \ t " + tracker get reason for blacklist ( ) ) ; } }


returns the setting value ( as long ) associated with the setting key if it does not exists , returns the default value provided

public long get as long ( string setting , long default value ) { string s value = get ( setting ) ; if ( s value = = null ) { return default value ; } try { return long parse long ( s value ) ; } catch ( number format exception e ) { throw new settings exception ( " failed to parse long setting [ " + setting + " ] with value [ " + s value + " ] " , e ) ; } }


find the index of < code > target col < code > in string array < code > table cols < code > it will ignore the case of the table cols

public static int find col index ( string [ ] table cols , string target col ) { preconditions check not null ( target col , " target col is null ! " ) ; for ( int i = 0 ; i < table cols length ; i + + ) { if ( target col equals ignore case ( table cols [ i ] ) ) { return i ; } } return - 1 ; }


parses the given string as bytes the supported expressions are listed under { @ link memory size }

public static long parse bytes ( string text ) throws illegal argument exception { check not null ( text , " text " ) ; final string trimmed = text trim ( ) ; check argument ( ! trimmed is empty ( ) , " argument is an empty - or whitespace - only string " ) ; final int len = trimmed length ( ) ; int pos = 0 ; char current ; while ( pos < len & & ( current = trimmed char at ( pos ) ) > = ' 0 ' & & current < = ' 9 ' ) { pos + + ; } final string number = trimmed substring ( 0 , pos ) ; final string unit = trimmed substring ( pos ) trim ( ) to lower case ( locale us ) ; if ( number is empty ( ) ) { throw new number format exception ( " text does not start with a number " ) ; } final long value ; try { value = long parse long ( number ) ; / / this throws a number format exception on overflow } catch ( number format exception e ) { throw new illegal argument exception ( " the value ' " + number + " ' cannot be re represented as 6 4bit number ( numeric overflow ) " ) ; } final long multiplier = parse unit ( unit ) map ( memory unit : : get multiplier ) or else ( 1l ) ; final long result = value * multiplier ; / / check for overflow if ( result / multiplier ! = value ) { throw new illegal argument exception ( " the value ' " + text + " ' cannot be re represented as 6 4bit number of bytes ( numeric overflow ) " ) ; } return result ; }


put fakebody - with - file - schema for this test , the body for this request much reference a schema named & # x 6 0 ; file & # x 6 0 ;

default response entity < void > test body with file schema ( @ api param ( value = " " , required = true ) @ valid @ request body file schema test class body ) { return new response entity < > ( http status not implemented ) ; }


returns a new message that is sent at first time when the connection to the proxy server has been established

protected abstract object new initial message ( channel handler context ctx ) throws exception ;


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

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


gets an " inline " string portion for to human ( ) , if available this is the portion that appears after the rop opcode

public string get inline string ( ) { return null ; }


tries to get a read only adapter for the database whose handle is passed to this method

static enum d b adapter find read only adapter ( d b handle handle ) throws version exception { try { return new enum d b adapter v 0 ( handle ) ; } catch ( version exception e ) { if ( ! e is upgradable ( ) ) { throw e ; } } return new enum d b adapter no table ( handle ) ; }


public static computer resolve for c l i ( @ argument ( required = true , meta var = " name " , usage = " agent name , or empty string for master " ) string name ) throws cmd line exception { jenkins h = jenkins get ( ) ; computer item = h get computer ( name ) ; if ( item = = null ) { list < string > names = computer set get computer names ( ) ; string adv = edit distance find nearest ( name , names ) ; throw new illegal argument exception ( adv = = null ? hudson model messages computer no such slave exists without advice ( name ) : hudson model messages computer no such slave exists ( name , adv ) ) ; } return item ; }


returns a new array containing the remaining values

public long array to array ( ) { long array array = new long array ( true , map size ) ; while ( has next ) array add ( next ( ) ) ; return array ; }


public void set up ( ) throws exception { var data source = new jdbc data source ( ) ; data source set u r l ( db url ) ; dao = new db customer dao ( data source ) ; var result = dao add ( existing customer ) ; assert true ( result ) ; }


guaranteed to throw an exception and leave the multimap unmodified

public immutable collection < v > replace values ( k key , iterable < ? extends v > values ) { throw new unsupported operation exception ( ) ; }


creates the collector that will visit the composite buckets of the matching documents the provided collector < code > in < code > is called on each composite bucket

leaf bucket collector get leaf collector ( leaf reader context context , leaf bucket collector in ) throws i o exception { return get leaf collector ( null , context , in ) ; }


return the header field at the given index the first and newest entry is always at index 1 , and the oldest entry is at the index length ( )

public hpack header field get entry ( int index ) { if ( index < = 0 | | index > length ( ) ) { throw new index out of bounds exception ( " index " + index + " out of bounds for length " + length ( ) ) ; } int i = head - index ; if ( i < 0 ) { return hpack header fields [ i + hpack header fields length ] ; } else { return hpack header fields [ i ] ; } }


default response entity < void > delete pet ( @ api param ( value = " pet id to delete " , required = true ) @ path variable ( " pet id " ) long pet id , @ api param ( value = " " ) @ request header ( value = " api key " , required = false ) string api key ) { return new response entity < > ( http status not implemented ) ; }


join an collection of objects with a separator that appears after every instance in the list - optionally at the end

public static string join ( collection collection , string separator , boolean trailing ) { string builder b = new string builder ( ) ; / / fast return on empty collection if ( collection is empty ( ) ) { return trailing ? separator : " " ; } for ( object o : collection ) { b append ( o ) append ( separator ) ; } int length = separator length ( ) ; string s = b to string ( ) ; return ( trailing | | s is empty ( ) ) ? s : ( b substring ( 0 , b length ( ) - length ) ) ; }


sets an external < code > delegation token secret manager < code > instance to manage creation and verification of delegation tokens this is useful for use cases where secrets must be shared across multiple services

public void set external delegation token secret manager ( abstract delegation token secret manager secret manager ) { token manager set external delegation token secret manager ( secret manager ) ; }


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


private boolean verify access token request ( final http servlet request request , final http servlet response response ) { val validators = get o auth configuration context ( ) get access token grant request validators ( ) ; val context = new j e e context ( request , response , get o auth configuration context ( ) get session store ( ) ) ; return validators stream ( ) filter ( ext - > ext supports ( context ) ) find first ( ) or else throw ( ( supplier < runtime exception > ) ( ) - > new unsupported operation exception ( " access token request is not supported " ) ) validate ( context ) ; }


register a listener that will be called when this model is bound to a view the listener will contribute to this model ' s hash code state per the { @ link com airbnb epoxy epoxy attribute option # do not hash } rules you may clear the listener by setting a null value , or by calling { @ link # reset ( ) }

public prop defaults view model on bind ( on model bound listener < prop defaults view model , prop defaults view > listener ) { on mutation ( ) ; this on model bound listener epoxy generated model = listener ; return this ; }


exclusive buffer is recycled to this channel manager directly and it may trigger return extra floating buffer based on < tt > num required buffers < tt >

public void recycle ( memory segment segment ) { int num added buffers = 0 ; synchronized ( buffer queue ) { try { / / similar to notify buffer available ( ) , make sure that we never add a buffer / / after channel released all buffers via release all resources ( ) if ( input channel is released ( ) ) { global pool recycle memory segments ( collections singleton list ( segment ) ) ; } else { num added buffers = buffer queue add exclusive buffer ( new network buffer ( segment , this ) , num required buffers ) ; } } catch ( throwable t ) { exception utils rethrow ( t ) ; } finally { buffer queue notify all ( ) ; } } try { input channel notify buffer available ( num added buffers ) ; } catch ( throwable t ) { exception utils rethrow ( t ) ; } }


find an { @ link annotation } of { @ code annotation type } on the specified bean , traversing its interfaces and super classes if no annotation can be found on the given class itself , as well as checking the bean ' s factory method ( if any )

< a extends annotation > a find annotation on bean ( string bean name , class < a > annotation type ) throws no such bean definition exception ;


multi value map < string , cookie > cookies ( ) ;


reads row count and sets value in status label

private long read row count ( d b r progress monitor monitor ) throws d b exception { final d b c execution context execution context = get execution context ( ) ; d b s data container data container = get data container ( ) ; if ( execution context = = null | | data container = = null ) { throw new d b exception ( model messages error not connected to database ) ; } long [ ] result = new long [ 1 ] ; d b exec utils try execute recover ( monitor , execution context get data source ( ) , param - > { try ( d b c session session = execution context open session ( monitor , d b c execution purpose user , " read total row count " ) ) { long row count = data container count data ( new abstract execution source ( data container , execution context , this ) , session , model get data filter ( ) , d b s data container flag none ) ; model set total row count ( row count ) ; result [ 0 ] = row count ; } catch ( d b c exception e ) { throw new invocation target exception ( e ) ; } } ) ; return result [ 0 ] ; }


attempt to obtain the host name of the given string which contains an ip address and an optional port

public static string get host name of i p ( string ip port ) { if ( null = = ip port | | ! ip port pattern matcher ( ip port ) matches ( ) ) { return null ; } try { int colon idx = ip port index of ( ' : ' ) ; string ip = ( - 1 = = colon idx ) ? ip port : ip port substring ( 0 , ip port index of ( ' : ' ) ) ; return inet address get by name ( ip ) get host name ( ) ; } catch ( unknown host exception e ) { return null ; } }


ensures the actor has been laid out calls { @ link # layout ( ) } if { @ link # invalidate ( ) } has been called since the last time { @ link # validate ( ) } was called , or if the actor otherwise needs to be laid out this method is usually called in { @ link actor # draw ( batch , float ) } by the actor itself before drawing is performed


this implementation always returns { @ code null } , indicating that no jdbc connection can be provided

public connection handle get jdbc connection ( entity manager entity manager , boolean read only ) throws persistence exception , s q l exception { return null ; }


sets the document to index in bytes form ( assumed to be safe to be used from different threads )

public index request source ( byte [ ] source , int offset , int length , x content type x content type ) { return source ( new bytes array ( source , offset , length ) , x content type ) ; }


creates a { @ link conversation message } wrapping the provided message record and will update and modify the provided mentions from placeholder to actual this method may perform database operations to resolve mentions to display names

public static @ non null conversation message create with unresolved data ( @ non null context context , @ non null message record message record , @ nullable list < mention > mentions ) { if ( message record is mms ( ) & & mentions ! = null & & ! mentions is empty ( ) ) { mention util updated body and mentions updated = mention util update body and mentions with display names ( context , message record , mentions ) ; return new conversation message ( message record , updated get body ( ) , updated get mentions ( ) ) ; } return create with resolved data ( message record ) ; }


build call for test query parameter collection format

public okhttp 3 call test query parameter collection format call ( list < string > pipe , list < string > ioutil , list < string > http , list < string > url , list < string > context , final api callback callback ) throws api exception { object local var post body = null ; / / create path and map variables string local var path = " / fake / test - query - paramters " ; list < pair > local var query params = new array list < pair > ( ) ; list < pair > local var collection query params = new array list < pair > ( ) ; map < string , string > local var header params = new hash map < string , string > ( ) ; map < string , string > local var cookie params = new hash map < string , string > ( ) ; map < string , object > local var form params = new hash map < string , object > ( ) ; if ( pipe ! = null ) { local var collection query params add all ( local var api client parameter to pairs ( " csv " , " pipe " , pipe ) ) ; } if ( ioutil ! = null ) { local var collection query params add all ( local var api client parameter to pairs ( " csv " , " ioutil " , ioutil ) ) ; } if ( http ! = null ) { local var collection query params add all ( local var api client parameter to pairs ( " ssv " , " http " , http ) ) ; } if ( url ! = null ) { local var collection query params add all ( local var api client parameter to pairs ( " csv " , " url " , url ) ) ; } if ( context ! = null ) { local var collection query params add all ( local var api client parameter to pairs ( " multi " , " context " , context ) ) ; } final string [ ] local var accepts = { } ; final string local var accept = local var api client select header accept ( local var accepts ) ; if ( local var accept ! = null ) { local var header params put ( " accept " , local var accept ) ; } final string [ ] local var content types = { } ; final string local var content type = local var api client select header content type ( local var content types ) ; local var header params put ( " content - type " , local var content type ) ; string [ ] local var auth names = new string [ ] { } ; return local var api client build call ( local var path , " put " , local var query params , local var collection query params , local var post body , local var header params , local var cookie params , local var form params , local var auth names , callback ) ; }


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


create a data block and obtain an output stream for adding data into the block there can only be one block appender stream active at any time data blocks may not be created after the first meta blocks the caller must call block appender close ( ) to conclude the block creation

public block appender prepare data block ( ) throws i o exception { if ( blk in progress = = true ) { throw new illegal state exception ( " cannot create data block until previous block is closed " ) ; } if ( meta blk seen = = true ) { throw new illegal state exception ( " cannot create data block after meta blocks " ) ; } data block register dbr = new data block register ( ) ; w block state wbs = new w block state ( get default compression algorithm ( ) , out , fs output buffer , conf ) ; block appender ba = new block appender ( dbr , wbs ) ; blk in progress = true ; return ba ; }


setter for property ' localizible description '

public void set localizible description ( localizable localizible description ) { this localizible description = localizible description ; }


returns a list of all users who have project access

user [ ] get project users ( ) { user [ ] users = new user [ table model get model data ( ) size ( ) ] ; return table model get model data ( ) to array ( users ) ; }


returns true if the specified oas model has at least one operation with http basic authentication

public static boolean has http basic methods ( open a p i open a p i ) { final map < string , security scheme > security schemes = get security schemes ( open a p i ) ; if ( security schemes ! = null ) { for ( map entry < string , security scheme > scheme : security schemes entry set ( ) ) { if ( security scheme type http equals ( scheme get value ( ) get type ( ) ) & & " basic " equals ( scheme get value ( ) get scheme ( ) ) ) { return true ; } } } return false ; }


test per - job yarn cluster and memory calculations for off - heap use ( see flink - 7400 ) with the same job as { @ link # per job yarn cluster ( ) } this ensures that with ( any ) pre - allocated off - heap memory by us , there is some off - heap memory remaining for flink ' s libraries creating task managers will thus fail if no off - heap memory remains

public void per job yarn cluster off heap ( ) throws exception { run test ( ( ) - > { log info ( " starting per job yarn cluster ( ) " ) ; file example jar location = get test jar path ( " batch word count jar " ) ; / / set memory constraints ( otherwise this is the same test as / / per job yarn cluster ( ) above ) final long task manager memory m b = 1024 ; run with args ( new string [ ] { " run " , " - m " , " yarn - cluster " , " - yj " , flink uberjar get absolute path ( ) , " - yt " , flink lib folder get absolute path ( ) , " - ys " , " 2 " , / / test that the job is executed with a dop of 2 " - yjm " , " 7 6 8m " , " - ytm " , task manager memory m b + " m " , example jar location get absolute path ( ) } , / * test succeeded after this string * / " program execution finished " , / * prohibited strings : ( to verify the parallelism ) * / / / ( we should see " data sink ( ) ( 1 / 2 ) " and " data sink ( ) ( 2 / 2 ) " / / instead ) new string [ ] { " data sink \ \ ( * \ \ ) \ \ ( 1 / 1 \ \ ) switched to finished " } , run types cli frontend , 0 , cli test logger resource : : get messages ) ; log info ( " finished per job yarn cluster ( ) " ) ; } ) ; }


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

public static fields find by name ( string name ) { return by name get ( name ) ; }


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


method that has to be implemented by implementing classes to fill the queue

public void fill queue for key ( string key name , queue < e > key queue , int num values ) throws i o exception ;


creates a delayed { @ link transition } s that will run after a delay

public static < t extends transition > transition delay ( int delay ms , t transition ) { return new delay transition set ( delay ms , transition ) ; }


transfers the specified source array ' s data to this buffer starting at the specified absolute { @ code index } this method does not modify { @ code reader index } or { @ code writer index } of this buffer

public abstract byte buf set bytes ( int index , byte [ ] src , int src index , int length ) ;


public object get permissions ( @ request param int page no , @ request param int page size , @ request param ( name = " role " , default value = string utils empty ) string role ) { return nacos role service get permissions from database ( role , page no , page size ) ; }


return the fragments in stack in manager

public static list < fragment > get fragments in stack ( @ non null final fragment manager fm ) { list < fragment > fragments = get fragments ( fm ) ; list < fragment > result = new array list < > ( ) ; for ( fragment fragment : fragments ) { if ( fragment ! = null ) { bundle args = fragment get arguments ( ) ; if ( args ! = null & & args get boolean ( args is add stack ) ) { result add ( fragment ) ; } } } return result ; }


protected static float distance ( float event x , float start x , float event y , float start y ) { float dx = event x - start x ; float dy = event y - start y ; return ( float ) math sqrt ( dx * dx + dy * dy ) ; }


returns a callback that , when executed , writes the given bytes to the given file path not meant to be called directly by tests

private static runnable make write file content callback ( path to change , byte [ ] contents ) { return ( ) - > { try ( output stream output stream = to change get output stream ( ) ) { output stream write ( contents ) ; } catch ( i o exception e ) { e print stack trace ( ) ; fail ( e get message ( ) ) ; } } ; }


get the minimum number of connections in this pool

protected int get min size ( ) { return this min size ; }


returns a new collection consisting of the elements of input collection transformed by the given transformer if the input transformer is null , the result is an empty list

public static < e1 , e2 > collection < e2 > collect ( final collection < e1 > input collection , final transformer < e1 , e2 > transformer ) { list < e2 > answer = new array list < > ( ) ; if ( input collection = = null | | transformer = = null ) return answer ; for ( e1 e 1 : input collection ) { answer add ( transformer transform ( e 1 ) ) ; } return answer ; }


the unannounced credit is increased by the given amount and might notify increased credit to the producer

public void notify buffer available ( int num available buffers ) throws i o exception { if ( num available buffers > 0 & & unannounced credit get and add ( num available buffers ) = = 0 ) { notify credit available ( ) ; } }


returns the cumulative number of block input operations for the { @ link action }

public optional < long > cumulative command execution block input operations ( ) { return get cumulative long ( spawn result - > spawn result get num block input operations ( ) ) ; }


defines which spatial strategy will be used for building the geo shape query when not set , the strategy that will be used will be the one that is associated with the geo shape field in the mappings

public geo shape query builder strategy ( spatial strategy strategy ) { if ( strategy ! = null & & strategy = = spatial strategy term & & relation ! = shape relation intersects ) { throw new illegal argument exception ( " strategy [ " + strategy get strategy name ( ) + " ] only supports relation [ " + shape relation intersects get relation name ( ) + " ] found relation [ " + relation get relation name ( ) + " ] " ) ; } this strategy = strategy ; return this ; }


public static void check upgrade ( n n storage storage ) throws i o exception { / / upgrade or rolling upgrade is allowed only if there are / / no previous fs states in any of the local directories for ( iterator < storage directory > it = storage dir iterator ( false ) ; it has next ( ) ; ) { storage directory sd = it next ( ) ; if ( sd get previous dir ( ) exists ( ) ) throw new inconsistent f s state exception ( sd get root ( ) , " previous fs state should not exist during upgrade " + " finalize or rollback first " ) ; } }


public float get damping ratio ( ) { return joint get damping ratio ( ) ; }


private static string o ( string in ) { return " - " + in ; }


public void delete address range ( address start addr , address end addr , task monitor monitor ) throws cancelled exception { if ( instance settings adapter = = null ) { throw new unsupported operation exception ( ) ; } lock acquire ( ) ; try { list < ? > addr key ranges = addr map get key ranges ( start addr , end addr , false ) ; int cnt = addr key ranges size ( ) ; for ( int i = 0 ; i < cnt ; i + + ) { key range kr = ( key range ) addr key ranges get ( i ) ; instance settings adapter delete ( kr min key , kr max key , monitor ) ; } } catch ( i o exception e ) { db error ( e ) ; } finally { settings cache clear ( ) ; lock release ( ) ; } }


is application starved for fairshare or minshare

boolean is starved ( ) { return is starved for fair share ( ) | | ! resources is none ( minshare starvation ) ; }


sets the encapsulated byte to the specified value

public void set value ( byte value ) { this value = value ; }


adds the given listener to the provided directory reader the reader must contain an { @ link elasticsearch directory reader } in it ' s hierarchy otherwise we can ' t safely install the listener

public static void add reader close listener ( directory reader reader , index reader closed listener listener ) { elasticsearch directory reader elasticsearch directory reader = get elasticsearch directory reader ( reader ) ; if ( elasticsearch directory reader = = null ) { throw new illegal argument exception ( " can ' t install close listener reader is not an elasticsearch directory reader / elasticsearch leaf reader " ) ; } index reader cache helper cache helper = elasticsearch directory reader get reader cache helper ( ) ; if ( cache helper = = null ) { throw new illegal argument exception ( " reader " + elasticsearch directory reader + " does not support caching " ) ; } assert cache helper get key ( ) = = reader get reader cache helper ( ) get key ( ) ; cache helper add closed listener ( listener ) ; }


called when creating a new hooks handler for a layout calculation it copies the source of truth hooks these blocks are run immediately to update this hook before we start creating components

private void copy hooks from ( hooks handler other ) { m hooks container = new hash map < > ( other m hooks container size ( ) ) ; for ( map entry < string , hooks > entry : other m hooks container entry set ( ) ) { m hooks container put ( entry get key ( ) , new hooks ( entry get value ( ) ) ) ; } }


associates the provided { @ code fingerprint } and contents of the future , when it completes there may be a race between this call and calls to { @ link # put } those races are benign , since the fingerprint should be the same regardless we may pessimistically end up having a future to wait on for serialization that isn ' t actually necessary , but that isn ' t a big concern

private void put async ( byte string fingerprint , listenable future < object [ ] > future contents ) { future contents add listener ( ( ) - > { try { object [ ] contents = futures get done ( future contents ) ; / / replace the cache entry with the unwrapped contents , since the future may be gc ' d fingerprint to contents put ( fingerprint , contents ) ; / / there may already be an entry here , but it ' s better to put a fingerprint result / / with an immediate future , since then later readers won ' t need to block / / unnecessarily it would be nice to check the old value , but cache # put / / doesn ' t provide it to us contents to fingerprint put ( contents , fingerprint computation result create ( fingerprint , immediate future ( null ) ) ) ; } catch ( execution exception e ) { / / failure to fetch the nested set contents is unexpected , but the failed future can / / be stored as the nested set children this way the exception is only propagated if / / the nested set is consumed ( unrolled ) bug reporter send bug report ( e ) ; } } , more executors direct executor ( ) ) ; }


the number of search hits to return defaults to { @ code 10 }

public search request builder set size ( int size ) { source builder ( ) size ( size ) ; return this ; }


performs auto merge of each remaining address based program item followed by merge of their conflicts in address order

private void merge address based program items ( task monitor monitor ) throws program conflict exception , memory access exception , cancelled exception { / / now that the final code units are established , / / merge the remaining listing at the address level in address order / / each of the following mergers are address based listing mergers display initial phase message ( address based phase , " merge of equate , user defined property , reference , function tags , bookmark & comment changes " ) ; abstract listing merger [ ] mergers = new abstract listing merger [ ] { equate merger , user property merger , reference merger , bookmark merger , comment merger , function tag merger } ; auto merge ( mergers , monitor ) ; merge manager show progress icon ( false ) ; merge conflicts ( mergers , monitor ) ; merge manager show progress icon ( true ) ; remove bottom component ( ) ; merge manager set completed ( address based phase ) ; }


creates a { @ link android resources } containing all the resources in directory artifacts , for use with aar import rules in general , { @ link # from ( rule context , string ) } should be used instead , but it can ' t be for aar import since we don ' t know about its individual assets at analysis time no transitive resources will be included in the container produced by this method

static android resources for aar import ( special artifact resources dir ) { preconditions check argument ( resources dir is tree artifact ( ) ) ; return new android resources ( immutable list of ( resources dir ) , immutable list of ( resources dir get exec path ( ) get child ( " res " ) ) ) ; }


subscribe on the given topic , with the given qos when a message is received , mqtt client will invoke the { @ link mqtt handler # on message ( string , byte buf ) } function of the given handler this subscription is only once if the mqtt client has received 1 message , the subscription will be removed

public future < void > once ( string topic , mqtt handler handler , mqtt qo s qos ) { return create subscription ( topic , handler , true , qos ) ; }


test concurrent acquirerelease semantics

public void verify concurrent acquire and release ( ) { val executor = executors new fixed thread pool ( concurrent size ) ; try { test concurrency ( executor , arrays as list ( get concurrent locks ( " concurrent - new " ) ) ) ; } catch ( final exception e ) { throw new assertion error ( " test concurrent acquire and release failed " , e ) ; } finally { executor shutdown now ( ) ; } }


visit a parse tree produced by the { @ code param literal } labeled alternative in { @ link sql base parser # constant }

t visit param literal ( sql base parser param literal context ctx ) ;


helper to decode half of a hexadecimal number from a string

public static int decode hex nibble ( final char c ) { assert hex2b length = = ( character max value + 1 ) ; / / character digit ( ) is not used here , as it addresses a larger / / set of characters ( both ascii and full - width latin letters ) final int index = c ; return hex2b [ index ] ; }


< code > required io netty example worldclock day of week day of week = 5 ; < code >

public builder set day of week ( io netty example worldclock world clock protocol day of week value ) { if ( value = = null ) { throw new null pointer exception ( ) ; } bit field 0 | = 0x 0 0 0 0 0 0 0 8 ; day of week = value ; on changed ( ) ; return this ; }


returns { @ code true } if { @ code target } is present as an element anywhere in { @ code array }

public static boolean contains ( byte [ ] array , byte target ) { for ( byte value : array ) { if ( value = = target ) { return true ; } } return false ; }


returns true , if the aggregator value is zero , false otherwise

public boolean is converged ( int iteration , long value value ) { return value get value ( ) = = 0 ; }


auto - merges equate changes for a scalar value at a particular address and operand it also determines the equate conflicts for this scalar at this address and operand

private void get operand scalar conflicts ( address addr , int op index , scalar scalar ) { long scalar value = scalar get value ( ) ; equate latest equate = latest equate tab get equate ( addr , op index , scalar value ) ; equate my equate = my equate tab get equate ( addr , op index , scalar value ) ; equate original equate = original equate tab get equate ( addr , op index , scalar value ) ; boolean same original latest = same equates ( original equate , latest equate ) ; boolean same original my = same equates ( original equate , my equate ) ; boolean same latest my = same equates ( latest equate , my equate ) ; if ( same latest my ) { return ; / / do nothing } if ( ! same original my ) { if ( same original latest ) { merge ( addr , op index , scalar , keep my ) ; } else { save conflict ( addr , op index , scalar ) ; } } }


this implementation creates a path resource , applying the given path relative to the path of the underlying file of this resource descriptor

public resource create relative ( string relative path ) { return new path resource ( this path resolve ( relative path ) ) ; }


resets the internal state of this byte matcher so that it can be reused against another byte stream


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

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


sets a column constraint for this rule if set , the rule ' s token will only be returned if the pattern is detected starting at the specified column if the column is smaller then 0 , the column constraint is considered removed

public void set column constraint ( int column ) { if ( column < 0 ) column = undefined ; f column = column ; }


finds pets by tags multiple tags can be provided with comma separated strings use tag 1 , tag 2 , tag 3 for testing

set < pet > find pets by tags ( @ param ( " tags " ) set < string > tags ) ;


formats the specified collection path parameter to a string value

public string collection path parameter to string ( string collection format , collection value ) { / / create the value based on the collection format if ( " multi " equals ( collection format ) ) { / / not valid for path params return parameter to string ( value ) ; } / / collection format is assumed to be " csv " by default string delimiter = " , " ; if ( " ssv " equals ( collection format ) ) { delimiter = " " ; } else if ( " tsv " equals ( collection format ) ) { delimiter = " \ t " ; } else if ( " pipes " equals ( collection format ) ) { delimiter = " | " ; } string builder sb = new string builder ( ) ; for ( object item : value ) { sb append ( delimiter ) ; sb append ( parameter to string ( item ) ) ; } return sb substring ( delimiter length ( ) ) ; }


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


get the post from the provided endpoint record

protected int get port ( endpoint endpoint ) { int port = - 1 ; / / assume one address for now map < string , string > address = endpoint addresses get ( 0 ) ; if ( endpoint address type equals ( address types address hostname and port ) ) { port = integer parse int ( address get ( address types address port field ) ) ; } else if ( endpoint address type equals ( address types address uri ) ) { uri uri = uri create ( address get ( " uri " ) ) ; port = uri get port ( ) ; } return port ; }


reads window state generated using an { @ link aggregate function }

public < k , t , acc , r > data set < r > aggregate ( string uid , aggregate function < t , acc , r > aggregate function , type information < k > key type , type information < t > input type , type information < r > output type ) throws i o exception { return aggregate ( uid , aggregate function , new pass through reader < > ( ) , key type , input type , output type ) ; }


removes and returns the greatest element of this queue

public e remove last ( ) { if ( is empty ( ) ) { throw new no such element exception ( ) ; } return remove and get ( get max element index ( ) ) ; }


tests that when restoring from a snapshot and we find a node with a shard copy and allocation deciders say yes , we allocate to that node

public void test restore ( ) { routing allocation allocation = get restore routing allocation ( yes allocation deciders ( ) , random long ( ) , " alloc id " ) ; test allocator add data ( node 1 , " some alloc id " , random boolean ( ) ) ; allocate all unassigned ( allocation ) ; assert that ( allocation routing nodes changed ( ) , equal to ( true ) ) ; assert that ( allocation routing nodes ( ) unassigned ( ) ignored ( ) is empty ( ) , equal to ( true ) ) ; assert that ( allocation routing nodes ( ) shards with state ( shard routing state initializing ) size ( ) , equal to ( 1 ) ) ; assert cluster health status ( allocation , cluster health status yellow ) ; }


runs simplification inside a non - specialized node

private rex node simplify generic node ( rex call e ) { final list < rex node > operands = new array list < > ( e operands ) ; simplify list ( operands , unknown ) ; if ( e operands equals ( operands ) ) { return e ; } return rex builder make call ( e get type ( ) , e get operator ( ) , operands ) ; }


stops a random node in the cluster that applies to the given filter does nothing if none of the nodes match the filter

public synchronized void stop random node ( final predicate < settings > filter ) throws i o exception { ensure open ( ) ; node and client node and client = get random node and client ( nc - > filter test ( nc node settings ( ) ) ) ; if ( node and client ! = null ) { if ( node prefix equals ( e s integ test case suite cluster node prefix ) & & node and client node and client id ( ) < shared nodes seeds length & & node and client is master eligible ( ) & & auto manage master nodes & & nodes values ( ) stream ( ) filter ( node and client : : is master eligible ) filter ( n - > n node and client id ( ) < shared nodes seeds length ) count ( ) = = 1 ) { throw new assertion error ( " tried to stop the only master eligible shared node " ) ; } logger info ( " closing filtered random node [ { } ] " , node and client name ) ; stop nodes and client ( node and client ) ; } }


obtain a new " blank " resolved sleigh constructor record

public static assembly resolved constructor nop ( string description , list < ? extends assembly resolution > sel ) { return resolved ( assembly pattern block nop ( ) , assembly pattern block nop ( ) , description , sel ) ; }


compare content of file operations using a double byte array

public static void validate file content ( byte [ ] concat , byte [ ] [ ] bytes ) { int idx = 0 ; boolean mismatch = false ; for ( byte [ ] bb : bytes ) { for ( byte b : bb ) { if ( b ! = concat [ idx + + ] ) { mismatch = true ; break ; } } if ( mismatch ) { break ; } } assert false ( " file content of file is not as expected at offset " + idx , mismatch ) ; }


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


get the mult ent sub model code block that contains the address

public code block get first code block containing ( address addr , task monitor monitor ) throws cancelled exception { code block block = get sub from cache ( addr ) ; if ( block = = null ) { block = get address set containing ( addr , monitor ) ; } return block ; }


create a { @ link hdfs data output stream builder } to append a file on dfs

public hdfs data output stream builder append file ( path path ) { return new hdfs data output stream builder ( this , path ) append ( ) ; }


returns the supported api versions that this request supports

default collection < rest a p i version > get supported a p i versions ( ) { return collections singleton ( rest a p i version v1 ) ; }


return the property sources that were actually applied during { @ link # post process bean factory ( configurable listable bean factory ) post - processing }

public property sources get applied property sources ( ) throws illegal state exception { assert state ( this applied property sources ! = null , " property sources have not yet been applied " ) ; return this applied property sources ; }


set the container id - to - exception map in which the exception indicates error from each container for failed requests

public abstract void set failed requests ( map < container id , serialized exception > failed requests ) ;


returns the " initialized " abstract type corresponding to the given abstract type

private int get initialized type ( final symbol table symbol table , final int abstract type ) { if ( abstract type = = uninitialized this | | ( abstract type & ( dim mask | kind mask ) ) = = uninitialized kind ) { for ( int i = 0 ; i < initialization count ; + + i ) { int initialized type = initializations [ i ] ; int dim = initialized type & dim mask ; int kind = initialized type & kind mask ; int value = initialized type & value mask ; if ( kind = = local kind ) { initialized type = dim + input locals [ value ] ; } else if ( kind = = stack kind ) { initialized type = dim + input stack [ input stack length - value ] ; } if ( abstract type = = initialized type ) { if ( abstract type = = uninitialized this ) { return reference kind | symbol table add type ( symbol table get class name ( ) ) ; } else { return reference kind | symbol table add type ( symbol table get type ( abstract type & value mask ) value ) ; } } } } return abstract type ; } / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - / / main method , to simulate the execution of each instruction on the output frame / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


map of string keys and values that can be used to organize and categorize resources within a collection < code > map & lt ; string , string & gt ; labels = 4 ; < code >

public builder put labels ( java lang string key , java lang string value ) { if ( key = = null ) { throw new java lang null pointer exception ( ) ; } if ( value = = null ) { throw new java lang null pointer exception ( ) ; } internal get mutable labels ( ) get mutable map ( ) put ( key , value ) ; return this ; }


public b buffer size ( int buf size ) { buffer size = buf size ; return get this builder ( ) ; }


set the iso format used to format date values

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


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


ensure that all end of superstep event related methods throw an exception when used with a non - iterative reader

public void test exceptions non iterative reader ( ) throws exception { final abstract reader reader = new mock reader ( create input gate ( 4 ) ) ; / / non - iterative reader cannot reach end of superstep assert false ( reader has reached end of superstep ( ) ) ; try { reader start next superstep ( ) ; fail ( " did not throw expected exception when starting next superstep with non - iterative reader " ) ; } catch ( throwable t ) { / / all good , expected exception } try { reader handle event ( end of superstep event instance ) ; fail ( " did not throw expected exception when handling end of superstep event with non - iterative reader " ) ; } catch ( throwable t ) { / / all good , expected exception } }


if the job requires a success marker on a successful job , create the file { @ link commit constants # success } while the classic committers create a 0 - byte file , the s 3 guard committers put up a the contents of a { @ link success data } file

protected void maybe create success marker from commits ( job context context , active commit pending ) throws i o exception { list < string > filenames = new array list < > ( pending size ( ) ) ; / / the list of committed objects in pending is size limited in / / active commit upload committed filenames add all ( pending committed objects ) ; / / load in all the pending statistics i o statistics snapshot snapshot = new i o statistics snapshot ( pending get i o statistics ( ) ) ; snapshot aggregate ( get i o statistics ( ) ) ; maybe create success marker ( context , filenames , snapshot ) ; }


public int compare ( ssa basic block b 1 , ssa basic block b 2 ) { int label 1 = b 1 rop label ; int label 2 = b 2 rop label ; if ( label 1 < label 2 ) { return - 1 ; } else if ( label 1 > label 2 ) { return 1 ; } else { return 0 ; } }


public void unary rpc ( io grpc testing protobuf simple request request , io grpc stub stream observer < io grpc testing protobuf simple response > response observer ) { io grpc stub client calls async unary call ( get channel ( ) new call ( get unary rpc method ( ) , get call options ( ) ) , request , response observer ) ; }


print the result contents as tableau form to client console this method has slightly different behaviors under different checkpointing settings ( to enable checkpointing for a streaming job , set checkpointing properties through { @ link table config # get configuration ( ) } ) for batch jobs or streaming jobs without checkpointing , this method has neither exactly - once nor at - least - once guarantee query results are immediately accessible by the clients once they ' re produced , but exceptions will be thrown when the job fails and restarts for streaming jobs with exactly - once checkpointing , this method guarantees an end - to - end exactly - once record delivery a result will be accessible by clients only after its corresponding checkpoint completes for streaming jobs with at - least - once checkpointing , this method guarantees an end - to - end at - least - once record delivery query results are immediately accessible by the clients once they ' re produced , but it is possible for the same result to be delivered multiple times in order to fetch result to local , you can call either { @ link # collect ( ) } and { @ link # print ( ) } but , they can ' t be called both on the same { @ link table result } instance , because the result can only be accessed once


returns all parents of the vertices in the given set

public set < vertex > get parents ( set < vertex > vs ) { set < vertex > parents = new hash set < vertex > ( ) ; edge e ; vertex v ; iterator < vertex > i = vs iterator ( ) ; while ( i has next ( ) ) { v = i next ( ) ; e = vertices get first incoming edge ( v ) ; while ( e ! = null ) { parents add ( e from ( ) ) ; e = edges get next edge with same to ( e ) ; } } return parents ; }


checks expected rule invariants , throws rule errors if anything is set wrong

private static void validate rule context ( rule context rule context ) throws interrupted exception , rule error exception {


given a list of timestamp formats that might contain indeterminate daymonth parts , return the corresponding pattern with the placeholders replaced with concrete daymonth formats

private list < string > determinise java timestamp formats ( list < string > raw java timestamp formats , @ nullable timestamp format only consider format ) { / / this method needs rework if the class is ever made thread safe if ( raw java timestamp formats stream ( ) any match ( format - > format index of ( indeterminate field placeholder ) > = 0 ) ) { boolean is day first = guess is day first ( raw java timestamp formats , only consider format , locale get default ( ) ) ; cached java timestamp formats = raw java timestamp formats stream ( ) map ( format - > determinise java timestamp format ( format , is day first ) ) collect ( collectors to list ( ) ) ; } else { cached java timestamp formats = raw java timestamp formats ; } return cached java timestamp formats ; }


get an iterator over code blocks which overlap the specified address set

public code block iterator get code blocks containing ( address set view addr set , task monitor monitor ) throws cancelled exception { return new simple block iterator ( this , addr set , monitor ) ; }


{ @ inherit doc } this implementation is guaranteed to throw an { @ link unsupported operation exception }

public final entry < e > poll first entry ( ) { throw new unsupported operation exception ( ) ; }


returns a set backed by the specified map the resulting set displays the same ordering , concurrency , and performance characteristics as the backing map in essence , this factory method provides a { @ link set } implementation corresponding to any { @ link map } implementation there is no need to use this method on a { @ link map } implementation that already has a corresponding { @ link set } implementation ( such as { @ link java util hash map } or { @ link java util tree map } ) each method invocation on the set returned by this method results in exactly one method invocation on the backing map or its { @ code key set } view , with one exception the { @ code add all } method is implemented as a sequence of { @ code put } invocations on the backing map the specified map must be empty at the time this method is invoked , and should not be accessed directly after this method returns these conditions are ensured if the map is created empty , passed directly to this method , and no reference to the map is retained , as illustrated in the following code fragment : { @ code set < object > identity hash set = sets new set from map ( new identity hash map < object , boolean > ( ) ) ; } this method has the same behavior as the jdk 6 method { @ code collections new set from map ( ) } the returned set is serializable if the backing map is

public static < e > set < e > new set from map ( map < e , boolean > map ) { return collections new set from map ( map ) ; }


finds catalog , schema or table within specified object container

public static d b s object get object by path ( @ not null d b r progress monitor monitor , @ not null d b c execution context execution context , @ not null d b s object container root s c , @ nullable string catalog name , @ nullable string schema name , @ nullable string object name ) throws d b exception { if ( ! common utils is empty ( catalog name ) ) { class < ? extends d b s object > child type = root s c get primary child type ( monitor ) ; if ( d b s schema class is assignable from ( child type ) | | d b s entity class is assignable from ( child type ) ) { / / datasource supports only schemas do not use catalog catalog name = null ; } } if ( ! common utils is empty ( catalog name ) & & ! common utils is empty ( schema name ) ) { / / we have both both - just search both d b s object catalog = root s c get child ( monitor , catalog name ) ; if ( ! ( catalog instanceof d b s object container ) ) { return null ; } root s c = ( d b s object container ) catalog ; d b s object schema = root s c get child ( monitor , schema name ) ; if ( ! ( schema instanceof d b s object container ) ) { return null ; } root s c = ( d b s object container ) schema ; } else if ( ! common utils is empty ( catalog name ) | | ! common utils is empty ( schema name ) ) { / / one container name string container name = ! common utils is empty ( catalog name ) ? catalog name : schema name ; d b s object sc = root s c get child ( monitor , container name ) ; if ( ! ( sc instanceof d b s object container ) ) { / / not found - try to find in selected object d b s object selected object = get selected object ( execution context ) ; if ( selected object instanceof d b s object container ) { if ( selected object instanceof d b s schema & & selected object get parent object ( ) instanceof d b s catalog & & common utils is empty ( catalog name ) & & ! common utils equal objects ( schema name , selected object get name ( ) ) ) { / / we search for schema and active object is schema let ' s search our schema in catalog selected object = selected object get parent object ( ) ; } if ( selected object instanceof d b s schema & & common utils equal objects ( schema name , selected object get name ( ) ) | | selected object instanceof d b s catalog & & common utils equal objects ( catalog name , selected object get name ( ) ) ) { / / selected object is a catalog or schema which is also specified as catalog name / schema name - sc = selected object ; } else { sc = ( ( d b s object container ) selected object ) get child ( monitor , container name ) ; } } if ( ! ( sc instanceof d b s object container ) ) { return null ; } } root s c = ( d b s object container ) sc ; } if ( object name = = null ) { return root s c ; } final d b s object object = root s c get child ( monitor , object name ) ; if ( object instanceof d b s entity ) { return object ; } else { / / child is not an entity may be catalog / schema names was omitted / / try to use selected object d b s object selected object = d b utils get selected object ( execution context ) ; if ( selected object instanceof d b s object container ) { return ( ( d b s object container ) selected object ) get child ( monitor , object name ) ; } / / table container not found return object ; } }


yui internally partially relies on set timeoutset interval when we add a new chunk of html to the page so wait for the completion of it to see where such asynchronous activity is happening , set a breakpoint to { @ link java script job manager impl # add job ( java script job , page ) } and look at the call stack also see { @ link # js debugger } at that time to see the java script callstack

private void wait for java script ( html page p ) { p get enclosing window ( ) get job manager ( ) wait for jobs starting before ( 500 ) ; }


{ @ code simple evaluation context } does not support use of type references

public type locator get type locator ( ) { return type not found type locator ; }


initializes the reduce - part of the job with the appropriate output settings

public static void set output ( job job , string table name , int field count ) throws i o exception { d b configuration db conf = set output ( job , table name ) ; db conf set output field count ( field count ) ; }


test case where a bunch of threads are both appending and flushing they all finish before the file is closed

public void test multiple hflushers repl 1 ( ) throws exception { do test multiple hflushers ( 1 ) ; }


returns whether the object is the primary label at the address

public final boolean is primary ( ) { return is primary ; }


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


mapping is logically " equal " to handle mapped with path attribute ( )

public void handle mapped with same path and value attributes ( ) { }


bind { @ link job property } s to url spaces

public job property get property ( string class name ) { for ( job property p : properties ) if ( p get class ( ) get name ( ) equals ( class name ) ) return p ; return null ; }


returns a nonempty contiguous set containing all { @ code long } values from { @ code lower } ( inclusive ) to { @ code upper } ( inclusive ) ( these are the same values contained in { @ code range closed ( lower , upper ) } )

public static contiguous set < long > closed ( long lower , long upper ) { return create ( range closed ( lower , upper ) , discrete domain longs ( ) ) ; }


return the default value of the property

public string to default value ( schema p ) { if ( model utils is boolean schema ( p ) ) { if ( p get default ( ) ! = null ) { return p get default ( ) to string ( ) ; } } else if ( model utils is date schema ( p ) ) { if ( p get default ( ) ! = null ) { return " \ " " + p get default ( ) to string ( ) + " \ " " ; } } else if ( model utils is date time schema ( p ) ) { if ( p get default ( ) ! = null ) { return " \ " " + p get default ( ) to string ( ) + " \ " " ; } } else if ( model utils is number schema ( p ) ) { if ( p get default ( ) ! = null ) { if ( model utils is float schema ( p ) ) { / / float return p get default ( ) to string ( ) + " f " ; } else if ( model utils is double schema ( p ) ) { / / double return p get default ( ) to string ( ) + " d " ; } else { / / decimal return p get default ( ) to string ( ) + " m " ; } } } else if ( model utils is integer schema ( p ) ) { if ( p get default ( ) ! = null ) { return p get default ( ) to string ( ) ; } } else if ( model utils is string schema ( p ) ) { if ( p get default ( ) ! = null ) { string default = ( string ) p get default ( ) ; if ( p get enum ( ) = = null ) { return " \ " " + default + " \ " " ; } else { / / convert to enum var name later in post process models return default ; } } } return null ; }


public boolean is call ( ) { return false ; }


get a configured instance of the give class specified by the given configuration key if the object implements configurable configure it using the configuration

public < t > t get configured instance ( string key , class < t > t ) { return get configured instance ( key , t , collections empty map ( ) ) ; }


return whether the binding has a value associated with it


returns the most recent snapshot available of the playlist referenced by the provided { @ link uri }

hls media playlist get playlist snapshot ( uri url , boolean is for playback ) ;


adds the deprecated key to the global deprecation map when no custom message is provided it does not override any existing entries in the deprecation map this is to be used only by the developers in order to add deprecation of keys , and attempts to call this method after loading resources once , would lead to < tt > unsupported operation exception < tt > if a key is deprecated in favor of multiple keys , they are all treated as aliases of each other , and setting any one of them resets all the others to the new value if you have multiple deprecation entries to add , it is more efficient to use # add deprecations ( deprecation delta [ ] deltas ) instead

public static void add deprecation ( string key , string [ ] new keys ) { add deprecation ( key , new keys , null ) ; }


take a simple path like " something " and turn it into a qualified path against the test fs

protected path absolutepath ( string filepath ) throws i o exception { return get file system ( ) make qualified ( new path ( filepath ) ) ; }


resolve the bean class for the specified bean definition , resolving a bean class name into a class reference ( if necessary ) and storing the resolved class in the bean definition for further use

protected class < ? > resolve bean class ( root bean definition mbd , string bean name , class < ? > types to match ) throws cannot load bean class exception { try { if ( mbd has bean class ( ) ) { return mbd get bean class ( ) ; } if ( system get security manager ( ) ! = null ) { return access controller do privileged ( ( privileged exception action < class < ? > > ) ( ) - > do resolve bean class ( mbd , types to match ) , get access control context ( ) ) ; } else { return do resolve bean class ( mbd , types to match ) ; } } catch ( privileged action exception pae ) { class not found exception ex = ( class not found exception ) pae get exception ( ) ; throw new cannot load bean class exception ( mbd get resource description ( ) , bean name , mbd get bean class name ( ) , ex ) ; } catch ( class not found exception ex ) { throw new cannot load bean class exception ( mbd get resource description ( ) , bean name , mbd get bean class name ( ) , ex ) ; } catch ( linkage error err ) { throw new cannot load bean class exception ( mbd get resource description ( ) , bean name , mbd get bean class name ( ) , err ) ; } }


sets the settings to be updated ( either json or yaml format )

public update settings request builder set settings ( string source , x content type x content type ) { request settings ( source , x content type ) ; return this ; }


check whether a group name is a name of a framework group ( including the filesystem group )

public static synchronized boolean is framework group ( string name ) { return s 2i get ( name ) ! = null | | name equals ( fs group name ) ; }


return the { @ link cache manager } that this instance uses

public cache manager get cache manager ( ) { assert state ( this cache manager ! = null , " no cache manager set " ) ; return this cache manager ; }


enter a parse tree produced by the { @ code numeric literal } labeled alternative in { @ link eql base parser # constant }

void enter numeric literal ( eql base parser numeric literal context ctx ) ;


force the app to behave as if it is in a country where signal is censored

public synchronized boolean forced censorship ( ) { return feature flags internal user ( ) & & get boolean ( force censorship , false ) ; }


is the middle of piece on the upperleft side of the board with a given offset and size of the piece ? this only checks in one dimension

private static boolean is side ( int offset , int shape size , int board ) { return 2 * offset + shape size < = board ; }


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


return the name of the request context attribute for all views , if any

protected string get request context attribute ( ) { return this request context attribute ; }


test { @ link file system # list located status ( path ) } on a complex directory tree

protected void check list located status status complex dir ( tree scan results tree ) throws throwable { describe ( " expect list located status to list all entries in top dir only " ) ; file system fs = get file system ( ) ; tree scan results listing = new tree scan results ( fs list located status ( tree get base path ( ) ) ) ; listing assert size equals ( " list located status ( ) " , tree files , tree width , 0 ) ; verify file stats ( fs list located status ( tree get base path ( ) ) ) ; / / list located status and list status must return the same files tree scan results list status = new tree scan results ( fs list status ( tree get base path ( ) ) ) ; listing assert equivalent ( list status ) ; / / now check without using list < located file status > status through next = to list through next calls alone ( fs list located status ( tree get base path ( ) ) ) ; tree scan results results through next = new tree scan results ( status through next ) ; list status assert fields equivalent ( " files " , listing , list status get files ( ) , results through next get files ( ) ) ; }


get ( and assign if needed ) the id associated with the specified calling convention name

byte get calling convention i d ( string name ) throws invalid input exception , i o exception { if ( name = = null | | name equals ( function unknown calling convention string ) ) { return calling convention d b adapter unknown calling convention id ; } else if ( name equals ( function default calling convention string ) ) { return calling convention d b adapter default calling convention id ; } byte id = calling convention name to i d map get ( name ) ; if ( id ! = null ) { return id ; } compiler spec compiler spec = program get compiler spec ( ) ; prototype model calling convention = compiler spec get calling convention ( name ) ; if ( calling convention = = null ) { throw new invalid input exception ( " invalid calling convention name : " + name ) ; } d b record record = calling convention adapter get calling convention record ( name ) ; if ( record = = null ) { record = calling convention adapter create calling convention record ( name ) ; } byte new id = record get key field ( ) get byte value ( ) ; calling convention i d to name map put ( new id , name ) ; calling convention name to i d map put ( name , new id ) ; return new id ; }


post - multiplies this matrix by a rotation toward a target

public matrix 4 rotate toward target ( final vector 3 target , final vector 3 up ) { tmp vec set ( target x - val [ m03 ] , target y - val [ m13 ] , target z - val [ m23 ] ) ; return rotate toward direction ( tmp vec , up ) ; }


object argument that is reflection - equal to the given value with support for excluding selected fields from a class this matcher can be used when equals ( ) is not implemented on compared objects matcher uses java reflection api to compare fields of wanted and actual object works similarly to < code > equals builder reflection equals ( this , other , exclude fields ) < code > from apache commons library < b > warning < b > the equality check is shallow ! see examples in javadoc for { @ link argument matchers } class

public static < t > t ref eq ( t value , string exclude fields ) { report matcher ( new reflection equals ( value , exclude fields ) ) ; return null ; }


location to write api files you can use the api package ( ) as defined when the class is instantiated

public string api file folder ( ) { return output folder + file separator + source folder + file separator + api package ( ) replace ( ' ' , file separator char ) ; }


returns a string representation of this location

public string to string ( ) { return super to string ( ) + " , function name : " + function name ; }


checksums all complete data chunks and flushes them to the underlying stream if there is a trailing partial chunk , it is not flushed and is maintained in the buffer

public void flush ( ) throws i o exception { flush buffer ( false , false ) ; }


get the list of incompatible dependencies ( if there are any , as determined by is needed dependencies compatible with installed version )

public list < plugin > get dependencies incompatible with installed version ( plugin manager metadata cache cache ) { return cache of ( " get dependencies incompatible with installed version : " + name , list class , ( ) - > { list < plugin > incompatible plugins = new array list < > ( ) ; for ( plugin p : get needed dependencies ( ) ) { if ( ! p is compatible with installed version ( ) | | ! p is needed dependencies compatible with installed version ( ) ) { incompatible plugins add ( p ) ; } } return incompatible plugins ; } ) ; }


public api response < pet > get pet by id with http info ( long pet id ) throws api exception { object local var post body = null ; / / verify the required parameter ' pet id ' is set if ( pet id = = null ) { throw new api exception ( 400 , " missing the required parameter ' pet id ' when calling get pet by id " ) ; } / / create path and map variables string local var path = " / pet / { pet id } " replace all ( " \ \ { " + " pet id " + " \ \ } " , api client escape string ( pet id to string ( ) ) ) ; / / query params list < pair > local var query params = new array list < pair > ( ) ; map < string , string > local var header params = new hash map < string , string > ( ) ; map < string , string > local var cookie params = new hash map < string , string > ( ) ; map < string , object > local var form params = new hash map < string , object > ( ) ; final string [ ] local var accepts = { " application / xml " , " application / json " } ; final string local var accept = api client select header accept ( local var accepts ) ; final string [ ] local var content types = { } ; final string local var content type = api client select header content type ( local var content types ) ; string [ ] local var auth names = new string [ ] { " api key " } ; generic type < pet > local var return type = new generic type < pet > ( ) { } ; return api client invoke a p i ( " pet api get pet by id " , local var path , " get " , local var query params , local var post body , local var header params , local var cookie params , local var form params , local var accept , local var content type , local var auth names , local var return type , false ) ; }


returns an immutable array containing the given values , in order

public static immutable long array copy of ( collection < long > values ) { return values is empty ( ) ? empty : new immutable long array ( longs to array ( values ) ) ; }


imports dwarf information according to the { @ link d w a r f import options } set { @ link d w a r f program # check preconditions ( task monitor ) } must be called before this

public d w a r f import summary parse ( ) throws i o exception , d w a r f exception , cancelled exception { monitor set indeterminate ( false ) ; monitor set show progress value ( true ) ; long start ts = system current time millis ( ) ; if ( import options is import data types ( ) ) { dwarf d t m import all data types ( monitor ) ; prog get ghidra program ( ) flush events ( ) ; import summary data type elapsed m s = system current time millis ( ) - start ts ; } if ( import options is import funcs ( ) ) { long funcstart ts = system current time millis ( ) ; d w a r f function importer dfi = new d w a r f function importer ( prog , dwarf d t m , import options , import summary , monitor ) ; dfi import functions ( ) ; import summary funcs elapsed m s = system current time millis ( ) - funcstart ts ; } if ( import options is organize types by source file ( ) ) { move types into source folders ( ) ; } import summary total elapsed m s = system current time millis ( ) - start ts ; return import summary ; }


get the value of the ' { @ code onmousemove } ' attribute may be a runtime expression

protected string get onmousemove ( ) { return this onmousemove ; }


public void add plugins ( string [ ] class names ) throws plugin exception { try { plugin mgr add plugins ( class names ) ; } finally { set config changed ( true ) ; } }


removes all but the base acl entries of files and directories the entries for user , group , and others are retained for compatibility with permission bits

public void remove acl ( final path path ) throws i o exception { statistics increment write ops ( 1 ) ; adl client remove all acls ( to relative file path ( path ) ) ; }


sets the matrix to a rotation matrix representing the quaternion

public matrix 4 set ( quaternion quaternion ) { return set ( quaternion x , quaternion y , quaternion z , quaternion w ) ; }


create an inet socket address from the given target string and default port if the string cannot be parsed correctly , the < code > config name < code > parameter is used as part of the exception message , allowing the user to better diagnose the misconfiguration

public static inet socket address create socket addr ( string target , int default port , string config name , boolean use cache if present ) { string help text = " " ; if ( config name ! = null ) { help text = " ( configuration property ' " + config name + " ' ) " ; } if ( target = = null ) { throw new illegal argument exception ( " target address cannot be null " + help text ) ; } target = target trim ( ) ; boolean has scheme = target contains ( " : / / " ) ; uri uri = create u r i ( target , has scheme , help text , use cache if present ) ; string host = uri get host ( ) ; int port = uri get port ( ) ; if ( port = = - 1 ) { port = default port ; } string path = uri get path ( ) ; if ( ( host = = null ) | | ( port < 0 ) | | ( ! has scheme & & path ! = null & & ! path is empty ( ) ) ) { throw new illegal argument exception ( " does not contain a valid host : port authority : " + target + help text ) ; } return create socket addr for host ( host , port ) ; }


confirm that we don ' t send the proxy - authorization header from the request to the proxy server we used to have that behavior but it is problematic because unrelated requests end up sharing credentials worse , that approach leaks proxy credentials to the origin server

@ test public void no preemptive proxy authorization ( ) throws exception { server use https ( handshake certificates ssl socket factory ( ) , true ) ; server enqueue ( new mock response ( ) set socket policy ( socket policy upgrade to ssl at end ) clear headers ( ) ) ; server enqueue ( new mock response ( ) set body ( " response body " ) ) ; client = client new builder ( ) ssl socket factory ( handshake certificates ssl socket factory ( ) , handshake certificates trust manager ( ) ) proxy ( server to proxy address ( ) ) hostname verifier ( new recording hostname verifier ( ) ) build ( ) ; request request = new request builder ( ) url ( " https : / / android com / foo " ) header ( " proxy - authorization " , " password " ) build ( ) ; response response = client new call ( request ) execute ( ) ; assert that ( response body ( ) string ( ) ) is equal to ( " response body " ) ; recorded request connect 1 = server take request ( ) ; assert that ( connect 1 get header ( " proxy - authorization " ) ) is null ( ) ; recorded request connect 2 = server take request ( ) ; assert that ( connect 2 get header ( " proxy - authorization " ) ) is equal to ( " password " ) ; }


test block manager won ' t leave safe mode if there are blocks with generation stamp ( gs ) in future

public void test stay in safe mode when bytes in future ( ) throws exception { bm safe mode activate ( block total ) ; / / inject blocks with future gs inject blocks with fugure g s ( 100l ) ; assert equals ( 100l , bm safe mode get bytes in future ( ) ) ; / / safe blocks are enough set block safe ( block threshold ) ; / / pending threshold - > extension bm safe mode check safe mode ( ) ; assert false ( " shouldn ' t leave safe mode in case of blocks with future gs ! " , bm safe mode leave safe mode ( false ) ) ; assert true ( " leaving safe mode forcefully should succeed regardless of " + " blocks with future gs " , bm safe mode leave safe mode ( true ) ) ; assert equals ( " number of blocks with future gs should have been cleared " + " after leaving safe mode " , 0l , bm safe mode get bytes in future ( ) ) ; assert true ( " leaving safe mode should succeed after blocks with future gs " + " are cleared " , bm safe mode leave safe mode ( false ) ) ; }


deserializes the pub sub record can output multiple records through the { @ link collector } note that number and size of the produced records should be relatively small depending on the source implementation records can be buffered in memory or collecting records might delay emitting checkpoint barrier

default void deserialize ( pubsub message message , collector < t > out ) throws exception { t deserialized = deserialize ( message ) ; if ( deserialized ! = null ) { out collect ( deserialized ) ; } }


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

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


private s get node internal ( k key , n namespace ) { memory segment key segment = get key segment ( key , namespace ) ; int key len = key segment size ( ) ; return get node ( key segment , 0 , key len ) ; }


read the given byte buffer from its current position to its limit into a byte array

public static byte [ ] to array ( byte buffer buffer ) { return to array ( buffer , 0 , buffer remaining ( ) ) ; }


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

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


promotes the entry to the protected region ' s mru position , demoting an entry if necessary

private void on probation hit ( node node ) { node remove ( ) ; node status = status protected ; node append to tail ( head protected ) ; size protected + + ; demote protected ( ) ; }


specify a prefix to use for the attribute names in the backend session default is to use no prefix , storing the session attributes with the same name as in the model

public void set attribute name prefix ( @ nullable string attribute name prefix ) { this attribute name prefix = ( attribute name prefix ! = null ? attribute name prefix : " " ) ; }


get the { @ code class } reference for the actual annotation type


use for report or some work at the beginning of tinker patch service { @ code tinker patch service on handle intent } begin

public void on patch service start ( intent intent ) { share tinker log i ( tag , " patch reporter on patch service start : patch service start " ) ; should retry = false ; upgrade patch retry get instance ( context ) on patch service start ( intent ) ; }


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


print the client list into log for confirm how many clients built

private void print remote client list ( ) { if ( logger is debug enabled ( ) ) { string builder addresses = new string builder ( ) ; this using clients for each ( client - > addresses append ( client get address ( ) to string ( ) ) append ( " , " ) ) ; logger debug ( " remote client list : { } " , addresses ) ; } }


returns true if the given path is parented by a module root directory for example , given a module path of < code > somedirfeaturescool module < code > , then this method will return true for these paths : < br > < br > < code > somedirfeaturescool module < code > < br > < code > somedirfeaturescool modulesomechilddir < code > < br > < br > and false for these paths : < br > < br > < code > somerandompath < code > < br > < code > somedirfeatures < code >

public static boolean is in module ( string path name ) { return get module ( path name ) ! = null ; }


removes \ \ r characters from query actually this is done specially for oracle due to some bug in it ' s driver

public static string make unified line feeds ( d b p data source data source , string query ) { s q l dialect dialect = s q l utils get dialect from data source ( data source ) ; if ( ! dialect is c r l f broken ( ) ) { return query ; } if ( query index of ( ' \ r ' ) = = - 1 ) { return query ; } string builder result = new string builder ( query length ( ) ) ; for ( int i = 0 ; i < query length ( ) ; i + + ) { char c = query char at ( i ) ; if ( c = = ' \ r ' ) { continue ; } result append ( c ) ; } return result to string ( ) ; }


opens an f s data input stream at the indicated path using default buffersize

public f s data input stream open ( final path f ) throws access control exception , file not found exception , unsupported file system exception , i o exception { final path abs f = fix relative part ( f ) ; return new f s link resolver < f s data input stream > ( ) { @ override public f s data input stream next ( final abstract file system fs , final path p ) throws i o exception , unresolved link exception { return fs open ( p ) ; } } resolve ( this , abs f ) ; }


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


returns the thread local storage directory

public t l s directory get t l s directory ( ) { return tls ; }


public retention lease stats get retention lease stats ( ) { return retention lease stats ; }


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


if set to true and no custom { @ link object mapper } has been set , a { @ link xml mapper } will be created using its default constructor

public void set create xml mapper ( boolean create xml mapper ) { this builder create xml mapper ( create xml mapper ) ; }


returns the major part of the given class version number

public static int internal major class version ( int class version ) { return class version > > > 16 ; }


returns the { @ link synchronization context } where { @ link # start ( listener 2 ) } , { @ link # shutdown } and { @ link # refresh } are run from

public synchronization context get synchronization context ( ) { return sync context ; }


returns a comparable value for a qualifier < p > this method takes into account the ordering of known qualifiers then unknown qualifiers with lexical ordering < p > just returning an integer with the index here is faster , but requires a lot of ifthenelse to check for - 1 or qualifiers size and then resort to lexical ordering most comparisons are decided by the first character , so this is still fast if more characters are needed then it requires a lexical sort anyway

static string comparable qualifier ( string qualifier ) { int i = qualifiers index of ( qualifier ) ; return i = = - 1 ? ( qualifiers size ( ) + " - " + qualifier ) : string value of ( i ) ; }


creates a new driver instance the specified capabilities are to be passed to the driver constructor

web driver new instance ( capabilities capabilities ) ;


called from { @ link # on intercept touch event ( motion event ) } to determine how touch events should be intercepted

result on intercept touch event ( recycler view recycler view , motion event ev ) ;


crosses an element over to the opposite heap by moving it one level down ( or up if there are no elements below it ) returns the new position of the element

int cross over ( int index , e x ) { int min child index = find min child ( index ) ; / / todo ( kevinb ) : split the & & into two if ' s and move cross over up so it ' s / / only called when there ' s no child if ( ( min child index > 0 ) & & ( ordering compare ( element data ( min child index ) , x ) < 0 ) ) { queue [ index ] = element data ( min child index ) ; queue [ min child index ] = x ; return min child index ; } return cross over up ( index , x ) ; }


put user { username } : updated user this can only be done by the logged in user

default response entity < void > update user ( string username , user body ) { return new response entity < > ( http status not implemented ) ; }


get a required annotation array attribute value from the annotation

< t extends annotation > merged annotation < t > [ ] get annotation array ( string attribute name , class < t > type ) throws no such element exception ;


public map < string , cookie > cookies ( ) { return context ( ) request context ( ) cookies ( ) ; }


important : this method is for testing only it allows us to set a " type " record for a particular record number

public boolean set type record ( int record number , abstract ms type type ) { return type program interface set record ( record number , type ) ; }


returns the file extensions that the loader supports ( excluding the ' ' )

public string [ ] get file extensions ( ) { return new string [ ] { " xml " } ; }


indicate that source should be returned , with an " include " andor " exclude " set which can include simple wildcard elements

public update request builder set fetch source ( @ nullable string [ ] includes , @ nullable string [ ] excludes ) { request fetch source ( includes , excludes ) ; return this ; }


get a copy of the map ( for diagnostics )

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


static long parse size ( string arg ) { string [ ] args = arg split ( " \ \ d " , 2 ) ; / / get digits assert args length < = 2 ; long nr bytes = long parse long ( args [ 0 ] ) ; string bytes mult = arg substring ( args [ 0 ] length ( ) ) ; / / get byte multiple return nr bytes * byte multiple parse string ( bytes mult ) value ( ) ; }


copies the contents of src to dst , starting from src [ src offset ] , copying num elements elements the { @ link buffer } instance ' s { @ link buffer # position ( ) } is used to define the offset into the buffer itself the position and limit will stay the same < b > the buffer must be a direct buffer with native byte order no error checking is performed < b >

public static void copy ( float [ ] src , int src offset , int num elements , buffer dst ) { float buffer buffer = as float buffer ( dst ) ; int old position = buffer position ( ) ; buffer put ( src , src offset , num elements ) ; buffer position ( old position ) ; }


sets the last modification and change times to the current time

protected synchronized void mark modification time ( ) { preconditions check state ( clock ! = null ) ; last modified time = clock current time millis ( ) ; last change time = last modified time ; }