sets the ssl session ticket keys of this context

public void set ticket keys ( byte [ ] keys ) { if ( keys length % session ticket key ticket key size ! = 0 ) { throw new illegal argument exception ( " keys length % " + session ticket key ticket key size + " ! = 0 " ) ; } session ticket key [ ] tickets = new session ticket key [ keys length / session ticket key ticket key size ] ; for ( int i = 0 , a = 0 ; i < tickets length ; i + + ) { byte [ ] name = arrays copy of range ( keys , a , session ticket key name size ) ; a + = session ticket key name size ; byte [ ] hmac key = arrays copy of range ( keys , a , session ticket key hmac key size ) ; i + = session ticket key hmac key size ; byte [ ] aes key = arrays copy of range ( keys , a , session ticket key aes key size ) ; a + = session ticket key aes key size ; tickets [ i ] = new session ticket key ( name , hmac key , aes key ) ; } lock writer lock = context ctx lock write lock ( ) ; writer lock lock ( ) ; try { s s l context clear options ( context ctx , ssl ssl op no ticket ) ; s s l context set session ticket keys ( context ctx , tickets ) ; } finally { writer lock unlock ( ) ; } }


attempts to make a request to the user info endpoint of the open i d connect provider

private void get and combine user info claims ( access token access token , j w t claims set verified id token claims , action listener < j w t claims set > claims listener ) { try { final http get http get = new http get ( op config get userinfo endpoint ( ) ) ; http get set header ( " authorization " , " bearer " + access token get value ( ) ) ; access controller do privileged ( ( privileged action < void > ) ( ) - > { http client execute ( http get , new future callback < http response > ( ) { @ override public void completed ( http response result ) { handle userinfo response ( result , verified id token claims , claims listener ) ; } @ override public void failed ( exception ex ) { claims listener on failure ( new elasticsearch security exception ( " failed to get claims from the userinfo endpoint " , ex ) ) ; } @ override public void cancelled ( ) { claims listener on failure ( new elasticsearch security exception ( " failed to get claims from the userinfo endpoint request was cancelled " ) ) ; } } ) ; return null ; } ) ; } catch ( exception e ) { claims listener on failure ( new elasticsearch security exception ( " failed to get user information from the user info endpoint " , e ) ) ; } }


configures which fields of the csv file containing edges data should be included and which should be skipped the parser will look at the first { @ code n } fields , where { @ code n } is the length of the boolean array the parser will skip over all fields where the boolean value at the corresponding position in the array is { @ code false } the result contains the fields where the corresponding position in the boolean array is { @ code true } the number of fields in the result is consequently equal to the number of times that { @ code true } occurs in the fields array

public graph csv reader include fields edges ( boolean edge fields ) { this edge reader include fields ( edge fields ) ; return this ; }


developmental method for breakpoints todo : will delete this from production

static void check break ( int record number , ms type applier applier ) { string nn = applier get ms type ( ) get name ( ) ; if ( " std : : 1 : : map value compare < std : : 1 : : basic string < char > , std : : 1 : : value type < std : : 1 : : basic string < char > , std : : 1 : : basic string < wchar t > > , std : : 1 : : less < void > , 1 > " equals ( nn ) ) { int a = 1 ; a = a + 1 ; } if ( " class std : : 1 : : iostream category " equals ( nn ) ) { int a = 1 ; a = a + 1 ; } if ( " std : : 1 : : do message " equals ( nn ) ) { int a = 1 ; a = a + 1 ; } / / check break ( record number ) ; }


publish the given event to all listeners note : listeners get initialized after the message source , to be able to access it within listener implementations thus , message source implementations cannot publish events

public void publish event ( object event ) { publish event ( event , null ) ; }


returns the addresses that are in program 2 , but not in program 1

public address set get addresses only in two ( ) { return pgm mem comp get addresses only in two ( ) ; }


overwrite bytes that have already been written into the stream

public void insert byte ( int streampos , int val ) { out [ streampos ] = ( byte ) val ; }


returns a string representation of the object in general , the < code > to string < code > method returns a string that " textually represents " this object the result should be a concise but informative representation that is easy for a person to read

public string to string ( ) { return " project tool chest at " + tool utils get user tools directory ( ) ; }


public static decision single ( type type , @ nullable string label , @ nullable string explanation , @ nullable object explanation params ) { return new single ( type , label , explanation , explanation params ) ; }


