ensure there ' s no query limit problem around links

@ test protected void many links ( ) throws exception { int count = 1000 ; / / larger than 10 , which is the default es search limit that tripped this list < span > spans = new array list < > ( count ) ; for ( int i = 1 ; i < = count ; i + + ) { string trace id = new trace id ( ) ; endpoint web = frontend to builder ( ) service name ( " web - " + i ) build ( ) ; endpoint app = backend to builder ( ) service name ( " app - " + i ) build ( ) ; endpoint db = db to builder ( ) service name ( " db - " + i ) build ( ) ; spans add ( span new builder ( ) trace id ( trace id ) id ( " 10 " ) name ( " get " ) timestamp ( ( today + 50l ) * 1000l ) duration ( 250l * 1000l ) kind ( kind client ) local endpoint ( web ) build ( ) ) ; spans add ( span new builder ( ) trace id ( trace id ) id ( " 10 " ) name ( " get " ) shared ( true ) timestamp ( ( today + 100 ) * 1000l ) duration ( 150 * 1000l ) kind ( kind server ) local endpoint ( app ) build ( ) ) ; spans add ( span new builder ( ) trace id ( trace id ) parent id ( " 10 " ) id ( " 11 " ) name ( " get " ) timestamp ( ( today + 150l ) * 1000l ) duration ( 50l * 1000l ) kind ( kind client ) local endpoint ( app ) remote endpoint ( db ) build ( ) ) ; } process dependencies ( spans ) ; list < dependency link > links = store ( ) get dependencies ( end ts ( spans ) , day ) execute ( ) ; assert that ( links ) has size ( count * 2 ) ; / / web - ? - > app - ? , app - ? - > db - ? assert that ( links ) extracting ( dependency link : : call count ) all satisfy ( call count - > assert that ( call count ) is equal to ( 1 ) ) ; }


returns a formatted string representing the given class id including a handle

public string get string for net cls class id ( int class id ) { return string format ( format net cls class id , root qdisc handle , class id ) ; }


create window function instance using the supplied arguments the inputs have already validated

protected abstract window function new window function ( list < integer > inputs , boolean ignore nulls ) ;


positions the listing panel to the given address

public boolean go to ( address addr ) { program p = get program ( ) ; if ( p ! = null ) { return go to ( new program location ( p , addr ) ) ; } return false ; }


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


registers a { @ link org apache flink metrics counter } with flink

< c extends counter > c counter ( string name , c counter ) ;


assign the generated id value to { @ link lite pal support # base obj id } this value will be used as identify of this model for system use

protected void give base obj id value ( lite pal support base obj , long id ) throws security exception , no such field exception , illegal argument exception , illegal access exception { if ( id > 0 ) { dynamic executor set ( base obj , " base obj id " , id , lite pal support class ) ; } }


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


gets called by { @ code hibernate template execute } with an active hibernate { @ code session } does not need to care about activating or closing the { @ code session } , or handling transactions allows for returning a result object created within the callback , i e a domain object or a collection of domain objects a thrown custom runtime exception is treated as an application exception : it gets propagated to the caller of the template

t do in hibernate ( session session ) throws hibernate exception ;


creates invalidate api key request for given api key ids

public static invalidate api key request using api key ids ( list < string > api key ids , boolean owned by authenticated user ) { return new invalidate api key request ( null , null , null , owned by authenticated user , api key ids ) ; }


like { @ code scratch file } , but the lines are added to the end if the file already exists

public path append file ( string path name , string lines ) throws i o exception { return append file ( path name , default charset , lines ) ; }


list of necessary resources to perform the build of this project

public resource list get resource list ( ) { final set < resource activity > resource activities = get resource activities ( ) ; final list < resource list > resource lists = new array list < > ( 1 + resource activities size ( ) ) ; for ( resource activity activity : resource activities ) { if ( activity ! = this & & activity ! = null ) { / / defensive infinite recursion and null check resource lists add ( activity get resource list ( ) ) ; } } return resource list union ( resource lists ) ; }


remove all elements from the set and return them clear the entries

public list < t > poll all ( ) { list < t > ret list = new array list < t > ( size ) ; for ( int i = 0 ; i < entries length ; i + + ) { linked element < t > current = entries [ i ] ; while ( current ! = null ) { ret list add ( current element ) ; current = current next ; } } this clear ( ) ; return ret list ; }


get a suffix for the user agent suffix of http requests , which can be used to identify the principal making abfs requests if the adaptee is a bound d t extension , it is queried for a ua suffix ; otherwise " " is returned

public string get user agent suffix ( ) { string suffix = extension helper get user agent suffix ( adaptee , " " ) ; return suffix ! = null ? suffix : " " ; }


execute a query against influx d b with a ` select count ( ) ` statement and return the count only

public int get counter ( query query ) throws i o exception { query result series series = query for single series ( query ) ; if ( log is debug enabled ( ) ) { log debug ( " sql : { } result : { } " , query get command ( ) , series ) ; } if ( objects is null ( series ) ) { return 0 ; } return ( ( number ) series get values ( ) get ( 0 ) get ( 1 ) ) int value ( ) ; }


public client get client ( ) { return client ; }


the node i ds are assigned in graph - traversal order ( pre - order ) , hence , each list is sorted by id in ascending order and all consecutive lists start with i ds in ascending order

protected final boolean merge lists ( list < unclosed branch descriptor > child 1open , list < unclosed branch descriptor > child 2open , list < unclosed branch descriptor > result , boolean mark joined branches as pipeline breaking ) { / / remove branches which have already been closed remove closed branches ( child 1open ) ; remove closed branches ( child 2open ) ; result clear ( ) ; / / check how many open branches we have the cases : / / 1 ) if both are null or empty , the result is null / / 2 ) if one side is null ( or empty ) , the result is the other side / / 3 ) both are set , then we need to merge if ( child 1open = = null | | child 1open is empty ( ) ) { if ( child 2open ! = null & & ! child 2open is empty ( ) ) { result add all ( child 2open ) ; } return false ; } if ( child 2open = = null | | child 2open is empty ( ) ) { result add all ( child 1open ) ; return false ; } int index 1 = child 1open size ( ) - 1 ; int index 2 = child 2open size ( ) - 1 ; boolean did close a branch = false ; / / as both lists ( child 1open and child 2open ) are sorted in ascending id order / / we can do a merge - join - like loop which preserved the order in the result list / / and eliminates duplicates while ( index 1 > = 0 | | index 2 > = 0 ) { int id 1 = - 1 ; int id 2 = index 2 > = 0 ? child 2open get ( index 2 ) get branching node ( ) get id ( ) : - 1 ; while ( index 1 > = 0 & & ( id 1 = child 1open get ( index 1 ) get branching node ( ) get id ( ) ) > id 2 ) { result add ( child 1open get ( index 1 ) ) ; index 1 - - ; } while ( index 2 > = 0 & & ( id 2 = child 2open get ( index 2 ) get branching node ( ) get id ( ) ) > id 1 ) { result add ( child 2open get ( index 2 ) ) ; index 2 - - ; } / / match : they share a common branching child if ( id 1 = = id 2 ) { did close a branch = true ; / / if this is the latest common child , remember it optimizer node curr banching node = child 1open get ( index 1 ) get branching node ( ) ; long vector 1 = child 1open get ( index 1 ) get joined paths vector ( ) ; long vector 2 = child 2open get ( index 2 ) get joined paths vector ( ) ; / / check if this is the same descriptor , ( meaning that it contains the same paths ) / / if it is the same , add it only once , otherwise process the join of the paths if ( vector 1 = = vector 2 ) { result add ( child 1open get ( index 1 ) ) ; } else { / / we merge ( re - join ) a branch / / mark the branch as a point where we break the pipeline if ( mark joined branches as pipeline breaking ) { curr banching node mark all outgoing connections as pipeline breaking ( ) ; } if ( this here joined branches = = null ) { this here joined branches = new array list < optimizer node > ( 2 ) ; } this here joined branches add ( curr banching node ) ; / / see , if this node closes the branch long joined inputs = vector 1 | vector 2 ; / / this is 2 ^ size - 1 , which is all bits set at positions 0 size - 1 long all inputs = ( 0x 1 l < < curr banching node get outgoing connections ( ) size ( ) ) - 1 ; if ( joined inputs = = all inputs ) { / / closed - we can remove it from the stack add closed branch ( curr banching node ) ; } else { / / not quite closed result add ( new unclosed branch descriptor ( curr banching node , joined inputs ) ) ; } } index 1 - - ; index 2 - - ; } } / / merged now we need to reverse the list , because we added the elements in reverse order collections reverse ( result ) ; return did close a branch ; }


public string get property class ( ) { return property class ; }


public static int get app type ( ) { return app type ; }


return an independent advisor chain we need to do this every time a new prototype instance is returned , to return distinct instances of prototype advisors and advices

private list < advisor > fresh advisor chain ( ) { advisor [ ] advisors = get advisors ( ) ; list < advisor > fresh advisors = new array list < > ( advisors length ) ; for ( advisor advisor : advisors ) { if ( advisor instanceof prototype placeholder advisor ) { prototype placeholder advisor pa = ( prototype placeholder advisor ) advisor ; if ( logger is debug enabled ( ) ) { logger debug ( " refreshing bean named ' " + pa get bean name ( ) + " ' " ) ; } / / replace the placeholder with a fresh prototype instance resulting from a get bean lookup if ( this bean factory = = null ) { throw new illegal state exception ( " no bean factory available anymore ( probably due to " + " serialization ) - cannot resolve prototype advisor ' " + pa get bean name ( ) + " ' " ) ; } object bean = this bean factory get bean ( pa get bean name ( ) ) ; advisor refreshed advisor = named bean to advisor ( bean ) ; fresh advisors add ( refreshed advisor ) ; } else { / / add the shared instance fresh advisors add ( advisor ) ; } } return fresh advisors ; }


return the original sql input by the upper application


