the cipher suites to enable , in the order of preference { @ code null } to use default cipher suites

public ssl context builder ciphers ( iterable < string > ciphers ) { return ciphers ( ciphers , identity cipher suite filter instance ) ; }


return the additional ( undeclared ) property

public map < string , object > get additional properties ( ) { return additional properties ; }


get the individual field last having focus effectively , this gives the field containing the composite caret

public j text field get focused field ( ) { return get field ( state which focus ) ; }


creates the serializer for the { @ link split enumerator } checkpoint the serializer is used for the result of the { @ link split enumerator # snapshot state ( ) } method

simple versioned serializer < enum chk t > get enumerator checkpoint serializer ( ) ;


public void show scrubber ( ) { show scrubber ( / * show animation duration ms = * / 0 ) ; }


public list < string > get array of string ( ) { return array of string ; }


checks if two types are the same or are equivalent under a variable mapping given in the type map that was provided

private static boolean matches ( type from , type to , map < string , type > type map ) { return to equals ( from ) | | ( from instanceof type variable & & to equals ( type map get ( ( ( type variable < ? > ) from ) get name ( ) ) ) ) ; }


deletes this file or empty directory and returns success will not delete a directory that has children @ throw runtime exception if this file handle is a { @ link file type # classpath } or file type # internal file

public boolean delete ( ) { if ( type = = file type classpath ) throw new runtime exception ( " cannot delete a classpath file : " + file ) ; return file ( ) delete ( ) ; }


sets custom { @ linkplain executor executor } for tasks of displaying < b > cached on disk < b > images ( these tasks are executed quickly so uil prefer to use separate executor for them ) < br > < br > if you set the same executor for { @ linkplain # task executor ( executor ) general tasks } and tasks about cached images ( this method ) then these tasks will be in the same thread pool so short - lived tasks can wait a long time for their turn < br > < br > < b > note : < b > if you set custom executor then following configuration options will not be considered for this executor : { @ link # thread pool size ( int ) } { @ link # thread priority ( int ) } { @ link # tasks processing order ( queue processing type ) }

public builder task executor for cached images ( executor executor for cached images ) { if ( thread pool size ! = default thread pool size | | thread priority ! = default thread priority | | tasks processing type ! = default task processing type ) { l w ( warning overlap executor ) ; } this task executor for cached images = executor for cached images ; return this ; }


updates the flow control window for this stream if it is appropriate

boolean write window update if needed ( ) throws http 2 exception ;


logs the response to a request that was logged by { @ link # maybe trace request ( rest request , exception ) }

void trace response ( rest response rest response , http channel http channel , string content length , string opaque header , long request id , boolean success ) { logger trace ( new parameterized message ( " [ { } ] [ { } ] [ { } ] [ { } ] [ { } ] sent response to [ { } ] success [ { } ] " , request id , opaque header , rest response status ( ) , rest response content type ( ) , content length , http channel , success ) ) ; }


return the number of address ranges in this set

public int get num address ranges ( ) { return address set get num address ranges ( ) ; }


reads a jvms ' stack map frame ' structure and stores the result in the given { @ link context } object this method can also be used to read a full frame structure , excluding its frame type field ( this is used to parse the legacy stack map attributes )

private int read stack map frame ( final int stack map frame offset , final boolean compressed , final boolean expand , final context context ) { int current offset = stack map frame offset ; final char [ ] char buffer = context char buffer ; final label [ ] labels = context current method labels ; int frame type ; if ( compressed ) { / / read the frame type field frame type = class file buffer [ current offset + + ] & 0x f f ; } else { frame type = frame full frame ; context current frame offset = - 1 ; } int offset delta ; context current frame local count delta = 0 ; if ( frame type < frame same locals 1 stack item frame ) { offset delta = frame type ; context current frame type = opcodes f same ; context current frame stack count = 0 ; } else if ( frame type < frame reserved ) { offset delta = frame type - frame same locals 1 stack item frame ; current offset = read verification type info ( current offset , context current frame stack types , 0 , char buffer , labels ) ; context current frame type = opcodes f same1 ; context current frame stack count = 1 ; } else if ( frame type > = frame same locals 1 stack item frame extended ) { offset delta = read unsigned short ( current offset ) ; current offset + = 2 ; if ( frame type = = frame same locals 1 stack item frame extended ) { current offset = read verification type info ( current offset , context current frame stack types , 0 , char buffer , labels ) ; context current frame type = opcodes f same1 ; context current frame stack count = 1 ; } else if ( frame type > = frame chop frame & & frame type < frame same frame extended ) { context current frame type = opcodes f chop ; context current frame local count delta = frame same frame extended - frame type ; context current frame local count - = context current frame local count delta ; context current frame stack count = 0 ; } else if ( frame type = = frame same frame extended ) { context current frame type = opcodes f same ; context current frame stack count = 0 ; } else if ( frame type < frame full frame ) { int local = expand ? context current frame local count : 0 ; for ( int k = frame type - frame same frame extended ; k > 0 ; k - - ) { current offset = read verification type info ( current offset , context current frame local types , local + + , char buffer , labels ) ; } context current frame type = opcodes f append ; context current frame local count delta = frame type - frame same frame extended ; context current frame local count + = context current frame local count delta ; context current frame stack count = 0 ; } else { final int number of locals = read unsigned short ( current offset ) ; current offset + = 2 ; context current frame type = opcodes f full ; context current frame local count delta = number of locals ; context current frame local count = number of locals ; for ( int local = 0 ; local < number of locals ; + + local ) { current offset = read verification type info ( current offset , context current frame local types , local , char buffer , labels ) ; } final int number of stack items = read unsigned short ( current offset ) ; current offset + = 2 ; context current frame stack count = number of stack items ; for ( int stack = 0 ; stack < number of stack items ; + + stack ) { current offset = read verification type info ( current offset , context current frame stack types , stack , char buffer , labels ) ; } } } else { throw new illegal argument exception ( ) ; } context current frame offset + = offset delta + 1 ; create label ( context current frame offset , labels ) ; return current offset ; }


static byte [ ] to bytes ( list < x attr > x attrs ) { if ( x attrs = = null | | x attrs is empty ( ) ) { return null ; } byte array output stream out = new byte array output stream ( ) ; try { for ( x attr a : x attrs ) { / / big - endian int v = x attr format to int ( a ) ; out write ( ints to byte array ( v ) ) ; int vlen = a get value ( ) = = null ? 0 : a get value ( ) length ; preconditions check argument ( vlen < xattr value len max , " the length of x attr values is too long " ) ; out write ( ( byte ) ( vlen > > 8 ) ) ; out write ( ( byte ) ( vlen ) ) ; if ( vlen > 0 ) { out write ( a get value ( ) ) ; } } } catch ( i o exception e ) { / / in fact , no exception } return out to byte array ( ) ; }


check whether or not resize checking is enabled

public boolean is resize checking enabled ( ) { return resize checking enabled ; }


protected map < string , list < object > > parse pk values from statement ( ) { / / insert values including pk s q l insert recognizer recognizer = ( s q l insert recognizer ) sql recognizer ; final map < string , integer > pk index map = get pk index ( ) ; if ( pk index map is empty ( ) ) { throw new should never happen exception ( " pk index is not found " ) ; } map < string , list < object > > pk values map = new hash map < > ( ) ; boolean ps = true ; if ( statement proxy instanceof prepared statement proxy ) { prepared statement proxy prepared statement proxy = ( prepared statement proxy ) statement proxy ; list < list < object > > insert rows = recognizer get insert rows ( pk index map values ( ) ) ; if ( insert rows ! = null & & ! insert rows is empty ( ) ) { map < integer , array list < object > > parameters = prepared statement proxy get parameters ( ) ; final int row size = insert rows size ( ) ; int total placeholder num = - 1 ; for ( list < object > row : insert rows ) { / / oracle insert sql statement specify return generated keys will append : rowid on sql end / / insert parameter count will than the actual + 1 if ( row is empty ( ) ) { continue ; } int current row placeholder num = - 1 ; for ( object r : row ) { if ( placeholder equals ( r ) ) { total placeholder num + = 1 ; current row placeholder num + = 1 ; } } string pk key ; int pk index ; list < object > pk values ; for ( map entry < string , integer > entry : pk index map entry set ( ) ) { pk key = entry get key ( ) ; pk values = pk values map get ( pk key ) ; if ( objects is null ( pk values ) ) { pk values = new array list < > ( row size ) ; } pk index = entry get value ( ) ; object pk value = row get ( pk index ) ; if ( placeholder equals ( pk value ) ) { int current row not placeholder num before pk index = 0 ; for ( int n = 0 , len = row size ( ) ; n < len ; n + + ) { object r = row get ( n ) ; if ( n < pk index & & ! placeholder equals ( r ) ) { current row not placeholder num before pk index + + ; } } int idx = total placeholder num - current row placeholder num + pk index - current row not placeholder num before pk index ; array list < object > parameter = parameters get ( idx + 1 ) ; pk values add all ( parameter ) ; } else { pk values add ( pk value ) ; } if ( ! pk values map contains key ( column utils del escape ( pk key , get db type ( ) ) ) ) { pk values map put ( column utils del escape ( pk key , get db type ( ) ) , pk values ) ; } } } } } else { ps = false ; list < list < object > > insert rows = recognizer get insert rows ( pk index map values ( ) ) ; for ( list < object > row : insert rows ) { pk index map for each ( ( pk key , pk index ) - > { list < object > pk values = pk values map get ( pk key ) ; if ( objects is null ( pk values ) ) { pk values map put ( column utils del escape ( pk key , get db type ( ) ) , lists new array list ( row get ( pk index ) ) ) ; } else { pk values add ( row get ( pk index ) ) ; } } ) ; } } if ( pk values map is empty ( ) ) { throw new should never happen exception ( ) ; } boolean b = this check pk values ( pk values map , ps ) ; if ( ! b ) { throw new not support yet exception ( string format ( " not support sql [ % s ] " , sql recognizer get original s q l ( ) ) ) ; } return pk values map ; }


public void user status test ( ) { / / todo : test user status }


return the { @ link byte buf } stored at the given index of the array

private byte buf buffer ( int i ) { byte buf b = buffers [ i ] ; return b instanceof component ? ( ( component ) b ) buf : b ; }


creates a method adapter that will instrument to original code in such a way that it can patch live code

private method visitor create method adapter ( int access , string name , string original desc , string new desc , string signature , string [ ] exceptions , boolean is static , boolean is constructor ) { method visitor method visitor = super visit method ( access , name , original desc , signature , exceptions ) ; method visitor = new t b incremental change visitor i s visitor ( method visitor , access , name , new desc , is static , is constructor ) ; / / install the jsr / ret inliner adapter , we have had reports of code still using the / / jsr / ret deprecated byte codes / / see https : / / code google com / p / android / issues / detail ? id = 220019 return new j s r inliner adapter ( method visitor , access , name , new desc , signature , exceptions ) ; }


gets the { @ link pseudo header name # method } header or { @ code null } if there is no such header


get the count of " 0 2 1d " triads which have two unidirectional edges among the vertices , forming an open triplet ; both edges source the center vertex

public big integer get count 0 2 1d ( ) { return counts [ 3 ] ; }


determine the transaction attribute for the given method or class this implementation delegates to configured { @ link transaction annotation parser transaction annotation parsers } for parsing known annotations into spring ' s metadata attribute class returns { @ code null } if it ' s not transactional can be overridden to support custom annotations that carry transaction metadata

protected transaction attribute determine transaction attribute ( annotated element element ) { for ( transaction annotation parser parser : this annotation parsers ) { transaction attribute attr = parser parse transaction annotation ( element ) ; if ( attr ! = null ) { return attr ; } } return null ; }


the number of slices this task should be divided into defaults to 1 meaning the task isn ' t sliced into subtasks a value of 0 is equivalent to the " auto " slices parameter of the rest api

public self set slices ( int slices ) { if ( slices < 0 ) { throw new illegal argument exception ( " [ slices ] must be at least 0 but was [ " + slices + " ] " ) ; } this slices = slices ; return self ( ) ; }


this method has to be called in the { @ link activity # on create ( bundle ) } method it sets up all the things necessary to get input , render via open g l and so on you can configure other aspects of the application with the rest of the fields in the { @ link android application configuration } instance note : you have to add the returned view to your layout !

public view initialize for view ( application listener listener , android application configuration config ) { init ( listener , config , true ) ; return graphics get view ( ) ; }


returns the root of either the " bin " or " genfiles " tree , based on this target and the current configuration the choice of which tree to use is based on the rule with which this target ( which must be an output file or a rule ) is associated

public artifact root get bin or genfiles directory ( ) { return rule has binary output ( ) ? get configuration ( ) get bin directory ( get label ( ) get repository ( ) ) : get configuration ( ) get genfiles directory ( get label ( ) get repository ( ) ) ; }


check we would use an existing connection to a later dns result instead of connecting to the first dns result for the first time

@ test public void prefers existing compatible ( ) throws exception { server enqueue ( new mock response ( ) ) ; server enqueue ( new mock response ( ) ) ; atomic integer connect count = new atomic integer ( ) ; event listener listener = new event listener ( ) { @ override public void connect start ( call call , inet socket address inet socket address , proxy proxy ) { connect count get and increment ( ) ; } } ; client = client new builder ( ) event listener factory ( client test rule wrap ( listener ) ) build ( ) ; assert 2 0 0 http 2 response ( execute ( url ) , server get host name ( ) ) ; http url san url = url new builder ( ) host ( " san com " ) build ( ) ; dns set ( " san com " , as list ( inet address get by address ( " san com " , new byte [ ] { 0 , 0 , 0 , 0 } ) , server ips get ( 0 ) ) ) ; assert 2 0 0 http 2 response ( execute ( san url ) , " san com " ) ; assert that ( client connection pool ( ) connection count ( ) ) is equal to ( 1 ) ; assert that ( connect count get ( ) ) is equal to ( 1 ) ; }


return the appropriate implementation of the zlib compressor

public static compressor get zlib compressor ( configuration conf ) { return ( is native zlib loaded ( conf ) ) ? new zlib compressor ( conf ) : new built in zlib deflater ( zlib factory get compression level ( conf ) compression level ( ) ) ; }


opens an f s data input stream at the indicated path

public f s data input stream open ( path f , int buffer size ) throws i o exception , unresolved link exception { return new f s data input stream ( new checksum f s input checker ( this , f , buffer size ) ) ; }


public sorted map < string , meter > get meters ( metric filter filter ) { return collections empty sorted map ( ) ; }


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


called when the visibility andor docked state of the watched satellite changes

public void satellite visibility changed ( boolean docked , boolean visible ) ;


add an entry to the directory listing if this listing already contains a { @ code file status } with the same path , it will be replaced

public boolean put ( path metadata child path metadata ) { preconditions check not null ( child path metadata , " child path metadata must be non - null " ) ; final s 3 a file status file status = child path metadata get file status ( ) ; path child path = child status to path key ( file status ) ; path metadata new value = child path metadata ; path metadata old value = list map put ( child path , child path metadata ) ; return old value = = null | | ! old value equals ( new value ) ; }


short for { @ code validate file mask ( path , value , true ) }

public static form validation validate file mask ( @ check for null file path path , string value ) throws i o exception { return file path validate file mask ( path , value , true ) ; }


define default request properties that should be merged into all performed requests such that input from the client request override the default properties defined here this is delegated to { @ link configurable mock mvc builder # default request ( request builder ) }

< t extends b > t default request ( request builder request builder ) ;


public list < list < big decimal > > get array array number ( ) { return array array number ; }


return a unique result object from the given collection returns { @ code null } if 0 result objects found ; throws an exception if more than 1 instance found

public static < t > t unique result ( @ nullable collection < t > results ) throws incorrect result size data access exception { if ( collection utils is empty ( results ) ) { return null ; } if ( ! collection utils has unique object ( results ) ) { throw new incorrect result size data access exception ( 1 , results size ( ) ) ; } return results iterator ( ) next ( ) ; }


creates an empty { @ code linked blocking deque } with a capacity of { @ link integer # max value }

public static < e > linked blocking deque < e > new linked blocking deque ( ) { return new linked blocking deque < e > ( ) ; }


given an { @ link input stream } parse it into an instance of the declared type so that it can be passed to application code

public t parse ( input stream stream ) ;


public f s data input stream select ( final s 3 a read op context read context , final string expression , final configuration builder options , final optional < s s e customer key > sse key , final s 3 object attributes object attributes ) throws i o exception { return new f s data input stream ( execute select ( read context , object attributes , builder options , build select request ( read context get path ( ) , expression , builder options , sse key ) ) ) ; }


this member identifies the target operating system and abi

public byte e ident osabi ( ) { return e ident osabi ; }


args : : = kafka prop file name command disable auto terminate command : = " run " | " process "

public static void main ( final string [ ] args ) throws i o exception { if ( args length < 2 ) { system err println ( " streams smoke test are expecting two parameters : prop file , command ; but only see " + args length + " parameter " ) ; exit exit ( 1 ) ; } final string prop file name = args [ 0 ] ; final string command = args [ 1 ] ; final boolean disable auto terminate = args length > 2 ; final properties streams properties = utils load props ( prop file name ) ; final string kafka = streams properties get property ( streams config bootstrap servers config ) ; final string processing guarantee = streams properties get property ( streams config processing guarantee config ) ; if ( kafka = = null ) { system err println ( " no bootstrap kafka servers specified in " + streams config bootstrap servers config ) ; exit exit ( 1 ) ; } if ( " process " equals ( command ) ) { if ( ! streams config at least once equals ( processing guarantee ) & & ! streams config exactly once equals ( processing guarantee ) ) { system err println ( " processing guarantee must be either " + streams config at least once + " or " + streams config exactly once ) ; exit exit ( 1 ) ; } } system out println ( " streams test instance started ( streams smoke test ) " ) ; system out println ( " command = " + command ) ; system out println ( " props = " + streams properties ) ; system out println ( " disable auto terminate = " + disable auto terminate ) ; switch ( command ) { case " run " : / / this starts the driver ( data generation and result verification ) final int num keys = 10 ; final int max records per key = 500 ; if ( disable auto terminate ) { generate perpetually ( kafka , num keys , max records per key ) ; } else { / / slow down data production to span 30 seconds so that system tests have time to / / do their bounces , etc final map < string , set < integer > > all data = generate ( kafka , num keys , max records per key , duration of seconds ( 30 ) ) ; smoke test driver verify ( kafka , all data , max records per key ) ; } break ; case " process " : / / this starts the stream processing app new smoke test client ( uuid random u u i d ( ) to string ( ) ) start ( streams properties ) ; break ; default : system out println ( " unknown command : " + command ) ; } }


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


sets the values of the given rectangle to this rectangle

public rectangle set ( rectangle rect ) { this x = rect x ; this y = rect y ; this width = rect width ; this height = rect height ; return this ; }


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


although http url prefers percent - encodings in uppercase , it should preserve the exact structure of the original encoding

@ test public void raw encoding retained ( ) throws exception { string url string = " http : / / % 6d % 6d : % 6d % 6d @ host / % 6d % 6d ? % 6d % 6d # % 6d % 6d " ; http url url = parse ( url string ) ; assert that ( url encoded username ( ) ) is equal to ( " % 6d % 6d " ) ; assert that ( url encoded password ( ) ) is equal to ( " % 6d % 6d " ) ; assert that ( url encoded path ( ) ) is equal to ( " / % 6d % 6d " ) ; assert that ( url encoded path segments ( ) ) contains exactly ( " % 6d % 6d " ) ; assert that ( url encoded query ( ) ) is equal to ( " % 6d % 6d " ) ; assert that ( url encoded fragment ( ) ) is equal to ( " % 6d % 6d " ) ; assert that ( url to string ( ) ) is equal to ( url string ) ; assert that ( url new builder ( ) build ( ) to string ( ) ) is equal to ( url string ) ; assert that ( url resolve ( " " ) to string ( ) ) is equal to ( " http : / / % 6d % 6d : % 6d % 6d @ host / % 6d % 6d ? % 6d % 6d " ) ; }


shutdown all consumer threads , if consumer threads are running notice { @ link buffer strategy } : if { @ link buffer strategy } = = { @ link buffer strategy # blocking } , shutdown consume driver maybe cause blocking when producing better way to change consume driver are use { @ link data carrier # consume }

public void shutdown consumers ( ) { if ( driver ! = null ) { driver close ( channels ) ; } }


returns the minimum java version of this plugin , as specified in the plugin metadata generally coming from the { @ code java level } extracted as manifest ' s metadata with < a href = " https : github comjenkinsciplugin - pompull 1 3 4 " > this addition on the plugins ' parent pom

public @ check for null string get minimum java version ( ) { return manifest get main attributes ( ) get value ( " minimum - java - version " ) ; }


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

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


creates a new workspace rule event for a symlink event

public static workspace rule event new symlink event ( string from , string to , string rule label , location location ) { symlink event e = workspace log protos symlink event new builder ( ) set target ( from ) set path ( to ) build ( ) ; workspace log protos workspace event builder result = workspace log protos workspace event new builder ( ) ; result = result set symlink event ( e ) ; if ( location ! = null ) { result = result set location ( location to string ( ) ) ; } if ( rule label ! = null ) { result = result set rule ( rule label ) ; } return new workspace rule event ( result build ( ) ) ; }


public double [ ] get values ( ) { return values ; }


asserts that { @ link extractor # sniff ( extractor input ) } returns the { @ code expected result } for a given { @ code input } , retrying repeatedly when { @ link simulated i o exception } is thrown

public static void assert sniff ( extractor extractor , fake extractor input input , boolean expected result ) throws i o exception { long original position = input get position ( ) ; while ( true ) { try { assert that ( extractor sniff ( input ) ) is equal to ( expected result ) ; if ( ! expected result ) { assert that ( input get position ( ) ) is equal to ( original position ) ; } return ; } catch ( simulated i o exception e ) { / / ignore } } }


checks that an inspector matches the category indicated as a parameter

private void check inspector category ( object inspector inspector , object inspector category category ) { if ( ! inspector get category ( ) equals ( category ) ) { throw new illegal argument exception ( " invalid data type : expected " + category + " type , but found : " + inspector get category ( ) ) ; } }


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


returns the first index resource on the linked list indexed by list i d @ exception index out of bounds exception thrown if the list i d is not in the the range [ 0 , num lists ]

public final short first ( short list i d ) { return heads [ list i d ] ; }


close the web application context of this servlet

public void destroy ( ) { get servlet context ( ) log ( " destroying spring framework servlet ' " + get servlet name ( ) + " ' " ) ; / / only call close ( ) on web application context if locally managed if ( this web application context instanceof configurable application context & & ! this web application context injected ) { ( ( configurable application context ) this web application context ) close ( ) ; } }


to test \ & quot ; client \ & quot ; model ( asynchronously ) to test \ & quot ; client \ & quot ; model

public okhttp 3 call test client model async ( client body , final api callback < client > callback ) throws api exception { okhttp 3 call local var call = test client model validate before call ( body , callback ) ; type local var return type = new type token < client > ( ) { } get type ( ) ; local var api client execute async ( local var call , local var return type , callback ) ; return local var call ; }


implements the specific logic to reject root directory deletion the caller must return the result of this call , rather than attempt to continue with the delete operation : deleting root directories is never allowed this method simply implements the policy of when to return an exit code versus raise an exception

private boolean reject root directory delete ( boolean is empty dir , boolean recursive ) throws i o exception { log info ( " oss delete the { } root directory of { } " , bucket , recursive ) ; if ( is empty dir ) { return true ; } if ( recursive ) { return false ; } else { / / reject throw new path i o exception ( bucket , " cannot delete root path " ) ; } }


adds a dependency on a skyframe - external event if the given future is already complete , this method silently returns without doing anything ( to avoid unnecessary function restarts ) otherwise , skyframe adds a listener to the passed - in future , and only re - enqueues the current node after the future completes and all requested deps are done the added listener will perform the minimum amount of work on the thread completing the future necessary for skyframe bookkeeping callers of this method must check { @ link # values missing } before returning { @ code null } from a { @ link sky function } this api is intended for performing async computations ( e g , remote execution ) in another thread pool without blocking the current skyframe thread

void depend on future ( listenable future < ? > future ) ;


exit the chained api and return an { @ code exchange result } with the raw response content

entity exchange result < byte [ ] > return result ( ) ;


the expires in param from o auth is in seconds - from - now convert to milliseconds - from - epoch

static long convert expires in ( timer timer , string expires in secs ) { long expires secs = long parse long ( expires in secs ) ; long expires ms = expires secs * 1000 ; return timer now ( ) + expires ms ; }


save the state of the < tt > concurrent hash map < tt > instance to a stream ( i e , serialize it )

private void write object ( java io object output stream s ) throws i o exception { / / force all segments for serialization compatibility for ( int k = 0 ; k < segments length ; + + k ) { ensure segment ( k ) ; } s default write object ( ) ; final segment < k , v > [ ] segments = this segments ; for ( int k = 0 ; k < segments length ; + + k ) { segment < k , v > seg = segment at ( segments , k ) ; seg lock ( ) ; try { hash entry < k , v > [ ] tab = seg table ; for ( int i = 0 ; i < tab length ; + + i ) { hash entry < k , v > e ; for ( e = entry at ( tab , i ) ; e ! = null ; e = e next ) { s write object ( e key ) ; s write object ( e value ) ; } } } finally { seg unlock ( ) ; } } s write object ( null ) ; s write object ( null ) ; }


overridden to handle the case where a user has toggled the installation column checkbox

public void set value at ( object a value , int row index , int column index ) { super set value at ( a value , row index , column index ) ; / / we only care about the install column here , as it ' s the only one that / / is editable if ( column index ! = installed col ) { return ; } / / if the user does not have write permissions on the installation dir , they cannot / / install resource file install dir = application get application layout ( ) get extension installation dirs ( ) get ( 0 ) ; if ( ! install dir exists ( ) & & ! install dir mkdir ( ) ) { msg show error ( this , null , " directory error " , " cannot install / uninstall extensions : failed to create extension installation directory \ n " + " see the \ " ghidra extension notes \ " section of the ghidra installation guide for more information " ) ; } if ( ! install dir can write ( ) ) { msg show error ( this , null , " permissions error " , " cannot install / uninstall extensions : invalid write permissions on installation directory \ n " + " see the \ " ghidra extension notes \ " section of the ghidra installation guide for more information " ) ; return ; } boolean install = ( ( boolean ) a value ) boolean value ( ) ; extension details extension = get selected extension ( row index ) ; if ( install ) { if ( extension utils install ( extension , true ) ) { model changed = true ; } } else { if ( extension utils remove state files ( extension ) ) { model changed = true ; } } refresh table ( ) ; }


add { @ link converter converters } and { @ link formatter formatters } in addition to the ones registered by default

default void add formatters ( formatter registry registry ) { }


spins up a new thread to refresh the credentials asynchronously it is < b > strongly < b > recommended to reuse instances of this credentials provider , especially when async refreshing is used since a background thread is created

public static instance profile credentials provider create async refreshing provider ( final boolean eagerly refresh credentials async ) { return new instance profile credentials provider ( true , eagerly refresh credentials async ) ; }


returns true if the flow is a conditional call or jump

public boolean is conditional ( ) { return false ; }


reads just enough data on each class so that we can sort it and then find it later

private void read sortable types ( sortable type [ ] sortable types , dex buffer , index map index map ) { for ( class def class def : buffer class defs ( ) ) { sortable type sortable type = index map adjust ( new sortable type ( buffer , index map , class def ) ) ; int t = sortable type get type index ( ) ; if ( sortable types [ t ] = = null ) { sortable types [ t ] = sortable type ; } else if ( collision policy ! = collision policy keep first ) { throw new dex exception ( " multiple dex files define " + buffer type names ( ) get ( class def get type index ( ) ) ) ; } } }


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

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


helper method used by all the visitor methods

private void visit common ( int offset , int length , boolean next is live ) { bits set ( live set , offset ) ; if ( next is live ) { / * * if the next instruction is flowed to by this one , just * add it to the work set , and then a subsequent visit * ( ) * will deal with it as appropriate * / add work if necessary ( offset + length , false ) ; } else { / * * if the next instruction isn ' t flowed to by this one , * then mark it as a start of a block but * don ' t * add it * to the work set , so that in the final phase we can know * dead code blocks as those marked as blocks but not also marked * live * / bits set ( block set , offset + length ) ; } }


public void patch ( string path , route route , response transformer transformer ) { add route ( http method patch , response transformer route impl create ( path , route , transformer ) ) ; }


skips whitespace , \ + nl pairs , and block - style comments assumes line comments are handled outside does not handle digraphs , trigraphs or decahexagraphs

protected static int skip whitespace ( byte [ ] chars , int pos , int end ) { while ( pos < end ) { if ( character is whitespace ( chars [ pos ] & 0xff ) ) { pos + + ; } else if ( chars [ pos ] = = ' \ \ ' & & pos + 1 < end & & chars [ pos + 1 ] = = ' \ n ' ) { pos + + ; } else if ( chars [ pos ] = = ' / ' & & pos + 1 < end & & chars [ pos + 1 ] = = ' * ' ) { pos + = 2 ; while ( pos < end - 1 ) { if ( chars [ pos + + ] = = ' * ' ) { if ( chars [ pos ] = = ' / ' ) { pos + + ; break ; / / proper comment end } } } } else { / / not whitespace return pos ; } } return pos ; / / pos = = len , meaning we fell off the end }


sets the < code > anytype 2 < code > property

public additional properties class anytype 2 ( object anytype 2 ) { this anytype 2 = anytype 2 ; return this ; }


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


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


your should use this to add animator update listener when create animator , otherwise , animator doesn ' t work when the animation restart

public void add update listener ( value animator animator , value animator animator update listener update listener ) { m update listeners put ( animator , update listener ) ; }


starts elasticsearch , without checking that startup is successful

public static shell result run elasticsearch start command ( shell sh ) throws i o exception { if ( is systemd ( ) ) { sh run ( " systemctl daemon - reload " ) ; sh run ( " systemctl enable elasticsearch service " ) ; sh run ( " systemctl is - enabled elasticsearch service " ) ; return sh run ignore exit code ( " systemctl start elasticsearch service " ) ; } return sh run ignore exit code ( " service elasticsearch start " ) ; }


bind view annotated fields and methods in the specified { @ code target } using the { @ code source } { @ link dialog } as the view root

public static unbinder bind ( @ non null object target , @ non null dialog source ) { view source view = source get window ( ) get decor view ( ) ; return bind ( target , source view ) ; }


visit a parse tree produced by { @ link sql base parser # query }

t visit query ( sql base parser query context ctx ) ;


private void verify open ( ) throws i o exception { if ( byte buffer = = null ) { throw new i o exception ( f s exception messages stream is closed ) ; } }


does this filesystem have a metadata store ?

public boolean has metadata store ( ) { return ! s 3 guard is null metadata store ( metadata store ) ; }


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


public string get sc a e t h flow points ( ) { return sc a e t h flow points ; }


public static < t extends comparable < ? > > list < t > bottom n ( iterable < t > coll , int n ) { return ordering natural ( ) least of ( coll , n ) ; }


append the new profiles to the writer , by reading from empty content

public void write without existing content ( ) { buffer set length ( 0 ) ; existing profile properties clear ( ) ; / / use empty string as input , since we are bootstrapping a new file run ( new scanner ( " " ) ) ; }


handle the given result object returned from the listener method , sending a response message back

protected void handle result ( object result , message request , @ nullable session session ) { if ( session ! = null ) { if ( logger is debug enabled ( ) ) { logger debug ( " listener method returned result [ " + result + " ] - generating response message for it " ) ; } try { message response = build message ( session , result ) ; post process response ( request , response ) ; destination destination = get response destination ( request , response , session , result ) ; send response ( session , destination , response ) ; } catch ( exception ex ) { throw new reply failure exception ( " failed to send reply with payload [ " + result + " ] " , ex ) ; } } else { / / no jms session available if ( logger is warn enabled ( ) ) { logger warn ( " listener method returned result [ " + result + " ] : not generating response message for it because of no jms session given " ) ; } } }


gets the c language token at the indicated location

public clang token get token ( field location loc ) { if ( loc = = null ) { return null ; } field element clicked object = get clicked object ( loc ) ; if ( clicked object instanceof clang field element ) { clang field element element = ( clang field element ) clicked object ; return element get token ( ) ; } int index = get token index ( loc ) ; return token list get ( index ) ; }


creates a new { @ link create index request builder } with the settings obtained from { @ link # index settings ( ) }

public final create index request builder prepare create ( string index ) { return prepare create ( index , - 1 ) ; }


{ @ inherit doc } the default implementation does nothing

@ override public void enter value expression default ( sql base parser value expression default context ctx ) { }


returns an array of { @ link method } containing the public member methods of the class represented by the supplied class

static public method [ ] get methods ( class c ) { com badlogic gwtref client method [ ] methods = reflection cache get type ( c ) get methods ( ) ; method [ ] result = new method [ methods length ] ; for ( int i = 0 , j = methods length ; i < j ; i + + ) { result [ i ] = new method ( methods [ i ] ) ; } return result ; }


commit the file , with before and after checks on the dest and magic values failures can be set ; they ' ll be reset after the commit

private void commit ( string filename , path dest file , float throttle , int failures ) throws exception { commit ( filename , make magic ( dest file ) , dest file , throttle , failures ) ; }


reallocate a buffer a ' deferred ' buffer is reallocated only if it is not null if ' user supplied capacity ' is not zero , buffer is user supplied and must be kept

public static < t > t [ ] reallocate buffer ( class < t > klass , t [ ] buffer , int user supplied capacity , int old capacity , int new capacity , boolean deferred ) { assert ( new capacity > old capacity ) ; assert ( user supplied capacity = = 0 | | new capacity < = user supplied capacity ) ; if ( ( ! deferred | | buffer ! = null ) & & user supplied capacity = = 0 ) { buffer = reallocate buffer ( klass , buffer , old capacity , new capacity ) ; } return buffer ; }


parses an ( 64 - bit ) unsigned long from the pdb byte reader and returns its positive big integer value

public big integer parse unsigned long val ( ) throws pdb exception { check limit ( 8 ) ; byte [ ] selected bytes = arrays copy of range ( bytes , index , index + 8 ) ; selected bytes = arrays copy of ( selected bytes , 8 ) ; index + = 8 ; return little endian data converter instance get big integer ( selected bytes , 8 , false ) ; }


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


match the specified method by { @ link method } reference or method name for backwards compatibility reasons , in a scenario with overloaded non - abstract methods of the given name , only the no - arg variant of a method will be turned into a container - driven lookup method in case of a provided { @ link method } , only straight matches will be considered , usually demarcated by the { @ code @ lookup } annotation

public boolean matches ( method method ) { if ( this method ! = null ) { return method equals ( this method ) ; } else { return ( method get name ( ) equals ( get method name ( ) ) & & ( ! is overloaded ( ) | | modifier is abstract ( method get modifiers ( ) ) | | method get parameter count ( ) = = 0 ) ) ; } }


return the current { @ link selection key }

protected selection key selection key ( ) { assert selection key ! = null ; return selection key ; }


public map < string , object > get params ( ) { return params ; }


notification that the given workspace is the current one

public void workspace set active ( workspace ws ) ;


projects a { @ link tuple } { @ link data set } to the previously selected fields


variable - length quantity special cases strings which are longer than 127 bytes values such as cookies can be 4 ki b , and should be possible to send http : tools ietf orghtmldraft - ietf - httpbis - header - compression - 12 # section - 5 2

@ test public void large header value ( ) throws i o exception { char [ ] value = new char [ 4096 ] ; arrays fill ( value , ' ! ' ) ; list < header > header block = header entries ( " cookie " , new string ( value ) ) ; hpack writer write headers ( header block ) ; bytes in write all ( bytes out ) ; hpack reader read headers ( ) ; assert that ( hpack reader header count ) is equal to ( 0 ) ; assert that ( hpack reader get and reset header list ( ) ) is equal to ( header block ) ; }


windows this { @ code keyed stream } into sliding count windows

public windowed stream < t , key , global window > count window ( long size , long slide ) { return window ( global windows create ( ) ) evictor ( count evictor of ( size ) ) trigger ( count trigger of ( slide ) ) ; }


returns default database name for all my s q l queries this value must be used with backticks only , eg ` database name `

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


updates this updaters value if it has changed

default boolean apply ( settings current , settings previous ) { if ( has changed ( current , previous ) ) { t value = get value ( current , previous ) ; apply ( value , current , previous ) ; return true ; } return false ; }


public void test json form data ( string param , string param 2 ) throws api exception { object local var post body = null ; / / verify the required parameter ' param ' is set if ( param = = null ) { throw new api exception ( 400 , " missing the required parameter ' param ' when calling test json form data " ) ; } / / verify the required parameter ' param 2 ' is set if ( param 2 = = null ) { throw new api exception ( 400 , " missing the required parameter ' param 2 ' when calling test json form data " ) ; } / / create path and map variables string local var path = " / fake / json form data " replace all ( " \ \ { format \ \ } " , " json " ) ; / / query params list < pair > local var query params = new array list < pair > ( ) ; map < string , string > local var header params = new hash map < string , string > ( ) ; map < string , string > local var cookie params = new hash map < string , string > ( ) ; map < string , object > local var form params = new hash map < string , object > ( ) ; if ( param ! = null ) local var form params put ( " param " , param ) ; if ( param 2 ! = null ) local var form params put ( " param 2 " , param 2 ) ; final string [ ] local var accepts = { } ; final string local var accept = api client select header accept ( local var accepts ) ; final string [ ] local var content types = { " application / x - www - form - urlencoded " } ; final string local var content type = api client select header content type ( local var content types ) ; string [ ] local var auth names = new string [ ] { } ; api client invoke a p i ( local var path , " get " , local var query params , local var post body , local var header params , local var cookie params , local var form params , local var accept , local var content type , local var auth names , null ) ; }


public static class < ? extends throwable > [ ] get exceptions to trace ( ) { return trace classes ; }


public static string canonical name ( string blob name ) { if ( blob name contains ( " part " ) ) { return blob name substring ( 0 , blob name index of ( " part " ) ) ; } return blob name ; }


gets the register count , as a code unit this will throw if the value is out of the range of an unsigned code unit

public final short get register count unit ( ) { int register count = get register count ( ) ; if ( ( register count & ~ 0xffff ) ! = 0 ) { throw new dex exception ( " register count out of range : " + hex u 8 ( register count ) ) ; } return ( short ) register count ; }


if a file matching { @ value hadoop tar filename format } and { @ code version } is found in { @ code destination dir } , return its path otherwise , first download the tarball from an apache mirror if the { @ value apache download mirror key } configuration or system property ( checked in that order ) is set , use that as the mirror ; else use { @ value apache download mirror default }

public static file fetch hadoop tarball ( file destination dir , string version , configuration conf , logger log ) throws i o exception { log info ( " looking for hadoop tarball for version : " + version ) ; file destination file = new file ( destination dir , string format ( hadoop tar filename format , version ) ) ; if ( destination file exists ( ) ) { log info ( " found tarball at : " + destination file get absolute path ( ) ) ; return destination file ; } string apache mirror = conf get ( apache download mirror key ) ; if ( apache mirror = = null ) { apache mirror = system get property ( apache download mirror key , apache download mirror default ) ; } if ( ! destination dir exists ( ) ) { if ( ! destination dir mkdirs ( ) ) { throw new i o exception ( " unable to create local dir : " + destination dir ) ; } } url download u r l = new url ( apache mirror + string format ( apache download mirror suffix format , version , version ) ) ; log info ( " downloading tarball from : < { } > to < { } > " , download u r l , destination file get absolute path ( ) ) ; file utils copy u r l to file ( download u r l , destination file , 10000 , 60000 ) ; log info ( " completed downloading of hadoop tarball " ) ; return destination file ; }


compares the current candidate with the values in the queue and returns the slot if the candidate is already in the queue or null if the candidate is not present

integer compare current ( ) { return map get ( new slot ( candidate slot ) ) ; }


returns the multi - architecture dylib binary of the dynamic framework may return null if the rule providing the framework only specified framework imports


return whether using 4g must hold { @ code < uses - permission android : name = " android permission access network state " > }

public static boolean is 5 g ( ) { network info info = get active network info ( ) ; return info ! = null & & info is available ( ) & & info get subtype ( ) = = telephony manager network type nr ; }


gets the model referenced by ` model id ` and responds to the listener this method first checks the local lru cache for the model if it is present , it is returned from cache in the case of search if the model is not present one of the following occurs : - if it is currently being loaded the ` model action listener ` is added to the list of listeners to be alerted when the model is fully loaded - otherwise the model is loaded and cached in the case of an ingest processor if it is not present , one of the following occurs : - if the model is referenced by a pipeline and is currently being loaded , the ` model action listener ` is added to the list of listeners to be alerted when the model is fully loaded - if the model is referenced by a pipeline and is currently not being loaded , a new load attempt is made and the resulting model will attempt to be cached for future reference - if the models is not referenced by a pipeline , the model is simply loaded from the index and given to the listener it is not cached the main difference being that models for search are always cached whereas pipeline models are only cached if they are referenced by an ingest pipeline

private void get model ( string model id , consumer consumer , action listener < local model > model action listener ) { model and consumer cached model = local model cache get ( model id ) ; if ( cached model ! = null ) { cached model consumers add ( consumer ) ; try { cached model model acquire ( ) ; } catch ( circuit breaking exception e ) { model action listener on failure ( e ) ; return ; } model action listener on response ( cached model model ) ; logger trace ( ( ) - > new parameterized message ( " [ { } ] loaded from cache " , model id ) ) ; return ; } if ( load model if necessary ( model id , consumer , model action listener ) ) { logger trace ( ( ) - > new parameterized message ( " [ { } ] is loading or loaded , added new listener to queue " , model id ) ) ; } }


creates a stream initiated by this endpoint this could fail for the following reasons : the requested stream id is not the next sequential id for this endpoint the stream already exists { @ link # can open stream ( ) } is { @ code false } the connection is marked as going away the initial state of the stream will be immediately set before notifying { @ link listener } s the state transition is sensitive to { @ code half closed } and is defined by { @ link http 2 stream # open ( boolean ) }

http 2 stream create stream ( int stream id , boolean half closed ) throws http 2 exception ;


public void visit invalid ( int opcode , int offset , int length ) ;


sets the cue box anchor positioned by { @ link # set position ( float ) position }

public builder set position anchor ( @ anchor type int position anchor ) { this position anchor = position anchor ; return this ; }


we want sufficient redundancy for the block , but we now have too many in this method , copy enough nodes from ' src nodes ' into ' dst nodes ' such that : src nodes size ( ) - dst nodes size ( ) = = replication we pick node that make sure that replicas are spread across racks and also try hard to pick one with least free space the algorithm is first to pick a node with least free space from nodes that are on a rack holding more than one replicas of the block so removing such a replica won ' t remove a rack if no such a node is available , then pick a node with least free space

private void choose excess redundancy contiguous ( final collection < datanode storage info > non excess , block info stored block , short replication , datanode descriptor added node , datanode descriptor del node hint , list < storage type > excess types ) { block placement policy replicator = placement policies get policy ( contiguous ) ; list < datanode storage info > replicas to delete = replicator choose replicas to delete ( non excess , non excess , replication , excess types , added node , del node hint ) ; for ( datanode storage info chosen replica : replicas to delete ) { process chosen excess redundancy ( non excess , chosen replica , stored block ) ; } }


add headers to the request that is being built

protected void add headers to request ( http headers headers , web client request body spec request builder ) { for ( entry < string , list < string > > entry : headers entry set ( ) ) { list < string > values = entry get value ( ) ; for ( string value : values ) { if ( value ! = null ) { request builder header ( entry get key ( ) , value ) ; } } } }


for use only by tests and initialization

public static void set token service use ip ( boolean flag ) { if ( log is debug enabled ( ) ) { log debug ( " setting " + common configuration keys hadoop security token service use ip + " to " + flag ) ; } use ip for token service = flag ; host resolver = ! use ip for token service ? new qualified host resolver ( ) : new standard host resolver ( ) ; }


sets the key request parameters to pass as the last argument to { @ link exo media drm # get key request ( byte [ ] , list , int , hash map ) } may be null if not parameters need to be passed custom data for play ready should be set under { @ link # playready custom data key }

public builder set key request parameters ( @ nullable map < string , string > key request parameters ) { this key request parameters clear ( ) ; if ( key request parameters ! = null ) { this key request parameters put all ( key request parameters ) ; } return this ; }


handles a free slot it first tries to find a pending slot request which can be fulfilled if there is no such request , then it will add the slot to the set of free slots

private void handle free slot ( task manager slot free slot ) { preconditions check state ( free slot get state ( ) = = slot state free ) ; pending slot request pending slot request = find matching request ( free slot get resource profile ( ) ) ; if ( null ! = pending slot request ) { allocate slot ( free slot , pending slot request ) ; } else { free slots put ( free slot get slot id ( ) , free slot ) ; } }


0 11 0 0 clients can talk with older brokers , but the describe topic api was added in 0 10 0 0 that means , if our topic admin talks to a pre 0 10 0 broker , it should receive an unsupported version exception , should create no topics , and return false

public void throws with api version mismatch on describe ( ) { final new topic new topic = topic admin define topic ( " my topic " ) partitions ( 1 ) compacted ( ) build ( ) ; cluster cluster = create cluster ( 1 ) ; try ( admin client unit test env env = new admin client unit test env ( new mock time ( ) , cluster ) ) { env kafka client ( ) set node api versions ( node api versions create ( ) ) ; env kafka client ( ) prepare response ( describe topic response with unsupported version ( new topic ) ) ; topic admin admin = new topic admin ( null , env admin client ( ) ) ; exception e = assert throws ( connect exception class , ( ) - > admin describe topics ( new topic name ( ) ) ) ; assert true ( e get cause ( ) instanceof unsupported version exception ) ; } }


returns a new { @ link serialization result } with the same future ( if any ) and { @ code new obj } replacing the current { @ link # get object }

public abstract < s > serialization result < s > with ( s new obj ) ;


public void return spare registers ( ) { borrowed spare registers = 0 ; }


invoked from a container thread when an async request completed for any reason including timeout and network error this method is useful for detecting that a { @ code deferred result } instance is no longer usable

default < t > void after completion ( native web request request , deferred result < t > deferred result ) throws exception { }


method : only for regex , parse regex group when regex include group

public static list < string > parse regex group ( final string string , final string regex ) { list < string > group list = null ; if ( string ! = null & & regex ! = null ) { pattern pattern = pattern compile ( regex ) ; matcher matcher = pattern matcher ( string ) ; int group count = matcher group count ( ) ; int count = 1 ; group list = new array list < string > ( ) ; if ( matcher find ( ) ) { while ( count < = group count ) { group list add ( matcher group ( count ) ) ; count + + ; } } } return group list ; }


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

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


returns true if this graph allows self - loops ( edges that connect a node to itself ) attempting to add a self - loop to a graph that does not allow them will throw an { @ link illegal argument exception }


public builder add lazy string ( @ compile time constant string arg , @ nullable lazy string value ) { return add object internal ( arg , value ) ; }


public static i p address intelligence response banned ( ) { return builder ( ) status ( i p address intelligence status banned ) score ( i p address intelligence status banned get score ( ) ) build ( ) ; }


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


rename operation safety check for attempts to rename the root directory verifies that src no longer exists after rename

public static void rename ( file system file system , path src , path dst ) throws i o exception { reject root operation ( src , false ) ; assert true ( " rename ( " + src + " , " + dst + " ) failed " , file system rename ( src , dst ) ) ; assert path does not exist ( file system , " renamed source dir " , src ) ; }


provides a list of all message encodings that have decompressors available and should be advertised the specification doesn ' t say anything about ordering , or preference , so the returned codes can be arbitrary

public set < string > get advertised message encodings ( ) { set < string > advertised decompressors = new hash set < > ( decompressors size ( ) ) ; for ( map entry < string , decompressor info > entry : decompressors entry set ( ) ) { if ( entry get value ( ) advertised ) { advertised decompressors add ( entry get key ( ) ) ; } } return collections unmodifiable set ( advertised decompressors ) ; }


public void release target ( object object ) { }


public static string get message ( string message ) { return message ; }


public static serializer type get by code ( int code ) { for ( serializer type b : serializer type values ( ) ) { if ( code = = b code ) { return b ; } } throw new illegal argument exception ( " unknown codec : " + code ) ; }


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


add an argument value for the given index in the constructor argument list

public void add indexed argument value ( int index , @ nullable object value , string type ) { add indexed argument value ( index , new value holder ( value , type ) ) ; }


return the text that will get appended to the trace data

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


unions the other record ' s fields with this records fields after the method invocation with record < code > b < code > as the parameter , this record < code > a < code > will contain at field < code > i < code > : field < code > i < code > from record < code > a < code > , if that field is within record < code > a < code > ' s number of fields and is not null field < code > i < code > from record < code > b < code > , if that field is within record < code > b < code > ' s number of fields it is not necessary that both records have the same number of fields this record will have the number of fields of the larger of the two records naturally , if both < code > a < code > and < code > b < code > have field < code > i < code > set to null , this record will have null at that position

public void union fields ( record other ) { final int min fields = math min ( this num fields , other num fields ) ; final int max fields = math max ( this num fields , other num fields ) ; final int [ ] offsets = this offsets length > = max fields ? this offsets : new int [ max fields ] ; final int [ ] lengths = this lengths length > = max fields ? this lengths : new int [ max fields ] ; if ( ! ( this is modified ( ) | | other is modified ( ) ) ) { / / handle the special ( but common ) case where both records have a valid binary / / representation differently / / allocate space for the switch buffer first final int estimated length = this binary len + other binary len ; this serializer memory = ( this switch buffer ! = null & & this switch buffer length > = estimated length ) ? this switch buffer : new byte [ estimated length ] ; this serializer position = 0 ; try { / / common loop for both records for ( int i = 0 ; i < min fields ; i + + ) { final int this off = this offsets [ i ] ; if ( this off = = null indicator offset ) { final int other off = other offsets [ i ] ; if ( other off = = null indicator offset ) { offsets [ i ] = null indicator offset ; } else { / / take field from other record offsets [ i ] = this serializer position ; this serializer write ( other binary data , other off , other lengths [ i ] ) ; lengths [ i ] = other lengths [ i ] ; } } else { / / copy field from this one offsets [ i ] = this serializer position ; this serializer write ( this binary data , this off , this lengths [ i ] ) ; lengths [ i ] = this lengths [ i ] ; } } / / add the trailing fields from one record if ( min fields ! = max fields ) { final record source for remainder = this num fields > min fields ? this : other ; int begin = - 1 ; int end = - 1 ; int offset delta = 0 ; / / go through the offsets , find the non - null fields to account for the remaining / / data for ( int k = min fields ; k < max fields ; k + + ) { final int off = source for remainder offsets [ k ] ; if ( off = = null indicator offset ) { offsets [ k ] = null indicator offset ; } else { end = source for remainder offsets [ k ] + source for remainder lengths [ k ] ; if ( begin = = - 1 ) { / / first non null column in the remainder begin = source for remainder offsets [ k ] ; offset delta = this serializer position - begin ; } offsets [ k ] = source for remainder offsets [ k ] + offset delta ; } } / / copy the remaining fields directly as binary if ( begin ! = - 1 ) { this serializer write ( source for remainder binary data , begin , end - begin ) ; } / / the lengths can be copied directly if ( lengths ! = source for remainder lengths ) { system arraycopy ( source for remainder lengths , min fields , lengths , min fields , max fields - min fields ) ; } } } catch ( exception ioex ) { throw new runtime exception ( " error creating field union of record data " + ioex get message ( ) = = null ? " " : " : " + ioex get message ( ) , ioex ) ; } } else { / / the general case , where at least one of the two records has a binary representation / / that is not in sync final int estimated length = ( this binary len > 0 ? this binary len : this num fields * default field len estimate ) + ( other binary len > 0 ? other binary len : other num fields * default field len estimate ) ; this serializer memory = ( this switch buffer ! = null & & this switch buffer length > = estimated length ) ? this switch buffer : new byte [ estimated length ] ; this serializer position = 0 ; try { / / common loop for both records for ( int i = 0 ; i < min fields ; i + + ) { final int this off = this offsets [ i ] ; if ( this off = = null indicator offset ) { final int other off = other offsets [ i ] ; if ( other off = = null indicator offset ) { offsets [ i ] = null indicator offset ; } else if ( other off = = modified indicator offset ) { / / serialize modified field from other record offsets [ i ] = this serializer position ; other write fields [ i ] write ( this serializer ) ; lengths [ i ] = this serializer position - offsets [ i ] ; } else { / / take field from other record binary offsets [ i ] = this serializer position ; this serializer write ( other binary data , other off , other lengths [ i ] ) ; lengths [ i ] = other lengths [ i ] ; } } else if ( this off = = modified indicator offset ) { / / serialize modified field from this record offsets [ i ] = this serializer position ; this write fields [ i ] write ( this serializer ) ; lengths [ i ] = this serializer position - offsets [ i ] ; } else { / / copy field from this one offsets [ i ] = this serializer position ; this serializer write ( this binary data , this off , this lengths [ i ] ) ; lengths [ i ] = this lengths [ i ] ; } } / / add the trailing fields from one record if ( min fields ! = max fields ) { final record source for remainder = this num fields > min fields ? this : other ; / / go through the offsets , find the non - null fields for ( int k = min fields ; k < max fields ; k + + ) { final int off = source for remainder offsets [ k ] ; if ( off = = null indicator offset ) { offsets [ k ] = null indicator offset ; } else if ( off = = modified indicator offset ) { / / serialize modified field from the source record offsets [ k ] = this serializer position ; source for remainder write fields [ k ] write ( this serializer ) ; lengths [ k ] = this serializer position - offsets [ k ] ; } else { / / copy field from the source record binary offsets [ k ] = this serializer position ; final int len = source for remainder lengths [ k ] ; this serializer write ( source for remainder binary data , off , len ) ; lengths [ k ] = len ; } } } } catch ( exception ioex ) { throw new runtime exception ( " error creating field union of record data " + ioex get message ( ) = = null ? " " : " : " + ioex get message ( ) , ioex ) ; } } serialize header ( this serializer , offsets , max fields ) ; / / set the fields this switch buffer = this binary data ; this binary data = serializer memory ; this binary len = serializer position ; this num fields = max fields ; this offsets = offsets ; this lengths = lengths ; this first modified pos = integer max value ; / / make sure that the object arrays reflect the size as well if ( this read fields = = null | | this read fields length < max fields ) { final value [ ] na = new value [ max fields ] ; system arraycopy ( this read fields , 0 , na , 0 , this read fields length ) ; this read fields = na ; } this write fields = ( this write fields = = null | | this write fields length < max fields ) ? new value [ max fields ] : this write fields ; }


public web socket rtm ( http url url , web socket listener listener ) { return http client new web socket ( new request builder ( ) url ( url ) build ( ) , listener ) ; }


indicates whether or not generation should also validate an input specification note : invalid specs may result in a generation error , disabling may cause unexpected results

public boolean is validate spec ( ) { return validate spec ; }


sets a new location and radius for this circle

public void set ( float x , float y , float radius ) { this x = x ; this y = y ; this radius = radius ; }


set task end time to a specific time value

private void set end time ( final long time ) { this end time = time ; log debug ( " end time for " + this task id + " is " + this end time ) ; }


< code > merge function name < code > replaces the name of the function in program 1 with the name of the function in program 2 at the specified entry point address

public void merge function name ( address entry 2 , task monitor monitor ) { address entry = origin to result translator get address ( entry 2 ) ; function f 1 = result program get function manager ( ) get function at ( entry ) ; function f 2 = origin program get function manager ( ) get function at ( entry 2 ) ; if ( f 1 ! = null & & f 2 ! = null ) { replace function name ( f 1 , f 2 get name ( ) , f 2 get symbol ( ) get source ( ) ) ; } }


post fakeouterboolean test serialization of outer boolean types

default response entity < boolean > fake outer boolean serialize ( boolean body ) { return new response entity < > ( http status not implemented ) ; }


get the current date interval that is set on this builder

public date histogram interval date histogram interval ( ) { return date histogram interval date histogram interval ( ) ; }


returns { @ code true } when the conscrypt java classes are available does not imply it actually works on this platform

public static boolean is present ( ) { return new provider method ! = null ; }


modify one profile in the existing credentials file by in - place modification this method will rename the existing profile if the specified profile has a different name

public static void modify one profile ( file destination , string profile name , profile new profile ) { final map < string , profile > modifications = collections singleton map ( profile name , new profile ) ; modify profiles ( destination , modifications ) ; }


create a new file or overwrite an existing file < br > once the file is create the client then allocates a new block with the next call using { @ link client protocol # add block } for description of parameters and exceptions thrown see { @ link client protocol # create }

static hdfs file status start file ( f s namesystem fsn , i nodes in path iip , permission status permissions , string holder , string client machine , enum set < create flag > flag , boolean create parent , short replication , long block size , file encryption info fe info , i node blocks map update info to remove blocks , boolean should replicate , string ec policy name , string storage policy , boolean log retry entry ) throws i o exception { assert fsn has write lock ( ) ; boolean overwrite = flag contains ( create flag overwrite ) ; boolean is lazy persist = flag contains ( create flag lazy persist ) ; final string src = iip get path ( ) ; f s directory fsd = fsn get f s directory ( ) ; if ( iip get last i node ( ) ! = null ) { if ( overwrite ) { list < i node > to remove i nodes = new chunked array list < > ( ) ; list < long > to remove u c files = new chunked array list < > ( ) ; long ret = f s dir delete op delete ( fsd , iip , to remove blocks , to remove i nodes , to remove u c files , now ( ) ) ; if ( ret > = 0 ) { iip = i nodes in path replace ( iip , iip length ( ) - 1 , null ) ; f s dir delete op incr deleted file count ( ret ) ; fsn remove leases and i nodes ( to remove u c files , to remove i nodes , true ) ; } } else { / / if lease soft limit time is expired , recover the lease fsn recover lease internal ( f s namesystem recover lease op create file , iip , src , holder , client machine , false ) ; throw new file already exists exception ( src + " for client " + client machine + " already exists " ) ; } } fsn check fs object limit ( ) ; i node file new node = null ; i nodes in path parent = f s dir mkdir op create ancestor directories ( fsd , iip , permissions ) ; if ( parent ! = null ) { iip = add file ( fsd , parent , iip get last local name ( ) , permissions , replication , block size , holder , client machine , should replicate , ec policy name , storage policy ) ; new node = iip ! = null ? iip get last i node ( ) as file ( ) : null ; } if ( new node = = null ) { throw new i o exception ( " unable to add " + src + " to namespace " ) ; } fsn lease manager add lease ( new node get file under construction feature ( ) get client name ( ) , new node get id ( ) ) ; if ( fe info ! = null ) { f s dir encryption zone op set file encryption info ( fsd , iip , fe info , x attr set flag create ) ; } set new i node storage policy ( fsd get block manager ( ) , iip , is lazy persist ) ; fsd get edit log ( ) log open file ( src , new node , overwrite , log retry entry ) ; if ( name node state change log is debug enabled ( ) ) { name node state change log debug ( " dir * name system start file : added " + src + " inode " + new node get id ( ) + " " + holder ) ; } return f s dir stat and listing op get file info ( fsd , iip , false , false ) ; }


create a message consumer for the given jms session , registering a message listener for the specified listener

protected message consumer create listener consumer ( final session session ) throws j m s exception { destination destination = get destination ( ) ; if ( destination = = null ) { string destination name = get destination name ( ) ; assert state ( destination name ! = null , " no destination set " ) ; destination = resolve destination name ( session , destination name ) ; } message consumer consumer = create consumer ( session , destination ) ; if ( this task executor ! = null ) { consumer set message listener ( message - > this task executor execute ( ( ) - > process message ( message , session ) ) ) ; } else { consumer set message listener ( message - > process message ( message , session ) ) ; } return consumer ; }


public void insert recognizer test 0 ( ) { string sql = " insert into t 1 ( name ) values ( ' name 1 ' ) " ; s q l statement statement = get s q l statement ( sql ) ; my s q l insert recognizer my s q l insert recognizer = new my s q l insert recognizer ( sql , statement ) ; assertions assert equals ( sql , my s q l insert recognizer get original s q l ( ) ) ; assertions assert equals ( " t 1 " , my s q l insert recognizer get table name ( ) ) ; assertions assert equals ( collections singleton list ( " name " ) , my s q l insert recognizer get insert columns ( ) ) ; assertions assert equals ( 1 , my s q l insert recognizer get insert rows ( collections singleton list ( pk index ) ) size ( ) ) ; assertions assert equals ( collections singleton list ( " name 1 " ) , my s q l insert recognizer get insert rows ( collections singleton list ( pk index ) ) get ( 0 ) ) ; }


< code > optional string msg = 1 ; < code >

public builder set msg bytes ( com google protobuf byte string value ) { if ( value = = null ) { throw new null pointer exception ( ) ; } bit field 0 | = 0x 0 0 0 0 0 0 0 1 ; msg = value ; on changed ( ) ; return this ; }


check whether need to continue or kill the cluster

private tuple 2 < boolean , boolean > rep step ( buffered reader in ) throws i o exception , interrupted exception { final long start time = system current time millis ( ) ; while ( ( system current time millis ( ) - start time ) < client polling interval ms & & ( ! in ready ( ) ) ) { thread sleep ( 200l ) ; } / / - - - - - - - - - - - - - handle interactive command by user - - - - - - - - - - - - - - - - - - - - - - if ( in ready ( ) ) { final string command = in read line ( ) ; switch ( command ) { case " quit " : return new tuple 2 < > ( false , false ) ; case " stop " : return new tuple 2 < > ( false , true ) ; case " help " : system err println ( kubernetes cluster help ) ; break ; default : system err println ( " unknown command ' " + command + " ' showing help : " ) ; system err println ( kubernetes cluster help ) ; break ; } } return new tuple 2 < > ( true , false ) ; }


returns all installed extensions these are all the extensions found in { @ link application layout # get extension installation dirs }

public static set < extension details > get installed extensions ( boolean include uninstalled ) throws extension exception { application layout layout = application get application layout ( ) ; / / the set to return ; set < extension details > extensions = new hash set < > ( ) ; / / find all extension properties or extension properties uninstalled files in / / the install directory and create a extension details object for each for ( resource file install dir : layout get extension installation dirs ( ) ) { if ( ! install dir is directory ( ) ) { continue ; } list < resource file > prop files = find extension property files ( install dir , include uninstalled ) ; for ( resource file prop file : prop files ) { extension details details = create extension details from property file ( prop file ) ; / / we found this extension in the installation directory , so set the install path / / property and add to the final set details set install path ( prop file get parent file ( ) get absolute path ( ) ) ; if ( ! extensions contains ( details ) ) { extensions add ( details ) ; } else { msg warn ( null , " skipping extension \ " " + details get name ( ) + " \ " found at " + details get install path ( ) + " extension by that name installed in higher priority location " ) ; } } } return extensions ; }


decides whether this proto library should check for strict proto deps only takes into account the command - line flag - - strict proto deps

public static boolean are deps strict ( rule context rule context ) { strict deps mode get bool = rule context get fragment ( proto configuration class ) strict proto deps ( ) ; return get bool ! = strict deps mode off & & get bool ! = strict deps mode default ; }


returns a shard routing representing the target shard the target shard routing will be the initializing state and have relocating node id set to the source node

public shard routing get target relocating shard ( ) { assert relocating ( ) ; return target relocating shard ; }


{ @ inherit doc } the evaluation of predicates by this context is short - circuiting , but unordered

public boolean eval ( recognizer < ? , ? > parser , rule context parser call stack ) { for ( semantic context opnd : opnds ) { if ( opnd eval ( parser , parser call stack ) ) return true ; } return false ; }


private static void initialize data ( cake baking service cake baking service ) { cake baking service save new layer ( new cake layer info ( " chocolate " , 1200 ) ) ; cake baking service save new layer ( new cake layer info ( " banana " , 900 ) ) ; cake baking service save new layer ( new cake layer info ( strawberry , 950 ) ) ; cake baking service save new layer ( new cake layer info ( " lemon " , 950 ) ) ; cake baking service save new layer ( new cake layer info ( " vanilla " , 950 ) ) ; cake baking service save new layer ( new cake layer info ( strawberry , 950 ) ) ; cake baking service save new topping ( new cake topping info ( " candies " , 350 ) ) ; cake baking service save new topping ( new cake topping info ( " cherry " , 350 ) ) ; var cake 1 = new cake info ( new cake topping info ( " candies " , 0 ) , list of ( new cake layer info ( " chocolate " , 0 ) , new cake layer info ( " banana " , 0 ) , new cake layer info ( strawberry , 0 ) ) ) ; try { cake baking service bake new cake ( cake 1 ) ; } catch ( cake baking exception e ) { e print stack trace ( ) ; } var cake 2 = new cake info ( new cake topping info ( " cherry " , 0 ) , list of ( new cake layer info ( " vanilla " , 0 ) , new cake layer info ( " lemon " , 0 ) , new cake layer info ( strawberry , 0 ) ) ) ; try { cake baking service bake new cake ( cake 2 ) ; } catch ( cake baking exception e ) { e print stack trace ( ) ; } }


returns whether this monitor is using a fair ordering policy

public boolean is fair ( ) { return fair ; }


make sure an old windows classpath with an empty element ( implicitly cwd : i ' m looking at you 1 x es scripts ) fails

public void test empty class path windows ( ) throws exception { assume true ( " test is designed for windows - like systems only " , " ; " equals ( system get property ( " path separator " ) ) ) ; assume true ( " test is designed for windows - like systems only " , " \ \ " equals ( system get property ( " file separator " ) ) ) ; try { jar hell parse class path ( " ; c : \ \ element 1 ; c : \ \ element 2 " ) ; fail ( " should have hit exception " ) ; } catch ( illegal state exception expected ) { assert true ( expected get message ( ) contains ( " should not contain empty elements " ) ) ; } }


don ' t write ' this ' , so that subtypes can be implemented as anonymous class

private object write replace ( ) { return new object ( ) ; }


public void set color ( int color ) { if ( m color ! = color ) { m color = color ; invalidate self ( ) ; } }


< code > optional bytes msg = 7 ; < code >


returns the known dependencies for this type if this has dependencies whose values are not known statically , a dependency for the { @ link org elasticsearch common inject injector injector } will be included in the returned set

set < dependency < ? > > get dependencies ( ) ;


return the values for all the text field ( s )

public string [ ] get values ( ) { return input values ; }


test the property ' array array of integer '

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


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


protected string [ ] get field names ( ) { return field names ; }


called when a transport is terminated default implementation is no - op

public void transport terminated ( attributes transport attrs ) { }


returns true if the given character is within the ascii range

public static boolean is ascii char ( char c ) { return ( 0x 2 0 < = c ) & & ( c < = 0x 7f ) ; }


public void update persistent task state ( final string task id , final long task allocation id , final persistent task state task state , final action listener < persistent task < ? > > listener ) { cluster service submit state update task ( " update task state [ " + task id + " ] " , new cluster state update task ( ) { @ override public cluster state execute ( cluster state current state ) { persistent tasks custom metadata builder tasks in progress = builder ( current state ) ; if ( tasks in progress has task ( task id , task allocation id ) ) { return update ( current state , tasks in progress update task state ( task id , task state ) ) ; } else { if ( tasks in progress has task ( task id ) ) { logger warn ( " trying to update state on task { } with unexpected allocation id { } " , task id , task allocation id ) ; } else { logger warn ( " trying to update state on non - existing task { } " , task id ) ; } throw new resource not found exception ( " the task with id { } and allocation id { } doesn ' t exist " , task id , task allocation id ) ; } } @ override public void on failure ( string source , exception e ) { listener on failure ( e ) ; } @ override public void cluster state processed ( string source , cluster state old state , cluster state new state ) { listener on response ( persistent tasks custom metadata get task with id ( new state , task id ) ) ; } } ) ; }


register help for a specific object < p > do not call this method will a < code > null < code > help location instead , to signal that an item has no help , call { @ link # exclude from help ( object ) }

public void register help ( object help object , help location help location ) ;


actually decrypt the bytes in the byte provider

decrypted packet decrypt ( string firmware name , string firmware path , byte provider provider , task monitor monitor ) throws i o exception , crypto exception , cancelled exception ;


check whether the safe mode can be turned off by this monitor safe mode can be turned off iff the threshold is reached , and the extension time has passed

private boolean can leave ( ) { if ( namesystem in transition to active ( ) ) { return false ; } else if ( time to leave extension ( ) > 0 ) { report status ( " state * safe mode on , in safe mode extension " , false ) ; return false ; } else if ( ! are thresholds met ( ) ) { report status ( " state * safe mode on , thresholds not met " , false ) ; return false ; } else { return true ; } }


sets the < code > last name < code > property

public void set last name ( string last name ) { this last name = last name ; }


set those bits in the non flowing context register mask which should not flow with context

private void init context bit masks ( register context reg ) { byte [ ] sub mask = context reg get base mask ( ) ; if ( ! context reg follows flow ( ) ) { has non flowing context = true ; for ( int i = 0 ; i < non flowing context register mask length ; i + + ) { non flowing context register mask [ i ] | = sub mask [ i ] ; flowing context register mask [ i ] & = ~ sub mask [ i ] ; } } else { for ( int i = 0 ; i < flowing context register mask length ; i + + ) { flowing context register mask [ i ] | = sub mask [ i ] ; } if ( context reg has children ( ) ) { for ( register child reg : context reg get child registers ( ) ) { init context bit masks ( child reg ) ; } } } }


private transformation < row data > create sort row time ( row type input type , transformation < row data > input transform , table config table config ) { generated record comparator row comparator = null ; if ( sort spec get field size ( ) > 1 ) { / / skip the first field which is the rowtime field and would be ordered by timer sort spec spec exclude time = sort spec create sub sort spec ( 1 ) ; row comparator = comparator code generator gen ( table config , " row time sort comparator " , input type , spec exclude time ) ; } row time sort operator sort operator = new row time sort operator ( internal type info of ( input type ) , sort spec get field spec ( 0 ) get field index ( ) , row comparator ) ; one input transformation < row data , row data > transform = new one input transformation < > ( input transform , get desc ( ) , sort operator , internal type info of ( input type ) , input transform get parallelism ( ) ) ; if ( inputs contain singleton ( ) ) { transform set parallelism ( 1 ) ; transform set max parallelism ( 1 ) ; } empty row data key selector selector = empty row data key selector instance ; transform set state key selector ( selector ) ; transform set state key type ( selector get produced type ( ) ) ; return transform ; }


public void invalidate ( int idx ) { throw if immutable ( ) ; primary invalidate ( idx ) ; for ( locals array la : secondaries ) { if ( la ! = null ) { la invalidate ( idx ) ; } } }


maps from the actual toolchain type to the resolved toolchain implementation that should be used

builder set toolchain type to resolved ( immutable set multimap < toolchain type info , label > toolchain type to resolved ) ;


the sequence number of the match or { @ link sequence numbers # unassigned seq no } if sequence numbers weren ' t requested


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

public base model view model on unbind ( on model unbound listener < base model view model , base model view > listener ) { on mutation ( ) ; this on model unbound listener epoxy generated model = listener ; return this ; }


when the striped block reader timeout , the outdated future should be ignored or the npe will be thrown , which will stop reading the remaining data , and the reconstruction task will fail

public void test timeout read block in reconstruction ( ) throws exception { assume true ( " ignore case where num parity units < = 1 " , ec policy get num parity units ( ) > 1 ) ; int striped buffer size = conf get int ( d f s config keys dfs dn ec reconstruction striped read buffer size key , cell size ) ; erasure coding policy policy = ec policy ; fs enable erasure coding policy ( policy get name ( ) ) ; fs get client ( ) set erasure coding policy ( " / " , policy get name ( ) ) ; / / striped block reconstructor # reconstruct will loop 2 times final int file len = striped buffer size * 2 * ec policy get num data units ( ) ; string file name = " / timeout - read - block " ; path file = new path ( file name ) ; write file ( fs , file name , file len ) ; fs get file block locations ( file , 0 , file len ) ; located blocks located blocks = striped file test util get located blocks ( file , fs ) ; assert assert equals ( 1 , located blocks get located blocks ( ) size ( ) ) ; / / the file only has one block group located block lblock = located blocks get ( 0 ) ; datanode info [ ] datanodeinfos = lblock get locations ( ) ; / / to reconstruct first block data node data node = cluster get data node ( datanodeinfos [ 0 ] get ipc port ( ) ) ; int striped read timeout in mills = conf get int ( d f s config keys dfs dn ec reconstruction striped read timeout millis key , d f s config keys dfs dn ec reconstruction striped read timeout millis default ) ; assert assert true ( d f s config keys dfs dn ec reconstruction striped read timeout millis key + " must be greater than 2000 " , striped read timeout in mills > 2000 ) ; data node fault injector old injector = data node fault injector get ( ) ; data node fault injector timeout injector = new data node fault injector ( ) { private atomic integer num delay reader = new atomic integer ( 0 ) ; @ override public void delay block reader ( ) { int index = num delay reader increment and get ( ) ; log info ( " delay the { } th read block " , index ) ; / / the file ' s first striped block reconstructor # reconstruct , / / and the first reader will timeout if ( index = = 1 ) { try { generic test utils wait for ( ( ) - > num delay reader get ( ) > = ec policy get num data units ( ) + 1 , 50 , striped read timeout in mills * 3 ) ; } catch ( timeout exception e ) { assert fail ( " can ' t reconstruct the file ' s first part " ) ; } catch ( interrupted exception e ) { } } / / stop all the following re - reconstruction tasks if ( index > 3 * ec policy get num data units ( ) + 1 ) { while ( true ) { try { thread sleep ( 1000 ) ; } catch ( interrupted exception e ) { } } } } } ; data node fault injector set ( timeout injector ) ; try { shutdown data node ( data node ) ; / / before hdfs - 15240 , npe will cause reconstruction fail ( test timeout ) striped file test util wait for reconstruction finished ( file , fs , group size ) ; } finally { data node fault injector set ( old injector ) ; } }


public model with view long click listener on unbind ( on model unbound listener < model with view long click listener , object > listener ) { on mutation ( ) ; this on model unbound listener epoxy generated model = listener ; return this ; }


creates list of users with given input array

public api response < void > create users with array input with http info ( list < user > body ) throws api exception { okhttp 3 call local var call = create users with array input validate before call ( body , null ) ; return local var api client execute ( local var call ) ; }


public string query ( ) { return query ; }


returns the byte index from the start of the file to the table of contents ( toc )

public int get table of contents offset ( ) { return tocoff ; }


public file to file ( ) { if ( ! ( fs instanceof local file system ) ) { throw new illegal argument exception ( " not a local path : " + path ) ; } return ( ( local file system ) fs ) path to file ( path ) ; }


unlocks the currently locked range starting at the specified position

public void unlock range ( long position ) { for ( int i = 0 ; i < locked ranges size ( ) ; i + + ) { if ( locked ranges get ( i ) position = = position ) { locked ranges remove ( i ) ; return ; } } throw new illegal state exception ( ) ; }


public tree path get tree path ( ) { if ( tree path = = null ) { tree path = new tree path ( get path ( ) ) ; } return tree path ; }


returns the value of the edge that connects { @ code node u } to { @ code node v } , if one is present ; otherwise , returns { @ code default value } in an undirected graph , this is equal to { @ code edge value or default ( node v , node u , default value ) }

v edge value or default ( n node u , n node v , @ nullable decl v default value ) ;


tests that ( un ) chaining affects the node hash ( for intermediate nodes ) a ( chained ) : [ ( src 0 ) - > ( map ) - > ( filter ) - > ( sink ) ] b ( unchained ) : [ ( src 0 ) ] - > [ ( map ) - > ( filter ) - > ( sink ) ] the hashes for the single vertex in a and the source vertex in b need to be different

public void test node hash after intermediate unchaining ( ) throws exception { stream execution environment env = stream execution environment create local environment ( ) ; env set parallelism ( 4 ) ; env add source ( new no op source function ( ) ) map ( new no op map function ( ) ) name ( " map " ) start new chain ( ) filter ( new no op filter function ( ) ) add sink ( new discarding sink < > ( ) ) ; job graph job graph = env get stream graph ( ) get job graph ( ) ; job vertex chained map = job graph get vertices sorted topologically from sources ( ) get ( 1 ) ; assert true ( chained map get name ( ) starts with ( " map " ) ) ; job vertex i d chained map id = chained map get i d ( ) ; env = stream execution environment create local environment ( ) ; env set parallelism ( 4 ) ; env add source ( new no op source function ( ) ) map ( new no op map function ( ) ) name ( " map " ) start new chain ( ) filter ( new no op filter function ( ) ) start new chain ( ) add sink ( new discarding sink < > ( ) ) ; job graph = env get stream graph ( ) get job graph ( ) ; job vertex unchained map = job graph get vertices sorted topologically from sources ( ) get ( 1 ) ; assert equals ( " map " , unchained map get name ( ) ) ; job vertex i d unchained map id = unchained map get i d ( ) ; assert not equals ( chained map id , unchained map id ) ; }


reads the 8 bits of the special corner condition 1 see iso 16022 : 2006 , figure f 3

private int read corner 1 ( int num rows , int num columns ) { int current byte = 0 ; if ( read module ( num rows - 1 , 0 , num rows , num columns ) ) { current byte | = 1 ; } current byte < < = 1 ; if ( read module ( num rows - 1 , 1 , num rows , num columns ) ) { current byte | = 1 ; } current byte < < = 1 ; if ( read module ( num rows - 1 , 2 , num rows , num columns ) ) { current byte | = 1 ; } current byte < < = 1 ; if ( read module ( 0 , num columns - 2 , num rows , num columns ) ) { current byte | = 1 ; } current byte < < = 1 ; if ( read module ( 0 , num columns - 1 , num rows , num columns ) ) { current byte | = 1 ; } current byte < < = 1 ; if ( read module ( 1 , num columns - 1 , num rows , num columns ) ) { current byte | = 1 ; } current byte < < = 1 ; if ( read module ( 2 , num columns - 1 , num rows , num columns ) ) { current byte | = 1 ; } current byte < < = 1 ; if ( read module ( 3 , num columns - 1 , num rows , num columns ) ) { current byte | = 1 ; } return current byte ; }


delete purchase order by id for valid response try integer i ds with value & lt ; 1000 anything above 1000 or nonintegers will generate api errors

public api response < void > delete order with http info ( string order id ) throws api exception { okhttp 3 call local var call = delete order validate before call ( order id , null ) ; return local var api client execute ( local var call ) ; }


reads as many lines as expected unless it reaches the end

public string [ ] read ( int lines to read ) throws exception { array list < string > st ; try { setup ( ) ; st = new array list < string > ( ) ; for ( int i = 0 ; i < lines to read ; i + + ) { string s = reader read line ( ) ; if ( s ! = null ) st add ( s ) ; } last connection headers = connection get header fields ( ) entry set ( ) ; } catch ( exception e ) { cleanup ( ) ; throw e ; } finally { cleanup ( ) ; } return st to array ( new string [ st size ( ) ] ) ; }


release an allocated container on this node it also releases from the reservation list to trigger preemption allocations

public synchronized void release container ( container id container id , boolean released by node ) { r m container container = get container ( container id ) ; super release container ( container id , released by node ) ; if ( container ! = null ) { containers for preemption remove ( container ) ; } }


remove data - node reference from the block remove the block from the block map only if it does not belong to any file and data - nodes

boolean remove node ( block b , datanode descriptor node ) { block info info = blocks get ( b ) ; if ( info = = null ) return false ; / / remove block from the data - node set and the node from the block info boolean removed = remove block ( node , info ) ; if ( info has no storage ( ) / / no datanodes left & & info is deleted ( ) ) { / / does not belong to a file blocks remove ( b ) ; / / remove block from the map decrement block stat ( info ) ; } return removed ; }


called in the transport thread to process the content of an inbound data frame from the client

public void inbound data received ( readable buffer frame , boolean end of stream ) { preconditions check state ( ! this end of stream , " past end of stream " ) ; / / deframe the message if a failure occurs , deframe failed will be called deframe ( frame ) ; if ( end of stream ) { this end of stream = true ; close deframer ( false ) ; } }