determines whether a character is a bmp letter or digit according to { @ linkplain character # is letter or digit ( char ) java ' s definition }

public static char matcher java letter or digit ( ) { return java letter or digit instance ; }


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


if true the { @ link hystrix circuit breaker # allow request ( ) } will always return true to allow requests regardless of the error percentage from { @ link hystrix command metrics # get health counts ( ) } the { @ link # circuit breaker force open ( ) } property takes precedence so if it set to true this property does nothing

public hystrix property < boolean > circuit breaker force closed ( ) { return circuit breaker force closed ; }


returns the { @ link method } instance for { @ link # test add all unsupported none present ( ) } so that tests can suppress it with { @ code feature specific test suite builder suppressing ( ) } while we figure out what to do with < a href = " http : goo glq j bru x " > { @ code concurrent hash map } support for { @ code entry set ( ) add ( ) }

public static method get add all unsupported none present method ( ) { return helpers get method ( collection add all tester class , " test add all unsupported none present " ) ; }


when system exit , this method will be called to close resources

public synchronized void stop ( ) { / / the synchronized modifier avoids concurrent append and close operations if ( ! this started ) { return ; } this started = false ; try { producer instance get producer instance ( ) remove and close ( this name server address , this producer group ) ; } catch ( exception e ) { add error ( " closeing rocketmq logback appender [ " + this get name ( ) + " ] name server address : " + name server address + " group : " + producer group + " " + e get message ( ) ) ; } / / help garbage collection producer = null ; }


< code > optional aapt pb array array = 4 ; < code >

private void set array ( com android aapt resources array builder builder for value ) { array = builder for value build ( ) ; bit field 0 | = 0x 0 0 0 0 0 0 0 8 ; }


set the additional ( undeclared ) property with the specified name and value if the property does not already exist , create it otherwise replace it

public shape or null put additional property ( string key , object value ) { if ( this additional properties = = null ) { this additional properties = new hash map < string , object > ( ) ; } this additional properties put ( key , value ) ; return this ; }


public code read code ( ) { ensure four bytes aligned ( table of contents codes , false ) ; return super read code ( ) ; }


subclasses must implement this method to convert each row of the result set into an object of the result type subclasses of this class , as opposed to direct subclasses of mapping sql query with parameters , don ' t need to concern themselves with the parameters to the execute method of the query object

protected abstract t map row ( result set rs , int row num ) throws s q l exception ;


creates a table using the specified table metadata

default void create table ( connector session session , connector table metadata table metadata , boolean ignore existing ) { throw new presto exception ( not supported , " this connector does not support creating tables " ) ; }


this method attempts to find a grok pattern that will match all of the sample messages in their entirety it will also update mappings and field stats if they are non - < code > null < code >

public tuple < string , string > find full line grok pattern ( string timestamp field ) { for ( full match grok pattern candidate candidate : full match grok patterns ) { if ( timestamp field = = null | | timestamp field equals ( candidate get time field ( ) ) ) { if ( candidate matches all ( sample messages , timeout checker ) ) { return candidate process match ( explanation , sample messages , mappings , field stats , timeout checker ) ; } } } return null ; }


returns the original element list , unchanged

public iterable < entry < string , string > > order ( list < entry < string , string > > insertion order ) { return insertion order ; }


return any i o statistics provided by the underlying stream

public i o statistics get i o statistics ( ) { return i o statistics support retrieve i o statistics ( in ) ; }


get the host from the provided endpoint record

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


maximum number of processed documents defaults to - 1 meaning process all documents

public self set max docs ( int max docs ) { if ( max docs < 0 ) { throw new illegal argument exception ( " [ max docs ] parameter cannot be negative , found [ " + max docs + " ] " ) ; } if ( max docs < slices ) { throw new illegal argument exception ( " [ max docs ] should be > = [ slices ] " ) ; } this max docs = max docs ; return self ( ) ; }


probe for a path being a file metrics are only checked on unguarded stores

protected void is file ( path path , boolean expected , operation cost cost ) throws exception { boolean b = verify raw ( cost , ( ) - > get file system ( ) is file ( path ) ) ; assertions assert that ( b ) described as ( " is file ( % s ) " , path ) is equal to ( expected ) ; }


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

public styleable model view model on visibility changed ( on model visibility changed listener < styleable model view model , styleable model view > listener ) { on mutation ( ) ; this on model visibility changed listener epoxy generated model = listener ; return this ; }


public void finish ( ) { time = duration ; }


helper to create a create topics result instance for a given throwable create topics result ' s constructor is only accessible from within the admin package

public static create topics result create topics result ( string topic , throwable t ) { kafka future impl < topic metadata and config > future = new kafka future impl < > ( ) ; future complete exceptionally ( t ) ; return new create topics result ( collections singleton map ( topic , future ) ) ; }


returns a predicate to be used for test tag filtering , i e , that only accepts tests that match all of the required tags and none of the excluded tags

public static predicate < target > tag filter ( list < string > tag filter list ) { pair < collection < string > , collection < string > > tag lists = test target utils sort tags by sense ( tag filter list ) ; final collection < string > required tags = tag lists first ; final collection < string > excluded tags = tag lists second ; return input - > { if ( required tags is empty ( ) & & excluded tags is empty ( ) ) { return true ; } if ( ! ( input instanceof rule ) ) { return required tags is empty ( ) ; } / / note that test tags are those originating from the xx test rule , whereas the required tags / / and excluded tags originate from the command line or test suite rule / / todo ( ulfjack ) : get rule tags is inconsistent with test function and other places that use / / tags + size , but consistent with test suite return test target utils test matches filters ( ( ( rule ) input ) get rule tags ( ) , required tags , excluded tags , false ) ; } ; }


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

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


fetch devices greater than or equal to date

public collection < ? extends u 2 f device registration > fetch devices from ( final local date expiration date ) { val time = expiration date at start of day ( zone offset utc ) to instant ( ) to epoch milli ( ) ; return get records by keys ( dynamo db query builder builder ( ) operator ( comparison operator ge ) attribute value ( list of ( attribute value builder ( ) n ( string value of ( time ) ) build ( ) ) ) key ( column names created date get column name ( ) ) build ( ) ) ; }


gets the demangled name string for this type descriptor this is the ref type and full name including namespaces

public string get demangled type descriptor ( ) { return has complex type ( ) ? md complex type to string ( ) : null ; }


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


the http headers to be contributed to the http response that serves the current resource


write one byte to the underlying stream the underlying stream must be valid

public void write ( int one byte ) throws i o exception { byte [ ] buf = new byte [ 1 ] ; buf [ 0 ] = ( byte ) one byte ; this write ( buf ) ; }


similar to { @ link # get variable local ( string ) } , but has an extra flag that indicates whether or not all variables need to be fetched when getting one variable by default true ( for backwards compatibility reasons ) , which means that calling { @ link # get variable local ( string ) } will fetch all variables , of the current scope setting this flag to false can thus be better for performance however , variables are cached , and if other variables are used later on , setting this true might actually be better for performance

object get variable local ( string variable name , boolean fetch all variables ) ;


finalize the request by preparing the header in the request and returns the request ready to be sent < br > once finalized , no data must be added < br > if the request does not need chunk ( is chunked ( ) = = false ) , this request is the only object to send to the remote server

public http request finalize request ( ) throws error data encoder exception { / / finalize the multipart http datas if ( ! header finalized ) { if ( is multipart ) { internal attribute internal = new internal attribute ( charset ) ; if ( during mixed mode ) { internal add value ( " \ r \ n - - " + multipart mixed boundary + " - - " ) ; } internal add value ( " \ r \ n - - " + multipart data boundary + " - - \ r \ n " ) ; multipart http datas add ( internal ) ; multipart mixed boundary = null ; current file upload = null ; during mixed mode = false ; global body size + = internal size ( ) ; } header finalized = true ; } else { throw new error data encoder exception ( " header already encoded " ) ; } http headers headers = request headers ( ) ; list < string > content types = headers get all ( http header names content type ) ; list < string > transfer encoding = headers get all ( http header names transfer encoding ) ; if ( content types ! = null ) { headers remove ( http header names content type ) ; for ( string content type : content types ) { / / " multipart / form - data ; boundary = - - 89421926422648 " string lowercased = content type to lower case ( ) ; if ( lowercased starts with ( http header values multipart form data to string ( ) ) | | lowercased starts with ( http header values application x www form urlencoded to string ( ) ) ) { / / ignore } else { headers add ( http header names content type , content type ) ; } } } if ( is multipart ) { string value = http header values multipart form data + " ; " + http header values boundary + ' = ' + multipart data boundary ; headers add ( http header names content type , value ) ; } else { / / not multipart headers add ( http header names content type , http header values application x www form urlencoded ) ; } / / now consider size for chunk or not long real size = global body size ; if ( ! is multipart ) { real size - = 1 ; / / last ' & ' removed } iterator = multipart http datas list iterator ( ) ; headers set ( http header names content length , string value of ( real size ) ) ; if ( real size > http post body util chunk size | | is multipart ) { is chunked = true ; if ( transfer encoding ! = null ) { headers remove ( http header names transfer encoding ) ; for ( char sequence v : transfer encoding ) { if ( http header values chunked content equals ignore case ( v ) ) { / / ignore } else { headers add ( http header names transfer encoding , v ) ; } } } http util set transfer encoding chunked ( request , true ) ; / / wrap to hide the possible content return new wrapped http request ( request ) ; } else { / / get the only one body and set it to the request http content chunk = next chunk ( ) ; if ( request instanceof full http request ) { full http request full request = ( full http request ) request ; byte buf chunk content = chunk content ( ) ; if ( full request content ( ) ! = chunk content ) { full request content ( ) clear ( ) write bytes ( chunk content ) ; chunk content release ( ) ; } return full request ; } else { return new wrapped full http request ( request , chunk ) ; } } }


returns the total number of subtasks involved in this checkpoint

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


the non - virtual transitive proto source files different from { @ link # get transitive proto sources ( ) } if a transitive dependency has { @ code import prefix } or the like

public nested set < artifact > get original transitive proto sources ( ) { return original transitive proto sources ; }


returns { @ code true } if the provided reference is { @ code null } otherwise returns { @ code false }

public static boolean is null ( object obj ) { return obj = = null ; }


returns whether the given method reference corresponds to a class method , as generated by javac or by jikes

private boolean is dot class methodref ( clazz clazz , int methodref constant index ) { is class for name invocation = false ; / / check if the code of the referenced method is class code clazz constant pool entry accept ( methodref constant index , this ) ; return is class for name invocation ; }


static method to determine if for a starlark repository rule { @ code is configure } holds true it also checks that the rule is indeed a starlark rule so that this class is the appropriate handler for the given rule as , however , only starklark rules can be configure rules , this method can also be used as a universal check

public static boolean is configure rule ( rule rule ) { return rule get rule class object ( ) is starlark ( ) & & ( ( boolean ) rule get attr ( " $ configure " ) ) ; }


an expectation with the logical and condition of the given list of conditions each condition is checked until all of them return true or not null

public static expected condition < boolean > and ( final expected condition < ? > conditions ) { return new expected condition < boolean > ( ) { @ override public boolean apply ( web driver driver ) { for ( expected condition < ? > condition : conditions ) { object result = condition apply ( driver ) ; if ( result instanceof boolean ) { if ( boolean false equals ( result ) ) { return false ; } } if ( result = = null ) { return false ; } } return true ; } @ override public string to string ( ) { string builder message = new string builder ( " all conditions to be valid : " ) ; joiner on ( " & & " ) append to ( message , conditions ) ; return message to string ( ) ; } } ; }


reads the long at the current index and then increments the current index by < code > sizeof long < code >

public long read next long ( long min clamp , long max clamp , long exceptions ) throws i o exception { long l = read long ( current index , min clamp , max clamp , exceptions ) ; current index + = sizeof long ; return l ; }


efficiently retrieve the string value for the specified key , or return { @ code null } if not found as of 4 2 , the default implementation checks { @ code contains key } before it attempts to call { @ code get string } ( which would require catching { @ code missing resource exception } for key not found ) can be overridden in subclasses

protected string get string or null ( resource bundle bundle , string key ) { if ( bundle contains key ( key ) ) { try { return bundle get string ( key ) ; } catch ( missing resource exception ex ) { / / assume key not found for some other reason / / - > do not throw the exception to allow for checking parent message source } } return null ; }


return a http server builder that the journalnode namenode secondary namenode can use to initialize their http https server

public static http server 2 builder http server template for r m ( configuration conf , final inet socket address http addr , final inet socket address https addr , string name ) throws i o exception { http server 2 builder builder = new http server 2 builder ( ) set name ( name ) set conf ( conf ) set security enabled ( false ) ; if ( http addr get port ( ) = = 0 ) { builder set find port ( true ) ; } uri uri = uri create ( " http : / / " + net utils get host port string ( http addr ) ) ; builder add endpoint ( uri ) ; log info ( " starting web - server for " + name + " at : " + uri ) ; return builder ; }


returns the result of dividing { @ code p } by { @ code q } , rounding using the specified { @ code rounding mode }

public static big integer divide ( big integer p , big integer q , rounding mode mode ) { big decimal p dec = new big decimal ( p ) ; big decimal q dec = new big decimal ( q ) ; return p dec divide ( q dec , 0 , mode ) to big integer exact ( ) ; }


returns the { @ link dns server addresses } that yields the system dns server addresses sequentially if it failed to retrieve the list of the system dns server addresses from the environment , it will use { @ code " 8 8 8 8 " } and { @ code " 8 8 4 4 " } , the addresses of the google public dns servers this method has the same effect with the following code : dns server addresses sequential ( dns server addresses default address list ( ) ) ;

public static dns server addresses default addresses ( ) { return default name servers ; }


set to < code > true < code > to ignore unavailable snapshots , instead of throwing an exception defaults to < code > false < code > , which means unavailable snapshots cause an exception to be thrown

public snapshots status request ignore unavailable ( boolean ignore unavailable ) { this ignore unavailable = ignore unavailable ; return this ; }


send the { @ link recycler collection component } a request to scroll the content by the given margins , animate a scroll by the given amount of pixels along either axis

public void request smooth scroll by ( int dx , int dy ) { final recycler view recycler view = get recycler view ( ) ; if ( recycler view = = null ) { return ; } recycler view smooth scroll by ( dx , dy ) ; }


public synchronized float get num v cores used ( ) { refresh if needed ( ) ; float ret = cpu usage ; if ( ret ! = - 1 ) { ret = ret / 100f ; } return ret ; }


public find pets by tags oper req spec ( consumer < request spec builder > req spec customizer ) { req spec customizer accept ( req spec ) ; return this ; }


returns the original source file only for blacklisting protos !

artifact get original source file ( ) { return original source file ; }


test for { @ link f s directory # get path components ( i node ) }

public void test get path from inode ( ) throws quota exceeded exception { string path = " / a / b / c " ; i node inode = create tree of inodes ( path ) ; byte [ ] [ ] expected = i node get path components ( path ) ; byte [ ] [ ] actual = f s directory get path components ( inode ) ; d f s test util check components equals ( expected , actual ) ; }


called when action schedule finished executing all its actions


if key provided matches that of this composite , give join collector iterator over values it may emit

public void accept ( composite record reader join collector jc , k key ) throws i o exception { if ( has next ( ) & & 0 = = cmp compare ( key , key ( ) ) ) { fill join collector ( create key ( ) ) ; jc add ( id , get delegate ( ) ) ; return ; } jc add ( id , empty ) ; }


public void set control dispatcher ( control dispatcher control dispatcher ) { assertions check state not null ( controller ) ; controller set control dispatcher ( control dispatcher ) ; }


check if nn get corrupt files ( ) returns a file that has corrupted blocks

public void test list corrupt files corrupted block ( ) throws exception { mini d f s cluster cluster = null ; try { configuration conf = new hdfs configuration ( ) ; / / datanode scans directories conf set int ( d f s config keys dfs datanode directoryscan interval key , 1 ) ; / / datanode sends block reports conf set int ( d f s config keys dfs blockreport interval msec key , 3 * 1000 ) ; / / set short retry timeouts so this test runs faster conf set int ( hdfs client config keys retry window base key , 10 ) ; cluster = new mini d f s cluster builder ( conf ) build ( ) ; file system fs = cluster get file system ( ) ; / / files are corrupted with 2 bytes before the end of the file , / / so that ' s the minimum length final int corruption length = 2 ; / / create two files with one block each d f s test util util = new d f s test util builder ( ) set name ( " test corrupt files corrupted block " ) set num files ( 2 ) set max levels ( 1 ) set min size ( corruption length ) set max size ( 512 ) build ( ) ; util create files ( fs , " / srcdat 1 0 " ) ; / / fetch bad file list from namenode there should be none final name node namenode = cluster get name node ( ) ; collection < f s namesystem corrupt file block info > bad files = namenode get namesystem ( ) list corrupt file blocks ( " / " , null ) ; assert equals ( " namenode has " + bad files size ( ) + " corrupt files expecting none " , 0 , bad files size ( ) ) ; assert corrupt files count ( cluster , bad files size ( ) ) ; / / now deliberately corrupt one block string bpid = cluster get namesystem ( ) get block pool id ( ) ; file storage dir = cluster get instance storage dir ( 0 , 1 ) ; file data dir = mini d f s cluster get finalized dir ( storage dir , bpid ) ; assert true ( " data directory does not exist " , data dir exists ( ) ) ; list < file > meta files = mini d f s cluster get all block files ( data dir ) ; assert true ( " data directory does not contain any blocks or there was an " + " io error " , meta files ! = null & & ! meta files is empty ( ) ) ; file meta file = meta files get ( 0 ) ; random access file file = new random access file ( meta file , " rw " ) ; file channel channel = file get channel ( ) ; long position = channel size ( ) - corruption length ; byte [ ] buffer = new byte [ corruption length ] ; new random ( 13l ) next bytes ( buffer ) ; channel write ( byte buffer wrap ( buffer ) , position ) ; file close ( ) ; log info ( " deliberately corrupting file " + meta file get name ( ) + " at offset " + position + " length " + corruption length ) ; / / read all files to trigger detection of corrupted replica try { util check files ( fs , " / srcdat 1 0 " ) ; } catch ( block missing exception e ) { system out println ( " received block missing exception as expected " ) ; } catch ( i o exception e ) { assert true ( " corrupted replicas not handled properly expecting block missing exception " + " but received i o exception " + e , false ) ; } / / fetch bad file list from namenode there should be one file bad files = namenode get namesystem ( ) list corrupt file blocks ( " / " , null ) ; log info ( " namenode has bad files " + bad files size ( ) ) ; assert equals ( " namenode has " + bad files size ( ) + " bad files " + " expecting 1 " , 1 , bad files size ( ) ) ; assert corrupt files count ( cluster , bad files size ( ) ) ; util cleanup ( fs , " / srcdat 1 0 " ) ; } finally { if ( cluster ! = null ) { cluster shutdown ( ) ; } } }


move to next bucket , return true while move to a on heap bucket , return false while move to a spilled bucket or there is no more bucket

private boolean move to next bucket ( ) { scan count + + ; if ( scan count > total bucket number - 1 ) { return false ; } / / move to next bucket , update all the current bucket status with new bucket / / information final int bucket array pos = scan count > > this buckets per segment bits ; final int current bucket in segment offset = ( scan count & this buckets per segment mask ) < < num intra bucket bits ; memory segment current bucket = this buckets [ bucket array pos ] ; final int partition number = current bucket get ( current bucket in segment offset + header partition offset ) ; final hash partition < bt , pt > p = this partitions being built get ( partition number ) ; if ( p is in memory ( ) ) { set bucket ( current bucket , p overflow segments , p , current bucket in segment offset ) ; return true ; } else { return false ; } }


intersects a line and a plane the intersection is returned as the distance from the first point to the plane in case an intersection happened , the return value is in the range [ 0 , 1 ] the intersection point can be recovered by point 1 + t ( point 2 - point 1 ) where t is the return value of this method

public static float intersect line plane ( float x , float y , float z , float x 2 , float y 2 , float z 2 , plane plane , vector 3 intersection ) { vector 3 direction = tmp set ( x 2 , y 2 , z 2 ) sub ( x , y , z ) ; vector 3 origin = tmp 2 set ( x , y , z ) ; float denom = direction dot ( plane get normal ( ) ) ; if ( denom ! = 0 ) { float t = - ( origin dot ( plane get normal ( ) ) + plane get d ( ) ) / denom ; if ( intersection ! = null ) intersection set ( origin ) add ( direction scl ( t ) ) ; return t ; } else if ( plane test point ( origin ) = = plane plane side on plane ) { if ( intersection ! = null ) intersection set ( origin ) ; return 0 ; } return - 1 ; }


public builder set environment ( action environment action environment ) { this action environment = action environment ; return this ; }


test that the sort builder mode gets transferred correctly to the sort field

public void test multi value mode ( ) throws i o exception { query shard context shard context mock = create mock shard context ( ) ; for ( sort mode mode : sort mode values ( ) ) { script sort builder sort builder = new script sort builder ( mock script ( mock script name ) , script sort type number ) ; sort builder sort mode ( mode ) ; sort field sort field = sort builder build ( shard context mock ) field ; assert that ( sort field get comparator source ( ) , instance of ( x field comparator source class ) ) ; x field comparator source comparator source = ( x field comparator source ) sort field get comparator source ( ) ; assert equals ( multi value mode from string ( mode to string ( ) ) , comparator source sort mode ( ) ) ; } / / check that without mode set , order asc sets mode to min , desc to max script sort builder sort builder = new script sort builder ( mock script ( mock script name ) , script sort type number ) ; sort builder order ( sort order asc ) ; sort field sort field = sort builder build ( shard context mock ) field ; assert that ( sort field get comparator source ( ) , instance of ( x field comparator source class ) ) ; x field comparator source comparator source = ( x field comparator source ) sort field get comparator source ( ) ; assert equals ( multi value mode min , comparator source sort mode ( ) ) ; sort builder = new script sort builder ( mock script ( mock script name ) , script sort type number ) ; sort builder order ( sort order desc ) ; sort field = sort builder build ( shard context mock ) field ; assert that ( sort field get comparator source ( ) , instance of ( x field comparator source class ) ) ; comparator source = ( x field comparator source ) sort field get comparator source ( ) ; assert equals ( multi value mode max , comparator source sort mode ( ) ) ; }


preprocess the command - line flags that were passed to javac this is called before { @ link # init ( context , log , java compiler , blaze javac statistics builder ) } and { @ link # initialize context ( context ) }

public void process args ( immutable list < string > standard javacopts , immutable list < string > blaze javacopts ) throws invalid command line exception { }


convert the given text value to a map with a single element

public void set as text ( string text ) throws illegal argument exception { set value ( text ) ; }


public builder build ( ) { builder class static method points add ( new class static method point ( matcher , class name of advice , override args ) ) ; return builder ; }


called when an error occurs the playback state will transition to { @ link # state idle } immediately after this method is called the player instance can still be used , and { @ link # release ( ) } must still be called on the player should it no longer be required

default void on player error ( exo playback exception error ) { }


void do i o ( selection key k ) throws interrupted exception { try { if ( ! is socket open ( ) ) { log warn ( " trying to do i / o on a null socket for session : 0x { } " , long to hex string ( session id ) ) ; return ; } if ( k is readable ( ) ) { int rc = sock read ( incoming buffer ) ; if ( rc < 0 ) { handle failed read ( ) ; } if ( incoming buffer remaining ( ) = = 0 ) { boolean is payload ; if ( incoming buffer = = len buffer ) { / / start of next request incoming buffer flip ( ) ; is payload = read length ( k ) ; incoming buffer clear ( ) ; } else { / / continuation is payload = true ; } if ( is payload ) { / / not the case for 4letterword read payload ( ) ; } else { / / four letter words take care / / need not do anything else return ; } } } if ( k is writable ( ) ) { handle write ( k ) ; if ( ! initialized & & ! get read interest ( ) & & ! get write interest ( ) ) { throw new close request exception ( " responded to info probe " , disconnect reason info probe ) ; } } } catch ( cancelled key exception e ) { log warn ( " cancelled key exception causing close of session : 0x { } " , long to hex string ( session id ) ) ; log debug ( " cancelled key exception stack trace " , e ) ; close ( disconnect reason cancelled key exception ) ; } catch ( close request exception e ) { / / expecting close to log session closure close ( ) ; } catch ( end of stream exception e ) { log warn ( " unexpected exception " , e ) ; / / expecting close to log session closure close ( e get reason ( ) ) ; } catch ( client cnxn limit exception e ) { / / common case exception , print at debug level server metrics get metrics ( ) connection rejected add ( 1 ) ; log warn ( " closing session 0x { } " , long to hex string ( session id ) , e ) ; close ( disconnect reason client cnx limit ) ; } catch ( i o exception e ) { log warn ( " close of session 0x { } " , long to hex string ( session id ) , e ) ; close ( disconnect reason io exception ) ; } }


returns whether a { @ link correlation id } is satisfied by at least one of a collection of { @ link cor def } s

private boolean has ( collection < cor def > cor defs , cor ref corr ) { for ( cor def cor def : cor defs ) { if ( cor def corr equals ( corr corr ) & & cor def field = = corr field ) { return true ; } } return false ; }


executes the given closure on each element in the collection if the input collection or closure is null , there is no change made

public static < k , v > void for all do ( map < k , v > map , closure < k , v > closure ) { if ( map = = null | | closure = = null ) return ; for ( map entry < k , v > kv entry : map entry set ( ) ) { closure execute ( kv entry get key ( ) , kv entry get value ( ) ) ; } }


returns a weigher that enforces that the weight is non - negative

static < k , v > weigher < k , v > bounded weigher ( @ non null weigher < k , v > delegate ) { return new bounded weigher < > ( delegate ) ; }


gets all servers that exist in the process

public io grpc channelz v 1 get servers response get servers ( io grpc channelz v 1 get servers request request ) { return io grpc stub client calls blocking unary call ( get channel ( ) , get get servers method ( ) , get call options ( ) , request ) ; }


removes the given change listener from the list of listeners to be notified of changes

public void remove change listener ( change listener listener ) ;


public double get one minute rate ( ) { return 0d ; }


get the contact filtering data modifying the returned { @ code filter } without calling { @ link # set filter data } can result in unpredictable behaviour

public filter get filter data ( ) { if ( dirty filter ) { jni get filter data ( addr , tmp ) ; filter mask bits = tmp [ 0 ] ; filter category bits = tmp [ 1 ] ; filter group index = tmp [ 2 ] ; dirty filter = false ; } return filter ; }


public void test bindings in f s config ( ) throws throwable { task conf ref unset ( fs s3a committer name ) ; filesystem conf ref set ( fs s3a committer name , committer name file ) ; assert factory creates expected committer ( file output committer class ) ; for ( object [ ] binding : bindings ) { task conf ref set ( fs s3a committer name , ( string ) binding [ 0 ] ) ; assert factory creates expected committer ( ( class ) binding [ 1 ] ) ; } }


sets a post comment at the specified address

public final boolean set post comment ( address address , string comment ) { set comment cmd cmd = new set comment cmd ( address , code unit post comment , comment ) ; return cmd apply to ( current program ) ; }


updates the task execution state for a given task

completable future < acknowledge > update task execution state ( final task execution state task execution state ) ;


find metric between [ begin time ms , end time ms ] , both side inclusive when identity is null , all metric between the time interval ms will be read , otherwise , only the specific identity will be read

public synchronized list < metric node > find by time and resource ( long begin time ms , long end time ms , string identity ) throws exception { list < string > file names = metric writer list metric files ( base dir , base file name ) ; / / record log info ( " pid = " + pid + " , find by time and resource ( [ " + begin time ms + " , " + end time ms / / + " ] , " + identity + " ) " ) ; int i = 0 ; long offset in index = 0 ; if ( valid position ( begin time ms ) ) { i = file names index of ( last position metric file name ) ; if ( i = = - 1 ) { i = 0 ; } else { offset in index = last position offset in index ; } } else { / / record log info ( " last position is invalidate , will re iterate all files , pid = " + pid ) ; } for ( ; i < file names size ( ) ; i + + ) { string file name = file names get ( i ) ; long offset = find offset ( begin time ms , file name , metric writer form index file name ( file name ) , offset in index ) ; offset in index = 0 ; if ( offset ! = - 1 ) { return metrics reader read metrics by end time ( file names , i , offset , begin time ms , end time ms , identity ) ; } } return null ; }


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


creates an in memory anonymous database and returns the only connection to it closing the connection will remove the db

public static connection anonymous db ( ) throws s q l exception { return driver manager get connection ( mem url ( null ) ) ; }


the sink node making the request < code > istio mcp v 1alpha 1 sink node sink node = 1 ; < code >

public builder set sink node ( com alibaba nacos istio model mcp sink node value ) { if ( sink node builder = = null ) { if ( value = = null ) { throw new null pointer exception ( ) ; } sink node = value ; on changed ( ) ; } else { sink node builder set message ( value ) ; } return this ; }


converts postgres type to flink { @ link data type }

private data type from j d b c type ( result set meta data metadata , int col index ) throws s q l exception { string pg type = metadata get column type name ( col index ) ; int precision = metadata get precision ( col index ) ; int scale = metadata get scale ( col index ) ; switch ( pg type ) { case pg boolean : return data types boolean ( ) ; case pg boolean array : return data types array ( data types boolean ( ) ) ; case pg bytea : return data types bytes ( ) ; case pg bytea array : return data types array ( data types bytes ( ) ) ; case pg smallint : return data types smallint ( ) ; case pg smallint array : return data types array ( data types smallint ( ) ) ; case pg integer : case pg serial : return data types int ( ) ; case pg integer array : return data types array ( data types int ( ) ) ; case pg bigint : case pg bigserial : return data types bigint ( ) ; case pg bigint array : return data types array ( data types bigint ( ) ) ; case pg real : return data types float ( ) ; case pg real array : return data types array ( data types float ( ) ) ; case pg double precision : return data types double ( ) ; case pg double precision array : return data types array ( data types double ( ) ) ; case pg numeric : / / see spark - 26538 : handle numeric without explicit precision and scale if ( precision > 0 ) { return data types decimal ( precision , metadata get scale ( col index ) ) ; } return data types decimal ( decimal type max precision , 18 ) ; case pg numeric array : / / see spark - 26538 : handle numeric without explicit precision and scale if ( precision > 0 ) { return data types array ( data types decimal ( precision , metadata get scale ( col index ) ) ) ; } return data types array ( data types decimal ( decimal type max precision , 18 ) ) ; case pg char : case pg character : return data types char ( precision ) ; case pg char array : case pg character array : return data types array ( data types char ( precision ) ) ; case pg character varying : return data types varchar ( precision ) ; case pg character varying array : return data types array ( data types varchar ( precision ) ) ; case pg text : return data types string ( ) ; case pg text array : return data types array ( data types string ( ) ) ; case pg timestamp : return data types timestamp ( scale ) ; case pg timestamp array : return data types array ( data types timestamp ( scale ) ) ; case pg timestamptz : return data types timestamp with local time zone ( scale ) ; case pg timestamptz array : return data types array ( data types timestamp with local time zone ( scale ) ) ; case pg time : return data types time ( scale ) ; case pg time array : return data types array ( data types time ( scale ) ) ; case pg date : return data types date ( ) ; case pg date array : return data types array ( data types date ( ) ) ; default : throw new unsupported operation exception ( string format ( " doesn ' t support postgres type ' % s ' yet " , pg type ) ) ; } }


test that we get blob - level md5 storage and validation if we specify that in the configuration

public void test store blob md 5 ( ) throws exception { configuration conf = new configuration ( ) ; conf set boolean ( key store blob md5 , true ) ; test account = azure blob storage test account create ( conf ) ; test store blob md 5 ( true ) ; }


{ @ inherit doc } the default implementation does nothing

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


sets whether floating point audio should be output when possible enabling floating point output disables audio processing , but may allow for higher quality audio output the default value is { @ code false }

public default renderers factory set enable audio float output ( boolean enable float output ) { this enable float output = enable float output ; return this ; }


returns the product of this integer value and the given specific integer value

public integer value multiply ( specific integer value other ) { return multiply ( ( integer value ) other ) ; }


creates a logging version of a statement

public static statement new instance ( statement stmt , log statement log , int query stack ) { invocation handler handler = new statement logger ( stmt , statement log , query stack ) ; class loader cl = statement class get class loader ( ) ; return ( statement ) proxy new proxy instance ( cl , new class [ ] { statement class } , handler ) ; }


returns true for libraries linked as native dependencies for other languages

public boolean is native deps ( ) { return native deps ; }


add special advisors if necessary to work with a proxy chain that contains aspect j advisors : concretely , { @ link expose invocation interceptor } at the beginning of the list this will expose the current spring aop invocation ( necessary for some aspect j pointcut matching ) and make available the current aspect j join point the call will have no effect if there are no aspect j advisors in the advisor chain

public static boolean make advisor chain aspect j capable if necessary ( list < advisor > advisors ) { / / don ' t add advisors to an empty list ; may indicate that proxying is just not required if ( ! advisors is empty ( ) ) { boolean found aspect j advice = false ; for ( advisor advisor : advisors ) { / / be careful not to get the advice without a guard , as this might eagerly / / instantiate a non - singleton aspect j aspect if ( is aspect j advice ( advisor ) ) { found aspect j advice = true ; break ; } } if ( found aspect j advice & & ! advisors contains ( expose invocation interceptor advisor ) ) { advisors add ( 0 , expose invocation interceptor advisor ) ; return true ; } } return false ; }


determine if a given message can be decoded

public boolean will decode ( m bytes ) { return get conversion service ( ) can convert ( get type ( ) , get message type ( ) ) ; }


returns the task ' s start time in nanoseconds ( { @ link system # nano time ( ) } style )

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


set the changed flag in mutable operations

protected void set changed ( ) { changed = true ; }


renews a delegation token from the server end - point using the configured < code > authenticator < code > for authentication

public long renew delegation token ( url url , authenticated u r l token token , token < abstract delegation token identifier > d token , string do as user ) throws i o exception , authentication exception { map json = do delegation token operation ( url , token , delegation token operation renewdelegationtoken , null , d token , true , do as user ) ; return ( long ) json get ( renew delegation token json ) ; }


return the clock to use for trigger calculation

default clock get clock ( ) { return clock system default zone ( ) ; }


return an upper bound of the maximum bucket ordinal seen so far

public final long max bucket ord ( ) { return doc counts size ( ) ; }


iterates over the provided records to deserialize , verifies the results and stats the number of full records

public static int deserialize records ( array deque < serialization test type > records , record deserializer < serialization test type > deserializer ) throws exception { int deserialized records = 0 ; while ( ! records is empty ( ) ) { serialization test type expected = records poll ( ) ; serialization test type actual = expected get class ( ) new instance ( ) ; if ( deserializer get next record ( actual ) is full record ( ) ) { assert assert equals ( expected , actual ) ; deserialized records + + ; } else { records add first ( expected ) ; break ; } } return deserialized records ; }


public long get virtual memory usage ( ) { return virtual memory usage ; }


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

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


deletes the given entities in the database using a transaction

public void delete in tx ( iterable < t > entities ) { delete in tx internal ( entities , null ) ; }


void test inline additional properties ( map < string , string > param ) ;


returns a joiner with the same behavior as this joiner , except automatically skipping over any provided null elements

public joiner skip nulls ( ) { return new joiner ( this ) { @ override public < a extends appendable > a append to ( a appendable , iterator < ? > parts ) throws i o exception { check not null ( appendable , " appendable " ) ; check not null ( parts , " parts " ) ; while ( parts has next ( ) ) { object part = parts next ( ) ; if ( part ! = null ) { appendable append ( joiner this to string ( part ) ) ; break ; } } while ( parts has next ( ) ) { object part = parts next ( ) ; if ( part ! = null ) { appendable append ( separator ) ; appendable append ( joiner this to string ( part ) ) ; } } return appendable ; } @ override public joiner use for null ( string null text ) { throw new unsupported operation exception ( " already specified skip nulls " ) ; } @ override public map joiner with key value separator ( string kvs ) { throw new unsupported operation exception ( " can ' t use skip nulls ( ) with maps " ) ; } } ; }


check that a project was created with the appropriate number of columns and rows

public static void assert project created ( project project , int num cols , int num rows ) { assert assert not null ( project ) ; assert assert not null ( project column model ) ; assert assert not null ( project column model columns ) ; assert assert equals ( project column model columns size ( ) , num cols ) ; assert assert not null ( project rows ) ; assert assert equals ( project rows size ( ) , num rows ) ; }


this method is should only be called in tests ! this should never serve as key in a hash map

public boolean equals ( object o ) { if ( this = = o ) { return true ; } if ( o = = null | | get class ( ) ! = o get class ( ) ) { return false ; } incremental remote keyed state handle that = ( incremental remote keyed state handle ) o ; if ( get checkpoint id ( ) ! = that get checkpoint id ( ) ) { return false ; } if ( ! get backend identifier ( ) equals ( that get backend identifier ( ) ) ) { return false ; } if ( ! get key group range ( ) equals ( that get key group range ( ) ) ) { return false ; } if ( ! get shared state ( ) equals ( that get shared state ( ) ) ) { return false ; } if ( ! get private state ( ) equals ( that get private state ( ) ) ) { return false ; } return get meta state handle ( ) equals ( that get meta state handle ( ) ) ; }


send an exception to all futures in the provided stream

private static < t > void complete all exceptionally ( stream < kafka future impl < t > > futures , throwable exc ) { futures for each ( future - > future complete exceptionally ( exc ) ) ; }


returns { @ code true } if one of the global blocks as its disable state persistence flag set

public boolean disable state persistence ( ) { for ( cluster block cluster block : global ) { if ( cluster block disable state persistence ( ) ) { return true ; } } return false ; }


set whether to let jackson find available modules via the jdk service loader , based on meta - inf metadata in the classpath if this mode is not set , spring ' s jackson 2 object mapper builder itself will try to find the jsr - 310 and joda - time support modules on the classpath - provided that java 8 and joda - time themselves are available , respectively

public jackson 2 object mapper builder find modules via service loader ( boolean find modules ) { this find modules via service loader = find modules ; return this ; }


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

public void test classname test ( ) { client client = null ; / / client response = api test classname ( client ) ; / / todo : test validations }


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


public void start quorum ( ) throws i o exception { shutdown all ( ) ; for ( int i = 1 ; i < = n + 1 ; + + i ) { start ( i ) ; } for ( int i = 1 ; i < = n + 1 ; + + i ) { assert true ( client base wait for server up ( " 127 0 0 1 : " + get peer ( i ) client port , client base connection timeout ) , " waiting for server up " ) ; } }


configure the { @ link server codec configurer } to set on the { @ code web server exchange }

public web http handler builder codec configurer ( server codec configurer codec configurer ) { this codec configurer = codec configurer ; return this ; }


adapted from code in { @ code com google common net inet addresses ip string to bytes } this version separates detection from parsing and checks more carefully about embedded addresses

static ip family detect family ( string ip string ) { boolean has colon = false ; boolean has dot = false ; for ( int i = 0 , length = ip string length ( ) ; i < length ; i + + ) { char c = ip string char at ( i ) ; if ( c = = ' ' ) { has dot = true ; } else if ( c = = ' : ' ) { if ( has dot ) return ip family unknown ; / / colons must not appear after dots has colon = true ; } else if ( not hex ( c ) ) { return ip family unknown ; / / everything else must be a decimal or hex digit } } / / now decide which address family to parse if ( has colon ) { if ( has dot ) { int last colon index = ip string last index of ( ' : ' ) ; if ( ! is valid ip v 4 address ( ip string , last colon index + 1 , ip string length ( ) ) ) { return ip family unknown ; } if ( last colon index = = 1 & & ip string char at ( 0 ) = = ' : ' ) { / / compressed like : : 1 2 3 4 return ip family i pv 4 embedded ; } if ( last colon index ! = 6 | | ip string char at ( 0 ) ! = ' : ' | | ip string char at ( 1 ) ! = ' : ' ) { return ip family unknown ; } for ( int i = 2 ; i < 6 ; i + + ) { char c = ip string char at ( i ) ; if ( c ! = ' f ' & & c ! = ' f ' & & c ! = ' 0 ' ) return ip family unknown ; } return ip family i pv 4 embedded ; } return ip family i pv 6 ; } else if ( has dot & & is valid ip v 4 address ( ip string , 0 , ip string length ( ) ) ) { return ip family i pv 4 ; } return ip family unknown ; }


double get double ( int channel , int position ) ;


connects and waits for handshake to complete this is required since ssl transport layer implementation requires the channel to be ready before send is invoked ( unlike plaintext where send can be invoked straight after connect )

protected void connect ( string node , inet socket address server addr ) throws i o exception { blocking connect ( node , server addr ) ; }


sets if this request should allow partial results ( if method is not called , will default to the cluster level setting )

public void set allow partial search results ( boolean allow partial search results ) { this search request allow partial search results ( allow partial search results ) ; }


builds a new jdbc data source backed by the connection pool and managed by dropwizard

managed data source build ( metric registry metric registry , string name ) ;


removes all actors and cells from the table

public void clear children ( ) { object [ ] cells = this cells items ; for ( int i = this cells size - 1 ; i > = 0 ; i - - ) { cell cell = ( cell ) cells [ i ] ; actor actor = cell actor ; if ( actor ! = null ) actor remove ( ) ; } cell pool free all ( this cells ) ; this cells clear ( ) ; rows = 0 ; columns = 0 ; if ( row defaults ! = null ) cell pool free ( row defaults ) ; row defaults = null ; implicit end row = false ; super clear children ( ) ; }


public static void set origin parser ( dubbo origin parser origin parser ) { assert util not null ( origin parser , " origin parser cannot be null " ) ; dubbo adapter global config origin parser = origin parser ; }


sets the < a href = " https : openjdk java netprojectssctpjavadoccomsunniosctp sctp standard socket option html " > { @ code so sndbuf } option

sctp server channel config set send buffer size ( int send buffer size ) ;


public client execute as ( function < response , response > handler ) { type ref < client > type = new type ref < client > ( ) { } ; return execute ( handler ) as ( type ) ; }


decommissioning using a pre - configured include hosts file

public void test decommission with include hosts ( ) throws exception { write to hosts file ( " localhost " , " host 1 " , " host 2 " ) ; configuration conf = new configuration ( ) ; conf set ( yarn configuration rm nodes include file path , host file get absolute path ( ) ) ; rm = new mock r m ( conf ) ; rm start ( ) ; mock n m nm 1 = rm register node ( " host 1 : 1234 " , 5120 ) ; mock n m nm 2 = rm register node ( " host 2 : 5678 " , 10240 ) ; mock n m nm 3 = rm register node ( " localhost : 4433 " , 1024 ) ; cluster metrics metrics = cluster metrics get metrics ( ) ; assert ( metrics ! = null ) ; int metric count = metrics get num decommisioned n ms ( ) ; node heartbeat response node heartbeat = nm 1 node heartbeat ( true ) ; assert assert true ( node action normal equals ( node heartbeat get node action ( ) ) ) ; node heartbeat = nm 2 node heartbeat ( true ) ; assert assert true ( node action normal equals ( node heartbeat get node action ( ) ) ) ; node heartbeat = nm 3 node heartbeat ( true ) ; assert assert true ( node action normal equals ( node heartbeat get node action ( ) ) ) ; / / to test that i ps also work string ip = net utils normalize host name ( " localhost " ) ; write to hosts file ( " host 1 " , ip ) ; rm get nodes list manager ( ) refresh nodes ( conf ) ; check shutdown n m count ( rm , + + metric count ) ; node heartbeat = nm 1 node heartbeat ( true ) ; assert assert true ( node action normal equals ( node heartbeat get node action ( ) ) ) ; assert assert equals ( 1 , cluster metrics get metrics ( ) get num shutdown n ms ( ) ) ; node heartbeat = nm 2 node heartbeat ( true ) ; assert assert true ( " node is not decommisioned " , node action shutdown equals ( node heartbeat get node action ( ) ) ) ; node heartbeat = nm 3 node heartbeat ( true ) ; assert assert true ( node action normal equals ( node heartbeat get node action ( ) ) ) ; assert assert equals ( metric count , cluster metrics get metrics ( ) get num shutdown n ms ( ) ) ; rm stop ( ) ; }


helper method to convert a single { @ link g file } object into a f s b node object

public static f s b node get node from file ( g file file ) { return file is directory ( ) ? new f s b dir node ( file get f s r l ( ) ) : new f s b file node ( file get f s r l ( ) ) ; }


public static void load rules ( list < authority rule > rules ) { current property update value ( rules ) ; }


finds the corresponding row , column for string index , and offset

public row col location data to screen location ( int data row , int data column ) { for ( int screen row = text elements length - 1 ; screen row > = 0 ; screen row - - ) { field element element = text elements [ screen row ] ; int screen column = element get character index for data location ( data row , data column ) ; if ( screen column > = 0 ) { return new row col location ( screen row , screen column ) ; } } return new row col location ( 0 , 0 ) ; / / give up }


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


reads the next four bytes as a little endian unsigned integer into an integer , if the top bit is a zero

public int read little endian unsigned int to int ( ) { int result = read little endian int ( ) ; if ( result < 0 ) { throw new illegal state exception ( " top bit not zero : " + result ) ; } return result ; }


copies the metadata from a hit to the request

protected request wrapper < ? > copy metadata ( request wrapper < ? > request , scrollable hit source hit doc ) { copy routing ( request , doc get routing ( ) ) ; return request ; }


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


gets the blacklisted tasktracker ' s name

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


should the cluster state result include the { @ link org elasticsearch cluster node discovery nodes } defaults to { @ code true }

public cluster state request builder set nodes ( boolean filter ) { request nodes ( filter ) ; return this ; }


returns a { @ code worker multiplexer } instance to { @ code worker proxy } { @ code worker proxy } objects with the same { @ code worker key } talk to the same { @ code worker multiplexer } also , record how many { @ code worker proxy } objects are talking to this { @ code worker multiplexer }

public static synchronized worker multiplexer get instance ( worker key key , path log file ) { instance info instance info = multiplexer instance compute if absent ( key , k - > new instance info ( log file , k ) ) ; instance info increase ref count ( ) ; return instance info get worker multiplexer ( ) ; }


returns the test sharding strategy optionally specified by the jvm flag { @ link # test sharding strategy } , which maps to the enums in { @ link com google testing junit runner sharding sharding filters sharding strategy }

public string get test sharding strategy ( ) { return system get property ( test sharding strategy ) ; }


public void execute ( runnable command ) { submitted mark ( ) ; delegate execute ( new instrumented runnable ( command ) ) ; }


will give you one of : - the recipient that matches the group id specified exactly - the recipient whose v1 id would map to the provided v2 id - the recipient whose v2 id would be derived from the provided v1 id - a newly - created recipient for the provided id if none of the above match important : you could get back a recipient with a different group id than the one you provided you should be very cautious when using the group id on the returned recipient

public static @ non null recipient external possibly migrated group ( @ non null context context , @ non null group id group id ) { return recipient resolved ( database factory get recipient database ( context ) get or insert from possibly migrated group id ( group id ) ) ; }


checks that the expected number of write operations occurred

public void writes ( int count ) { verify ( context cache writer ( ) , times ( count ) ) write ( any ( ) , any ( ) ) ; }


sets the specified 16 - bit short integer at the current { @ code writer index } and increases the { @ code writer index } by { @ code 2 } in this buffer the 16 high - order bits of the specified value are ignored if { @ code this writable bytes } is less than { @ code 2 } , { @ link # ensure writable ( int ) } will be called in an attempt to expand capacity to accommodate

public abstract byte buf write short ( int value ) ;


verify the administrator access for logs , stacks , conf , and log level servlets

public void test authorization of default servlets ( ) throws exception { configuration conf = new configuration ( ) ; conf set boolean ( common configuration keys hadoop security authorization , true ) ; conf set boolean ( common configuration keys hadoop security instrumentation requires admin , true ) ; conf set ( http server 2 filter initializer property , dummy filter initializer class get name ( ) ) ; conf set ( common configuration keys hadoop security group mapping , my groups provider class get name ( ) ) ; groups get user to groups mapping service ( conf ) ; my groups provider clear mapping ( ) ; my groups provider mapping put ( " user a " , arrays as list ( " group a " ) ) ; my groups provider mapping put ( " user b " , arrays as list ( " group b " ) ) ; my groups provider mapping put ( " user c " , arrays as list ( " group c " ) ) ; my groups provider mapping put ( " user d " , arrays as list ( " group d " ) ) ; my groups provider mapping put ( " user e " , arrays as list ( " group e " ) ) ; http server 2 my server = new http server 2 builder ( ) set name ( " test " ) add endpoint ( new uri ( " http : / / localhost : 0 " ) ) set find port ( true ) set conf ( conf ) set a c l ( new access control list ( " user a , user b group c , group d " ) ) build ( ) ; my server set attribute ( http server 2 conf context attribute , conf ) ; my server start ( ) ; string server u r l = " http : / / " + net utils get host port string ( my server get connector address ( 0 ) ) + " / " ; for ( string servlet : new string [ ] { " conf " , " logs " , " stacks " , " log level " } ) { for ( string user : new string [ ] { " user a " , " user b " , " user c " , " user d " } ) { assert equals ( http u r l connection http ok , get http status code ( server u r l + servlet , user ) ) ; } assert equals ( http u r l connection http forbidden , get http status code ( server u r l + servlet , " user e " ) ) ; } my server stop ( ) ; }


public void decrement ( ) { add ( - 1l ) ; }


public void set job token secret ( secret key token secret ) { this token secret = token secret ; }


public collection < f s leaf queue > get leaf queues ( ) { synchronized ( queues ) { return leaf queues ; } }


explicitly set the analyzer to use defaults to use explicit mapping config for the field , or , if not set , the default search analyzer

public multi match query builder analyzer ( string analyzer ) { this analyzer = analyzer ; return this ; }


same as { @ link # range query ( object , object , boolean , boolean , shape relation , zone id , date math parser , query shard context ) } but without the trouble of relations or date - specific options

protected query range query ( object lower term , object upper term , boolean include lower , boolean include upper , query shard context context ) { throw new illegal argument exception ( " field [ " + name ( ) + " ] of type [ " + type name ( ) + " ] does not support range queries " ) ; }


parse the { @ code mime types } file found in the resources format is : < code > # comments begin with a ' # ' < br > # the format is & lt ; mime type > & lt ; space separated file extensions > < br > # for example : < br > textplain txt text < br > # this would map file txt and file text to < br > # the mime type " textplain " < br > < code >

private static multi value map < string , media type > parse mime types ( ) { input stream is = media type factory class get resource as stream ( mime types file name ) ; try ( buffered reader reader = new buffered reader ( new input stream reader ( is , standard charsets us ascii ) ) ) { multi value map < string , media type > result = new linked multi value map < > ( ) ; string line ; while ( ( line = reader read line ( ) ) ! = null ) { if ( line is empty ( ) | | line char at ( 0 ) = = ' # ' ) { continue ; } string [ ] tokens = string utils tokenize to string array ( line , " \ t \ n \ r \ f " ) ; media type media type = media type parse media type ( tokens [ 0 ] ) ; for ( int i = 1 ; i < tokens length ; i + + ) { string file extension = tokens [ i ] to lower case ( locale english ) ; result add ( file extension , media type ) ; } } return result ; } catch ( i o exception ex ) { throw new illegal state exception ( " could not load ' " + mime types file name + " ' " , ex ) ; } }


return the thread name prefix to use for the names of newly created threads

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


verify that if you take an existing file and overwrite it , the new values get picked up this is a test for the behavior of eventually consistent filesystems

public void test over write and read ( ) throws exception { int block size = get block size ( ) ; byte [ ] filedata 1 = dataset ( block size * 2 , ' a ' , 26 ) ; byte [ ] filedata 2 = dataset ( block size * 2 , ' a ' , 26 ) ; path path = path ( " test over write and read / file - overwrite " ) ; write and read ( path , filedata 1 , block size , true , false ) ; write and read ( path , filedata 2 , block size , true , false ) ; write and read ( path , filedata 1 , block size * 2 , true , false ) ; write and read ( path , filedata 2 , block size * 2 , true , false ) ; write and read ( path , filedata 1 , block size , true , false ) ; write and read ( path , filedata 2 , block size * 2 , true , false ) ; }


asynchronously start the snapshot lifecycle management feature see https : www elastic coguideenelasticsearchclientjava - restcurrent java - rest - high - ilm - slm - start - slm html for more

public cancellable start s l m async ( start s l m request request , request options options , action listener < acknowledged response > listener ) { return rest high level client perform request async and parse entity ( request , index lifecycle request converters : : start s l m , options , acknowledged response : : from x content , listener , empty set ( ) ) ; }


this is used to prevent connected bodies from colliding it may lie , depending on the collide connected flag

public boolean should collide ( body other ) { / / at least one body should be dynamic if ( m type ! = body type dynamic & & other m type ! = body type dynamic ) { return false ; } / / does a joint prevent collision ? for ( joint edge jn = m joint list ; jn ! = null ; jn = jn next ) { if ( jn other = = other ) { if ( jn joint get collide connected ( ) = = false ) { return false ; } } } return true ; }


invokes a specified runnable , timing out after the specified time limit if the target method run finishes before the limit is reached , this method returns or a wrapped exception is propagated if , on the other hand , the time limit is reached , we attempt to abort the run , and throw a { @ link timeout exception } to the caller

void run with timeout ( runnable runnable , long timeout duration , time unit timeout unit ) throws timeout exception , interrupted exception ;


removes the client for the given { @ link connection i d }

void destroy partition request client ( connection i d connection id , partition request client client ) { final completable future < netty partition request client > future = clients get ( connection id ) ; if ( future ! = null & & future is done ( ) ) { future then accept ( future client - > { if ( client equals ( future client ) ) { clients remove ( connection id , future ) ; } } ) ; } }


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


set the context register names and values for a function

public void set context registers ( list < context register info > context registers ) { this context registers = context registers ; }


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


checks if the current user can discover the item if yes , it may be displayed as a text in fingerprint u is

private static boolean can discover item ( @ non null final string full name ) { final jenkins jenkins = jenkins get ( ) ; / / fast check to avoid security context switches item item = null ; try { item = jenkins get item by full name ( full name ) ; } catch ( access denied exception ex ) { / / ignore , we will fall - back later } if ( item ! = null ) { return true ; } / / probably it failed due to the missing item discover / / we try to retrieve the job using system2 user and to check permissions manually final authentication user auth = jenkins get authentication 2 ( ) ; try ( a c l context acl = acl as 2 ( acl system2 ) ) { final item item by system user = jenkins get item by full name ( full name ) ; if ( item by system user = = null ) { return false ; } / / to get the item existence fact , a user needs item discover for the item / / and item read for all container folders boolean can discover the item = item by system user has permission 2 ( user auth , item discover ) ; if ( can discover the item ) { item group < ? > current = item by system user get parent ( ) ; do { if ( current instanceof item ) { final item i = ( item ) current ; current = i get parent ( ) ; if ( ! i has permission 2 ( user auth , item read ) ) { can discover the item = false ; } } else { current = null ; } } while ( can discover the item & & current ! = null ) ; } return can discover the item ; } }


aggregate the value of records of the original { @ link k table } that got { @ link k table # group by ( key value mapper ) mapped } to the same key into a new instance of { @ link k table } records with { @ code null } key are ignored aggregating is a generalization of { @ link # reduce ( reducer , reducer , materialized ) combining via reduce ( ) } as it , for example , allows the result to have a different type than the input values the result is written into a local { @ link key value store } ( which is basically an ever - updating materialized view ) that can be queried using the provided { @ code queryable store name } furthermore , updates to the store are sent downstream into a { @ link k table } changelog stream the specified { @ link initializer } is applied once directly before the first input record is processed to provide an initial intermediate aggregation result that is used to process the first record each update to the original { @ link k table } results in a two step update of the result { @ link k table } the specified { @ link aggregator adder } is applied for each update record and computes a new aggregate using the current aggregate ( or for the very first record using the intermediate aggregation result provided via the { @ link initializer } ) and the record ' s value by adding the new record to the aggregate the specified { @ link aggregator subtractor } is applied for each " replaced " record of the original { @ link k table } and computes a new aggregate using the current aggregate and the record ' s value by " removing " the " replaced " record from the aggregate thus , { @ code aggregate ( initializer , aggregator , aggregator , materialized ) } can be used to compute aggregate functions like sum for sum , the initializer , adder , and subtractor would work as follows : { @ code in this example , long serde class must be set as value serde in materialized # with value serde public class sum initializer implements initializer < long > { public long apply ( ) { return 0l ; } } public class sum adder implements aggregator < string , integer , long > { public long apply ( string key , integer new value , long aggregate ) { return aggregate + new value ; } } public class sum subtractor implements aggregator < string , integer , long > { public long apply ( string key , integer old value , long aggregate ) { return aggregate - old value ; } } } not all updates might get sent downstream , as an internal cache is used to deduplicate consecutive updates to the same key the rate of propagated updates depends on your input data rate , the number of distinct keys , the number of parallel running kafka streams instances , and the { @ link streams config configuration } parameters for { @ link streams config # cache max bytes buffering config cache size } , and { @ link streams config # commit interval ms config commit interval } to query the local { @ link read only key value store } it must be obtained via { @ link kafka streams # store ( store query parameters ) kafka streams # store ( ) } : { @ code kafka streams streams = counting words read only key value store < k , value and timestamp < vr > > local store = streams store ( queryable store name , queryable store types < k , value and timestamp < vr > > timestamped key value store ( ) ) ; k key = " some - word " ; value and timestamp < vr > aggregate for word = local store get ( key ) ; key must be local ( application state is shared over all running kafka streams instances ) } for non - local keys , a custom rpc mechanism must be implemented using { @ link kafka streams # all metadata ( ) } to query the value of the key on a parallel running instance of your kafka streams application for failure and recovery the store will be backed by an internal changelog topic that will be created in kafka therefore , the store name defined by the materialized instance must be a valid kafka topic name and cannot contain characters other than ascii alphanumerics , ' ' , ' ' and ' - ' the changelog topic will be named " $ { application id } - $ { store name } - changelog " , where " application id " is user - specified in { @ link streams config } via parameter { @ link streams config # application id config application id config } , " store name " is the provide store name defined in { @ code materialized } , and " - changelog " is a fixed suffix you can retrieve all generated internal topic names via { @ link topology # describe ( ) }

< vr > k table < k , vr > aggregate ( final initializer < vr > initializer , final aggregator < ? super k , ? super v , vr > adder , final aggregator < ? super k , ? super v , vr > subtractor , final materialized < k , vr , key value store < bytes , byte [ ] > > materialized ) ;


read values of { @ link # snapshot counter } , { @ link # num snapshots } , and all snapshots from the data input

public map < integer , snapshot > read ( data input in , f s image format loader loader ) throws i o exception { snapshot counter = in read int ( ) ; num snapshots set ( in read int ( ) ) ; / / read snapshots final map < integer , snapshot > snapshot map = new hash map < integer , snapshot > ( ) ; for ( int i = 0 ; i < num snapshots get ( ) ; i + + ) { final snapshot s = snapshot read ( in , loader ) ; snapshot map put ( s get id ( ) , s ) ; } return snapshot map ; }


public void set clock ( clock clock ) { this clock = preconditions check not null ( clock ) ; }


template method for changing properties on the given { @ link socket channel config } the default implementation sets the connect timeout based on the set property

protected void configure channel ( socket channel config config ) { if ( this connect timeout > = 0 ) { config set connect timeout millis ( this connect timeout ) ; } }


increases the reference count by { @ code 1 }


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


the name of this entry this corresponds to the ' entry ' part of a full resource name of the form package : typeentry < code > optional string name = 2 ; < code >

public boolean has name ( ) { return instance has name ( ) ; }


get the date format used to parseformat date parameters

public date format get date format ( ) { return date format ; }


since this method does not reside in a true { @ code @ configuration class } , it acts as a factory method when invoked directly ( e g , from { @ link # transaction manager ( ) } ) and as a singleton bean when retrieved through the application context ( e g , when injected into the test instance ) the result is that this method will be called twice : once indirectly by the { @ link transactional test execution listener } when it retrieves the { @ link platform transaction manager } from the application context and again when the { @ link data source } is injected into the test instance in { @ link abstract transactional annotated config class tests # set data source ( data source ) } consequently , the { @ link jdbc template } used by this test instance and the { @ link platform transaction manager } used by the spring test context framework will operate on two different { @ code data source } instances , which is almost certainly not the desired or intended behavior

public data source data source ( ) { return new embedded database builder ( ) / / add script ( " classpath : / org / springframework / test / jdbc / schema sql " ) / / / / ensure that this in - memory database is only used by this class : set name ( get class ( ) get name ( ) ) / / build ( ) ; }


protected string home dir ( string username ) { return registry utils home path for user ( username ) ; }


also checks for an alias overriding a bean definition of the same name

protected void check for alias circle ( string name , string alias ) { super check for alias circle ( name , alias ) ; if ( ! is allow bean definition overriding ( ) & & contains bean definition ( alias ) ) { throw new illegal state exception ( " cannot register alias ' " + alias + " ' for name ' " + name + " ' : alias would override bean definition ' " + alias + " ' " ) ; } }


gets the { @ link fetch source context } which defines how the source should be fetched

public fetch source context fetch source ( ) { return fetch source context ; }


filters the mutable input client - side when there ' s a clash on lower 64 - bits of a trace id

public static mapper < list < list < span > > , list < list < span > > > filter traces ( query request request ) { return new filter traces if clash on lower trace id ( request ) ; }


public int get sort ( ) { return sort = = internal ? object : sort ; }


emits a string index as an unsigned leb128 the actual value written is shifted by 1 , so that the ' 0 ' value is reserved for " null " the null symbol is used in some cases by the parameter name list at the beginning of the sequence

private void emit string index ( cst string string ) throws i o exception { if ( ( string = = null ) | | ( file = = null ) ) { output write uleb 1 2 8 ( 0 ) ; } else { output write uleb 1 2 8 ( 1 + file get string ids ( ) index of ( string ) ) ; } if ( debug ) { system err printf ( " emit string % s \ n " , string = = null ? " < null > " : string to quoted ( ) ) ; } }


calculates the maximum value on a given column the value is returned with the same data type of the column lite pal max ( person class , & quot ; age & quot ; , int class ) ; you can also specify a where clause when calculating lite pal where ( & quot ; age & gt ; ? & quot ; , & quot ; 15 & quot ; ) max ( person class , & quot ; age & quot ; , integer type ) ;

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


ensures this big array is at least the specified length if the array is smaller , segments are added until the array is larger then the specified length

public void ensure capacity ( long length ) { if ( capacity > length ) { return ; } grow ( length ) ; }


utility method to extract task manager config parameters from the configuration and to sanity check them

public static task manager services configuration from configuration ( configuration configuration , resource i d resource i d , string external address , boolean local communication only , task executor resource spec task executor resource spec ) throws exception { final string [ ] tmp dirs = configuration utils parse temp directories ( configuration ) ; string [ ] local state root dir = configuration utils parse local state directories ( configuration ) ; if ( local state root dir length = = 0 ) { / / default to temp dirs local state root dir = tmp dirs ; } boolean local recovery mode = configuration get boolean ( checkpointing options local recovery ) ; final queryable state configuration queryable state config = queryable state configuration from configuration ( configuration ) ; long timer service shutdown timeout = akka utils get timeout ( configuration ) to millis ( ) ; final retrying registration configuration retrying registration configuration = retrying registration configuration from configuration ( configuration ) ; final int external data port = configuration get integer ( netty shuffle environment options data port ) ; string bind addr = configuration get string ( task manager options bind host , net utils get wildcard i p address ( ) ) ; inet address bind address = inet address get by name ( bind addr ) ; final string class loader resolve order = configuration get string ( core options classloader resolve order ) ; final string [ ] always parent first loader patterns = core options get parent first loader patterns ( configuration ) ; final int num io threads = cluster entrypoint utils get pool size ( configuration ) ; return new task manager services configuration ( configuration , resource i d , external address , bind address , external data port , local communication only , tmp dirs , local state root dir , local recovery mode , queryable state config , configuration parser utils get slot ( configuration ) , configuration parser utils get page size ( configuration ) , task executor resource spec , timer service shutdown timeout , retrying registration configuration , configuration utils get system resource metrics probing interval ( configuration ) , flink user code class loaders resolve order from string ( class loader resolve order ) , always parent first loader patterns , num io threads ) ; }


json schema specifies type : ' null ' ' null ' type is supported in open a p i specification 3 1 and above it is not supported in open a p i 3 0 x note : the validator invokes check null type ( ) for every top - level schema in the oas document the method is not called for nested schemas that are defined inline

private static validation rule result check null type ( schema wrapper schema wrapper ) { schema schema = schema wrapper get schema ( ) ; validation rule result result = validation rule pass empty ( ) ; if ( schema wrapper get open a p i ( ) ! = null ) { sem ver version = new sem ver ( schema wrapper get open a p i ( ) get openapi ( ) ) ; if ( version at least ( " 3 0 " ) & & version compare to ( new sem ver ( " 3 1 " ) ) < 0 ) { / / oas spec is 3 0 x if ( model utils is null type ( schema ) ) { result = new validation rule fail ( ) ; string name = schema get name ( ) ; if ( name = = null ) { name = schema get title ( ) ; } result set details ( string format ( locale root , " schema ' % s ' uses a ' null ' type , which is specified in oas 3 1 and above , but oas document is version % s " , name , schema wrapper get open a p i ( ) get openapi ( ) ) ) ; return result ; } } } return result ; }


append a log record using a different offset

public void append with offset ( long offset , record record ) { append with offset ( offset , record timestamp ( ) , record key ( ) , record value ( ) , record headers ( ) ) ; }


add a key - value pair to the { @ link map bind parameter source }

map bind parameter source add value ( string param name , object value ) { assert not null ( param name , " parameter name must not be null " ) ; assert not null ( value , " value must not be null " ) ; this values put ( param name , parameter from or empty ( value , value get class ( ) ) ) ; return this ; }


sets the space between the legend entries on a horizontal axis in pixels , converts to dp internally

public void set x entry space ( float space ) { m x entry space = space ; }


evaluate the json path expression against the request content and assert that an empty value exists at the given path for the semantics of empty , consult the javadoc for { @ link org springframework util object utils # is empty ( object ) }

public request matcher is empty ( ) { return new abstract json path request matcher ( ) { @ override public void match internal ( mock client http request request ) throws i o exception , parse exception { json path request matchers this json path helper assert value is empty ( request get body as string ( ) ) ; } } ; }


render < code > number < code > in different bases using the default signedness mode this invokes { @ linkplain # format number ( long , int , signedness format mode ) } with a < code > mode < code > parameter of < code > { @ linkplain signedness format mode # default } < code >

public static string format number ( long number , int radix ) { return format number ( number , radix , signedness format mode default ) ; }


public list < e > as list ( ) { if ( non null list = = null ) { if ( array = = null | | array length ( ) = = 0 ) { non null list = collections empty list ( ) ; } else { list < e > list = new array list < > ( array length ( ) ) ; for ( int i = 0 ; i < array length ( ) ; i + + ) { e e = array get ( i ) ; if ( e ! = null ) { list add ( e ) ; } } non null list = list ; } } return non null list ; }


returns the width of the fields generated by this factory

public int get width ( ) { return width ; }


removes an interest in connects and reads for this selection key while maintaining other interests

public static void set connect and read interested ( selection key selection key ) throws cancelled key exception { selection key interest ops ( selection key interest ops ( ) | selection key op connect | selection key op read ) ; }


private static void completed stage ( final string stage , final duration info d ) { completed stages put ( stage , d ) ; }


public boolean is canceled ( ) { return canceled ; }


the name of this entry this corresponds to the ' entry ' part of a full resource name of the form package : typeentry < code > optional string name = 2 ; < code >

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


enables or disables compression for the jar file entries

public void set compression ( boolean compression ) { storage method = compression ? jar entry deflated : jar entry stored ; }


returns an encoding that behaves equivalently to this encoding , but uses an alternate character for padding

public abstract base encoding with pad char ( char pad char ) ;


returns a tuple that is the concatenation of two tuples

public static tuple concat ( tuple x , tuple y ) { if ( x is empty ( ) ) { return y ; } else if ( y is empty ( ) ) { return x ; } else { return wrap ( object arrays concat ( x elems , y elems , object class ) ) ; } }


returns the magic number corresponding to the given target api level

public static string api to magic ( int target api level ) { string version ; if ( target api level > = api current ) { version = version current ; } else { version = version for api 13 ; } return magic prefix + version + magic suffix ; }


null , na n , and infinite values are ignored in this calculation

public double get mean ( ) { return mean ; }


performs a single attempt at reading the required files

private void refresh limits ( ) throws i o exception , privileged action exception { try ( input stream new input stream = access controller do privileged ( new privileged exception action < input stream > ( ) { @ override public input stream run ( ) throws exception { return delegate new input stream ( config path , standard open option read ) ; } } ) ) { properties properties = new properties ( ) ; properties load ( new input stream ) ; total = long parse long ( properties get property ( " total " ) ) ; remaining = long parse long ( properties get property ( " remaining " ) ) ; } }


computes the hash for the composite of key and namespace and performs some steps of incremental rehash if incremental rehashing is in progress

private int compute hash for operation and do incremental rehash ( k key , n namespace ) { if ( is rehashing ( ) ) { incremental rehash ( ) ; } return composite hash ( key , namespace ) ; }


this tests that the time - bounded wait for a proxy operation works , and times out

public void test wait for proxy ( ) throws throwable { rpc thread worker = new rpc thread ( 0 ) ; worker start ( ) ; worker join ( ) ; throwable caught = worker get caught ( ) ; throwable cause = caught get cause ( ) ; assert assert not null ( " no exception was raised " , cause ) ; if ( ! ( cause instanceof connect exception ) ) { throw caught ; } }


given a prefix , find solutions under it

public int solve ( int [ ] prefix , solution acceptor < column name > output ) { list < node < column name > > choices = new array list < node < column name > > ( ) ; for ( int i = 0 ; i < prefix length ; + + i ) { choices add ( advance ( prefix [ i ] ) ) ; } int result = search ( choices , output ) ; for ( int i = prefix length - 1 ; i > = 0 ; - - i ) { rollback ( choices get ( i ) ) ; } return result ; }


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


returns the status of the attempted spawn execution


return the " max concurrent consumer " setting this returns the currently configured " max concurrent consumers " value ; the number of currently scheduledactive consumers might differ

public final int get max concurrent consumers ( ) { synchronized ( this lifecycle monitor ) { return this max concurrent consumers ; } }


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


initialize a singleton ssl socket factory

public static synchronized void initialize default factory ( s s l channel mode preferred mode ) throws i o exception { if ( instance = = null ) { instance = new delegating s s l socket factory ( preferred mode ) ; } }


public list < fcg vertex > get vertices by level ( fcg level level ) { / / note : these are sorted , since they are housed in a tree map set < fcg vertex > existing vertices = new vertices by source key set ( ) ; / / @ formatter : off list < fcg vertex > vertices at level = existing vertices stream ( ) filter ( v - > v get level ( ) equals ( level ) ) collect ( collectors to list ( ) ) ; / / @ formatter : on return vertices at level ; }


gets a recoverable object to recover the committer the recovered committer will commit the file with the exact same data as this committer would commit it

commit recoverable get recoverable ( ) ;


get the information about remote nodes to be rendered on { @ code remoteinfo } requests

public remote connection info get connection info ( ) { return new remote connection info ( cluster alias , connection strategy get mode info ( ) , initial connection timeout , skip unavailable ) ; }


sets the maximum image dimension ( width or height )

public t set max dimension px ( int max dimension px ) { m max dimension px = max dimension px ; return get this ( ) ; }


private decryptor get decryptor ( ) throws i o exception { decryptor decryptor = decryptor pool poll ( ) ; if ( decryptor = = null ) { try { decryptor = codec create decryptor ( ) ; } catch ( general security exception e ) { throw new i o exception ( e ) ; } } return decryptor ; }


represents the value for < a href = " https : tools ietf orghtmlrfc 7 5 4 0 # section - 6 5 2 " > settings header table size the initial value returned by this method must be { @ link http 2 codec util # default header table size }


adds a new constant initializer to be written

public void add constant initializer ( constant constant ) { if ( constant initializers put ( constant name , constant ) ! = null ) { throw new illegal state exception ( " constant initializer : " + constant name + " already exists " ) ; } }


ensures that { @ code expression } is { @ code true } , throwing a { @ code verify exception } with a custom message otherwise see { @ link # verify ( boolean , string , object ) } for details

public static void verify ( boolean expression , @ nullable decl string error message template , int p 1 , char p 2 ) { if ( ! expression ) { throw new verify exception ( lenient format ( error message template , p 1 , p 2 ) ) ; } }


register a listener that will be called when this model visibility state has changed the listener will contribute to this model ' s hash code state per the { @ link com airbnb epoxy epoxy attribute option # do not hash } rules

public saved state view model on visibility state changed ( on model visibility state changed listener < saved state view model , saved state view > listener ) { on mutation ( ) ; this on model visibility state changed listener epoxy generated model = listener ; return this ; }


the { @ link ring buffer } used by this disruptor this is useful for creating custom event processors if the behaviour of { @ link batch event processor } is not suitable

public ring buffer < t > get ring buffer ( ) { return ring buffer ; }


gets a clipping rect for the header based on the margins of the header and the padding of the recycler fixme : currently right margin in vertical orientation and bottom margin in horizontal orientation are clipped so they look accurate , but the headers are not being drawn at the correctly smaller width and height respectively

private rect get clip rect for header ( recycler view recycler view , view header ) { rect header margins = m dimension calculator get margins ( header ) ; if ( m orientation provider get orientation ( recycler view ) = = linear layout vertical ) { return new rect ( recycler view get padding left ( ) , recycler view get padding top ( ) , recycler view get width ( ) - recycler view get padding right ( ) - header margins right , recycler view get height ( ) - recycler view get padding bottom ( ) ) ; } else { return new rect ( recycler view get padding left ( ) , recycler view get padding top ( ) , recycler view get width ( ) - recycler view get padding right ( ) , recycler view get height ( ) - recycler view get padding bottom ( ) - header margins bottom ) ; } }


called when the { @ link data type manager } of the archive has changed this can happen when an archive is locked or unlocked

public void archive data type manager changed ( archive archive ) ;


adds { @ link align # right } and clears { @ link align # left } for the alignment of each row of widgets when { @ link # wrap ( ) wrapping } is enabled

public horizontal group row right ( ) { row align | = align right ; row align & = ~ align left ; return this ; }


returns the underlying { @ link ordinal map } for this fielddata or null if global ordinals are not needed ( constant value or single segment )