the test expects read ahead manager to return 0 received bytes when previous read ahead on the offset had failed and not throw exception received then also checks that the read buffers are evicted as per the read buffer manager threshold criteria

public void test read ahead manager for older read ahead failure ( ) throws exception { abfs client client = get mock abfs client ( ) ; abfs rest operation success op = get mock rest op ( ) ; / / stub : / / first read request leads to 3 readahead calls : fail all 3 readahead - client read ( ) / / a second read request will see that readahead had failed for data in / / the requested offset range but also that its is an older readahead request / / system issue could have resolved by now , so attempt a new read only for the requested range do throw ( new timeout exception ( " internal server error for rah - x " ) ) do throw ( new timeout exception ( " internal server error for rah - x " ) ) do throw ( new timeout exception ( " internal server error for rah - x " ) ) do return ( success op ) / / pass the read for second read request do return ( success op ) / / pass success for post eviction test when ( client ) read ( any ( string class ) , any ( long class ) , any ( byte [ ] class ) , any ( integer class ) , any ( integer class ) , any ( string class ) , any ( string class ) ) ; abfs input stream input stream = get abfs input stream ( client , " test read ahead manager for older read ahead failure txt " ) ; queue read aheads ( input stream ) ; / / abfs input stream read would have waited for the read - ahead for the requested offset / / as we are testing from read ahead manager directly , sleep for threshold age milliseconds so that / / read buffer qualifies for to be an old buffer thread sleep ( read buffer manager get buffer manager ( ) get threshold age milliseconds ( ) ) ; / / only the 3 read ahead threads should have triggered client read verify read call count ( client , 3 ) ; / / get block from a new read request should return 0 if there is a failure / / 30 sec before in read ahead buffer for respective offset int bytes read = read buffer manager get buffer manager ( ) get block ( input stream , one kb , one kb , new byte [ one kb ] ) ; assert assert equals ( " bytes read should be zero when previously read " + " ahead buffer had failed " , 0 , bytes read ) ; / / stub returns success for the 5th read request , if read buffers still / / persisted request would have failed for position 0 check evicted status ( input stream , 0 , false ) ; }


prepare the request for upsert , executing the upsert script if present , and returning a { @ code result } containing a new { @ code index request } to be executed on the primary and replicas