transports with no native cross - domain communication ( e g " eventsource " , " htmlfile " ) must get a simple page from the " foreign " domain in an invisible iframe so that code in the iframe can run from a domain local to the sock j s server since the iframe needs to load the sock j s javascript client library , this property allows specifying where to load it from by default this is set to point to " https : cdn jsdelivr netsockjs 1 0 0sockjs min js " however , it can also be set to point to a url served by the application note that it ' s possible to specify a relative url in which case the url must be relative to the iframe url for example assuming a sock j s endpoint mapped to " sockjs " , and resulting iframe url " sockjsiframe html " , then the the relative url must start with " " to traverse up to the location above the sock j s mapping in case of a prefix - based servlet mapping one more traversal may be needed

public void set sock js client library url ( string client library url ) { this client library url = client library url ; }


if the value is an item , this is set < code > optional aapt pb item item = 4 ; < code >

public builder set item ( com android aapt resources item value ) { copy on write ( ) ; instance set item ( value ) ; return this ; }


fixup all composites and thier components which may be affected by a data organization change include primitive type size changes and alignment changes it is highly recommended that this program be open with exclusive access before invoking this method to avoid excessive merge conflicts with other users

public void fixup composites ( task monitor monitor ) throws cancelled exception { lock acquire ( ) ; try { / / note : any composite could be indirectly affected by a component size change / / based upon type relationships / / note : composites brought in from archive may have incorrect component size / / if not aligned and should not be used to guage a primitive size change / / unfortunately parent table does not track use of primitives so a brute / / force search is required since all composites must be checked , this / / is combined with the composite graph generation to get ordered list / / of composites for subsequent size change operation list < composite d b > ordered composites = get all composites in post dependency order ( monitor ) ; monitor set progress ( 0 ) ; monitor set maximum ( ordered composites size ( ) ) ; monitor set message ( " updating datatype sizes " ) ; int count = 0 ; for ( composite d b c : ordered composites ) { monitor check canceled ( ) ; c fixup components ( ) ; monitor set progress ( + + count ) ; } } finally { lock release ( ) ; } }


private void assert no record ( metadata store ms , string path ) throws i o exception { assertions assert that ( lookup ( ms , path ) ) described as ( " metastore entry for % s " , path ) is null ( ) ; }


set the job conf path in staging dir on hdfs

void put job conf path ( string conf path ) { job conf path = conf path ; }


