public optional < consumer config > get default consumer ( ) { list < consumer config > consumer configs = get default configs ( get configs map ( get tag name ( consumer config class ) ) ) ; if ( collection utils is not empty ( consumer configs ) ) { return optional of ( consumer configs get ( 0 ) ) ; } return optional empty ( ) ; }


determine whether the given jdbc connection is transactional , that is , bound to the current thread by spring ' s transaction facilities

public static boolean is connection transactional ( connection con , @ nullable data source data source ) { if ( data source = = null ) { return false ; } connection holder con holder = ( connection holder ) transaction synchronization manager get resource ( data source ) ; return ( con holder ! = null & & connection equals ( con holder , con ) ) ; }


executes the given flush request against the engine

public void flush ( flush request request ) { final boolean wait if ongoing = request wait if ongoing ( ) ; final boolean force = request force ( ) ; logger trace ( " flush with { } " , request ) ; / * * we allow flushes while recovery since we allow operations to happen while recovering and we want to keep the translog under * control ( up to deletes , which we do not gc ) yet , we do not use flush internally to clear deletes and flush the index writer * since we use engine # write indexing buffer for this now * / verify not closed ( ) ; final long time = system nano time ( ) ; get engine ( ) flush ( force , wait if ongoing ) ; flush metric inc ( system nano time ( ) - time ) ; }


when invokers in directory changes after a failed request but just before a retry effort , then we should reselect from the latest invokers before retry

public void test invoker destroy and re list ( ) { final url url = url value of ( " test : / / localhost / " + demo class get name ( ) + " ? loadbalance = roundrobin & retries = " + retries ) ; rpc exception exception = new rpc exception ( rpc exception timeout exception ) ; mock invoker < demo > invoker 1 = new mock invoker < demo > ( demo class , url ) ; invoker 1 set exception ( exception ) ; mock invoker < demo > invoker 2 = new mock invoker < demo > ( demo class , url ) ; invoker 2 set exception ( exception ) ; final list < invoker < demo > > invokers = new array list < invoker < demo > > ( ) ; invokers add ( invoker 1 ) ; invokers add ( invoker 2 ) ; callable < object > callable = ( ) - > { / / simulation : all invokers are destroyed for ( invoker < demo > invoker : invokers ) { invoker destroy ( ) ; } invokers clear ( ) ; mock invoker < demo > invoker 3 = new mock invoker < demo > ( demo class , url ) ; invoker 3 set result ( async rpc result new default async result ( null ) ) ; invokers add ( invoker 3 ) ; return null ; } ; invoker 1 set callable ( callable ) ; invoker 2 set callable ( callable ) ; rpc invocation inv = new rpc invocation ( ) ; inv set method name ( " test " ) ; directory < demo > dic = new mock directory < demo > ( url , invokers ) ; failover cluster invoker < demo > clusterinvoker = new failover cluster invoker < demo > ( dic ) ; clusterinvoker invoke ( inv ) ; }


the largest integer allowed for this xml attribute only makes sense if the format includes format flags : : integer < code > optional int 3 2 max int = 3 ; < code >

private void set max int ( int value ) { bit field 0 | = 0x 0 0 0 0 0 0 0 4 ; max int = value ; }


returns a copy this data spec with additional http request headers headers in { @ code additional http request headers } will overwrite any headers already in the data spec that have the same keys

public data spec with additional headers ( map < string , string > additional http request headers ) { map < string , string > http request headers = new hash map < > ( this http request headers ) ; http request headers put all ( additional http request headers ) ; return new data spec ( uri , uri position offset , http method , http body , http request headers , position , length , key , flags , custom data ) ; }


private void out of band deletes ( final path test file path , final boolean allow authoritative ) throws exception { try { / / create initial file string text = " hello , world ! " ; write text file ( guarded fs , test file path , text , true ) ; await file status ( raw f s , test file path ) ; / / delete the file without s 3 guard ( raw ) delete file ( raw f s , test file path ) ; / / the check is the same if s 3guard is authoritative and if it ' s not / / it should be in the ms file status status = guarded fs get file status ( test file path ) ; log info ( " authoritative : { } status path : { } " , allow authoritative , status get path ( ) ) ; final boolean versioned change detection = is versioned change detection ( ) ; if ( ! versioned change detection ) { expect exception when reading ( test file path , text ) ; expect exception when reading open file a p i ( test file path , text , null ) ; expect exception when reading open file a p i ( test file path , text , status ) ; } else { / / fnfe not expected when using a bucket with object versioning final string read 1 = read ( guarded fs , test file path ) ; assert equals ( " file read from the auth fs " , text , read 1 ) ; / / and when the status is passed in , even the raw fs will ask for it / / via the version id in the status final string read 2 = read with status ( raw f s , status ) ; assert equals ( " file read from the raw fs " , text , read 2 ) ; } } finally { guarded fs delete ( test file path , true ) ; } }


private void disconnect ( channel sftp channel ) throws i o exception { connection pool disconnect ( channel ) ; }


returns the { @ link analytics collector } used for collecting analytics events

public analytics collector get analytics collector ( ) { return analytics collector ; }


executes { @ code callable } on the specified { @ code executor } , returning a { @ code future }

public static < o > listenable future < o > submit async ( async callable < o > callable , executor executor ) { trusted listenable future task < o > task = trusted listenable future task create ( callable ) ; executor execute ( task ) ; return task ; }


return the { @ link shard id } of this shard

public shard id get shard id ( ) { return shard id ; }


public void set ( int n , type type ) { set 0 ( n , type ) ; }


protected concurrent map < string , metric > build map ( ) { return empty concurrent map ; }


get the storage statistics of this filesystem

public s 3 a storage statistics get storage statistics ( ) { return storage statistics ; }


returns the table index for the counter at the specified depth

int index of ( int item , int i ) { long hash = ( item + seed [ i ] ) * seed [ i ] ; hash + = ( hash > > > 32 ) ; return ( ( int ) hash ) & table mask ; }


return all registered exception listener delegates ( as array )

public final exception listener [ ] get delegates ( ) { return this delegates to array ( new exception listener [ 0 ] ) ; }


test the property ' prefix namespace string '

public void prefix namespace string test ( ) { / / todo : test prefix namespace string }


public void set pointer size ( int pointer size ) { this pointer size = pointer size ; }


helper to manually escape a 7 - bit ascii character

private string escape ascii ( char c ) { preconditions check argument ( c < 128 ) ; string hex = " 0123456789abcdef " ; return " % " + hex char at ( ( c > > 4 ) & 0xf ) + hex char at ( c & 0xf ) ; }


transform the value of each input record into a new value ( with possible new type ) of the output record the provided { @ link value mapper } is applied to each input record value and computes a new value for it thus , an input record { @ code < k , v > } can be transformed into an output record { @ code < k : v ' > } this is a stateless record - by - record operation ( cf { @ link # transform values ( value transformer supplier , string ) } for stateful value transformation ) the example below counts the number of token of the value string { @ code k stream < string , string > input stream = builder stream ( " topic " ) ; k stream < string , integer > output stream = input stream map values ( new value mapper < string , integer > { integer apply ( string value ) { return value split ( " " ) length ; } } ) ; } setting a new value preserves data co - location with respect to the key thus , no internal data redistribution is required if a key based operator ( like an aggregation or join ) is applied to the result { @ code k stream } ( cf { @ link # map ( key value mapper ) } )

< vr > k stream < k , vr > map values ( final value mapper < ? super v , ? extends vr > mapper , final named named ) ;


test { @ link java j a x r s spec server codegen # add operation to group ( string , string , operation , codegen operation , map ) } for resource with path " " with " use tags "

public void test add operation to group for root resource and use tags true ( ) { codegen operation codegen operation = new codegen operation ( ) ; codegen operation operation id = " find primaryresource " ; codegen operation path = " / " ; operation operation = new operation ( ) ; map < string , list < codegen operation > > operation list = new hash map < > ( ) ; codegen set use tags ( true ) ; codegen add operation to group ( " primaryresource " , " / " , operation , codegen operation , operation list ) ; assert assert equals ( operation list size ( ) , 1 ) ; assert assert true ( operation list contains key ( " primaryresource " ) ) ; assert assert equals ( codegen operation base name , " primaryresource " ) ; }


run the last script by pressing the last script button and return output

protected string run last script ( string task name ) throws exception { task listener flag task flag = new task listener flag ( task name ) ; task utilities add tracked task listener ( task flag ) ; press run last script button ( ) ; wait for task end ( task flag ) ; string output = get console text ( ) ; clear console ( ) ; return output ; }


this method will be removed in a certain version after april 5 , 2020 , so please do not use this method

public void set broker suspend max time millis ( long broker suspend max time millis ) { this broker suspend max time millis = broker suspend max time millis ; }


opens the engine on top of the existing lucene engine and translog the translog is kept but its operations won ' t be replayed

public void open engine and skip translog recovery ( ) throws i o exception { assert routing entry ( ) recovery source ( ) get type ( ) = = recovery source type peer : " not a peer recovery [ " + routing entry ( ) + " ] " ; recovery state validate current stage ( recovery state stage translog ) ; load global checkpoint to replication tracker ( ) ; inner open engine and translog ( replication tracker ) ; get engine ( ) skip translog recovery ( ) ; }


schedules a task on { @ link # instance }

static public task schedule ( task task , float delay seconds , float interval seconds ) { return instance ( ) schedule task ( task , delay seconds , interval seconds ) ; }


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


compacts ( garbage collects ) partition with copy - compact strategy using compaction partition

private void compact partition ( final int partition number ) throws i o exception { / / do nothing if table was closed , parameter is invalid or no garbage exists if ( this closed | | partition number > = this partitions size ( ) | | this partitions get ( partition number ) is compacted ( ) ) { return ; } / / release all segments owned by compaction partition this compaction memory clear all memory ( available memory ) ; this compaction memory allocate segments ( 1 ) ; this compaction memory push down pages ( ) ; t temp holder = this build side serializer create instance ( ) ; final int num partitions = this partitions size ( ) ; in memory partition < t > partition = this partitions remove ( partition number ) ; memory segment [ ] overflow segments = partition overflow segments ; long pointer ; int pointer offset ; int bucket offset ; final int buckets per segment = this buckets per segment mask + 1 ; for ( int i = 0 , bucket = partition number ; i < this buckets length & & bucket < this num buckets ; i + + ) { memory segment segment = this buckets [ i ] ; / / go over all buckets in the segment belonging to the partition for ( int k = bucket % buckets per segment ; k < buckets per segment & & bucket < this num buckets ; k + = num partitions , bucket + = num partitions ) { bucket offset = k * hash bucket size ; if ( ( int ) segment get ( bucket offset + header partition offset ) ! = partition number ) { throw new i o exception ( " accessed wrong bucket ! wanted : " + partition number + " got : " + segment get ( bucket offset + header partition offset ) ) ; } / / loop over all segments that are involved in the bucket ( original bucket plus / / overflow buckets ) int count in segment = segment get int ( bucket offset + header count offset ) ; int num in segment = 0 ; pointer offset = bucket offset + bucket pointer start offset ; while ( true ) { while ( num in segment < count in segment ) { pointer = segment get long ( pointer offset ) ; temp holder = partition read record at ( pointer , temp holder ) ; pointer = this compaction memory append record ( temp holder ) ; segment put long ( pointer offset , pointer ) ; pointer offset + = pointer len ; num in segment + + ; } / / this segment is done check if there is another chained bucket final long forward pointer = segment get long ( bucket offset + header forward offset ) ; if ( forward pointer = = bucket forward pointer not set ) { break ; } final int overflow seg num = ( int ) ( forward pointer > > > 32 ) ; segment = overflow segments [ overflow seg num ] ; bucket offset = ( int ) forward pointer ; count in segment = segment get int ( bucket offset + header count offset ) ; pointer offset = bucket offset + bucket pointer start offset ; num in segment = 0 ; } segment = this buckets [ i ] ; } } / / swap partition with compaction partition this compaction memory set partition number ( partition number ) ; this partitions add ( partition number , compaction memory ) ; this partitions get ( partition number ) overflow segments = partition overflow segments ; this partitions get ( partition number ) num overflow segments = partition num overflow segments ; this partitions get ( partition number ) next overflow bucket = partition next overflow bucket ; this partitions get ( partition number ) set is compacted ( true ) ; / / this partitions get ( partition number ) push down pages ( ) ; this compaction memory = partition ; this compaction memory reset record counter ( ) ; this compaction memory set partition number ( - 1 ) ; this compaction memory overflow segments = null ; this compaction memory num overflow segments = 0 ; this compaction memory next overflow bucket = 0 ; / / try to allocate maximum segment count this compaction memory clear all memory ( this available memory ) ; int max segment number = this get max partition ( ) ; this compaction memory allocate segments ( max segment number ) ; this compaction memory reset r w views ( ) ; this compaction memory push down pages ( ) ; }


returns whether the tag lists for the given functions contain the same items ; order is unimportant

public boolean is same ( object obj 1 , object obj 2 ) { function d b f 1 = ( function d b ) obj 1 ; function d b f 2 = ( function d b ) obj 2 ; if ( f 1 = = null & & f 2 = = null ) { / / both null - neither is a function so just return true return true ; } if ( f 1 = = null | | f 2 = = null ) { / / someone is not a function , return false return false ; } / / get the tag lists and check if they ' re the same collection < function tag > f 1 tags = f 1 get tags ( ) ; collection < function tag > f 2 tags = f 2 get tags ( ) ; return f 1 tags equals ( f 2 tags ) ; }


clears { @ link # supplemental data } and ensures that it ' s large enough to accommodate { @ code length } bytes

public void reset supplemental data ( int length ) { if ( supplemental data = = null | | supplemental data capacity ( ) < length ) { supplemental data = byte buffer allocate ( length ) ; } else { supplemental data clear ( ) ; } }


generate a { @ link snapshot diff report listing } based on detailed diff information

public snapshot diff report listing generate report ( ) { return new snapshot diff report listing ( last path , modified list , created list , deleted list , last index , is from earlier ( ) ) ; }


public test body with query params oper req spec ( consumer < request spec builder > req spec customizer ) { req spec customizer accept ( req spec ) ; return this ; }


public static void main ( string [ ] args ) { var service = service locator get service ( jndi service a ) ; service execute ( ) ; service = service locator get service ( jndi service b ) ; service execute ( ) ; service = service locator get service ( jndi service a ) ; service execute ( ) ; service = service locator get service ( jndi service a ) ; service execute ( ) ; }


returns the files necessary for an ' objcopy ' invocation

public nested set < artifact > get objcopy files ( ) { return objcopy files ; }


public resource set get resource set ( ) { return resource set ; }


adds an individual resource file to the root directory of the apk this provides the same functionality as { @ code java resource zip } , except much more hacky will most probably won ' t work if there is an input artifact in the same directory as this file

public apk actions builder set java resource file ( artifact java resource file ) { this java resource file = java resource file ; return this ; }


returns the absolute url of this item this relies on the current { @ link stapler request } to figure out what the host name is , so can be used only during processing client requests

default string get absolute url ( ) { string r = jenkins get ( ) get root url ( ) ; if ( r = = null ) throw new illegal state exception ( " root url isn ' t configured yet cannot compute absolute url " ) ; return util encode ( r + get url ( ) ) ; }


return the request that { @ link # do filter } has been called with

public servlet request get request ( ) { return this request ; }


return the time ( according to system current time millis ( ) ) at which the service of this request was started

public long get start time ( ) { return start time millis ; }


the filename is only used in the to string representation

void set file name ( string file name ) { this file name = file name ; }


public void add pet test ( ) { pet body = null ; api add pet ( body ) ; / / todo : test validations }


get the timeline entities that the given user have access to the meaning of each argument has been documented with { @ link timeline reader # get entities }

public timeline entities get entities ( string entity type , name value pair primary filter , collection < name value pair > secondary filter , long window start , long window end , string from id , long from ts , long limit , enum set < field > fields , user group information caller u g i ) throws yarn exception , i o exception { long start time = time monotonic now ( ) ; metrics incr get entities ops ( ) ; try { timeline entities entities = do get entities ( entity type , primary filter , secondary filter , window start , window end , from id , from ts , limit , fields , caller u g i ) ; metrics incr get entities total ( entities get entities ( ) size ( ) ) ; return entities ; } finally { metrics add get entities time ( time monotonic now ( ) - start time ) ; } }


record statistics and perform rule checking for the given resource with the provided classification

entry entry with type ( string name , int resource type , entry type traffic type , int batch count , boolean prioritized , object [ ] args ) throws block exception ;


partially expands variable value at the given offset if some of the variable references , used in the value , can not be found , they are left unexpanded

public ninja variable value get reduced value ( long offset , ninja variable value value , immutable set < string > variables to not expand , interner < string > interner ) { / / cache expanded variables values to save time replacing several references to the same / / variable / / this cache is local to the offset , it depends on the offset of the variable we are expanding map < string , string > cache = maps new hash map ( ) ; / / we are using the start offset of the value holding the reference to the variable / / do the same as ninja implementation : if the variable is not found , use empty string function < string , string > expander = ref - > compute expanded string ( offset , ref , cache , variables to not expand , interner ) ; return value reduce ( expander ) ; }


public void set prepare method ( method prepare method ) { this prepare method = prepare method ; }


parses cds resource for a non - aggregate cluster ( eds or logical dns ) into { @ link io grpc xds xds client cds update } returns { @ code null } and nack the response with the given nonce if the resource is invalid

private cds update parse non aggregate cluster ( cluster cluster , string nonce , string lb policy , set < string > eds resources ) { string cluster name = cluster get name ( ) ; string lrs server name = null ; long max concurrent requests = null ; upstream tls context upstream tls context = null ; if ( cluster has lrs server ( ) ) { if ( ! cluster get lrs server ( ) has self ( ) ) { nack response ( resource type cds , nonce , " cluster " + cluster name + " : only support lrs for the same management server " ) ; return null ; } lrs server name = " " ; } if ( cluster has circuit breakers ( ) ) { list < thresholds > thresholds = cluster get circuit breakers ( ) get thresholds list ( ) ; for ( thresholds threshold : thresholds ) { if ( threshold get priority ( ) ! = routing priority default ) { continue ; } if ( threshold has max requests ( ) ) { max concurrent requests = ( long ) threshold get max requests ( ) get value ( ) ; } } } if ( cluster has transport socket ( ) & & transport socket name tls equals ( cluster get transport socket ( ) get name ( ) ) ) { any any = cluster get transport socket ( ) get typed config ( ) ; if ( any get type url ( ) equals ( type url upstream tls context v2 ) ) { any = any to builder ( ) set type url ( type url upstream tls context ) build ( ) ; } io envoyproxy envoy extensions transport sockets tls v 3 upstream tls context unpacked ; try { unpacked = any unpack ( io envoyproxy envoy extensions transport sockets tls v 3 upstream tls context class ) ; } catch ( invalid protocol buffer exception e ) { nack response ( resource type cds , nonce , " cluster " + cluster name + " : invalid upstream tls context : " + e ) ; return null ; } upstream tls context = upstream tls context from envoy proto upstream tls context ( unpacked ) ; } discovery type type = cluster get type ( ) ; if ( type = = discovery type eds ) { string eds service name = null ; io envoyproxy envoy config cluster v 3 cluster eds cluster config eds cluster config = cluster get eds cluster config ( ) ; if ( ! eds cluster config get eds config ( ) has ads ( ) ) { nack response ( resource type cds , nonce , " cluster " + cluster name + " : " + " field eds cluster config must be set to indicate to use eds over ads " ) ; return null ; } / / if the service name field is set , that value will be used for the eds request if ( ! eds cluster config get service name ( ) is empty ( ) ) { eds service name = eds cluster config get service name ( ) ; eds resources add ( eds service name ) ; } else { eds resources add ( cluster name ) ; } eds cluster config config = new eds cluster config ( lb policy , eds service name , lrs server name , max concurrent requests , upstream tls context ) ; return new cds update ( cluster name , cluster type eds , config ) ; } else if ( type equals ( discovery type logical dns ) ) { logical dns cluster config config = new logical dns cluster config ( lb policy , lrs server name , max concurrent requests , upstream tls context ) ; return new cds update ( cluster name , cluster type logical dns , config ) ; } nack response ( resource type cds , nonce , " cluster " + cluster name + " : unsupported built - in discovery type : " + type ) ; return null ; }


this test makes sure that we have a valid node id after the check node u u i d is done

public void test datanode uuid ( ) throws exception { final inet socket address nn addr = new inet socket address ( " localhost " , 5020 ) ; configuration conf = new hdfs configuration ( ) ; conf set ( d f s config keys dfs datanode address key , " 0 0 0 0 : 0 " ) ; conf set ( d f s config keys dfs datanode http address key , " 0 0 0 0 : 0 " ) ; conf set ( d f s config keys dfs datanode ipc address key , " 0 0 0 0 : 0 " ) ; file system set default uri ( conf , " hdfs : / / " + nn addr get host name ( ) + " : " + nn addr get port ( ) ) ; array list < storage location > locations = new array list < > ( ) ; data node dn = new data node ( conf , locations , null , null ) ; / / assert that node i d is null string null string = null ; assert equals ( dn get datanode uuid ( ) , null string ) ; / / check data node u u i d will create an uuid if uuid is null dn check datanode uuid ( ) ; / / make sure that we have a valid data node u u i d at that point of time assert not equals ( dn get datanode uuid ( ) , null string ) ; }


called when the camera motion track position is reset or the track is disabled


set the listener which is triggered whenever a { @ link state store } is being restored in order to resume processing

public void set global state restore listener ( final state restore listener global state restore listener ) { synchronized ( state lock ) { if ( state = = state created ) { this global state restore listener = global state restore listener ; } else { throw new illegal state exception ( " can only set global state restore listener in created state " + " current state is : " + state ) ; } } }


returns the value of this { @ code unsigned long } as a { @ code float } , analogous to a widening primitive conversion from { @ code long } to { @ code float } , and correctly rounded

public float float value ( ) { @ suppress warnings ( " cast " ) float f value = ( float ) ( value & unsigned mask ) ; if ( value < 0 ) { f value + = 0x 1 0p 6 3f ; } return f value ; }


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


boolean await ( long timeout , time unit time unit ) throws interrupted exception ;


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

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


set the read - only status of this transaction the default is { @ code false }

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


creates a standard conflict count message for an address range this indicates which conflict you are resolving of some total number of conflicts for a given address range

public static string get conflict count ( int conflict num , int total conflicts , address range range ) { string buffer buf = new string buffer ( get conflict count ( conflict num , total conflicts ) ) ; buf append ( " for address range : " ) ; add address ( buf , range get min address ( ) ) ; buf append ( " - " ) ; add address ( buf , range get max address ( ) ) ; return buf to string ( ) ; }


resolve events internal set implementation may filter events from the collection to only return the one that is appropriate for this request the default implementation returns the entire collection

protected set < event > resolve events internal ( final collection < event > resolve events , final authentication authentication , final registered service registered service , final http servlet request request , final request context context ) { if ( ! resolve events is empty ( ) ) { logger trace ( " collection of resolved events for this authentication sequence are : " ) ; resolve events for each ( e - > logger trace ( " event id [ { } ] resolved from [ { } ] " , e get id ( ) , e get source ( ) get class ( ) get name ( ) ) ) ; } else { logger trace ( " no events resolved for authentication transaction [ { } ] and service [ { } ] " , authentication , registered service ) ; } val pair = filter events by multifactor authentication provider ( resolve events , authentication , registered service , request ) ; web utils put resolved multifactor authentication providers ( context , pair get value ( ) ) ; return new hash set < > ( pair get key ( ) ) ; }


returns true if field success is set ( has been assigned a value ) and false otherwise

public boolean is set success ( ) { return isset bit vector get ( success isset id ) ; }


ensures that an object reference passed as a parameter to the calling method is not null see { @ link # check not null ( object , string , object ) } for details

public static < t extends object > t check not null ( @ non null decl t obj , @ nullable decl string error message template , @ nullable decl object p 1 , char p 2 ) { if ( obj = = null ) { throw new null pointer exception ( lenient format ( error message template , p 1 , p 2 ) ) ; } return obj ; }


creates a { @ link future combiner } requiring that all passed in futures are successful if any input fails , the returned future fails immediately

public static < v > future combiner < v > when all succeed ( listenable future < ? extends v > futures ) { return new future combiner < v > ( true , immutable list copy of ( futures ) ) ; }


adds an output artifact if it is non - null

public busy box action builder maybe add output ( @ compile time constant string arg , @ nullable artifact value ) { if ( value ! = null ) { return add output ( arg , value ) ; } return this ; }


returns the required amount of padding for input buffers in bytes , or { @ link c # length unset } if the underlying library is not available

public static int get input buffer padding size ( ) { if ( ! is available ( ) ) { return c length unset ; } if ( input buffer padding size = = c length unset ) { input buffer padding size = ffmpeg get input buffer padding size ( ) ; } return input buffer padding size ; }


returns the shard criteria to get store information on

public enum set < cluster health status > shard statuses ( ) { return statuses ; }


public boolean recycle ( ) { msg = null ; promise = null ; handle recycle ( this ) ; return true ; }


public boolean flush ( final int flush least pages ) { return this mapped file queue flush ( flush least pages ) ; }


the optinal style from which this style inherits attributes < code > optional aapt pb reference parent = 1 ; < code >

public builder clear parent ( ) { copy on write ( ) ; instance clear parent ( ) ; return this ; }


upgrades to another protocol from http removes the { @ link http request decoder } and { @ link http response encoder } from the pipeline

public void upgrade from ( channel handler context ctx ) { ctx pipeline ( ) remove ( this ) ; }


add a user with optional salted password hash

void add user ( string username , char [ ] salted password hash ) throws duplicate name exception , i o exception { if ( salted password hash = = null & & enable local passwords ) { salted password hash = get default password hash ( ) ; } add user ( username , salted password hash , null ) ; }


sets the { @ link value type } for the value produced by this aggregation

public ab user value type hint ( value type value type ) { if ( value type = = null ) { throw new illegal argument exception ( " [ user value type hint ] must not be null : [ " + name + " ] " ) ; } this user value type hint = value type ; return ( ab ) this ; }


writes a boolean as a typed bytes sequence

public void write bool ( boolean b ) throws i o exception { out write ( type bool code ) ; out write boolean ( b ) ; }


re - check current trace need profiling , in case that third - party plugins change the operation name

public void profiling recheck ( tracing context tracing context , string trace segment id , string first span o p name ) { / / get current profiling task , check need profiling final profile task execution context execution context = task execution context get ( ) ; if ( execution context = = null ) { return ; } execution context profiling recheck ( tracing context , trace segment id , first span o p name ) ; }


adds projection to choose the fields used by join condition

private frame add projection for exists ( frame frame ) { final list < integer > cor indices = new array list < > ( frame get cor input ref indices ( ) ) ; final rel node rel = frame r ; final rel data type row type = rel get row type ( ) ; if ( cor indices size ( ) = = row type get field count ( ) ) { / / no need projection return frame ; } final list < rex node > projects = new array list < > ( ) ; final map < integer , integer > map input to output = new hash map < > ( ) ; collections sort ( cor indices ) ; int new pos = 0 ; for ( int index : cor indices ) { projects add ( rex input ref of ( index , row type ) ) ; map input to output put ( index , new pos + + ) ; } rel builder clear ( ) ; rel builder push ( frame r ) ; rel builder project ( projects ) ; final rel node new project = rel builder build ( ) ; final rex node new condition = adjust input refs ( frame c , map input to output , new project get row type ( ) ) ; / / there is no old rel node corresponding to new project , so old to new outputs is empty return new frame ( rel , new project , new condition , new hash map < > ( ) ) ; }


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


setter for the timestamp that this connection was checked out

public void set checkout timestamp ( long timestamp ) { this checkout timestamp = timestamp ; }


saves the given fingerprint as xml inside file

public static void save ( fingerprint fp , file file ) throws i o exception { if ( fp get persisted facets ( ) is empty ( ) ) { file get parent file ( ) mkdirs ( ) ; / / jenkins - 16301 : fast path for the common case atomic file writer afw = new atomic file writer ( file ) ; try ( print writer w = new print writer ( afw ) ) { w println ( " < ? xml version = ' 1 1 ' encoding = ' utf - 8 ' ? > " ) ; w println ( " < fingerprint > " ) ; w print ( " < timestamp > " ) ; w print ( date converter to string ( fp get timestamp ( ) ) ) ; w println ( " < / timestamp > " ) ; if ( fp get original ( ) ! = null ) { w println ( " < original > " ) ; w print ( " < name > " ) ; w print ( util xml escape ( fp get original ( ) get name ( ) ) ) ; w println ( " < / name > " ) ; w print ( " < number > " ) ; w print ( fp get original ( ) get number ( ) ) ; w println ( " < / number > " ) ; w println ( " < / original > " ) ; } / / todo ( oleg nenashev ) : consider renaming the field : https : / / issues jenkins - ci org / browse / jenkins - 25808 w print ( " < md 5sum > " ) ; w print ( fp get hash string ( ) ) ; w println ( " < / md 5sum > " ) ; w print ( " < file name > " ) ; w print ( util xml escape ( fp get file name ( ) ) ) ; w println ( " < / file name > " ) ; w println ( " < usages > " ) ; for ( map entry < string , fingerprint range set > e : fp get usages ( ) entry set ( ) ) { w println ( " < entry > " ) ; w print ( " < string > " ) ; w print ( util xml escape ( e get key ( ) ) ) ; w println ( " < / string > " ) ; w print ( " < ranges > " ) ; w print ( fingerprint range set converter impl serialize ( e get value ( ) ) ) ; w println ( " < / ranges > " ) ; w println ( " < / entry > " ) ; } w println ( " < / usages > " ) ; w println ( " < facets / > " ) ; w print ( " < / fingerprint > " ) ; w flush ( ) ; afw commit ( ) ; } finally { afw abort ( ) ; } } else { / / slower fallback that can persist facets get config file ( file ) write ( fp ) ; } }


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


attaches the tool tip from the gui resources that corresponds to the given key , to the given component

private static j component tip ( j component component , string message key ) { component set tool tip text ( msg ( message key ) ) ; return component ; }


return the custom return value handlers , or { @ code null }

public list < handler method return value handler > get custom return value handlers ( ) { return this custom return value handlers ; }


returns a new , empty builder for { @ link immutable int array } instances , sized to hold up to { @ code initial capacity } values without resizing the returned builder is not thread - safe < b > performance note : < b > when feasible , { @ code initial capacity } should be the exact number of values that will be added , if that knowledge is readily available it is better to guess a value slightly too high than slightly too low if the value is not exact , the { @ link immutable int array } that is built will very likely occupy more memory than strictly necessary ; to trim memory usage , build using { @ code builder build ( ) trimmed ( ) }

public static builder builder ( int initial capacity ) { check argument ( initial capacity > = 0 , " invalid initial capacity : % s " , initial capacity ) ; return new builder ( initial capacity ) ; }


public string get executor thread prefix ( ) { return config get config ( configuration keys server executor thread prefix , default executor thread prefix ) ; }


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


convenient call for { @ link abstract dao # delete all ( ) }

public < t > void delete all ( class < t > entity class ) { @ suppress warnings ( " unchecked " ) abstract dao < t , ? > dao = ( abstract dao < t , ? > ) get dao ( entity class ) ; dao delete all ( ) ; }


triggers any actions that have not yet been triggered and that are scheduled to be triggered at or before this scheduler ' s present time

public void trigger actions ( ) { trigger actions ( time ) ; }


sets a new { @ link tree prop } for the next layout pass

public litho view rule set tree prop ( class < ? > klass , object instance ) { tree props props = m context get tree props ( ) ; if ( props = = null ) { props = new tree props ( ) ; } props put ( klass , instance ) ; m context set tree props ( props ) ; return this ; }


debug method for dumping additional substreams from this { @ link pdb debug info } - based instance

protected void dump additional substreams ( writer writer ) throws i o exception { symbol records dump ( writer ) ; writer write ( " \ n " ) ; global symbol information dump ( writer ) ; writer write ( " \ n " ) ; public symbol information dump ( writer ) ; }


starts specifying how to combine four { @ link closing future } s into a single pipeline , assuming they all succeed if any fail , the resulting pipeline will fail calling this method allows you to use lambdas or method references typed with the types of the input { @ link closing future } s

public static < v1 , v2 , v3 , v4 > combiner 4 < v1 , v2 , v3 , v4 > when all succeed ( closing future < v1 > future 1 , closing future < v2 > future 2 , closing future < v3 > future 3 , closing future < v4 > future 4 ) { return new combiner 4 < > ( future 1 , future 2 , future 3 , future 4 ) ; }


search resources in caller ' s classloader

private static set < string > get resources ( string path ) throws i o exception { enumeration < url > urls = class utils get caller class loader ( version class ) get resources ( path ) ; set < string > files = new hash set < string > ( ) ; while ( urls has more elements ( ) ) { url url = urls next element ( ) ; if ( url ! = null ) { string file = url get file ( ) ; if ( string utils is not empty ( file ) ) { files add ( file ) ; } } } return files ; }


locates the field of the name < code > field name < code > on the given class if the given class does not contain the field , then this method will recursively call up < code > containing class < code > ' s implementation tree looking for a parent implementation of the requested field

public static field locate static field object on class ( string field name , class < ? > containing class ) { field field = null ; try { field = containing class get declared field ( field name ) ; } catch ( no such field exception nsfe ) { / / o k , the field may be located on a parent class so , we / / will call this method on the parent class class < ? > parent class = containing class get superclass ( ) ; if ( parent class ! = null ) { field = locate field object on class ( field name , parent class ) ; } } return field ; }


long get authentication token ( ) { return authentication token ; }


trigger a flush on the given hibernate session , converting regular { @ link hibernate exception } instances as well as hibernate 5 2 ' s { @ link persistence exception } wrappers accordingly

static void flush ( session session , boolean synch ) throws data access exception { if ( synch ) { logger debug ( " flushing hibernate session on transaction synchronization " ) ; } else { logger debug ( " flushing hibernate session on explicit request " ) ; } try { session flush ( ) ; } catch ( hibernate exception ex ) { throw convert hibernate access exception ( ex ) ; } catch ( persistence exception ex ) { if ( ex get cause ( ) instanceof hibernate exception ) { throw convert hibernate access exception ( ( hibernate exception ) ex get cause ( ) ) ; } throw ex ; } }


get the value of the < code > name < code > property , < code > null < code > if no such property exists if the key is deprecated , it returns the value of the first key which replaces the deprecated key and is not null values are processed for < a href = " # variable expansion " > variable expansion before being returned

public string get ( string name ) { string [ ] names = handle deprecation ( deprecation context get ( ) , name ) ; string result = null ; for ( string n : names ) { result = substitute vars ( get props ( ) get property ( n ) ) ; } return result ; }


get all { @ link node listener } s registered in jenkins

public static @ non null list < node listener > all ( ) { return extension list lookup ( node listener class ) ; }


sets the { @ link disk cache strategy } to use for this load defaults to { @ link disk cache strategy # automatic } for most applications { @ link disk cache strategy # resource } is ideal applications that use the same resource multiple times in multiple sizes and are willing to trade off some speed and disk space in return for lower bandwidth usage may want to consider using { @ link disk cache strategy # data } or { @ link disk cache strategy # all }

public t disk cache strategy ( @ non null disk cache strategy strategy ) { if ( is auto clone enabled ) { return clone ( ) disk cache strategy ( strategy ) ; } this disk cache strategy = preconditions check not null ( strategy ) ; fields | = disk cache strategy ; return self or throw if locked ( ) ; }


public target type get target type ( ) { return target type ; }


return the applicable { @ link network receive } instance , if any for the client side this may be a response that has been partially read , a non - null instance that has had no data read into it yet , or null ; if it is non - null then this is the instance that data should initially be read into during re - authentication for the server side this is mandatory and it must contain the { @ code sasl handshake request } that has been received on the server and that initiates re - authentication

public network receive network receive ( ) { return network receive ; }


return the session attribute value or if not present raise an { @ link illegal argument exception }

default < t > t get required attribute ( string name ) { t value = get attribute ( name ) ; assert not null ( value , ( ) - > " required attribute ' " + name + " ' is missing " ) ; return value ; }


test the property ' map with undeclared properties anytype 3 '

public void map with undeclared properties anytype 3 test ( ) { / / todo : test map with undeclared properties anytype 3 }


returns the value of the stored { @ link translation settings definition # get translated value ( settings ) translated settings } string

public string get translated value ( ) { return translated value ; }


sets the is deferred flag to indicate that the application of the information should be done when the { @ link @ deferred apply ( ) } method is called

void set deferred ( ) { is deferred = true ; }


given a frame number , prepares the canvas to render based on the nearest cached frame at or before the frame on return the canvas will be prepared as if the nearest cached frame had been rendered and disposed the returned index is the next frame that needs to be composited onto the canvas

private int prepare canvas with closest cached frame ( int previous frame number , canvas canvas ) { for ( int index = previous frame number ; index > = 0 ; index - - ) { frame needed result needed result = is frame needed for rendering ( index ) ; switch ( needed result ) { case required : animated drawable frame info frame info = m animated drawable backend get frame info ( index ) ; closeable reference < bitmap > start bitmap = m callback get cached bitmap ( index ) ; if ( start bitmap ! = null ) { try { canvas draw bitmap ( start bitmap get ( ) , 0 , 0 , null ) ; if ( frame info disposal method = = disposal method dispose to background ) { dispose to background ( canvas , frame info ) ; } return index + 1 ; } finally { start bitmap close ( ) ; } } else { if ( is key frame ( index ) ) { return index ; } else { / / keep going break ; } } case not required : return index + 1 ; case abort : return index ; case skip : default : / / keep going } } return 0 ; }


public static type bearer merge type ( type bearer ft 1 , type bearer ft 2 ) { if ( ( ft 1 = = null ) | | ft 1 equals ( ft 2 ) ) { return ft 1 ; } else if ( ft 2 = = null ) { return null ; } else { type type 1 = ft 1 get type ( ) ; type type 2 = ft 2 get type ( ) ; if ( type 1 = = type 2 ) { return type 1 ; } else if ( type 1 is reference ( ) & & type 2 is reference ( ) ) { if ( type 1 = = type known null ) { / * * a known - null merges with any other reference type to * be that reference type * / return type 2 ; } else if ( type 2 = = type known null ) { / * * the same as above , but this time it ' s type 2 that ' s * the known - null * / return type 1 ; } else if ( type 1 is array ( ) & & type 2 is array ( ) ) { type bearer component union = merge type ( type 1 get component type ( ) , type 2 get component type ( ) ) ; if ( component union = = null ) { / * * at least one of the types is a primitive type , * so the merged result is just object * / return type object ; } return ( ( type ) component union ) get array type ( ) ; } else { / * * all other unequal reference types get merged to be * object in this phase this is fine here , but it * won ' t be the right thing to do in the verifier * / return type object ; } } else if ( type 1 is intlike ( ) & & type 2 is intlike ( ) ) { / * * merging two non - identical int - like types results in * the type int * / return type int ; } else { return null ; } } }


get partition of which the node belongs to , if node - labels of this node is empty or null , it belongs to no label partition and since we only support one partition for each node ( yarn - 2694 ) , first label will be its partition

public string get partition ( ) { if ( this labels = = null | | this labels is empty ( ) ) { return r m node labels manager no label ; } else { return this labels iterator ( ) next ( ) ; } }


protected optional < s t s client factory s t s client > prepare s t s client ( ) throws i o exception { return maybe init s t s ( ) ; }


given " case when p 1 then v 1 else e end " returns [ ( p 1 , v 1 ) , , ( true , e ) ]

private static list < case branch > from case operands ( rex builder rex builder , list < rex node > operands ) { list < case branch > ret = new array list < > ( ) ; for ( int i = 0 ; i < operands size ( ) - 1 ; i + = 2 ) { ret add ( new case branch ( operands get ( i ) , operands get ( i + 1 ) ) ) ; } ret add ( new case branch ( rex builder make literal ( true ) , util last ( operands ) ) ) ; return ret ; }


return the thread pool executor ' s keep - alive seconds

public int get keep alive seconds ( ) { synchronized ( this pool size monitor ) { return this keep alive seconds ; } }


returns a view of the { @ linkplain range # is connected disconnected } ranges that make up this range set the returned set may be empty the iterators returned by its { @ link iterable # iterator } method return the ranges in increasing order of lower bound ( equivalently , of upper bound )


public static void remove runtime shutdown hook ( ) { runtime get runtime ( ) remove shutdown hook ( shutdown hook ) ; }


public final field context build field context ( string field ) { mapped field type ft = get field type ( field ) ; if ( ft = = null ) { / / the field is unmapped return null ; } return new field context ( field , build field data ( ft ) , ft ) ; }


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


replace deprecated configuration properties for { @ link flink kinesis producer } this should be remove along with deprecated keys

public static properties replace deprecated producer keys ( properties config props ) { / / replace deprecated key if ( config props contains key ( producer config constants collection max count ) ) { config props set property ( collection max count , config props get property ( producer config constants collection max count ) ) ; config props remove ( producer config constants collection max count ) ; } / / replace deprecated key if ( config props contains key ( producer config constants aggregation max count ) ) { config props set property ( aggregation max count , config props get property ( producer config constants aggregation max count ) ) ; config props remove ( producer config constants aggregation max count ) ; } return config props ; }


collects transitive instrumentation data from dependencies , collects local source files from dependencies , collects local metadata files by traversing the action graph of the current configured target , collect rule - specific instrumentation support file sand creates baseline coverage actions for the transitive closure of source files ( if < code > with baseline coverage < code > is true )

public static instrumented files info collect ( rule context rule context , instrumentation spec spec , local metadata collector local metadata collector , iterable < artifact > root files , nested set < artifact > coverage support files , nested set < pair < string , string > > coverage environment , boolean with baseline coverage ) { return collect ( rule context , spec , local metadata collector , root files , coverage support files , coverage environment , with baseline coverage , / * reported to actual sources = * / nested set builder < pair < string , string > > empty set ( order stable order ) ) ; }


find purchase order by id for valid response try integer i ds with value & lt ; & # x 3 d ; 5 or & gt ; 10 other values will generated exceptions

public order get order by id ( @ path param ( " order id " ) @ min ( 1l ) @ max ( 5l ) long order id ) ;


get the assumed role referenced by assumed role arn ; skip the test if it is unset

public static string probe for assumed role a r n ( configuration conf ) { string arn = conf get trimmed ( assumed role arn , " " ) ; assume assume true ( " no arn defined in " + assumed role arn , ! arn is empty ( ) ) ; return arn ; }


returns a set that matches only the provided { @ code file types } if { @ code file types } is empty , the returned predicate will match no files

public static file type set of ( iterable < file type > file types ) { if ( iterables is empty ( file types ) ) { return file type set no file ; } else { return new file type set ( file types ) ; } }


return the difference of this vector and another ; does not alter either one

public final vec 2 sub ( vec 2 v ) { return new vec 2 ( x - v x , y - v y ) ; }


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


create a synthetic successful response using { @ code headers } with { @ code body } as the deserialized body

public static < t > response < t > success ( @ nullable t body , headers headers ) { objects require non null ( headers , " headers = = null " ) ; return success ( body , new okhttp 3 response builder ( ) / / code ( 200 ) message ( " ok " ) protocol ( protocol http 1 1 ) headers ( headers ) request ( new request builder ( ) url ( " http : / / localhost / " ) build ( ) ) build ( ) ) ; }


encode the given object into a byte array with the default charset

byte [ ] encode ( r r ) throws exception ;


populate a new abfs client context instance with the desired properties

private abfs client context populate abfs client context ( ) { return new abfs client context builder ( ) with exponential retry policy ( new exponential retry policy ( abfs configuration get max io retries ( ) ) ) with abfs counters ( abfs counters ) with abfs perf tracker ( abfs perf tracker ) build ( ) ; }


public memory size get task off heap memory ( ) { throw unsupported operation execption if unknown ( ) ; return task off heap memory ; }


gets the default value returned by visitor methods this value is returned by the default implementations of { @ link # visit terminal visit terminal } , { @ link # visit error node visit error node } the default implementation of { @ link # visit children visit children } initializes its aggregate result to this value the base implementation returns { @ code null }

protected t default result ( ) { return null ; }


creates a new file in the specified directory , with the specified name and the specified file contents this method will add a newline terminator to the end of the contents string in the destination file

private file create file ( file directory , string name , string contents ) throws i o exception { file new file = new file ( directory , name ) ; print writer pw = new print writer ( new file ) ; try { pw println ( contents ) ; } finally { pw close ( ) ; } return new file ; }


obtain domain objects from files and lock if unable to lock one or more of the files , none are locked and null is returned

private domain object [ ] lock domain objects ( list < domain file > files ) { domain object [ ] objs = new domain object [ files size ( ) ] ; int last index = 0 ; boolean locked = true ; while ( last index < files size ( ) ) { try { objs [ last index ] = files get ( last index ) get domain object ( this , false , false , null ) ; } catch ( throwable t ) { msg error ( this , " failed to aqcuire domain object instance " , t ) ; locked = false ; break ; } if ( ! objs [ last index ] lock ( null ) ) { string title = " exit ghidra " ; string buffer buf = new string buffer ( ) ; undoable domain object udo = ( undoable domain object ) objs [ last index ] ; buf append ( " the file " + files get ( last index ) get pathname ( ) + " is currently being modified by the \ n " ) ; buf append ( " the following actions : \ n \ n " ) ; transaction t = udo get current transaction ( ) ; list < string > list = t get open sub transactions ( ) ; iterator < string > it = list iterator ( ) ; while ( it has next ( ) ) { buf append ( " \ n " ) ; buf append ( it next ( ) ) ; } buf append ( " \ n \ n " ) ; buf append ( " you may exit ghidra , but the above action ( s ) will be aborted and all \ n " ) ; buf append ( " changes made by those actions ( and all changes made since those \ n " ) ; buf append ( " actions started ) , will be lost ! you will still have the option of \ n " ) ; buf append ( " saving any changes made before those actions began \ n \ n " ) ; buf append ( " do you want to abort the action ( s ) and exit ghidra ? " ) ; int result = option dialog show option dialog ( tool get tool frame ( ) , title , buf to string ( ) , " exit ghidra " , option dialog warning message ) ; if ( result = = option dialog cancel option ) { locked = false ; objs [ last index ] release ( this ) ; break ; } udo force lock ( true , null ) ; } + + last index ; } if ( ! locked ) { / / skip the last one that could not be locked for ( int i = 0 ; i < last index ; i + + ) { objs [ i ] unlock ( ) ; objs [ i ] release ( this ) ; } return null ; } return objs ; }


return an empty target source for the given target class

public static empty target source for class ( @ nullable class < ? > target class ) { return for class ( target class , true ) ; }


ensure that getfilestatus ( get ) and liststatus ( get ) work in all modes getxattrs ( get ) works in read - write and read - only but write - only throws an exception setpermission ( put ) works in read - write and write only but read - only throws an exception setpermission ( post ) works in read - write and write only but read - only throws an exception delete ( delete ) works in read - write and write only but read - only throws an exception

public void test acess controlled f s ( ) throws exception { final string test rw msg = " test read - write " ; final string test ro msg = " test read - only " ; final string test wo msg = " test write - only " ; final string def user 1 = " default : user : glarch : r - x " ; final string dir = " / test access " ; final string path r w = dir + " / foo - rw " ; final string path w o = dir + " / foo - wo " ; final string path r o = dir + " / foo - ro " ; final string set perm spec = " 744 " ; final string snapshop spec = " snapshotname = test - snap " ; start mini d f s ( ) ; create http f s server ( ) ; file system fs = file system get ( nn conf ) ; fs mkdirs ( new path ( dir ) ) ; output stream os = fs create ( new path ( path r w ) ) ; os write ( 1 ) ; os close ( ) ; os = fs create ( new path ( path w o ) ) ; os write ( 1 ) ; os close ( ) ; os = fs create ( new path ( path r o ) ) ; os write ( 1 ) ; os close ( ) ; configuration conf = http f s server web app get ( ) get config ( ) ; / * test read - write mode * / conf set strings ( " httpfs access mode " , " read - write " ) ; get cmd ( path r w , test rw msg + " get " , " getfilestatus " , true ) ; get cmd ( path r w , test rw msg + " get " , " liststatus " , true ) ; get cmd ( path r w , test rw msg + " get " , " getxattrs " , true ) ; put cmd ( path r w , test rw msg + " put " , " setpermission " , set perm spec , true ) ; post cmd ( path r w , test rw msg + " post " , " unsetstoragepolicy " , null , true ) ; delete cmd ( path r w , test rw msg + " delete " , " delete " , null , true ) ; / * test write - only mode * / conf set strings ( " httpfs access mode " , " write - only " ) ; get cmd ( path w o , test wo msg + " get " , " getfilestatus " , true ) ; get cmd ( path w o , test wo msg + " get " , " liststatus " , true ) ; get cmd ( path w o , test wo msg + " get " , " getxattrs " , false ) ; put cmd ( path w o , test wo msg + " put " , " setpermission " , set perm spec , true ) ; post cmd ( path w o , test wo msg + " post " , " unsetstoragepolicy " , null , true ) ; delete cmd ( path w o , test wo msg + " delete " , " delete " , null , true ) ; / * test read - only mode * / conf set strings ( " httpfs access mode " , " read - only " ) ; get cmd ( path r o , test ro msg + " get " , " getfilestatus " , true ) ; get cmd ( path r o , test ro msg + " get " , " liststatus " , true ) ; get cmd ( path r o , test ro msg + " get " , " getxattrs " , true ) ; put cmd ( path r o , test ro msg + " put " , " setpermission " , set perm spec , false ) ; post cmd ( path r o , test ro msg + " post " , " unsetstoragepolicy " , null , false ) ; delete cmd ( path r o , test ro msg + " delete " , " delete " , null , false ) ; conf set strings ( " httpfs access mode " , " read - write " ) ; mini dfs shutdown ( ) ; }


return the expected name of the path variable

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


{ @ inherit doc } setting the { @ link # set task executor task executor } property is required before calling this method

public async client http request create async request ( uri uri , http method http method ) throws i o exception { assert state ( this task executor ! = null , " asynchronous execution requires task executor to be set " ) ; http u r l connection connection = open connection ( uri to u r l ( ) , this proxy ) ; prepare connection ( connection , http method name ( ) ) ; if ( this buffer request body ) { return new simple buffering async client http request ( connection , this output streaming , this task executor ) ; } else { return new simple streaming async client http request ( connection , this chunk size , this output streaming , this task executor ) ; } }


create a user from a login name it is intended to be used for remote users in rpc , since it won ' t have any credentials

public static user group information create remote user ( string user , auth method auth method ) { if ( user = = null | | user is empty ( ) ) { throw new illegal argument exception ( " null user " ) ; } subject subject = new subject ( ) ; subject get principals ( ) add ( new user ( user ) ) ; user group information result = new user group information ( subject ) ; result set authentication method ( auth method ) ; return result ; }


called after { @ link web element # click web element click ( ) } not called , if an exception is thrown

void after click on ( web element element , web driver driver ) ;


indicates whether this marshaller can marshal instances of the supplied generic type

boolean supports ( type generic type ) ;


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

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


re - checks the requirements if there are network requirements that are currently not met when we receive an event that implies newly established network connectivity , we re - check the requirements by calling { @ link # check requirements ( ) } this check sometimes sees that there is still no active network , meaning that any network requirements will remain not met by calling this method when we receive other events that imply continued network connectivity , we can detect that the requirements are met once an active network does exist

private void recheck not met network requirements ( ) { if ( ( not met requirements & ( requirements network | requirements network unmetered ) ) = = 0 ) { / / no unmet network requirements to recheck return ; } check requirements ( ) ; }


helper method to set username for the first http basic authentication

public api client set username ( string username ) { for ( authentication auth : authentications values ( ) ) { if ( auth instanceof http basic auth ) { ( ( http basic auth ) auth ) set username ( username ) ; return this ; } } throw new runtime exception ( " no http basic authentication configured ! " ) ; }


private static void prepare dex dir ( file dex dir , final string extracted file prefix ) { file filter filter = new file filter ( ) { @ override public boolean accept ( file pathname ) { string name = pathname get name ( ) ; return ! ( name starts with ( extracted file prefix ) | | name equals ( lock filename ) ) ; } } ; file [ ] files = dex dir list files ( filter ) ; if ( files = = null ) { log w ( tag , " failed to list secondary dex dir content ( " + dex dir get path ( ) + " ) " ) ; return ; } for ( file old file : files ) { log i ( tag , " trying to delete old file " + old file get path ( ) + " of size " + old file length ( ) ) ; if ( ! old file delete ( ) ) { log w ( tag , " failed to delete old file " + old file get path ( ) ) ; } else { log i ( tag , " deleted old file " + old file get path ( ) ) ; } } }


protected string grant service ticket ( final string ticket granting ticket , final web application service service , final authentication result authentication result ) { val ticket = central authentication service grant service ticket ( ticket granting ticket , service , authentication result ) ; logger debug ( " generated service ticket [ { } ] " , ticket get id ( ) ) ; return ticket get id ( ) ; }


returns the sum of { @ code a } and { @ code b } , provided it does not overflow

public static long checked add ( long a , long b ) { long result = a + b ; check no overflow ( ( a ^ b ) < 0 | ( a ^ result ) > = 0 , " checked add " , a , b ) ; return result ; }


add a minimum statistic to dynamically return the latest value of the source

public dynamic i o statistics builder with atomic integer minimum ( string key , atomic integer source ) { with long function minimum ( key , s - > source get ( ) ) ; return this ; }


checks whether the specified test timeout could have been smaller or is too small and adds a warning message if verbose is true returns true if there was a test with the wrong timeout , but if was not reported

private static boolean should emit test size warning in summary ( boolean verbose , list < string > warnings , list < long > test times , transitive info collection target ) { test timeout specified timeout = target get provider ( test provider class ) get test params ( ) get timeout ( ) ; long max time of shard = 0 ; for ( long shard time : test times ) { if ( shard time ! = null ) { max time of shard = math max ( max time of shard , shard time ) ; } } int max time in seconds = ( int ) ( max time of shard / 1000 ) ; if ( ! specified timeout is in range fuzzy ( max time in seconds ) ) { test timeout expected timeout = test timeout get suggested test timeout ( max time in seconds ) ; test size expected size = test size get test size ( expected timeout ) ; if ( verbose ) { string builder builder = new string builder ( string format ( " % s : test execution time ( % 1fs excluding execution overhead ) outside of " + " range for % s tests consider setting timeout = \ " % s \ " " , alias provider get dependency label ( target ) , max time of shard / 1000 0 , specified timeout pretty print ( ) , expected timeout ) ) ; if ( expected size ! = null ) { builder append ( " or size = \ " " ) append ( expected size ) append ( " \ " " ) ; } builder append ( " " ) ; warnings add ( builder to string ( ) ) ; return false ; } return true ; } else { return false ; } }


synchronized void inc num chunks ( ) { num chunks + + ; }


basic check of if a string is a binary name

public static boolean is binary name ( string name ) { return name length ( ) > 0 & & ! name contains ( java package separator ) & & ! is class descriptor ( name ) ; }


ensure that zipkin uses the legacy resource path when priority is not set

@ test void check create legacy index template resource path version 7 8 ( ) { server enqueue ( aggregated http response of ( http status ok , media type json utf 8 , " { \ " version \ " : { \ " number \ " : \ " 7 8 0 \ " } } " ) ) ; server enqueue ( success response ) ; / / get span template server enqueue ( success response ) ; / / get dependency template server enqueue ( success response ) ; / / get autocomplete template server enqueue ( success response ) ; / / cluster health storage check ( ) ; server take request ( ) ; / / get version assert that ( server take request ( ) request ( ) path ( ) ) / / get span template starts with ( " / template / zipkin - span template " ) ; assert that ( server take request ( ) request ( ) path ( ) ) / / / / get dependency template starts with ( " / template / zipkin - dependency template " ) ; assert that ( server take request ( ) request ( ) path ( ) ) / / get autocomplete template starts with ( " / template / zipkin - autocomplete template " ) ; }


returns the name of a processing time attribute or null if no processing time attribute is present the referenced attribute must be present in the { @ link table schema } of the { @ link table source } and of type { @ link types # sql timestamp }


returns the vertex connected to this edge

public job vertex get target ( ) { return target ; }


returns the same instance since it is an immutable value

public json null deep copy ( ) { return instance ; }


gets the users that show up in the changelog of this job collection

public people get people ( ) { return new people ( this ) ; }


public static string get description ( ) { return " provides coordination and a service for all auto analysis tasks " ; }


test that find containing jar works correctly even if the path has a " + " sign or spaces in it

public void test find containing jar with plus ( ) throws exception { new file ( test dir with special chars ) mkdirs ( ) ; configuration conf = new configuration ( ) ; file system localfs = file system get local ( conf ) ; file util copy ( localfs , new path ( jar relative path ) , localfs , new path ( test dir with special chars , " test jar " ) , false , true , conf ) ; test jar at path ( test dir with special chars + file separator + " test jar " ) ; }


public void set key stroke ( key stroke ks ) { process entry ( ks ) ; set text ( parse key stroke ( ks ) ) ; }


allows clients to add a callback mechanism for timing events

public void add timing target listener ( timing target new finished target ) { this finished callback target = new finished target ; }


requests a delegation token using the configured < code > authenticator < code > for authentication

public token < abstract delegation token identifier > get delegation token ( url url , authenticated u r l token token , string renewer ) throws i o exception , authentication exception { return get delegation token ( url , token , renewer , null ) ; }


add the given data to the destination node

void add ( program node dest node , program node [ ] drop nodes , int drop action , int relative mouse pos ) throws not found exception , circular dependency exception , duplicate group exception { if ( relative mouse pos ! = 0 ) { reorder d d mgr add ( dest node , drop nodes , drop action , relative mouse pos ) ; return ; } string operation = ( drop action = = dn d constants action move ) ? " move " : " copy " ; int transaction i d = tree start transaction ( operation ) ; if ( transaction i d < 0 ) { return ; } try { for ( int i = 0 ; i < drop nodes length ; i + + ) { boolean ok = true ; / / this is a normal drag / drop on the node if ( dest node is fragment ( ) ) { ok = add to fragment ( dest node , drop nodes [ i ] ) ; } else { add to module ( dest node , drop nodes [ i ] , drop action ) ; } if ( ok ) { tree add selection path ( dest node get tree path ( ) ) ; } } } finally { tree end transaction ( transaction i d , true ) ; } }


merge this bindings with an other { @ link bindings } object and create a new merged { @ link bindings } object

public bindings and ( bindings other ) { return merge ( this , other ) ; }


gets the data loaded in the left side of this panel

public data get left data ( ) { return data [ left ] ; }


public static naming maintain service create maintain service ( string server addr ) throws nacos exception { return naming maintain factory create maintain service ( server addr ) ; }


test method for { @ link org apache dubbo registry support abstract registry # unsubscribe ( url , notify listener ) }

public void test unsubscribe ( ) throws exception { / / check parameters try { abstract registry unsubscribe ( test url , null ) ; assertions fail ( ) ; } catch ( exception e ) { assertions assert true ( e instanceof illegal argument exception ) ; } / / check parameters try { abstract registry unsubscribe ( null , null ) ; assertions fail ( ) ; } catch ( exception e ) { assertions assert true ( e instanceof illegal argument exception ) ; } assertions assert null ( abstract registry get subscribed ( ) get ( test url ) ) ; / / check if unsubscribe successfully abstract registry subscribe ( test url , listener ) ; abstract registry unsubscribe ( test url , listener ) ; / / since we have subscribe test url , here should return a empty set instead of null assertions assert not null ( abstract registry get subscribed ( ) get ( test url ) ) ; assertions assert false ( abstract registry get subscribed ( ) get ( test url ) contains ( listener ) ) ; }


returns the bootstrap ' s { @ link object mapper }

public object mapper get object mapper ( ) { return object mapper ; }


gets the parallelism with which the parallel task runs

public int get number of parallel subtasks ( ) { return this number of parallel subtasks ; }


resets the flag to indicate whether [ [ collect ( t ) ] ] has been called

public void reset ( ) { this collected = false ; if ( collector instanceof table function collector ) { ( ( table function collector ) collector ) reset ( ) ; } }


the { @ link method descriptor } for the call

public abstract method descriptor < req t , resp t > get method descriptor ( ) ;


registers a slot for the given task manager at the slot manager the slot is identified by the given slot id the given resource profile defines the available resources for the slot the task manager connection can be used to communicate with the task manager

private void register slot ( slot i d slot id , allocation i d allocation id , job i d job id , resource profile resource profile , task executor connection task manager connection ) { if ( slots contains key ( slot id ) ) { / / remove the old slot first remove slot ( slot id , new slot manager exception ( string format ( " re - registration of slot % s this indicates that the task executor has re - connected " , slot id ) ) ) ; } final task manager slot slot = create and register task manager slot ( slot id , resource profile , task manager connection ) ; final pending task manager slot pending task manager slot ; if ( allocation id = = null ) { pending task manager slot = find exactly matching pending task manager slot ( resource profile ) ; } else { pending task manager slot = null ; } if ( pending task manager slot = = null ) { update slot ( slot id , allocation id , job id ) ; } else { pending slots remove ( pending task manager slot get task manager slot id ( ) ) ; final pending slot request assigned pending slot request = pending task manager slot get assigned pending slot request ( ) ; if ( assigned pending slot request = = null ) { handle free slot ( slot ) ; } else { assigned pending slot request unassign pending task manager slot ( ) ; allocate slot ( slot , assigned pending slot request ) ; } } }


waits until { @ link # trigger ( ) } is called

public void await ( ) throws interrupted exception { synchronized ( lock ) { while ( ! triggered ) { lock wait ( ) ; } triggered = false ; } }


check that the docker image has the expected " open containers annotations " labels

public void test 1 1 0 org opencontainers labels ( ) throws exception { final map < string , string > labels = get image labels ( distribution ) ; final map < string , string > static labels = new hash map < > ( ) ; static labels put ( " title " , " elasticsearch " ) ; static labels put ( " url " , " https : / / www elastic co / products / elasticsearch " ) ; static labels put ( " documentation " , " https : / / www elastic co / guide / en / elasticsearch / reference / index html " ) ; static labels put ( " source " , " https : / / github com / elastic / elasticsearch " ) ; static labels put ( " vendor " , " elastic " ) ; if ( distribution is o s s ( ) ) { static labels put ( " licenses " , " apache - 2 0 " ) ; } else { static labels put ( " licenses " , " elastic - license " ) ; } / / todo : we should check the actual version value final set < string > dynamic labels = set of ( " created " , " revision " , " version " ) ; final string prefix = " org opencontainers image " ; static labels for each ( ( suffix , value ) - > { string key = prefix + " " + suffix ; assert that ( labels , has key ( key ) ) ; assert that ( labels get ( key ) , equal to ( value ) ) ; } ) ; dynamic labels for each ( label - > { string key = prefix + " " + label ; assert that ( labels , has key ( key ) ) ; } ) ; }


if the { @ link graph explore request # use significance ( boolean ) } is true ( the default ) this statistic is available together with { @ link # get bg ( ) } these numbers are used to derive the significance of a term


returns all serializable fields in the object

private static map < string , class < ? > > get fields ( base record record ) { map < string , class < ? > > getters = new hash map < > ( ) ; for ( method m : record get class ( ) get declared methods ( ) ) { if ( m get name ( ) starts with ( " get " ) ) { try { class < ? > type = m get return type ( ) ; char [ ] c = m get name ( ) substring ( 3 ) to char array ( ) ; c [ 0 ] = character to lower case ( c [ 0 ] ) ; string key = new string ( c ) ; getters put ( key , type ) ; } catch ( exception e ) { log error ( " cannot execute getter { } on { } " , m get name ( ) , record ) ; } } } return getters ; }


returns true if this elf was created for a little endian processor

public boolean is little endian ( ) { return e ident data = = elf constants elf data le ; }


this creates log file object which represents logs in file form this opens object output stream which is used to write log records to log file and opens a object input stream which is used to read log records from the file

public void create log file and add to map ( session id session id ) throws i o exception { file rc log file ; / / create log file ; rc log file = file create temp file ( session id to string ( ) , " rclog " ) ; rc log file delete on exit ( ) ; log file log file = new log file ( rc log file get absolute path ( ) ) ; session to log file map put ( session id , log file ) ; }


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


mark this fully committed transaction as having a corresponding database transactioncheckpoint

void set has committed d b transaction ( ) { if ( get status ( ) ! = committed ) { throw new illegal state exception ( " transaction was not committed " ) ; } has d b transaction = true ; }


set a custom maximum value for this axis if set , this value will not be calculated automatically depending on the provided data use reset axis max value ( ) to undo this

public void set axis maximum ( float max ) { m custom axis max = true ; m axis maximum = max ; this m axis range = math abs ( max - m axis minimum ) ; }


remove configuration for a given connector

public void remove connector config ( string connector ) { log debug ( " removing connector configuration for connector ' { } ' " , connector ) ; try { config log send ( connector key ( connector ) , null ) ; config log send ( target state key ( connector ) , null ) ; config log read to end ( ) get ( read to end timeout ms , time unit milliseconds ) ; } catch ( interrupted exception | execution exception | timeout exception e ) { log error ( " failed to remove connector configuration from kafka : " , e ) ; throw new connect exception ( " error removing connector configuration from kafka " , e ) ; } }


public f s image get f s image ( ) { return namesystem get f s image ( ) ; }


public reflect utils field ( final string name ) { try { field field = get field ( name ) ; return new reflect utils ( field get type ( ) , field get ( object ) ) ; } catch ( illegal access exception e ) { throw new reflect exception ( e ) ; } }


called by internal mechanisms , do not call yourself

public void set dao session ( dao session dao session ) { this dao session = dao session ; my dao = dao session ! = null ? dao session get relation source 2 dao ( ) : null ; }


number of times that the job woke up to write documents deprecated , use { @ link transform indexer stats # get trigger count ( ) } instead

public long get num invocations ( ) { return get trigger count ( ) ; }


returns the appropriate { @ code if - gt } rop for the given sources the result is a shared instance

public static rop op if gt ( type list types ) { return pick if ( types , if gtz int , null , if gt int , null ) ; }


test the scenario where not enough replicas can ' t satisfy the policy

public void test choose target without enough replica ( ) throws exception { set < node > excluded nodes = new hash set < > ( ) ; datanode storage info [ ] targets ; list < datanode storage info > chosen nodes = new array list < > ( ) ; excluded nodes clear ( ) ; chosen nodes clear ( ) ; excluded nodes add ( data nodes [ 4 ] ) ; excluded nodes add ( data nodes [ 5 ] ) ; excluded nodes add ( data nodes [ 7 ] ) ; excluded nodes add ( data nodes [ 8 ] ) ; targets = choose target ( 3 , chosen nodes , excluded nodes ) ; assert equals ( targets length , 2 ) ; assert equals ( storages [ 0 ] , targets [ 0 ] ) ; assert true ( targets [ 1 ] equals ( storages [ 1 ] ) | | targets [ 1 ] equals ( storages [ 2 ] ) ) ; }


get an instance of the name node ' s rpc handler

public namenode protocols get name node rpc ( int nn index ) { return get name node ( nn index ) get rpc server ( ) ; }


configures a friendly name for the generator this will be used by the generator to select the library with the - g flag

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


convenience method that creates a < code > http u r l connection < code > for the http f s server file system operations < p > this methods performs and injects any needed authentication credentials via the { @ link # get connection ( url , string ) } method

private http u r l connection get connection ( final string method , map < string , string > params , map < string , list < string > > multi valued params , path path , boolean make qualified ) throws i o exception { if ( make qualified ) { path = make qualified ( path ) ; } final url url = http f s utils create u r l ( path , params , multi valued params ) ; try { return user group information get current user ( ) do as ( new privileged exception action < http u r l connection > ( ) { @ override public http u r l connection run ( ) throws exception { return get connection ( url , method ) ; } } ) ; } catch ( exception ex ) { if ( ex instanceof i o exception ) { throw ( i o exception ) ex ; } else { throw new i o exception ( ex ) ; } } }


returns the start position of the first occurrence of the specified { @ code target } within { @ code array } , or { @ code - 1 } if there is no such occurrence more formally , returns the lowest index { @ code i } such that { @ code arrays copy of range ( array , i , i + target length ) } contains exactly the same elements as { @ code target }

public static int index of ( long [ ] array , long [ ] target ) { check not null ( array , " array " ) ; check not null ( target , " target " ) ; if ( target length = = 0 ) { return 0 ; } outer : for ( int i = 0 ; i < array length - target length + 1 ; i + + ) { for ( int j = 0 ; j < target length ; j + + ) { if ( array [ i + j ] ! = target [ j ] ) { continue outer ; } } return i ; } return - 1 ; }


public float get float ( ) { return float ; }


returns the amount of search requests specified in this multi search requests are allowed to be ran concurrently

public int max concurrent search requests ( ) { return max concurrent search requests ; }


test the property ' name wrapped array '

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


hook for pre - processing a test before execution of before lifecycle callbacks of the underlying test framework & mdash ; for example , setting up test fixtures , starting a transaction , etc this method must be called immediately prior to framework - specific before lifecycle callbacks ( e g , methods annotated with j unit 4 ' s { @ link org junit before @ before } ) for historical reasons , this method is named { @ code before test method } since the introduction of { @ link # before test execution } , a more suitable name for this method might be something like { @ code before test set up } or { @ code before each } ; however , it is unfortunately impossible to rename this method due to backward compatibility concerns the managed { @ link test context } will be updated with the supplied { @ code test instance } and { @ code test method } an attempt will be made to give each registered { @ link test execution listener } a chance to perform its pre - processing if a listener throws an exception , however , the remaining registered listeners will not be called

public void before test method ( object test instance , method test method ) throws exception { string callback name = " before test method " ; prepare for before callback ( callback name , test instance , test method ) ; for ( test execution listener test execution listener : get test execution listeners ( ) ) { try { test execution listener before test method ( get test context ( ) ) ; } catch ( throwable ex ) { handle before exception ( ex , callback name , test execution listener , test instance , test method ) ; } } }


public set < string > get photo urls ( ) { return photo urls ; }


returns identifier naming convention for table names and column names

public string get identifier naming convention ( ) { return this identifier naming convention ; }


returns a list containing the nonempty intersections of { @ code range } with the ranges in this range set

private immutable list < range < c > > intersect ranges ( final range < c > range ) { if ( ranges is empty ( ) | | range is empty ( ) ) { return immutable list of ( ) ; } else if ( range encloses ( span ( ) ) ) { return ranges ; } final int from index ; if ( range has lower bound ( ) ) { from index = sorted lists binary search ( ranges , range < c > upper bound fn ( ) , range lower bound , key present behavior first after , key absent behavior next higher ) ; } else { from index = 0 ; } int to index ; if ( range has upper bound ( ) ) { to index = sorted lists binary search ( ranges , range < c > lower bound fn ( ) , range upper bound , key present behavior first present , key absent behavior next higher ) ; } else { to index = ranges size ( ) ; } final int length = to index - from index ; if ( length = = 0 ) { return immutable list of ( ) ; } else { return new immutable list < range < c > > ( ) { @ override public int size ( ) { return length ; } @ override public range < c > get ( int index ) { check element index ( index , length ) ; if ( index = = 0 | | index = = length - 1 ) { return ranges get ( index + from index ) intersection ( range ) ; } else { return ranges get ( index + from index ) ; } } @ override boolean is partial view ( ) { return true ; } } ; } }


tests that slots are updated with respect to the latest incoming slot report this means that slots for which a report was received are updated accordingly

public void test update slot report ( ) throws exception { final task executor connection task manager connection = create task executor connection ( ) ; final resource i d resource id = task manager connection get resource i d ( ) ; final slot i d slot id 1 = new slot i d ( resource id , 0 ) ; final slot i d slot id 2 = new slot i d ( resource id , 1 ) ; final slot status slot status 1 = create free slot status ( slot id 1 ) ; final slot status slot status 2 = create free slot status ( slot id 2 ) ; final slot status new slot status 2 = create allocated slot status ( slot id 2 ) ; final job i d job id = new slot status 2 get job i d ( ) ; final slot report slot report 1 = new slot report ( arrays as list ( slot status 1 , slot status 2 ) ) ; final slot report slot report 2 = new slot report ( arrays as list ( new slot status 2 , slot status 1 ) ) ; final default slot tracker slot tracker = new default slot tracker ( ) ; try ( declarative slot manager slot manager = create declarative slot manager builder ( ) set slot tracker ( slot tracker ) build and start with direct exec ( ) ) { / / check that we don ' t have any slots registered assert equals ( 0 , slot manager get number registered slots ( ) ) ; slot manager register task manager ( task manager connection , slot report 1 , resource profile any , resource profile any ) ; declarative task manager slot slot 1 = slot tracker get slot ( slot id 1 ) ; declarative task manager slot slot 2 = slot tracker get slot ( slot id 2 ) ; assert equals ( 2 , slot manager get number registered slots ( ) ) ; assert same ( slot state free , slot 1 get state ( ) ) ; assert same ( slot state free , slot 2 get state ( ) ) ; assert true ( slot manager report slot status ( task manager connection get instance i d ( ) , slot report 2 ) ) ; assert equals ( 2 , slot manager get number registered slots ( ) ) ; assert not null ( slot tracker get slot ( slot id 1 ) ) ; assert not null ( slot tracker get slot ( slot id 2 ) ) ; / / slot 1 should still be free , slot 2 should have been allocated assert same ( slot state free , slot 1 get state ( ) ) ; assert equals ( job id , slot tracker get slot ( slot id 2 ) get job id ( ) ) ; } }


public void remove ( merged context configuration key , @ nullable hierarchy mode hierarchy mode ) { assert not null ( key , " key must not be null " ) ; / / start key is the level at which to begin clearing the cache , / / depending on the configured hierarchy mode s merged context configuration start key = key ; if ( hierarchy mode = = hierarchy mode exhaustive ) { merged context configuration parent = start key get parent ( ) ; while ( parent ! = null ) { start key = parent ; parent = start key get parent ( ) ; } } list < merged context configuration > removed contexts = new array list < > ( ) ; remove ( removed contexts , start key ) ; / / remove all remaining references to any removed contexts from the / / hierarchy map for ( merged context configuration current key : removed contexts ) { for ( set < merged context configuration > children : this hierarchy map values ( ) ) { children remove ( current key ) ; } } / / remove empty entries from the hierarchy map for ( map entry < merged context configuration , set < merged context configuration > > entry : this hierarchy map entry set ( ) ) { if ( entry get value ( ) is empty ( ) ) { this hierarchy map remove ( entry get key ( ) ) ; } } }


it is not valid to pass a mark to { @ link int stream # seek } , but { @ link unbuffered char stream } creates marks in such a way that this invalid usage results in an { @ link illegal argument exception }

public void test mark passed to seek ( ) { char stream input = create stream ( " " ) ; int m 1 = input mark ( ) ; input seek ( m 1 ) ; }


calculates the squared radius of the bounding sphere around the specified center for the specified part

public float calculate radius ( final float center x , final float center y , final float center z ) { return calculate radius ( center x , center y , center z , 0 , get num indices ( ) , null ) ; }


subscribes a listener to this dispatcher for events on a partition

public void subscribe to event ( result partition i d partition id , event listener < task event > event listener , class < ? extends task event > event type ) { check not null ( partition id ) ; check not null ( event listener ) ; check not null ( event type ) ; task event handler task event handler ; synchronized ( registered handlers ) { task event handler = registered handlers get ( partition id ) ; } if ( task event handler = = null ) { throw new illegal state exception ( " partition " + partition id + " not registered at task event dispatcher " ) ; } task event handler subscribe ( event listener , event type ) ; }


this method serializes the specified object , including those of generic types , into its equivalent json representation this method must be used if the specified object is a generic type for non - generic objects , use { @ link # to json ( object ) } instead if you want to write out the object to a { @ link appendable } , use { @ link # to json ( object , type , appendable ) } instead

public string to json ( object src , type type of src ) { string writer writer = new string writer ( ) ; to json ( src , type of src , writer ) ; return writer to string ( ) ; }


if this is set , then word wrapping the legend is enabled this means the legend will not be cut off if too long

public boolean is word wrap enabled ( ) { return m word wrap enabled ; }


returns count of blocks pending on deletion

public long get pending deletion blocks count ( ) throws i o exception { return dfs get pending deletion blocks count ( ) ; }


the topic partitions assigned to a group member

public set < topic partition > topic partitions ( ) { return topic partitions ; }


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


creates a new builder with the given host and port

public static netty channel builder for address ( string host , int port , channel credentials creds ) { return for target ( grpc util authority from host and port ( host , port ) , creds ) ; }


names of resources that have been deleted and to be removed from the mcp sink node removed resources for missing resources can be ignored when ` incremental ` is true , this contains an array of resource names to remove for the specified collection this modifies the existing resource collection at the sink when ` incremental ` is false , this field should be ignored < code > repeated string removed resources = 4 ; < code >

public builder add all removed resources ( java lang iterable < java lang string > values ) { ensure removed resources is mutable ( ) ; com google protobuf abstract message lite builder add all ( values , removed resources ) ; on changed ( ) ; return this ; }


returns the index of the most recently added bootstrap method

public int get bootstrap method index ( ) { return bootstrap method info adder get bootstrap method index ( ) ; }


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


main function of the router fed balance program parses the input arguments and invokes the router fed balance : : run ( ) method , via the tool runner

public static void main ( string [ ] argv ) { configuration conf = get default conf ( ) ; router fed balance fed balance = new router fed balance ( ) ; fed balance set conf ( conf ) ; int exit code ; try { exit code = tool runner run ( fed balance , argv ) ; } catch ( exception e ) { log warn ( " couldn ' t complete router fed balance operation " , e ) ; exit code = - 1 ; } system exit ( exit code ) ; }


like { @ link # port ( ) } except returns a primitive where zero implies absent using this method will avoid allocation , so is encouraged when copying data

public int port as int ( ) { return port ; }


set current mode to server mode if sentinel currently works in client mode , it will be turned off then the cluster server will be started

public static boolean set to server ( ) { if ( mode = = cluster server ) { return true ; } mode = cluster server ; sleep if needed ( ) ; last modified = time util current time millis ( ) ; return start server ( ) ; }


return true if the file can be upgraded to the current version

public boolean is upgradable ( ) { return upgradeable ; }


return a no - op device fingerprint component

static device fingerprint component extractor no op ( ) { return ( principal , context , is new ) - > optional empty ( ) ; }


writes the given lines of text to this sink with each line ( including the last ) terminated with the given line separator

public void write lines ( iterable < ? extends char sequence > lines , string line separator ) throws i o exception { check not null ( lines ) ; check not null ( line separator ) ; closer closer = closer create ( ) ; try { writer out = closer register ( open buffered stream ( ) ) ; for ( char sequence line : lines ) { out append ( line ) append ( line separator ) ; } out flush ( ) ; / / https : / / code google com / p / guava - libraries / issues / detail ? id = 1330 } catch ( throwable e ) { throw closer rethrow ( e ) ; } finally { closer close ( ) ; } }


returns when this executor started or should start being idle

public long get idle start milliseconds ( ) { if ( is idle ( ) ) return math max ( creation time , owner get connect time ( ) ) ; else { return math max ( start time + math max ( 0 , executable estimated duration ) , system current time millis ( ) + 15000 ) ; } }


directly load the model on the calling thread the model with not be managed by an { @ link asset manager }

public model load model ( final file handle file handle , p parameters ) { return load model ( file handle , new texture provider file texture provider ( ) , parameters ) ; }


get an optional attribute value from the annotation

optional < object > get value ( string attribute name ) ;


returns the shard that the explanation is about

public shard id get shard ( ) { return shard routing shard id ( ) ; }


utility function to induce a graph clean of whatever value is requested , by trying to build this value and interrupting the build as soon as this value ' s function evaluation starts

private void fail build and remove value ( final sky key value ) { tester set ( value , null ) ; / / evaluator will think leaf was interrupted because it threw , so it will be cleaned from graph tester get or create ( value , / * mark as modified = * / true ) set builder ( interrupt builder ) ; tester invalidate ( ) ; assert throws ( interrupted exception class , ( ) - > tester eval ( / * keep going = * / false , value ) ) ; tester get or create ( value , / * mark as modified = * / false ) set builder ( null ) ; }


gets a read - only view all the { @ link item } s recursively matching supplied type and predicate conditions in the { @ link item group } tree visible to the supplied authentication without concern for the order in which items are returned each iteration of the view will be " live " reflecting the items available between the time the iteration was started and the time the iteration was completed , however if items are moved during an iteration - depending on the move - it may be possible for such items to escape the entire iteration

public static < t extends item > iterable < t > all items 2 ( authentication authentication , item group root , class < t > type , predicate < t > pred ) { return new all items iterable < > ( root , authentication , type , pred ) ; }


rounds { @ code n } up to the nearest multiple of { @ code k }

private static long round up to nearest ( long n , int k ) { return ( ( n + k - 1 ) / k ) * k ; }


if the recycler is circular , returns the position of the { @ link component tree holder } that is used to render the item at given position otherwise , it returns the position passed as parameter , which is the same as the index of the { @ link component tree holder }

private int get normalized position ( int position ) { return m is circular ? position % m component tree holders size ( ) : position ; }