result prepare upsert ( shard id shard id , update request request , final get result get result , long supplier now in millis ) { if ( request upsert request ( ) = = null & & ! request doc as upsert ( ) ) { throw new document missing exception ( shard id , request id ( ) ) ; } index request index request = request doc as upsert ( ) ? request doc ( ) : request upsert request ( ) ; if ( request scripted upsert ( ) & & request script ( ) ! = null ) { / / run the script to perform the create logic index request upsert = request upsert request ( ) ; tuple < update op type , map < string , object > > upsert result = execute scripted upsert ( upsert source as map ( ) , request script , now in millis ) ; switch ( upsert result v 1 ( ) ) { case create : index request = requests index request ( request index ( ) ) source ( upsert result v 2 ( ) ) ; break ; case none : update response update = new update response ( shard id , get result get id ( ) , get result get seq no ( ) , get result get primary term ( ) , get result get version ( ) , doc write response result noop ) ; update set get result ( get result ) ; return new result ( update , doc write response result noop , upsert result v 2 ( ) , x content type json ) ; default : / / it ' s fine to throw an exception here , the leniency is handled / logged by ` execute scripted upsert ` throw new illegal argument exception ( " unknown upsert operation , got : " + upsert result v 1 ( ) ) ; } } index request index ( request index ( ) ) id ( request id ( ) ) set refresh policy ( request get refresh policy ( ) ) routing ( request routing ( ) ) timeout ( request timeout ( ) ) wait for active shards ( request wait for active shards ( ) ) / / it has to be a " create ! " create ( true ) ; if ( request version type ( ) ! = version type internal ) { / / in all but the internal versioning mode , we want to create the new document using the given version index request version ( request version ( ) ) version type ( request version type ( ) ) ; } return new result ( index request , doc write response result created , null , null ) ; }


adds or replace a block in the output result if this is a replacement , then any extra blocks that got added with the original get removed as a result of calling this method

private boolean add or replace block ( basic block block , int list subroutines ) { if ( block = = null ) { throw new null pointer exception ( " block = = null " ) ; } int idx = label to result index ( block get label ( ) ) ; boolean ret ; if ( idx < 0 ) { ret = false ; } else { / * * we are replacing a pre - existing block , so find any * blocks that got added as part of the original and * remove those too such blocks are ( possibly indirect ) * successors of this block which are out of the range of * normally - translated blocks * / remove block and special successors ( idx ) ; ret = true ; } result add ( block ) ; subroutines throw if mutable ( ) ; result subroutines add ( subroutines ) ; return ret ; }


mapping is logically " equal " to handle mapped with path attribute ( )

public void handle mapped with same path and value attributes ( ) { }


writes { @ code value } as a signed integer to { @ code out } , starting at { @ code offset } returns the number of bytes written

public static void write signed leb 1 2 8 ( byte array output stream out , int value ) { int remaining = value > > 7 ; boolean has more = true ; int end = ( ( value & integer min value ) = = 0 ) ? 0 : - 1 ; while ( has more ) { has more = ( remaining ! = end ) | | ( ( remaining & 1 ) ! = ( ( value > > 6 ) & 1 ) ) ; out write ( ( byte ) ( ( value & 0x 7f ) | ( has more ? 0x 8 0 : 0 ) ) ) ; value = remaining ; remaining > > = 7 ; } }


public boolean is compatible ( dalv insn insn ) { register spec list regs = insn get registers ( ) ; if ( ! ( ( insn instanceof cst insn ) & & ( regs size ( ) = = 1 ) & & unsigned fits in byte ( regs get ( 0 ) get reg ( ) ) ) ) { return false ; } cst insn ci = ( cst insn ) insn ; constant cst = ci get constant ( ) ; if ( ! ( cst instanceof cst literal bits ) ) { return false ; } cst literal bits cb = ( cst literal bits ) cst ; / / where the high bits are depends on the category of the target if ( regs get ( 0 ) get category ( ) = = 1 ) { int bits = cb get int bits ( ) ; return ( ( bits & 0xffff ) = = 0 ) ; } else { long bits = cb get long bits ( ) ; return ( ( bits & 0xffffffffffff l ) = = 0 ) ; } }


return true if this child cat all of object is equal to o

public boolean equals ( object o ) { if ( this = = o ) { return true ; } if ( o = = null | | get class ( ) ! = o get class ( ) ) { return false ; } child cat all of child cat all of = ( child cat all of ) o ; return objects equals ( this name , child cat all of name ) & & objects equals ( this pet type , child cat all of pet type ) ; }


utility method for tests converts an array of strings into a set of labels

public static set < label > as label set ( iterable < string > strings ) throws label syntax exception { set < label > result = sets new tree set ( ) ; for ( string s : strings ) { result add ( label parse absolute ( s , immutable map of ( ) ) ) ; } return result ; }


public long total memory ( ) { return this total memory ; }


get the parent body of this fixture this is null if the fixture is not attached

public body get body ( ) { return body ; }


get task status log file path on master host

public string get master tasks status log path ( ) { return configs map get ( master tasks status log path ) ; }


creates the toolbar that will be visible above the instruction table

protected j tool bar create toolbar ( ) { j tool bar toolbar 1 = new j tool bar ( ) ; toolbar 1 add ( box create horizontal glue ( ) ) ; create mask clear all btn ( toolbar 1 ) ; toolbar 1 add separator ( ) ; create mask data btn ( toolbar 1 ) ; create mask operands btn ( toolbar 1 ) ; create mask scalars btn ( toolbar 1 ) ; create mask addresses btn ( toolbar 1 ) ; toolbar 1 add separator ( ) ; create reload btn ( toolbar 1 ) ; toolbar 1 add separator ( ) ; create manual edit btn ( toolbar 1 ) ; toolbar 1 add separator ( ) ; create go to address btn ( toolbar 1 ) ; toolbar 1 set floatable ( false ) ; return toolbar 1 ; }


return the name of the class we were trying to load

public string get bean class name ( ) { return this bean class name ; }


looks under the given root path for any blob that are left " dangling " , meaning that they are place - holder blobs that we created while we upload the data to a temporary blob , but for some reason we crashed in the middle of the upload and left them there if any are found , we move them to the destination given

public void recover files with dangling temp data ( path root , path destination ) throws i o exception { log debug ( " recovering files with dangling temp data in { } " , root ) ; handle files with dangling temp data ( root , new dangling file recoverer ( destination ) ) ; }


sets the < code > name array < code > property

public xml item name array ( list < integer > name array ) { this name array = name array ; return this ; }


public list < o m f module > get o m f modules ( ) { return modules list ; }


if the current test method of the supplied { @ linkplain test context test context } is annotated with { @ code @ dirties context } and the { @ linkplain dirties context # method mode ( ) method mode } is set to { @ link method mode # after method after method } , or if the test class is annotated with { @ code @ dirties context } and the { @ linkplain dirties context # class mode ( ) class mode } is set to { @ link class mode # after each test method after each test method } , the { @ linkplain application context application context } of the test context will be { @ linkplain test context # mark application context dirty marked as dirty } and the { @ link dependency injection test execution listener # reinject dependencies attribute reinject dependencies attribute } in the test context will be set to { @ code true }

public void after test method ( test context test context ) throws exception { before or after test method ( test context , after method , after each test method ) ; }


public static void fix soft input leaks ( @ non null final window window ) { input method manager imm = ( input method manager ) utils get app ( ) get system service ( context input method service ) ; if ( imm = = null ) return ; string [ ] leak views = new string [ ] { " m last srv view " , " m cur root view " , " m served view " , " m next served view " } ; for ( string leak view : leak views ) { try { field leak view field = input method manager class get declared field ( leak view ) ; if ( ! leak view field is accessible ( ) ) { leak view field set accessible ( true ) ; } object obj = leak view field get ( imm ) ; if ( ! ( obj instanceof view ) ) continue ; view view = ( view ) obj ; if ( view get root view ( ) = = window get decor view ( ) get root view ( ) ) { leak view field set ( imm , null ) ; } } catch ( throwable ignore ) {


asserts that two { @ link module } s have the same structure needed because { @ link module } doesn ' t override { @ link object # equals }

public static void assert modules equal ( module module 1 , module module 2 ) { assert that ( module 1 get client data ( ) ) is equal to ( module 2 get client data ( ) ) ; assert that ( module 1 get globals ( ) ) contains exactly entries in ( module 2 get globals ( ) ) in order ( ) ; assert that ( module 1 get predeclared bindings ( ) ) contains exactly entries in ( module 2 get predeclared bindings ( ) ) in order ( ) ; }


returns the { @ link abstract type program interface } component

public abstract type program interface get type program interface ( ) { return type program interface ; }


get the element at the supplied index , creating it if there is no element at that index

public e get ( int index ) { int backing list size = this backing list size ( ) ; e element = null ; if ( index < backing list size ) { element = this backing list get ( index ) ; if ( element = = null ) { element = this element factory create element ( index ) ; this backing list set ( index , element ) ; } } else { for ( int x = backing list size ; x < index ; x + + ) { this backing list add ( null ) ; } element = this element factory create element ( index ) ; this backing list add ( element ) ; } return element ; }


public put datafeed response update datafeed ( update datafeed request request , request options options ) throws i o exception { return rest high level client perform request and parse entity ( request , m l request converters : : update datafeed , options , put datafeed response : : from x content , collections empty set ( ) ) ; }


public void delete pet ( long pet id , string api key , handler < async result < void > > result handler ) { delegate delete pet ( pet id , api key , result handler ) ; }


public void class name test ( ) { / / todo : test class name }


return the list of argument resolvers to use invoked only if the resolvers have not already been set via { @ link # set argument resolvers } subclasses should also take into account custom argument types configured via { @ link # set custom argument resolvers }

protected abstract list < ? extends handler method argument resolver > init argument resolvers ( ) ;


private static callable < boolean > get dir create task ( final file system fs , final path dir ) { return ( ) - > { try { fs mkdirs ( dir ) ; return true ; } catch ( remote exception re ) { return false ; } } ; }


gets the next script argument from the script argument array to process designed to be called by the " ask " methods

private string next script arg ( ) throws index out of bounds exception { if ( ask script arg index > = script args length ) { throw new index out of bounds exception ( " script is looking for script argument # " + ( ask script arg index + 1 ) + " , but only " + script args length + " were passed in " ) ; } return script args [ ask script arg index + + ] ; }


gets the instructions array it is shared and gets modified by subsequent calls to this instance

public array list < insn > get insns ( ) { return insns ; }


kills the process ( or process group ) by sending the signal sigkill

private static void sig kill ( string pid , boolean is process group , long sleeptime before sigkill , boolean in background ) { if ( in background ) { / / use a separate thread for killing sig kill thread sig kill thread = new sig kill thread ( pid , is process group , sleeptime before sigkill ) ; sig kill thread set daemon ( true ) ; sig kill thread start ( ) ; } else { sig kill in current thread ( pid , is process group , sleeptime before sigkill ) ; } }


private value finish ( ) { if ( target object ! = null ) { return target object ; } / * * the object hasn ' t been built which ought to mean we ' re missing some constructor arguments but they could be optional ! we ' ll * check if they are all optional and build the error message at the same time - if we don ' t start the error message then they * were all optional ! * / string builder message = null ; for ( int i = 0 ; i < constructor args length ; i + + ) { if ( constructor args [ i ] ! = null ) continue ; constructor arg info arg = constructor arg infos get ( i ) ; if ( false = = arg required ) continue ; if ( message = = null ) { message = new string builder ( " required [ " ) append ( arg field ) ; } else { message append ( " , " ) append ( arg field ) ; } } if ( message ! = null ) { / / there were non - optional constructor arguments missing throw new illegal argument exception ( message append ( ' ] ' ) to string ( ) ) ; } / * * if there weren ' t any constructor arguments declared at all then we won ' t get an error message but this isn ' t really a valid * use of constructing object parser you should be using object parser instead since this is more of a programmer error and the * parser ought to still work we just assert this * / assert false = = constructor arg infos is empty ( ) : " [ " + object parser get name ( ) + " ] must configure at least one constructor " + " argument if it doesn ' t have any it should use object parser instead of constructing object parser this is a bug " + " in the parser declaration " ; / / all missing constructor arguments were optional just build the target and return it build target ( ) ; return target object ; }


merging a late window should not register a timer , otherwise we would get two firings : one from on element ( ) on the merged window and one from the timer

public void test merging late windows ( ) throws exception { trigger test harness < object , time window > test harness = new trigger test harness < > ( event time trigger create ( ) , new time window serializer ( ) ) ; assert true ( event time trigger create ( ) can merge ( ) ) ; assert equals ( trigger result continue , test harness process element ( new stream record < object > ( 1 ) , new time window ( 0 , 2 ) ) ) ; assert equals ( trigger result continue , test harness process element ( new stream record < object > ( 1 ) , new time window ( 2 , 4 ) ) ) ; assert equals ( 0 , test harness num state entries ( ) ) ; assert equals ( 0 , test harness num processing time timers ( ) ) ; assert equals ( 2 , test harness num event time timers ( ) ) ; assert equals ( 1 , test harness num event time timers ( new time window ( 0 , 2 ) ) ) ; assert equals ( 1 , test harness num event time timers ( new time window ( 2 , 4 ) ) ) ; test harness advance watermark ( 10 ) ; assert equals ( 0 , test harness num state entries ( ) ) ; assert equals ( 0 , test harness num processing time timers ( ) ) ; assert equals ( 0 , test harness num event time timers ( ) ) ; assert equals ( 0 , test harness num event time timers ( new time window ( 0 , 2 ) ) ) ; assert equals ( 0 , test harness num event time timers ( new time window ( 2 , 4 ) ) ) ; test harness merge windows ( new time window ( 0 , 4 ) , lists new array list ( new time window ( 0 , 2 ) , new time window ( 2 , 4 ) ) ) ; assert equals ( 0 , test harness num state entries ( ) ) ; assert equals ( 0 , test harness num processing time timers ( ) ) ; assert equals ( 0 , test harness num event time timers ( ) ) ; assert equals ( 0 , test harness num event time timers ( new time window ( 0 , 2 ) ) ) ; assert equals ( 0 , test harness num event time timers ( new time window ( 2 , 4 ) ) ) ; assert equals ( 0 , test harness num event time timers ( new time window ( 0 , 4 ) ) ) ; }


grabs the file contents of the loaded resources

public static byte [ ] get file contents ( string name ) { for ( file container container : files ) { hash map < string , byte [ ] > files = container files ; if ( files contains key ( name ) ) return files get ( name ) ; } return null ; }


convert the given object to string with each line indented by 4 spaces ( except the first line )

private string to indented string ( java lang object o ) { if ( o = = null ) { return " null " ; } return o to string ( ) replace ( " \ n " , " \ n " ) ; }


assert that a multipart upload is successful even when the parts are given in reverse order and the part numbers are not contiguous

public void test multipart upload reverse order non contiguous part numbers ( ) throws exception { describe ( " upload in reverse order and the part numbers are not contiguous " ) ; path file = method path ( ) ; upload handle upload handle = start upload ( file ) ; message digest orig digest = digest utils get md 5 digest ( ) ; int payload count = 2 * get test payload count ( ) ; for ( int i = 2 ; i < = payload count ; i + = 2 ) { byte [ ] payload = generate payload ( i ) ; orig digest update ( payload ) ; } map < integer , part handle > part handles = new hash map < > ( ) ; for ( int i = payload count ; i > 0 ; i - = 2 ) { part handles put ( i , build and put part ( file , upload handle , i , null ) ) ; } complete upload ( file , upload handle , part handles , orig digest , get test payload count ( ) * part size in bytes ( ) ) ; }


sets the node at { @ code node index } to a leaf node

public tree builder add leaf ( int node index , double value ) { return add leaf ( node index , arrays as list ( value ) ) ; }


{ @ inherit doc } this implementation returns the identity hashcode of this instance this is proper , since instances of this class compare by identity ( see { @ link # equals } )

public final int hash code ( ) { return system identity hash code ( this ) ; }


positions the reader at the named key , or if none such exists , at the first entry after the named key

private synchronized int seek internal ( writable comparable key ) throws i o exception { return seek internal ( key , false ) ; }


creates a configured instance from the submitted form hudson only invokes this method when the user wants an instance of { @ code t } so there ' s no need to check that in the implementation starting 1 206 , the default implementation of this method does the following : req bind j s o n ( clazz , form data ) ; which performs the databinding on the constructor of { @ link # clazz } for some types of { @ link describable } , such as { @ link list view column } , this method can be invoked with null request object for historical reason such design is considered broken , but due to the compatibility reasons we cannot fix it because of this , the default implementation gracefully handles null request , but the contract of the method still is " request is always non - null " extension points that need to define the " default instance " semantics should define a descriptor subtype and add the no - arg new instance method

public t new instance ( @ nullable stapler request req , @ non null j s o n object form data ) throws form exception { try { method m = get class ( ) get method ( " new instance " , stapler request class ) ; if ( ! modifier is abstract ( m get declaring class ( ) get modifiers ( ) ) ) { / / this class overrides new instance ( stapler request ) / / maintain the backward compatible behavior return verify new instance ( new instance ( req ) ) ; } else { if ( req = = null ) { / / yes , req is supposed to be always non - null , but see the note above return verify new instance ( clazz new instance ( ) ) ; } / / new behavior as of 1 206 bind interceptor old interceptor = req get bind interceptor ( ) ; try { new instance bind interceptor interceptor ; if ( old interceptor instanceof new instance bind interceptor ) { interceptor = ( new instance bind interceptor ) old interceptor ; } else { interceptor = new new instance bind interceptor ( old interceptor ) ; req set bind interceptor ( interceptor ) ; } interceptor processed put ( form data , true ) ; return verify new instance ( req bind j s o n ( clazz , form data ) ) ; } finally { req set bind interceptor ( old interceptor ) ; } } } catch ( no such method exception e ) { throw new assertion error ( e ) ; / / impossible } catch ( instantiation exception | illegal access exception | runtime exception e ) { throw new error ( " failed to instantiate " + clazz + " from " + redact secret json in error message sanitizer instance sanitize ( form data ) , e ) ; } }


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


register bean definitions as necessary based on the given annotation metadata of the importing { @ code @ configuration } class note that { @ link bean definition registry post processor } types may not be registered here , due to lifecycle constraints related to { @ code @ configuration } class processing the default implementation delegates to { @ link # register bean definitions ( annotation metadata , bean definition registry ) }

default void register bean definitions ( annotation metadata importing class metadata , bean definition registry registry , bean name generator import bean name generator ) { register bean definitions ( importing class metadata , registry ) ; }


adds a package reference to the constant pool of the class being build does nothing if the constant pool already contains a similar item this method is intended for { @ link attribute } sub classes , and is normally not needed by class generators or adapters

public int new package ( final string package name ) { return symbol table add constant package ( package name ) index ; }


wait up to the specified timeout for this task to meet the expected number of commits as defined by { @ code expected commits }

public void await commits ( long timeout , time unit unit ) throws interrupted exception { if ( records to commit latch = = null ) { throw new illegal state exception ( " illegal state encountered expected records ( ) was not set for this task ? " ) ; } if ( ! records to commit latch await ( timeout , unit ) ) { string msg = string format ( " insufficient records seen by task % s in % d millis records expected = % d , actual = % d " , task id , unit to millis ( timeout ) , expected commits , expected commits - records to commit latch get count ( ) ) ; throw new data exception ( msg ) ; } log debug ( " task { } saw { } records , expected { } records " , task id , expected commits - records to commit latch get count ( ) , expected commits ) ; }


sleeps for the specified number of milliseconds

public void pause ( int millisecs ) { try { thread sleep ( millisecs ) ; } catch ( interrupted exception e ) { } }


reads the raw bytes following a < code > type vector < code > code

public byte [ ] read raw vector ( ) throws i o exception { buffer buffer = new buffer ( ) ; int length = read vector header ( ) ; buffer append ( new byte [ ] { ( byte ) type vector code , ( byte ) ( 0xff & ( length > > 24 ) ) , ( byte ) ( 0xff & ( length > > 16 ) ) , ( byte ) ( 0xff & ( length > > 8 ) ) , ( byte ) ( 0xff & length ) } ) ; for ( int i = 0 ; i < length ; i + + ) { buffer append ( read raw ( ) ) ; } return buffer get ( ) ; }


for the list of job ids find all that match existing jobs ids the repsonse is all the job ids in { @ code ids } that match an existing job id

public void job id matches ( list < string > ids , action listener < list < string > > listener ) { bool query builder bool query builder = new bool query builder ( ) ; bool query builder filter ( new term query builder ( job job type get preferred name ( ) , job anomaly detector job type ) ) ; bool query builder filter ( new terms query builder ( job id get preferred name ( ) , ids ) ) ; search source builder source builder = new search source builder ( ) query ( bool query builder ) ; source builder fetch source ( false ) ; source builder doc value field ( job id get preferred name ( ) , null ) ; search request search request = client prepare search ( ml config index index name ( ) ) set indices options ( indices options lenient expand open ( ) ) set source ( source builder ) set size ( ids size ( ) ) request ( ) ; execute async with origin ( client thread pool ( ) get thread context ( ) , ml origin , search request , action listener < search response > wrap ( response - > { search hit [ ] hits = response get hits ( ) get hits ( ) ; list < string > matched ids = new array list < > ( ) ; for ( search hit hit : hits ) { matched ids add ( hit field ( job id get preferred name ( ) ) get value ( ) ) ; } listener on response ( matched ids ) ; } , listener : : on failure ) , client : : search ) ; }


public static byte [ ] copy of ( byte [ ] src , int length ) { byte [ ] dest = new byte [ length ] ; system arraycopy ( src , 0 , dest , 0 , math min ( src length , length ) ) ; return dest ; }


initializes the classes in the given program class pool and library class pool , performs some basic checks , and shrinks the library class pool

public void execute ( class pool program class pool , class pool library class pool ) throws i o exception { int original library class pool size = library class pool size ( ) ; / / perform basic checks on the configuration warning printer fully qualified class name note printer = new warning printer ( system out , configuration note ) ; fully qualified class name checker fully qualified class name checker = new fully qualified class name checker ( program class pool , library class pool , fully qualified class name note printer ) ; fully qualified class name checker check class specifications ( configuration keep ) ; fully qualified class name checker check class specifications ( configuration assume no side effects ) ; string matcher keep attributes matcher = configuration keep attributes ! = null ? new list parser ( new name parser ( ) ) parse ( configuration keep attributes ) : new empty string matcher ( ) ; warning printer get annotation note printer = new warning printer ( system out , configuration note ) ; if ( ! keep attributes matcher matches ( class constants attr runtime visible annotations ) ) { program class pool classes accept ( new all constant visitor ( new get annotation checker ( get annotation note printer ) ) ) ; } warning printer get signature note printer = new warning printer ( system out , configuration note ) ; if ( ! keep attributes matcher matches ( class constants attr signature ) ) { program class pool classes accept ( new all constant visitor ( new get signature checker ( get signature note printer ) ) ) ; } warning printer get enclosing class note printer = new warning printer ( system out , configuration note ) ; if ( ! keep attributes matcher matches ( class constants attr inner classes ) ) { program class pool classes accept ( new all constant visitor ( new get enclosing class checker ( get enclosing class note printer ) ) ) ; } warning printer get enclosing method note printer = new warning printer ( system out , configuration note ) ; if ( ! keep attributes matcher matches ( class constants attr enclosing method ) ) { program class pool classes accept ( new all constant visitor ( new get enclosing method checker ( get enclosing method note printer ) ) ) ; } / / construct a reduced library class pool with only those library / / classes whose hierarchies are referenced by the program classes / / we can ' t do this if we later have to come up with the obfuscated / / class member names that are globally unique class pool reduced library class pool = configuration use unique class member names ? null : new class pool ( ) ; warning printer class reference warning printer = new warning printer ( system err , configuration warn ) ; warning printer dependency warning printer = new warning printer ( system err , configuration warn ) ; / / initialize the superclass hierarchies for program classes program class pool classes accept ( new class super hierarchy initializer ( program class pool , library class pool , class reference warning printer , null ) ) ; / / initialize the superclass hierarchy of all library classes , without / / warnings library class pool classes accept ( new class super hierarchy initializer ( program class pool , library class pool , null , dependency warning printer ) ) ; / / initialize the class references of program class members and / / attributes note that all superclass hierarchies have to be / / initialized for this purpose warning printer program member reference warning printer = new warning printer ( system err , configuration warn ) ; warning printer library member reference warning printer = new warning printer ( system err , configuration warn ) ; program class pool classes accept ( new class reference initializer ( program class pool , library class pool , class reference warning printer , program member reference warning printer , library member reference warning printer , null ) ) ; if ( reduced library class pool ! = null ) { / / collect the library classes that are directly referenced by / / program classes , without introspection program class pool classes accept ( new referenced class visitor ( new library class filter ( new class pool filler ( reduced library class pool ) ) ) ) ; / / reinitialize the superclass hierarchies of referenced library / / classes , this time with warnings reduced library class pool classes accept ( new class super hierarchy initializer ( program class pool , library class pool , class reference warning printer , null ) ) ; } / / initialize the enum annotation references program class pool classes accept ( new all attribute visitor ( true , new all element value visitor ( true , new enum field reference initializer ( ) ) ) ) ; / / initialize the class for name references warning printer dynamic class reference note printer = new warning printer ( system out , configuration note ) ; warning printer class for name note printer = new warning printer ( system out , configuration note ) ; program class pool classes accept ( new all method visitor ( new all attribute visitor ( new all instruction visitor ( new dynamic class reference initializer ( program class pool , library class pool , dynamic class reference note printer , null , class for name note printer , create class note exception matcher ( configuration keep ) ) ) ) ) ) ; / / initialize the class get [ declared ] { field , method } references warning printer get member note printer = new warning printer ( system out , configuration note ) ; program class pool classes accept ( new all method visitor ( new all attribute visitor ( new all instruction visitor ( new dynamic member reference initializer ( program class pool , library class pool , get member note printer , create class member note exception matcher ( configuration keep , true ) , create class member note exception matcher ( configuration keep , false ) ) ) ) ) ) ; / / initialize other string constant references , if requested if ( configuration adapt class strings ! = null ) { program class pool classes accept ( new class name filter ( configuration adapt class strings , new all constant visitor ( new string reference initializer ( program class pool , library class pool ) ) ) ) ; } / / initialize the class references of library class members if ( reduced library class pool ! = null ) { / / collect the library classes that are referenced by program / / classes , directly or indirectly , with or without reflection program class pool classes accept ( new referenced class visitor ( new library class filter ( new class hierarchy traveler ( true , true , true , false , new library class filter ( new class pool filler ( reduced library class pool ) ) ) ) ) ) ; / / initialize the class references of referenced library / / classes , without warnings reduced library class pool classes accept ( new class reference initializer ( program class pool , library class pool , null , null , null , dependency warning printer ) ) ; / / reset the library class pool library class pool clear ( ) ; / / copy the library classes that are referenced directly by program / / classes and the library classes that are referenced by referenced / / library classes reduced library class pool classes accept ( new multi class visitor ( new class visitor [ ] { new class hierarchy traveler ( true , true , true , false , new library class filter ( new class pool filler ( library class pool ) ) ) , new referenced class visitor ( new library class filter ( new class hierarchy traveler ( true , true , true , false , new library class filter ( new class pool filler ( library class pool ) ) ) ) ) } ) ) ; } else { / / initialize the class references of all library class members library class pool classes accept ( new class reference initializer ( program class pool , library class pool , null , null , null , dependency warning printer ) ) ; } / / initialize the subclass hierarchies program class pool classes accept ( new class sub hierarchy initializer ( ) ) ; library class pool classes accept ( new class sub hierarchy initializer ( ) ) ; / / share strings between the classes , to reduce heap memory usage program class pool classes accept ( new string sharer ( ) ) ; library class pool classes accept ( new string sharer ( ) ) ; / / check for any unmatched class members warning printer class member note printer = new warning printer ( system out , configuration note ) ; class member checker class member checker = new class member checker ( program class pool , class member note printer ) ; class member checker check class specifications ( configuration keep ) ; class member checker check class specifications ( configuration assume no side effects ) ; / / check for unkept descriptor classes of kept class members warning printer descriptor keep note printer = new warning printer ( system out , configuration note ) ; new descriptor keep checker ( program class pool , library class pool , descriptor keep note printer ) check class specifications ( configuration keep ) ; / / check for keep options that only match library classes warning printer library keep note printer = new warning printer ( system out , configuration note ) ; new library keep checker ( program class pool , library class pool , library keep note printer ) check class specifications ( configuration keep ) ; / / print out a summary of the notes , if necessary int fully qualified note count = fully qualified class name note printer get warning count ( ) ; if ( fully qualified note count > 0 ) { system out println ( " note : there were " + fully qualified note count + " references to unknown classes " ) ; system out println ( " you should check your configuration for typos " ) ; system out println ( " ( http : / / proguard sourceforge net / manual / troubleshooting html # unknownclass ) " ) ; } int class member note count = class member note printer get warning count ( ) ; if ( class member note count > 0 ) { system out println ( " note : there were " + class member note count + " references to unknown class members " ) ; system out println ( " you should check your configuration for typos " ) ; } int get annotation note count = get annotation note printer get warning count ( ) ; if ( get annotation note count > 0 ) { system out println ( " note : there were " + get annotation note count + " classes trying to access annotations using reflection " ) ; system out println ( " you should consider keeping the annotation attributes " ) ; system out println ( " ( using ' - keepattributes * annotation * ' ) " ) ; system out println ( " ( http : / / proguard sourceforge net / manual / troubleshooting html # attributes ) " ) ; } int get signature note count = get signature note printer get warning count ( ) ; if ( get signature note count > 0 ) { system out println ( " note : there were " + get signature note count + " classes trying to access generic signatures using reflection " ) ; system out println ( " you should consider keeping the signature attributes " ) ; system out println ( " ( using ' - keepattributes signature ' ) " ) ; system out println ( " ( http : / / proguard sourceforge net / manual / troubleshooting html # attributes ) " ) ; } int get enclosing class note count = get enclosing class note printer get warning count ( ) ; if ( get enclosing class note count > 0 ) { system out println ( " note : there were " + get enclosing class note count + " classes trying to access enclosing classes using reflection " ) ; system out println ( " you should consider keeping the inner classes attributes " ) ; system out println ( " ( using ' - keepattributes inner classes ' ) " ) ; system out println ( " ( http : / / proguard sourceforge net / manual / troubleshooting html # attributes ) " ) ; } int get enclosing method note count = get enclosing method note printer get warning count ( ) ; if ( get enclosing method note count > 0 ) { system out println ( " note : there were " + get enclosing method note count + " classes trying to access enclosing methods using reflection " ) ; system out println ( " you should consider keeping the enclosing method attributes " ) ; system out println ( " ( using ' - keepattributes inner classes , enclosing method ' ) " ) ; system out println ( " ( http : / / proguard sourceforge net / manual / troubleshooting html # attributes ) " ) ; } int descriptor note count = descriptor keep note printer get warning count ( ) ; if ( descriptor note count > 0 ) { system out println ( " note : there were " + descriptor note count + " unkept descriptor classes in kept class members " ) ; system out println ( " you should consider explicitly keeping the mentioned classes " ) ; system out println ( " ( using ' - keep ' ) " ) ; system out println ( " ( http : / / proguard sourceforge net / manual / troubleshooting html # descriptorclass ) " ) ; } int library note count = library keep note printer get warning count ( ) ; if ( library note count > 0 ) { system out println ( " note : there were " + library note count + " library classes explicitly being kept " ) ; system out println ( " you don ' t need to keep library classes ; they are already left unchanged " ) ; system out println ( " ( http : / / proguard sourceforge net / manual / troubleshooting html # libraryclass ) " ) ; } int dynamic class reference note count = dynamic class reference note printer get warning count ( ) ; if ( dynamic class reference note count > 0 ) { system out println ( " note : there were " + dynamic class reference note count + " unresolved dynamic references to classes or interfaces " ) ; system out println ( " you should check if you need to specify additional program jars " ) ; system out println ( " ( http : / / proguard sourceforge net / manual / troubleshooting html # dynamicalclass ) " ) ; } int class for name note count = class for name note printer get warning count ( ) ; if ( class for name note count > 0 ) { system out println ( " note : there were " + class for name note count + " class casts of dynamically created class instances " ) ; system out println ( " you might consider explicitly keeping the mentioned classes and / or " ) ; system out println ( " their implementations ( using ' - keep ' ) " ) ; system out println ( " ( http : / / proguard sourceforge net / manual / troubleshooting html # dynamicalclasscast ) " ) ; } int getmember note count = get member note printer get warning count ( ) ; if ( getmember note count > 0 ) { system out println ( " note : there were " + getmember note count + " accesses to class members by means of introspection " ) ; system out println ( " you should consider explicitly keeping the mentioned class members " ) ; system out println ( " ( using ' - keep ' or ' - keepclassmembers ' ) " ) ; system out println ( " ( http : / / proguard sourceforge net / manual / troubleshooting html # dynamicalclassmember ) " ) ; } / / print out a summary of the warnings , if necessary int class reference warning count = class reference warning printer get warning count ( ) ; if ( class reference warning count > 0 ) { system err println ( " warning : there were " + class reference warning count + " unresolved references to classes or interfaces " ) ; system err println ( " you may need to add missing library jars or update their versions " ) ; system err println ( " if your code works fine without the missing classes , you can suppress " ) ; system err println ( " the warnings with ' - dontwarn ' options " ) ; if ( configuration skip non public library classes ) { system err println ( " you may also have to remove the option ' - skipnonpubliclibraryclasses ' " ) ; } system err println ( " ( http : / / proguard sourceforge net / manual / troubleshooting html # unresolvedclass ) " ) ; } int dependency warning count = dependency warning printer get warning count ( ) ; if ( dependency warning count > 0 ) { system err println ( " warning : there were " + dependency warning count + " instances of library classes depending on program classes " ) ; system err println ( " you must avoid such dependencies , since the program classes will " ) ; system err println ( " be processed , while the library classes will remain unchanged " ) ; system err println ( " ( http : / / proguard sourceforge net / manual / troubleshooting html # dependency ) " ) ; } int program member reference warning count = program member reference warning printer get warning count ( ) ; if ( program member reference warning count > 0 ) { system err println ( " warning : there were " + program member reference warning count + " unresolved references to program class members " ) ; system err println ( " your input classes appear to be inconsistent " ) ; system err println ( " you may need to recompile the code " ) ; system err println ( " ( http : / / proguard sourceforge net / manual / troubleshooting html # unresolvedprogramclassmember ) " ) ; } int library member reference warning count = library member reference warning printer get warning count ( ) ; if ( library member reference warning count > 0 ) { system err println ( " warning : there were " + library member reference warning count + " unresolved references to library class members " ) ; system err println ( " you probably need to update the library versions " ) ; if ( ! configuration skip non public library class members ) { system err println ( " alternatively , you may have to specify the option " ) ; system err println ( " ' - dontskipnonpubliclibraryclassmembers ' " ) ; } if ( configuration skip non public library classes ) { system err println ( " you may also have to remove the option ' - skipnonpubliclibraryclasses ' " ) ; } system err println ( " ( http : / / proguard sourceforge net / manual / troubleshooting html # unresolvedlibraryclassmember ) " ) ; } if ( ( class reference warning count > 0 | | dependency warning count > 0 | | program member reference warning count > 0 | | library member reference warning count > 0 ) & & ! configuration ignore warnings ) { throw new i o exception ( " please correct the above warnings first " ) ; } if ( ( configuration note = = null | | ! configuration note is empty ( ) ) & & ( configuration warn ! = null & & configuration warn is empty ( ) | | configuration ignore warnings ) ) { system out println ( " note : you ' re ignoring all warnings ! " ) ; } / / discard unused library classes if ( configuration verbose ) { system out println ( " ignoring unused library classes " ) ; system out println ( " original number of library classes : " + original library class pool size ) ; system out println ( " final number of library classes : " + library class pool size ( ) ) ; } }


set up two services and their failover controllers svc 1 is started first , so that it enters active state , and then svc 2 is started , which enters standby

public void start ( ) throws exception { start ( 2 ) ; }


public netty channel builder keep alive without calls ( boolean enable ) { keep alive without calls = enable ; return this ; }


creates a new root resource file for a given jar file

public static resource file open jar resource file ( file jar file , jar entry filter filter ) throws i o exception { jar resource root = new jar resource ( jar file , filter ) ; resource file root resource file = new resource file ( root ) ; jar roots map put ( jar file get canonical path ( ) , root ) ; return root resource file ; }


use { @ link # get labels map ( ) } instead

public java util map < java lang string , java lang string > get labels ( ) { return get labels map ( ) ; }


public idle state state ( ) { return state ; }


initialize the cipher with the public key and then start to encrypt select attributes

protected abstract void encode attributes internal ( map < string , object > attributes , map < string , string > cached attributes to encode , registered service cipher executor cipher , registered service registered service , web application service web application service ) ;


in this testcase , client is is a node outside of file system so the 1st replica can be placed on any node the 2nd replica should be placed on a different rack , the 3rd replica should be placed on the same rack as the 2nd replica ,

public void test choose target 5 ( ) throws exception { update heartbeat with usage ( ) ; datanode storage info [ ] targets ; targets = choose target ( 0 , node ) ; assert equals ( targets length , 0 ) ; targets = choose target ( 1 , node ) ; assert equals ( targets length , 1 ) ; targets = choose target ( 2 , node ) ; assert equals ( targets length , 2 ) ; assert false ( is on same rack ( targets [ 0 ] , targets [ 1 ] ) ) ; targets = choose target ( 3 , node ) ; assert equals ( targets length , 3 ) ; assert true ( is on same rack ( targets [ 1 ] , targets [ 2 ] ) ) ; assert false ( is on same rack ( targets [ 0 ] , targets [ 1 ] ) ) ; verify no two targets on same node group ( targets ) ; }


returns origin null count of the given column

public double get column origin null count ( rel node rel , int index ) { for ( ; ; ) { try { return column origin null count handler get column origin null count ( rel , this , index ) ; } catch ( janino rel metadata provider no handler e ) { column origin null count handler = revise ( e rel class , flink metadata column origin null count def ) ; } } }


returns a new { @ link extractor media source } using the current parameters

public extractor media source create media source ( media item media item ) { assertions check not null ( media item playback properties ) ; return new extractor media source ( media item playback properties uri , data source factory , extractors factory , load error handling policy , custom cache key , continue loading check interval bytes , media item playback properties tag ! = null ? media item playback properties tag : tag ) ; }


this is called when recoverable exceptions occur at runtime by default they are ignored and epoxy will recover , but you can override this to be aware of when they happen a common use for this is being aware of duplicates when { @ link # set filter duplicates ( boolean ) } is enabled by default the global exception handler provided by { @ link # set global exception handler ( exception handler ) } is called with the exception overriding this allows you to provide your own handling for a controller

protected void on exception swallowed ( @ non null runtime exception exception ) { global exception handler on exception ( this , exception ) ; }


post storeorder : place an order for a pet

default response entity < order > place order ( @ api param ( value = " order placed for purchasing the pet " , required = true ) @ valid @ request body order body ) { return get delegate ( ) place order ( body ) ; }


gets the purpose for the { @ code cc compilation context }

public string get purpose ( ) { / / proto support creates multiple { @ code cc compilation context } s for a single rule , / / potentially / / multiple archives per build configuration this covers that worst case return " objc cpp semantics build arch " + build configuration get mnemonic ( ) + " with suffix " + intermediate artifacts archive file name suffix ( ) ; }


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


sets the window title defaults to empty string

public void set title ( string title ) { this title = title ; }


calls the appropriate observer method based on the type of the notification does not check for a subscription notification

public static < t > boolean accept ( object o , observer < ? super t > observer ) { if ( o = = complete ) { observer on complete ( ) ; return true ; } else if ( o instanceof error notification ) { observer on error ( ( ( error notification ) o ) e ) ; return true ; } observer on next ( ( t ) o ) ; return false ; }


public byte [ ] get heap memory ( ) { return heap memory ; }


registers a catalog under the given name the catalog name must be unique

public void register catalog ( string catalog name , catalog catalog ) { check argument ( ! string utils is null or whitespace only ( catalog name ) , " catalog name cannot be null or empty " ) ; check not null ( catalog , " catalog cannot be null " ) ; if ( catalogs contains key ( catalog name ) ) { throw new catalog exception ( format ( " catalog % s already exists " , catalog name ) ) ; } catalog open ( ) ; catalogs put ( catalog name , catalog ) ; }


marks the given constant pool entry of the given class

private void mark constant ( clazz clazz , int index ) { clazz constant pool entry accept ( index , this ) ; }


specify the custom editors to register via a { @ link map } , using the class name of the required type as the key and the class name of the associated { @ link property editor } as value

public void set custom editors ( map < class < ? > , class < ? extends property editor > > custom editors ) { this custom editors = custom editors ; }


uses a hash table to map keys to value collections the collections returned by { @ link multimap # key set ( ) } , { @ link multimap # keys ( ) } , and { @ link multimap # as map ( ) } will iterate through the keys in the order that they were first added to the multimap , save that if all values associated with a key are removed and then the key is added back into the multimap , that key will come last in the key iteration order

public static multimap builder with keys < object > linked hash keys ( ) { return linked hash keys ( default expected keys ) ; }


parses a single exported symbol from the given map file line

public static map export parse ( string export line , int line number ) throws parse exception { string name ; long addr ; string tokenizer st = new string tokenizer ( export line ) ; / / ignore first field if ( st has more tokens ( ) ) { st next token ( ) ; } else { throw new parse exception ( " line " + line number + " : failed to parse first field " , line number ) ; } / / parse name field if ( st has more tokens ( ) ) { name = st next token ( ) ; } else { throw new parse exception ( " line " + line number + " : failed to parse second ( name ) field " , line number ) ; } / / get addr field if ( st has more tokens ( ) ) { try { addr = long parse long ( st next token ( ) , 16 ) ; } catch ( number format exception e ) { throw new parse exception ( " line " + line number + " : failed to parse third ( addr ) field " , line number ) ; } } else { throw new parse exception ( " line " + line number + " : failed to parse third ( addr ) field " , line number ) ; } return new map export ( name , addr ) ; }


static helper method to easily display an single - option dialog the dialog will remain until the user presses the option 1 button or the cancel button

public static int show option dialog ( component parent , string title , string message , string option 1 , int message type , string default button name ) { return swing run now ( ( ) - > { option dialog info = new option dialog ( title , message , option 1 , message type , null , default button name ) ; return info show ( parent ) ; } ) ; }


gets the view properties configured for this view

public describable list < view property , view property descriptor > get properties ( ) { / / read resolve was the best place to do this , but for compatibility reasons , / / this class can no longer have read resolve ( ) ( the mechanism itself isn ' t suitable for class hierarchy ) / / see jenkins - 9431 / / / / until we have that , putting this logic here synchronized ( property list class ) { if ( properties = = null ) { properties = new property list ( this ) ; } else { properties set owner ( this ) ; } return properties ; } }


return whether the scanner has been started

boolean get run status ( ) { return should run get ( ) ; }


test the property ' map of map property '

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


unblocks all threads and runs all listeners

private static void complete ( abstract future < ? > future ) { listener next = null ; outer : while ( true ) { future release waiters ( ) ; / / we call this before the listeners in order to avoid needing to manage a separate stack data / / structure for them also , some implementations rely on this running prior to listeners / / so that the cleanup work is visible to listeners / / after done ( ) should be generally fast and only used for cleanup work but in theory can / / also be recursive and create stack overflow errors future after done ( ) ; / / push the current set of listeners onto next next = future clear listeners ( next ) ; future = null ; while ( next ! = null ) { listener curr = next ; next = next next ; runnable task = curr task ; if ( task instanceof set future ) { set future < ? > set future = ( set future < ? > ) task ; / / we unwind set future specifically to avoid stack overflow errors in the case of long / / chains of set futures / / handling this special case is important because there is no way to pass an executor to / / set future , so a user couldn ' t break the chain by doing this themselves it is also / / potentially common if someone writes a recursive futures transform async transformer future = set future owner ; if ( future value = = set future ) { object value to set = get future value ( set future future ) ; if ( atomic helper cas value ( future , set future , value to set ) ) { continue outer ; } } / / other wise the future we were trying to set is already done } else { execute listener ( task , curr executor ) ; } } break ; } }


deactivates retroactive trimming ( idempotently , so has no effect if already inactive )

void deactivate retroactive trimming ( ) { trimming listener deactivate ( ) ; }


public long plus millis 0 ( final long time , final long millis ) { return time + milliseconds to nanos ( millis ) ; }


post fakeouterboolean test serialization of outer boolean types

default response entity < boolean > fake outer boolean serialize ( @ api param ( value = " input boolean as post body " ) @ valid @ request body ( required = false ) boolean body ) { return get delegate ( ) fake outer boolean serialize ( body ) ; }


validate zk path with the path itself included in the exception text

public static string validate z k path ( string path ) throws invalid pathname exception { try { path utils validate path ( path ) ; } catch ( illegal argument exception e ) { throw new invalid pathname exception ( path , " invalid path \ " " + path + " \ " : " + e , e ) ; } return path ; }


the specification of this method matches that of { @ link # create ( path , enum set , options create opts ) } except that the opts have been declared explicitly

public abstract f s data output stream create internal ( path f , enum set < create flag > flag , fs permission absolute permission , int buffer size , short replication , long block size , progressable progress , checksum opt checksum opt , boolean create parent ) throws access control exception , file already exists exception , file not found exception , parent not directory exception , unsupported file system exception , unresolved link exception , i o exception ;


draws a circle outline with the center at x , y and a radius using the current color and stroke width

public void draw circle ( int x , int y , int radius ) { circle ( x , y , radius , draw type stroke ) ; }


for dual mode : get the text field containing the mnemonic portion of the assembly

public j text field get mnemonic field ( ) { return mnemonic ; }


adds a stored field to load and return ( note , it must be stored ) as part of the search request

public search request builder add stored field ( string field ) { source builder ( ) stored field ( field ) ; return this ; }


public abstract integer get decommission timeout ( ) ;


emits efficient instructions for a given integer push operation

public static void visit push instr ( method visitor mv , final int value ) { if ( value > = - 1 & & value < = 5 ) { mv visit insn ( opcodes iconst 0 + value ) ; } else if ( value > = byte min value & & value < = byte max value ) { mv visit int insn ( opcodes bipush , value ) ; } else if ( value > = short min value & & value < = short max value ) { mv visit int insn ( opcodes sipush , value ) ; } else { mv visit ldc insn ( value ) ; } }


until the data is committed , this file captures the written content

public file get temporary file ( ) { return tmp path to file ( ) ; }


this ensures that asynchronous state handles are actually materialized asynchronously we use latches to block at various stages and see if the code still continues through the parts that are not asynchronous if the checkpoint is not done asynchronously the test will simply lock forever

public void test fully async snapshot ( ) throws exception { final one input stream task test harness < string , string > test harness = new one input stream task test harness < > ( one input stream task : : new , basic type info string type info , basic type info string type info ) ; test harness setup output for singleton operator chain ( ) ; test harness configure for keyed stream ( new key selector < string , string > ( ) { @ override public string get key ( string value ) throws exception { return value ; } } , basic type info string type info ) ; stream config stream config = test harness get stream config ( ) ; file db dir = temporary folder new folder ( ) ; rocks d b state backend backend = new rocks d b state backend ( new memory state backend ( ) ) ; backend set db storage path ( db dir get absolute path ( ) ) ; stream config set state backend ( backend ) ; stream config set stream operator ( new async checkpoint operator ( ) ) ; stream config set operator i d ( new operator i d ( ) ) ; final one shot latch delay checkpoint latch = new one shot latch ( ) ; final one shot latch ensure checkpoint latch = new one shot latch ( ) ; checkpoint responder checkpoint responder mock = new checkpoint responder ( ) { @ override public void acknowledge checkpoint ( job i d job i d , execution attempt i d execution attempt i d , long checkpoint id , checkpoint metrics checkpoint metrics , task state snapshot subtask state ) { / / block on the latch , to verify that trigger checkpoint returns below , / / even though the async checkpoint would not finish try { delay checkpoint latch await ( ) ; } catch ( interrupted exception e ) { throw new runtime exception ( e ) ; } boolean has managed keyed state = false ; for ( map entry < operator i d , operator subtask state > entry : subtask state get subtask state mappings ( ) ) { operator subtask state state = entry get value ( ) ; if ( state ! = null ) { has managed keyed state | = state get managed keyed state ( ) ! = null ; } } / / should be one k / v state assert true ( has managed keyed state ) ; / / we now know that the checkpoint went through ensure checkpoint latch trigger ( ) ; } @ override public void decline checkpoint ( job i d job i d , execution attempt i d execution attempt i d , long checkpoint id , throwable cause ) { } } ; job i d job i d = new job i d ( ) ; execution attempt i d execution attempt i d = new execution attempt i d ( ) ; test task state manager task state manager test mock = new test task state manager ( job i d , execution attempt i d , checkpoint responder mock , test local recovery config disabled ( ) ) ; stream mock environment mock env = new stream mock environment ( test harness job config , test harness task config , test harness memory size , new mock input split provider ( ) , test harness buffer size , task state manager test mock ) ; atomic reference < throwable > error ref = new atomic reference < > ( ) ; mock env set external exception handler ( error ref : : set ) ; test harness invoke ( mock env ) ; test harness wait for task running ( ) ; final one input stream task < string , string > task = test harness get task ( ) ; task trigger checkpoint async ( new checkpoint meta data ( 42 , 17 ) , checkpoint options for checkpoint with default location ( ) , false ) get ( ) ; test harness process element ( new stream record < > ( " wohoo " , 0 ) ) ; / / now we allow the checkpoint delay checkpoint latch trigger ( ) ; / / wait for the checkpoint to go through ensure checkpoint latch await ( ) ; test harness end input ( ) ; executor service thread pool = task get async operations thread pool ( ) ; thread pool shutdown ( ) ; assert assert true ( thread pool await termination ( 60 000 , time unit milliseconds ) ) ; test harness wait for task completion ( ) ; if ( error ref get ( ) ! = null ) { fail ( " unexpected exception during execution " ) ; } }


public a p itest group parameters request int 6 4 group ( long int 6 4 group ) { this int 6 4 group = int 6 4 group ; return this ; }


the path at which this entry ' s visibility was defined ( eg public xml ) < code > optional aapt pb source source = 2 ; < code >

public builder set source ( com android aapt resources source builder builder for value ) { copy on write ( ) ; instance set source ( builder for value ) ; return this ; }


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


get exponential backoff power constant for the deregister stream operation

public double get deregister stream exp constant ( ) { return deregister stream exp constant ; }


writes the given { @ link abstract event } to all channels

void broadcast event ( abstract event event , boolean is priority event ) throws i o exception ;


resolves the specified name into an address

public final future < inet address > resolve ( string inet host , iterable < dns record > additionals , promise < inet address > promise ) { check not null ( promise , " promise " ) ; dns record [ ] additionals array = to array ( additionals , true ) ; try { do resolve ( inet host , additionals array , promise , resolve cache ) ; return promise ; } catch ( exception e ) { return promise set failure ( e ) ; } }


returns a human - readable string describing the last error encountered in the given context

private native string gav 1 get error message ( long context ) ;


prepare an instance to in - place decode the given list of longs note it ' s much more efficient to decode byte string buffers and only exists for compatibility

public static block list as longs decode longs ( list < long > blocks list ) { return decode longs ( blocks list , ipc maximum data length default ) ; }


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


capabilities are known to be inaccurately reported for vertical resolutions on some devices [ internal ref : b 3 1 3 8 7 6 6 1 ] when this workaround is enabled , we also check whether the capabilities indicate support if the width and height are swapped if they do , we assume that the vertical resolution is also supported

private static final boolean enable rotated vertical resolution workaround ( string name ) { if ( " omx mtk video decoder hevc " equals ( name ) & & " mcv 5a " equals ( util device ) ) { / / see https : / / github com / google / exo player / issues / 6612 return false ; } return true ; }


checks if pdb has been loaded in the program

public boolean is pdb loaded ( ) { return program attributes is pdb loaded ( ) ; }


update associations to all the associated tables in the database remove dump foreign key columns and dump intermediate join tables

private static void update associations ( s q lite database db ) { association updater association upgrader = new upgrader ( ) ; association upgrader add or update association ( db , false ) ; }


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


return the length of the body in bytes , as specified by the { @ code content - length } header returns - 1 when the content - length is unknown

public long get content length ( ) { string value = get first ( content length ) ; return ( value ! = null ? long parse long ( value ) : - 1 ) ; }


if the length of the content is 0 for sure , { @ link http content encoder } should skip encoding

public void test empty full content ( ) throws exception { embedded channel ch = new embedded channel ( new test encoder ( ) ) ; ch write inbound ( new default full http request ( http version http 1 1 , http method get , " / " ) ) ; full http response res = new default full http response ( http version http 1 1 , http response status ok , unpooled empty buffer ) ; ch write outbound ( res ) ; object o = ch read outbound ( ) ; assert that ( o , is ( instance of ( full http response class ) ) ) ; res = ( full http response ) o ; assert that ( res headers ( ) get ( http header names transfer encoding ) , is ( null value ( ) ) ) ; / / content encoding shouldn ' t be modified assert that ( res headers ( ) get ( http header names content encoding ) , is ( null value ( ) ) ) ; assert that ( res content ( ) readable bytes ( ) , is ( 0 ) ) ; assert that ( res content ( ) to string ( charset util us ascii ) , is ( " " ) ) ; res release ( ) ; assert that ( ch read outbound ( ) , is ( null value ( ) ) ) ; }


the response resources wrapped in the common mcp resource message these are typed resources that match the type url in the request resources message when ` incremental ` is true , this contains an array of resources to addupdate for the specified collection this modifies the existing collection at the sink when ` incremental ` is false , this contains the full set of resources for the specified collection this replaces any previously delivered resources < code > repeated istio mcp v 1alpha 1 resource resources = 3 ; < code >

public builder clear resources ( ) { if ( resources builder = = null ) { resources = java util collections empty list ( ) ; bit field 0 = ( bit field 0 & ~ 0x 0 0 0 0 0 0 0 1 ) ; on changed ( ) ; } else { resources builder clear ( ) ; } return this ; }


sets whether or not to disassemble and create a function that is referred to by the current new structure

public void set create function ( boolean create function ) { this create function = create function ; }


public geo bounding box query builder type ( string type ) { this type = geo exec type from string ( type ) ; return this ; }


public void write to ( annotated output out ) { int base address = user get address ( ) ; int default target = dops packed switch get format ( ) code size ( ) ; int sz = targets length ; if ( packed ) { int first case = ( sz = = 0 ) ? 0 : cases get ( 0 ) ; int last case = ( sz = = 0 ) ? 0 : cases get ( sz - 1 ) ; int out sz = last case - first case + 1 ; out write short ( opcodes packed switch payload ) ; out write short ( out sz ) ; out write int ( first case ) ; int case at = 0 ; for ( int i = 0 ; i < out sz ; i + + ) { int out case = first case + i ; int one case = cases get ( case at ) ; int rel target ; if ( one case > out case ) { rel target = default target ; } else { rel target = targets [ case at ] get address ( ) - base address ; case at + + ; } out write int ( rel target ) ; } } else { out write short ( opcodes sparse switch payload ) ; out write short ( sz ) ; for ( int i = 0 ; i < sz ; i + + ) { out write int ( cases get ( i ) ) ; } for ( int i = 0 ; i < sz ; i + + ) { int rel target = targets [ i ] get address ( ) - base address ; out write int ( rel target ) ; } } }


shard calls this on each indexingdelete op

public void bytes written ( int bytes ) { long total bytes = bytes written since check add and get ( bytes ) ; assert total bytes > = 0 ; while ( total bytes > indexing buffer get bytes ( ) / 30 ) { if ( run lock try lock ( ) ) { try { / / must pull this again because it may have changed since we first checked : total bytes = bytes written since check get ( ) ; if ( total bytes > indexing buffer get bytes ( ) / 30 ) { bytes written since check add and get ( - total bytes ) ; / / note : this is only an approximate check , because bytes written is to the translog , / / vs indexing memory buffer which is typically smaller but can be larger in extreme / / cases ( many unique terms ) this logic is here only as a safety against thread / / starvation or too infrequent checking , to ensure we are still checking periodically , / / in proportion to bytes processed by indexing : run unlocked ( ) ; } } finally { run lock unlock ( ) ; } / / must get it again since other threads could have increased it while we were in run unlocked total bytes = bytes written since check get ( ) ; } else { / / another thread beat us to it : let them do all the work , yay ! break ; } } }


return the total size of all files from a specified path

public long get used ( path path ) throws i o exception { return get content summary ( path ) get length ( ) ; }


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

public boolean is set num used workers ( ) { return isset bit vector get ( num used workers isset id ) ; }


validates the implementation of input stream skip and ensures there is no network io for version 2 of the block blob input stream

public void test 0308 skip bounds v 2 ( ) throws exception { validate skip bounds ( account using input stream v 2 get file system ( ) ) ; }


get the value of the ' { @ code disabled } ' attribute

protected boolean is disabled ( ) { return this disabled ; }


normalized container launchrelease time , and generate the { @ link resource skyline }

public final void create skyline ( ) { final long job submission time = resource skyline get job submission time ( ) ; resource container spec = resource skyline get container spec ( ) ; final tree map < long , resource > resource over time = new tree map < > ( ) ; final r l e sparse resource allocation skyline list = new r l e sparse resource allocation ( resource over time , new default resource calculator ( ) ) ; resource skyline set skyline list ( skyline list ) ; if ( container spec = = null ) { / / if rm parser fails to extract container resource spec from logs , we will / / statically set / / it to be < 1core , 1gb > container spec = resource new instance ( 1024 , 1 ) ; } resource skyline set container spec ( container spec ) ; for ( final map entry < string , long > entry : raw start entry set ( ) ) { final long time start = entry get value ( ) ; final long time end = raw end get ( entry get key ( ) ) ; if ( time end = = null ) { logger warn ( " container release time not found for { } " , entry get key ( ) ) ; } else { final reservation interval ri add = new reservation interval ( ( time start - job submission time ) / 1000 , ( time end - job submission time ) / 1000 ) ; resource skyline get skyline list ( ) add interval ( ri add , container spec ) ; } } }


public void name array test ( ) { / / todo : test name array }


the quote character used in delineated formats the default value for delimited format is { @ value # default quote char }

public character get quote character ( ) { return quote character ; }


remove the subscription by sending an unsubscribe frame


public static synchronized certificate provider registry get instance ( ) { if ( instance = = null ) { instance = new certificate provider registry ( ) ; / / todo ( sanjaypujare ) : replace with java ' s spi mechanism and meta - inf resource instance register ( new file watcher certificate provider provider ( ) ) ; instance register ( new dynamic reloading certificate provider provider ( ) ) ; instance register ( new mesh ca certificate provider provider ( ) ) ; } return instance ; }


applies the boolean distributive property for example : ( a & b ) | ( c & d ) = > ( a | c ) & ( a | d ) & ( b | c ) & ( b | d ) returns the original expression if the expression is non - deterministic or if the distribution will expand the expression by too much

private static expression distribute if possible ( logical binary expression expression ) { if ( ! expression determinism evaluator is deterministic ( expression ) ) { / / do not distribute boolean expressions if there are any non - deterministic elements / / todo : this can be optimized further if non - deterministic elements are not repeated return expression ; } list < set < expression > > sub predicates = get sub predicates ( expression ) stream ( ) map ( immutable set : : copy of ) collect ( to list ( ) ) ; int original base expressions = sub predicates stream ( ) map to int ( set : : size ) sum ( ) ; int new base expressions ; try { new base expressions = math multiply exact ( sub predicates stream ( ) map to int ( set : : size ) reduce ( math : : multiply exact ) get as int ( ) , sub predicates size ( ) ) ; } catch ( arithmetic exception e ) { / / integer overflow from multiplication means there are too many expressions return expression ; } if ( new base expressions > original base expressions * 2 ) { / / do not distribute boolean expressions if it would create 2x more base expressions / / ( e g a , b , c , d from the above example ) this is just an arbitrary heuristic to / / avoid cross product expression explosion return expression ; } set < list < expression > > cross product = sets cartesian product ( sub predicates ) ; return combine predicates ( expression get operator ( ) flip ( ) , cross product stream ( ) map ( expressions - > combine predicates ( expression get operator ( ) , expressions ) ) collect ( to immutable list ( ) ) ) ; }


adapts an { @ code iterator } to the { @ code enumeration } interface the { @ code iterable } equivalent of this method is either { @ link collections # enumeration } ( if you have a { @ link collection } ) , or { @ code iterators as enumeration ( collection iterator ( ) ) }

public static < t > enumeration < t > as enumeration ( final iterator < t > iterator ) { check not null ( iterator ) ; return new enumeration < t > ( ) { @ override public boolean has more elements ( ) { return iterator has next ( ) ; } @ override public t next element ( ) { return iterator next ( ) ; } } ; }


adds a new violation to this collector this also sets { @ code violation occurred } to { @ code true } prefer the method with explicit message parameters if you want to interpolate the message

public void add violation ( string message ) { add violation ( message , collections empty map ( ) ) ; }


find the { @ link multi value converter } instance from { @ link extension loader } with the specified source and target type

static multi value converter < ? > find ( class < ? > source type , class < ? > target type ) { return get extension loader ( multi value converter class ) get supported extension instances ( ) stream ( ) filter ( converter - > converter accept ( source type , target type ) ) find first ( ) or else ( null ) ; }


matches the given { @ link pattern } against all lines in the given file , and replaces all matches with the replacement generated by the given { @ link function } all unmatched lines and provided replacements are written into the file , with the order corresponding to the original content newlines are automatically added to each line ; this implies that an empty replacement string will result in an empty line to be written

public static void replace ( path file , pattern pattern , function < matcher , string > replacer ) throws i o exception { final list < string > file lines = files read all lines ( file ) ; try ( print writer pw = new print writer ( new output stream writer ( files new output stream ( file , standard open option truncate existing ) , standard charsets utf 8 name ( ) ) ) ) { for ( string file line : file lines ) { matcher matcher = pattern matcher ( file line ) ; if ( matcher matches ( ) ) { string replacement = replacer apply ( matcher ) ; pw println ( replacement ) ; } else { pw println ( file line ) ; } } } }


public int get numeric exit code ( ) { return numeric exit code ; }


public single < order > rx place order ( order body , api client auth info auth info ) { return single create ( new io vertx rx java single on subscribe adapter < > ( fut - > delegate place order ( body , auth info , fut ) ) ) ; }


should be called when the globber is no longer needed


the comment associated with the & lt ; public & gt ; tag < code > optional string comment = 3 ; < code >

public builder set comment ( java lang string value ) { copy on write ( ) ; instance set comment ( value ) ; return this ; }


sets the { @ link repeat mode } to be used for playback

void set repeat mode ( @ repeat mode int repeat mode ) ;


public static string parent of ( string path ) throws path not found exception { list < string > elements = split ( path ) ; int size = elements size ( ) ; if ( size = = 0 ) { throw new path not found exception ( " no parent of " + path ) ; } if ( size = = 1 ) { return " / " ; } elements remove ( size - 1 ) ; string builder parent = new string builder ( path length ( ) ) ; for ( string element : elements ) { parent append ( " / " ) ; parent append ( element ) ; } return parent to string ( ) ; }


adds { @ code headers } as public header files these files will be made visible to dependent rules they may be parsedpreprocessed or compiled into a header module depending on the configuration

public cc compilation helper add public headers ( artifact headers ) { add public headers ( arrays as list ( headers ) ) ; return this ; }


returns the empty map this map behaves and performs comparably to { @ link collections # empty map } , and is preferable mainly for consistency and maintainability of your code

public static < k , v > immutable map < k , v > of ( ) { return ( immutable map < k , v > ) regular immutable map empty ; }


test method refresh super user groups configuration this method present and it works

public void test refresh super user groups configuration ( ) throws exception { refresh super user groups configuration request request = record factory new record instance ( refresh super user groups configuration request class ) ; refresh super user groups configuration response response = client refresh super user groups configuration ( request ) ; assert not null ( response ) ; }


sets whether the previous button is shown

public void set show previous button ( boolean show previous button ) { control view layout manager set show button ( previous button , show previous button ) ; update navigation ( ) ; }


given an index in the range < code > 0 size ( ) - 1 < code > , returns the value from the < code > index < code > th key - value mapping that this sparse int array stores the values corresponding to indices in ascending order are guaranteed to be associated with keys in ascending order , e g , < code > value at ( 0 ) < code > will return the value associated with the smallest key and < code > value at ( size ( ) - 1 ) < code > will return the value associated with the largest key

public boolean value at ( int index ) { return m values [ index ] ; }


positive test to verify rename access check

public void test rename access check positive ( ) throws throwable { path parent dir = new path ( " / test rename access check positive " ) ; path src path = new path ( parent dir , " test 1 dat " ) ; path dst path = new path ( parent dir , " test 2 dat " ) ; / * to create parent dir * / authorizer add auth rule for owner ( " / " , write , true ) ; / * for rename * / authorizer add auth rule for owner ( parent dir to string ( ) , write , true ) ; fs update wasb authorizer ( authorizer ) ; try { touch ( fs , src path ) ; assert path exists ( fs , " source path does not exist " , src path ) ; assert rename outcome ( fs , src path , dst path , true ) ; assert path exists ( fs , " dest path does not exist " , dst path ) ; assert path does not exist ( fs , " source path exists after rename ! " , src path ) ; } finally { recursive delete ( parent dir ) ; } }


set the parallelism for this algorithm ' s operators this parameter is necessary because processing a small amount of data with high operator parallelism is slow and wasteful with memory and buffers operator parallelism should be set to this given value unless processing asymptotically more data , in which case the default job parallelism should be inherited

public graph algorithm wrapping base < k , vv , ev , r > set parallelism ( int parallelism ) { preconditions check argument ( parallelism > 0 | | parallelism = = parallelism default , " the parallelism must be at least one , or execution config parallelism default ( use system default ) " ) ; this parallelism = parallelism ; return this ; }


public static list < s d card info > get s d card info ( ) { list < s d card info > paths = new array list < > ( ) ; storage manager sm = ( storage manager ) utils get app ( ) get system service ( context storage service ) ; if ( sm = = null ) return paths ; if ( android os build version sdk int > = android os build version codes n ) { list < storage volume > storage volumes = sm get storage volumes ( ) ; try { / / noinspection java reflection member access method get path method = storage volume class get method ( " get path " ) ; for ( storage volume storage volume : storage volumes ) { boolean is removable = storage volume is removable ( ) ; string state = storage volume get state ( ) ; string path = ( string ) get path method invoke ( storage volume ) ; paths add ( new s d card info ( path , state , is removable ) ) ; } } catch ( no such method exception e ) { e print stack trace ( ) ; } catch ( illegal access exception e ) { e print stack trace ( ) ; } catch ( invocation target exception e ) { e print stack trace ( ) ; } } else { try { class < ? > storage volume clazz = class for name ( " android os storage storage volume " ) ; / / noinspection java reflection member access method get path method = storage volume clazz get method ( " get path " ) ; method is removable method = storage volume clazz get method ( " is removable " ) ; / / noinspection java reflection member access method get volume state method = storage manager class get method ( " get volume state " , string class ) ; / / noinspection java reflection member access method get volume list method = storage manager class get method ( " get volume list " ) ; object result = get volume list method invoke ( sm ) ; final int length = array get length ( result ) ; for ( int i = 0 ; i < length ; i + + ) { object storage volume element = array get ( result , i ) ; string path = ( string ) get path method invoke ( storage volume element ) ; boolean is removable = ( boolean ) is removable method invoke ( storage volume element ) ; string state = ( string ) get volume state method invoke ( sm , path ) ; paths add ( new s d card info ( path , state , is removable ) ) ; } } catch ( class not found exception e ) { e print stack trace ( ) ; } catch ( invocation target exception e ) { e print stack trace ( ) ; } catch ( no such method exception e ) { e print stack trace ( ) ; } catch ( illegal access exception e ) { e print stack trace ( ) ; } } return paths ; }


add irrelevant nodes node stats client will validate that they are not asked for

private void add irrelevant nodes ( discovery nodes builder nodes builder ) { set < set < string > > relevant role sets = autoscaling metadata policies ( ) values ( ) stream ( ) map ( autoscaling policy metadata : : policy ) map ( autoscaling policy : : roles ) collect ( collectors to set ( ) ) ; int stream range ( 0 , 5 ) map to obj ( i - > new node ( " irrelevant " + i , random irrelevant roles ( relevant role sets ) ) ) for each ( nodes builder : : add ) ; }


public upload file with required file oper req spec ( consumer < request spec builder > req spec customizer ) { req spec customizer accept ( req spec ) ; return this ; }


retrieve the execution time ( in milliseconds ) for the { @ link hystrix command # run ( ) } method being invoked at a given percentile percentile capture and calculation is configured via { @ link hystrix command properties # metrics rolling statistical window in milliseconds ( ) } and other related properties

public int get execution time percentile ( double percentile ) { return rolling command latency distribution stream get latest percentile ( percentile ) ; }


obtains all the { @ link run } s whose build numbers matches the given { @ link range set }

public synchronized list < run t > get builds ( range set rs ) { list < run t > builds = new linked list < > ( ) ; for ( range r : rs get ranges ( ) ) { for ( run t b = get nearest build ( r start ) ; b ! = null & & b get number ( ) < r end ; b = b get next build ( ) ) { builds add ( b ) ; } } return builds ; }


return the { @ link # set path options configured } pattern parsing options

public path container options get path options ( ) { return this path options ; }


enter a parse tree produced by { @ link sql base parser # like pattern }

void enter like pattern ( sql base parser like pattern context ctx ) ;


returns whether this predicate can be used while simplifying other or operands

default boolean allowed in or ( rel opt predicate list predicates ) { return true ; }


find the index of < code > target col < code > in string array < code > table cols < code > it will ignore the case of the table cols

public static int find col index ( string [ ] table cols , string target col ) { preconditions check not null ( target col , " target col is null ! " ) ; for ( int i = 0 ; i < table cols length ; i + + ) { if ( target col equals ignore case ( table cols [ i ] ) ) { return i ; } } return - 1 ; }


return the { @ link jms headers # redelivered redelivered } flag

public boolean get redelivered ( ) { return ( boolean ) get header ( jms headers redelivered ) ; }


public static not placeholder expr get ( ) { return instance ; }


mixin interface and delegates all class must be public

public static mixin mixin ( class < ? > [ ] ics , class < ? > [ ] dcs , class loader cl ) { assert interface array ( ics ) ; long id = mixin class counter get and increment ( ) ; string pkg = null ; class generator ccp = null , ccm = null ; try { ccp = class generator new instance ( cl ) ; / / impl constructor string builder code = new string builder ( ) ; for ( int i = 0 ; i < dcs length ; i + + ) { if ( ! modifier is public ( dcs [ i ] get modifiers ( ) ) ) { string npkg = dcs [ i ] get package ( ) get name ( ) ; if ( pkg = = null ) { pkg = npkg ; } else { if ( ! pkg equals ( npkg ) ) { throw new illegal argument exception ( " non - public interfaces class from different packages " ) ; } } } ccp add field ( " private " + dcs [ i ] get name ( ) + " d " + i + " ; " ) ; code append ( " d " ) append ( i ) append ( " = ( " ) append ( dcs [ i ] get name ( ) ) append ( " ) $ 1 [ " ) append ( i ) append ( " ] ; \ n " ) ; if ( mixin aware class is assignable from ( dcs [ i ] ) ) { code append ( " d " ) append ( i ) append ( " set mixin instance ( this ) ; \ n " ) ; } } ccp add constructor ( modifier public , new class < ? > [ ] { object [ ] class } , code to string ( ) ) ; / / impl methods set < string > worked = new hash set < string > ( ) ; for ( int i = 0 ; i < ics length ; i + + ) { if ( ! modifier is public ( ics [ i ] get modifiers ( ) ) ) { string npkg = ics [ i ] get package ( ) get name ( ) ; if ( pkg = = null ) { pkg = npkg ; } else { if ( ! pkg equals ( npkg ) ) { throw new illegal argument exception ( " non - public delegate class from different packages " ) ; } } } ccp add interface ( ics [ i ] ) ; for ( method method : ics [ i ] get methods ( ) ) { if ( " java lang object " equals ( method get declaring class ( ) get name ( ) ) ) { continue ; } string desc = reflect utils get desc ( method ) ; if ( worked contains ( desc ) ) { continue ; } worked add ( desc ) ; int ix = find method ( dcs , desc ) ; if ( ix < 0 ) { throw new runtime exception ( " missing method [ " + desc + " ] implement " ) ; } class < ? > rt = method get return type ( ) ; string mn = method get name ( ) ; if ( void type equals ( rt ) ) { ccp add method ( mn , method get modifiers ( ) , rt , method get parameter types ( ) , method get exception types ( ) , " d " + ix + " " + mn + " ( $ $ ) ; " ) ; } else { ccp add method ( mn , method get modifiers ( ) , rt , method get parameter types ( ) , method get exception types ( ) , " return ( $ r ) d " + ix + " " + mn + " ( $ $ ) ; " ) ; } } } if ( pkg = = null ) { pkg = package name ; } / / create mixin instance class string micn = pkg + " mixin " + id ; ccp set class name ( micn ) ; ccp to class ( ) ; / / create mixin class string fcn = mixin class get name ( ) + id ; ccm = class generator new instance ( cl ) ; ccm set class name ( fcn ) ; ccm add default constructor ( ) ; ccm set super class ( mixin class get name ( ) ) ; ccm add method ( " public object new instance ( object [ ] delegates ) { return new " + micn + " ( $ 1 ) ; } " ) ; class < ? > mixin = ccm to class ( ) ; return ( mixin ) mixin new instance ( ) ; } catch ( runtime exception e ) { throw e ; } catch ( exception e ) { throw new runtime exception ( e get message ( ) , e ) ; } finally { / / release class generator if ( ccp ! = null ) { ccp release ( ) ; } if ( ccm ! = null ) { ccm release ( ) ; } } }


returns true if all the executors of this computer are idle

public final boolean is idle ( ) { if ( ! one off executors is empty ( ) ) return false ; for ( executor e : executors ) if ( ! e is idle ( ) ) return false ; return true ; }


set the value of dfs namenode redundancy considerload key in the config file

public builder set n n redundancy consider load ( final boolean val ) { conf set boolean ( dfs namenode redundancy considerload key , val ) ; return this ; }


checks that the statistics agreement popup has been displayed

private static boolean is install atom shown ( ) { return properties component get instance ( ) is value set ( m t install atom notification show install atom ) ; }


return the autowire candidate resolver for this bean factory ( never { @ code null } )

public autowire candidate resolver get autowire candidate resolver ( ) { return this autowire candidate resolver ; }


determines whether a given bloom filter is compatible with this bloom filter for two bloom filters to be compatible , they must : not be the same instance have the same number of hash functions have the same bit size have the same strategy have equal funnels

public boolean is compatible ( bloom filter < t > that ) { check not null ( that ) ; return this ! = that & & this num hash functions = = that num hash functions & & this bit size ( ) = = that bit size ( ) & & this strategy equals ( that strategy ) & & this funnel equals ( that funnel ) ; }


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


displays the undo hijack confirmation dialog for each hijacked file and then undoes the hijack while keeping a copy of the hijacked file if the user chooses to do so

void undo hijack ( list < domain file > hijack list ) { if ( ! check repository connected ( ) ) { return ; } if ( hijack list size ( ) > 0 ) { undo action dialog dialog = new undo action dialog ( " confirm undo hijack " , resource manager load image ( " images / undo hijack png " ) , " undo hijack " , " hijack " , hijack list ) ; int action i d = dialog show dialog ( tool ) ; if ( action i d ! = undo action dialog cancel ) { boolean save copy = dialog save copy ( ) ; domain file [ ] files = dialog get selected domain files ( ) ; if ( files length > 0 ) { tool execute ( new undo hijack task ( files , save copy ) ) ; } } } }


copies bytes from source byte buffer into the destination buffer the number of bytes copied is limited by the bytes available to copy and the space remaining in the destination byte buffer

public static int copy bytes ( byte buffer source , byte buffer destination ) { int n bytes to copy = math min ( destination remaining ( ) , source remaining ( ) ) ; int initial limit = source limit ( ) ; source limit ( source position ( ) + n bytes to copy ) ; destination put ( source ) ; source limit ( initial limit ) ; return n bytes to copy ; }


if the first parameter is of type join point or proceeding join point , bind " this join point " as parameter name and return true , else return false

private boolean maybe bind this join point ( ) { if ( ( this argument types [ 0 ] = = join point class ) | | ( this argument types [ 0 ] = = proceeding join point class ) ) { bind parameter name ( 0 , this join point ) ; return true ; } else { return false ; } }


set the cci connection spec that this template instance is supposed to obtain connections for

public void set connection spec ( @ nullable connection spec connection spec ) { this connection spec = connection spec ; }


returns the object that tracks the state of sliced subtasks throws illegal state exception if this task is not set to be a leader task

public leader bulk by scroll task state get leader state ( ) { if ( ! is leader ( ) ) { throw new illegal state exception ( " this task is not set to be a leader for other slice subtasks " ) ; } return leader state ; }


public static list < file > list files in dir ( final string dir path , final boolean is recursive , final comparator < file > comparator ) { return list files in dir ( get file by path ( dir path ) , is recursive , comparator ) ; }


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


proxy to the original next ( ) call , but estimates the overhead of loading the next term

public bytes ref next ( ) throws i o exception { bytes ref term = terms enum next ( ) ; if ( term = = null & & this flush buffer ! = 0 ) { / / we have reached the end of the terms enum , flush the buffer flush ( ) ; } else { this flush buffer + = estimator bytes per value ( term ) ; if ( this flush buffer > = flush buffer size ) { flush ( ) ; } } return term ; }


returns a newly - created { @ code immutable sorted multiset } based on the contents of the { @ code builder }

public immutable sorted multiset < e > build ( ) { dedup and coalesce and delete empty ( ) ; if ( length = = 0 ) { return empty multiset ( comparator ) ; } regular immutable sorted set < e > element set = ( regular immutable sorted set < e > ) immutable sorted set construct ( comparator , length , elements ) ; long [ ] cumulative counts = new long [ length + 1 ] ; for ( int i = 0 ; i < length ; i + + ) { cumulative counts [ i + 1 ] = cumulative counts [ i ] + counts [ i ] ; } force copy elements = true ; return new regular immutable sorted multiset < e > ( element set , cumulative counts , 0 , length ) ; }


searches this database for functions that match a domain path substring

public list < function record > find functions by domain path substring ( string domain path ) { try { list < function record > list = functions table get function records by domain path substring ( domain path ) ; return list ; } catch ( i o exception e ) { msg error ( this , " serious problem searching for fid functions by domain path " , e ) ; } return null ; }


@ check for null string owner of ( class < ? > clazz ) ;