reads a chunk of data from the given location in the file to ensure we ' re always reading full lines , take the given start position and move forward to the next full line before reading

public synchronized list < string > read next chunk from ( long start byte ) throws i o exception { if ( raf = = null ) { return collections < string > empty list ( ) ; } / / move the pointer to the beginning of the line this byte position is in long line start = get start of next line ( start byte ) ; raf seek ( line start ) ; return read chunk ( raf get file pointer ( ) ) ; }


note the same entry instance is returned each time this method is called

public entry next ( ) { if ( ! has next ) throw new no such element exception ( ) ; if ( ! valid ) throw new gdx runtime exception ( " # iterator ( ) cannot be used nested " ) ; int [ ] key table = map key table ; if ( next index = = index zero ) { entry key = 0 ; entry value = map zero value ; } else { entry key = key table [ next index ] ; entry value = map value table [ next index ] ; } current index = next index ; find next index ( ) ; return entry ; }


public void clear ( string cache key ) { value cache key key = get request cache key ( cache key ) ; if ( key ! = null ) { concurrent hash map < value cache key , hystrix cached observable < ? > > cache instance = request variable for cache get ( concurrency strategy ) ; if ( cache instance = = null ) { throw new illegal state exception ( " request caching is not available maybe you need to initialize the hystrix request context ? " ) ; } / * remove this cache key * / cache instance remove ( key ) ; } }


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


enables or disables progressive rendering

public image request builder set progressive rendering enabled ( boolean enabled ) { m progressive rendering enabled = enabled ; return this ; }


creates a { @ link conversation message } wrapping the provided message record and will update and modify the provided mentions from placeholder to actual this method may perform database operations to resolve mentions to display names

public static @ non null conversation message create with unresolved data ( @ non null context context , @ non null message record message record , @ nullable list < mention > mentions ) { if ( message record is mms ( ) & & mentions ! = null & & ! mentions is empty ( ) ) { mention util updated body and mentions updated = mention util update body and mentions with display names ( context , message record , mentions ) ; return new conversation message ( message record , updated get body ( ) , updated get mentions ( ) ) ; } return create with resolved data ( message record ) ; }


public list < file > find n recent snapshots ( int n ) throws i o exception { file snap snaplog = new file snap ( snap dir ) ; return snaplog find n recent snapshots ( n ) ; }


adds the { @ link node } to the model and sets it active for building use any of the part ( ) method to add a node part

protected node node ( final node node ) { if ( model = = null ) throw new gdx runtime exception ( " call begin ( ) first " ) ; endnode ( ) ; model nodes add ( node ) ; this node = node ; return node ; }


noop implementation , sub - classes may override this { @ inherit doc }

public void channel released ( @ suppress warnings ( " unused " ) channel ch ) throws exception { / / noop }


check that all error codes in the response get included in { @ link abstract response # error counts ( ) }

public void test error counts includes none ( ) { assert equals ( integer value of ( 1 ) , create add offsets to txn response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create add partitions to txn response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create alter client quotas response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create alter configs response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 2 ) , create alter partition reassignments response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create alter replica log dirs response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create api version response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create controlled shutdown response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 2 ) , create create acls response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create create partitions response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create create token response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create create topic response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create delete acls response ( api keys delete acls latest version ( ) ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create delete groups response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create delete topics response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create describe acls response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create describe client quotas response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 2 ) , create describe configs response ( describe configs latest version ( ) ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create describe group response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create describe token response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 2 ) , create elect leaders response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create end txn response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create expire token response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 3 ) , create fetch response ( 123 ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create find coordinator response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create heart beat response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create incremental alter configs response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create join group response ( join group latest version ( ) ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 2 ) , create leader and isr response ( 4 ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 2 ) , create leader and isr response ( 5 ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 3 ) , create leader epoch response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create leave group response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create list groups response ( list groups latest version ( ) ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create list offset response ( list offsets latest version ( ) ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create list partition reassignments response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 3 ) , create metadata response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create offset commit response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 2 ) , create offset delete response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 3 ) , create offset fetch response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create produce response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create renew token response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create sasl authenticate response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create sasl handshake response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 2 ) , create stop replica response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create sync group response ( sync group latest version ( ) ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create txn offset commit response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create update metadata response ( ) error counts ( ) get ( errors none ) ) ; assert equals ( integer value of ( 1 ) , create write txn markers response ( ) error counts ( ) get ( errors none ) ) ; }


test this object for equality against { @ code h 2 }

public final boolean equals ( headers < k , v , ? > h 2 , hashing strategy < v > value hashing strategy ) { if ( h 2 size ( ) ! = size ( ) ) { return false ; } if ( this = = h 2 ) { return true ; } for ( k name : names ( ) ) { list < v > other values = h 2 get all ( name ) ; list < v > values = get all ( name ) ; if ( other values size ( ) ! = values size ( ) ) { return false ; } for ( int i = 0 ; i < other values size ( ) ; i + + ) { if ( ! value hashing strategy equals ( other values get ( i ) , values get ( i ) ) ) { return false ; } } } return true ; }


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


perform a check of the application component

protected abstract result check ( ) throws exception ;


