returns a run - time setting from diskbalancer like bandwidth

public disk balancer setting response proto get disk balancer setting ( rpc controller controller , disk balancer setting request proto request ) throws service exception { try { string val = impl get disk balancer setting ( request get key ( ) ) ; return disk balancer setting response proto new builder ( ) set value ( val ) build ( ) ; } catch ( exception e ) { throw new service exception ( e ) ; } }


human - readable description of this node

public abstract string get node description ( ) ;


atomically clones an existing retention lease to a new id

retention lease clone retention lease ( string source lease id , string target lease id , action listener < replication response > listener ) { objects require non null ( listener ) ; final retention lease retention lease ; final retention leases current retention leases ; synchronized ( this ) { assert primary mode ; if ( get retention leases ( ) contains ( source lease id ) = = false ) { throw new retention lease not found exception ( source lease id ) ; } final retention lease source lease = get retention leases ( ) get ( source lease id ) ; retention lease = inner add retention lease ( target lease id , source lease retaining sequence number ( ) , source lease source ( ) ) ; current retention leases = retention leases ; } / / syncing here may not be strictly necessary , because this new lease isn ' t retaining any extra history that wasn ' t previously / / retained by the source lease ; however we prefer to sync anyway since we expect to do so whenever creating a new lease on sync retention leases accept ( current retention leases , listener ) ; return retention lease ; }


one request followed by one response response has cache control headers set such that a caching http proxy ( such as gfe ) can satisfy subsequent requests

public void cacheable unary call ( io grpc testing integration messages simple request request , io grpc stub stream observer < io grpc testing integration messages simple response > response observer ) { io grpc stub server calls async unimplemented unary call ( get cacheable unary call method ( ) , response observer ) ; }


returns true if this is a string constraint or a type converting constraint where the type is converted to a string constraint ( i e uses a string editor )

private static boolean is string based constraint ( column constraint < ? > constraint ) { if ( constraint instanceof mapped column constraint ) { constraint = ( ( mapped column constraint < ? , ? > ) constraint ) get delegate ( ) ; return is string based constraint ( constraint ) ; } return constraint get column type ( ) equals ( string class ) ; }