adds { @ code edge } connecting { @ code node u } to { @ code node v } if the graph is directed , { @ code edge } will be directed in this graph ; otherwise , it will be undirected < b > { @ code edge } must be unique to this graph < b > , just as a { @ code map } key must be it must also be non - null if { @ code node u } and { @ code node v } are not already present in this graph , this method will silently { @ link # add node ( object ) add } { @ code node u } and { @ code node v } to the graph if { @ code edge } already connects { @ code node u } to { @ code node v } ( in the specified order if this network { @ link # is directed ( ) } , else in any order ) , then this method will have no effect

boolean add edge ( n node u , n node v , e edge ) ;


answer whether this topic creation group is configured to allow the creation of the given {

public boolean matches ( string topic ) { return ! exclusion pattern matcher ( topic ) matches ( ) & & inclusion pattern matcher ( topic ) matches ( ) ; }


public float get scale y ( ) { return m scale y ; }


get the content of the response body as a { @ code string } , using the charset specified for the response by the application , either through { @ link http servlet response } methods or through a charset parameter on the { @ code content - type }

public string get content as string ( ) throws unsupported encoding exception { return ( this character encoding ! = null ? this content to string ( this character encoding ) : this content to string ( ) ) ; }


private static < t extends comparable < t > > void validate ( graph < t , null value , null value > graph , result result ) throws exception { result edge metrics = new edge metrics < t , null value , null value > ( ) run ( graph ) execute ( ) ; assert equals ( result , edge metrics ) ; }


true signals that the jobs run by the client wish to report progress the default value is false the default of false is good for clients that have a known amount of work to be processed in this case , a total count of work jobs is maintained by the queue as items are completed , the queue will update the monitor provided to it at construction time to reflect the number of jobs completed as work is done on the other hand , some clients have known known number of jobs to complete , but simply add work to the queue as it arrives in that case , the client should update its monitor for progress , as the queue cannot do so in a meaningful way

public concurrent q builder < i , r > set jobs report progress ( boolean reports progress ) { this jobs report progress = reports progress ; return this ; }


add one or more resource locations from which to serve static content each location must point to a valid directory multiple locations may be specified as a comma - separated list , and the locations will be checked for a given resource in the order specified for example , { { @ code " " } , { @ code " classpath : meta - i n fpublic - web - resources " } } allows resources to be served both from the web application root and from any jar on the classpath that contains a { @ code meta - i n fpublic - web - resources } directory , with resources in the web application root taking precedence

public resource handler registration add resource locations ( string resource locations ) { this location values add all ( arrays as list ( resource locations ) ) ; return this ; }


public label label ( ) { return label ; }


retrieve ( or create ) an interned hystrix command key instance for a given name

public static hystrix command key as key ( string name ) { return intern interned ( name ) ; }


expect that a rename will fail with an exception using the role f s

private access denied exception expect rename forbidden ( path src , path dest ) throws exception { try ( duration info ignored = new duration info ( log , true , " rename ( % s , % s ) " , src , dest ) ) { return forbidden ( " renaming " + src + " to " + dest , " " , ( ) - > { boolean result = role f s rename ( src , dest ) ; log error ( " rename should have been forbidden but returned { } " , result ) ; log error ( " source directory : \ n { } " , contract test utils ls ( get file system ( ) , src get parent ( ) ) ) ; log error ( " destination directory : \ n { } " , contract test utils ls ( get file system ( ) , src get parent ( ) ) ) ; return " rename unexpectedly returned " + result ; } ) ; } }


mostly used by logging to provide more readable messages

public final string get simple name ( ) { return m simple name ; }


public void add refresh listener ( translog location location , consumer < boolean > listener ) { final boolean read allowed ; if ( is read allowed ( ) ) { read allowed = true ; } else { / / check again under post recovery mutex this is important to create a happens before relationship / / between the switch to post recovery + associated refresh otherwise we may respond / / to a listener before a refresh actually happened that contained that operation synchronized ( post recovery mutex ) { read allowed = is read allowed ( ) ; } } if ( read allowed ) { refresh listeners add or notify ( location , listener ) ; } else { / / we ' re not yet ready fo ready for reads , just ignore refresh cycles listener accept ( false ) ; } }


replaces values whose keys are sensitive according to { @ link global configuration # is sensitive ( string ) } with { @ link global configuration # hidden content } this can be useful when displaying configuration values

public static map < string , string > hide sensitive values ( map < string , string > key value pairs ) { final hash map < string , string > result = new hash map < > ( ) ; for ( map entry < string , string > key value pair : key value pairs entry set ( ) ) { if ( global configuration is sensitive ( key value pair get key ( ) ) ) { result put ( key value pair get key ( ) , global configuration hidden content ) ; } else { result put ( key value pair get key ( ) , key value pair get value ( ) ) ; } } return result ; }


gets a 24 - bit medium integer at the current { @ code reader index } in the little endian byte order and increases the { @ code reader index } by { @ code 3 } in this buffer

public abstract int read medium l e ( ) ;


returns an immutable sorted multiset containing the given elements sorted by their natural ordering

public static < e extends comparable < ? super e > > immutable sorted multiset < e > of ( e e 1 , e e 2 , e e 3 ) { return copy of ( ordering natural ( ) , arrays as list ( e 1 , e 2 , e 3 ) ) ; }


read the csv input index , transform to length encoded values and pipe to the output stream if any of the expected fields in the analysis input index or if the expected time field is missing from the csv header a exception is thrown

public void write ( input stream input stream , categorization analyzer categorization analyzer , x content type x content type , bi consumer < data counts , exception > handler ) throws i o exception { csv preference csv pref = new csv preference builder ( data description get quote character ( ) , data description get field delimiter ( ) , new string ( new char [ ] { data description line ending } ) ) max lines per row ( max lines per record ) build ( ) ; data counts reporter start new incremental count ( ) ; try ( csv list reader csv reader = new csv list reader ( new input stream reader ( input stream , standard charsets utf 8 ) , csv pref ) ) { string [ ] header = csv reader get header ( true ) ; if ( header = = null ) { / / null if eo f handler accept ( data counts reporter incremental stats ( ) , null ) ; return ; } long input field count = math max ( header length - 1 , 0 ) ; / / time field doesn ' t count build field index mapping ( header ) ; int max index = 0 ; for ( integer index : in field indexes values ( ) ) { max index = math max ( index , max index ) ; } integer categorization field index = in field indexes get ( analysis config get categorization field name ( ) ) ; int num fields = output field count ( ) ; string [ ] record = new string [ num fields ] ; list < string > line ; while ( ( line = csv reader read ( ) ) ! = null ) { arrays fill ( record , " " ) ; if ( max index > = line size ( ) ) { logger warn ( " not enough fields in csv record , expected at least " + max index + " " + line ) ; for ( input output map in out : input output map ) { if ( in out input index > = line size ( ) ) { data counts reporter report missing field ( ) ; continue ; } string field = line get ( in out input index ) ; record [ in out output index ] = ( field = = null ) ? " " : field ; } } else { for ( input output map in out : input output map ) { string field = line get ( in out input index ) ; record [ in out output index ] = ( field = = null ) ? " " : field ; } } if ( categorization analyzer ! = null & & categorization field index ! = null & & categorization field index < line size ( ) ) { tokenize for categorization ( categorization analyzer , line get ( categorization field index ) , record ) ; } transform time and write ( record , input field count ) ; } data counts reporter finish reporting ( ) ; handler accept ( data counts reporter incremental stats ( ) , null ) ; } }


waits for the given condition to return true most of the < code > wait for condition ( ) < code > methods throw an { @ link assertion failed error } if the timeout period expires this method allows you to setup a longer wait period by repeatedly calling this method < p > most clients should use { @ link # wait for condition ( boolean supplier ) }

public static void wait for condition without failing ( boolean supplier supplier ) { wait for condition ( supplier , false / * fail on timeout * / , ( ) - > null / * failure message * / ) ; }


given an index pattern , checks whether it matches against the current shard if this shard represents a remote shard target , then in order to match the pattern contain the separator ' : ' , and must match on both the cluster alias and index name

public boolean test ( string pattern ) { int separator index = pattern index of ( remote cluster aware remote cluster index separator ) ; if ( separator index < 0 ) { return cluster alias = = null & & matches index ( pattern ) ; } else { string cluster pattern = pattern substring ( 0 , separator index ) ; string index pattern = pattern substring ( separator index + 1 ) ; return regex simple match ( cluster pattern , cluster alias ) & & matches index ( index pattern ) ; } }


a list of namespaces to which this service is exported exporting a service allows it to be used by sidecars , gateways and virtual services defined in other namespaces this feature provides a mechanism for service owners and mesh administrators to control the visibility of services across namespace boundaries if no namespaces are specified then the service is exported to all namespaces by default the value " " is reserved and defines an export to the same namespace that the service is declared in similarly the value " " is reserved and defines an export to all namespaces for a kubernetes service , the equivalent effect can be achieved by setting the annotation " networking istio ioexport to " to a comma - separated list of namespace names note : in the current release , the ` export to ` value is restricted to " " or " " ( i e , the current namespace or all namespaces ) < code > repeated string export to = 7 ; < code >

public builder add export to ( java lang string value ) { if ( value = = null ) { throw new null pointer exception ( ) ; } ensure export to is mutable ( ) ; export to add ( value ) ; on changed ( ) ; return this ; }


public integer get integer ( ) { return integer ; }


public object node detail ( @ request param ( default value = constants default namespace id ) string namespace id , @ request param string service name ) throws nacos exception { service service = service manager get service ( namespace id , service name ) ; if ( service = = null ) { throw new nacos exception ( nacos exception not found , " service " + service name + " is not found ! " ) ; } object node res = jackson utils create empty json node ( ) ; res put ( " name " , naming utils get service name ( service name ) ) ; res put ( " namespace id " , service get namespace id ( ) ) ; res put ( " protect threshold " , service get protect threshold ( ) ) ; res replace ( " metadata " , jackson utils transfer to json node ( service get metadata ( ) ) ) ; res replace ( " selector " , jackson utils transfer to json node ( service get selector ( ) ) ) ; res put ( " group name " , naming utils get group name ( service name ) ) ; array node clusters = jackson utils create empty array node ( ) ; for ( cluster cluster : service get cluster map ( ) values ( ) ) { object node cluster json = jackson utils create empty json node ( ) ; cluster json put ( " name " , cluster get name ( ) ) ; cluster json replace ( " health checker " , jackson utils transfer to json node ( cluster get health checker ( ) ) ) ; cluster json replace ( " metadata " , jackson utils transfer to json node ( cluster get metadata ( ) ) ) ; clusters add ( cluster json ) ; } res replace ( " clusters " , clusters ) ; return res ; }


returns the local address for this channel

inet socket address get local address ( ) ;


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


multiplies the vector with the given matrix , performing a division by w the matrix array is assumed to hold a 4x 4 column major matrix as you can get from { @ link matrix 4 # val } the vector array is assumed to hold a 3 - component vector , with x being the first element , y being the second and z being the last component the result is stored in the vector array this is the same as { @ link vector 3 # prj ( matrix 4 ) }

public static void prj ( float [ ] mat , float [ ] vec ) { matrix 4 proj ( mat , vec , 0 ) ; }


will remove the current message , mark its { @ link channel promise } as success and return { @ code true } if no flushed message exists at the time this method is called it will return { @ code false } to signal that no more messages are ready to be handled

public boolean remove ( ) { entry e = flushed entry ; if ( e = = null ) { clear nio buffers ( ) ; return false ; } object msg = e msg ; channel promise promise = e promise ; int size = e pending size ; remove entry ( e ) ; if ( ! e cancelled ) { / / only release message , notify and decrement if it was not canceled before reference count util safe release ( msg ) ; safe success ( promise ) ; decrement pending outbound bytes ( size , false , true ) ; } / / recycle the entry e recycle ( ) ; return true ; }


replace the base metric with the incoming value stateless operation

public timeline metric exec ( timeline metric incoming , timeline metric base , map < object , object > state ) { return incoming ; }


returns whether the playback controls are hidden by touch events

public boolean get controller hide on touch ( ) { return controller hide on touch ; }


sets the expected behaviour for tasks in case that they encounter an error when checkpointing if this is set as true , which is equivalent to set tolerable checkpoint failure number as zero , job manager would fail the whole job once it received a decline checkpoint message if this is set as false , which is equivalent to set tolerable checkpoint failure number as the maximum of integer ( means unlimited ) , job manager would not fail the whole job no matter how many declined checkpoints it received { @ link # set tolerable checkpoint failure number ( int ) } would always overrule this deprecated method if they have conflicts

public void set fail on checkpointing errors ( boolean fail on checkpointing errors ) { if ( tolerable checkpoint failure number ! = undefined tolerable checkpoint number ) { log warn ( " since tolerable checkpoint failure number has been configured as { } , deprecated # set fail on checkpointing errors ( boolean ) " + " method would not take any effect and please use # set tolerable checkpoint failure number ( int ) method to " + " determine your expected behaviour when checkpoint errors on task side " , tolerable checkpoint failure number ) ; return ; } this fail on checkpointing errors = fail on checkpointing errors ; if ( fail on checkpointing errors ) { this tolerable checkpoint failure number = 0 ; } else { this tolerable checkpoint failure number = unlimited tolerable failure number ; } }


public boolean remove span ( cache span span ) { if ( cached spans remove ( span ) ) { if ( span file ! = null ) { span file delete ( ) ; } return true ; } return false ; }


returns whether the ebp is allocatedused

public boolean e b p allocated and used ( ) { return ebp allocated and used ; }


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

public e peek last ( ) { return is empty ( ) ? null : element data ( get max element index ( ) ) ; }


return { @ code true } if the type converter can convert the specified type to the desired target type

boolean can convert ( @ nullable type descriptor source type , type descriptor target type ) ;


get the number of running map tasks in the cluster

public int get running maps ( ) { return running maps ; }


test what happens when there are two racks , and an entire rack is decommissioned since the cluster is multi - rack , it will consider the block under - replicated rather than create a third replica on the same rack adding a new node on a third rack should cause re - replication to that node

public void test one of two racks decommissioned ( ) throws exception { add nodes ( nodes ) ; name node init metrics ( new configuration ( ) , hdfs server constants namenode role namenode ) ; for ( int i = 0 ; i < num test iters ; i + + ) { do test one of two racks decommissioned ( i ) ; } }


code is optimized for little endian as proto is the encouraged format

@ override long read long ( ) { return long reverse bytes ( read long le ( ) ) ; }


parses a runtime [ in ] visible type annotations attribute to find the offset of each type annotation entry it contains , to find the corresponding labels , and to visit the try catch block annotations

private int [ ] read type annotations ( final method visitor method visitor , final context context , final int runtime type annotations offset , final boolean visible ) { char [ ] char buffer = context char buffer ; int current offset = runtime type annotations offset ; / / read the num annotations field and create an array to store the type annotation offsets int [ ] type annotations offsets = new int [ read unsigned short ( current offset ) ] ; current offset + = 2 ; / / parse the ' annotations ' array field for ( int i = 0 ; i < type annotations offsets length ; + + i ) { type annotations offsets [ i ] = current offset ; / / parse the type annotation ' s target type and the target info fields the size of the / / target info field depends on the value of target type int target type = read int ( current offset ) ; switch ( target type > > > 24 ) { case type reference local variable : case type reference resource variable : / / a localvar target has a variable size , which depends on the value of their table length / / field it also references bytecode offsets , for which we need labels int table length = read unsigned short ( current offset + 1 ) ; current offset + = 3 ; while ( table length - - > 0 ) { int start pc = read unsigned short ( current offset ) ; int length = read unsigned short ( current offset + 2 ) ; / / skip the index field ( 2 bytes ) current offset + = 6 ; create label ( start pc , context current method labels ) ; create label ( start pc + length , context current method labels ) ; } break ; case type reference cast : case type reference constructor invocation type argument : case type reference method invocation type argument : case type reference constructor reference type argument : case type reference method reference type argument : current offset + = 4 ; break ; case type reference class extends : case type reference class type parameter bound : case type reference method type parameter bound : case type reference throws : case type reference exception parameter : case type reference instanceof : case type reference new : case type reference constructor reference : case type reference method reference : current offset + = 3 ; break ; case type reference class type parameter : case type reference method type parameter : case type reference method formal parameter : case type reference field : case type reference method return : case type reference method receiver : default : / / type reference type which can ' t be used in code attribute , or which is unknown throw new illegal argument exception ( ) ; } / / parse the rest of the type annotation structure , starting with the target path structure / / ( whose size depends on its path length field ) int path length = read byte ( current offset ) ; if ( ( target type > > > 24 ) = = type reference exception parameter ) { / / parse the target path structure and create a corresponding type path type path path = path length = = 0 ? null : new type path ( class file buffer , current offset ) ; current offset + = 1 + 2 * path length ; / / parse the type index field string annotation descriptor = read u t f 8 ( current offset , char buffer ) ; current offset + = 2 ; / / parse num element value pairs and element value pairs and visit these values current offset = read element values ( method visitor visit try catch annotation ( target type & 0x f f f f f f 0 0 , path , annotation descriptor , visible ) , current offset , / * named = * / true , char buffer ) ; } else { / / we don ' t want to visit the other target type annotations , so we just skip them ( which / / requires some parsing because the element value pairs array has a variable size ) first , / / skip the target path structure : current offset + = 3 + 2 * path length ; / / then skip the num element value pairs and element value pairs fields ( by reading them / / with a null annotation visitor ) current offset = read element values ( / * annotation visitor = * / null , current offset , / * named = * / true , char buffer ) ; } } return type annotations offsets ; }


update keyitem from the cache and overwrite

default distributed cache manager < k , v , i > update ( final k key , final v item , final boolean publish ) { return this ; }


function that returns the key used for matching request arguments against returned objects the key returned from this function should match up with the key returned from { @ link # get batch return type key selector ( ) } ;

protected abstract func 1 < request argument type , k > get request argument key selector ( ) ;


gets the { @ link channel option # so linger } option


process the record note that record metadata is undefined in cases such as a forward call from a punctuator

void process ( record < k in , v in > record ) ;


return all values for the specified native header , if present

public list < string > get native header ( string header name ) { map < string , list < string > > map = get native headers ( ) ; return ( map ! = null ? map get ( header name ) : null ) ; }


setter for property ' localizible description '

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


retrieve the current time zone from the given request , using the time zone aware locale resolver bound to the request by the dispatcher servlet ( if available ) , falling back to the system ' s default time zone note : this method returns { @ code null } if no specific time zone can be resolved for the given request this is in contrast to { @ link # get locale } where there is always the request ' s accept - header locale to fall back to consider using { @ link org springframework context i 1 8n locale context holder # get time zone ( ) } which will normally be populated with the same time zone : that method only differs in terms of its fallback to the system time zone if the locale resolver hasn ' t provided a specific time zone ( instead of this method ' s { @ code null } )

public static time zone get time zone ( http servlet request request ) { locale resolver locale resolver = get locale resolver ( request ) ; if ( locale resolver instanceof locale context resolver ) { locale context locale context = ( ( locale context resolver ) locale resolver ) resolve locale context ( request ) ; if ( locale context instanceof time zone aware locale context ) { return ( ( time zone aware locale context ) locale context ) get time zone ( ) ; } } return null ; }


sets the specified comparator for this plan node

public void set comparator ( type comparator factory < ? > comparator , int id ) { this comparators [ id ] = comparator ; }


asserts that the document history in lucene index is consistent with translog ' s on every index shard of the cluster this assertion might be expensive , thus we prefer not to execute on every test but only interesting tests

public void assert consistent history between translog and lucene index ( ) throws i o exception { for ( node and client node and client : nodes values ( ) ) { indices service index services = get instance ( indices service class , node and client name ) ; for ( index service index service : index services ) { for ( index shard index shard : index service ) { try { index shard test case assert consistent history between translog and lucene ( index shard ) ; } catch ( already closed exception ignored ) { / / shard is closed } } } } }


return a { @ link numeric double values } instance that can be used to sort root documents with this mode , the provided values and filters for rootinner documents for every root document , the values of its inner documents will be aggregated if none of the inner documents has a value , then < code > missing value < code > is returned allowed modes : sum , avg , min , max note : calling the returned instance on docs that are not root docs is illegal the returned instance can only be evaluate the current and upcoming docs

public numeric double values select ( final sorted numeric double values values , final double missing value , final bit set parent docs , final doc id set iterator child docs , int max doc , int max children ) throws i o exception { if ( parent docs = = null | | child docs = = null ) { return field data replace missing ( field data empty numeric double ( ) , missing value ) ; } return new numeric double values ( ) { int last seen parent doc = 0 ; double last emitted value = missing value ; @ override public boolean advance exact ( int parent doc ) throws i o exception { assert parent doc > = last seen parent doc : " can only evaluate current and upcoming parent docs " ; if ( parent doc = = last seen parent doc ) { return true ; } final int prev parent doc = parent docs prev set bit ( parent doc - 1 ) ; final int first child doc ; if ( child docs doc i d ( ) > prev parent doc ) { first child doc = child docs doc i d ( ) ; } else { first child doc = child docs advance ( prev parent doc + 1 ) ; } last seen parent doc = parent doc ; last emitted value = pick ( values , missing value , child docs , first child doc , parent doc , max children ) ; return true ; } @ override public double double value ( ) throws i o exception { return last emitted value ; } } ; }


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

public void update user test ( ) { string username = null ; user user = null ; / / api update user ( username , user ) ; / / todo : test validations }


setter method for property < tt > hosts < tt >

public void set hosts ( list < ip address info > hosts ) { this hosts = hosts ; }


return true if a file path is matched by this file type

public boolean matches ( string path ) { return apply ( path ) ; }


public builder min value ( double min value ) { this min value = min value ; return this ; }


re - initialize the < code > resource scheduler < code >

void reinitialize ( configuration conf , r m context rm context ) throws i o exception ;


resumes data consumption from the producer after an exactly once checkpoint

void resume consumption ( remote input channel input channel ) ;


test of deprecated wrapper method which can go away when it does

public void find record test xml deprecated ( ) { load sample xml ( ) ; create xml parser ( ) ; parser skip ( ) ; string [ ] record path = new string [ ] { " library " , " book " } ; int path index = 0 ; try { sut find record wrapper ( project , parser , record path , path index , column group , - 1 , new import parameters ( false , false , false ) ) ; } catch ( exception e ) { assert fail ( ) ; } assert project created ( project , 0 , 6 ) ; assert assert equals ( project rows get ( 0 ) cells size ( ) , 4 ) ; / / todo }


calculate a proper size of multipart piece if < code > min part size < code > is too small , the number of multipart pieces may exceed the limit of { @ link constants # multipart upload part num limit }

public static long calculate part size ( long content length , long min part size ) { long tmp part size = content length / multipart upload part num limit + 1 ; return math max ( min part size , tmp part size ) ; }


creates a { @ link server call handler } for a client streaming method of the service

public static < req t , resp t > server call handler < req t , resp t > async client streaming call ( client streaming method < req t , resp t > method ) { return new streaming server call handler < > ( method , false ) ; }


dispatcher used to send state operation completion events to resource manager services

public void set r m dispatcher ( dispatcher dispatcher ) { this rm dispatcher = dispatcher ; }


recursively compute the difference between snapshots under a given directoryfile

private void compute diff recursively ( final i node directory snapshot dir , i node node , list < byte [ ] > parent path , snapshot diff info diff report ) { final snapshot earlier snapshot = diff report is from earlier ( ) ? diff report get from ( ) : diff report get to ( ) ; final snapshot later snapshot = diff report is from earlier ( ) ? diff report get to ( ) : diff report get from ( ) ; byte [ ] [ ] relative path = parent path to array ( new byte [ parent path size ( ) ] [ ] ) ; if ( node is directory ( ) ) { final children diff diff = new children diff ( ) ; i node directory dir = node as directory ( ) ; directory with snapshot feature sf = dir get directory with snapshot feature ( ) ; if ( sf ! = null ) { boolean change = sf compute diff between snapshots ( earlier snapshot , later snapshot , diff , dir ) ; if ( change ) { diff report add dir diff ( dir , relative path , diff ) ; } } else { diff report increment dirs processed ( ) ; } long start time = time monotonic now ( ) ; read only list < i node > children = dir get children list ( earlier snapshot get id ( ) ) ; diff report add children listing time ( time monotonic now ( ) - start time ) ; for ( i node child : children ) { final byte [ ] name = child get local name bytes ( ) ; boolean to process = ! diff contains deleted ( name ) ; if ( ! to process & & child instanceof i node reference with name ) { byte [ ] [ ] rename target path = find rename target path ( snapshot dir , ( with name ) child , later snapshot = = null ? snapshot current state id : later snapshot get id ( ) ) ; if ( rename target path ! = null ) { to process = true ; diff report set rename target ( child get id ( ) , rename target path ) ; } } if ( to process ) { parent path add ( name ) ; compute diff recursively ( snapshot dir , child , parent path , diff report ) ; parent path remove ( parent path size ( ) - 1 ) ; } } } else if ( node is file ( ) & & node as file ( ) is with snapshot ( ) ) { i node file file = node as file ( ) ; boolean change = file get file with snapshot feature ( ) changed between snapshots ( file , earlier snapshot , later snapshot ) ; if ( change ) { diff report add file diff ( file , relative path ) ; } diff report increment files processed ( ) ; } }


this implementation returns the name of the file

public string get filename ( ) { return ( this file ! = null ? this file get name ( ) : this file path get file name ( ) to string ( ) ) ; }


determine if the { @ code response } contains a watch whose value this expects a response like : < code > { " metadata " : { " xpack " : { " version " : 6000002 } } } < code >

boolean should replace cluster alert ( final response response , final x content x content , final int minimum version ) throws i o exception { / / no named content used ; so empty is fine final map < string , object > resources = x content helper convert to map ( x content , response get entity ( ) get content ( ) , false ) ; / / if it ' s empty , then there ' s no version in the response thanks to filter path if ( resources is empty ( ) = = false ) { @ suppress warnings ( " unchecked " ) final map < string , object > metadata = ( map < string , object > ) resources get ( " metadata " ) ; @ suppress warnings ( " unchecked " ) final map < string , object > xpack = metadata ! = null ? ( map < string , object > ) metadata get ( " xpack " ) : null ; final object version = xpack ! = null ? xpack get ( " version created " ) : null ; / / if we don ' t have it ( perhaps more fields were returned ) , then we need to replace it if ( version instanceof number ) { / / the version in the cluster alert is expected to include the alpha / beta / rc codes as well return ( ( number ) version ) int value ( ) < minimum version ; } } return true ; }


declare a parameter for this operation the order in which this method is called is significant when using positional parameters it is not significant when using named parameters with named sql parameter objects here ; it remains significant when using named parameters in combination with unnamed sql parameter objects here

public void declare parameter ( sql parameter param ) throws invalid data access api usage exception { if ( is compiled ( ) ) { throw new invalid data access api usage exception ( " cannot add parameters once the query is compiled " ) ; } this declared parameters add ( param ) ; }


get the { @ link resource } capability of the request

public abstract resource get capability ( ) ;


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


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


public void close ( ) { if ( replica ! = null ) { if ( anchored ) { replica remove no checksum anchor ( ) ; } replica unref ( ) ; } replica = null ; }


escapes html special characters present in the string

public static string escape h t m l ( string string ) { if ( string = = null ) { return null ; } string builder sb = new string builder ( ) ; boolean last character was space = false ; char [ ] chars = string to char array ( ) ; for ( char c : chars ) { if ( c = = ' ' ) { if ( last character was space ) { last character was space = false ; sb append ( " & nbsp ; " ) ; } else { last character was space = true ; sb append ( " " ) ; } } else { last character was space = false ; switch ( c ) { case ' < ' : sb append ( " & lt ; " ) ; break ; case ' > ' : sb append ( " & gt ; " ) ; break ; case ' & ' : sb append ( " & amp ; " ) ; break ; case ' " ' : sb append ( " & quot ; " ) ; break ; default : sb append ( c ) ; break ; } } } return sb to string ( ) ; }


returns the value of this { @ code unsigned integer } as an { @ code int } this is an inverse operation to { @ link # from int bits } note that if this { @ code unsigned integer } holds a value { @ code > = 2 ^ 31 } , the returned value will be equal to { @ code this - 2 ^ 32 }

public int int value ( ) { return value ; }


determine whether the original request is still active

protected final boolean is request active ( ) { return this request active ; }


generate a sql to do the data migration job to avoid losing data

protected string generate data migration s q l ( table model table model ) { string table name = table model get table name ( ) ; collection < column model > column models = table model get column models ( ) ; if ( ! column models is empty ( ) ) { string builder sql = new string builder ( ) ; sql append ( " insert into " ) append ( table name ) append ( " ( " ) ; boolean need comma = false ; for ( column model column model : column models ) { if ( need comma ) { sql append ( " , " ) ; } need comma = true ; sql append ( column model get column name ( ) ) ; } sql append ( " ) " ) ; sql append ( " select " ) ; need comma = false ; for ( column model column model : column models ) { if ( need comma ) { sql append ( " , " ) ; } need comma = true ; sql append ( column model get column name ( ) ) ; } sql append ( " from " ) append ( get temp table name ( table name ) ) ; return sql to string ( ) ; } else { return null ; } }


signals the given value and an on complete if the downstream is ready to receive the final value

protected final void complete ( r n ) { long p = produced ; if ( p ! = 0 ) { backpressure helper produced ( this , p ) ; } for ( ; ; ) { long r = get ( ) ; if ( ( r & complete mask ) ! = 0 ) { on drop ( n ) ; return ; } if ( ( r & request mask ) ! = 0 ) { lazy set ( complete mask + 1 ) ; downstream on next ( n ) ; downstream on complete ( ) ; return ; } value = n ; if ( compare and set ( 0 , complete mask ) ) { return ; } value = null ; } }


returns the decision for the shard being allowed to remain on its current node if { @ link # is decision taken ( ) } returns { @ code false } , then invoking this method will throw an { @ code illegal state exception }

public decision get can remain decision ( ) { check decision state ( ) ; return can remain decision ; }


public void set initialized ( int page offset , int size , byte [ ] mask update ) { int mask offset = page offset / 8 ; int first bit = page offset % 8 ; while ( size > 0 ) { int s = math min ( size , 8 - first bit ) ; size - = s ; int mask = ( 0xff < < first bit ) & ( ( 1 < < ( first bit + s ) ) - 1 ) ; int val = mask ; if ( mask update ! = null ) { val & = mask update [ mask offset ] ; } if ( initialized mask = = null ) { / / allocate mask if needed byte test = ( byte ) ( val | ~ mask ) ; if ( test = = ( byte ) - 1 ) { + + mask offset ; first bit = 0 ; continue ; } initialized mask = get initialized mask ( data length , true ) ; } initialized mask [ mask offset ] = ( byte ) ( ( initialized mask [ mask offset ] & ~ mask ) | val ) ; + + mask offset ; first bit = 0 ; } }


convert a url query namevalue parameter to a list of encoded { @ link pair } objects the value can be null , in which case an empty list is returned

public static list < pair > parameter to pairs ( string name , object value ) { if ( name = = null | | name is empty ( ) | | value = = null ) { return collections empty list ( ) ; } return collections singleton list ( new pair ( url encode ( name ) , url encode ( value to string ( ) ) ) ) ; }


blocking take from producer consumer output queue ( catches exceptions and retries forever )

public work report < r > blocking take ( ) { while ( true ) { try { work report < r > report = output queue take ( ) ; work cnt decrement and get ( ) ; return report ; } catch ( interrupted exception ie ) { log debug ( " retrying in blocking take " ) ; } } }


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


return the language ranges from the { @ literal " accept - language " } header if you only need sorted , preferred locales only use { @ link # get accept language as locales ( ) } or if you need to filter based on a list of supported locales you can pass the returned list to { @ link locale # filter ( list , collection ) }

public list < locale language range > get accept language ( ) { string value = get first ( accept language ) ; return ( string utils has text ( value ) ? locale language range parse ( value ) : collections empty list ( ) ) ; }


comprehensive correctness testing is done in the test merge quantile digest function and test merge t digest function

public void test statistical digest merge ( string type ) { assert query ( format ( " select value at quantile ( merge ( % s ) , 0 5e0 ) > 0 from ( select partkey , % s agg ( cast ( orderkey as double ) ) as % s from lineitem group by partkey ) " , type , type , type ) , " select true " ) ; }


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


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

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


set action name that is used to pick the right action config and features from { @ link feature configuration } by default the action name is decided from the source filetype

public cpp compile action builder set action name ( string action name ) { this action name = action name ; return this ; }


get the { @ link key field based comparator } options

public string get key field comparator option ( ) { return get ( key field based comparator comparator options ) ; }


gets whether the query builder will ignore unmapped fields ( and run a { @ link match no docs query } in place of this query ) or throw an exception if the field is unmapped

public boolean ignore unmapped ( ) { return ignore unmapped ; }


public boolean equals ( object o ) { if ( this = = o ) { return true ; } if ( o = = null | | get class ( ) ! = o get class ( ) ) { return false ; } login that = ( login ) o ; return objects equals ( user , that user ) & & objects equals ( password , that password ) ; }


get the configuration for the rpc client it takes the router configuration and transforms it into regular rpc client configuration

private configuration get client configuration ( final configuration conf ) { configuration client conf = new configuration ( conf ) ; int max retries = conf get int ( r b f config keys dfs router client max retries time out , r b f config keys dfs router client max retries time out default ) ; if ( max retries > = 0 ) { client conf set int ( ipc client connect max retries on socket timeouts key , max retries ) ; } long connect time out = conf get time duration ( r b f config keys dfs router client connect timeout , r b f config keys dfs router client connect timeout default , time unit milliseconds ) ; if ( connect time out > = 0 ) { client conf set long ( ipc client connect timeout key , connect time out ) ; } return client conf ; }


compute a map key for the given snapshot and index names

private static string key ( final string snapshot , final string index ) { return snapshot + " : " + index ; }


public static byte [ ] bitmap 2 bytes ( final bitmap bitmap , final compress format format , int quality ) { if ( bitmap = = null ) return null ; byte array output stream baos = new byte array output stream ( ) ; bitmap compress ( format , quality , baos ) ; return baos to byte array ( ) ; }


restore a state that was previously returned by { @ link # save instance state } this adds to the activity group information about all activity i ds that had previously been saved , even if they have not been started yet , so if the user later navigates to them the correct state will be restored note : this does < b > not < b > change the current running activity , or start whatever activity was previously running when the state was saved that is up to the client to do , in whatever way it thinks is best

public void dispatch create ( bundle state ) { if ( state ! = null ) { for ( string id : state key set ( ) ) { try { final bundle astate = state get bundle ( id ) ; local activity record r = m activities get ( id ) ; if ( r ! = null ) { r instance state = astate ; } else { r = new local activity record ( id , null ) ; r instance state = astate ; m activities put ( id , r ) ; m activity array add ( r ) ; } } catch ( exception e ) { / / recover from - all - app errors log e ( tag , " exception thrown when restoring local activity manager state " , e ) ; } } } m cur state = created ; }


get the hash for a given object , apply an additional hash function to reduce collisions this implementation uses the same wang jenkins algorithm as { @ link concurrent hash map } subclasses can override to provide alternative hashing

protected int get hash ( @ nullable object o ) { int hash = ( o ! = null ? o hash code ( ) : 0 ) ; hash + = ( hash < < 15 ) ^ 0xffffcd 7d ; hash ^ = ( hash > > > 10 ) ; hash + = ( hash < < 3 ) ; hash ^ = ( hash > > > 6 ) ; hash + = ( hash < < 2 ) + ( hash < < 14 ) ; hash ^ = ( hash > > > 16 ) ; return hash ; }


should directory contents be displayed in reverse order

boolean is order reverse ( ) { return this order reverse ; }


public address get address ( ) { return addr ; }


returns the value from the right map ( possibly null )


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

public static fields find by thrift id ( int field id ) { switch ( field id ) { case 0 : / / success return success ; default : return null ; } }


notepad pdb is here : < teexenotepad pdb 3 6 c f d 5 f 9 8 8 8 c 4 4 8 3 b 5 2 2 b 9 d b 2 4 2 d 8 4 7 8 2 notepad pdb xml is here : < tepdb xml repo location set to < tepdb xml on windows , pdb xml file should be found on non - windows , pdb xml file should be found

public void test find pdb 1 5 ( ) throws exception { created files = create files ( pdb location same as exe subdir , pdb xml location own dir ) ; file pdb = pdb parser find p d b ( test program , false , pdb xml file get parent file ( ) ) ; assert not null ( pdb ) ; if ( pdb parser on windows ) { assert equals ( pdb xml file , pdb ) ; } else { assert equals ( pdb xml file , pdb ) ; } }


in native rules we can return null as a configured target however , this doesn ' t play nicely with the starlark testing framework instead we have to return a built target even if it ' s empty if we do that we hit some preconditions that make sure that certain providers are present , so we fill in those with an empty instance the rest of the method makes sure the errors are present for the starlark testing framework to see

private static void fill in required providers ( rule configured target builder rule builder , rule context rule context ) { rule builder add provider ( runfiles provider class , runfiles provider empty ) ; rule builder add provider ( file provider class , file provider empty ) ; rule builder add provider ( files to run provider class , files to run provider empty ) ; if ( rule context get configuration ( ) allow analysis failures ( ) ) { immutable list builder < analysis failure > analysis failures = immutable list builder ( ) ; for ( string error message : rule context get suppressed error messages ( ) ) { analysis failures add ( new analysis failure ( rule context get label ( ) , error message ) ) ; } rule builder add native declared provider ( analysis failure info for analysis failures ( analysis failures build ( ) ) ) ; } }


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


captures the state of this builder and run all associated tests

public void build and run tests ( ) throws exception { build ( ) run tests ( ) ; }


returns the idl parcelables defined on the given rule

private static immutable list < artifact > get idl parcelables ( rule context rule context ) { return rule context get rule ( ) is attr defined ( " idl parcelables " , build type label list ) ? immutable list copy of ( rule context get prerequisite artifacts ( " idl parcelables " ) filter ( android rule classes android idl ) list ( ) ) : immutable list < artifact > of ( ) ; }


read a script from the given resource , using " { @ code - - } " as the comment prefix and " { @ code ; } " as the statement separator , and build a string containing the lines

public static mono < string > read script ( encoded resource resource , data buffer factory data buffer factory ) { return read script ( resource , data buffer factory , default comment prefixes , default statement separator , default block comment end delimiter ) ; }


add a listener to react to changes in the filter selection

public void add item listener ( item listener l ) { listener list add ( item listener class , l ) ; }


returns the total number of downloaded bytes

public long get bytes downloaded ( ) { return progress bytes downloaded ; }


expose a read - only flag for the current transaction called by the transaction manager on transaction begin and on cleanup

public void set current transaction read only ( boolean read only ) { this transaction context set current transaction read only ( read only ) ; }


public collection < aux service record > get service records ( ) { return collections unmodifiable collection ( service record map values ( ) ) ; }


sets the is upper case tabs of this m t config object

public void set upper case tabs ( final boolean is upper case tabs ) { upper case tabs = is upper case tabs ; }


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


public boolean is bool item ( ) { return bool item ; }


bind multiple views with an { @ link com marshalchen ultimaterecyclerview swipe swipe layout on reveal listener }

public void add reveal listener ( int [ ] child ids , on reveal listener l ) { for ( int i : child ids ) add reveal listener ( i , l ) ; }


a simple test that adds a sub - aggregation to a significant terms aggregation , to help check that sub - aggregation collection is handled correctly

public void test sub aggregations ( ) throws exception { index equal test data ( ) ; query builder query = query builders terms query ( text field , " a " , " b " ) ; aggregation builder sub agg = terms ( " class " ) field ( class field ) ; aggregation builder agg = significant terms ( " significant terms " ) field ( text field ) execution hint ( random execution hint ( ) ) significance heuristic ( new chi square ( true , true ) ) min doc count ( 1 ) shard size ( 1000 ) size ( 1000 ) sub aggregation ( sub agg ) ; search response response = client ( ) prepare search ( " test " ) set query ( query ) add aggregation ( agg ) get ( ) ; assert search response ( response ) ; significant terms sig terms = response get aggregations ( ) get ( " significant terms " ) ; assert that ( sig terms get buckets ( ) size ( ) , equal to ( 2 ) ) ; for ( significant terms bucket bucket : sig terms ) { string terms terms = bucket get aggregations ( ) get ( " class " ) ; assert that ( terms get buckets ( ) size ( ) , equal to ( 2 ) ) ; } }


called to allow this plugin to flush any caches to the domain object before it is saved

protected void prepare to save ( domain object d obj ) { / / do nothing by default ; subclasses should override as needed }


public void test close state map ( ) { state map close ( ) ; assert true ( state map is closed ( ) ) ; assert that ( state map size ( ) , is ( 0 ) ) ; assert that ( state map total size ( ) , is ( 0 ) ) ; assert that ( allocator get total space number ( ) , is ( 0 ) ) ; / / make sure double close won ' t cause problem state map close ( ) ; }


public t get ( int key ) { int index = indexer get ( key ) ; if ( index < 0 ) { return null ; } return values [ index ] ; }


gets the { @ link library cache manager class loader handle } for the associated job

library cache manager class loader handle get class loader handle ( ) ;


returns the stream time in microseconds for a given position

public long get time us at position ( long position ) { return get time us at position ( position , first frame byte position , bitrate ) ; }


gets the name of the strategy used to run the action

public string get strategy ( ) { return strategy ; }


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

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


reinitialize the events happened and return the number of events stored since last execution of this method used to send via telemetry the events and restart the events store

/ * package * / synchronized @ non null concurrent hash map < list < stack trace element > , missing class event > get events and clean ( ) { concurrent hash map < list < stack trace element > , missing class event > current events = events ; events = new concurrent hash map < > ( max events per send ) ; return current events ; }


returns the single edge that directly connects { @ code endpoints } ( in the order , if any , specified by { @ code endpoints } ) , if one is present , or { @ code null } if no such edge exists if this graph is directed , the endpoints must be ordered

e edge connecting or null ( endpoint pair < n > endpoints ) ;


return bytes size for given option in { @ link table config } todo : this method can be removed once flink - 20879 is finished

public static long get memory size ( table config table config , config option < string > option ) { return memory size parse ( table config get configuration ( ) get string ( option ) ) get bytes ( ) ; }


true signals that the client allows null items to be used when this is true , a null value will be stored in this list < b > only as the last item < b > see the javadoc for more info

public void set allow nulls ( boolean allow nulls ) { this allows nulls = allow nulls ; }


public void set client role ( netty pool key transaction role client role ) { this client role = client role ; }


gets the file used to store the initial admin password

public file path get initial admin password file ( ) { return jenkins get ( ) get root path ( ) child ( " secrets / initial admin password " ) ; }


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


creates the specific bytes hash map , either { @ link bytes multi map } or { @ link window bytes multi map }

public abstract abstract bytes multi map < k > create bytes multi map ( memory manager memory manager , int memory size , logical type [ ] key types , logical type [ ] value types ) ;


an expectation for checking if the given text is present in the specified elements value attribute

public static expected condition < boolean > text to be present in element value ( final by locator , final string text ) { return new expected condition < boolean > ( ) { @ override public boolean apply ( web driver driver ) { try { string element text = driver find element ( locator ) get attribute ( " value " ) ; if ( element text ! = null ) { return element text contains ( text ) ; } return false ; } catch ( stale element reference exception e ) { return false ; } } @ override public string to string ( ) { return string format ( " text ( ' % s ' ) to be the value of element located by % s " , text , locator ) ; } } ; }


called when a segment of a build is started that is to be enhanced with this wrapper this method must be overridden when this wrapper requires a workspace context if such a context is not required , it does not need to be overridden ; it will then forward to { @ link # set up ( context , run , task listener , env vars ) }

public void set up ( context context , run < ? , ? > build , file path workspace , launcher launcher , task listener listener , env vars initial environment ) throws i o exception , interrupted exception { / / if this does not require a workspace , defer to the version that does not take a workspace and launcher if ( ! this requires workspace ( ) ) { this set up ( context , build , listener , initial environment ) ; return ; } throw new abstract method error ( " unless a build wrapper is marked as not requiring a workspace context , you must implement the overload of the set up ( ) method that takes both a workspace and a launcher " ) ; }


flushes all loggers at com google devtools build or higher

public static void flush server log ( ) { for ( logger logger = template logger ; logger ! = null ; logger = logger get parent ( ) ) { for ( handler handler : logger get handlers ( ) ) { if ( handler ! = null ) { handler flush ( ) ; } } } }


specify the class loader to load class path resources with , or { @ code null } for using the thread context class loader at the time of actual resource access the default is that class loader access will happen using the thread context class loader at the time of actual resource access ( since 5 3 )

public void set class loader ( @ nullable class loader class loader ) { this class loader = class loader ; }


returns true if the feature configuration includes statically linking the cpp runtimes

public boolean should statically link cpp runtimes ( feature configuration feature configuration ) { return feature configuration is enabled ( cpp rule classes static link cpp runtimes ) ; }


get a float parameter , or { @ code null } if not present throws an exception if it the parameter value isn ' t a number

public static float get float parameter ( servlet request request , string name ) throws servlet request binding exception { if ( request get parameter ( name ) = = null ) { return null ; } return get required float parameter ( request , name ) ; }


whether there is any potential hedge at the moment a false return value implies there is absolutely no potential hedge at least one of the hedges will observe a false return value when calling this method , unless otherwise the rpc is committed

private boolean has potential hedging ( state state ) { return state winning substream = = null & & state hedging attempt count < hedging policy max attempts & & ! state hedging frozen ; }


check the headers and determine the headers for the response of a pre - flight request the default implementation simply delegates to { @ link org springframework web cors cors configuration # check origin ( string ) }

protected list < string > check headers ( cors configuration config , list < string > request headers ) { return config check headers ( request headers ) ; }


construct an inner node from a path - like string


set up the objects so we can be a drag and drop site

private void set up drag drop ( ) { acceptable flavors = new data flavor [ ] { data tree drag n drop handler local domain file flavor , tool button transferable local tool button flavor , version info transferable local version info flavor } ; / / set up drop stuff drop target adapter = new tool button drop tgt adapter ( dn d constants action copy or move , acceptable flavors ) ; drop target = new drop target ( this , dn d constants action copy or move , drop target adapter , true ) ; drop target set active ( true ) ; / / set up drag stuff drag source = drag source get default drag source ( ) ; drag gesture adapter = new drag gesture adapter ( this ) ; drag source adapter = new drag src adapter ( this ) ; drag source create default drag gesture recognizer ( this , drag action , drag gesture adapter ) ; }


returns the flat field descriptors for the given field expression

public list < flat field descriptor > get flat fields ( string field expression ) { list < flat field descriptor > result = new array list < flat field descriptor > ( ) ; this get flat fields ( field expression , 0 , result ) ; return result ; }


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


reads property key from additional properties , converts it to a boolean and writes it back to additional properties to be usable as a boolean in mustache files

public boolean convert property to boolean and write back ( string property key ) { boolean result = convert property to boolean ( property key ) ; write property back ( property key , result ) ; return result ; }


convenience method to get this element as a { @ link json primitive } if the element is of some other type , a { @ link illegal state exception } will result hence it is best to use this method after ensuring that this element is of the desired type by calling { @ link # is json primitive ( ) } first

public json primitive get as json primitive ( ) { if ( is json primitive ( ) ) { return ( json primitive ) this ; } throw new illegal state exception ( " not a json primitive : " + this ) ; }


if set to true the restore procedure will restore partially snapshotted indices

public restore snapshot request builder set partial ( boolean partial ) { request partial ( partial ) ; return this ; }


wrap { @ link runnable } by { @ link tracing runnable } if active trace context existed

public static runnable wrap or not ( runnable delegate ) { / / just wrap continuation with active trace context if ( context manager is active ( ) ) { return new tracing runnable ( context manager capture ( ) , delegate ) ; } else { return delegate ; } }


creates a new { @ code bloom filter } that ' s a copy of this instance the new instance is equal to this instance but shares no mutable state

public bloom filter < t > copy ( ) { return new bloom filter < t > ( bits copy ( ) , num hash functions , funnel , strategy ) ; }


we override this method here to return a mock rm instances the base class returns the proxy to the real rm which will not work in case of stand alone test cases

protected < t > t create r m proxy ( class < t > protocol , configuration config , user group information user , token < a m r m token identifier > token ) throws i o exception { return create secondary r m proxy ( protocol , config , yarn configuration get cluster id ( config ) ) ; }


validate whether mount point name gets resolved or not on successful resolution the details returned would be the ones actually set on the mount point

public void test mount point resolved ( ) throws i o exception { mount table add entry = mount table new instance ( " / testdir " , collections singleton map ( " ns 0 " , " / tmp / testdir " ) ) ; add entry set group name ( " group 1 " ) ; add entry set owner name ( " owner 1 " ) ; assert true ( add mount table ( add entry ) ) ; hdfs file status finfo = router protocol get file info ( " / testdir " ) ; file status [ ] finfo 1 = router fs list status ( new path ( " / " ) ) ; assert equals ( " owner 1 " , finfo get owner ( ) ) ; assert equals ( " owner 1 " , finfo 1 [ 0 ] get owner ( ) ) ; assert equals ( " group 1 " , finfo get group ( ) ) ; assert equals ( " group 1 " , finfo 1 [ 0 ] get group ( ) ) ; }


this creates a dt from a set of credentials , then verifies that you can use the round - tripped credentials as a source of authentication for another dt binding , and when that is asked for a dt token , the secrets it returns are the same as the original that is different from dt propagation , as here the propagation is by setting the fs s 3a sessionsecretid keys from the marshalled values , and using session token auth this verifies that session token authentication can be used for dt credential auth , and that new tokens aren ' t created from a testing perspective , this is not as " good " as having separate tests , but given the effort to create session tokens is all hidden in the first fs , it is actually easier to write and now forms an extra test on those generated tokens as well as the marshalling

public void test create and use d t ( ) throws throwable { describe ( " create a delegation token , round trip then reuse " ) ; final s 3 a file system fs = get file system ( ) ; final configuration conf = fs get conf ( ) ; assert null ( " current user has delegation token " , delegation tokens select token from f s owner ( ) ) ; encryption secrets secrets = new encryption secrets ( s 3 a encryption methods sse kms , kms key ) ; token < abstract s 3 a token identifier > original d t = delegation tokens create delegation token ( secrets , null ) ; assert equals ( " token kind mismatch " , get token kind ( ) , original d t get kind ( ) ) ; / / decode to get the binding info session token identifier issued = require non null ( ( session token identifier ) original d t decode identifier ( ) , ( ) - > " no identifier in " + original d t ) ; issued validate ( ) ; final marshalled credentials creds ; try ( s 3 a delegation tokens dt 2 = instantiate d t support ( get configuration ( ) ) ) { dt 2 start ( ) ; dt 2 reset token binding to d t ( original d t ) ; final a w s session credentials aws session creds = verify session credentials ( dt 2 get credential providers ( ) get credentials ( ) ) ; final marshalled credentials orig creds = from a w s credentials ( aws session creds ) ; token < abstract s 3 a token identifier > bound d t = dt 2 get bound or new d t ( secrets , null ) ; assert equals ( " delegation tokens " , original d t , bound d t ) ; / / simulate marshall and transmission creds = round trip ( orig creds , conf ) ; session token identifier reissued = ( session token identifier ) dt 2 create delegation token ( secrets , null ) decode identifier ( ) ; reissued validate ( ) ; string user agent field = dt 2 get user agent field ( ) ; assert that ( " ua field does not contain uuid " , user agent field , matchers contains string ( issued get uuid ( ) ) ) ; } / / now use those chained credentials to create a new fs instance / / and then get a session dt from it and expect equality verify credential propagation ( fs , creds , new configuration ( conf ) ) ; }


set the maximum motor torque , usually in n - m

public void set max motor torque ( float torque ) { joint set max motor torque ( torque ) ; }


model tests for additional properties string

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


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


make sure that an ha nn can successfully upgrade when configured using journal nodes

public void test upgrade with journal nodes ( ) throws i o exception , u r i syntax exception { mini q j m h a cluster qj cluster = null ; file system fs = null ; try { builder builder = new mini q j m h a cluster builder ( conf ) ; builder get dfs builder ( ) num data nodes ( 0 ) ; qj cluster = builder build ( ) ; mini d f s cluster cluster = qj cluster get dfs cluster ( ) ; / / no upgrade is in progress at the moment check jn previous dir existence ( qj cluster , false ) ; check cluster previous dir existence ( cluster , false ) ; assert c times equal ( cluster ) ; / / transition nn0 to active and do some fs ops cluster transition to active ( 0 ) ; fs = h a test util configure failover fs ( cluster , conf ) ; assert true ( fs mkdirs ( new path ( " / foo 1 " ) ) ) ; / / get the value of the committed txn id in journal nodes final long cid before upgrade = get committed txn id value ( qj cluster ) ; / / do the upgrade shut down nn1 and then restart nn0 with the upgrade / / flag cluster shutdown name node ( 1 ) ; cluster get name node infos ( ) [ 0 ] set start opt ( startup option upgrade ) ; cluster restart name node ( 0 , false ) ; check nn previous dir existence ( cluster , 0 , true ) ; check nn previous dir existence ( cluster , 1 , false ) ; check jn previous dir existence ( qj cluster , true ) ; assert true ( cid before upgrade < = get committed txn id value ( qj cluster ) ) ; / / nn0 should come up in the active state when given the - upgrade option , / / so no need to transition it to active assert true ( fs mkdirs ( new path ( " / foo 2 " ) ) ) ; / / restart nn0 without the - upgrade flag , to make sure that works cluster get name node infos ( ) [ 0 ] set start opt ( startup option regular ) ; cluster restart name node ( 0 , false ) ; / / make sure we can still do fs ops after upgrading cluster transition to active ( 0 ) ; assert true ( fs mkdirs ( new path ( " / foo 3 " ) ) ) ; assert true ( get committed txn id value ( qj cluster ) > cid before upgrade ) ; / / now bootstrap the standby with the upgraded info int rc = bootstrap standby run ( new string [ ] { " - force " } , cluster get configuration ( 1 ) ) ; assert equals ( 0 , rc ) ; / / now restart nn1 and make sure that we can do ops against that as well cluster restart name node ( 1 ) ; cluster transition to standby ( 0 ) ; cluster transition to active ( 1 ) ; assert true ( fs mkdirs ( new path ( " / foo 4 " ) ) ) ; assert c times equal ( cluster ) ; } finally { if ( fs ! = null ) { fs close ( ) ; } if ( qj cluster ! = null ) { qj cluster shutdown ( ) ; } } }


this method is called when an application is removed from this queue during the submit process

public void remove assigned app ( application id application id ) { write lock lock ( ) ; try { assigned apps remove ( application id ) ; } finally { write lock unlock ( ) ; } }


creates the pattern matching is by default case insensitive

public static pattern create pattern ( final string pattern ) { return create pattern ( pattern , pattern case insensitive ) ; }


public string get capital camel ( ) { return capital camel ; }


public u get current value ( ) throws i o exception , interrupted exception { return rr get current value ( ) ; }


get all attributes allowed by the service if a service is registered with { @ code scopes } , get attributes allowed as per defined release policies for scopes if a service registered with no { @ code scopes } , then service { @ code attribute release policy } will be used to get allowed attributes

private map < string , list < object > > get attributes allowed for service ( final collection < string > scopes , final principal principal , final service service , final oidc registered service oidc service , final o auth 2 0 access token access token ) { if ( ! oidc service get scopes ( ) is empty ( ) ) { scopes retain all ( oidc service get scopes ( ) ) ; return filter attributes by scope ( scopes , principal , service , oidc service , access token ) ; } return oidc service get attribute release policy ( ) get attributes ( principal , service , oidc service ) ; }


adds new stubbed answer and returns the invocation matcher the answer was added to

public stubbed invocation matcher add answer ( answer answer , boolean is consecutive , strictness stubbing strictness ) { invocation invocation = invocation for stubbing get invocation ( ) ; mocking progress ( ) stubbing completed ( ) ; if ( answer instanceof validable answer ) { ( ( validable answer ) answer ) validate for ( invocation ) ; } synchronized ( stubbed ) { if ( is consecutive ) { stubbed get first ( ) add answer ( answer ) ; } else { strictness effective strictness = stubbing strictness ! = null ? stubbing strictness : this mock strictness ; stubbed add first ( new stubbed invocation matcher ( answer , invocation for stubbing , effective strictness ) ) ; } return stubbed get first ( ) ; } }


sets the field at the given position to the given value if the field position is larger or equal than the current number of fields in the record , than the record is expanded to host as many columns the value is kept as a reference in the record until the binary representation is synchronized until that point , all modifications to the value ' s object will change the value inside the record the binary representation is synchronized the latest when the record is emitted it may be triggered manually at an earlier point , but it is generally not necessary and advisable because the synchronization triggers the serialization on all modified values , it may be an expensive operation

public void set field ( int field num , value value ) { / / range check if ( field num < 0 ) { throw new index out of bounds exception ( ) ; } / / if the field number is beyond the size , the tuple is expanded if ( field num > = this num fields ) { set num fields ( field num + 1 ) ; } internally set field ( field num , value ) ; }


if the attribute is a selector list of list type , then this method returns a list with number of elements equal to the number of select statements in the selector list each element of this list is equal to concatenating every possible attribute value in a single select statement the conditions themselves in the select statements are completely ignored returns { @ code null } if the attribute isn ' t of the desired format as an example , if we have select ( { a : [ " a " ] , b : [ " a " , " b " ] } ) + select ( { a : [ " c " , " d " ] , c : [ " e " ] ) the output will be [ [ " a " , " a " , " b " ] , [ " c " , " d " , " e " ] ] the idea behind this structure is that at least some of the structure in the original selector list is preserved and we know any possible attribute value is the result of concatenating some sublist of each element

public < t > iterable < t > get concatenated selector lists of list type ( string attribute name , type < t > type ) { selector list < t > selector list = get selector list ( attribute name , type ) ; if ( selector list ! = null & & type instanceof list type ) { list < t > select list = new array list < > ( ) ; for ( selector < t > selector : selector list get selectors ( ) ) { select list add ( type concat ( selector get entries ( ) values ( ) ) ) ; } return immutable list copy of ( select list ) ; } return null ; }


format the column names as header of markdown

public static string format title ( string [ ] col names ) { string builder sbd = new string builder ( ) ; string builder sbd splitter = new string builder ( ) ; for ( int i = 0 ; i < col names length ; + + i ) { if ( i > 0 ) { sbd append ( " | " ) ; sbd splitter append ( " | " ) ; } sbd append ( col names [ i ] ) ; int t = null = = col names [ i ] ? 4 : col names [ i ] length ( ) ; for ( int j = 0 ; j < t ; j + + ) { sbd splitter append ( " - " ) ; } } return sbd to string ( ) + " \ r \ n " + sbd splitter to string ( ) ; }


specifies the time attribute on which rows are ordered for streaming tables , reference a rowtime or proctime time attribute here to specify the time mode for batch tables , refer to a timestamp or long attribute

public static over window partitioned ordered order by ( expression order by ) { return partition by ( ) order by ( order by ) ; }


called when done processing response to signal more data is needed

void done ( time value extra keep alive ) ;


verify that adapter is in a writable state ( i e , valid transaction has been started )


get the constructor metadata for the m bean resource subclasses should implement this method to return the appropriate metadata for all constructors that should be exposed in the management interface for the managed resource default implementation returns an empty array of { @ code model m bean constructor info }

protected model m bean constructor info [ ] get constructor info ( object managed bean , string bean key ) throws j m exception { return new model m bean constructor info [ 0 ] ; }


returns an immutable substitution instance for the given key and value

public static substitution of ( final string key , final string value ) { return new string substitution ( key , value ) ; }


public list < item > get items ( ) { return new array list < > ( items ) ; }


returns the strategy for loading the configuration

public static supplier < config > config source ( ) { return typesafe configurator config source ; }


gets the attempt number of this parallel subtask first attempt is numbered 0


set the interval for the date histogram grouping

public builder set interval ( interval interval ) { this interval = interval ; return this ; }


centers the viewport around the specified position ( x - index and y - value ) in the chart centering the viewport outside the bounds of the chart is not possible makes most sense in combination with the set scale minima ( ) method

public void center view port ( final float [ ] transformed pts , final view view ) { matrix save = m center view port matrix buffer ; save reset ( ) ; save set ( m matrix touch ) ; final float x = transformed pts [ 0 ] - offset left ( ) ; final float y = transformed pts [ 1 ] - offset top ( ) ; save post translate ( - x , - y ) ; refresh ( save , view , true ) ; }


public void run interactive mode ( ) { var event manager = new event manager ( ) ; var s = new scanner ( system in ) ; var option = - 1 ; while ( option ! = 4 ) { logger info ( " hello would you like to boil some eggs ? " ) ; logger info ( " ( 1 ) boil an egg \ n ( 2 ) stop boiling this egg \ n ( 3 ) how are my eggs ? \ n ( 4 ) exit " ) ; logger info ( " choose [ 1 , 2 , 3 , 4 ] : " ) ; option = s next int ( ) ; if ( option = = 1 ) { process option 1 ( event manager , s ) ; } else if ( option = = 2 ) { process option 2 ( event manager , s ) ; } else if ( option = = 3 ) { process option 3 ( event manager , s ) ; } else if ( option = = 4 ) { event manager shutdown ( ) ; } } s close ( ) ; }


the directory in which blaze stores the server state - that is , the socket file and a log

private path get server directory ( ) { return get workspace ( ) get directories ( ) get output base ( ) get child ( " server " ) ; }


returns the { @ link files to run provider } of the header compiler deploy jar for direct - classpath , non - annotation processing actions

public java toolchain tool get header compiler direct ( ) { return header compiler direct ; }


public void test cat all of ( ) { / / todo : test cat all of }


copies all bytes from the input stream to the output stream does not close or flush either stream

public static long copy ( input stream from , output stream to ) throws i o exception { check not null ( from ) ; check not null ( to ) ; byte [ ] buf = new byte [ buf size ] ; long total = 0 ; while ( true ) { int r = from read ( buf ) ; if ( r = = - 1 ) { break ; } to write ( buf , 0 , r ) ; total + = r ; } return total ; }


set whether to detect handler functions in ancestor application contexts default is " false " : only handler functions in the current application context will be detected , i e only in the context that this handler mapping itself is defined in ( typically the current dispatcher servlet ' s context ) switch this flag on to detect handler beans in ancestor contexts ( typically the spring root web application context ) as well

public void set detect handler functions in ancestor contexts ( boolean detect handler functions in ancestor contexts ) { this detect handler functions in ancestor contexts = detect handler functions in ancestor contexts ; }


return the newly registered bean definition

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


returns a builder that creates immutable sorted multisets with an explicit comparator if the comparator has a more general type than the set being generated , such as creating a { @ code sorted multiset < integer > } with a { @ code comparator < number > } , use the { @ link builder } constructor instead

public static < e > builder < e > ordered by ( comparator < e > comparator ) { return new builder < e > ( comparator ) ; }


set the ordered list of scripts to execute immediately following import and prior to analyzing an imported program if import not performed , these scripts will execute once prior to any post - scripts

public void set pre scripts ( list < string > pre scripts ) { list < pair < string , string [ ] > > pre scripts empty args = new linked list < > ( ) ; for ( string pre script : pre scripts ) { pre scripts empty args add ( new pair < > ( pre script , new string [ 0 ] ) ) ; } set pre scripts with args ( pre scripts empty args ) ; }


adjusts player ' s controls manually because fits system windows doesn ' t work when multiple receivers adjust its bounds so when two listeners are present ( like in profile page ) the player ' s controls will not receive insets this method fixes it

protected boolean fit system windows ( final rect insets ) { final view group controls = find view by id ( r id playback control root ) ; if ( controls ! = null ) { controls set padding ( insets left , insets top , insets right , insets bottom ) ; } return super fit system windows ( insets ) ; }


incrementing exists ( ) calls from superclass for statistic collection

public boolean exists ( path f ) throws i o exception { stat increment ( call exist ) ; return super exists ( f ) ; }


set an array of basenames , each following { @ link java util resource bundle } conventions the default is a single basename " views " { @ code resource bundle } supports different locale suffixes for example , a base name of " views " might map to { @ code resource bundle } files " views " , " views en au " and " views de " the associated resource bundles will be checked sequentially when resolving a message code note that message definitions in a previous resource bundle will override ones in a later bundle , due to the sequential lookup note that resource bundle names are effectively classpath locations : as a consequence , the jdk ' s standard resource bundle treats dots as package separators this means that " test theme " is effectively equivalent to " testtheme " , just like it is for programmatic { @ code java util resource bundle } usage

public void set basenames ( string basenames ) { this basenames = basenames ; }


set the filename so that when the store ( ) method is called , the preferences are written to this file

public static void set filename ( string name ) { filename = name ; }


protected table records build table records ( table meta table meta , string select s q l , array list < list < object > > param appender list ) throws s q l exception { result set rs = null ; try ( prepared statement ps = statement proxy get connection ( ) prepare statement ( select s q l ) ) { if ( collection utils is not empty ( param appender list ) ) { for ( int i = 0 , ts = param appender list size ( ) ; i < ts ; i + + ) { list < object > param appender = param appender list get ( i ) ; for ( int j = 0 , ds = param appender size ( ) ; j < ds ; j + + ) { ps set object ( i * ds + j + 1 , param appender get ( j ) ) ; } } } rs = ps execute query ( ) ; return table records build records ( table meta , rs ) ; } finally { i o util close ( rs ) ; } }


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


show a { @ link option dialog # information message plain } { @ link ok dialog } with the given title and message

public static void show info ( string title , string message ) { swing run now ( ( ) - > { new ok dialog ( title , message , option dialog information message ) show ( ) ; } ) ; }


installs a list of plugins from a json post

public http response do install plugins ( stapler request req ) throws i o exception { jenkins get ( ) check permission ( jenkins administer ) ; string payload = i o utils to string ( req get input stream ( ) , req get character encoding ( ) ) ; j s o n object request = j s o n object from object ( payload ) ; j s o n array plugin list j s o n = request get j s o n array ( " plugins " ) ; list < string > plugins = new array list < > ( ) ; for ( int i = 0 ; i < plugin list j s o n size ( ) ; i + + ) { plugins add ( plugin list j s o n get string ( i ) ) ; } uuid correlation id = uuid random u u i d ( ) ; try { boolean dynamic load = request get boolean ( " dynamic load " ) ; install ( plugins , dynamic load , correlation id ) ; j s o n object response data = new j s o n object ( ) ; response data put ( " correlation id " , correlation id to string ( ) ) ; return hudson util http responses ok j s o n ( response data ) ; } catch ( exception e ) { return hudson util http responses error j s o n ( e get message ( ) ) ; } }


sets the uniform with the given name the { @ link shader program } must be bound for this to work

public void set uniformf ( string name , float value 1 , float value 2 , float value 3 , float value 4 ) { gl20 gl = gdx gl 2 0 ; check managed ( ) ; int location = fetch uniform location ( name ) ; gl gl uniform 4f ( location , value 1 , value 2 , value 3 , value 4 ) ; }


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

public static double quad tree cell size ( int level ) { assert level > = 0 ; return math sqrt ( earth polar distance * earth polar distance + earth equator * earth equator ) / ( 1l < < level ) ; }