completes the co - group operation with the user function that is executed for windowed groups < b > note : < b > this is a temporary workaround while the { @ link # apply ( co group function ) } method has the wrong return type and hence does not allow one to set an operator - specific parallelism

public < t > single output stream operator < t > with ( co group function < t1 , t2 , t > function ) { return ( single output stream operator < t > ) apply ( function ) ; }


the collector needs to get the context information including user , flow and flow run id to associate with every incoming put - entity requests

get timeline collector context response get timeline collector context ( get timeline collector context request request ) throws yarn exception , i o exception ;


get the value of the ' { @ code title } ' attribute may be a runtime expression

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


returns the number of matching { @ code char } s found in a character sequence counts 2 per supplementary character , such as for { @ link # whitespace } ( ) { @ link # negate } ( )

public int count in ( char sequence sequence ) { int count = 0 ; for ( int i = 0 ; i < sequence length ( ) ; i + + ) { if ( matches ( sequence char at ( i ) ) ) { count + + ; } } return count ; }


parse { @ link metric node } from thin string , see { @ link # to thin string ( ) }

public static metric node from thin string ( string line ) { metric node node = new metric node ( ) ; string [ ] strs = line split ( " \ \ | " ) ; node set timestamp ( long parse long ( strs [ 0 ] ) ) ; node set resource ( strs [ 1 ] ) ; node set pass qps ( long parse long ( strs [ 2 ] ) ) ; node set block qps ( long parse long ( strs [ 3 ] ) ) ; node set success qps ( long parse long ( strs [ 4 ] ) ) ; node set exception qps ( long parse long ( strs [ 5 ] ) ) ; node set rt ( long parse long ( strs [ 6 ] ) ) ; if ( strs length > = 8 ) { node set occupied pass qps ( long parse long ( strs [ 7 ] ) ) ; } if ( strs length > = 9 ) { node set concurrency ( integer parse int ( strs [ 8 ] ) ) ; } if ( strs length = = 10 ) { node set classification ( integer parse int ( strs [ 9 ] ) ) ; } return node ; }


sets the size of the compressed entry data in bytes

public void set compressed size ( long csize ) { if ( csize < 0 ) { throw new illegal argument exception ( " invalid entry size " ) ; } if ( csize > 0xffffffff l ) { feature set add ( feature zip64 csize ) ; } else { feature set remove ( feature zip64 csize ) ; } this csize = csize ; }


convenient method to run the function with a single int argument

public object run generic ( int parameter ) { return find object ( parameter ) ; }


validate the root of the aggregation tree

public action request validation exception validate ( action request validation exception e ) { pipeline aggregation builder validation context context = pipeline aggregation builder validation context for tree root ( aggregation builders , pipeline aggregator builders , e ) ; validate pipelines ( context ) ; return validate children ( context get validation exception ( ) ) ; }


determine whether this listener actually supports the given source type the default implementation always returns { @ code true }

default boolean supports source type ( @ nullable class < ? > source type ) { return true ; }


displays a dialog containing the checkout information for a version controlled domain file the dialog is only displayed if the repository is connected and a single version controlled domain file is in the list from the domain file provider

private void view checkouts ( list < domain file > domain files ) { if ( ! check repository connected ( ) ) { return ; } if ( domain files size ( ) ! = 1 ) { return ; } try { domain file domain file = domain files get ( 0 ) ; user user = repository ! = null ? repository get user ( ) : null ; item checkout status [ ] checkouts = domain file get checkouts ( ) ; if ( checkouts length = = 0 ) { msg show info ( get class ( ) , tool get tool frame ( ) , " no checkouts exist " , " no checkouts exist for " + domain file get name ( ) ) ; } else { checkouts dialog dialog = new checkouts dialog ( tool , user , domain file , checkouts ) ; tool show dialog ( dialog ) ; } } catch ( i o exception e ) { client util handle exception ( repository , e , " fetch check out status " , tool get tool frame ( ) ) ; } }


rewind to the first entry in the scanner the entry returned by the previous entry ( ) call will be invalid

public void rewind ( ) throws i o exception { seek to ( begin location ) ; }


gets the minimum required register count implied by this instance this is equal to the highest register number referred to plus the widest width ( largest category ) of the type used in that register

public int get registers size ( ) { int sz = size ( ) ; int result = 0 ; for ( int i = 0 ; i < sz ; i + + ) { register spec spec = ( register spec ) get 0 ( i ) ; if ( spec ! = null ) { int min = spec get next reg ( ) ; if ( min > result ) { result = min ; } } } return result ; }


checks if is certificate from trusted issuer based on the regex pattern

private boolean is certificate from trusted issuer ( final x 5 0 9 certificate cert ) { return does name match pattern ( cert get issuer d n ( ) , this reg ex trusted issuer dn pattern ) ; }


test basic single threaded list status scenario

public void test single threaded block blob delete scenario ( ) throws throwable { create empty file ( create test account ( ) , test path ) ; fs delete ( test path , true ) ; boolean delete result = fs delete ( test path , true ) ; assert false ( delete result ) ; }


gets the segment that the view currently writes to

public memory segment get current segment ( ) { return this current segment ; }


gets the s q lite database for custom database access not needed for green d a o entities

public database get database ( ) { return db ; }


a test where the connection fails too often and eventually fails the get request ( job - related blob )

public void test blob for job fetch with too many failures ( ) throws i o exception { final configuration config = new configuration ( ) ; config set string ( blob server options storage directory , temporary folder new folder ( ) get absolute path ( ) ) ; test blob fetch with too many failures ( config , new void blob store ( ) , new job i d ( ) , transient blob ) ; }


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


is default html escaping active ? falls back to { @ code false } in case of no explicit default given

public boolean is default html escape ( ) { return ( this default html escape ! = null & & this default html escape boolean value ( ) ) ; }


< code > re diff sub set < code > re - determines the differences between the two programs for the indicated address set

synchronized void re diff sub set ( address set view sub set , task monitor monitor ) throws cancelled exception { if ( monitor = = null ) { / / create a do nothing task monitor that we can pass along monitor = task monitor adapter dummy monitor ; } monitor check canceled ( ) ; program diff sub diff ; try { sub diff = new program diff ( program 1 , program 2 , sub set ) ; sub diff get differences ( re diff filter , monitor ) ; monitor set message ( " adjusting differences due to apply " ) ; / / adjust any required address sets int [ ] pt = program diff filter get primary types ( ) ; for ( int element : pt ) { integer key = new integer ( element ) ; address set this set = diff addr sets get ( key ) ; if ( this set = = null ) { continue ; / / this is not part of current address sets } address set other set = sub diff diff addr sets get ( key ) ; this set = this set subtract ( sub set ) ; this set add ( other set ) ; diff addr sets put ( key , this set ) ; filter changed = true ; } } catch ( program conflict exception e 1 ) { msg error ( this , " unexpected exception : " + e 1 get message ( ) , e 1 ) ; } catch ( illegal argument exception e 1 ) { msg error ( this , " unexpected exception : " + e 1 get message ( ) , e 1 ) ; } }


returns whether the builder contains a particular starlark option

boolean contains ( label key ) { return starlark options contains key ( key ) ; }


public worker state state ( ) { return state ; }


legitimacy check and setup of local simulated operations the operations can be a string with simple operation or a classname whose { @ link class } implements a particular function

public static void check mock ( class < ? > interface class , abstract interface config config ) { string mock = config get mock ( ) ; if ( config utils is empty ( mock ) ) { return ; } string normalized mock = mock invoker normalize mock ( mock ) ; if ( normalized mock starts with ( return prefix ) ) { normalized mock = normalized mock substring ( return prefix length ( ) ) trim ( ) ; try { / / check whether the mock value is legal , if it is illegal , throw exception mock invoker parse mock value ( normalized mock ) ; } catch ( exception e ) { throw new illegal state exception ( " illegal mock return in < dubbo : service / reference " + " mock = \ " " + mock + " \ " / > " ) ; } } else if ( normalized mock starts with ( throw prefix ) ) { normalized mock = normalized mock substring ( throw prefix length ( ) ) trim ( ) ; if ( config utils is not empty ( normalized mock ) ) { try { / / check whether the mock value is legal mock invoker get throwable ( normalized mock ) ; } catch ( exception e ) { throw new illegal state exception ( " illegal mock throw in < dubbo : service / reference " + " mock = \ " " + mock + " \ " / > " ) ; } } } else { / / check whether the mock class is a implementation of the interface class , and if it has a default constructor mock invoker get mock object ( normalized mock , interface class ) ; } }


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


set the jaxb { @ code unmarshaller } properties these properties will be set on the underlying jaxb { @ code unmarshaller }

public void set unmarshaller properties ( map < string , ? > properties ) { this unmarshaller properties = properties ; }


whether to include the full model definition the full model definition can be very large

public get trained models request set include definition ( boolean include definition ) { if ( include definition ! = null & & include definition ) { return this include definition ( ) ; } return this ; }


return the { @ code data } field of this event , if available

public t data ( ) { return this data ; }


public static principal factory new principal factory ( ) { return new default principal factory ( ) ; }


public static void start activity for result ( @ non null final bundle extras , @ non null final fragment fragment , @ non null final class < ? extends activity > clz , final int request code , final view shared elements ) { start activity for result ( fragment , extras , utils get app ( ) get package name ( ) , clz get name ( ) , request code , get options bundle ( fragment , shared elements ) ) ; }


maps all non - parameter , non - local variable registers

private void handle normal unassociated ( ) { int sz ssa regs = ssa meth get reg count ( ) ; for ( int ssa reg = 0 ; ssa reg < sz ssa regs ; ssa reg + + ) { if ( ssa regs mapped get ( ssa reg ) ) { / / we already did this one continue ; } register spec ssa spec = get definition spec for ssa reg ( ssa reg ) ; if ( ssa spec = = null ) continue ; int category = ssa spec get category ( ) ; / / find a rop reg that does not interfere int rop reg = find next unreserved rop reg ( param range end , category ) ; while ( ! can map reg ( ssa spec , rop reg ) ) { rop reg = find next unreserved rop reg ( rop reg + 1 , category ) ; } add mapping ( ssa spec , rop reg ) ; } }


this emulates a situation in mysql where the row representing a span has the client ' s timestamp

public void parses shared flag from r p c span ( ) { v 1 span v 1 = v 1 span new builder ( ) trace id ( 1l ) parent id ( 2l ) id ( 3l ) name ( " get " ) timestamp ( 10 ) add annotation ( 20 , " sr " , backend ) add annotation ( 30 , " ss " , backend ) build ( ) ; span v 2 = span new builder ( ) trace id ( " 1 " ) parent id ( " 2 " ) id ( " 3 " ) name ( " get " ) kind ( kind server ) shared ( true ) local endpoint ( backend ) timestamp ( 20 ) duration ( 10l ) build ( ) ; assert that ( v 1 span converter convert ( v 1 ) ) contains exactly ( v 2 ) ; }


convert a long integer to a string with traditional binary prefix

public static string long 2 string ( long n , string unit , int decimal places ) { if ( unit = = null ) { unit = " " ; } / / take care a special case if ( n = = long min value ) { return " - 8 " + exa symbol + unit ; } final string builder b = new string builder ( ) ; / / take care negative numbers if ( n < 0 ) { b append ( ' - ' ) ; n = - n ; } if ( n < kilo value ) { / / no prefix b append ( n ) ; return ( unit is empty ( ) ? b : b append ( " " ) append ( unit ) ) to string ( ) ; } else { / / find traditional binary prefix int i = 0 ; for ( ; i < values ( ) length & & n > = values ( ) [ i ] value ; i + + ) ; traditional binary prefix prefix = values ( ) [ i - 1 ] ; if ( ( n & prefix bit mask ) = = 0 ) { / / exact division b append ( n > > prefix bit shift ) ; } else { final string format = " % " + decimal places + " f " ; string s = format ( format , n / ( double ) prefix value ) ; / / check a special rounding up case if ( s starts with ( " 1024 " ) ) { prefix = values ( ) [ i ] ; s = format ( format , n / ( double ) prefix value ) ; } b append ( s ) ; } return b append ( ' ' ) append ( prefix symbol ) append ( unit ) to string ( ) ; } }


implements equals for a map of string arrays the map of string arrays is used in some x pack protocol classes but does ' t work with equal

public static boolean equals ( map < string , string [ ] > a , map < string , string [ ] > b ) { if ( a = = null ) { return b = = null ; } if ( b = = null ) { return false ; } if ( a size ( ) ! = b size ( ) ) { return false ; } for ( map entry < string , string [ ] > entry : a entry set ( ) ) { string [ ] val = entry get value ( ) ; string key = entry get key ( ) ; if ( val = = null ) { if ( b get ( key ) ! = null | | b contains key ( key ) = = false ) { return false ; } } else { if ( arrays equals ( val , b get ( key ) ) = = false ) { return false ; } } } return true ; }


returns whether this integer value and the given unknown integer value are different : < code > never < code > , < code > maybe < code > , or < code > always < code >

public final int not equal ( unknown integer value other ) { return - equal ( other ) ; }


gets the proto representation of the window coder

private runner api coder get window coder proto ( ) { return runner api coder new builder ( ) set spec ( runner api function spec new builder ( ) set urn ( model coders global window coder urn ) build ( ) ) build ( ) ; }


returns the { @ code float } value of a header with the specified name if there is more than one value for the specified name , the first value in insertion order is returned


public void test model return ( ) { / / todo : test model return }


an optional list of parameters if the sql query is parametrized

public list < sql typed param value > params ( ) { return params ; }


compares two byte arrays in lexicographical order the result is positive if { @ code array 1 } is great than { @ code array 2 } , negative if { @ code array 1 } is less than { @ code array 2 } and 0 if { @ code array 1 } is equal to { @ code array 2 } note : currently , this is used in { @ code scalar operator gens } for comparing two fields of binary or varbinary type

public static int byte array compare ( byte [ ] array 1 , byte [ ] array 2 ) { for ( int i = 0 , j = 0 ; i < array 1 length & & j < array 2 length ; i + + , j + + ) { int a = ( array 1 [ i ] & 0xff ) ; int b = ( array 2 [ j ] & 0xff ) ; if ( a ! = b ) { return a - b ; } } return array 1 length - array 2 length ; }


iterates through { @ code metadata entries } and checks each one to see if contains wrapped metadata if it does , then we recursively decode the wrapped metadata if it doesn ' t ( recursion base - case ) , we add the { @ link metadata entry } to { @ code decoded entries } ( output parameter )

private void decode wrapped metadata ( metadata metadata , list < metadata entry > decoded entries ) { for ( int i = 0 ; i < metadata length ( ) ; i + + ) { @ nullable format wrapped metadata format = metadata get ( i ) get wrapped metadata format ( ) ; if ( wrapped metadata format ! = null & & decoder factory supports format ( wrapped metadata format ) ) { metadata decoder wrapped metadata decoder = decoder factory create decoder ( wrapped metadata format ) ; / / wrapped metadata format ! = null so wrapped metadata bytes must be non - null too byte [ ] wrapped metadata bytes = assertions check not null ( metadata get ( i ) get wrapped metadata bytes ( ) ) ; buffer clear ( ) ; buffer ensure space for write ( wrapped metadata bytes length ) ; cast non null ( buffer data ) put ( wrapped metadata bytes ) ; buffer flip ( ) ; @ nullable metadata inner metadata = wrapped metadata decoder decode ( buffer ) ; if ( inner metadata ! = null ) { / / the decoding succeeded , so we ' ll try another level of unwrapping decode wrapped metadata ( inner metadata , decoded entries ) ; } } else { / / entry doesn ' t contain any wrapped metadata , so output it directly decoded entries add ( metadata get ( i ) ) ; } } }


from a string , take a suffix of at most the given length

static string suffix ( string s , int len ) { if ( len < = 0 ) { return " " ; } int start pos = s length ( ) - len ; if ( start pos < = 0 ) { return s ; } return s substring ( start pos ) ; }


returns the result of multiplying this and { @ code val } if the result would have more than 64 bits , returns the low 64 bits of the result

public unsigned long times ( unsigned long val ) { return from long bits ( value * check not null ( val ) value ) ; }


return the view class to be used to create views

protected class < ? > get view class ( ) { return this view class ; }


moves the iterator to the next key this method may skip any values that have not yet been returned by the iterator created by the { @ link # get values ( ) } method hence , if called multiple times it " removes " pairs

public boolean next key ( ) throws i o exception { / / first element ( or empty ) if ( this current = = null ) { if ( this done ) { this values iterator = null ; return false ; } this current = this reuse ; if ( ( this current = this iterator next ( this current ) ) ! = null ) { this comparator set reference ( this current ) ; this look ahead has next = false ; this values iterator = new values iterator ( ) ; this values iterator current is unconsumed = true ; return true ; } else { / / empty input , set everything null this values iterator = null ; this current = null ; this done = true ; return false ; } } this values iterator iterator available = true ; / / whole value - iterator was read and a new key is available if ( this look ahead has next ) { this look ahead has next = false ; this current = this lookahead ; this lookahead = null ; this comparator set reference ( this current ) ; this values iterator current is unconsumed = true ; return true ; } / / try to move to next key / / required if user code / reduce ( ) method did not read the whole value iterator while ( true ) { if ( ! this done & & ( ( this current = this iterator next ( this current ) ) ! = null ) ) { if ( ! this comparator equal to reference ( this current ) ) { / / the keys do not match , so we have a new group store the current keys this comparator set reference ( this current ) ; this look ahead has next = false ; this values iterator current is unconsumed = true ; return true ; } } else { this values iterator = null ; this current = null ; this done = true ; return false ; } } }


acquire the read lock when using get mappings and get mappings by url

public void acquire read lock ( ) { this read write lock read lock ( ) lock ( ) ; }


return the configured { @ link # set default metadata mime type default metadata mime type }

public mime type get default metadata mime type ( ) { return this default metadata mime type ; }


public boolean add file ( final string file name , final local file meta meta ) { files put ( file name , meta ) ; return true ; }


set an extra offset to be appended to the viewport ' s left

public void set extra left offset ( float offset ) { m extra left offset = utils convert dp to pixel ( offset ) ; }


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


adds the contents of this configuration task to the given configuration

public void append to ( configuration configuration ) { / / append all of these configuration entries to the given configuration configuration program jars = extend class path ( configuration program jars , this configuration program jars ) ; configuration library jars = extend class path ( configuration library jars , this configuration library jars ) ; configuration keep = extend class specifications ( configuration keep , this configuration keep ) ; configuration keep directories = extend list ( configuration keep directories , this configuration keep directories ) ; configuration why are you keeping = extend class specifications ( configuration why are you keeping , this configuration why are you keeping ) ; configuration optimizations = extend class specifications ( configuration optimizations , this configuration optimizations ) ; configuration assume no side effects = extend class specifications ( configuration assume no side effects , this configuration assume no side effects ) ; configuration keep package names = extend list ( configuration keep package names , this configuration keep package names ) ; configuration keep attributes = extend list ( configuration keep attributes , this configuration keep attributes ) ; configuration adapt class strings = extend list ( configuration adapt class strings , this configuration adapt class strings ) ; configuration adapt resource file names = extend list ( configuration adapt resource file names , this configuration adapt resource file names ) ; configuration adapt resource file contents = extend list ( configuration adapt resource file contents , this configuration adapt resource file contents ) ; configuration note = extend list ( configuration note , this configuration note ) ; configuration warn = extend list ( configuration warn , this configuration warn ) ; }


this is a whitebox test , to verify a special case of the implementation

public void status from cancelled status unknown should work ( ) { context cancellable context cancellable context = context current ( ) with cancellation ( ) ; exception e = status unknown as exception ( ) ; cancellable context cancel ( e ) ; assert true ( cancellable context is cancelled ( ) ) ; status status = status from cancelled ( cancellable context ) ; assert not null ( status ) ; assert equals ( status code unknown , status get code ( ) ) ; assert same ( e , status get cause ( ) ) ; }


returns whether the codec is known to implement { @ link media codec # set output surface ( surface ) } incorrectly if true is returned then we fall back to releasing and re - instantiating the codec instead

protected boolean codec needs set output surface workaround ( string name ) { if ( name starts with ( " omx google " ) ) { / / google omx decoders are not known to have this issue on any api level return false ; } synchronized ( media codec video renderer class ) { if ( ! evaluated device needs set output surface workaround ) { device needs set output surface workaround = evaluate device needs set output surface workaround ( ) ; evaluated device needs set output surface workaround = true ; } } return device needs set output surface workaround ; }


handle any blocks that have a simple single computable flow with no switch type flow in it by trying to resolving the reference

private boolean handle simple block ( address location , task monitor monitor ) throws cancelled exception { basic block model basic block model = new basic block model ( program ) ; return resolve computable flow ( location , monitor , basic block model ) ; }


static stream < arguments > global session provider ( ) throws i o exception { global session global session = new global session ( " demo - app " , " my test tx group " , " test " , 6000 ) ; global session set active ( true ) ; global session add session lifecycle listener ( new file session manager ( " default " , null ) ) ; return stream of ( arguments of ( global session ) ) ; }


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


create a node stat from the given params

public static stat persisted create stat ( long zxid , long time , long ephemeral owner ) { stat persisted stat = new stat persisted ( ) ; stat set ctime ( time ) ; stat set mtime ( time ) ; stat set czxid ( zxid ) ; stat set mzxid ( zxid ) ; stat set pzxid ( zxid ) ; stat set version ( 0 ) ; stat set aversion ( 0 ) ; stat set ephemeral owner ( ephemeral owner ) ; return stat ; }


create a new instance of { @ link parse state } which is an independent snapshot of this instance

public parse state snapshot ( ) { return new parse state ( this ) ; }


string get id ( download request download request ) ;


determine if the specified { @ code instance } is equal to the specified { @ code candidate }

protected boolean match ( t instance , t candidate ) { return instance equals ( candidate ) ; }


public float get max force ( ) { return jni get max force ( addr ) ; }


order by the category of the models ( needs to be followed by { @ link # asc ( ) } or { @ link # desc ( ) } )

model query order by model category ( ) ;


returns whether the complete pattern sequence has been matched

public boolean is matching ( ) { return matching ; }


notifies the occurrence of another frame of the animation

public void on animation update ( value animator animation ) { expand set rotation ( ( float ) animation get animated value ( ) ) ; }


all vertices that are the source of the expansion

public iterable < fcg vertex > get sources ( ) { return sources ; }


returns the object responsible for negotiating application layer protocols for the tls npnalpn extensions

public abstract application protocol negotiator application protocol negotiator ( ) ;


dumps the given array , interpreting it as a class file

public static void dump ( byte [ ] bytes , print stream out , string file path , args args ) { class dumper cd = new class dumper ( bytes , out , file path , args ) ; cd dump ( ) ; }


deserializes the { @ link rva va debug header } information from a { @ link pdb byte reader }

public void deserialize ( pdb byte reader reader ) throws pdb exception { super deserialize ( reader ) ; relative virtual address data base = reader parse unsigned int val ( ) ; virtual address image base = reader parse unsigned long val ( ) ; unsigned int reserved 1 = reader parse unsigned int val ( ) ; unsigned int reserved 2 = reader parse unsigned int val ( ) ; }


only select jobs which are executable , ie duedate is null or duedate is in the past


wait until the " until " condition returns true or time runs out

public void wait ( string message ) { wait ( message , default timeout , default interval ) ; }


public string name ( ) { return this name ; }


records that the given interface has a companion class that includes the given number of default methods ( 0 if there were only static methods ) this method should not be called for purely abstract interfaces , to allow verifying available companion classes against this this information is useful reference to double - check { @ link # missing implemented interface } s without reading and parsing class files with better precision than just looking for companion classes on the runtime classpath ( which may only contain static methods )

default void record default methods ( string origin , int count ) { }


for this test , the body for this request much reference a schema named & # x 6 0 ; file & # x 6 0 ; < b > 200 < b > - success

public response entity < void > test body with file schema with http info ( file schema test class body ) throws rest client exception { object post body = body ; / / verify the required parameter ' body ' is set if ( body = = null ) { throw new http client error exception ( http status bad request , " missing the required parameter ' body ' when calling test body with file schema " ) ; } string path = api client expand path ( " / fake / body - with - file - schema " , collections < string , object > empty map ( ) ) ; final multi value map < string , string > query params = new linked multi value map < string , string > ( ) ; final http headers header params = new http headers ( ) ; final multi value map < string , string > cookie params = new linked multi value map < string , string > ( ) ; final multi value map < string , object > form params = new linked multi value map < string , object > ( ) ; final string [ ] local var accepts = { } ; final list < media type > local var accept = api client select header accept ( local var accepts ) ; final string [ ] content types = { " application / json " } ; final media type content type = api client select header content type ( content types ) ; string [ ] auth names = new string [ ] { } ; parameterized type reference < void > return type = new parameterized type reference < void > ( ) { } ; return api client invoke a p i ( path , http method put , query params , post body , header params , cookie params , form params , local var accept , content type , auth names , return type ) ; }


return the number of bytes that large input files should be optimally be split into to minimize io time

public long get default block size ( ) { return get conf ( ) get long bytes ( fs s3a block size , default blocksize ) ; }


loads a new { @ link application context context } based on the supplied { @ code locations } , configures the context , and finally returns the context in fully refreshed state configuration locations are generally considered to be classpath resources by default concrete implementations should register annotation configuration processors with bean factories of { @ link application context application contexts } loaded by this context loader beans will therefore automatically be candidates for annotation - based dependency injection using { @ link org springframework beans factory annotation autowired @ autowired } , { @ link javax annotation resource @ resource } , and { @ link javax inject inject @ inject } any application context loaded by a context loader must register a jvm shutdown hook for itself unless the context gets closed early , all context instances will be automatically closed on jvm shutdown this allows for freeing external resources held by beans within the context , e g temporary files

application context load context ( string locations ) throws exception ;


adds an entry to the zip file if this causes the actual number of entries to exceed 0xffffffff , or if the file requires zip 6 4 features , the file is set to zip 6 4 mode

public void add entry ( zip file entry entry ) { entries put ( entry get name ( ) , entry ) ; set num entries ( num entries + 1 ) ; if ( entry get feature set ( ) contains ( feature zip64 size ) | | entry get feature set ( ) contains ( feature zip64 csize ) | | entry get feature set ( ) contains ( feature zip64 offset ) ) { set zip 6 4 ( true ) ; } }


returns a { @ link cipher } object for decrypting with this key

public cipher decrypt ( ) { try { cipher cipher = secret get cipher ( key algorithm ) ; cipher init ( cipher decrypt mode , get key ( ) ) ; return cipher ; } catch ( general security exception e ) { throw new assertion error ( e ) ; } }


private static void setup class ( string class name , color default color , string description ) { try { class < ? > klass = class for name ( class name ) ; classes add ( klass ) ; class to color map put ( klass , default color ) ; simple name to class put ( get simple name ( klass ) , klass ) ; class description put ( klass , description ) ; } catch ( class not found exception cnfe ) { msg debug ( python code completion factory class , " unable to find class : " + class name , cnfe ) ; } }


transfers the specified source array ' s data to this buffer starting at the current { @ code writer index } and increases the { @ code writer index } by the number of the transferred bytes ( = { @ code src length } ) if { @ code this writable bytes } is less than { @ code src length } , { @ link # ensure writable ( int ) } will be called in an attempt to expand capacity to accommodate

public abstract byte buf write bytes ( byte [ ] src ) ;


sets the { @ link glide executor } to use when retrieving { @ link com bumptech glide load engine resource } s that are not already in the cache the thread count defaults to the number of cores available on the device , with a maximum of 4 use the { @ link glide executor # new source executor ( ) } methods if you ' d like to specify options for the source executor

public glide builder set source executor ( @ nullable glide executor service ) { this source executor = service ; return this ; }


public string insn comment string ( dalv insn insn , boolean note indices ) { / / this format has no comment return " " ; }


return the default value of the property return null if you do not want a default value any non - null value will cause { { # default value } check to pass

public string to default value ( schema schema ) { if ( schema get default ( ) ! = null ) { return schema get default ( ) to string ( ) ; } return get property default value ( schema ) ; }


download a cos object and return the input stream associated with it

public input stream retrieve ( string key ) throws i o exception { log debug ( " retrieve object key : [ { } ] " , key ) ; get object request get object request = new get object request ( this bucket name , key ) ; try { c o s object cos object = ( c o s object ) call c o s client with retry ( get object request ) ; return cos object get object content ( ) ; } catch ( exception e ) { string err msg = string format ( " retrieving key : [ % s ] occurs " + " an exception : [ % s ] " , key , e to string ( ) ) ; log error ( " retrieving cos key : [ { } ] occurs an exception : [ { } ] " , key , e ) ; handle exception ( new exception ( err msg ) , key ) ; } / / never will get here return null ; }


tests that the release of the input gate is noticed while polling the channels for available data

public void test release while polling channel ( ) throws exception { final atomic reference < exception > async exception = new atomic reference < > ( ) ; / / setup the input gate with a single channel that does nothing final single input gate input gate = create input gate ( 1 ) ; input channel input channel = input channel builder new builder ( ) build unknown channel ( input gate ) ; input gate set input channels ( input channel ) ; / / start the consumer in a separate thread thread async consumer = new thread ( ) { @ override public void run ( ) { try { input gate get next ( ) ; } catch ( exception e ) { async exception set ( e ) ; } } } ; async consumer start ( ) ; / / wait for blocking queue poll call and release input gate boolean success = false ; for ( int i = 0 ; i < 50 ; i + + ) { if ( async consumer is alive ( ) ) { success = async consumer get state ( ) = = thread state waiting ; } if ( success ) { break ; } else { / / retry thread sleep ( 100 ) ; } } / / verify that async consumer is in blocking request assert true ( " did not trigger blocking buffer request " , success ) ; / / release the input gate input gate close ( ) ; / / wait for thread to finish and verify expected exceptions if the / / input gate status is not properly checked during requests , this / / call will never return async consumer join ( ) ; assert not null ( async exception get ( ) ) ; assert equals ( illegal state exception class , async exception get ( ) get class ( ) ) ; }


get the follow set for a given non - terminal that is the set of all terminals , which through some derivation from the start symbol , can appear immediately after the given non - terminal in a sentential form

public collection < assembly terminal > get follow ( assembly non terminal nt ) { return collections unmodifiable collection ( follow get ( nt ) ) ; }


add the query params from a http servlet request to the target uri passed

public static string append query params ( http servlet request request , string target uri ) { string ret = target uri ; string url encoded query string = get u r l encoded query string ( request , null ) ; if ( url encoded query string ! = null ) { ret + = " ? " + url encoded query string ; } return ret ; }


public dag connection get incoming connection ( ) { return this in conn ; }


parse the given function signature text any exceptions will be handled herein by showing an error dialog ( null is returned in that case )

public static function definition data type parse signature ( service provider service provider , program program , string signature text ) { data type manager service service = service provider get service ( data type manager service class ) ; return parse signature ( service , program , signature text ) ; }


a helper method to find all actions with the given name

public static set < docking action if > get actions by name ( tool tool , string name ) { set < docking action if > result = new hash set < > ( ) ; set < docking action if > tool actions = tool get all actions ( ) ; for ( docking action if action : tool actions ) { if ( action get name ( ) equals ( name ) ) { result add ( action ) ; } } return result ; }


returns the base - 2 logarithm of { @ code x } , rounded according to the specified rounding mode

public static int log 2 ( int x , rounding mode mode ) { check positive ( " x " , x ) ; switch ( mode ) { case unnecessary : check rounding unnecessary ( is power of two ( x ) ) ; / / fall through case down : case floor : return ( integer size - 1 ) - integer number of leading zeros ( x ) ; case up : case ceiling : return integer size - integer number of leading zeros ( x - 1 ) ; case half down : case half up : case half even : / / since sqrt ( 2 ) is irrational , log 2 ( x ) - log floor cannot be exactly 0 5 int leading zeros = integer number of leading zeros ( x ) ; int cmp = max power of sqrt2 unsigned > > > leading zeros ; / / floor ( 2 ^ ( log floor + 0 5 ) ) int log floor = ( integer size - 1 ) - leading zeros ; return log floor + less than branch free ( cmp , x ) ; default : throw new assertion error ( ) ; } }


public static intent get share text image intent ( @ nullable final string content , final array list < uri > uris ) { intent intent = new intent ( intent action send multiple ) ; intent put extra ( intent extra text , content ) ; intent put parcelable array list extra ( intent extra stream , uris ) ; intent set type ( " image / * " ) ; intent = intent create chooser ( intent , " " ) ; return get intent ( intent , true ) ; }


public boolean is service ( object bean , string bean name ) throws framework exception { string bean class name = bean get class ( ) get name ( ) ; return " com alipay sofa runtime spring factory service factory bean " equals ( bean class name ) ; }


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


where the enumflag item was defined < code > optional aapt pb source source = 1 ; < code >

public com android aapt resources source get source ( ) { return source = = null ? com android aapt resources source get default instance ( ) : source ; }


get the code unit from the program location provider

private code unit get code unit ( program program ) { listing listing = program get listing ( ) ; code unit cu = listing get code unit containing ( address ) ; if ( cu = = null ) { return null ; } address cu addr = cu get min address ( ) ; if ( cu instanceof data & & ! address equals ( cu addr ) ) { data data = ( data ) cu ; return data get primitive at ( ( int ) address subtract ( cu addr ) ) ; } return cu ; }


test rename a non - existing snapshot to itself

public void test rename non existing snapshot to itself ( ) throws exception { d f s test util create file ( hdfs , file 1 , blocksize , replication , seed ) ; / / create snapshot for sub 1 snapshot test helper create snapshot ( hdfs , sub 1 , " s 1 " ) ; exception expect ( snapshot exception class ) ; string error = " the snapshot wrong name does not exist for directory " + sub 1 to string ( ) ; exception expect message ( error ) ; hdfs rename snapshot ( sub 1 , " wrong name " , " wrong name " ) ; }


generate a manifest ( and an activator ) assumes that { @ link # update requirements from metadata ( ) } has been called recently

private string generate manifest ( print writer writer , summary summary , path binary manifest ) throws o s gi exception , i o exception { / / no manifest , so create one with bndtools analyzer analyzer = new analyzer ( ) ; analyzer set jar ( new jar ( binary dir to file ( ) ) ) ; / / give bnd the contents analyzer set property ( " bundle - symbolic name " , ghidra source bundle source dir hash ( get source directory ( ) ) ) ; analyzer set property ( " bundle - version " , generated version ) ; if ( ! import package values is empty ( ) ) { / / constrain analyzed imports according to what ' s declared in @ importpackage tags analyzer set property ( " import - package " , import package values stream ( ) collect ( collectors joining ( " , " ) ) + " , * " ) ; } else { analyzer set property ( " import - package " , " * " ) ; } analyzer set property ( " export - package " , " ! * private * , ! * internal * , * " ) ; try { manifest manifest ; try { manifest = analyzer calc manifest ( ) ; } catch ( exception e ) { summary print ( " bad manifest " ) ; throw new o s gi exception ( " failed to calculate manifest by analyzing code " , e ) ; } string activator class name = null ; try { for ( clazz clazz : analyzer get classspace ( ) values ( ) ) { if ( clazz is ( query implements , new instruction ( " org osgi framework bundle activator " ) , analyzer ) ) { system err printf ( " found bundle activator class % s \ n " , clazz ) ; activator class name = clazz to string ( ) ; } } } catch ( exception e ) { summary print ( " failed bnd analysis " ) ; throw new o s gi exception ( " failed to query classes while searching for activator " , e ) ; } attributes manifest attributes = manifest get main attributes ( ) ; if ( activator class name = = null ) { activator class name = generated activator classname ; if ( ! build default activator ( binary dir , activator class name , writer ) ) { summary print ( " failed to build generated activator " ) ; return summary get value ( ) ; } / / since we add the activator after bndtools built the imports , we should add its imports too string imps = manifest attributes get value ( constants import package ) ; if ( imps = = null ) { manifest attributes put value ( constants import package , ghidra bundle activator class get package name ( ) ) ; } else { manifest attributes put value ( constants import package , imps + " , " + ghidra bundle activator class get package name ( ) ) ; } } manifest attributes put value ( constants bundle activator , activator class name ) ; / / write the manifest files create directories ( binary manifest get parent ( ) ) ; try ( output stream out = files new output stream ( binary manifest ) ) { manifest write ( out ) ; } } finally { analyzer close ( ) ; } return summary get value ( ) ; }


determine whether the given field matches


same principle as the { @ link # format ( string , object ) } and { @ link # format ( string , object , object ) } methods except that any number of arguments can be passed in an array

static formatting tuple array format ( final string message pattern , final object [ ] arg array ) { if ( arg array = = null | | arg array length = = 0 ) { return new formatting tuple ( message pattern , null ) ; } int last arr idx = arg array length - 1 ; object last entry = arg array [ last arr idx ] ; throwable throwable = last entry instanceof throwable ? ( throwable ) last entry : null ; if ( message pattern = = null ) { return new formatting tuple ( null , throwable ) ; } int j = message pattern index of ( delim str ) ; if ( j = = - 1 ) { / / this is a simple string return new formatting tuple ( message pattern , throwable ) ; } string builder sbuf = new string builder ( message pattern length ( ) + 50 ) ; int i = 0 ; int l = 0 ; do { boolean not escaped = j = = 0 | | message pattern char at ( j - 1 ) ! = escape char ; if ( not escaped ) { / / normal case sbuf append ( message pattern , i , j ) ; } else { sbuf append ( message pattern , i , j - 1 ) ; / / check that escape char is not is escaped : " abc x : \ \ { } " not escaped = j > = 2 & & message pattern char at ( j - 2 ) = = escape char ; } i = j + 2 ; if ( not escaped ) { deeply append parameter ( sbuf , arg array [ l ] , null ) ; l + + ; if ( l > last arr idx ) { break ; } } else { sbuf append ( delim str ) ; } j = message pattern index of ( delim str , i ) ; } while ( j ! = - 1 ) ; / / append the characters following the last { } pair sbuf append ( message pattern , i , message pattern length ( ) ) ; return new formatting tuple ( sbuf to string ( ) , l < = last arr idx ? throwable : null ) ; }


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


get the name at the given index into this group ' s path

public string get path component ( int index ) { return group names [ index ] ; }


save current image with applied filter to pictures it will be stored on the default picture folder on the phone below the given folder name and file name < br > this method is async and will notify when the image was saved through the listener

public void save to pictures ( final string folder name , final string file name , int width , int height , final on picture saved listener listener ) { new save task ( folder name , file name , width , height , listener ) execute on executor ( async task thread pool executor ) ; }


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


return the byte that { @ code n } stores , or throws an exception if the stored value cannot be converted to a byte that stores the exact same value

public static byte to byte exact ( number n ) { long l = to long exact ( n ) ; if ( l ! = ( byte ) l ) { throw new arithmetic exception ( " byte overflow : " + l ) ; } return ( byte ) l ; }


get the number of selected items in the tree these could be either files or folders

public int get selected item count ( ) { return tree get selection count ( ) ; }


returns the registered metric for the given name , or null if it was never registered

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


< code > map & lt ; string , bytes & gt ; bytes map = 11 ; < code >

public com google protobuf byte string get bytes map or throw ( java lang string key ) { if ( key = = null ) { throw new java lang null pointer exception ( ) ; } java util map < java lang string , com google protobuf byte string > map = internal get bytes map ( ) get map ( ) ; if ( ! map contains key ( key ) ) { throw new java lang illegal argument exception ( ) ; } return map get ( key ) ; }


returns a new { @ code closing future } pipeline step derived from the inputs by applying a { @ code closing future } - returning function to their values the function can use a { @ link deferred closer } to capture objects to be closed when the pipeline is done ( other than those captured by the returned { @ link closing future } ) if this combiner was returned by { @ link # when all succeed ( closing future , closing future ) } and any of the inputs fail , so will the returned step if the function throws a { @ code cancellation exception } , the pipeline will be cancelled if the function throws an { @ code execution exception } , the cause of the thrown { @ code execution exception } will be extracted and used as the failure of the derived step if the function throws any other exception , it will be used as the failure of the derived step if an exception is thrown after the function creates a { @ code closing future } , then none of the closeable objects in that { @ code closing future } will be closed usage guidelines for this method : use this method only when calling an api that returns a { @ link listenable future } or a { @ code closing future } if possible , prefer calling { @ link # call ( combining callable , executor ) } instead , with a function that returns the next value directly call { @ link deferred closer # eventually close ( closeable , executor ) closer eventually close ( ) } for every closeable object this step creates in order to capture it for later closing return a { @ code closing future } to turn a { @ link listenable future } into a { @ code closing future } call { @ link # from ( listenable future ) } the same warnings about doing heavyweight operations within { @ link closing future # transform async ( async closing function , executor ) } apply here

public < u extends object > closing future < u > call async ( final async closing function 2 < v1 , v2 , u > function , executor executor ) { return call async ( new async combining callable < u > ( ) { @ override public closing future < u > call ( deferred closer closer , peeker peeker ) throws exception { return function apply ( closer , peeker get done ( future 1 ) , peeker get done ( future 2 ) ) ; } @ override public string to string ( ) { return function to string ( ) ; } } , executor ) ; }


child class implements this method to realize { @ code array offset ( ) }

abstract int protected array offset ( ) ;


whether { @ code value } matches { @ code regex }

public abstract boolean matches ( string regex , string value ) ;


creates the { @ link org rocksdb column family options } for this pre - defined setting

public abstract column family options create column options ( collection < auto closeable > handles to close ) ;


public static @ non null recipient id from ( @ nullable uuid uuid , @ nullable string e 1 6 4 ) { return from ( uuid , e 1 6 4 , false ) ; }


returns the suffix ( { hash } ) for artifacts generated by cc library on windows

public static string get d l l hash suffix ( rule context rule context , feature configuration feature configuration ) { cpp options cpp options = preconditions check not null ( rule context get configuration ( ) get options ( ) get ( cpp options class ) ) ; if ( cpp options rename d l l & & cpp options dynamic mode ! = dynamic mode off & & feature configuration is enabled ( cpp rule classes targets windows ) / / because the custom def file in ` win def file ` does not contain the suffix of the dll , we / / should not calculate { hash } when ` win def file ` is used & & ( ! rule context is attr defined ( " win def file " , label ) | | rule context get prerequisite artifact ( " win def file " ) = = null ) ) { fingerprint digest = new fingerprint ( ) ; digest add string ( rule context get repository ( ) get name ( ) ) ; digest add path ( rule context get package directory ( ) ) ; return " " + digest hex digest and reset ( ) substring ( 0 , 10 ) ; } return " " ; }


java doesn ' t have multiline string literals , so having to join a bunch of lines is a very common problem so , here ' s a static method that we can static import in such situations

public static string join lines ( string lines ) { return newline joiner join ( lines ) ; }


subclasses that want something else than the database flusher should override this method

protected event flusher create event flusher ( ) { return null ; }


returns the number of processors available to the java virtual machine

public static int get available processors ( ) { return os bean get available processors ( ) ; }


return the content for this part note that for a { @ link form field part } the content may be accessed more easily via { @ link form field part # value ( ) }


initialize the plugin , this will be invoked during nm startup

void initialize ( context context ) throws yarn exception ;


get the repository mapping for this package

immutable map < repository name , repository name > get repository mapping ( ) { return this repository mapping ; }


ignore the differences for the indicated address set

public void ignore ( address set view p 1 address set ) { program diff ignore ( p 1 address set ) ; }


private list < filler function > install fill pattern 01 ( string search pattern ) throws exception { list < filler function > result = new array list < > ( ) ; / / / / 00 filler byte / / int count = 2 ; function f 1 = builder create empty function ( " function 1 " , " 0x 1 0 " , 10 , new void data type ( ) ) ; address set view body = f 1 get body ( ) ; address max = body get max address ( ) ; string actual pattern = " 01 " ; boolean is filler found = search pattern equals ( actual pattern ) ; result add ( new filler function ( f 1 , count , is filler found ) ) ; address filler address = max next ( ) ; set bytes ( filler address , actual pattern , count ) ; return result ; }


public void test purge ( ) throws exception { client base setup test env ( ) ; zoo keeper server zks = new zoo keeper server ( tmp dir , tmp dir , 3000 ) ; sync request processor set snap count ( 100 ) ; final int port = integer parse int ( hostport split ( " : " ) [ 1 ] ) ; server cnxn factory f = server cnxn factory create factory ( port , - 1 ) ; f startup ( zks ) ; assert true ( client base wait for server up ( hostport , connection timeout ) , " waiting for server being up " ) ; zoo keeper zk = client base create z k client ( hostport ) ; try { for ( int i = 0 ; i < 2000 ; i + + ) { zk create ( " / invalidsnap - " + i , new byte [ 0 ] , ids open acl unsafe , create mode persistent ) ; } } finally { zk close ( ) ; } f shutdown ( ) ; zks get txn log factory ( ) close ( ) ; assert true ( client base wait for server down ( hostport , connection timeout ) , " waiting for server to shutdown " ) ; / / now corrupt the snapshot purge txn log purge ( tmp dir , tmp dir , 3 ) ; file txn snap log snaplog = new file txn snap log ( tmp dir , tmp dir ) ; list < file > list logs = snaplog find n valid snapshots ( 4 ) ; int num snaps = 0 ; for ( file ff : list logs ) { if ( ff get name ( ) starts with ( " snapshot " ) ) { num snaps + + ; } } assert true ( ( num snaps = = 3 ) , " exactly 3 snapshots " ) ; snaplog close ( ) ; zks shutdown ( ) ; }


collects all of the directories that need to be monitored for the provided { @ link s s l configuration } instances and ensures that they are being watched for changes

private static void start watching ( environment environment , consumer < s s l configuration > reload consumer , resource watcher service resource watcher service , collection < s s l configuration > ssl configurations ) { map < path , list < s s l configuration > > path to configurations map = new hash map < > ( ) ; for ( s s l configuration ssl configuration : ssl configurations ) { for ( path directory : directories to monitor ( ssl configuration files to monitor ( environment ) ) ) { path to configurations map compute ( directory , ( path , list ) - > { if ( list = = null ) { list = new array list < > ( ) ; } list add ( ssl configuration ) ; return list ; } ) ; } } for ( entry < path , list < s s l configuration > > entry : path to configurations map entry set ( ) ) { change listener change listener = new change listener ( environment , list copy of ( entry get value ( ) ) , reload consumer ) ; file watcher file watcher = new file watcher ( entry get key ( ) ) ; file watcher add listener ( change listener ) ; try { resource watcher service add ( file watcher , frequency high ) ; } catch ( i o exception e ) { logger error ( " failed to start watching directory [ { } ] for ssl configurations [ { } ] " , entry get key ( ) , ssl configurations ) ; } } }


returns the playback position in the stream starting at zero , in microseconds , or { @ link # current position not set } if it is not yet available

long get current position us ( boolean source ended ) ;


set the prefix that a placeholder string starts with the default is { @ value # default placeholder prefix }

public void set placeholder prefix ( string placeholder prefix ) { this placeholder prefix = placeholder prefix ; }


advances through { @ code input } looking for the start of the next ogg page the start of a page is identified by the 4 - byte capture pattern ' ogg s ' returns { @ code true } if a capture pattern was found , with the read and peek positions of { @ code input } at the start of the page , just before the capture pattern otherwise returns { @ code false } , with the read and peek positions of { @ code input } at either { @ code limit } ( if set ) or end - of - input

public boolean skip to next page ( extractor input input , long limit ) throws i o exception { assertions check argument ( input get position ( ) = = input get peek position ( ) ) ; while ( ( limit = = c position unset | | input get position ( ) + capture pattern size < limit ) & & peek safely ( input , scratch get data ( ) , 0 , capture pattern size , / * quiet = * / true ) ) { scratch reset ( / * limit = * / capture pattern size ) ; if ( scratch read unsigned int ( ) = = capture pattern ) { input reset peek position ( ) ; return true ; } / / advance one byte before looking for the capture pattern again input skip fully ( 1 ) ; } / / move the read & peek positions to limit or end - of - input , whichever is closer while ( ( limit = = c position unset | | input get position ( ) < limit ) & & input skip ( 1 ) ! = c result end of input ) { } return false ; }


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

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


returns the hash code for this network the hash code of a network is defined as the hash code of a map from each of its { @ link # edges ( ) edges } to their { @ link # incident nodes ( object ) incident nodes } a reference implementation of this is provided by { @ link abstract network # hash code ( ) }


public synchronized type id item intern ( cst type type ) { if ( type = = null ) { throw new null pointer exception ( " type = = null " ) ; } throw if prepared ( ) ; type type per se = type get class type ( ) ; type id item result = type ids get ( type per se ) ; if ( result = = null ) { result = new type id item ( type ) ; type ids put ( type per se , result ) ; } return result ; }


public void update int ( int column index , int x ) throws s q l exception { }


tests two instances of classes that can be equal and that are not " related " the two classes are not subclasses of each other and do not share a parent aside from object see http : issues apache orgbugzillashow bug cgi ? id = 33069

public void test unrelated classes ( ) { object [ ] x = new object [ ] { new test a can equal b ( 1 ) } ; object [ ] y = new object [ ] { new test b can equal a ( 1 ) } ; / / sanity checks : assert true ( arrays equals ( x , x ) ) ; assert true ( arrays equals ( y , y ) ) ; assert true ( arrays equals ( x , y ) ) ; assert true ( arrays equals ( y , x ) ) ; / / real tests : assert true ( x [ 0 ] equals ( x [ 0 ] ) ) ; assert true ( y [ 0 ] equals ( y [ 0 ] ) ) ; assert true ( x [ 0 ] equals ( y [ 0 ] ) ) ; assert true ( y [ 0 ] equals ( x [ 0 ] ) ) ; assert true ( new equals builder ( ) append ( x , x ) is equals ( ) ) ; assert true ( new equals builder ( ) append ( y , y ) is equals ( ) ) ; assert true ( new equals builder ( ) append ( x , y ) is equals ( ) ) ; assert true ( new equals builder ( ) append ( y , x ) is equals ( ) ) ; }


logs information about the environment , like code revision , current user , java version , and jvm parameters

public static void log environment info ( logger log , string component name , string [ ] command line args ) { if ( log is info enabled ( ) ) { revision information rev = get revision information ( ) ; string version = get version ( ) ; string scala version = get scala version ( ) ; string jvm version = get jvm version ( ) ; string [ ] options = get jvm startup options array ( ) ; string java home = system getenv ( " java home " ) ; string inherited logs = system getenv ( " flink inherited logs " ) ; long max heap megabytes = get max jvm heap memory ( ) > > > 20 ; if ( inherited logs ! = null ) { log info ( " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " ) ; log info ( " preconfiguration : " ) ; log info ( inherited logs ) ; } log info ( " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " ) ; log info ( " starting " + component name + " ( version : " + version + " , scala : " + scala version + " , " + " rev : " + rev commit id + " , " + " date : " + rev commit date + " ) " ) ; log info ( " os current user : " + system get property ( " user name " ) ) ; log info ( " current hadoop / kerberos user : " + get hadoop user ( ) ) ; log info ( " jvm : " + jvm version ) ; log info ( " maximum heap size : " + max heap megabytes + " mi bytes " ) ; log info ( " java home : " + ( java home = = null ? " ( not set ) " : java home ) ) ; string hadoop version string = get hadoop version string ( ) ; if ( hadoop version string ! = null ) { log info ( " hadoop version : " + hadoop version string ) ; } else { log info ( " no hadoop dependency available " ) ; } if ( options length = = 0 ) { log info ( " jvm options : ( none ) " ) ; } else { log info ( " jvm options : " ) ; for ( string s : options ) { log info ( " " + s ) ; } } if ( command line args = = null | | command line args length = = 0 ) { log info ( " program arguments : ( none ) " ) ; } else { log info ( " program arguments : " ) ; for ( string s : command line args ) { if ( global configuration is sensitive ( s ) ) { log info ( " " + global configuration hidden content + " ( sensitive information ) " ) ; } else { log info ( " " + s ) ; } } } log info ( " classpath : " + system get property ( " java class path " ) ) ; log info ( " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " ) ; } }


public void map map of string test ( ) { / / todo : test map map of string }


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


returns the number of temporarily marked as ignored unassigned primaries

public int get num ignored primaries ( ) { return ignored primaries ; }


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


writes a portion of a { @ code byte [ ] } to this instance

public void write ( byte [ ] bytes , int offset , int length ) ;


get the delegation token binding for this test suite

protected string get delegation binding ( ) { return delegation token session binding ; }


moves this file to the specified file , overwriting the file if it already exists @ throw runtime exception if the source or destination file handle is a { @ link file type # classpath } or file type # internal file

public void move to ( file descriptor dest ) { if ( type = = file type classpath ) throw new runtime exception ( " cannot move a classpath file : " + file ) ; copy to ( dest ) ; delete ( ) ; }


returns the highlight object ( contains x - index and data set index ) of the selected value at the given touch point inside the bar chart

public highlight get highlight by touch point ( float x , float y ) { if ( m data = = null ) { if ( m log enabled ) log e ( log tag , " can ' t select by touch no data set " ) ; return null ; } else return get highlighter ( ) get highlight ( y , x ) ; / / switch x and y }


returns the value for the specified key , or the default value if the key is not in the map

public float get ( k key , float default value ) { int i = locate key ( key ) ; return i < 0 ? default value : value table [ i ] ; }


verifies content of the response when domain is not specified

public void test empty domain ( ) { socks 5 command response socks 5 cmd response = new default socks 5 command response ( socks 5 command status success , socks 5 address type domain ) ; assert null ( socks 5 cmd response bnd addr ( ) ) ; assert equals ( 0 , socks 5 cmd response bnd port ( ) ) ; byte buf buffer = socks 5 common test utils encode server ( socks 5 cmd response ) ; byte [ ] expected = { 0x 0 5 , / / version 0x 0 0 , / / success reply 0x 0 0 , / / reserved 0x 0 3 , / / address type domain 0x 0 0 , / / length of domain 0x 0 0 , / / port value 0x 0 0 } ; assert byte buf equals ( expected , buffer ) ; buffer release ( ) ; }


prepare for the cross - process propagation inject the { @ link # data } into { @ link context carrier # get correlation context ( ) }

void inject ( context carrier carrier ) { carrier get correlation context ( ) data put all ( this data ) ; }


public data type get void type ( ) { return base data type void ; }


public string get type ( ) { return type ; }


important enough to avoid multiple definitions that we do very early , right after ast construction also check for undefined rules in parserlexer to avoid exceptions later return true if we find multiple definitions of the same rule or a reference to an undefined rule or parser rule ref in lexer rule

public boolean check for rule issues ( final grammar g ) { / / check for redefined rules grammar a s t rules = ( grammar a s t ) g ast get first child with type ( a n t l r parser rules ) ; list < grammar a s t > rules = new array list < grammar a s t > ( rules get all children with type ( a n t l r parser rule ) ) ; for ( grammar a s t mode : g ast get all children with type ( a n t l r parser mode ) ) { rules add all ( mode get all children with type ( a n t l r parser rule ) ) ; } boolean redefinition = false ; final map < string , rule a s t > rule to a s t = new hash map < string , rule a s t > ( ) ; for ( grammar a s t r : rules ) { rule a s t rule a s t = ( rule a s t ) r ; grammar a s t id = ( grammar a s t ) rule a s t get child ( 0 ) ; string rule name = id get text ( ) ; rule a s t prev = rule to a s t get ( rule name ) ; if ( prev ! = null ) { grammar a s t prev child = ( grammar a s t ) prev get child ( 0 ) ; g tool err mgr grammar error ( error type rule redefinition , g file name , id get token ( ) , rule name , prev child get token ( ) get line ( ) ) ; redefinition = true ; continue ; } rule to a s t put ( rule name , rule a s t ) ; } / / check for undefined rules class undef checker extends grammar tree visitor { public boolean badref = false ; @ override public void token ref ( terminal a s t ref ) { if ( " eof " equals ( ref get text ( ) ) ) { / / this is a special predefined reference return ; } if ( g is lexer ( ) ) rule ref ( ref , null ) ; } @ override public void rule ref ( grammar a s t ref , action a s t arg ) { rule a s t rule a s t = rule to a s t get ( ref get text ( ) ) ; string file name = ref get token ( ) get input stream ( ) get source name ( ) ; if ( character is upper case ( current rule name char at ( 0 ) ) & & character is lower case ( ref get text ( ) char at ( 0 ) ) ) { badref = true ; err mgr grammar error ( error type parser rule ref in lexer rule , file name , ref get token ( ) , ref get text ( ) , current rule name ) ; } else if ( rule a s t = = null ) { badref = true ; err mgr grammar error ( error type undefined rule ref , file name , ref token , ref get text ( ) ) ; } } @ override public error manager get error manager ( ) { return err mgr ; } } undef checker chk = new undef checker ( ) ; chk visit grammar ( g ast ) ; return redefinition | | chk badref ; }


returns true if this symbol defines an object

public boolean is object ( ) { return get type ( ) = = stt object ; }


public void execute ( ) throws api exception { this execute with http info ( ) get data ( ) ; }


create an { @ link f s data output stream } at the indicated path with write - progress reporting the frequency of callbacks is implementation - specific ; it may be " none "

public f s data output stream create ( path f , boolean overwrite , int buffer size , progressable progress ) throws i o exception { return create ( f , overwrite , buffer size , get default replication ( f ) , get default block size ( f ) , progress ) ; }


returns the actions contributed from { @ link # get facets ( ) }

public @ non null list < action > get actions ( ) { list < action > r = new array list < > ( ) ; for ( fingerprint facet ff : get facets ( ) ) ff create actions ( r ) ; return collections unmodifiable list ( r ) ; }


private remote file changed exception expect read failure ( final f s data input stream instream ) throws exception { return intercept ( remote file changed exception class , " " , " read ( ) returned " , ( ) - > read to text ( instream read ( ) ) ) ; }


evicts entries from the window space into the main space while the window size exceeds a maximum

int evict from window ( ) { int candidates = 0 ; node < k , v > node = access order window deque ( ) peek ( ) ; while ( window weighted size ( ) > window maximum ( ) ) { / / the pending operations will adjust the size to reflect the correct weight if ( node = = null ) { break ; } node < k , v > next = node get next in access order ( ) ; if ( node get policy weight ( ) ! = 0 ) { node make main probation ( ) ; access order window deque ( ) remove ( node ) ; access order probation deque ( ) add ( node ) ; candidates + + ; set window weighted size ( window weighted size ( ) - node get policy weight ( ) ) ; } node = next ; } return candidates ; }


create the common - delimited { @ link string } by one or more { @ link string } members

public static string to comma delimited string ( string one , string others ) { string another = array to delimited string ( others , comma separator ) ; return is empty ( another ) ? one : one + comma separator + another ; }


sets a capability for every single alternative when the session is created these capabilities are only set once the session is created , so this will be set on capabilities added via { @ link # add alternative ( capabilities ) } or { @ link # one of ( capabilities , capabilities ) } even after this method call

public remote web driver builder set capability ( string capability name , string value ) { if ( ! ok keys test ( capability name ) ) { throw new illegal argument exception ( " capability is not valid " ) ; } if ( value = = null ) { throw new illegal argument exception ( " null values are not allowed " ) ; } additional capabilities put ( capability name , value ) ; return this ; }


returns a { @ link starlark thread print handler } that sends { @ link event kind # debug } events to the provided { @ link event handler }

public static starlark thread print handler make debug print handler ( event handler h ) { return ( thread , msg ) - > h handle ( event debug ( thread get caller location ( ) , msg ) ) ; }


retrieve reports in a structure for generating json , limiting the output to the top num nodes nodes i e nodes with the most reports

private collection < report for json > get json reports ( int num nodes ) { if ( all reports is empty ( ) ) { return collections empty list ( ) ; } final priority queue < report for json > top n reports = new priority queue < > ( all reports size ( ) , new comparator < report for json > ( ) { @ override public int compare ( report for json o 1 , report for json o 2 ) { return ints compare ( o 1 reporting nodes size ( ) , o 2 reporting nodes size ( ) ) ; } } ) ; final long now = timer monotonic now ( ) ; for ( map entry < string , concurrent map < string , long > > entry : all reports entry set ( ) ) { sorted set < string > valid reports = filter node reports ( entry get value ( ) , now ) ; if ( ! valid reports is empty ( ) ) { if ( top n reports size ( ) < num nodes ) { top n reports add ( new report for json ( entry get key ( ) , valid reports ) ) ; } else if ( top n reports peek ( ) get reporting nodes ( ) size ( ) < valid reports size ( ) ) { / / remove the lowest element top n reports poll ( ) ; top n reports add ( new report for json ( entry get key ( ) , valid reports ) ) ; } } } return top n reports ; }


enable or disable the recommendation check for schemas containing type definitions , specifically for changes between open a p i 3 0 x and 3 1 for more details , see { @ link rule configuration # is enable schema type recommendation ( ) }

public void set enable schema type recommendation ( boolean enable schema type recommendation ) { this enable schema type recommendation = enable schema type recommendation ; }


called on failure if a post action failed


public void set component ( component component ) { if ( m component tree = = null ) { set component tree ( component tree create ( get component context ( ) , component ) build ( ) ) ; } else { m component tree set root ( component ) ; } }


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


specify the ssl configuration to load this api provides an alternative to key storekey passwordtrust store

public builder set s s l conf ( configuration ssl cnf ) { this ssl conf = ssl cnf ; return this ; }


return the string expression for this pointcut


returns a list of all the fid files know to the application

public list < fid file > get fid files ( ) { load fid files ( ) ; list < fid file > files = new array list < > ( fid files ) ; collections sort ( files ) ; return files ; }


create a new deadline that is offset from { @ code this } if the given offset is extraordinarily long , say 100 years , the actual deadline created might saturate

public deadline offset ( long offset , time unit units ) { / / may already be expired if ( offset = = 0 ) { return this ; } return new deadline ( ticker , deadline nanos , units to nanos ( offset ) , is expired ( ) ) ; }


return the given millis - since - epoch formatted with this format

default string format millis ( long millis ) { zone id zone = zone ( ) ! = null ? zone ( ) : zone offset utc ; return format ( instant of epoch milli ( millis ) at zone ( zone ) ) ; }


public rpc context set remote address ( inet socket address address ) { this remote address = address ; return this ; }


returns the function represented by the given token this will be either the decompiled function or a function referenced within the decompiled function

public static function get function ( program program , clang func name token token ) { clang node parent = token parent ( ) ; if ( parent instanceof clang func proto ) { / / decompiled function clang function clang function = parent get clang function ( ) ; if ( clang function ! = null ) { return clang function get high function ( ) get function ( ) ; } } if ( parent instanceof clang statement ) { / / sub - function call pcode op pcode op = token get pcode op ( ) ; if ( pcode op ! = null & & pcode op get opcode ( ) = = pcode op call ) { address function addr = pcode op get input ( 0 ) get address ( ) ; return program get function manager ( ) get referenced function ( function addr ) ; } } return null ; / / unhandled case }


test that normal test failures are not blocked

public void test failure ( ) { assert fail ( ) ; }


write an given object to the given output message

void write ( t t , @ nullable media type content type , http output message output message ) throws i o exception , http message not writable exception ;


eventually sets the element at position { @ code i } to the given value

public final void lazy set ( int i , double new value ) { long next = double to raw long bits ( new value ) ; longs lazy set ( i , next ) ; }


return true if this triangle object is equal to o

public boolean equals ( object o ) { return super equals ( o ) & & objects equals ( this additional properties , ( ( triangle ) o ) additional properties ) ; }


returns the port instance ' s task manager expects to receive transfer envelopes on

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


public string repository ( ) { return this repository ; }


load the cache from the state store called by the cache update service when the data has been reloaded

boolean load cache ( boolean force ) throws i o exception ;


peeks at the next byte without incrementing the current index

public byte peek next byte ( ) throws i o exception { return read byte ( current index ) ; }


iterate over the records in ascending sorted order sorting occurs on the primary key value starting at the specified start key

public record iterator iterator ( long min key , long max key , long start key ) throws i o exception { synchronized ( db ) { if ( ! schema use long key nodes ( ) ) { throw new illegal argument exception ( " field key required " ) ; } return new long key record iterator ( min key , max key , start key ) ; } }


adds a new section using the specified memory block the memory block is used to setting the address and size as well as , setting the data

public elf section header add section ( memory block block , int sh name ) throws memory access exception { elf section header new section = new elf section header ( this , block , sh name , get image base ( ) ) ; add section ( new section ) ; return new section ; }


append tokens from list of files in local filesystem , saving to last file

public static void append token files ( array list < file > token files , string file format , configuration conf ) throws i o exception { credentials new creds = new credentials ( ) ; file last token file = null ; for ( file token file : token files ) { last token file = token file ; credentials creds = credentials read token storage file ( token file , conf ) ; for ( token < ? > token : creds get all tokens ( ) ) { new creds add token ( token get service ( ) , token ) ; } } do formatted write ( last token file , file format , new creds , conf ) ; }


return an array containing hostnames , offset and size of portions of the given file for a nonexistent file or regions , null will be returned this call is most helpful with dfs , where it returns hostnames of machines that contain the given file the file system will simply return an elt containing ' localhost '

public block location [ ] get file block locations ( file status file , long start , long len ) throws i o exception { / / argument checks if ( file = = null ) { return null ; } if ( start < 0 | | len < 0 ) { throw new illegal argument exception ( " negative start or len parameter " + " to get file block locations " ) ; } if ( file get len ( ) < = start ) { return new block location [ 0 ] ; } / / check if requested file in swift is more than 5 gb in this case / / each block has its own location - which may be determinable / / from the swift client api , depending on the remote server final file status [ ] list of file blocks = store list sub paths ( file get path ( ) , false , true ) ; list < uri > locations = new array list < uri > ( ) ; if ( list of file blocks length > 1 ) { for ( file status file status : list of file blocks ) { if ( swift object path from path ( uri , file status get path ( ) ) equals ( swift object path from path ( uri , file get path ( ) ) ) ) { continue ; } locations add all ( store get object location ( file status get path ( ) ) ) ; } } else { locations = store get object location ( file get path ( ) ) ; } if ( locations is empty ( ) ) { log debug ( " no locations returned for " + file get path ( ) ) ; / / no locations were returned for the object / / fall back to the superclass string [ ] name = { swift protocol constants block location } ; string [ ] host = { " localhost " } ; string [ ] topology = { swift protocol constants topology path } ; return new block location [ ] { new block location ( name , host , topology , 0 , file get len ( ) ) } ; } final string [ ] names = new string [ locations size ( ) ] ; final string [ ] hosts = new string [ locations size ( ) ] ; int i = 0 ; for ( uri location : locations ) { hosts [ i ] = location get host ( ) ; names [ i ] = location get authority ( ) ; i + + ; } return new block location [ ] { new block location ( names , hosts , 0 , file get len ( ) ) } ; }


exit a parse tree produced by the { @ code table name } labeled alternative in { @ link sql base parser # relation primary }

void exit table name ( sql base parser table name context ctx ) ;


tests that pending slot requests are rejected if a slot report with a different allocation is received

public void test slot report while active slot request ( ) throws exception { final resource manager id resource manager id = resource manager id generate ( ) ; final resource actions resource manager actions = new testing resource actions builder ( ) build ( ) ; final job i d job id = new job i d ( ) ; final allocation i d allocation id = new allocation i d ( ) ; final resource profile resource profile = resource profile from resources ( 42 0 , 1337 ) ; final slot request slot request = new slot request ( job id , allocation id , resource profile , " foobar " ) ; final completable future < acknowledge > slot request future 1 = new completable future < > ( ) ; final iterator < completable future < acknowledge > > slot request future iterator = arrays as list ( slot request future 1 , completable future completed future ( acknowledge get ( ) ) ) iterator ( ) ; final array blocking queue < slot i d > slot ids = new array blocking queue < > ( 2 ) ; final testing task executor gateway task executor gateway = new testing task executor gateway builder ( ) set request slot function ( function utils unchecked function ( request slot parameters - > { slot ids put ( request slot parameters f 0 ) ; return slot request future iterator next ( ) ; } ) ) create testing task executor gateway ( ) ; final resource i d resource id = resource i d generate ( ) ; final task executor connection task manager connection = new task executor connection ( resource id , task executor gateway ) ; final slot i d slot id 1 = new slot i d ( resource id , 0 ) ; final slot i d slot id 2 = new slot i d ( resource id , 1 ) ; final slot status slot status 1 = new slot status ( slot id 1 , resource profile ) ; final slot status slot status 2 = new slot status ( slot id 2 , resource profile ) ; final slot report slot report = new slot report ( arrays as list ( slot status 1 , slot status 2 ) ) ; final scheduled executor main thread executor = testing utils default scheduled executor ( ) ; final slot manager impl slot manager = create slot manager builder ( ) set scheduled executor ( main thread executor ) build ( ) ; try { slot manager start ( resource manager id , main thread executor , resource manager actions ) ; completable future < void > registration future = completable future supply async ( ( ) - > { slot manager register task manager ( task manager connection , slot report , resource profile any , resource profile any ) ; return null ; } , main thread executor ) then accept ( ( object value ) - > { try { slot manager register slot request ( slot request ) ; } catch ( resource manager exception e ) { throw new runtime exception ( " could not register slots " , e ) ; } } ) ; / / check that no exception has been thrown registration future get ( ) ; final slot i d requested slot id = slot ids take ( ) ; final slot i d free slot id = requested slot id equals ( slot id 1 ) ? slot id 2 : slot id 1 ; final slot status new slot status 1 = new slot status ( requested slot id , resource profile , new job i d ( ) , new allocation i d ( ) ) ; final slot status new slot status 2 = new slot status ( free slot id , resource profile ) ; final slot report new slot report = new slot report ( arrays as list ( new slot status 1 , new slot status 2 ) ) ; completable future < boolean > report slot status future = completable future supply async ( / / this should update the slot with the pending slot request triggering / / the reassignment of it ( ) - > slot manager report slot status ( task manager connection get instance i d ( ) , new slot report ) , main thread executor ) ; assert true ( report slot status future get ( ) ) ; final slot i d requested slot id 2 = slot ids take ( ) ; assert equals ( free slot id , requested slot id 2 ) ; } finally { completable future run async ( throwing runnable unchecked ( slot manager : : close ) , main thread executor ) ; } }


template method that allows for manipulating the { @ link image write param } before it is used to write an image the default implementation is empty

protected void process ( image write param iwp ) { }


version of { @ link # get dynamic library symlink } for the special case of c + + runtime libraries these are handled differently than other libraries : neither their names nor directories are mangled , i e libstdc + + so 6 is symlinked from solib [ arch ] libstdc + + so 6

public static artifact get cpp runtime symlink ( rule context rule context , artifact library , string toolchain provided solib dir , string solib dir override ) { path fragment solib dir = path fragment create ( solib dir override ! = null ? solib dir override : toolchain provided solib dir ) ; path fragment symlink name = solib dir get relative ( library get root relative path ( ) get base name ( ) ) ; return get dynamic library symlink internal ( / * action registry = * / rule context , / * action construction context = * / rule context , library , symlink name ) ; }


sets whether the previous button is shown

public void set show previous button ( boolean show previous button ) { this show previous button = show previous button ; update navigation ( ) ; }


test if mock policy works fine : fail - mock

public void test mock invoker from override invoke fock default ( ) { url url = url value of ( " remote : / / 1 2 3 4 / " + i hello service class get name ( ) ) add parameter ( " mock " , " fail : return x " ) add parameter ( refer key , url encode ( path key + " = " + i hello service class get name ( ) ) ) add parameter ( " invoke return error " , " true " ) ; invoker < i hello service > cluster = get cluster invoker ( url ) ; / / configured with mock rpc invocation invocation = new rpc invocation ( ) ; invocation set method name ( " get something " ) ; result ret = cluster invoke ( invocation ) ; assertions assert equals ( " x " , ret get value ( ) ) ; / / if no mock was configured , return null directly invocation = new rpc invocation ( ) ; invocation set method name ( " get something 2 " ) ; ret = cluster invoke ( invocation ) ; assertions assert equals ( " x " , ret get value ( ) ) ; / / if no mock was configured , return null directly invocation = new rpc invocation ( ) ; invocation set method name ( " say hello " ) ; ret = cluster invoke ( invocation ) ; assertions assert equals ( " x " , ret get value ( ) ) ; }


this is the lto indexing step , rather than the real link when using this , build ( ) will store all lto artifacts as a side - effect so the next build ( ) call can emit the real link do not call add input ( ) between the two build ( ) calls

public cpp link action builder set lto indexing ( boolean lto indexing ) { this is lto indexing = lto indexing ; return this ; }


create a new savepoint you can roll back to a specific savepoint via { @ code rollback to savepoint } , and explicitly release a savepoint that you don ' t need anymore via { @ code release savepoint } note that most transaction managers will automatically release savepoints at transaction completion

object create savepoint ( ) throws transaction exception ;


public span utils set bullet ( @ color int final int color , @ int range ( from = 0 ) final int radius , @ int range ( from = 0 ) final int gap width ) { this bullet color = color ; this bullet radius = radius ; this bullet gap width = gap width ; return this ; }


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


public void close ( ) { closed = true ; check state ( payload ! = null , " lack of request message get request is only supported for unary requests " ) ; abstract client stream sink ( ) write headers ( headers , payload ) ; payload = null ; headers = null ; }


public a w s credential provider list get credential providers ( ) throws i o exception { return credential providers or else throw ( ( ) - > new delegation token i o exception ( " not yet bonded " ) ) ; }


public boolean raycast ( ray cast output output , ray cast input input , int child index ) { return m shape raycast ( output , input , m body m xf , child index ) ; }


public boolean is private ( ) { return false ; }


signals to the sink that the next buffer may be discontinuous with the previous buffer