evaluate the json path expression against the supplied { @ code content } and assert that a value , possibly { @ code null } , exists if the json path expression is not { @ linkplain json path # is definite ( ) definite } , this method asserts that the list of values at the given path is not empty

public void has json path ( string content ) { object value = evaluate json path ( content ) ; if ( path is indefinite ( ) & & value instanceof list ) { string message = " no values for json path \ " " + this expression + " \ " " ; assertion errors assert true ( message , ! ( ( list < ? > ) value ) is empty ( ) ) ; } }


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


creates a configuration to operate in { @ link high availability mode # zookeeper }

public static configuration create zoo keeper h a config ( string zoo keeper quorum , string fs state handle path ) { return configure zoo keeper h a ( new configuration ( ) , zoo keeper quorum , fs state handle path ) ; }


lookup high variable based upon its symbol - id

public high symbol get symbol ( long id ) { return symbol map get ( id ) ; }


serialize the given query builder and asserts that both are equal

protected query builder assert serialization ( query builder test query , version version ) throws i o exception { try ( bytes stream output output = new bytes stream output ( ) ) { output set version ( version ) ; output write named writeable ( test query ) ; try ( stream input in = new named writeable aware stream input ( output bytes ( ) stream input ( ) , named writeable registry ( ) ) ) { in set version ( version ) ; query builder deserialized query = in read named writeable ( query builder class ) ; assert equals ( test query , deserialized query ) ; assert equals ( test query hash code ( ) , deserialized query hash code ( ) ) ; assert not same ( test query , deserialized query ) ; return deserialized query ; } } }


converts { @ link big decimal } to { @ link slice } representing it for long { @ link decimal type } it is caller responsibility to ensure that { @ code value scale ( ) } equals to { @ link decimal type # get scale ( ) }

public static slice encode scaled value ( big decimal value ) { return encode unscaled value ( value unscaled value ( ) ) ; }


gets the indicated element it is an error to call this with the index for an element which was never set ; if you do that , this will throw { @ code null pointer exception } this method is protected so that subclasses may offer a safe type - checked public interface to their clients

protected final object get 0 ( int n ) { try { object result = arr [ n ] ; if ( result = = null ) { throw new null pointer exception ( " unset : " + n ) ; } return result ; } catch ( array index out of bounds exception ex ) { / / translate the exception return throw index ( n ) ; } }


auth info for the cnxn , returns an unmodifyable list

public list < id > get auth info ( ) { return collections unmodifiable list ( new array list < > ( auth info ) ) ; }


finds or creates a methodref constant constant pool entry with the given class name , method name , and descriptor

public int add methodref constant ( string class name , string name , string descriptor , clazz referenced class , member referenced member ) { return add methodref constant ( class name , add name and type constant ( name , descriptor ) , referenced class , referenced member ) ; }


public static boolean in saga branch ( ) { return branch type saga = = get branch type ( ) ; }


private void reset ( ) { ip list = ip list reload ( ) ; update cache expiry time ( ) ; }


returns true if ' options remote cache ' uses ' grpc ' or an empty scheme

public static boolean is remote cache options ( remote options options ) { if ( is null or empty ( options remote cache ) ) { return false ; } / / todo ( ishikhman ) : add proper uri validation / parsing for remote options return ! ( ascii to lower case ( options remote cache ) starts with ( " http : / / " ) | | ascii to lower case ( options remote cache ) starts with ( " https : / / " ) ) ; }


private static void decode hanzi segment ( bit source bits , string builder result , int count ) throws format exception { / / don ' t crash trying to read more bits than we have available if ( count * 13 > bits available ( ) ) { throw format exception get format instance ( ) ; } / / each character will require 2 bytes read the characters as 2 - byte pairs / / and decode as gb2312 afterwards byte [ ] buffer = new byte [ 2 * count ] ; int offset = 0 ; while ( count > 0 ) { / / each 13 bits encodes a 2 - byte character int two bytes = bits read bits ( 13 ) ; int assembled two bytes = ( ( two bytes / 0x 0 6 0 ) < < 8 ) | ( two bytes % 0x 0 6 0 ) ; if ( assembled two bytes < 0x 0 0 a 0 0 ) { / / in the 0x a 1 a 1 to 0x a a f e range assembled two bytes + = 0x 0 a 1 a 1 ; } else { / / in the 0x b 0 a 1 to 0x f a f e range assembled two bytes + = 0x 0 a 6 a 1 ; } buffer [ offset ] = ( byte ) ( ( assembled two bytes > > 8 ) & 0x f f ) ; buffer [ offset + 1 ] = ( byte ) ( assembled two bytes & 0x f f ) ; offset + = 2 ; count - - ; } result append ( new string ( buffer , string utils gb2312 charset ) ) ; }


{ @ inherit doc } the default { @ link base future } implementation throws { @ code interrupted exception } if the current thread is interrupted before or during the call , even if the value is already available

public v get ( ) throws interrupted exception , execution exception { assert blocking allowed ( ) ; return sync get ( ) ; }


return the first error message for the field or object , if any

public string get error message ( ) { string [ ] error messages = init error messages ( ) ; return ( error messages length > 0 ? error messages [ 0 ] : " " ) ; }


returns whether a method can be called as a function e g true is not callable

public boolean is callable ( ) { return true ; }


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


set field ' s long value all fixed - length field objects must implement this method

public void set long value ( long value ) { throw new illegal field access exception ( ) ; }


adds interest ops to selection key of the transport layer

public void add interest ops ( int ops ) { if ( ! key is valid ( ) ) throw new cancelled key exception ( ) ; else if ( ! ready ( ) ) throw new illegal state exception ( " handshake is not completed " ) ; key interest ops ( key interest ops ( ) | ops ) ; }


get the p - code op code for the given mnemonic string

public static int get opcode ( string s ) throws unknown instruction exception { if ( opcode table = = null ) { generate opcode table ( ) ; } integer i = opcode table get ( s ) ; if ( i = = null ) { throw new unknown instruction exception ( ) ; } return i int value ( ) ; }


the number of words of incoming arguments to the method that this code is for

public short get incoming size ( ) { return incoming size ; }


subclasses should invoke this method to set the failure this method will return { @ code true } if the failure was successfully set , or { @ code false } if the data source has already been set , failed or closed if the failure was successfully set , state of the data source will be set to { @ link abstract data source data source status # failure } this will also notify the subscribers if the failure was successfully set do not call this method from a synchronized block as it invokes external code of the subscribers

protected boolean set failure ( throwable throwable ) { return set failure ( throwable , null ) ; }


the children of this element < code > repeated aapt pb xml node child = 5 ; < code >

public com android aapt resources xml node get child ( int index ) { return child get ( index ) ; }


if true , this actor will be sized to the parent in { @ link # validate ( ) } if the parent is the stage , the actor will be sized to the stage this method is for convenience only when the widget ' s parent does not set the size of its children ( such as the stage )

public void set fill parent ( boolean fill parent ) ;


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

public void get order by id test ( ) throws api exception { long order id = null ; order response = api get order by id ( order id ) ; / / todo : test validations }


add mapper that reads and writes fromto the queue

void add mapper ( chain blocking queue < key value pair < ? , ? > > input , chain blocking queue < key value pair < ? , ? > > output , task input output context context , int index ) throws i o exception , interrupted exception { configuration conf = get conf ( index ) ; class < ? > key class = conf get class ( mapper input key class , object class ) ; class < ? > value class = conf get class ( mapper input value class , object class ) ; class < ? > key out class = conf get class ( mapper output key class , object class ) ; class < ? > value out class = conf get class ( mapper output value class , object class ) ; record reader rr = new chain record reader ( key class , value class , input , conf ) ; record writer rw = new chain record writer ( key out class , value out class , output , conf ) ; map runner runner = new map runner ( mappers get ( index ) , create map context ( rr , rw , context , get conf ( index ) ) , rr , rw ) ; threads add ( runner ) ; }


listener is always notified asynchronously using a dedicated notification thread pool so , care should be taken to avoid leaking { @ code this } when adding a listener in a constructor additionally , it is possible notifications are observed out of order due to the asynchronous execution

public void add state change listener ( state change listener < task state > state change listener ) { task state add state change listener ( state change listener ) ; }


public void prefix ns number test ( ) { / / todo : test prefix ns number }


for j unit testing only , set the option for resolving a conflict

public void set conflict resolution ( int option ) { conflict option = option ; conflict choice = option ; }


creates a writer for each output creates an output collector which forwards its input to all writers the output collector applies the configured shipping strategy

private void init outputs ( user code class loader cl ) throws exception { this chained tasks = new array list < chained driver < ? , ? > > ( ) ; this eventual outputs = new array list < record writer < ? > > ( ) ; this output = batch task init outputs ( this , cl , this config , this chained tasks , this eventual outputs , get execution config ( ) , get environment ( ) get accumulator registry ( ) get user map ( ) ) ; }


sets the key field indexes for the specified driver comparator

public void set driver key info ( field list keys , int id ) { this set driver key info ( keys , get true array ( keys size ( ) ) , id ) ; }


register all the files in the provided lib directories as yarn local resources with public visibility , which means that they will be cached in the nodes and reused by different applications

list < string > register provided local resources ( ) { check not null ( local resources ) ; final array list < string > class paths = new array list < > ( ) ; provided shared libs for each ( ( file name , file status ) - > { final path file path = file status get path ( ) ; log debug ( " using remote file { } to register local resource " , file path ) ; final yarn local resource descriptor descriptor = yarn local resource descriptor from file status ( file name , file status , local resource visibility public , local resource type file ) ; local resources put ( file name , descriptor to local resource ( ) ) ; remote paths add ( file path ) ; env ship resource list add ( descriptor ) ; if ( ! is flink dist jar ( file path get name ( ) ) & & ! is plugin ( file path ) ) { class paths add ( file name ) ; } else if ( is flink dist jar ( file path get name ( ) ) ) { flink dist = descriptor ; } } ) ; return class paths ; }


returns a { @ code self call = true } method for the given class under the given starlark semantics , or null if no such method exists

static method get self call method ( starlark semantics semantics , class < ? > obj class ) { method descriptor descriptor = get cache value ( obj class , semantics ) self call ; if ( descriptor = = null ) { return null ; } return descriptor get method ( ) ; }


test that a notification does not get delayed in the queue waiting for the next event to push it through

public void notification delay ( ) throws interrupted exception { executor service tp 1 = executors new fixed thread pool ( 1 ) ; executor service tp 2 = executors new fixed thread pool ( 1 ) ; try { int n = 10 ; for ( int i = 0 ; i < n ; i + + ) { final count down latch first on next = new count down latch ( 1 ) ; final count down latch on next count = new count down latch ( 2 ) ; final count down latch latch = new count down latch ( 1 ) ; final count down latch running = new count down latch ( 2 ) ; test subscriber ex < string > ts = new test subscriber ex < > ( new default subscriber < string > ( ) { @ override public void on complete ( ) { } @ override public void on error ( throwable e ) { } @ override public void on next ( string t ) { first on next count down ( ) ; / / force it to take time when delivering so the second one is enqueued try { latch await ( ) ; } catch ( interrupted exception e ) { } } } ) ; subscriber < string > subscriber = serialized subscriber ( ts ) ; future < ? > f 1 = tp 1 submit ( new on next thread ( subscriber , 1 , on next count , running ) ) ; future < ? > f 2 = tp 2 submit ( new on next thread ( subscriber , 1 , on next count , running ) ) ; running await ( ) ; / / let one of the on next thread actually run before proceeding first on next await ( ) ; thread t 1 = ts last thread ( ) ; system out println ( " first on next on thread : " + t 1 ) ; latch count down ( ) ; wait on threads ( f 1 , f 2 ) ; / / not completed yet assert equals ( 2 , ts values ( ) size ( ) ) ; thread t 2 = ts last thread ( ) ; system out println ( " second on next on thread : " + t 2 ) ; assert same ( t 1 , t 2 ) ; system out println ( ts values ( ) ) ; subscriber on complete ( ) ; system out println ( ts values ( ) ) ; } } finally { tp 1 shutdown ( ) ; tp 2 shutdown ( ) ; } }


returns a value for a starlark attribute given a java objc provider key and value

public static object convert to starlark ( key < ? > java key , nested set < ? > java value ) { return converters get ( java key get type ( ) ) value for starlark ( java key , java value ) ; }


checks that , given the specified configuration parameters , the input rule has the expected attribute values and doesn ' t have the unexpected attribute values

private void check rule ( string rule label , string attribute name , collection < string > options , iterable < string > expected , iterable < string > not expected ) throws exception { use configuration ( options to array ( new string [ options size ( ) ] ) ) ; configured target binary = get configured target ( rule label ) ; assert that ( binary ) is not null ( ) ; set < string > actual deps = artifacts to strings ( get prerequisite artifacts ( binary , attribute name ) ) ; expected for each ( expected input - > assert that ( actual deps ) contains ( expected input ) ) ; not expected for each ( unexpected input - > assert that ( actual deps ) does not contain ( unexpected input ) ) ; }


enter a parse tree produced by { @ link sql base parser # table identifier }

void enter table identifier ( sql base parser table identifier context ctx ) ;


packs the color components into a 32 - bit integer with the format abgr note that no range checking is performed for higher performance

public static int to int bits ( int r , int g , int b , int a ) { return ( a < < 24 ) | ( b < < 16 ) | ( g < < 8 ) | r ; }


gets singleton instance of d beaver application

public static d beaver application get instance ( ) { return instance ; }


returns the settings to be used on the target index

public settings get settings ( ) { return this settings ; }


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


static timeline event create event ( long timestamp , string type , map < string , object > info ) { timeline event event = new timeline event ( ) ; event set timestamp ( timestamp ) ; event set event type ( type ) ; event set event info ( info ) ; return event ; }


checks whether this graph stores reverse dependencies

default boolean stores reverse deps ( ) { return true ; }


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


experimental : if true , the engine will invoke get layout otherwise , get layout will not be called if filter pushdown is required , use a connector plan optimizer in the respective connector in order to push compute into it ' s table scan

boolean is legacy get layout supported ( session session , table handle table handle ) ;


returns overloaded name ( with parameters )


notification that the apply button was hit


exposes this buffer ' s readable bytes as an nio { @ link byte buffer } the returned buffer either share or contains the copied content of this buffer , while changing the position and limit of the returned nio buffer does not affect the indexes and marks of this buffer this method is identical to { @ code buf nio buffer ( buf reader index ( ) , buf readable bytes ( ) ) } this method does not modify { @ code reader index } or { @ code writer index } of this buffer please note that the returned nio buffer will not see the changes of this buffer if this buffer is a dynamic buffer and it adjusted its capacity

public abstract byte buffer nio buffer ( ) ;


update the build view : syncs the package cache ; loads and analyzes the given labels

protected analysis result update ( string labels ) throws exception { return update ( new event bus ( ) , default flags ( ) , / * aspects = * / immutable list < string > of ( ) , labels ) ; }


public int get tick time ( ) { return tick time ; }


looks in the given list for keep specifications that match the given template returns a comma - separated string of class names from matching keep specifications , and removes the matching keep specifications as a side effect

private string find matching keep specifications ( keep class specification keep class specification template , list keep specifications ) { if ( keep specifications = = null ) { return null ; } string buffer buffer = null ; for ( int index = 0 ; index < keep specifications size ( ) ; index + + ) { keep class specification listed keep class specification = ( keep class specification ) keep specifications get ( index ) ; string class name = listed keep class specification class name ; keep class specification template class name = class name ; if ( keep class specification template equals ( listed keep class specification ) ) { if ( buffer = = null ) { buffer = new string buffer ( ) ; } else { buffer append ( ' , ' ) ; } buffer append ( class name = = null ? " * " : class util external class name ( class name ) ) ; / / remove the matching option as a side effect keep specifications remove ( index - - ) ; } } return buffer = = null ? null : buffer to string ( ) ; }


return a { @ link sorted binary doc values } that doesn ' t contain any value

public static sorted binary doc values empty sorted binary ( ) { return singleton ( doc values empty binary ( ) ) ; }


returns the smallest power of two greater than or equal to { @ code x } this is equivalent to { @ code checked pow ( 2 , log 2 ( x , ceiling ) ) }

public static int ceiling power of two ( int x ) { check positive ( " x " , x ) ; if ( x > max signed power of two ) { throw new arithmetic exception ( " ceiling power of two ( " + x + " ) not representable as an int " ) ; } return 1 < < - integer number of leading zeros ( x - 1 ) ; }


get the supporting vertex index in the given direction

public final int get support ( final vec 2 d ) { return 0 ; }


tests that round tripping of a sample of four byte permutations work all permutations are prohibitively expensive to test for automated runs this method tests specific four - byte cases

public void test is well formed 4 bytes samples ( ) { / / valid 4 byte assert well formed ( 0x f 0 , 0x a 4 , 0x a d , 0x a 2 ) ; / / bad trailing bytes assert not well formed ( 0x f 0 , 0x a 4 , 0x a d , 0x 7 f ) ; assert not well formed ( 0x f 0 , 0x a 4 , 0x a d , 0x c 0 ) ; / / special cases for byte 2 assert not well formed ( 0x f 0 , 0x 8 f , 0x a d , 0x a 2 ) ; assert not well formed ( 0x f 4 , 0x 9 0 , 0x a d , 0x a 2 ) ; }


public float get float ( ) { return float ; }


returns the object with the lowest priority number in the queue if more than one object has the same priority , then the object that was added to the queue first is considered to have the lower priority value null is returned if the queue is empty

public t get first ( ) { if ( tree is empty ( ) ) { return null ; } integer key = tree first key ( ) ; linked list < t > list = tree get ( key ) ; return list get first ( ) ; }


{ @ inherit doc } a getter for i o statistics store instance which extends i o statistics

public i o statistics get i o statistics ( ) { return io statistics store ; }


reads a double word from the program ' s memory starting at the indicated address

public static long read d word ( program program , address addr ) throws memory access exception { return program get memory ( ) get int ( addr ) ; }


returns all the registered { @ link s c m checkout strategy } s

public static descriptor extension list < s c m checkout strategy , s c m checkout strategy descriptor > all ( ) { return jenkins get ( ) get descriptor list ( s c m checkout strategy class ) ; }


creates a new package prefix in the given new superpackage , with the given package name factory

private string generate unique package prefix ( string new super package prefix , name factory package name factory ) { / / come up with package names until we get an original one string new package prefix ; do { / / let the factory produce a package name new package prefix = new super package prefix + package name factory next name ( ) + class constants package separator ; } while ( package prefix map contains value ( new package prefix ) ) ; return new package prefix ; }


void test json form data ( @ param ( " param " ) string param , @ param ( " param 2 " ) string param 2 ) ;


returns { @ code true } if this window intersects the given window

public boolean intersects ( time window other ) { return this start < = other end & & this end > = other start ; }


set the entity manager factory that this instance should manage transactions for alternatively , specify the persistence unit name of the target entity manager factory by default , a default entity manager factory will be retrieved by finding a single unique bean of type entity manager factory in the containing bean factory

public void set entity manager factory ( @ nullable entity manager factory emf ) { this entity manager factory = emf ; }


resets the fields to initial values this is necessary if the tuples are reused and not all fields were modified

public void reset ( ) { f 0 = null ; f 1 = null ; f 2 = null value ; f 3 = 0l ; }


< code > optional bool sex = 5 ; < code >


public web test client response spec same site ( string name , string expected ) { string same site = get cookie ( name ) get same site ( ) ; this exchange result assert with diagnostics ( ( ) - > { string message = get message ( name ) + " secure " ; assertion errors assert equals ( message , expected , same site ) ; } ) ; return this response spec ; }


public boolean matches ( method description target ) { parameter list < ? > parameters = target get parameters ( ) ; if ( parameters size ( ) > index ) { return parameters get ( index ) get type ( ) as erasure ( ) get name ( ) equals ( argument type name ) ; } return false ; }


returns an immutable multimap containing a single entry

public static < k , v > immutable set multimap < k , v > of ( k k 1 , v v 1 ) { immutable set multimap builder < k , v > builder = immutable set multimap builder ( ) ; builder put ( k 1 , v 1 ) ; return builder build ( ) ; }


gets the minimum resource of this stream transformation

public resource spec get min resources ( ) { return min resources ; }


creates the actions needed to generate this target ' s " debug info package " ( i e its dwp file )

private static void create debug packager actions ( rule context context , cc toolchain provider toolchain , artifact dwp output , nested set < artifact > dwo files ) throws rule error exception { / / no inputs ? just generate a trivially empty dwp / / / / note this condition automatically triggers for any build where fission is disabled / / because rules referencing dwp targets may be invoked with or without fission , we need / / to support dwp generation even when fission is disabled since no actual functionality / / is expected then , an empty file is appropriate if ( dwo files is empty ( ) ) { context register action ( file write action create ( context , dwp output , " " , false ) ) ; return ; } / / get the tool inputs necessary to run the dwp command nested set < artifact > dwp files = toolchain get dwp files ( ) ; preconditions check state ( ! dwp files is empty ( ) ) ; / / we apply a hierarchical action structure to limit the maximum number of inputs to any / / single action / / / / while the dwp tool consumes dwo files , it can also consume intermediate dwp files , / / allowing us to split a large input set into smaller batches of arbitrary size and order / / aside from the parallelism performance benefits this offers , this also reduces input / / size requirements : if a dwo , b dwo , c dwo , and e dwo are each 1 kb files , we can apply / / two intermediate actions dwp ( a dwo , b dwo ) - - > i 1 dwp and dwp ( c dwo , e dwo ) - - > i 2 dwp / / when we then apply the final action dwp ( i 1 dwp , i 2 dwp ) - - > final output dwp , the inputs / / to this action will usually total far less than 4 kb / / / / the actions form an n - ary tree with n = = max inputs per dwp action the tree is fuller / / at the leaves than the root , but that both increases parallelism and reduces the final / / action ' s input size packager packager = create intermediate dwp packagers ( context , dwp output , toolchain , dwp files , dwo files to list ( ) , 1 ) ; packager spawn action set mnemonic ( " cc generate dwp " ) add output ( dwp output ) ; packager command line add exec path ( " - o " , dwp output ) ; context register action ( packager build ( context ) ) ; }


causes the current thread to wait until the latch has counted down to zero , unless the thread is { @ linkplain thread # interrupt interrupted } , or the specified waiting time elapses if the current count is zero then this method returns immediately with the value { @ code true } if the current count is greater than zero then the current thread becomes disabled for thread scheduling purposes and lies dormant until one of three things happen : the count reaches zero due to invocations of the { @ link # count down } method ; or some other thread { @ linkplain thread # interrupt interrupts } the current thread ; or the specified waiting time elapses if the count reaches zero then the method returns with the value { @ code true } if the current thread : has its interrupted status set on entry to this method ; or is { @ linkplain thread # interrupt interrupted } while waiting , then { @ link interrupted exception } is thrown and the current thread ' s interrupted status is cleared if the specified waiting time elapses then the value { @ code false } is returned if the time is less than or equal to zero , the method will not wait at all

public boolean await ( long timeout , time unit unit ) throws interrupted exception { return sync try acquire shared nanos ( 1 , unit to nanos ( timeout ) ) ; }


the nonce provides a way to explicitly ack a specific mesh config response in a following mesh config request additional messages may have been sent by client to the management server for the previous version on the stream prior to this mesh config response , that were unprocessed at response send time the nonce allows the management server to ignore any further mesh config requests for the previous version until a mesh config request bearing the nonce < code > string nonce = 4 ; < code >

public com google protobuf byte string get nonce bytes ( ) { java lang object ref = nonce ; if ( ref instanceof string ) { com google protobuf byte string b = com google protobuf byte string copy from utf 8 ( ( java lang string ) ref ) ; nonce = b ; return b ; } else { return ( com google protobuf byte string ) ref ; } }


reads a character value ( 16 bit , 2 bytes ) from the given position , in little - endian byte order this method ' s speed depends on the system ' s native byte order , and it is possibly slower than { @ link # get char ( int ) } for most cases ( such as transient storage in memory or serialization for io and network ) , it suffices to know that the byte order in which the value is written is the same as the one in which it is read , and { @ link # get char ( int ) } is the preferable choice

public final char get char little endian ( int index ) { if ( little endian ) { return get char ( index ) ; } else { return character reverse bytes ( get char ( index ) ) ; } }


returns the path this out err uses to buffer stdout without marking the file as " accessed " the user must ensure that no other process is writing to the files at time of creation

public path fragment get output path fragment ( ) { return get file output stream ( ) get file unsafe ( ) as fragment ( ) ; }


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


init load balance if invokers is not empty , init from the first invoke ' s url and invocation if invokes is empty , init a default load balance ( random load balance )

protected load balance init load balance ( list < invoker < t > > invokers , invocation invocation ) { if ( collection utils is not empty ( invokers ) ) { return extension loader get extension loader ( load balance class ) get extension ( invokers get ( 0 ) get url ( ) get method parameter ( rpc utils get method name ( invocation ) , loadbalance key , default loadbalance ) ) ; } else { return extension loader get extension loader ( load balance class ) get extension ( default loadbalance ) ; } }


static version conditional for versions ( versions containing versions , versions possible versions ) { return new version conditional ( containing versions , possible versions ) ; }


asks the factory whether an expression is recognized

private boolean is expression ( string expression name ) { return expression factory get expression factory ( ) is expression ( expression name ) ; }


public float get percentile ( float percentile ) { ensure sorted by value ( ) ; float desired weight = percentile * total weight ; int accumulated weight = 0 ; for ( int i = 0 ; i < samples size ( ) ; i + + ) { sample current sample = samples get ( i ) ; accumulated weight + = current sample weight ; if ( accumulated weight > = desired weight ) { return current sample value ; } } / / clamp to maximum value or na n if no values return samples is empty ( ) ? float na n : samples get ( samples size ( ) - 1 ) value ; }


sets the null check if enabled , all fields need to be checked for null first

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


returns a new array containing the remaining keys

public int array to array ( ) { int array array = new int array ( true , map size ) ; while ( has next ) array add ( next ( ) ) ; return array ; }


return true if the block is striped ( erasure coded )

public boolean is striped ( ) { return false ; }


the set of attribute declarations < code > repeated aapt pb styleable entry entry = 1 ; < code >

public builder remove entry ( int index ) { copy on write ( ) ; instance remove entry ( index ) ; return this ; }


populates the provided lists with the direct and offcut xrefs to the specified variable

public static void get variable refs ( variable var , list < reference > xrefs , list < reference > offcuts ) { address addr = var get min address ( ) ; if ( addr = = null ) { return ; } program program = var get function ( ) get program ( ) ; reference manager ref mgr = program get reference manager ( ) ; reference [ ] vrefs = ref mgr get references to ( var ) ; for ( reference vref : vrefs ) { if ( addr equals ( vref get to address ( ) ) ) { xrefs add ( vref ) ; } else { offcuts add ( vref ) ; } } }


returns the coordinate vector of a multi - dimensional point

public double [ ] get coordinates ( ) { return this coordinates ; }


moves the given vertex as necessary so that it is not touching any other vertex

protected void isolate vertex ( abstract test vertex v ) { graph viewer < abstract test vertex , test edge > viewer = graph component get primary viewer ( ) ; layout < abstract test vertex , test edge > layout = viewer get graph layout ( ) ; rectangle v bounds = graph viewer utils get vertex bounds in layout space ( viewer , v ) ; boolean hit = false ; collection < abstract test vertex > others = new hash set < > ( graph get vertices ( ) ) ; others remove ( v ) ; for ( abstract test vertex other : others ) { rectangle other bounds = graph viewer utils get vertex bounds in layout space ( viewer , other ) ; if ( v bounds intersects ( other bounds ) ) { hit = true ; point p = v bounds get location ( ) ; int w = ( int ) v bounds get width ( ) ; int h = ( int ) v bounds get height ( ) ; point new point = new point ( p x + w , p y + h ) ; swing ( ( ) - > layout set location ( v , new point ) ) ; viewer repaint ( ) ; sleep ( 50 ) ; / / let us see the effect wait for swing ( ) ; } } if ( hit ) { / / keep moving until we are clear of other vertices isolate vertex ( v ) ; } }


returns type mappings using type parameters and type arguments found in the generic superclass and the super interfaces of { @ code context class }

static immutable map < type variable key , type > get type mappings ( type context type ) { check not null ( context type ) ; type mapping introspector introspector = new type mapping introspector ( ) ; introspector visit ( context type ) ; return immutable map copy of ( introspector mappings ) ; }


applies the given visitor to all local variables

public void local variables accept ( clazz clazz , method method , code attribute code attribute , local variable info visitor local variable info visitor ) { for ( int index = 0 ; index < u 2local variable table length ; index + + ) { / / we don ' t need double dispatching here , since there is only one / / type of local variable info local variable info visitor visit local variable info ( clazz , method , code attribute , local variable table [ index ] ) ; } }


repeat a string { @ code repeat } times to form a new string string utils repeat ( null , 2 ) = null string utils repeat ( " " , 0 ) = " " string utils repeat ( " " , 2 ) = " " string utils repeat ( " a " , 3 ) = " aaa " string utils repeat ( " ab " , 2 ) = " abab " string utils repeat ( " a " , - 2 ) = " "

public static string repeat ( final string str , final int repeat ) { / / performance tuned for 2 0 ( jdk1 4 ) if ( str = = null ) { return null ; } if ( repeat < = 0 ) { return empty string ; } final int input length = str length ( ) ; if ( repeat = = 1 | | input length = = 0 ) { return str ; } if ( input length = = 1 & & repeat < = pad limit ) { return repeat ( str char at ( 0 ) , repeat ) ; } final int output length = input length * repeat ; switch ( input length ) { case 1 : return repeat ( str char at ( 0 ) , repeat ) ; case 2 : final char ch 0 = str char at ( 0 ) ; final char ch 1 = str char at ( 1 ) ; final char [ ] output 2 = new char [ output length ] ; for ( int i = repeat * 2 - 2 ; i > = 0 ; i - - , i - - ) { output 2 [ i ] = ch 0 ; output 2 [ i + 1 ] = ch 1 ; } return new string ( output 2 ) ; default : final string builder buf = new string builder ( output length ) ; for ( int i = 0 ; i < repeat ; i + + ) { buf append ( str ) ; } return buf to string ( ) ; } }


public static string get default unit ( string resource type ) { resource information ri = get resource types ( ) get ( resource type ) ; if ( ri ! = null ) { return ri get units ( ) ; } return " " ; }


installs default converters for primitives , enums , and class literals

public void prepare built in converters ( injector impl injector ) { this injector = injector ; try { / / configure type converters convert to primitive type ( int class , integer class ) ; convert to primitive type ( long class , long class ) ; convert to primitive type ( boolean class , boolean class ) ; convert to primitive type ( byte class , byte class ) ; convert to primitive type ( short class , short class ) ; convert to primitive type ( float class , float class ) ; convert to primitive type ( double class , double class ) ; convert to class ( character class , new type converter ( ) { @ override public object convert ( string value , type literal < ? > to type ) { value = value trim ( ) ; if ( value length ( ) ! = 1 ) { throw new runtime exception ( " length ! = 1 " ) ; } return value char at ( 0 ) ; } @ override public string to string ( ) { return " type converter < character > " ; } } ) ; convert to classes ( matchers subclasses of ( enum class ) , new type converter ( ) { @ override @ suppress warnings ( " unchecked " ) public object convert ( string value , type literal < ? > to type ) { return enum value of ( ( class ) to type get raw type ( ) , value ) ; } @ override public string to string ( ) { return " type converter < e extends enum < e > > " ; } } ) ; internal convert to types ( new abstract matcher < type literal < ? > > ( ) { @ override public boolean matches ( type literal < ? > type literal ) { return type literal get raw type ( ) = = class class ; } @ override public string to string ( ) { return " class < ? > " ; } } , new type converter ( ) { @ override public object convert ( string value , type literal < ? > to type ) { try { return class for name ( value ) ; } catch ( class not found exception e ) { throw new runtime exception ( e ) ; } } @ override public string to string ( ) { return " type converter < class < ? > > " ; } } ) ; } finally { this injector = null ; } }


private void send trace data by m q ( set < string > key set , final string data , string data topic , string region id ) { string trace topic = trace topic name ; if ( access channel cloud = = access channel ) { trace topic = trace constants trace topic prefix + region id ; } final message message = new message ( trace topic , data get bytes ( ) ) ; / / keyset of message trace includes msg id of or original message message set keys ( key set ) ; try { set < string > trace broker set = try get message queue broker set ( trace producer get default m q producer impl ( ) , trace topic ) ; send callback callback = new send callback ( ) { @ override public void on success ( send result send result ) { } @ override public void on exception ( throwable e ) { log info ( " send trace data , the trace data is " + data ) ; } } ; if ( trace broker set is empty ( ) ) { / / no cross set trace producer send ( message , callback , 5000 ) ; } else { trace producer send ( message , new message queue selector ( ) { @ override public message queue select ( list < message queue > mqs , message msg , object arg ) { set < string > broker set = ( set < string > ) arg ; list < message queue > filter mqs = new array list < message queue > ( ) ; for ( message queue queue : mqs ) { if ( broker set contains ( queue get broker name ( ) ) ) { filter mqs add ( queue ) ; } } int index = send which queue get and increment ( ) ; int pos = math abs ( index ) % filter mqs size ( ) ; if ( pos < 0 ) { pos = 0 ; } return filter mqs get ( pos ) ; } } , trace broker set , callback ) ; } } catch ( exception e ) { log info ( " send trace data , the trace data is " + data ) ; } }


adds all the test classes ( top - level or nested ) found in package { @ code pkg name } or its subpackages to the set of tests this builder will search

public test suite builder add package recursive ( string pkg name ) { for ( class < ? > c : get classes recursive ( pkg name ) ) { add test class ( c ) ; } return this ; }


returns a set ( hash set ) of all vertices descended from a vertex in the given array

public set < vertex > get descendants ( vertex [ ] seed vertices ) { edge edge ; vertex parent , child ; set < vertex > descendants = new hash set < vertex > ( 2 * seed vertices length ) ; set < vertex > pending = new hash set < vertex > ( seed vertices length ) ; set < vertex > newly pending = new hash set < vertex > ( seed vertices length ) ; for ( vertex seed vertice : seed vertices ) { pending add ( seed vertice ) ; } while ( ! pending is empty ( ) ) { iterator < vertex > iter = pending iterator ( ) ; while ( iter has next ( ) ) { parent = iter next ( ) ; edge = vertices get first outgoing edge ( parent ) ; descendants add ( parent ) ; iter remove ( ) ; while ( edge ! = null ) { child = edge to ( ) ; if ( ! descendants contains ( child ) ) { newly pending add ( child ) ; } edge = edges get next edge with same from ( edge ) ; } } pending add all ( newly pending ) ; newly pending clear ( ) ; } return descendants ; }


default < t extends registered service > t find service by id ( final long id , final class < t > clazz ) { val service = find service by id ( id ) ; if ( service = = null ) { return null ; } if ( ! clazz is assignable from ( service get class ( ) ) ) { throw new class cast exception ( " object [ " + service + " is of type " + service get class ( ) + " when we were expecting " + clazz ) ; } return clazz cast ( service ) ; }


returns a menu hierarchy of all the actions

public j menu get menu ( ) { if ( menu = = null ) { menu = new j menu ( name ) ; if ( mnemonic key ! = ' \ 0 ' ) { menu set mnemonic ( mnemonic key ) ; } if ( menu handler ! = null ) { menu add menu listener ( menu handler ) ; } list < managed menu item > list = new array list < > ( managed menu items ) ; collections sort ( list , comparator ) ; string last group = null ; for ( managed menu item item : list ) { if ( last group ! = null & & ! last group equals ( item get group ( ) ) ) { menu add separator ( ) ; } last group = item get group ( ) ; menu add ( item get menu item ( ) ) ; } } return menu ; }


walk through the target peer commmitted log

private void validate request log ( long session id , int peer id ) { string session = long to hex string ( session id ) ; log info ( " searching for txn of session 0x " + session + " on peer " + peer id ) ; string peer type = peer id = = qb get leader index ( ) ? " leader " : " follower " ; quorum peer peer = qb get peer list ( ) get ( peer id ) ; z k database db = peer get active server ( ) get z k database ( ) ; for ( proposal p : db get committed log ( ) ) { assert false ( p request session id = = session id , " should not see " + request op 2 string ( p request type ) + " request from local session 0x " + session + " on the " + peer type ) ; } }


locate or create an instance of the specified cache strategy { @ code type }

protected abstract < t > t get bean ( class < t > type ) ;


sets the maximum alignment value that is allowed by this data organization when getting an alignment for any data type it will not exceed this value if no maximum alignment is returned , the data organization isn ' t specifically limited

public void set absolute max alignment ( int absolute max alignment ) { this absolute max alignment = absolute max alignment ; }


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

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


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


startup step tag ( string key , string value ) ;


parse an animation from srcmainassets it is recommended to use { @ link # from raw res ( context , int ) } instead the asset file name will be used as a cache key so future usages won ' t have to parse the json again however , if your animation has images , you may package the json and images as a single flattened zip file in assets to skip the cache , add null as a third parameter

public static lottie task < lottie composition > from asset ( context context , final string file name ) { string cache key = " asset " + file name ; return from asset ( context , file name , cache key ) ; }


check that whether debugging is enabled for this api client

public boolean is debugging ( ) { return debugging ; }


sets the { @ link translation settings definition } setting

public settings builder set ( translation enum tenum ) { translation settings definition translation set enum value ( settings , tenum ) ; return this ; }


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


loads a resource from the classpath and returns it as a { @ link bytes reference }

public static string load ( string name ) throws i o exception { return streams read fully ( template utils class get resource as stream ( name ) ) utf 8 to string ( ) ; }


tries to assign the given payload to this allocated slot this only works if there has not been another payload assigned to this slot

boolean try assign payload ( payload payload ) ;


whether to show only one media type if choosing medias are only images or videos

public selection creator show single media type ( boolean show single media type ) { m selection spec show single media type = show single media type ; return this ; }


return the cached response content as a byte array

public byte [ ] get content as byte array ( ) { return this content to byte array ( ) ; }


public void add tenant ( string tenant name ) { tenant calls count put if absent ( tenant name , new atomic long ( 0 ) ) ; }


specify a hibernate { @ link metadata sources } service to use ( e g reusing an existing one ) , potentially populated with a custom hibernate bootstrap { @ link org hibernate service service registry } as well

public void set metadata sources ( metadata sources metadata sources ) { this metadata sources accessed = true ; this metadata sources = metadata sources ; }


visible for serialization deserialization do not use this method ; use { @ link # equals }

public long get node id ( ) { return node id ; }


public void view changed ( address set view addr set ) ;


public void put ( @ non null final string key , final string value ) { put ( key , value , - 1 ) ; }


get the dot product between this and the other quaternion ( commutative )

public float dot ( final float x , final float y , final float z , final float w ) { return this x * x + this y * y + this z * z + this w * w ; }


test that an invalid webapp triggers an exception

public void test missing server resource ( ) throws throwable { try { http server 2 server = create server ( " no such webapp " ) ; / / should not have got here / / close the server string server description = server to string ( ) ; stop ( server ) ; fail ( " expected an exception , got " + server description ) ; } catch ( file not found exception expected ) { log debug ( " expected exception " + expected , expected ) ; } }


returns a new { @ link builder } with the { @ link # default disk cache executor threads } threads , { @ link # default disk cache executor name } name and { @ link uncaught throwable strategy # default } uncaught throwable strategy disk cache executors do not allow network operations on their threads

public static glide executor builder new disk cache builder ( ) { return new glide executor builder ( / * prevent network operations = * / true ) set thread count ( default disk cache executor threads ) set name ( default disk cache executor name ) ; }


patch a configuration to declare this the dt provider for a filesystem built off the given configuration the abfs filesystem still needs to come up with security enabled

public static configuration use stub d t manager ( configuration conf ) { conf set boolean ( fs azure enable delegation token , true ) ; conf set ( fs azure delegation token provider type , stub delegation token manager name ) ; return conf ; }


public int swap ( ) { if ( ! egl egl swap buffers ( egl display , egl surface ) ) { return egl egl get error ( ) ; } return egl10 egl success ; }


public static void stop server ( ) throws i o exception { if ( blob server ! = null ) { blob server close ( ) ; } }


public void clear ( ) { chunk = null ; end of stream = false ; }


get the amount of time that has elapsed since the timer began if the timer was reset , this will be the amount of time since the last reset

public long elapsed ms ( ) { return current time ms - start ms ; }


executes the given task in a cpu thread pool at fix rate

public static < t > void execute by cpu at fix rate ( final task < t > task , long initial delay , final long period , final time unit unit , @ int range ( from = 1 , to = 10 ) final int priority ) { execute at fixed rate ( get pool by type and priority ( type cpu , priority ) , task , initial delay , period , unit ) ; }


public void map array anytype test ( ) { / / todo : test map array anytype }


returns whether the current window is live , or { @ code false } if the { @ link timeline } is empty


returns { @ code true } if { @ code obj } is another { @ code range set } that contains the same ranges according to { @ link range # equals ( object ) }

boolean equals ( @ nullable decl object obj ) ;


public void remove ( ) { prev next = next ; next prev = prev ; prev = next = null ; key = long min value ; }


adds new stubbed answer and returns the invocation matcher the answer was added to

public stubbed invocation matcher add answer ( answer answer , boolean is consecutive , strictness stubbing strictness ) { invocation invocation = invocation for stubbing get invocation ( ) ; mocking progress ( ) stubbing completed ( ) ; if ( answer instanceof validable answer ) { ( ( validable answer ) answer ) validate for ( invocation ) ; } synchronized ( stubbed ) { if ( is consecutive ) { stubbed get first ( ) add answer ( answer ) ; } else { strictness effective strictness = stubbing strictness ! = null ? stubbing strictness : this mock strictness ; stubbed add first ( new stubbed invocation matcher ( answer , invocation for stubbing , effective strictness ) ) ; } return stubbed get first ( ) ; } }


helper method to create an intercepted object for finer control over the generated instance , use a new instance of < code > enhancer < code > instead of this static method

public static object create ( class type , callback callback ) { enhancer e = new enhancer ( ) ; e set superclass ( type ) ; e set callback ( callback ) ; return e create ( ) ; }


public static input stream string 2 input stream ( final string string , final string charset name ) { if ( string = = null ) return null ; try { return new byte array input stream ( string get bytes ( get safe charset ( charset name ) ) ) ; } catch ( unsupported encoding exception e ) { e print stack trace ( ) ; return null ; } }


remove a node update node counter and rack counter if necessary

public void remove ( node node ) { if ( node = = null ) return ; if ( node instanceof inner node ) { throw new illegal argument exception ( " not allow to remove an inner node : " + node base get path ( node ) ) ; } log info ( " removing a node : " + node base get path ( node ) ) ; netlock write lock ( ) lock ( ) ; try { if ( cluster map remove ( node ) ) { node node group = get node ( node get network location ( ) ) ; if ( node group = = null ) { node group = factory new inner node ( node get network location ( ) ) ; } inner node rack = ( inner node ) get node ( node group get network location ( ) ) ; if ( rack = = null ) { num of racks - - ; } } if ( log is debug enabled ( ) ) { log debug ( " network topology became : \ n " + this to string ( ) ) ; } } finally { netlock write lock ( ) unlock ( ) ; } }


create a pre - configured token filter that may vary based on the elasticsearch version

public static pre configured token filter elasticsearch version ( string name , boolean use filter for multiterm queries , boolean use filter for parsing synonyms , bi function < token stream , version , token stream > create ) { return new pre configured token filter ( name , use filter for multiterm queries , use filter for parsing synonyms , caching strategy elasticsearch , create ) ; }


a sensible definition of { @ link # contains } in terms of { @ link # count } if you override { @ link # count } , you may wish to override { @ link # contains } to forward to this implementation

protected boolean standard contains ( @ nullable object object ) { return count ( object ) > 0 ; }


sets the number of times that failed tasks are re - executed a value of zero effectively disables fault tolerance a value of { @ code - 1 } indicates that the system default value ( as defined in the configuration ) should be used

public execution config set number of execution retries ( int number of execution retries ) { if ( number of execution retries < - 1 ) { throw new illegal argument exception ( " the number of execution retries must be non - negative , or - 1 ( use system default ) " ) ; } this number of execution retries = number of execution retries ; return this ; }


execute an s3 select operation on a failure , the request is only logged at debug to avoid the select exception being printed

public select object content result select ( final path source , final select object content request request , final string action ) throws i o exception { string bucket name = request get bucket name ( ) ; preconditions check argument ( bucket equals ( bucket name ) , " wrong bucket : % s " , bucket name ) ; if ( log is debug enabled ( ) ) { log debug ( " initiating select call { } { } " , source , request get expression ( ) ) ; log debug ( select binding to string ( request ) ) ; } return invoker retry ( action , source to string ( ) , true , ( ) - > { try ( duration info ignored = new duration info ( log , " s3 select operation " ) ) { try { return owner get amazon s 3 client ( ) select object content ( request ) ; } catch ( amazon s 3 exception e ) { log error ( " failure of s3 select request against { } " , source ) ; log debug ( " s3 select request against { } : \ n { } " , source , select binding to string ( request ) , e ) ; throw e ; } } } ) ; }


returns the error message format to use for unknown fields by default , it is the one specified by the provider

public string get error message for unknown field ( string name ) { return get provider ( ) get error message for unknown field ( name ) + all attributes suffix ( ) ; }


return the singleton entity manager factory

public entity manager factory get object ( ) { return this entity manager factory ; }


returns the { @ link selector provider } used by this { @ link nio event loop } to obtain the { @ link selector }

public selector provider selector provider ( ) { return provider ; }


public boolean use logical u r i ( ) { return false ; }


this procedure creates the preloader panel and returns a preloader callback to update it < br > you can override it to construct your own preloader animation you can adjust the progress bar colors to your needs by overriding { @ link # adjust meter panel ( panel , style ) } < br > example to use an own image ( width should be around 3 0 0px ) placed in webapp folder : public preloader callback get preloader callback ( ) { return create preloader panel ( gwt get host page base u r l ( ) + " logo preload png " ) ; }

public preloader callback get preloader callback ( ) { return create preloader panel ( gwt get module base u r l ( ) + " logo png " ) ; }


required the ports associated with the external service if the endpoints are unix domain socket addresses , there must be exactly one port < code > repeated istio networking v 1alpha 3 port ports = 3 ; < code >

public builder add ports ( int index , com alibaba nacos istio model port value ) { if ( ports builder = = null ) { if ( value = = null ) { throw new null pointer exception ( ) ; } ensure ports is mutable ( ) ; ports add ( index , value ) ; on changed ( ) ; } else { ports builder add message ( index , value ) ; } return this ; }


enumerate all files in the directory and recursive if enumerate nested files is true

private long add files in dir ( path path , list < file status > files , boolean log excluded files ) throws i o exception { final file system fs = path get file system ( ) ; long length = 0 ; for ( file status dir : fs list status ( path ) ) { if ( dir is dir ( ) ) { if ( accept file ( dir ) & & enumerate nested files ) { length + = add files in dir ( dir get path ( ) , files , log excluded files ) ; } else { if ( log excluded files & & log is debug enabled ( ) ) { log debug ( " directory " + dir get path ( ) to string ( ) + " did not pass the file - filter and is excluded " ) ; } } } else { if ( accept file ( dir ) ) { files add ( dir ) ; length + = dir get len ( ) ; test for unsplittable ( dir ) ; } else { if ( log excluded files & & log is debug enabled ( ) ) { log debug ( " directory " + dir get path ( ) to string ( ) + " did not pass the file - filter and is excluded " ) ; } } } } return length ; }


called to refresh an action mode ' s action menu whenever it is invalidated

public boolean on prepare action mode ( action mode mode , menu menu ) { / / swipe to dismiss touch listener set enabled ( false ) ; this action mode = mode ; return false ; }


gatling does not need the models to have escaped words as it builds models dynamically instead of through an instance of the object

public string escape reserved word ( string name ) { return name ; }


validates the use of a label within a particular context note that " ok " responses ( and any textmarkup that may be set on them ) will be ignored only warnings and errors are taken into account , and aggregated across all validators this method exists to allow plugins to implement an override for it , enabling checking in non - abstract project contexts without needing to update their jenkins dependency ( and using the new { @ link jenkins model labels label validator } instead )

public form validation check item ( @ non null item item , @ non null label label ) { if ( item instanceof abstract project < ? , ? > ) { return this check ( ( abstract project < ? , ? > ) item , label ) ; } return form validation ok ( ) ; }


try to resolve instances from types checks on the real argument type or on the correct argument number will happen during the field initialization { @ link field initializer # initialize ( ) } i e the only responsibility of this method , is to provide instances if possible

object [ ] resolve type instances ( class < ? > arg types ) ;


create a new { @ link channel } that will call { @ code interceptors } before starting a call on the given channel the last interceptor will have its { @ link client interceptor # intercept call } called first

public static channel intercept ( channel channel , client interceptor interceptors ) { return intercept ( channel , arrays as list ( interceptors ) ) ; }


variant of { @ link # metadata to extract ( mime type , class , string ) } that allows custom logic to be used to map the decoded value to any number of values in the output map

< t > void metadata to extract ( mime type mime type , class < t > target type , bi consumer < t , map < string , object > > mapper ) ;


this function is kept to provide backward compatibility

public static void authorize ( user group information user , string remote address , configuration conf ) throws authorization exception { authorize ( user , remote address ) ; }


returns a new immutable array containing the values in the specified range < b > performance note : < b > the returned array has the same full memory footprint as this one does ( no actual copying is performed ) to reduce memory usage , use { @ code sub array ( start , end ) trimmed ( ) }

public immutable int array sub array ( int start index , int end index ) { preconditions check position indexes ( start index , end index , length ( ) ) ; return start index = = end index ? empty : new immutable int array ( array , start + start index , start + end index ) ; }


skips the encryption data for the current sample this is not supported yet for samples specified in the sample table

public void skip sample encryption data ( ) { @ nullable track encryption box encryption box = get encryption box if encrypted ( ) ; if ( encryption box = = null ) { return ; } parsable byte array sample encryption data = fragment sample encryption data ; if ( encryption box per sample iv size ! = 0 ) { sample encryption data skip bytes ( encryption box per sample iv size ) ; } if ( fragment sample has subsample encryption table ( current sample index ) ) { sample encryption data skip bytes ( 6 * sample encryption data read unsigned short ( ) ) ; } }


whether we should advertise this block as cached to the name node and clients

public boolean should advertise ( ) { return ( this = = cached ) ; }


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


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

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


boolean encode sugar ( ) { / / special case ' sugar - ' if ( string at ( m current , 5 , " sugar " , " " ) ) { metaph add ( " x " ) ; m current + + ; return true ; } return false ; }


provides config with prefix { @ code producer override } for { @ link connector type # source } provides config with prefix { @ code consumer override } for { @ link connector type # sink } provides config with prefix { @ code producer override } for { @ link connector type # sink } for dlq provides config with prefix { @ code admin override } for { @ link connector type # sink } for dlq

public map < string , object > client props ( ) { return client props ; }


post fakeouterstring test serialization of outer string types

public response entity < string > fake outer string serialize ( @ api param ( value = " input string as post body " ) @ valid @ request body ( required = false ) string body ) { return new response entity < > ( http status not implemented ) ; }


duration of percentile rolling window in milliseconds this is passed into { @ link hystrix rolling percentile } inside { @ link hystrix collapser metrics }

public hystrix property < integer > metrics rolling percentile window in milliseconds ( ) { return metrics rolling percentile window in milliseconds ; }


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


the value of each entry in the { @ code provides with index } table must be a valid index into the constant pool the entry at that index must be a { @ link constant pool class info } structure representing a service implementation for the service interface specified by { @ code provides index }

public int get provides with index entry ( int i ) { return provides with index [ i ] ; }


declaring how to order the rows queried from table lite pal order ( & quot ; name desc & quot ; ) find ( person class ) ; this will find all rows in person table sorted by name with inverted order

public static fluent query order ( string column ) { return operator order ( column ) ; }


sets the progress bar image scale type if not set , the default value center inside will be used

public generic drawee hierarchy builder set progress bar image scale type ( @ nullable scaling utils scale type progress bar image scale type ) { m progress bar image scale type = progress bar image scale type ; return this ; }


returns a new builder the generated builder is equivalent to the builder created by the { @ link builder # builder ( ) immutable table builder ( ) } constructor

public static < r , c , v > builder < r , c , v > builder ( ) { return new builder < > ( ) ; }


sets the single record to be returned by this iterator the offset and records - to - skip count will be used as provided here for the returned { @ link record and position } , meaning they need to point to after this specific record ( because a checkpoint taken after the record was processed needs to resume from after this record )

public void set ( final e element , final long offset , final long skip count ) { this record and position set ( element , offset , skip count ) ; this element = this record and position ; }


callback method when current resource manager is granted leadership

public void grant leadership ( final uuid new leader session i d ) { final completable future < boolean > accept leadership future = clear state future then compose async ( ( ignored ) - > try accept leadership ( new leader session i d ) , get unfenced main thread executor ( ) ) ; final completable future < void > confirmation future = accept leadership future then accept async ( ( accept leadership ) - > { if ( accept leadership ) { / / confirming the leader session id might be blocking , leader election service confirm leadership ( new leader session i d , get address ( ) ) ; } } , io executor ) ; confirmation future when complete ( ( void ignored , throwable throwable ) - > { if ( throwable ! = null ) { on fatal error ( exception utils strip completion exception ( throwable ) ) ; } } ) ; }


the docker client config for the service

public string get docker client config ( ) { return docker client config ; }


public long read long ( ) throws e o f exception { long short 0 = read ( ) ; long short 1 = read ( ) ; long short 2 = read ( ) ; long short 3 = read ( ) ; return short 0 | ( short 1 < < 16 ) | ( short 2 < < 32 ) | ( short 3 < < 48 ) ; }


public int write annotation set ref list ( annotation set ref list annotation set ref list ) { ensure four bytes aligned ( table of contents annotation set ref lists , true ) ; return super write annotation set ref list ( annotation set ref list ) ; }


gets called to updatevalidate the current editable location in the table

protected boolean field edited ( object value , int row index , int column index ) { if ( applying field edit ) { return true ; / / the one in progress will indicate any errors } try { applying field edit = true ; switch ( column index ) { case datatype : set component data type ( row index , value ) ; break ; case fieldname : set component name ( row index , ( ( string ) value ) trim ( ) ) ; break ; case comment : set component comment ( row index , ( string ) value ) ; break ; default : return false ; } return true ; } catch ( usr exception e ) { set status ( e get message ( ) ) ; return false ; } finally { applying field edit = false ; } }


apply the defaults to the specified { @ link cache operation builder }

public void apply default ( cache operation builder builder ) { if ( ! this initialized ) { cache config annotation = annotated element utils find merged annotation ( this target , cache config class ) ; if ( annotation ! = null ) { this cache names = annotation cache names ( ) ; this key generator = annotation key generator ( ) ; this cache manager = annotation cache manager ( ) ; this cache resolver = annotation cache resolver ( ) ; } this initialized = true ; } if ( builder get cache names ( ) is empty ( ) & & this cache names ! = null ) { builder set cache names ( this cache names ) ; } if ( ! string utils has text ( builder get key ( ) ) & & ! string utils has text ( builder get key generator ( ) ) & & string utils has text ( this key generator ) ) { builder set key generator ( this key generator ) ; } if ( string utils has text ( builder get cache manager ( ) ) | | string utils has text ( builder get cache resolver ( ) ) ) { / / one of these is set so we should not inherit anything } else if ( string utils has text ( this cache resolver ) ) { builder set cache resolver ( this cache resolver ) ; } else if ( string utils has text ( this cache manager ) ) { builder set cache manager ( this cache manager ) ; } }


convenience method for counting the rows in the given table , using the provided { @ code where } clause see the javadoc for { @ link jdbc test utils # count rows in table where } for details

protected int count rows in table where ( string table name , string where clause ) { return jdbc test utils count rows in table where ( this jdbc template , table name , where clause ) ; }


creates a notification manager and a low - priority notification channel with the specified { @ code channel id } and { @ code channel name } if the player notification manager is intended to be used within a foreground service , { @ link # create with notification channel ( context , string , int , int , media description adapter , notification listener ) } should be used to which a { @ link notification listener } can be passed this way you ' ll receive the notification to put the service into the foreground by calling { @ link android app service # start foreground ( int , notification ) }

public static player notification manager create with notification channel ( context context , string channel id , @ string res int channel name , @ string res int channel description , int notification id , media description adapter media description adapter ) { notification util create notification channel ( context , channel id , channel name , channel description , notification util importance low ) ; return new player notification manager ( context , channel id , notification id , media description adapter ) ; }


serialize a { @ link i node symlink } node

private static void write i node symlink ( i node symlink node , data output out ) throws i o exception { write local name ( node , out ) ; out write long ( node get id ( ) ) ; out write short ( 0 ) ; / / replication out write long ( 0 ) ; / / modification time out write long ( 0 ) ; / / access time out write long ( 0 ) ; / / preferred block size out write int ( - 2 ) ; / / # of blocks text write string ( out , node get symlink string ( ) ) ; write permission status ( node , out ) ; }


returns the section header at the specified position in the array

public section header get section header ( int index ) { if ( index > = 0 & & index < section headers length ) { return section headers [ index ] ; } return null ; }


returns a live view of this network as a { @ link graph } the resulting { @ link graph } will have an edge connecting node a to node b if this { @ link network } has an edge connecting a to b if this network { @ link # allows parallel edges ( ) allows parallel edges } , parallel edges will be treated as if collapsed into a single edge for example , the { @ link # degree ( object ) } of a node in the { @ link graph } view may be less than the degree of the same node in this { @ link network }

graph < n > as graph ( ) ; / / / / network properties / /


called when a mouse button or a finger touch goes down on the actor if true is returned , this listener will have { @ link stage # add touch focus ( event listener , actor , actor , int , int ) touch focus } , so it will receive all touch dragged and touch up events , even those not over this actor , until touch up is received also when true is returned , the event is { @ link event # handle ( ) handled }

public boolean touch down ( input event event , float x , float y , int pointer , int button ) { return false ; }


stop executiontriggering of watches on this node , do not try to reload anything , just sit still

public synchronized void pause execution ( ) { engines values ( ) for each ( trigger engine : : pause execution ) ; per watch stats clear ( ) ; }


returns the largest integer less than or equal to the specified float this method will only properly floor floats from - ( 2 ^ 14 ) to ( float max value - 2 ^ 14 )

static public int floor ( float value ) { return ( int ) ( value + big enough floor ) - big enough int ; }


wrap { @ link runnable } by { @ link tracing runnable } if active trace context existed

public static runnable wrap or not ( runnable delegate ) { / / just wrap continuation with active trace context if ( context manager is active ( ) ) { return new tracing runnable ( context manager capture ( ) , delegate ) ; } else { return delegate ; } }


resets a to - many relationship , making the next get call to query for a fresh result

public synchronized void reset date entity list ( ) { date entity list = null ; }


set the path for this auxiliary service to use for storing state that will be used during recovery

public void set recovery path ( path recovery path ) { this recovery path = recovery path ; }


serialises new x content type vnd values in a bwc manner todo remove in es v 9

public static void write to ( stream output out , x content type x content type ) throws i o exception { if ( out get version ( ) before ( version v 8 0 0 ) ) { / / when sending an enumeration to < v 8 node it does not have new vnd x content type instances out write v int ( x content type canonical ( ) ordinal ( ) ) ; } else { out write v int ( x content type ordinal ( ) ) ; } }


called from { @ link # test calls get containers from previous attempts method if present ( ) }

public list < container > get containers from previous attempts ( ) { return collections singleton list ( mock container ) ; }


the previous list was empty and the given non empty list was inserted

static diff result inserted ( @ non null list < ? extends epoxy model < ? > > new models ) { / / noinspection unchecked return new diff result ( collections empty list , new models , null ) ; }


compute the storage address associated with a particular location

private address compute storage address ( program location location , function function ) { address storage address = null ; / / make sure what we are over can be mapped to decompiler / / param , local , etc if ( location instanceof variable location ) { variable location var loc = ( variable location ) location ; storage address = var loc get variable ( ) get variable storage ( ) get min address ( ) ; } else if ( location instanceof function parameter field location ) { function parameter field location func p f l = ( function parameter field location ) location ; storage address = func p f l get parameter ( ) get variable storage ( ) get min address ( ) ; } return storage address ; }


test verifies removing watcher having namespace

public void test ch root remove watcher ( boolean use async ) throws exception { / / creating the subtree for ch root clients string ch root = " / apps x " ; zk 1 create ( " / apps x " , null , ids open acl unsafe , create mode persistent ) ; if ( zk 1 ! = null ) { zk 1 close ( ) ; } if ( zk 2 ! = null ) { zk 2 close ( ) ; } / / creating ch root client zk 1 = create client ( this host port + ch root ) ; zk 2 = create client ( this host port + ch root ) ; log info ( " creating child znode / node 1 using ch root client " ) ; zk 1 create ( " / node 1 " , null , ids open acl unsafe , create mode persistent ) ; my watcher w 1 = new my watcher ( " / node 1 " , 2 ) ; my watcher w 2 = new my watcher ( " / node 1 " , 1 ) ; log info ( " adding data watcher { } on path { } " , w 1 , " / node 1 " ) ; assert not null ( zk 2 exists ( " / node 1 " , w 1 ) , " didn ' t set data watches " ) ; / / add multiple child watches log info ( " adding child watcher { } on path { } " , w 1 , " / node 1 " ) ; zk 2 get children ( " / node 1 " , w 2 ) ; log info ( " adding child watcher { } on path { } " , w 2 , " / node 1 " ) ; zk 2 get children ( " / node 1 " , w 1 ) ; remove watches ( zk 2 , " / node 1 " , w 1 , watcher type any , false , code ok , use async ) ; assert true ( w 1 matches ( ) , " didn ' t remove child watcher " ) ; assert equals ( 1 , zk 2 get child watches ( ) size ( ) , " didn ' t find child watcher " ) ; remove watches ( zk 2 , " / node 1 " , w 2 , watcher type any , false , code ok , use async ) ; assert true ( w 2 matches ( ) , " didn ' t remove child watcher " ) ; }


void set successful aspects ( immutable set < aspect key > successful aspects ) { this successful aspects = successful aspects ; }


get the storage reports for all blockpools that were not specified by the balancer blockpool parameters if none were specified then the parameter was not set and do not return any reports

private static map < integer , datanode storage report [ ] > get storage reports ( suite s ) throws i o exception { map < integer , datanode storage report [ ] > reports = new hash map < integer , datanode storage report [ ] > ( ) ; if ( s parameters get block pools ( ) size ( ) = = 0 ) { / / the blockpools parameter was not set , so we don ' t need to track any / / blockpools return collections empty map ( ) ; } for ( int i = 0 ; i < s clients length ; i + + ) { if ( s parameters get block pools ( ) contains ( s cluster get namesystem ( i ) get block pool id ( ) ) ) { / / we want to ensure that blockpools not specified by the balancer / / parameters were left alone therefore , if the pool was specified , / / skip it note : this code assumes the clients in the suite are ordered / / the same way that they are indexed via cluster # get namesystem ( index ) continue ; } else { log info ( " tracking usage of blockpool id : " + s cluster get namesystem ( i ) get block pool id ( ) ) ; reports put ( i , s clients [ i ] get datanode storage report ( datanode report type live ) ) ; } } log info ( " tracking " + reports size ( ) + " blockpool ( s ) for pre / post balancer usage " ) ; return reports ; }


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

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


updates all uses of various consts to use the values in the newly assigned registers

private void update const uses ( hash map < typed constant , register spec > new regs , int orig reg count ) { / * * set of constants associated with a local variable ; used * only if collect one local is true * / final hash set < typed constant > used by local = new hash set < typed constant > ( ) ; final array list < ssa insn > [ ] use list = ssa meth get use list copy ( ) ; for ( int i = 0 ; i < orig reg count ; i + + ) { ssa insn insn = ssa meth get definition for register ( i ) ; if ( insn = = null ) { continue ; } final register spec orig reg = insn get result ( ) ; type bearer type bearer = insn get result ( ) get type bearer ( ) ; if ( ! type bearer is constant ( ) ) continue ; typed constant cst = ( typed constant ) type bearer ; final register spec new reg = new regs get ( cst ) ; if ( new reg = = null ) { continue ; } if ( ssa meth is reg a local ( orig reg ) ) { if ( ! collect one local ) { continue ; } else { / * * todo : if the same local gets the same cst * multiple times , it would be nice to reuse the * register * / if ( used by local contains ( cst ) ) { continue ; } else { used by local add ( cst ) ; fix local assignment ( orig reg , new regs get ( cst ) ) ; } } } / / maps an original const register to the new collected register register mapper mapper = new register mapper ( ) { @ override public int get new register count ( ) { return ssa meth get reg count ( ) ; } @ override public register spec map ( register spec register spec ) { if ( register spec get reg ( ) = = orig reg get reg ( ) ) { return new reg with local item ( register spec get local item ( ) ) ; } return register spec ; } } ; for ( ssa insn use : use list [ orig reg get reg ( ) ] ) { if ( use can throw ( ) & & use get block ( ) get successors ( ) cardinality ( ) > 1 ) { continue ; } use map source registers ( mapper ) ; } } }


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


attempt to cancel this asynchronous operation


provide the context required to apply { @ link # save model ( ) } after the controller method has been invoked

public void set session context ( session attributes handler attributes handler , web session session ) { this save model operation = ( ) - > { if ( get session status ( ) is complete ( ) ) { attributes handler cleanup attributes ( session ) ; } else { attributes handler store attributes ( session , get model ( ) as map ( ) ) ; } } ; }


removes from the given string any invalid characters or replaces them with underscores for example : given " a : bc " , the return value would be " a b c "

public static string replace invalid chars ( string str , boolean replace with underscore ) { if ( str = = null ) { return null ; } int len = str length ( ) ; string buffer buf = new string buffer ( len ) ; for ( int i = 0 ; i < len ; + + i ) { char c = str char at ( i ) ; if ( is invalid char ( c ) ) { if ( replace with underscore ) { buf append ( underscore ) ; } } else { buf append ( c ) ; } } return buf to string ( ) ; }


sets the setting with the provided setting key and the int value

public builder put ( string setting , int value ) { put ( setting , string value of ( value ) ) ; return this ; }


searches the subcomponents of the the given container and returns the j button that has the specified text

public static j button find button by text ( container container , string text ) { component [ ] comps = container get components ( ) ; for ( component element : comps ) { if ( element instanceof j button ) { j button button = ( j button ) element ; if ( button get text ( ) ! = null & & button get text ( ) equals ( text ) ) { return button ; } } else if ( element instanceof container ) { j button button = find button by text ( ( container ) element , text ) ; if ( button ! = null ) { return button ; } } } return null ; }


returns the store file metadata for this file info

public store file metadata metadata ( ) { return metadata ; }


returns the color color used as the background for highlighted items

public color get highlight color ( ) { return paint context get highlight color ( ) ; }


set the body of the response to the given { @ code object } and return it the parameter { @ code body type } is used to capture the generic type

< t > server response body ( t body , parameterized type reference < t > body type ) ;


public alias filter ( map < string , object > filter ) { if ( filter = = null | | filter is empty ( ) ) { this filter = null ; return this ; } try { x content builder builder = x content factory content builder ( x content type json ) ; builder map ( filter ) ; this filter = strings to string ( builder ) ; return this ; } catch ( i o exception e ) { throw new elasticsearch generation exception ( " failed to generate [ " + filter + " ] " , e ) ; } }


acquire the light lock and ensure that the consumer hasn ' t been closed

private void acquire and ensure open ( ) { acquire ( ) ; if ( this closed ) { release ( ) ; throw new illegal state exception ( " this consumer has already been closed " ) ; } }


set the linear velocity of the center of mass

public void set linear velocity ( vector 2 v ) { jni set linear velocity ( addr , v x , v y ) ; }


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

public boolean is set success ( ) { return this success ! = null ; }


returns the string up to but not including { @ code quote } , unescaping any character escape sequences encountered along the way the opening quote should have already been read this consumes the closing quote , but does not include it in the returned string

private string next quoted value ( char quote ) throws i o exception { / / like next non whitespace , this uses locals ' p ' and ' l ' to save inner - loop field access char [ ] buffer = this buffer ; string builder builder = null ; while ( true ) { int p = pos ; int l = limit ; / * the index of the first character not yet appended to the builder * / int start = p ; while ( p < l ) { int c = buffer [ p + + ] ; if ( c = = quote ) { pos = p ; int len = p - start - 1 ; if ( builder = = null ) { return new string ( buffer , start , len ) ; } else { builder append ( buffer , start , len ) ; return builder to string ( ) ; } } else if ( c = = ' \ \ ' ) { pos = p ; int len = p - start - 1 ; if ( builder = = null ) { int estimated length = ( len + 1 ) * 2 ; builder = new string builder ( math max ( estimated length , 16 ) ) ; } builder append ( buffer , start , len ) ; builder append ( read escape character ( ) ) ; p = pos ; l = limit ; start = p ; } else if ( c = = ' \ n ' ) { line number + + ; line start = p ; } } if ( builder = = null ) { int estimated length = ( p - start ) * 2 ; builder = new string builder ( math max ( estimated length , 16 ) ) ; } builder append ( buffer , start , p - start ) ; pos = p ; if ( ! fill buffer ( 1 ) ) { throw syntax error ( " unterminated string " ) ; } } }


public int get module index ( ) { return module index ; }


loads { @ link will be unloaded exception } in a separate { @ code class loader } , calls { @ code get checked ( future , will be unloaded exception class ) } , and returns the loader the caller can then test that the { @ code class loader } can still be g ced the test amounts to a test that { @ code get checked } holds no strong references to the class

private weak reference < ? > do test class unloading ( ) throws exception { u r l class loader shadow loader = new u r l class loader ( parse java class path ( ) , null ) ; @ suppress warnings ( " unchecked " ) class < will be unloaded exception > shadow class = ( class < will be unloaded exception > ) class for name ( will be unloaded exception class get name ( ) , false , shadow loader ) ; assert not same ( shadow class , will be unloaded exception class ) ; get checked ( immediate future ( " foo " ) , shadow class ) ; return new weak reference < > ( shadow loader ) ; }


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


return a bind expression that can be used in html forms as input name for the respective field , or { @ code null } if not field - specific returns a bind path appropriate for resubmission , e g " address street " note that the complete bind path as required by the bind tag is " customer address street " , if bound to a " customer " bean

public string get expression ( ) { return this expression ; }


public int get resource data length ( ) { return resource data length ; }


returns the { @ link http 2 connection decoder } to use

protected http 2 connection decoder decoder ( ) { return decoder ; }


blocking take from producer consumer output queue ( catches exceptions and retries forever )

public work report < r > blocking take ( ) { while ( true ) { try { work report < r > report = output queue take ( ) ; work cnt decrement and get ( ) ; return report ; } catch ( interrupted exception ie ) { log debug ( " retrying in blocking take " ) ; } } }


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


callback that is invoked after a record is written to cassandra successfully subclass can override to provide its own logic


takes the first color , blending into it the second color , using the given ratio a lower ratio ( say 1f ) signals to use very little of the first color ; a larger ratio signals to use more of the first color

public static color blend ( color c 1 , color c 2 , float ratio ) { float rgb 1 [ ] = new float [ 3 ] ; float rgb 2 [ ] = new float [ 3 ] ; c 1 get color components ( rgb 1 ) ; c 2 get color components ( rgb 2 ) ; float inverse = ( float ) 1 0 - ratio ; / / @ formatter : off color color = new color ( rgb 1 [ 0 ] * ratio + rgb 2 [ 0 ] * inverse , rgb 1 [ 1 ] * ratio + rgb 2 [ 1 ] * inverse , rgb 1 [ 2 ] * ratio + rgb 2 [ 2 ] * inverse ) ; / / @ formatter : on return color ; }


optional method to determine the target topic for the element


tests exclusive access of the write lock

public void test write lock ( ) throws exception { string testname = name get method name ( ) ; final thread local < boolean > locked = new thread local < boolean > ( ) ; locked set ( boolean false ) ; instrumented read write lock read write lock = new instrumented read write lock ( true , testname , log , 2000 , 300 ) ; final auto closeable lock write lock = new auto closeable lock ( read write lock write lock ( ) ) { @ override public auto closeable lock acquire ( ) { auto closeable lock lock = super acquire ( ) ; locked set ( boolean true ) ; return lock ; } @ override public void release ( ) { super release ( ) ; locked set ( boolean false ) ; } } ; final auto closeable lock read lock = new auto closeable lock ( read write lock read lock ( ) ) ; try ( auto closeable lock lock = write lock acquire ( ) ) { thread competing write thread = new thread ( ) { @ override public void run ( ) { assert false ( write lock try lock ( ) ) ; } } ; competing write thread start ( ) ; competing write thread join ( ) ; thread competing read thread = new thread ( ) { @ override public void run ( ) { assert false ( read lock try lock ( ) ) ; } ; } ; competing read thread start ( ) ; competing read thread join ( ) ; } assert false ( locked get ( ) ) ; locked remove ( ) ; }


public static set < string > get contrast resources ( ) { return collections unmodifiable set ( sets new hash set ( " content background " , " default tabs hover color " , " default tabs inactive mask color " , " editor pane background " , " header color inactive " , / / deprecated " material contrast " , " new class search field background " , " popup border color " , / / deprecated " popup border color " , " popup header inactive background " , " popup toolbar background " , " popup toolbar border color " , / / deprecated " popup toolbar border color " , " popup toolbar floating background " , " scroll bar thumb " , " search everywhere advertiser background " , " search everywhere search field background " , " table stripe color " , " table striped background " , / / deprecated " table alternative row background " , " title pane background " , " tool bar background " , " tool window button selected background " , " tool window header tab selected active background " , / / deprecated " tool window header tab selected background " , / / deprecated " tool window header tab selected inactive background " , " tool window header tab selected background " , " tool window inactive header tab background " , / / deprecated " tool window active header tab background " , / / deprecated " tool window header tab underlined tab inactive background " , " u i designer canvas background " , " u i designer motion primary panel background " , " u i designer motion secondary panel header background " , " version control log commit current branch background " , " welcome screen caption background " , " welcome screen footer background " , " welcome screen list background " , " welcome screen projects actions background " ) ) ; }


set a new list representing your latest data a diff will be computed between this list and the last list set if this has not previously been called then an empty list is used as the previous list the diff computation will be done on the thread given by the handler in the constructor when the diff is done it will be applied ( dispatched to the result callback ) , and the new list will be swapped in

public void submit list ( @ nullable final list < ? extends epoxy model < ? > > new list ) { final int run generation ; @ nullable final list < ? extends epoxy model < ? > > previous list ; synchronized ( this ) { / / incrementing generation means any currently - running diffs are discarded when they finish / / we synchronize to guarantee list object and generation number are in sync run generation = generation tracker increment and get next scheduled ( ) ; previous list = list ; } if ( new list = = previous list ) { / / nothing to do on run completed ( run generation , new list , diff result no op ( previous list ) ) ; return ; } if ( new list = = null | | new list is empty ( ) ) { / / fast simple clear all diff result result = null ; if ( previous list ! = null & & ! previous list is empty ( ) ) { result = diff result clear ( previous list ) ; } on run completed ( run generation , null , result ) ; return ; } if ( previous list = = null | | previous list is empty ( ) ) { / / fast simple first insert on run completed ( run generation , new list , diff result inserted ( new list ) ) ; return ; } final diff callback wrapped callback = new diff callback ( previous list , new list , diff callback ) ; executor execute ( new runnable ( ) { @ override public void run ( ) { diff util diff result result = diff util calculate diff ( wrapped callback ) ; on run completed ( run generation , new list , diff result diff ( previous list , new list , result ) ) ; } } ) ; }


compute the path where the output of a committed task is stored until the entire job is committed

public path get committed task path ( task attempt context context ) { return get committed task path ( get app attempt id ( context ) , context ) ; }


public static int get cache disk count ( @ non null final cache double utils cache double utils ) { return cache double utils get cache disk count ( ) ; }


creates an { @ link ads loader } for requesting ads using the specified settings

ads loader create ads loader ( context context , ima sdk settings ima sdk settings , ad display container ad display container ) ;


opens a new { @ link output stream } for writing to this sink this method returns a new , independent stream each time it is called the caller is responsible for ensuring that the returned stream is closed

public abstract output stream open stream ( ) throws i o exception ;


returns true if the log file is still being updated

public boolean is log updated ( ) { return state compare to ( state completed ) < 0 ; }


this is a regression test for bug # 823077 , in which presence of artifacts with null generating action caused targets always to be reported as failed

public void test keep going result with null actions ( ) throws exception { write ( " foo / build " , " sh test ( name = ' test bar ' , srcs = [ ' test bar sh ' ] ) \ n " + " sh test ( name = ' test foo ' , srcs = [ ' test foo sh ' ] ) \ n " ) ; write ( " foo / test bar sh " , " echo bar is fine " ) set executable ( true ) ; add options ( " - - keep going " ) ; build ( true , " no - error " , " / / foo : test foo " , " / / foo : test bar " ) ; string stderr = rec out err err as latin 1 ( ) ; assert that ( stderr ) contains ( " target / / foo : test bar up - to - date : \ n " ) ; assert that ( stderr ) contains match ( " \ n * / foo / test bar \ n " ) ; assert that ( stderr ) does not contain match ( " \ n * / foo / test bar \ \ sh \ n " ) ; assert that ( stderr ) contains ( " target / / foo : test foo failed to build \ n " ) ; }


public string message ( ) { return raw response message ( ) ; }


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

public com google protobuf byte string get msg ( ) { return msg ; }


return { @ code true } if the current instance is a subclass of delimiter based frame decoder

private boolean is subclass ( ) { return get class ( ) ! = delimiter based frame decoder class ; }