creates list of users with given input array

public void create users with array input ( list < user > body , api client auth info auth info , handler < async result < void > > result handler ) { object local var body = body ; / / verify the required parameter ' body ' is set if ( body = = null ) { result handler handle ( api exception fail ( 400 , " missing the required parameter ' body ' when calling create users with array input " ) ) ; return ; } / / create path and map variables string local var path = " / user / create with array " ; / / query params list < pair > local var query params = new array list < > ( ) ; / / header params multi map local var header params = multi map case insensitive multi map ( ) ; / / cookie params multi map local var cookie params = multi map case insensitive multi map ( ) ; / / form params / / todo : sending files within multipart / form - data is not supported yet ( because of vertx web - client ) map < string , object > local var form params = new hash map < > ( ) ; string [ ] local var accepts = { } ; string [ ] local var content types = { } ; string [ ] local var auth names = new string [ ] { } ; api client invoke a p i ( local var path , " post " , local var query params , local var body , local var header params , local var cookie params , local var form params , local var accepts , local var content types , local var auth names , auth info , null , result handler ) ; }


valid if a node label expression specified on container request is valid or not

private void check node label expression ( t container request ) { string exp = container request get node label expression ( ) ; if ( null = = exp | | exp is empty ( ) ) { return ; } / / don ' t support specifying > 1 node labels in a node label expression now if ( exp contains ( " & & " ) | | exp contains ( " | | " ) ) { throw new invalid container request exception ( " cannot specify more than one node label " + " in a single node label expression " ) ; } }


public create user oper resp spec ( consumer < response spec builder > resp spec customizer ) { resp spec customizer accept ( resp spec ) ; return this ; }


tests that round tripping of all two byte permutations work

public void test is well formed 1 byte ( ) { test bytes ( 1 , expected one byte roundtrippable count ) ; }


@ t c description : ， @ test step : @ expect result :

public void multiple tenant select one healthy instance ( ) throws exception { string service name = random domain name ( ) ; naming 1 register instance ( service name , " 11 11 11 11 " , test port , " c 1 " ) ; naming 1 register instance ( service name , " 22 22 22 22 " , test port , " c 2 " ) ; naming 2 register instance ( service name , " 22 22 22 22 " , test port , " c 3 " ) ; list < instance > instances = naming 1 get all instances ( service name ) ; verify instance list for naming ( naming 1 , 2 , service name ) ; assert assert equals ( 2 , naming 1 get all instances ( service name ) size ( ) ) ; instance instance = naming 1 select one healthy instance ( service name , arrays as list ( " c 1 " ) ) ; assert assert equals ( " 11 11 11 11 " , instance get ip ( ) ) ; naming 1 deregister instance ( service name , " 11 11 11 11 " , test port , " c 1 " ) ; time unit seconds sleep ( 12 ) ; instance = naming 1 select one healthy instance ( service name ) ; assert assert equals ( " 22 22 22 22 " , instance get ip ( ) ) ; }


set the position in the related expression which gave rise to this exception

public void set position ( int position ) { this position = position ; }


public static map < string , string > map ( string key , string val ) { map < string , string > map = new hash map < string , string > ( 1 ) ; map put ( key , val ) ; return map ; }


performs the location of files of type file type extension passed in , whether recursively or not , and stores these files in the curr files from search list parameter

private static final void locate files from dir root ( file [ ] curr dir array , list < string > curr file type ext list , list < file > curr files from search list , boolean recursive search ) { list < file > curr dir root list = new array list < file > ( ) ; curr dir root list add all ( arrays as list ( curr dir array ) ) ; / / no sanity checks needed as this is a private member and used internally for ( file curr file : curr dir root list ) { if ( curr file is directory ( ) ) { if ( recursive search ) { / / recursion ! ! ! file [ ] curr file dir array = curr file list files ( ) ; locate files from dir root ( curr file dir array , curr file type ext list , curr files from search list , recursive search ) ; } } else { for ( string curr file type ext : curr file type ext list ) { if ( curr file get name ( ) ends with ( curr file type ext ) ) { curr files from search list add ( curr file ) ; } } } } }


returns the class with the given name , either for the program class pool or from the library class pool , or < code > null < code > if it can ' t be found

private clazz find class ( string name ) { / / first look for the class in the program class pool clazz clazz = program class pool get class ( name ) ; / / otherwise look for the class in the library class pool if ( clazz = = null ) { clazz = library class pool get class ( name ) ; } return clazz ; }


test to confirm that events are reported at the time they occur and no earlier and no later this inserts a bunch of synthetic 250 ms delays into both client and server and confirms that the same delays make it back into the events we ' ve had bugs where we report an event when we request data rather than when the data actually arrives https : github comsquareokhttpissues 5 5 7 8

private void time to first byte ( ) throws i o exception { long application interceptor delay = 250l ; long network interceptor delay = 250l ; long request body delay = 250l ; long response headers start delay = 250l ; long response body start delay = 250l ; long response body end delay = 250l ; / / warm up the client so the timing part of the test gets a pooled connection server enqueue ( new mock response ( ) ) ; call warm up call = client new call ( new request builder ( ) url ( server url ( " / " ) ) build ( ) ) ; try ( response warm up response = warm up call execute ( ) ) { warm up response body ( ) string ( ) ; } listener clear all events ( ) ; / / create a client with artificial delays client = client new builder ( ) add interceptor ( chain - > { try { thread sleep ( application interceptor delay ) ; return chain proceed ( chain request ( ) ) ; } catch ( interrupted exception e ) { throw new interrupted i o exception ( ) ; } } ) add network interceptor ( chain - > { try { thread sleep ( network interceptor delay ) ; return chain proceed ( chain request ( ) ) ; } catch ( interrupted exception e ) { throw new interrupted i o exception ( ) ; } } ) build ( ) ; / / create a request body with artificial delays call call = client new call ( new request builder ( ) url ( server url ( " / " ) ) post ( new request body ( ) { @ override public @ nullable media type content type ( ) { return null ; } @ override public void write to ( buffered sink sink ) throws i o exception { try { thread sleep ( request body delay ) ; sink write utf 8 ( " abc " ) ; } catch ( interrupted exception e ) { throw new interrupted i o exception ( ) ; } } } ) build ( ) ) ; / / create a response with artificial delays server enqueue ( new mock response ( ) set headers delay ( response headers start delay , time unit milliseconds ) set body delay ( response body start delay , time unit milliseconds ) throttle body ( 5 , response body end delay , time unit milliseconds ) set body ( " fghijk " ) ) ; / / make the call try ( response response = call execute ( ) ) { assert that ( response body ( ) string ( ) ) is equal to ( " fghijk " ) ; } / / confirm the events occur when expected listener take event ( call start class , 0l ) ; listener take event ( connection acquired class , application interceptor delay ) ; listener take event ( request headers start class , network interceptor delay ) ; listener take event ( request headers end class , 0l ) ; listener take event ( request body start class , 0l ) ; listener take event ( request body end class , request body delay ) ; listener take event ( response headers start class , response headers start delay ) ; listener take event ( response headers end class , 0l ) ; listener take event ( response body start class , response body start delay ) ; listener take event ( response body end class , response body end delay ) ; listener take event ( connection released class , 0l ) ; listener take event ( call end class , 0l ) ; }


bin - copies fields from a source record to this record the following caveats apply : if the source field is in a modified state , no binary representation will exist yet in that case , this method is equivalent to { @ code set field ( , source get field ( , < class > ) ) } in particular , if set value is called on the source field value instance , that change will propagate to this record if the source field has already been serialized , then the binary representation will be copied further modifications to the source field will not be observable via this record , but attempting to read the field from this record will cause it to be deserialized finally , bin - copying a source field requires calling update binary representation on this instance in order to reserve space in the binary data array if none of the source fields are actually bin - copied , then update binary representation won ' t be called

public void copy from ( final record source , final int [ ] source positions , final int [ ] target positions ) { final int [ ] source offsets = source offsets ; final int [ ] source lengths = source lengths ; final byte [ ] source buffer = source binary data ; final value [ ] source fields = source write fields ; boolean any field is binary = false ; int max field num = 0 ; for ( int i = 0 ; i < source positions length ; i + + ) { final int source field num = source positions [ i ] ; final int source offset = source offsets [ source field num ] ; final int target field num = target positions [ i ] ; max field num = math max ( target field num , max field num ) ; if ( source offset = = null indicator offset ) { / / set null on existing field ( new fields are null by default ) if ( target field num < num fields ) { internally set field ( target field num , null ) ; } } else if ( source offset ! = modified indicator offset ) { any field is binary = true ; } } if ( num fields < max field num + 1 ) { set num fields ( max field num + 1 ) ; } final int [ ] target lengths = this lengths ; final int [ ] target offsets = this offsets ; / / reserve space in binary data for the binary source fields if ( any field is binary ) { for ( int i = 0 ; i < source positions length ; i + + ) { final int source field num = source positions [ i ] ; final int source offset = source offsets [ source field num ] ; if ( source offset ! = modified indicator offset & & source offset ! = null indicator offset ) { final int target field num = target positions [ i ] ; target lengths [ target field num ] = source lengths [ source field num ] ; internally set field ( target field num , reserve space ) ; } } update binary represenation ( ) ; } final byte [ ] target buffer = this binary data ; for ( int i = 0 ; i < source positions length ; i + + ) { final int source field num = source positions [ i ] ; final int source offset = source offsets [ source field num ] ; final int target field num = target positions [ i ] ; if ( source offset = = modified indicator offset ) { internally set field ( target field num , source fields [ source field num ] ) ; } else if ( source offset ! = null indicator offset ) { / / bin - copy final int target offset = target offsets [ target field num ] ; final int length = target lengths [ target field num ] ; system arraycopy ( source buffer , source offset , target buffer , target offset , length ) ; } } }


check whether an argument value has been registered for the given index

public boolean has indexed argument value ( int index ) { return this indexed argument values contains key ( index ) ; }


sets the loader to use for imports , as well as any loader - specific arguments a null loader will attempt " best - guess " if possible loader arguments are not supported if a " best - guess " is made

public void set loader ( string loader name , list < pair < string , string > > loader args ) throws invalid input exception { if ( loader name ! = null ) { this loader class = loader service get loader class by name ( loader name ) ; if ( this loader class = = null ) { throw new invalid input exception ( " invalid loader name specified : " + loader name ) ; } this loader args = loader args ; } else { if ( loader args ! = null & & loader args size ( ) > 0 ) { throw new invalid input exception ( " loader arguments defined without a loader being specified " ) ; } this loader class = null ; this loader args = null ; } }


alternative to assertion error ( string , throwable ) , which doesn ' t exist in java 1 6

private static assertion error new assertion error ( string message , throwable cause ) { assertion error e = new assertion error ( message ) ; e init cause ( cause ) ; return e ; }


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


returns the weighted self - degree of this vertex the self - degree is the sum of weights of all loops at this vertex

public double self degree ( vertex v ) { double degree = 0 0 ; edge [ ] edges = this self edges ( v ) ; int length = edges length ; for ( int i = 0 ; i < length ; i + + ) { try { degree + = weights ( ) get value ( edges [ i ] ) ; } catch ( no value exception exc ) { degree + = 0 0 ; } } return degree ; }


default void finish delete ( connector session session , connector table handle table handle , collection < slice > fragments ) { throw new presto exception ( not supported , " this connector does not support deletes " ) ; }


public void set end ( int end ) { this end = end ; }


all data sources failed , highest - quality failed last , no intermediate results

public void test lifecycle f2 f3 f1 c ( ) { data source < object > data source = get and subscribe ( ) ; data subscriber < object > subscriber 1 = verify get and subscribe m ( m data source supplier 1 , m src 1 ) ; data subscriber < object > subscriber 2 = verify get and subscribe m ( m data source supplier 2 , m src 2 ) ; data subscriber < object > subscriber 3 = verify get and subscribe ( m data source supplier 3 , m src 3 ) ; set state ( m src 2 , not closed , finished , without result , null , failed , mock ( throwable class ) ) ; subscriber 2 on failure ( m src 2 ) ; m in order verify ( m src 2 ) close ( ) ; verify subscriber ( data source , m src 2 , no interactions ) ; verify state ( data source , null , not closed , not finished , without result , null , not failed , null ) ; set state ( m src 3 , not closed , finished , without result , null , failed , mock ( throwable class ) ) ; subscriber 3 on failure ( m src 3 ) ; m in order verify ( m src 3 ) close ( ) ; verify subscriber ( data source , m src 3 , no interactions ) ; verify state ( data source , null , not closed , not finished , without result , null , not failed , null ) ; throwable throwable = mock ( throwable class ) ; set state ( m src 1 , not closed , finished , without result , null , failed , throwable ) ; subscriber 1 on failure ( m src 1 ) ; m in order verify ( m src 1 ) close ( ) ; verify subscriber ( data source , m src 1 , on failure ) ; verify state ( data source , null , not closed , finished , without result , null , failed , throwable ) ; test close ( data source ) ; verify state ( data source , null , closed , finished , without result , null , failed , throwable ) ; }


create a driver object that will have a { @ link # context ( ) } that records messages { @ link processor context # forward ( object , object ) forwarded } by the store and that provides the specified serializers and deserializers this can be used when store is created to rely upon the processor context ' s default key and value serializers and deserializers

public static < k , v > key value store test driver < k , v > create ( final serializer < k > key serializer , final deserializer < k > key deserializer , final serializer < v > value serializer , final deserializer < v > value deserializer ) { final state serdes < k , v > serdes = new state serdes < > ( " unexpected " , serdes serde from ( key serializer , key deserializer ) , serdes serde from ( value serializer , value deserializer ) ) ; return new key value store test driver < > ( serdes ) ; }


acknowledges a master state ( state generated on the checkpoint coordinator ) to the pending checkpoint

public void acknowledge master state ( string identifier , @ nullable master state state ) { synchronized ( lock ) { if ( ! disposed ) { if ( not yet acknowledged master states remove ( identifier ) & & state ! = null ) { master states add ( state ) ; } } } }


query the service state this is a non - blocking operation

public service state get state ( ) { return state ; }


releases the depressed left mouse button , in the middle of the given element this is equivalent to : actions move to element ( on element ) release ( ) invoking this action without invoking { @ link # click and hold ( ) } first will result in undefined behaviour

public actions release ( web element target ) { if ( is building actions ( ) ) { action add action ( new button release action ( json mouse , ( locatable ) target ) ) ; } return move in ticks ( target , 0 , 0 ) tick ( default mouse create pointer up ( left as arg ( ) ) ) ; }


map the given response to a single value { @ code response entity < t > }

public static < t > mono < response entity < t > > map to entity ( client response response , mono < t > body mono ) { return ( ( mono < object > ) body mono ) default if empty ( value none ) map ( body - > new response entity < > ( body ! = value none ? ( t ) body : null , response headers ( ) as http headers ( ) , response raw status code ( ) ) ) ; }


updates configuration objects with keys required to setup a secure { @ link org apache hadoop minikdc mini kdc } based dfs cluster

public static void setup kerberos configuration ( configuration conf , string user name , string realm , string keytab , string keystores dir , string ssl conf dir ) throws exception { / / windows will not reverse name lookup " 127 0 0 1 " to " localhost " string krb instance = path windows ? " 127 0 0 1 " : " localhost " ; string hdfs principal = user name + " / " + krb instance + " @ " + realm ; string spnego principal = " http / " + krb instance + " @ " + realm ; conf set ( dfs namenode kerberos principal key , hdfs principal ) ; conf set ( dfs namenode keytab file key , keytab ) ; conf set ( dfs datanode kerberos principal key , hdfs principal ) ; conf set ( dfs datanode keytab file key , keytab ) ; conf set ( dfs web authentication kerberos principal key , spnego principal ) ; conf set boolean ( dfs block access token enable key , true ) ; conf set ( dfs data transfer protection key , " authentication " ) ; conf set ( dfs http policy key , http config policy https only name ( ) ) ; conf set ( dfs namenode https address key , " localhost : 0 " ) ; conf set ( dfs datanode https address key , " localhost : 0 " ) ; conf set ( dfs journalnode https address key , " localhost : 0 " ) ; conf set int ( ipc client connect max retries on sasl key , 10 ) ; key store test util setup s s l config ( keystores dir , ssl conf dir , conf , false ) ; conf set ( dfs client https keystore resource key , key store test util get client s s l config file name ( ) ) ; conf set ( dfs server https keystore resource key , key store test util get server s s l config file name ( ) ) ; key store test util setup s s l config ( keystores dir , ssl conf dir , conf , false ) ; conf set ( dfs client https keystore resource key , key store test util get client s s l config file name ( ) ) ; conf set ( dfs server https keystore resource key , key store test util get server s s l config file name ( ) ) ; }


creates an " greater than ( ' & gt ; ' ) " condition for this property

public where condition gt ( object value ) { return new property condition ( this , " > ? " , value ) ; }


job i d name to job i d ( string name ) ;


private static set < class < ? > > get classes between ( class < ? > descendant , class < ? > ancestor ) { set < class < ? > > classes = new hash set ( ) ; while ( ! descendant equals ( ancestor ) ) { classes add ( descendant ) ; descendant = descendant get superclass ( ) ; } return classes ; }


create an array of descriptors representing the parameter types for the supplied constructor returns a zero sized array if there are no parameters

public static string [ ] to param descriptors ( constructor < ? > ctor ) { return to descriptors ( ctor get parameter types ( ) ) ; }


return the content type used to write forms , given the preferred content type by default , this method returns the given content type , but adds the { @ linkplain # set charset ( charset ) charset } if it does not have one if { @ code content type } is { @ code null } , { @ code applicationx - www - form - urlencoded ; charset = utf - 8 } is returned subclasses can override this method to change this behavior

protected media type get form content type ( @ nullable media type content type ) { if ( content type = = null ) { return default form data media type ; } else if ( content type get charset ( ) = = null ) { return new media type ( content type , this charset ) ; } else { return content type ; } }


returns the approximate number of entries in this cache


query tag configuration information based on data id and group

config info 4 tag find config info 4 tag ( final string data id , final string group , final string tenant , final string tag ) ;


construct a uri from a string with unescaped special characters that have non - standard semantics e g , ? , # a custom parsing is needed to prevent misbehavior

private static uri string to uri ( string path string ) throws i o exception { / / we can ' t use ' new uri ( string ) ' directly since it doesn ' t do quoting / / internally , the internal parser may fail or break the string at wrong / / places use of multi - argument ctors will quote those chars for us , / / but we need to do our own parsing and assembly / / parse uri components string scheme = null ; string authority = null ; int start = 0 ; path string = normalize windows path ( path string ) ; / / parse uri scheme , if any int colon = path string index of ( ' : ' ) ; int slash = path string index of ( ' / ' ) ; if ( colon > 0 & & ( slash = = colon + 1 ) ) { / / has a non zero - length scheme scheme = path string substring ( 0 , colon ) ; start = colon + 1 ; } / / parse uri authority , if any if ( path string starts with ( " / / " , start ) & & ( path string length ( ) - start > 2 ) ) { start + = 2 ; int next slash = path string index of ( ' / ' , start ) ; int auth end = next slash > 0 ? next slash : path string length ( ) ; authority = path string substring ( start , auth end ) ; start = auth end ; } / / uri path is the rest of the string ? or # are not interpreted , / / but any occurrence of them will be quoted by the uri ctor string path = path string substring ( start , path string length ( ) ) ; / / construct the uri try { return new uri ( scheme , authority , path , null , null ) ; } catch ( u r i syntax exception e ) { throw new illegal argument exception ( e ) ; } }


set the < code > container retry context < code > to relaunch container

public abstract void set container retry context ( container retry context container retry context ) ;


test the behavior of the router when one of the subclusters in a mount point fails it assumes that ns 1 is already down

private void test write with failed subcluster ( final destination order order ) throws exception { final file system router 0 fs = get file system ( routers get ( 0 ) ) ; final file system router 1 fs = get file system ( routers get ( 1 ) ) ; final file system ns 0 fs = get file system ( namenodes get ( " ns 0 " ) get r p c port ( ) ) ; final string mount point = " / " + order + " - failsubcluster " ; final path mount path = new path ( mount point ) ; log info ( " setup { } with order { } " , mount point , order ) ; create mount table entry ( get random router ( ) , mount point , order , namenodes key set ( ) ) ; refresh routers caches ( routers ) ; log info ( " write in { } should succeed writing in ns 0 and fail for ns 1 " , mount path ) ; check directories fault tolerant ( mount path , order , router 0 fs , router 1 fs , ns 0 fs , false ) ; check files fault tolerant ( mount path , order , router 0 fs , router 1 fs , ns 0 fs , false ) ; log info ( " make { } fault tolerant and everything succeeds " , mount path ) ; i o exception ioe = null ; try { update mount point fault tolerant ( mount point ) ; } catch ( i o exception e ) { ioe = e ; } if ( destination order folder all contains ( order ) ) { assert null ( ioe ) ; check directories fault tolerant ( mount path , order , router 0 fs , router 1 fs , ns 0 fs , true ) ; check files fault tolerant ( mount path , order , router 0 fs , router 1 fs , ns 0 fs , true ) ; } else { assert true ( ioe get message ( ) starts with ( " invalid entry , fault tolerance only supported for all order " ) ) ; } }


this implementation always returns { @ code true }

public boolean is results parameter ( ) { return true ; }


lets the referenced class accept the given visitor

public void referenced class accept ( class visitor class visitor ) { if ( referenced class ! = null & & referenced member = = null ) { referenced class accept ( class visitor ) ; } }


when the request resources is an ack or nack message in response to a previous request resources , the response nonce must be the nonce in the request resources otherwise response nonce must be omitted < code > string response nonce = 4 ; < code >

public java lang string get response nonce ( ) { java lang object ref = response nonce ; if ( ! ( ref instanceof java lang string ) ) { com google protobuf byte string bs = ( com google protobuf byte string ) ref ; java lang string s = bs to string utf 8 ( ) ; response nonce = s ; return s ; } else { return ( java lang string ) ref ; } }


public void append ( byte [ ] key , int koff , int klen , byte [ ] value , int voff , int vlen ) throws i o exception { if ( ( koff | klen | ( koff + klen ) | ( key length - ( koff + klen ) ) ) < 0 ) { throw new index out of bounds exception ( " bad key buffer offset - length combination " ) ; } if ( ( voff | vlen | ( voff + vlen ) | ( value length - ( voff + vlen ) ) ) < 0 ) { throw new index out of bounds exception ( " bad value buffer offset - length combination " ) ; } try { data output stream dos key = prepare append key ( klen ) ; try { + + error count ; dos key write ( key , koff , klen ) ; - - error count ; } finally { dos key close ( ) ; } data output stream dos value = prepare append value ( vlen ) ; try { + + error count ; dos value write ( value , voff , vlen ) ; - - error count ; } finally { dos value close ( ) ; } } finally { state = state ready ; } }


maps any parameter that isn ' t local - associated , which can happen in the case where there is no java debug info

private void handle unassociated parameters ( ) { int sz ssa regs = ssa meth get reg count ( ) ; for ( int ssa reg = 0 ; ssa reg < sz ssa regs ; ssa reg + + ) { if ( ssa regs mapped get ( ssa reg ) ) { / / we already did this one above continue ; } int param index = get parameter index for reg ( ssa reg ) ; register spec ssa spec = get definition spec for ssa reg ( ssa reg ) ; if ( param index > = 0 ) { add mapping ( ssa spec , param index ) ; } } }


enter a parse tree produced by { @ link eql base parser # comparison operator }

void enter comparison operator ( eql base parser comparison operator context ctx ) ;


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


uses the sampler aggregation to find the minimum value of a field out of the top 3 scoring documents in a search

public void test sampler ( ) throws i o exception { text field type text field type = new text field type ( " text " ) ; mapped field type numeric field type = new number field mapper number field type ( " int " , number field mapper number type long ) ; index writer config index writer config = new index writer config ( ) ; index writer config set max buffered docs ( 100 ) ; index writer config set r a m buffer size m b ( 100 ) ; / / flush on open to have a single segment with predictable doc ids try ( directory dir = new directory ( ) ; index writer w = new index writer ( dir , index writer config ) ) { for ( long value : new long [ ] { 7 , 3 , - 10 , - 6 , 5 , 50 } ) { document doc = new document ( ) ; string builder text = new string builder ( ) ; for ( int i = 0 ; i < value ; i + + ) { text append ( " good " ) ; } doc add ( new field ( " text " , text to string ( ) , text field mapper defaults field type ) ) ; doc add ( new sorted numeric doc values field ( " int " , value ) ) ; w add document ( doc ) ; } sampler aggregation builder agg builder = new sampler aggregation builder ( " sampler " ) shard size ( 3 ) sub aggregation ( new min aggregation builder ( " min " ) field ( " int " ) ) ; try ( index reader reader = directory reader open ( w ) ) { assert equals ( " test expects a single segment " , 1 , reader leaves ( ) size ( ) ) ; index searcher searcher = new index searcher ( reader ) ; internal sampler sampler = search and reduce ( searcher , new term query ( new term ( " text " , " good " ) ) , agg builder , text field type , numeric field type ) ; min min = sampler get aggregations ( ) get ( " min " ) ; assert equals ( 5 0 , min get value ( ) , 0 ) ; assert true ( aggregation inspection helper has value ( sampler ) ) ; } } }


public void att n a m e test ( ) { / / todo : test att name }


the src file is on the local disk add it to the filesystem at the given dst name del src indicates if the source should be removed

public void copy from local file ( boolean del src , path src , path dst ) throws i o exception { copy from local file ( del src , true , src , dst ) ; }


creates an instance of { @ link to string helper } this is helpful for implementing { @ link object # to string ( ) } specification by example : { @ code returns " class name { } " more objects to string helper ( this ) to string ( ) ; returns " class name { x = 1 } " more objects to string helper ( this ) add ( " x " , 1 ) to string ( ) ; returns " my object { x = 1 } " more objects to string helper ( " my object " ) add ( " x " , 1 ) to string ( ) ; returns " class name { x = 1 , y = foo } " more objects to string helper ( this ) add ( " x " , 1 ) add ( " y " , " foo " ) to string ( ) ; returns " class name { x = 1 } " more objects to string helper ( this ) omit null values ( ) add ( " x " , 1 ) add ( " y " , null ) to string ( ) ; } note that in gwt , class names are often obfuscated

public static to string helper to string helper ( object self ) { return new to string helper ( self get class ( ) get simple name ( ) ) ; }


return the metadata { @ code mime type } selected for the underlying r socket at connection time on the client side this is configured via { @ link r socket requester builder # metadata mime type ( mime type ) } while on the server side it ' s obtained from the { @ link connection setup payload }


see original { @ link stubber # do throw ( class ) }

b d d stubber will throw ( class < ? extends throwable > to be thrown ) ;


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

public static < t > find executor < t > sum async ( final class < ? > model class , final string column name , final class < t > column type ) { return sum async ( base utility change case ( d b utility get table name by class name ( model class get name ( ) ) ) , column name , column type ) ; }


set whether to allow the raw injection of a bean instance into some other bean ' s property , despite the injected bean eventually getting wrapped ( for example , through aop auto - proxying ) this will only be used as a last resort in case of a circular reference that cannot be resolved otherwise : essentially , preferring a raw instance getting injected over a failure of the entire bean wiring process default is " false " , as of spring 2 0 turn this on to allow for non - wrapped raw beans injected into some of your references , which was spring 1 2 ' s ( arguably unclean ) default behavior < b > note : < b > it is generally recommended to not rely on circular references between your beans , in particular with auto - proxying involved

public void set allow raw injection despite wrapping ( boolean allow raw injection despite wrapping ) { this allow raw injection despite wrapping = allow raw injection despite wrapping ; }


shifts current row and redraws current control in record mode refreshes data

public void scroll to row ( @ not null row position position ) { result set row current row = controller get current row ( ) ; result set model model = controller get model ( ) ; switch ( position ) { case first : if ( model get row count ( ) > 0 ) { controller set current row ( model get row ( 0 ) ) ; } break ; case previous : if ( current row ! = null & & current row get visual number ( ) > 0 ) { controller set current row ( model get row ( current row get visual number ( ) - 1 ) ) ; } break ; case next : if ( current row ! = null & & current row get visual number ( ) < model get row count ( ) - 1 ) { controller set current row ( model get row ( current row get visual number ( ) + 1 ) ) ; } break ; case last : if ( current row ! = null ) { controller set current row ( model get row ( model get row count ( ) - 1 ) ) ; } break ; case current : if ( current row ! = null ) { controller set current row ( model get row ( current row get visual number ( ) ) ) ; } break ; } if ( controller is record mode ( ) ) { refresh data ( true , false , false ) ; } else { get control ( ) redraw ( ) ; } controller update status message ( ) ; controller update edit controls ( ) ; }


if receive a frame with end - of - stream set , send a pre - canned response

private static void on data read ( channel handler context ctx , http 2 data frame data ) throws exception { if ( data is end stream ( ) ) { send response ( ctx , data content ( ) ) ; } else { / / we do not send back the response to the remote - peer , so we need to release it data release ( ) ; } }


hook for further processing of on subscribe ' s subscription implement this method to call { @ link # request ( long ) } as an initial request values other than the unbounded { @ code long max value } imply that you ' ll also call request in { @ link # hook on next ( object ) } defaults to request unbounded long max value as in { @ link # request unbounded ( ) }

protected void hook on subscribe ( subscription subscription ) { subscription request ( long max value ) ; }


public long get client version ( ) { return client version ; }


the data type choice of the user or null if the dialog was cancelled

public data type get user chosen data type ( ) { return user choice ; }


test that interrupting a thread in an " interruptible " command execute does terminate the subprocess and throws an { @ link interrupted exception }

public void interruptible command is interrupted ( ) throws command exception { assume true ( os get current ( ) ! = os windows ) ; future command result result = command execute async ( ) ; assert throws ( interrupted exception class , result : : get ) ; assert that ( files exists ( tmp dir resolve ( " endfile " ) ) ) is false ( ) ; assert that ( result is done ( ) ) is true ( ) ; }


creates a { @ link reentrant read write lock } with the given fairness policy and rank the values returned by { @ link enum # get declaring class ( ) } and { @ link enum # name ( ) } are used to describe the lock in warning or exception output

public reentrant read write lock new reentrant read write lock ( e rank , boolean fair ) { return policy = = policies disabled ? new reentrant read write lock ( fair ) : new cycle detecting reentrant read write lock ( lock graph nodes get ( rank ) , fair ) ; }


to test data is partitioned to the right partition with time characteristic : event time producer parallelism = 2 ; kafka partition # = 3 ; consumer parallelism = 3

public void test assigned to partition event time ( ) throws exception { test assigned to partition ( 100000 , event time ) ; }


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


returns true if this bitmap font has been flipped for use with a y - down coordinate system

public boolean is flipped ( ) { return flipped ; }


determines if the four program listing merge panel is currently displayed in the merge tool

public boolean is showing listing merge panel ( ) { return is showing listing merge panel ; }


{ @ inherit doc } the default implementation returns the result of calling { @ link # visit children } on { @ code ctx }

@ override public t visit debug ( sql base parser debug context ctx ) { return visit children ( ctx ) ; }


set a custom x stream { @ link converter lookup } to use also used as { @ link converter registry } if the given reference implements it as well

public void set converter lookup ( converter lookup converter lookup ) { this converter lookup = converter lookup ; if ( converter lookup instanceof converter registry ) { this converter registry = ( converter registry ) converter lookup ; } }


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


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


void load into ( map < string , class < ? extends i route group > > routes ) ;


private int index last col ( final int [ ] width cache array ) { for ( int col index = width cache array length - 1 ; col index > = 0 ; col index - - ) { final int width = width cache array [ col index ] ; if ( width < = 0 ) { continue ; } return col index ; } return 0 ; }


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


guaranteed to throw an exception and leave the collection unmodified

public final boolean add ( e e ) { throw new unsupported operation exception ( ) ; }


public data node [ ] create d ns for test ( int num date node ) throws i o exception { configuration conf = new hdfs configuration ( ) ; conf set ( d f s config keys dfs datanode data dir key , data dir ) ; 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 " ) ; conf set int ( common configuration keys ipc client connect max retries key , 0 ) ; data node [ ] result = new data node [ num date node ] ; for ( int i = 0 ; i < num date node ; i + + ) { result [ i ] = internal data node test utils start d n with mock n n ( conf , nn addr , data dir ) ; } return result ; }


removes all blocks containing only g o t os from the control flow although much of this work will be done later when converting from rop to dex , not all simplification cases can be handled there furthermore , any no - op block between the exit block and blocks containing the real return or throw statements must be removed

private void remove empty gotos ( ) { final array list < ssa basic block > blocks = ssa meth get blocks ( ) ; ssa meth for each block depth first ( false , new ssa basic block visitor ( ) { public void visit block ( ssa basic block b , ssa basic block parent ) { array list < ssa insn > insns = b get insns ( ) ; if ( ( insns size ( ) = = 1 ) & & ( insns get ( 0 ) get opcode ( ) = = rops goto ) ) { bit set preds = ( bit set ) b get predecessors ( ) clone ( ) ; for ( int i = preds next set bit ( 0 ) ; i > = 0 ; i = preds next set bit ( i + 1 ) ) { ssa basic block pb = blocks get ( i ) ; pb replace successor ( b get index ( ) , b get primary successor index ( ) ) ; } } } } ) ; }


the version of this test supplied by { @ link map interface test } fails for this particular map implementation , because { @ code map get ( ) } returns a view collection that changes in the course of a call to { @ code remove ( ) } thus , the expectation doesn ' t hold that { @ code map remove ( x ) } returns the same value which { @ code map get ( x ) } did immediately beforehand

public void test remove ( ) { final map < string , map < integer , character > > map ; final string key to remove ; try { map = make populated map ( ) ; } catch ( unsupported operation exception e ) { return ; } key to remove = map key set ( ) iterator ( ) next ( ) ; if ( supports remove ) { int initial size = map size ( ) ; map get ( key to remove ) ; map remove ( key to remove ) ; / / this line doesn ' t hold - see the javadoc comments above / / assert equals ( expected value , old value ) ; assert false ( map contains key ( key to remove ) ) ; assert equals ( initial size - 1 , map size ( ) ) ; } else { try { map remove ( key to remove ) ; fail ( " expected unsupported operation exception " ) ; } catch ( unsupported operation exception expected ) { } } assert invariants ( map ) ; }


build a { @ link long keyed bucket ords }

public static bytes keyed bucket ords build ( big arrays big arrays , cardinality upper bound cardinality ) { return cardinality map ( estimate - > estimate < 2 ? new from single ( big arrays ) : new from many ( big arrays ) ) ; }


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

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


set the { @ link invocable handler method } to use to invoke the method processing an incoming { @ link javax jms message }

public void set handler method ( invocable handler method handler method ) { this handler method = handler method ; }


put faketest - query - paramters to test the collection format in query parameters

default response entity < void > test query parameter collection format ( @ not null @ api param ( value = " " , required = true ) @ valid @ request param ( value = " pipe " , required = true ) list < string > pipe , @ not null @ api param ( value = " " , required = true ) @ valid @ request param ( value = " ioutil " , required = true ) list < string > ioutil , @ not null @ api param ( value = " " , required = true ) @ valid @ request param ( value = " http " , required = true ) list < string > http , @ not null @ api param ( value = " " , required = true ) @ valid @ request param ( value = " url " , required = true ) list < string > url , @ not null @ api param ( value = " " , required = true ) @ valid @ request param ( value = " context " , required = true ) list < string > context ) { return new response entity < > ( http status not implemented ) ; }


from a given configuration get all entries representing requested resources : entries that match the { prefix } { resource name } = { value } [ { units } ] pattern

public static list < resource information > get requested resources from config ( configuration configuration , string prefix ) { list < resource information > result = new array list < > ( ) ; map < string , string > custom resources map = configuration get val by regex ( " ^ " + pattern quote ( prefix ) + yarn io optional + " [ ^ ] + $ " ) ; for ( entry < string , string > resource : custom resources map entry set ( ) ) { string resource name = resource get key ( ) substring ( prefix length ( ) ) ; matcher matcher = resource request value pattern matcher ( resource get value ( ) ) ; if ( ! matcher matches ( ) ) { string error msg = " invalid resource request specified for property " + resource get key ( ) + " : \ " " + resource get value ( ) + " \ " , expected format is : value [ ] [ units ] " ; log error ( error msg ) ; throw new illegal argument exception ( error msg ) ; } long value = long parse long ( matcher group ( 1 ) ) ; string unit = matcher group ( 2 ) ; if ( unit is empty ( ) ) { unit = resource utils get default unit ( resource name ) ; } resource information resource information = new resource information ( ) ; resource information set name ( resource name ) ; resource information set value ( value ) ; resource information set units ( unit ) ; result add ( resource information ) ; } return result ; }


because derby ' s database table name is uppercase , you need to do a conversion to the insert statement that was inserted

public static string insert statement correction ( string sql ) { matcher matcher = insert into pattern matcher ( sql ) ; if ( ! matcher find ( ) ) { return sql ; } final string target = matcher group ( 0 ) ; final string upper case = target to upper case ( ) replace ( " ` " , " " ) ; return sql replace first ( insert into values , upper case ) replace ( " ; " , " " ) ; }


download the most recent fsimage from the name node , and save it to a local file in the given directory

public int fetch image ( final string [ ] argv , final int idx ) throws i o exception { configuration conf = get conf ( ) ; final url info server = d f s util get info server ( h a util get address of active ( get d f s ( ) ) , conf , d f s util get http client scheme ( conf ) ) to u r l ( ) ; security util do as current user ( new privileged exception action < void > ( ) { @ override public void run ( ) throws exception { transfer fs image download most recent image to directory ( info server , new file ( argv [ idx ] ) ) ; return null ; } } ) ; return 0 ; }


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


set the mappings between exception class names and error view names the exception class name can be a substring , with no wildcard support at present a value of " servlet exception " would match { @ code javax servlet servlet exception } and subclasses , for example < b > nb : < b > consider carefully how specific the pattern is , and whether to include package information ( which isn ' t mandatory ) for example , " exception " will match nearly anything , and will probably hide other rules " java lang exception " would be correct if " exception " was meant to define a rule for all checked exceptions with more unusual exception names such as " base business exception " there ' s no need to use a fqn

public void set exception mappings ( properties mappings ) { this exception mappings = mappings ; }


cancels the request created by this request factory

public void cancel run ( ) { stop ( true ) ; }


takes a list of resource requests ( asks ) , extracts the key information viz ( priority , resource name , capability ) and adds to the outstanding opportunistic outstanding op reqs map the nested map is required to enforce the current yarn constraint that only a single resource request can exist at a give priority and capability

public void add to outstanding reqs ( list < resource request > resource asks ) { for ( resource request request : resource asks ) { scheduler request key scheduler key = scheduler request key create ( request ) ; map < resource , enriched resource request > req map = outstanding op reqs get ( scheduler key ) ; if ( req map = = null ) { req map = new hash map < > ( ) ; outstanding op reqs put ( scheduler key , req map ) ; } enriched resource request e req = req map get ( request get capability ( ) ) ; if ( e req = = null ) { e req = new enriched resource request ( request ) ; req map put ( request get capability ( ) , e req ) ; } / / set num containers only for any request if ( resource request is any location ( request get resource name ( ) ) ) { e req get request ( ) set resource name ( resource request any ) ; e req get request ( ) set num containers ( request get num containers ( ) ) ; } else { e req add location ( request get resource name ( ) , request get num containers ( ) ) ; } if ( resource request is any location ( request get resource name ( ) ) ) { log info ( " # of outstanding op reqs in any ( at " + " priority = " + scheduler key get priority ( ) + " , allocation req id = " + scheduler key get allocation request id ( ) + " , with capability = " + request get capability ( ) + " ) : " + " , with location = " + request get resource name ( ) + " ) : " + " , num containers = " + e req get request ( ) get num containers ( ) ) ; } } }


calls { @ link media period # prepare ( media period callback , long ) } on the playback thread and blocks until the method has been called

public count down latch prepare period ( final media period media period , final long position us ) { final condition variable prepare called = new condition variable ( ) ; final count down latch prepared latch = new count down latch ( 1 ) ; run on playback thread ( ( ) - > { media period prepare ( new media period callback ( ) { @ override public void on prepared ( media period media period 1 ) { prepared latch count down ( ) ; } @ override public void on continue loading requested ( media period source ) { / / do nothing } } , position us ) ; prepare called open ( ) ; } ) ; prepare called block ( ) ; return prepared latch ; }


evaluate the positions of the vertices depending on policy

boolean evaluate ( quaternion [ ] vertices ) { switch ( this ) { case draw : return false ; case query : / / if we are querying and any of the vertices are behind the camera , return true / / this means a bounding box will not be considered occluded when any of its vertices / / are behind the camera frustum near plane for ( quaternion vertex : vertices ) { if ( vertex z + vertex w < = 0 ) return true ; } return false ; } return false ; }


public void reopen probe ( mutable object iterator < v1 > probe input ) throws i o exception { reopen hash table reopen probe ( probe input ) ; }


return consumer ( s ) configured to access to the { @ link client http request }

consumer < client http request > http request ( ) ;


this method returns a { @ link state snapshot key group reader } that can be used to restore the state on a per - key - group basis this method tries to return a reader for the given version hint

state snapshot key group reader key group reader ( int read version hint ) ;


notepad pdb is here : < tesymbols notepad pdb xml does not exist repo location set to < tesymbols on windows , pdb file should be found on non - windows , pdb file should be found

public void test find pdb 6 ( ) throws exception { created files = create files ( pdb location symbols no subdir , pdb xml location none ) ; file pdb = pdb parser find p d b ( test program , false , symbols folder ) ; assert not null ( pdb ) ; assert equals ( pdb file , pdb ) ; }


checks that the current state is equal to the expected state

private void check current state ( state expected ) { state actual = state ( ) ; if ( actual ! = expected ) { if ( actual = = failed ) { / / handle this specially so that we can include the failure cause , if there is one throw new illegal state exception ( " expected the service " + this + " to be " + expected + " , but the service has failed " , failure cause ( ) ) ; } throw new illegal state exception ( " expected the service " + this + " to be " + expected + " , but was " + actual ) ; } }


{ @ inherit doc } the default implementation does nothing

@ override public void exit statement ( eql base parser statement context ctx ) { }


add the ( sanitized ) marshalled credentials to the string value

public string to string ( ) { return super to string ( ) + " ; " + marshalled credentials to string ( ) ; }


public put repository request builder set settings ( map < string , object > source ) { request settings ( source ) ; return this ; }


stop the executor if it is not null this uses { @ link executor service # shutdown now ( ) } and so does not block until they have completed

protected synchronized void stop executor ( ) { if ( executor ! = null ) { executor shutdown now ( ) ; } }


gets a list of all broadcast inputs attached to this node

public list < named channel > get broadcast inputs ( ) { return this broadcast inputs ; }


calculates diff between two immutable open int maps of diffable objects

public static < t extends diffable < t > > map diff < integer , t , immutable open int map < t > > diff ( immutable open int map < t > before , immutable open int map < t > after , key serializer < integer > key serializer ) { assert after ! = null & & before ! = null ; return new immutable open int map diff < > ( before , after , key serializer , diffable value serializer get write only instance ( ) ) ; }


add to this collection a { @ link header } with the given key and value

headers add list ( string key , list < ? > value , schema schema ) ;


change the underlying limitations note the change will be taken as best effort , meaning that all already scheduled traffics will not be changed , but only applied to new traffics so the expected usage of this method is to be used not too often , accordingly to the traffic shaping configuration

public void configure ( long new write limit , long new read limit ) { write limit = new write limit ; read limit = new read limit ; if ( traffic counter ! = null ) { traffic counter reset accounting ( traffic counter milli second from nano ( ) ) ; } }


todo : note : this method does a lot of work caching retrieving states just to update the namespace this method should be removed for the sake of namespaces being lazily fetched from the keyed state backend , or being set on the state directly

public < n , s extends state > s get partitioned state ( final n namespace , final type serializer < n > namespace serializer , final state descriptor < s , ? > state descriptor ) throws exception { check not null ( namespace , " namespace " ) ; if ( last name ! = null & & last name equals ( state descriptor get name ( ) ) ) { last state set current namespace ( namespace ) ; return ( s ) last state ; } internal kv state < k , ? , ? > previous = key value states by name get ( state descriptor get name ( ) ) ; if ( previous ! = null ) { last state = previous ; last state set current namespace ( namespace ) ; last name = state descriptor get name ( ) ; return ( s ) previous ; } final s state = get or create keyed state ( namespace serializer , state descriptor ) ; final internal kv state < k , n , ? > kv state = ( internal kv state < k , n , ? > ) state ; last name = state descriptor get name ( ) ; last state = kv state ; kv state set current namespace ( namespace ) ; return state ; }


returns { @ code true } if there are no values in this array ( { @ link # length } is zero )

public boolean is empty ( ) { return end = = start ; }


a comma separated list of routing values to control the shards the count will be executed on

public count request routing ( string routings ) { this routing = strings array to comma delimited string ( routings ) ; return this ; }


public static void remove storage ( block info block , datanode storage info storage ) { block remove storage ( storage ) ; }


gets the memory dedicated to each sub - task for this node

public double get relative memory per sub task ( ) { return this relative memory per sub task ; }


asynchronously fulfills the request into the specified { @ link remote views } object with the given { @ code view id } this is used for loading bitmaps into a { @ link notification }

public void into ( @ non null remote views remote views , @ id res int view id , int notification id , @ non null notification notification , @ nullable string notification tag , @ nullable callback callback ) { long started = system nano time ( ) ; if ( remote views = = null ) { throw new illegal argument exception ( " remote views must not be null " ) ; } if ( notification = = null ) { throw new illegal argument exception ( " notification must not be null " ) ; } if ( deferred ) { throw new illegal state exception ( " fit cannot be used with remote views " ) ; } if ( placeholder drawable ! = null | | error drawable ! = null ) { throw new illegal argument exception ( " cannot use placeholder or error drawables with remote views " ) ; } request request = create request ( started ) ; remote views action action = new notification action ( picasso , request , error res id , new remote views target ( remote views , view id ) , notification id , notification , notification tag , callback ) ; perform remote view into ( request , action ) ; }


callback method to be invoked when an item in this recycler view has been clicked

void on item click ( @ non null base quick adapter < ? , ? > adapter , @ non null view view , int position ) ;


returns a string representation of the multimap , generated by calling { @ code to string } on the map returned by { @ link multimap # as map }

public string to string ( ) { return as map ( ) to string ( ) ; }


the format of time bucket in day unit is " yyyy m mdd " , so which means the time bucket must be between 10000000 and 99999999

public static boolean is day bucket ( long time bucket ) { return time bucket < 99999999l & & time bucket > 10000000l ; }


a sensible definition of { @ link # to string } in terms of the { @ code iterator } method of { @ link # entry set } if you override { @ link # entry set } , you may wish to override { @ link # to string } to forward to this implementation

protected string standard to string ( ) { return maps to string impl ( this ) ; }


to test class name in snake case to test class name in snake case

public client test classname ( client body ) throws api exception { api response < client > local var resp = test classname with http info ( body ) ; return local var resp get data ( ) ; }


check whether or not this execution has a local variable set with the given name

boolean has variable local ( string execution id , string variable name ) ;


only { @ link # get name ( ) } is considered

public int hash code ( ) { return get name ( ) hash code ( ) ; }


creates an array marking unused constant pool entries for all the elements in the given array of constant pool indices

private boolean [ ] shrink flags ( constant [ ] constant pool , int [ ] array , int length ) { boolean [ ] unused = new boolean [ length ] ; / / shift the used objects together for ( int index = 0 ; index < length ; index + + ) { if ( ! usage marker is used ( constant pool [ array [ index ] ] ) ) { unused [ index ] = true ; } } return unused ; }


returns < code > true < code > if the mailbox contains mail must be called from the mailbox thread ( { @ link # is mailbox thread ( ) }


mark functions as requiring any search result to also match one of its childparents

public list < function record > mark records force relation ( list < function record > func list , boolean value ) throws i o exception { array list < function record > res = new array list < > ( ) ; for ( function record func rec : func list ) { res add ( func rec get fid db ( ) set force relation on function ( func rec , value ) ) ; } return res ; }


returns a map of profile properties included in this profile instance the returned properties corresponds to how this profile is described in the credential profiles file , i e , profiles with basic credentials consist of two properties { " aws access key id " , " aws secret access key " } and profiles with session credentials have three properties , with an additional " aws session token " property

public map < string , string > get properties ( ) { return new linked hash map < string , string > ( properties ) ; }


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


should we fetch information on the entire child queue hierarchy ?

public abstract void set recursive ( boolean recursive ) ;


private list < bundle patch > diff patch ( patch info his patch info , patch info current patch info ) { list < bundle patch > list = new linked list < bundle patch > ( ) ; map < string , patch bundle info > his bundles = to map ( his patch info get bundles ( ) ) ; map < string , patch bundle info > cur bundles = to map ( current patch info get bundles ( ) ) ; for ( map entry < string , patch bundle info > entry : cur bundles entry set ( ) ) { string bundle name = entry get key ( ) ; patch bundle info cur bundle info = entry get value ( ) ; bundle patch bundle patch = new bundle patch ( ) ; bundle patch name = cur bundle info get name ( ) ; bundle patch dependency = cur bundle info get dependency ( ) ; bundle patch pkg name = cur bundle info get pkg name ( ) ; bundle patch artifact id = cur bundle info get artifact id ( ) ; bundle patch unit tag = cur bundle info get unit tag ( ) ; bundle patch version = cur bundle info get version ( ) ; / / bundle patch src unit tag = cur bundle info get src unit tag ( ) ; bundle patch new bundle = cur bundle info get new bundle ( ) ; bundle patch his patch url = his patch info get download url ( ) ; bundle patch main bundle = cur bundle info get main bundle ( ) ; / / bundle patch base version = cur bundle info get base version ( ) ; if ( his bundles contains key ( bundle name ) ) { / / bundle patch new bundle = false ; patch bundle info his bundle info = his bundles get ( bundle name ) ; bundle patch base version = his bundle info get version ( ) ; bundle patch src unit tag = his bundle info get unit tag ( ) ; if ( cur bundle info get version ( ) equals ignore case ( his bundle info get version ( ) ) ) { / / / / : ， if ( cur bundle info get new bundle ( ) ) { his bundles remove ( bundle name ) ; continue ; } bundle patch bundle policy = bundle policy merge ; } else { / / ， bundle patch bundle policy = bundle policy merge ; } his bundles remove ( bundle name ) ; } else { / / bundle patch bundle policy = bundle policy add ; bundle patch src unit tag = cur bundle info get src unit tag ( ) ; } list add ( bundle patch ) ; } / / ， for ( map entry < string , patch bundle info > entry : his bundles entry set ( ) ) { patch bundle info his bundle info = entry get value ( ) ; bundle patch bundle patch = new bundle patch ( ) ; bundle patch name = his bundle info get name ( ) ; bundle patch unit tag = his bundle info get unit tag ( ) ; bundle patch src unit tag = his bundle info get src unit tag ( ) ; bundle patch dependency = his bundle info get dependency ( ) ; bundle patch pkg name = his bundle info get pkg name ( ) ; bundle patch artifact id = his bundle info get artifact id ( ) ; bundle patch bundle policy = bundle policy rollback ; bundle patch version = rollback version ; bundle patch reset = true ; bundle patch base version = his bundle info get version ( ) ; list add ( bundle patch ) ; } return list ; }


object send a sync request ( channel channel , object message ) throws i o exception , timeout exception ;


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


since the field type is { @ link immutable map } , xml shouldn ' t contain a reference to the type name

private void roundtrip immutable map ( x stream 2 xs , immutable map < ? , ? > m ) { immutable map holder a = new immutable map holder ( ) ; a m = m ; string xml = xs to x m l ( a ) ; / / system out println ( xml ) ; assert false ( " shouldn ' t contain the class name " , xml contains ( " google " ) ) ; assert false ( " shouldn ' t contain the class name " , xml contains ( " class " ) ) ; a = ( immutable map holder ) xs from x m l ( xml ) ; assert same ( m get class ( ) , a m get class ( ) ) ; / / should get back the exact same type , not just a random map assert equals ( m , a m ) ; }


returns a { @ link com bumptech glide request request options } with { @ link # encode format ( android graphics bitmap compress format ) } called with the given format

public static request options encode format of ( @ non null bitmap compress format format ) { return new request options ( ) encode format ( format ) ; }


computes indices of physical fields corresponding to the selected logical fields of a { @ link table schema }

public static int [ ] compute physical indices ( list < table column > logical columns , data type physical type , function < string , string > name remapping ) { map < table column , integer > physical index lookup = compute physical indices ( logical columns stream ( ) , physical type , name remapping ) ; return logical columns stream ( ) map to int ( physical index lookup : : get ) to array ( ) ; }


publishes the event to the registered { @ link event listener } instances

boolean publish ( result partition i d partition id , task event event ) ;


sets the given { @ link android graphics drawable drawable } on the view using { @ link android widget image view # set image drawable ( android graphics drawable drawable ) }

public void on load started ( @ nullable drawable placeholder ) { super on load started ( placeholder ) ; set resource internal ( null ) ; set drawable ( placeholder ) ; }


public boolean is empty ( ) { return size = = 0 ; }


determine the criteria to resolve idp metadata if the criteria - set contains a service defn to act as an override , based on the presence of { @ link saml id p saml registered service criterion } , that service is positioned first in the list an empty criteria is always added to calculate and resolve metadata globally as the last step , in case an override is not available

private static list < optional < saml registered service > > determine filtering criteria ( final criteria set criteria ) { val results = new array list < optional < saml registered service > > ( ) ; if ( criteria contains ( saml id p saml registered service criterion class ) ) { val criterion = criteria get ( saml id p saml registered service criterion class ) ; results add ( optional of ( objects require non null ( criterion ) get registered service ( ) ) ) ; } results add ( optional empty ( ) ) ; return results ; }


returns the { @ link tunneling support } from the combined { @ link capabilities }

static int get tunneling support ( @ capabilities int support flags ) { return support flags & tunneling support mask ; }


add a new value to the histogram note that the value will be clipped to the maximum value available in the histogram instance so if the histogram has 100 buckets , inserting 101 will increment the last bucket

public void add ( int value ) { if ( value < 0 ) { throw new runtime exception ( " invalid negative value " ) ; } if ( value > = counts length ) { value = counts length - 1 ; } synchronized ( this ) { int cur count = counts [ value ] ; if ( cur count < integer max value ) { counts [ value ] = counts [ value ] + 1 ; } } }


copy vertices this assumes the vertices define a convex polygon it is assumed that the exterior is the the right of each edge

public void set ( vector 2 [ ] vertices ) { vec 2 [ ] v = new org jbox 2d common vec 2 [ vertices length ] ; for ( int i = 0 ; i < v length ; i + + ) { v [ i ] = new vec 2 ( vertices [ i ] x , vertices [ i ] y ) ; } shape set ( v , v length ) ; }


returns an { @ link annotation } object reflecting the annotation provided , or null if this class doesn ' t have such an annotation this is a convenience function if the caller knows already which annotation type he ' s looking for

static public annotation get declared annotation ( class c , class < ? extends java lang annotation annotation > annotation type ) { java lang annotation annotation [ ] annotations = c get declared annotations ( ) ; for ( java lang annotation annotation annotation : annotations ) { if ( annotation annotation type ( ) equals ( annotation type ) ) return new annotation ( annotation ) ; } return null ; }


given the local state of pending storage mutations , this will generate a result that will include that data that needs to be written to the storage service , as well as any changes you need to write back to local storage ( like storage keys that might have changed for updated contacts )

public static @ non null optional < local write result > build storage updates for local ( long current manifest version , @ non null list < storage id > current local keys , @ non null list < recipient settings > updates , @ non null list < recipient settings > inserts , @ non null list < recipient settings > deletes , @ non null optional < signal account record > account update , @ non null optional < signal account record > account insert ) { int account count = stream of ( current local keys ) filter ( id - > id get type ( ) = = manifest record identifier type account value ) to list ( ) size ( ) ; if ( account count > 1 ) { throw new multiple existing accounts exception ( ) ; } optional < storage id > account id = optional from nullable ( stream of ( current local keys ) filter ( id - > id get type ( ) = = manifest record identifier type account value ) find first ( ) or else ( null ) ) ; if ( account id is present ( ) & & account insert is present ( ) & & ! account insert get ( ) get id ( ) equals ( account id get ( ) ) ) { throw new invalid account insert exception ( ) ; } if ( account id is present ( ) & & account update is present ( ) & & ! account update get ( ) get id ( ) equals ( account id get ( ) ) ) { throw new invalid account update exception ( ) ; } if ( account update is present ( ) & & account insert is present ( ) ) { throw new invalid account dual insert update exception ( ) ; } set < storage id > complete ids = new linked hash set < > ( current local keys ) ; set < signal storage record > storage inserts = new linked hash set < > ( ) ; set < byte buffer > storage deletes = new linked hash set < > ( ) ; map < recipient id , byte [ ] > storage key updates = new hash map < > ( ) ; for ( recipient settings insert : inserts ) { if ( insert get group type ( ) = = recipient database group type signal v2 & & insert get sync extras ( ) get group master key ( ) = = null ) { log w ( tag , " missing master key on gv 2 recipient " ) ; continue ; } storage inserts add ( storage sync models local to remote record ( insert ) ) ; switch ( insert get group type ( ) ) { case none : complete ids add ( storage id for contact ( insert get storage id ( ) ) ) ; break ; case signal v1 : complete ids add ( storage id for group v 1 ( insert get storage id ( ) ) ) ; break ; case signal v2 : complete ids add ( storage id for group v 2 ( insert get storage id ( ) ) ) ; break ; default : throw new assertion error ( " unsupported type ! " ) ; } } if ( account insert is present ( ) ) { storage inserts add ( signal storage record for account ( account insert get ( ) ) ) ; complete ids add ( account insert get ( ) get id ( ) ) ; } for ( recipient settings delete : deletes ) { byte [ ] key = objects require non null ( delete get storage id ( ) ) ; storage deletes add ( byte buffer wrap ( key ) ) ; complete ids remove ( storage id for contact ( key ) ) ; } for ( recipient settings update : updates ) { storage id old id ; storage id new id ; switch ( update get group type ( ) ) { case none : old id = storage id for contact ( update get storage id ( ) ) ; new id = storage id for contact ( generate key ( ) ) ; break ; case signal v1 : old id = storage id for group v 1 ( update get storage id ( ) ) ; new id = storage id for group v 1 ( generate key ( ) ) ; break ; case signal v2 : old id = storage id for group v 2 ( update get storage id ( ) ) ; new id = storage id for group v 2 ( generate key ( ) ) ; break ; default : throw new assertion error ( " unsupported type ! " ) ; } storage inserts add ( storage sync models local to remote record ( update , new id get raw ( ) ) ) ; storage deletes add ( byte buffer wrap ( old id get raw ( ) ) ) ; complete ids remove ( old id ) ; complete ids add ( new id ) ; storage key updates put ( update get id ( ) , new id get raw ( ) ) ; } if ( account update is present ( ) ) { storage id old id = account update get ( ) get id ( ) ; storage id new id = storage id for account ( generate key ( ) ) ; storage inserts add ( signal storage record for account ( new id , account update get ( ) ) ) ; storage deletes add ( byte buffer wrap ( old id get raw ( ) ) ) ; complete ids remove ( old id ) ; complete ids add ( new id ) ; storage key updates put ( recipient self ( ) get id ( ) , new id get raw ( ) ) ; } if ( storage inserts is empty ( ) & & storage deletes is empty ( ) ) { return optional absent ( ) ; } else { list < byte [ ] > storage delete bytes = stream of ( storage deletes ) map ( byte buffer : : array ) to list ( ) ; list < storage id > complete ids bytes = new array list < > ( complete ids ) ; signal storage manifest manifest = new signal storage manifest ( current manifest version + 1 , complete ids bytes ) ; write operation result write operation result = new write operation result ( manifest , new array list < > ( storage inserts ) , storage delete bytes ) ; return optional of ( new local write result ( write operation result , storage key updates ) ) ; } }


replaces the contents of the table with the given list of extensions

public void set extensions ( set < extension details > extensions ) { table model set model data ( new array list < > ( extensions ) ) ; }


determines if the indicated property maps are for the same type of property

private boolean same property types ( property map latest map , property map my map ) { if ( latest map ! = null & & my map ! = null ) { return latest map get class ( ) equals ( my map get class ( ) ) ; } return true ; }


helper method to configure the token endpoint of the first oauth found in the api authorizations ( there should be only one )

public token request builder get token end point ( ) { for ( interceptor api authorization : api authorizations values ( ) ) { if ( api authorization instanceof o auth ) { o auth oauth = ( o auth ) api authorization ; return oauth get token request builder ( ) ; } } return null ; }


perform the search algorithm for { @ link # find annotation descriptor for types ( class , class ) } , avoiding endless recursion by tracking which annotations have already been visited

private static untyped annotation descriptor find annotation descriptor for types ( @ nullable class < ? > clazz , set < annotation > visited , class < ? extends annotation > annotation types ) { assert non empty annotation type array ( annotation types , " the list of annotation types must not be empty " ) ; if ( clazz = = null | | object class = = clazz ) { return null ; } / / declared locally ? for ( class < ? extends annotation > annotation type : annotation types ) { if ( annotation utils is annotation declared locally ( annotation type , clazz ) ) { return new untyped annotation descriptor ( clazz , clazz get annotation ( annotation type ) ) ; } } / / declared on a composed annotation ( i e , as a meta - annotation ) ? for ( annotation composed annotation : clazz get declared annotations ( ) ) { if ( ! annotation utils is in java lang annotation package ( composed annotation ) & & visited add ( composed annotation ) ) { untyped annotation descriptor descriptor = find annotation descriptor for types ( composed annotation annotation type ( ) , visited , annotation types ) ; if ( descriptor ! = null ) { return new untyped annotation descriptor ( clazz , descriptor get declaring class ( ) , composed annotation , descriptor get annotation ( ) ) ; } } } / / declared on an interface ? for ( class < ? > ifc : clazz get interfaces ( ) ) { untyped annotation descriptor descriptor = find annotation descriptor for types ( ifc , visited , annotation types ) ; if ( descriptor ! = null ) { return new untyped annotation descriptor ( clazz , descriptor get declaring class ( ) , descriptor get composed annotation ( ) , descriptor get annotation ( ) ) ; } } / / declared on a superclass ? return find annotation descriptor for types ( clazz get superclass ( ) , visited , annotation types ) ; }


predicate to decide whether or not to accept a prefix

boolean accept ( path key path , string common prefix ) ;


public void test equals and hashcode ( ) { check equals and hash code ( create test item ( random int ( 3 ) ) , nested identity tests : : copy , nested identity tests : : mutate ) ; }


set a fixed locale that this resolver will return if no cookie found

public void set default locale ( @ nullable locale default locale ) { this default locale = default locale ; }


extra the { @ link context carrier # get extension context ( ) } into this context

void extract ( context carrier carrier ) { this skip analysis = carrier get extension context ( ) skip analysis ; }


returns maximum namespace address within the specified address space for upgrade iterators for a signed stack space , the negative region is treated as positive for the purpose of identifying the maximum address key encoding

public static address get max address ( address space addr space , long namespace i d ) { if ( addr space is stack space ( ) ) { return new old generic namespace address ( addr space , - 1 , namespace i d ) ; } return new old generic namespace address ( addr space , addr space get max address ( ) get offset ( ) , namespace i d ) ; }


revert of org apache dubbo common service descriptor # get display service key ( )

public static base service metadata revert display service key ( string display key ) { string [ ] eles = string utils split ( display key , colon separator ) ; if ( eles = = null | | eles length < 1 | | eles length > 2 ) { return new base service metadata ( ) ; } base service metadata service descriptor = new base service metadata ( ) ; service descriptor set service interface name ( eles [ 0 ] ) ; if ( eles length = = 2 ) { service descriptor set version ( eles [ 1 ] ) ; } return service descriptor ; }


invoked before the folders of a shard are deleted from disk the list of folders contains { @ link path } s that may or may not exist on disk shard locks are expected to be acquired at the time this method is invoked

void before shard folders deleted ( shard id shard id , index settings index settings , path [ ] shard paths ) ;


test the echo map servlet that uses get parameter map

@ test public void test echo map ( ) throws exception { assert equals ( " a : b \ nc : d \ n " , read output ( new url ( base url , " / echomap ? a = b & c = d " ) ) ) ; assert equals ( " a : b , & gt ; \ nc & lt ; : d \ n " , read output ( new url ( base url , " / echomap ? a = b & c < = d & a = > " ) ) ) ; }


return the target type that was requested to convert to

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


indicates whether this domain name ends in a { @ linkplain # is public suffix ( ) public suffix } , including if it is a public suffix itself for example , returns { @ code true } for { @ code www google com } , { @ code foo co uk } and { @ code com } , but not for { @ code invalid } or { @ code google invalid } this is the recommended method for determining whether a domain is potentially an addressable host note that this method is equivalent to { @ link # has registry suffix ( ) } because all registry suffixes are public suffixes and all public suffixes have registry suffixes

public boolean has public suffix ( ) { return public suffix index ! = no suffix found ; }


this test sets up a scenario where the history files have already been moved to the " done " directory ( so the " intermediate " directory is empty ) , but then move to done ( ) is called again on the same history file it validates that the second move to done ( ) still succeeds rather than throws a file not found exception

public void test move to done already moved succeeds ( ) throws exception { history file manager test history file manager = new history file manager test ( ) ; long job timestamp = 1535436603000l ; string job = " job " + job timestamp + " 123456789 " ; string intermediate directory = " / " + uuid random u u i d ( ) ; string done directory = " / " + uuid random u u i d ( ) ; configuration conf = dfs cluster get configuration ( 0 ) ; conf set ( j h admin config mr history intermediate done dir , intermediate directory ) ; conf set ( j h admin config mr history done dir , done directory ) ; path intermediate history file path = new path ( intermediate directory + " / " + job + " jhist " ) ; path intermediate conf file path = new path ( intermediate directory + " / " + job + " conf xml " ) ; path done history file path = new path ( done directory + " / " + job history utils timestamp directory component ( job timestamp ) + " / 123456 / " + job + " jhist " ) ; path done conf file path = new path ( done directory + " / " + job history utils timestamp directory component ( job timestamp ) + " / 123456 / " + job + " conf xml " ) ; dfs cluster get file system ( ) create new file ( done history file path ) ; dfs cluster get file system ( ) create new file ( done conf file path ) ; history file manager service init ( conf ) ; job index info job index info = new job index info ( ) ; job index info set job id ( type converter to yarn ( job i d for name ( job ) ) ) ; job index info set finish time ( job timestamp ) ; history file info info = history file manager get history file info ( intermediate history file path , intermediate conf file path , null , job index info , false ) ; info move to done ( ) ; assert assert false ( info is move pending ( ) ) ; assert assert equals ( done history file path to string ( ) , info get history file ( ) to uri ( ) get path ( ) ) ; assert assert equals ( done conf file path to string ( ) , info get conf file ( ) to uri ( ) get path ( ) ) ; }


returns estimated cache size bytes each entry size is calculated by { @ link # estimate size of ( java lang object , java lang object ) }

public long estimated size bytes ( ) { return estimated size bytes get ( ) ; }


after read a page , we may need some initialization


test that replication of under - replicated blocks is detected and basically works

public void test basic replication ( ) throws exception { add nodes ( nodes ) ; for ( int i = 0 ; i < num test iters ; i + + ) { do basic test ( i ) ; } }


called when reading a headers or priority frame this may be used to change the stream ' s weight from the default ( 16 ) to a new value

void priority ( int stream id , int stream dependency , int weight , boolean exclusive ) ;


public scripted metric aggregation builder map script ( script map script ) { if ( map script = = null ) { throw new illegal argument exception ( " [ map script ] must not be null : [ " + name + " ] " ) ; } this map script = map script ; return this ; }


returns the alpha value for all web lines

public int get web alpha ( ) { return m web alpha ; }


retrieve the given message source resolvable ( e g an object error instance ) in the given locale

public string get message ( message source resolvable resolvable , locale locale ) throws no such message exception { return this message source get message ( resolvable , locale ) ; }


dump constructor details to the log note : method has no affect unless constructed with verbose logging mode

void dump constructor ( string subtable name , constructor c ) { if ( ! is verbose enabled ( ) ) { return ; } if ( subtable name ! = null ) { append ( " " + subtable name ) ; } else { subtable symbol parent = c get parent ( ) ; if ( parent ! = null ) { string name = parent get name ( ) ; if ( ! " instruction " equals ( name ) ) { append ( " " + name ) ; } } } append ( " : " ) ; append ( " { line # " ) ; append ( integer to string ( c get lineno ( ) ) ) ; append ( " } " ) ; list < string > print pieces = c get print pieces ( ) ; if ( print pieces size ( ) = = 0 ) { for ( int i = 0 ; i < c get num operands ( ) ; i + + ) { if ( i ! = 0 ) { append ( " , " ) ; } operand symbol operand = c get operand ( i ) ; append ( " < " ) ; append ( operand get name ( ) ) ; append ( " > " ) ; } } else { for ( string piece : print pieces ) { if ( piece starts with ( " \ n " ) ) { int sym index = piece char at ( 1 ) - ' a ' ; operand symbol sym = c get operand ( sym index ) ; append ( " < " ) ; append ( sym get name ( ) ) ; append ( " > " ) ; } else { append ( piece ) ; } } } append ( " \ n " ) ; }


public void logout user test ( ) throws api exception { api logout user ( ) ; / / todo : test validations }


return an instance of this utility that represents what the state of the internal data structures should be when topic creation is disabled

public static topic creation empty ( ) { return empty ; }


cell indexing convention defined in { @ link striping cell }

private static void calcualte chunk positions in buf ( int cell size , aligned stripe [ ] stripes , striping cell [ ] cells , byte buffer buf ) { / * * | < - - - - - - - - - - - - - - - aligned stripe - - - - - - - - - - - - - - - > | * * | < - length 0 - > | < - - length 1 - - > | < - length 2 - > | * + - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - + * | cell 0 0 0 | cell 3 1 0 | cell 6 2 0 | < - blk 0 * + - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - + * / \ * | | * v offset 0 v offset 1 * + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + * | cell 0 0 0 | cell 1 0 1 and cell 2 0 2 | cell 3 1 0 | < - buf * | ( partial ) | ( from blk 1 and blk 2 ) | | * + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + * / int done = 0 ; for ( striping cell cell : cells ) { long cell start = cell idx in internal blk * cell size + cell offset ; long cell end = cell start + cell size - 1 ; striping chunk chunk ; for ( aligned stripe s : stripes ) { long stripe end = s get offset in block ( ) + s get span in block ( ) - 1 ; long overlap start = math max ( cell start , s get offset in block ( ) ) ; long overlap end = math min ( cell end , stripe end ) ; int over lap len = ( int ) ( overlap end - overlap start + 1 ) ; if ( over lap len < = 0 ) { continue ; } chunk = s chunks [ cell idx in stripe ] ; if ( chunk = = null ) { chunk = new striping chunk ( ) ; s chunks [ cell idx in stripe ] = chunk ; } chunk get chunk buffer ( ) add slice ( buf , ( int ) ( done + overlap start - cell start ) , over lap len ) ; } done + = cell size ; } }


find the meta annotation from the annotation type by meta annotation type

static < a extends annotation > a find meta annotation ( class < ? extends annotation > annotation type , class < a > meta annotation type ) { return first ( find meta annotations ( annotation type , meta annotation type ) ) ; }


populates a multiset by reading an input stream , as part of deserialization see { @ link # write multiset } for the data format

static < e > void populate multiset ( multiset < e > multiset , object input stream stream ) throws i o exception , class not found exception { int distinct elements = stream read int ( ) ; populate multiset ( multiset , stream , distinct elements ) ; }


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


adds a route to the given handler function that handles all http { @ code post } requests that match the given predicate

builder post ( request predicate predicate , handler function < server response > handler function ) ;


bind the given { @ code value } to the { @ link statement } using the underlying binding strategy

void bind ( bind target bind target , object value ) ;


public void set floor under ( floor floor ) { block overlay = this overlay ; set floor ( floor ) ; set overlay ( overlay ) ; }


for caching to work correctly , implementations must implement this method and { @ link # equals ( object ) }


void set class loader ( class loader class loader ) { try { class < ? > recognizer factory impl class = class loader load class ( " io seata sqlparser druid druid s q l recognizer factory impl " ) ; constructor < ? > impl constructor = recognizer factory impl class get declared constructor ( ) ; impl constructor set accessible ( true ) ; try { recognizer factory impl = ( s q l recognizer factory ) impl constructor new instance ( ) ; } finally { impl constructor set accessible ( false ) ; } } catch ( exception e ) { throw new s q l parsing exception ( e ) ; } }


resets variables maintaining the sum to zero this method may be a useful alternative to creating a new adder , but is only effective if there are no concurrent updates because this method is intrinsically racy , it should only be used when it is known that no threads are concurrently updating

public void reset ( ) { internal reset ( 0l ) ; }


delay returning on a latch or a specific amount of time

private void delay if necessary ( ) { / / cause current method to pause / / resume until get notified if ( latch ! = null ) { try { latch await ( ) ; return ; } catch ( interrupted exception e ) { } } if ( get groups delay ms > 0 ) { try { thread sleep ( get groups delay ms ) ; } catch ( interrupted exception e ) { throw new runtime exception ( e ) ; } } }


performs a non - destructive bit - wise merge of this bit field and another one

public bit field or ( bit field other ) { byte [ ] larger array ; byte [ ] smaller array ; if ( bytes length < other bytes length ) { larger array = other bytes ; smaller array = bytes ; } else { larger array = bytes ; smaller array = other bytes ; } / / start out with a copy of the larger of the two arrays byte [ ] result = arrays copy of ( larger array , larger array length ) ; for ( int i = 0 ; i < smaller array length ; i + + ) { result [ i ] | = smaller array [ i ] ; } return new bit field ( result ) ; }


is the test enabled ; this is controlled by the configuration and the { @ code - dscale } maven option

protected final boolean is enabled ( ) { return enabled ; }


public api response < user > get user by name with http info ( string username ) throws api exception { okhttp 3 call local var call = get user by name validate before call ( username , null ) ; type local var return type = new type token < user > ( ) { } get type ( ) ; return local var api client execute ( local var call , local var return type ) ; }


the same logic as { @ link # expand jobs ids ( string , boolean , boolean , persistent tasks custom metadata , boolean , action listener ) } but the full anomaly detector job configuration is returned see { @ link # expand jobs ids ( string , boolean , boolean , persistent tasks custom metadata , boolean , action listener ) }

public void expand jobs ( string expression , boolean allow no match , boolean exclude deleting , action listener < list < job builder > > listener ) { string [ ] tokens = expanded ids matcher tokenize expression ( expression ) ; search source builder source builder = new search source builder ( ) query ( build job wildcard query ( tokens , exclude deleting ) ) ; source builder sort ( job id get preferred name ( ) ) ; search request search request = client prepare search ( ml config index index name ( ) ) set indices options ( indices options lenient expand open ( ) ) set source ( source builder ) set size ( anomaly detectors index config index max results window ) request ( ) ; expanded ids matcher required matches = new expanded ids matcher ( tokens , allow no match ) ; execute async with origin ( client thread pool ( ) get thread context ( ) , ml origin , search request , action listener < search response > wrap ( response - > { list < job builder > jobs = new array list < > ( ) ; set < string > job and group ids = new hash set < > ( ) ; search hit [ ] hits = response get hits ( ) get hits ( ) ; for ( search hit hit : hits ) { try { bytes reference source = hit get source ref ( ) ; job builder job = parse job leniently from source ( source ) ; jobs add ( job ) ; job and group ids add ( job get id ( ) ) ; job and group ids add all ( job get groups ( ) ) ; } catch ( i o exception e ) { / / todo a better way to handle this rather than just ignoring the error ? logger error ( " error parsing anomaly detector job configuration [ " + hit get id ( ) + " ] " , e ) ; } } required matches filter matched ids ( job and group ids ) ; if ( required matches has unmatched ids ( ) ) { / / some required jobs were not found listener on failure ( exceptions helper missing job exception ( required matches unmatched ids string ( ) ) ) ; return ; } listener on response ( jobs ) ; } , listener : : on failure ) , client : : search ) ; }


creates the list of { @ link list view column } s to be used for a { @ link list view } s and their likes

public static list < list view column > create default initial column list ( view view ) { return create default initial column list ( descriptor visibility filter apply ( view , list view column all ( ) ) ) ; }


return a list of blocks & amp ; their locations on { @ code datanode } whose total size is { @ code size }

public blocks with locations get blocks ( datanode i d datanode , long size , long minimum block size , long time interval ) throws i o exception { check operation ( operation category read ) ; read lock ( ) ; try { check operation ( operation category read ) ; return get block manager ( ) get blocks with locations ( datanode , size , minimum block size , time interval ) ; } finally { read unlock ( " get blocks " ) ; } }


the remaining space as percentage of configured capacity

public float get remaining percent ( ) { return d f s util client get percent remaining ( remaining , capacity ) ; }


return a { @ link sorted doc values } instance that can be used to sort root documents with this mode , the provided values and filters for rootinner documents for every root document , the values of its inner documents will be aggregated allowed modes : min , max note : calling the returned instance on docs that are not root docs is illegal the returned instance can only be evaluate the current and upcoming docs

public sorted doc values select ( final sorted set doc values values , final bit set parent docs , final doc id set iterator child docs , int max children ) throws i o exception { if ( parent docs = = null | | child docs = = null ) { return select ( doc values empty sorted set ( ) ) ; } final sorted doc values selected values = select ( values ) ; return new abstract sorted doc values ( ) { int doc i d = - 1 ; int last seen parent doc = 0 ; int last emitted ord = - 1 ; @ override public bytes ref lookup ord ( int ord ) throws i o exception { return selected values lookup ord ( ord ) ; } @ override public int get value count ( ) { return selected values get value count ( ) ; } @ override public boolean advance exact ( int parent doc ) throws i o exception { assert parent doc > = last seen parent doc : " can only evaluate current and upcoming root docs " ; if ( parent doc = = last seen parent doc ) { return last emitted ord ! = - 1 ; } final int prev parent doc = parent docs prev set bit ( parent doc - 1 ) ; final int first child doc ; if ( child docs doc i d ( ) > prev parent doc ) { first child doc = child docs doc i d ( ) ; } else { first child doc = child docs advance ( prev parent doc + 1 ) ; } doc i d = last seen parent doc = parent doc ; last emitted ord = pick ( selected values , child docs , first child doc , parent doc , max children ) ; return last emitted ord ! = - 1 ; } @ override public int doc i d ( ) { return doc i d ; } @ override public int ord value ( ) { return last emitted ord ; } } ; }


runs the given runnable later , buffering the request until the timeout has expired see the header of { @ link abstract swing update manager } for details on the update process

public synchronized void run later ( runnable r ) { this next runnable = r ; update later ( ) ; }


{ @ link abstract project } subtypes can override this method to veto some { @ link descriptor } s from showing up on their configuration screen this is often useful when you are building a workflowcompany specific project type , where you want to limit the number of choices given to the users some { @ link descriptor } s define their own schemes for controlling applicability ( such as { @ link build step descriptor # is applicable ( class ) } ) , this method works like and in conjunction with them ; both this method and that method need to return true in order for a given { @ link descriptor } to show up for the given { @ link project } the default implementation returns true for everything

public boolean is applicable ( descriptor descriptor ) { return true ; }


public array get array ( string column label ) throws s q l exception { return null ; }


finds generic method for the given bridge method

public method unbride ( final method bridge method , class < ? > a class ) throws i o exception , no such method exception , class not found exception { if ( bridge method is bridge ( ) & & bridge method is synthetic ( ) ) { if ( cache contains key ( bridge method ) ) { return cache get ( bridge method ) ; } class reader class reader = new class reader ( a class get name ( ) ) ; final method signature method signature = new method signature ( ) ; class reader accept ( new class visitor ( asm5 ) { @ override public method visitor visit method ( int access , string name , string desc , string signature , string [ ] exceptions ) { boolean bridge = ( access & acc bridge ) ! = 0 & & ( access & acc synthetic ) ! = 0 ; if ( bridge & & bridge method get name ( ) equals ( name ) & & get parameter count ( desc ) = = bridge method get parameter types ( ) length ) { return new method finder ( method signature ) ; } return super visit method ( access , name , desc , signature , exceptions ) ; } } , 0 ) ; method method = a class get declared method ( method signature name , method signature get parameter types ( ) ) ; cache put ( bridge method , method ) ; return method ; } else { return bridge method ; } }


always decompiles the function containing the given location before positioning the decompiler panel ' s cursor to the closest equivalent position

public void refresh display ( program program , program location location , file debug file ) { clear cache ( ) ; decompiler mgr decompile ( program , location , null , debug file , true ) ; }


test the property ' enum string required '

public void enum string required test ( ) { / / todo : test enum string required }


prepare the compressor to be used in a new stream with settings defined in the given configuration

public void reinit ( configuration conf ) ;


returns { @ code true } if this method is final , per { @ code modifier is final ( get modifiers ( ) ) } note that a method may still be effectively " final " , or non - overridable when it has no { @ code final } keyword for example , it could be private , or it could be declared by a final class to tell whether a method is overridable , use { @ link invokable # is overridable }

public final boolean is final ( ) { return modifier is final ( get modifiers ( ) ) ; }