check whether connection is valid ( ) is supported , or that the user has test query configured

private void check validation support ( final connection connection ) throws s q l exception { try { if ( is use jdbc 4 validation ) { connection is valid ( 1 ) ; } else { execute sql ( connection , config get connection test query ( ) , false ) ; } } catch ( exception | abstract method error e ) { logger error ( " { } - failed to execute { } connection test query ( { } ) " , pool name , ( is use jdbc 4 validation ? " is valid ( ) for connection , configure " : " " ) , e get message ( ) ) ; throw e ; } }


gets the name of the resource output file if no resource output file is configured , resources are output in the initial shard

public string get resource file ( ) { return resource file ; }


returns the element type of { @ code type } if it is an array type , or null if it is not an array type

static type array component type ( type type ) { if ( type instanceof generic array type ) { return ( ( generic array type ) type ) get generic component type ( ) ; } else if ( type instanceof class ) { return ( ( class < ? > ) type ) get component type ( ) ; } else { return null ; } }


configure { @ code deferred result processing interceptor } ' s to register on async requests

public void set deferred result interceptors ( list < deferred result processing interceptor > interceptors ) { this deferred result interceptors = interceptors to array ( new deferred result processing interceptor [ 0 ] ) ; }


get the annotation attributes of all annotations of the specified { @ code annotation name } in the annotation hierarchy above the supplied { @ link annotated element } and store the results in a { @ link multi value map } note : in contrast to { @ link # get merged annotation attributes ( annotated element , string ) } , this method does not support attribute overrides this method follows get semantics as described in the { @ linkplain annotated element utils class - level javadoc }

public static multi value map < string , object > get all annotation attributes ( annotated element element , string annotation name ) { return get all annotation attributes ( element , annotation name , false , false ) ; }


public void wait for solution set update ( ) throws interrupted exception { latch await ( ) ; }


return the mapping lookup path for the given request , within the current servlet mapping if applicable , else within the web application detects include request url if called within a request dispatcher include

public string get lookup path for request ( http servlet request request ) { string path within app = get path within application ( request ) ; / / always use full path within current servlet context ? if ( this always use full path | | skip servlet path determination ( request ) ) { return path within app ; } / / else , use path within current servlet mapping if applicable string rest = get path within servlet mapping ( request , path within app ) ; if ( string utils has length ( rest ) ) { return rest ; } else { return path within app ; } }


checks if this crontab entry looks reasonable , and if not , return an warning message the point of this method is to catch syntactically correct but semantically suspicious combinations , like " 0 "

public string check sanity ( ) { for ( cron tab tab : tabs ) { string s = tab check sanity ( ) ; if ( s ! = null ) return s ; } return null ; }


get the storage policy for a file or a directory

block storage policy get storage policy ( string src ) throws i o exception { check operation ( operation category read ) ; final f s permission checker pc = get permission checker ( ) ; f s permission checker set operation type ( null ) ; read lock ( ) ; try { check operation ( operation category read ) ; return f s dir attr op get storage policy ( dir , pc , block manager , src ) ; } finally { read unlock ( " get storage policy " ) ; } }


generate an s 3 a file status instance , including etag and version id , if present

public s 3 a file status to s 3 a file status ( ) { return new s 3 a file status ( get path ( ) , is directory ( ) , is empty directory , get len ( ) , get modification time ( ) , get block size ( ) , get owner ( ) , get e tag ( ) , get version id ( ) ) ; }


test that server defaults are updated on the client after cache expiration

public void test server defaults with minimal caching ( ) throws exception { / / create cluster with an explicit block size param configuration cluster conf = new hdfs configuration ( ) ; long original block size = dfs block size default * 2 ; cluster conf set long ( dfs block size key , original block size ) ; mini d f s cluster cluster = new mini d f s cluster builder ( cluster conf ) num data nodes ( 0 ) build ( ) ; cluster wait active ( ) ; / / set a spy namesystem inside the namenode and return it f s namesystem spy namesystem = name node adapter spy on namesystem ( cluster get name node ( ) ) ; inet socket address name node addr = cluster get name node ( ) get name node address ( ) ; try { / / create a dfs client and set a minimal validity interval configuration client conf = new hdfs configuration ( ) ; / / invalidate cache in at most 1 ms , see dfs client # get server defaults client conf set long ( dfs client server defaults validity period ms key , 0l ) ; d f s client dfs client = new d f s client ( name node addr , client conf ) ; fs server defaults defaults = dfs client get server defaults ( ) ; assert equals ( original block size , defaults get block size ( ) ) ; / / update the namenode with a new fs server defaults long updated default block size = dfs block size default * 3 ; fs server defaults new defaults = new fs server defaults ( updated default block size , defaults get bytes per checksum ( ) , defaults get write packet size ( ) , defaults get replication ( ) , defaults get file buffer size ( ) , defaults get encrypt data transfer ( ) , defaults get trash interval ( ) , defaults get checksum type ( ) , defaults get key provider uri ( ) , defaults get default storage policy id ( ) ) ; do return ( new defaults ) when ( spy namesystem ) get server defaults ( ) ; / / verify that the value is updated correctly wait for 3 seconds generic test utils wait for ( ( ) - > { try { fs server defaults curr def = dfs client get server defaults ( ) ; return ( curr def get block size ( ) = = updated default block size ) ; } catch ( i o exception e ) { / / do nothing ; return false ; } } , 1 , 3000 ) ; } finally { cluster shutdown ( ) ; } }


the version info provided in the request messages will be the version info received with the most recent successfully processed response or empty on the first request it is expected that no new request is sent after a response is received until the client instance is ready to acknack the new configuration acknack takes place by returning the new api config version as applied or the previous api config version respectively each type url ( see below ) has an independent version associated with it < code > string version info = 1 ; < code >

public builder set version info ( java lang string value ) { if ( value = = null ) { throw new null pointer exception ( ) ; } version info = value ; on changed ( ) ; return this ; }


private void end task ( ) { synchronized ( lock ) { int num running = - - running tasks ; if ( num running = = 0 ) { lock notify all ( ) ; } } }


creates a new blocking - style stub that supports unary and streaming output calls on the service

public static reconnect service blocking stub new blocking stub ( io grpc channel channel ) { io grpc stub abstract stub stub factory < reconnect service blocking stub > factory = new io grpc stub abstract stub stub factory < reconnect service blocking stub > ( ) { @ java lang override public reconnect service blocking stub new stub ( io grpc channel channel , io grpc call options call options ) { return new reconnect service blocking stub ( channel , call options ) ; } } ; return reconnect service blocking stub new stub ( factory , channel ) ; }


calculate all intersections of line segments and a vertical line the array of edges will be ordered asc by the y - coordinate of the intersections of edges

private static int intersections ( double dateline , edge [ ] edges ) { int num intersections = 0 ; assert ! double is na n ( dateline ) ; int max component = 0 ; for ( int i = 0 ; i < edges length ; i + + ) { point p 1 = edges [ i ] coordinate ; point p 2 = edges [ i ] next coordinate ; assert ! double is na n ( p 2 get x ( ) ) & & ! double is na n ( p 1 get x ( ) ) ; edges [ i ] intersect = edge max coordinate ; double position = intersection ( p 1 get x ( ) , p 2 get x ( ) , dateline ) ; if ( ! double is na n ( position ) ) { edges [ i ] intersection ( position ) ; num intersections + + ; max component = math max ( max component , edges [ i ] component ) ; } } if ( max component > 0 ) { / / we might detect polygons touching the dateline as intersections / / here we clean them up for ( int i = 0 ; i < max component ; i + + ) { if ( clear component touching dateline ( edges , i + 1 ) ) { num intersections - - ; } } } arrays sort ( edges , intersection order ) ; return num intersections ; }


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


public void remove cached statement ( ) { my s q l binary statement registry get instance ( ) remove ( statement id ) ; }


gets the export address table jumps directory

public default data directory get export address table jumps ( ) { return export address table jumps ; }


this gets the class hierarchy descriptor ( rtti 3 ) structure for the indicated program

public static data type get data type ( program program ) { / / create simple data types for rtti 1 & rtti 3 data type rtti 3 dt = get simple data type ( program ) ; data type rtti 1 dt = rtti 1 model get simple data type ( program ) ; / / now make each refer to the other set rtti 1 data type ( rtti 3 dt , program , rtti 1 dt ) ; rtti 1 model set rtti 3 data type ( rtti 1 dt , program , rtti 3 dt ) ; return m s data type utils get matching data type ( program , rtti 3 dt ) ; }


return a reference to the node given its string representation default implementation delegates to { @ link # get node ( string ) } to be overridden in subclasses for specific network topology implementations , as alternative to overriding the full { @ link # add ( node ) } method

protected node get node for network location ( node node ) { return get node ( node get network location ( ) ) ; }


returns the execution root directory associated with this blaze server process this is where all input and output files visible to the actual build reside

public path get exec root ( ) { preconditions check not null ( workspace name ) ; return get directories ( ) get exec root ( workspace name ) ; }


public void fade out all layers ( ) { m transition state = transition starting ; arrays fill ( m is layer on , false ) ; invalidate self ( ) ; }


used for handling output of callable statements

public string get result map id ( ) { return result map id ; }


public integer get int 3 2 ( ) { return int 3 2 ; }


stops the timer , tasks will not be executed and time that passes will not be applied to the task delays

public void stop ( ) { synchronized ( thread lock ) { thread ( ) instances remove value ( this , true ) ; } }


connects to the given http url and configure time out , to avoid infinite hang

private static http u r l connection open ( url url ) throws i o exception { http u r l connection c = ( http u r l connection ) url open connection ( ) ; c set read timeout ( timeout ) ; c set connect timeout ( timeout ) ; return c ; }


set the body of the request to the given { @ code body inserter } this method invokes the { @ link org springframework web reactive function client web client request body spec # body ( body inserter ) body ( body inserter ) } method on the underlying { @ code web client }

request headers spec < ? > body ( body inserter < ? , ? super client http request > inserter ) ;


determines if this highlight provider is for the first listing of the listing diff

public boolean is listing 1 ( ) { return is listing 1 ; }


utility method to check if the specified collection is null or empty

public static < t > boolean is null or empty ( collection < t > c ) { return ( c = = null | | c size ( ) = = 0 ) ; }


public static < r > supplier < r > do if ( final boolean condition , final supplier < r > true function , final supplier < r > false function ) { return ( ) - > { try { if ( condition ) { return true function get ( ) ; } return false function get ( ) ; } catch ( final throwable e ) { logging utils warn ( logger , e ) ; return false function get ( ) ; } } ; }


extends this bounding box by the given transformed bounding box

public bounding box ext ( bounding box bounds , matrix 4 transform ) { ext ( tmp vector set ( bounds min x , bounds min y , bounds min z ) mul ( transform ) ) ; ext ( tmp vector set ( bounds min x , bounds min y , bounds max z ) mul ( transform ) ) ; ext ( tmp vector set ( bounds min x , bounds max y , bounds min z ) mul ( transform ) ) ; ext ( tmp vector set ( bounds min x , bounds max y , bounds max z ) mul ( transform ) ) ; ext ( tmp vector set ( bounds max x , bounds min y , bounds min z ) mul ( transform ) ) ; ext ( tmp vector set ( bounds max x , bounds min y , bounds max z ) mul ( transform ) ) ; ext ( tmp vector set ( bounds max x , bounds max y , bounds min z ) mul ( transform ) ) ; ext ( tmp vector set ( bounds max x , bounds max y , bounds max z ) mul ( transform ) ) ; return this ; }


return the configured { @ link builder # metadata extractor ( metadata extractor ) }

metadata extractor metadata extractor ( ) ;


returns true if field corresponding to field i d is set ( has been assigned a value ) and false otherwise

public boolean is set ( fields field ) { if ( field = = null ) { throw new illegal argument exception ( ) ; } switch ( field ) { case arg : return is set arg ( ) ; } throw new illegal state exception ( ) ; }


gets whether the method being translated is synchronized

private boolean is synchronized ( ) { int access flags = method get access flags ( ) ; return ( access flags & access flags acc synchronized ) ! = 0 ; }


test behaviour when a bunch of on failure sniffing rounds are triggered in parallel each run will always schedule a subsequent after failure round also , for each on failure round that starts , the net scheduled round ( either after failure or ordinary ) gets cancelled

public void test sniff on failure ( ) throws exception { rest client rest client = mock ( rest client class ) ; counting nodes sniffer nodes sniffer = new counting nodes sniffer ( ) ; final atomic boolean initializing = new atomic boolean ( true ) ; final long sniff interval = random long between ( 1 , long max value ) ; final long sniff after failure delay = random long between ( 1 , long max value ) ; int min num on failure rounds = random int between ( 5 , 10 ) ; final count down latch initializing latch = new count down latch ( 1 ) ; final set < sniffer scheduled task > ordinary rounds tasks = new copy on write array set < > ( ) ; final atomic reference < future < ? > > initializing future = new atomic reference < > ( ) ; final set < sniffer scheduled task > on failure tasks = new copy on write array set < > ( ) ; final set < sniffer scheduled task > after failure tasks = new copy on write array set < > ( ) ; final atomic boolean on failure completed = new atomic boolean ( false ) ; final count down latch completion latch = new count down latch ( 1 ) ; final scheduled executor service executor = executors new single thread scheduled executor ( ) ; try { scheduler scheduler = new scheduler ( ) { @ override public future < ? > schedule ( final sniffer task task , long delay millis ) { if ( initializing compare and set ( true , false ) ) { assert equals ( 0l , delay millis ) ; future < ? > future = executor submit ( new runnable ( ) { @ override public void run ( ) { try { task run ( ) ; } finally { / / we need to make sure that the sniffer is initialized , so the sniff on failure / / call does what it needs to do otherwise nothing happens until initialized initializing latch count down ( ) ; } } } ) ; assert true ( initializing future compare and set ( null , future ) ) ; return future ; } if ( delay millis = = 0l ) { future < ? > future = executor submit ( task ) ; on failure tasks add ( new sniffer scheduled task ( task , future ) ) ; return future ; } if ( delay millis = = sniff after failure delay ) { future < ? > future = schedule or submit ( task ) ; after failure tasks add ( new sniffer scheduled task ( task , future ) ) ; return future ; } assert equals ( sniff interval , delay millis ) ; assert equals ( sniff interval , task next task delay ) ; if ( on failure completed get ( ) & & on failure tasks size ( ) = = after failure tasks size ( ) ) { completion latch count down ( ) ; return mock ( future class ) ; } future < ? > future = schedule or submit ( task ) ; ordinary rounds tasks add ( new sniffer scheduled task ( task , future ) ) ; return future ; } private future < ? > schedule or submit ( sniffer task task ) { if ( random boolean ( ) ) { return executor schedule ( task , random long between ( 0l , 200l ) , time unit milliseconds ) ; } else { return executor submit ( task ) ; } } @ override public void shutdown ( ) { } } ; final sniffer sniffer = new sniffer ( rest client , nodes sniffer , scheduler , sniff interval , sniff after failure delay ) ; assert true ( " timeout waiting for sniffer to get initialized " , initializing latch await ( 1000 , time unit milliseconds ) ) ; executor service on failure executor = executors new fixed thread pool ( random int between ( 5 , 20 ) ) ; set < future < ? > > on failure futures = new copy on write array set < > ( ) ; try { / / with tasks executing quickly one after each other , it is very likely that the on failure round gets skipped / / as another round is already running we retry till enough runs get through as that ' s what we want to test while ( on failure tasks size ( ) < min num on failure rounds ) { on failure futures add ( on failure executor submit ( new runnable ( ) { @ override public void run ( ) { sniffer sniff on failure ( ) ; } } ) ) ; } assert that ( on failure futures size ( ) , greater than or equal to ( min num on failure rounds ) ) ; for ( future < ? > on failure future : on failure futures ) { assert null ( on failure future get ( ) ) ; } on failure completed set ( true ) ; } finally { on failure executor shutdown ( ) ; on failure executor await termination ( 1000 , time unit milliseconds ) ; } assert false ( initializing future get ( ) is cancelled ( ) ) ; assert true ( initializing future get ( ) is done ( ) ) ; assert null ( initializing future get ( ) get ( ) ) ; assert true ( " timeout waiting for sniffing rounds to be completed " , completion latch await ( 1000 , time unit milliseconds ) ) ; assert that ( on failure tasks size ( ) , greater than or equal to ( min num on failure rounds ) ) ; assert equals ( on failure tasks size ( ) , after failure tasks size ( ) ) ; for ( sniffer scheduled task on failure task : on failure tasks ) { assert false ( on failure task future is cancelled ( ) ) ; assert true ( on failure task future is done ( ) ) ; assert null ( on failure task future get ( ) ) ; assert true ( on failure task task has started ( ) ) ; assert false ( on failure task task is skipped ( ) ) ; } int cancelled tasks = 0 ; int completed tasks = on failure tasks size ( ) + 1 ; for ( sniffer scheduled task after failure task : after failure tasks ) { if ( assert task cancelled or completed ( after failure task ) ) { completed tasks + + ; } else { cancelled tasks + + ; } } assert that ( ordinary rounds tasks size ( ) , greater than ( 0 ) ) ; for ( sniffer scheduled task task : ordinary rounds tasks ) { if ( assert task cancelled or completed ( task ) ) { completed tasks + + ; } else { cancelled tasks + + ; } } assert equals ( on failure tasks size ( ) , cancelled tasks ) ; assert equals ( completed tasks , nodes sniffer runs get ( ) ) ; int set nodes runs = nodes sniffer runs get ( ) - nodes sniffer failures get ( ) - nodes sniffer empty list get ( ) ; verify ( rest client , times ( set nodes runs ) ) set nodes ( any collection of ( node class ) ) ; verify no more interactions ( rest client ) ; } finally { executor shutdown ( ) ; executor await termination ( 1000l , time unit milliseconds ) ; } }


returns the mapping files containing file dependency information among the translated obj c source files when flag - - j 2objc dead code removal is specified , they are used to strip unused object files inside j 2 obj c static libraries before the linking action at binary level

public nested set < artifact > get dependency mapping files ( ) { return dependency mapping files ; }


a batch operation of write { @ link point } s flush directly

public void write ( batch points points ) { try { get influx ( ) write ( points ) ; this health checker health ( ) ; } catch ( throwable e ) { health checker un health ( e ) ; throw e ; } }


return all the files that match file pattern and are not checksum files results are sorted by their names a filename pattern is composed of regular characters and special pattern matching characters , which are : < dl > < dd > < dl > < dt > < tt > ? < tt > < dd > matches any single character < dt > < tt > < tt > < dd > matches zero or more characters < dt > < tt > [ abc ] < tt > < dd > matches a single character from character set < tt > { a , b , c } < tt > < dt > < tt > [ a - b ] < tt > < dd > matches a single character from the character range < tt > { a b } < tt > note : character < tt > a < tt > must be lexicographically less than or equal to character < tt > b < tt > < dt > < tt > [ ^ a ] < tt > < dd > matches a single char that is not from character set or range < tt > { a } < tt > note that the < tt > ^ < tt > character must occur immediately to the right of the opening bracket < dt > < tt > \ c < tt > < dd > removes ( escapes ) any special meaning of character c < dt > < tt > { ab , cd } < tt > < dd > matches a string from the string set < tt > { ab , cd } < tt > < dt > < tt > { ab , c { de , fh } } < tt > < dd > matches a string from string set < tt > { ab , cde , cfh } < tt > < dl > < dd > < dl >

public file status [ ] glob status ( path path pattern ) throws access control exception , unsupported file system exception , i o exception { return new globber ( file context this , path pattern , default filter ) glob ( ) ; }


returns true if directories should be excluded from results

public boolean exclude dirs ( ) { return exclude dirs ; }


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


return the current { @ link transaction context }

transaction context current context ( ) { transaction context context = this transaction stack peek ( ) ; if ( context = = null ) { throw new no transaction exception ( " no transaction in context " ) ; } return context ; }


void set year ( int val ) throws calendar parser exception { if ( val < 0 ) { throw new calendar parser exception ( " bad year " + val ) ; } year = val ; }


public abstract json writer name ( string name ) throws i o exception ;


find a { @ link registered service } by matching with the supplied name

registered service find service by name ( string name ) ;


test to verify that server is able to start with valid credentials

public void test valid credentials ( ) throws exception { string server principal = host server principal substring ( 0 , host server principal last index of ( " @ " ) ) ; map < string , string > auth configs = new hash map < string , string > ( ) ; auth configs put ( quorum auth quorum sasl auth enabled , " true " ) ; auth configs put ( quorum auth quorum server sasl auth required , " true " ) ; auth configs put ( quorum auth quorum learner sasl auth required , " true " ) ; auth configs put ( quorum auth quorum kerberos service principal , server principal ) ; string connect str = start quorum ( 3 , auth configs , 3 ) ; countdown watcher watcher = new countdown watcher ( ) ; zoo keeper zk = new zoo keeper ( connect str , client base connection timeout , watcher ) ; watcher wait for connected ( client base connection timeout ) ; for ( int i = 0 ; i < 10 ; i + + ) { zk create ( " / " + i , new byte [ 0 ] , ids open acl unsafe , create mode persistent ) ; } zk close ( ) ; }


returns endpoints for all listeners including the advertised host and port to which the listener is bound


public static global transaction create new ( ) { return new default global transaction ( ) ; }


get all enabled { @ linkplain exporter } s

public collection < exporter > get enabled exporters ( ) { return exporters get ( ) values ( ) ; }


sets the aliases that will be associated with the index when it gets created

public create index request aliases ( string source , x content type content type ) { return aliases ( new bytes array ( source ) , content type ) ; }


public void test register listener ( ) { register ( ) ; assert true ( " listener not registered " , unregister ( ) ) ; }


returns whether or not this instance ' s value may be accurately represented as an { @ code int } the rule is that if there is an { @ code int } which may be sign - extended to yield this instance ' s value , then this method returns { @ code true } otherwise , it returns { @ code false }

public abstract boolean fits in int ( ) ;


intercepts { @ link channel handler context # read ( ) }

void read ( channel handler context ctx ) throws exception ;


< code > optional int 3 2 age = 3 ; < code >


whether this handler supports the given { @ link handler result }

boolean supports ( handler result result ) ;


returns the simple name of the underlying class as supplied in the source code

static public string get simple name ( class c ) { return c get simple name ( ) ; }


set the location of a resource , as specified by the { @ code location } header


add a new value to the histogram note that the value will be clipped to the maximum value available in the histogram instance so if the histogram has 100 buckets , inserting 101 will increment the last bucket

public void add ( int value ) { if ( value < 0 ) { throw new runtime exception ( " invalid negative value " ) ; } if ( value > = counts length ) { value = counts length - 1 ; } synchronized ( this ) { int cur count = counts [ value ] ; if ( cur count < integer max value ) { counts [ value ] = counts [ value ] + 1 ; } } }


uses the index templates api to determine if index templates exist

public cancellable exists component template async ( component templates exist request component templates request , request options options , action listener < boolean > listener ) { return rest high level client perform request async ( component templates request , cluster request converters : : component templates exist , options , rest high level client : : convert exists response , listener , empty set ( ) ) ; }


returns the class of labels contained by this type , if any

public label class get label class ( ) { return label class none ; }


public boolean remove ( long key ) { if ( indexer remove ( key ) < 0 ) { return false ; } return true ; }


return the root handler for this handler mapping ( registered for " " ) , or { @ code null } if none

public object get root handler ( ) { return this root handler ; }


calculates the predecessor sets for each block as well as for the exit

private void calc predecessors ( ) { int max label = blocks get max label ( ) ; int list [ ] predecessors = new int list [ max label ] ; int list exit predecessors = new int list ( 10 ) ; int sz = blocks size ( ) ; / * * for each block , find its successors , and add the block ' s label to * the successor ' s predecessors * / for ( int i = 0 ; i < sz ; i + + ) { basic block one = blocks get ( i ) ; int label = one get label ( ) ; int list successors = one get successors ( ) ; int ssz = successors size ( ) ; if ( ssz = = 0 ) { / / this block exits exit predecessors add ( label ) ; } else { for ( int j = 0 ; j < ssz ; j + + ) { int succ label = successors get ( j ) ; int list succ preds = predecessors [ succ label ] ; if ( succ preds = = null ) { succ preds = new int list ( 10 ) ; predecessors [ succ label ] = succ preds ; } succ preds add ( label ) ; } } } / / sort and immutablize all the predecessor lists for ( int i = 0 ; i < max label ; i + + ) { int list preds = predecessors [ i ] ; if ( preds ! = null ) { preds sort ( ) ; preds set immutable ( ) ; } } exit predecessors sort ( ) ; exit predecessors set immutable ( ) ; / * * the start label might not ever have had any predecessors * added to it ( probably doesn ' t , because of how java gets * translated into rop form ) so , check for this and rectify * the situation if required * / if ( predecessors [ first label ] = = null ) { predecessors [ first label ] = int list empty ; } this predecessors = predecessors ; this exit predecessors = exit predecessors ; }


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

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


returns a releasable to indicate that the caller has stopped using this reader the time to live of the reader after usage can be extended using the provided < code > keep alive in millis < code >

public releasable mark as used ( long keep alive in millis ) { ref counted inc ref ( ) ; try update keep alive ( keep alive in millis ) ; return releasables release once ( ( ) - > { this last access time update and get ( curr - > math max ( curr , now in millis ( ) ) ) ; ref counted dec ref ( ) ; } ) ; }


collect anyall comments for the function starting at the indicated address

public string get comments ( string addrstring , string types ) { address addr ; int flags ; try { addr = varnode read x m l address ( addrstring , addrfactory , func entry get address space ( ) ) ; } catch ( pcode x m l exception e ) { msg error ( this , " decompiling " + func entry + " : " + e get message ( ) ) ; return null ; } flags = spec xml utils decode int ( types ) ; function func = get function at ( addr ) ; if ( func = = null ) { return null ; } address set view addrset = func get body ( ) ; string builder buf = new string builder ( ) ; buf append ( " < commentdb > \ n " ) ; if ( ( flags & 8 ) ! = 0 ) { generate header comment x m l ( func , buf ) ; } if ( ( flags & 1 ) ! = 0 ) { generate comment x m l ( addrset , addr , buf , code unit eol comment ) ; } if ( ( flags & 2 ) ! = 0 ) { generate comment x m l ( addrset , addr , buf , code unit pre comment ) ; } if ( ( flags & 4 ) ! = 0 ) { generate comment x m l ( addrset , addr , buf , code unit post comment ) ; } if ( ( flags & 8 ) ! = 0 ) { generate comment x m l ( addrset , addr , buf , code unit plate comment ) ; } buf append ( " < / commentdb > \ n " ) ; string res = buf to string ( ) ; if ( debug ! = null ) { debug get comments ( res ) ; } return res ; }


formats a number into the specified string buffer

public string buffer format ( double number , string buffer to append to , field position pos ) { return to append to append ( runtime utils format execution time ( ( long ) number ) ) ; }


builder for configuring and creating instances of { @ link type inference }

public static type inference builder new builder ( ) { return new type inference builder ( ) ; }


private void draw second animation ( canvas canvas ) { if ( arc o = = limite ) arc d + = 6 ; if ( arc d > = 290 | | arc o > limite ) { arc o + = 6 ; arc d - = 6 ; } if ( arc o > limite + 290 ) { limite = arc o ; arc o = limite ; arc d = 1 ; } rotate angle + = 4 ; canvas rotate ( rotate angle , get width ( ) / 2 , get height ( ) / 2 ) ; bitmap bitmap = bitmap create bitmap ( canvas get width ( ) , canvas get height ( ) , bitmap config argb 8888 ) ; canvas temp = new canvas ( bitmap ) ; paint paint = new paint ( ) ; paint set anti alias ( true ) ; paint set color ( background color ) ; / / temp draw a r g b ( 0 , 0 , 0 , 255 ) ; temp draw arc ( new rect f ( 0 , 0 , get width ( ) , get height ( ) ) , arc o , arc d , true , paint ) ; paint transparent paint = new paint ( ) ; transparent paint set anti alias ( true ) ; transparent paint set color ( get resources ( ) get color ( android r color transparent ) ) ; transparent paint set xfermode ( new porter duff xfermode ( porter duff mode clear ) ) ; temp draw circle ( get width ( ) / 2 , get height ( ) / 2 , ( get width ( ) / 2 ) - utils dp to px ( 4 , get resources ( ) ) , transparent paint ) ; canvas draw bitmap ( bitmap , 0 , 0 , new paint ( ) ) ; }


return the hex string of hmac s h a 2 2 4 encryption

public static string encrypt hmac s h a 2 2 4 to string ( final byte [ ] data , final byte [ ] key ) { return utils bridge bytes 2 hex string ( encrypt hmac s h a 2 2 4 ( data , key ) ) ; }


extracts information from a java properties file to create an { @ link extension details } object

public static extension details create extension details from property file ( file file ) { try { properties props = new properties ( ) ; try ( input stream in = new file input stream ( file get absolute path ( ) ) ) { props load ( in ) ; return create extension details from properties ( props ) ; } } catch ( i o exception e ) { msg error ( null , " error processing extension properties for " + file get absolute path ( ) , e ) ; return null ; } }


waits for this future to be completed without interruption this method catches an { @ link interrupted exception } and discards it silently

future < v > await uninterruptibly ( ) ;


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


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


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


returns address range defined by spacified set element or null if range corresponds to a virtual space ( i e , spacebase )

private address range get address range ( xml element set parent element ) { string space name = set parent element get attribute ( " space " ) ; if ( space bases contains key ( space name ) ) { return null ; } address space addrspace = get address space ( space name ) ; long first = addrspace get min address ( ) get offset ( ) ; long last = addrspace get max address ( ) get offset ( ) ; string valstring = set parent element get attribute ( " first " ) ; if ( valstring ! = null ) { first = spec xml utils decode long ( valstring ) ; } valstring = set parent element get attribute ( " last " ) ; if ( valstring ! = null ) { last = spec xml utils decode long ( valstring ) ; } address first address = addrspace get address ( first ) ; address last address = addrspace get address ( last ) ; return new address range impl ( first address , last address ) ; }


convert an rest request method array to a string array , so it can be compared with the expected ' allow ' header string array

private list < string > get method name string array ( list < rest request method > method array ) { return method array stream ( ) map ( method - > method to string ( ) ) collect ( collectors to list ( ) ) ; }


construct a { @ code serialized } instance with the provided value { @ link serde } if the { @ link serde } params are null the default serdes defined in the configs will be used

public serialized < k , v > with value serde ( final serde < v > value serde ) { return new serialized < > ( null , value serde ) ; }


returns an immutable multiset containing the given elements , in the " grouped iteration order " described in the class documentation

public static < e > immutable multiset < e > copy of ( iterator < ? extends e > elements ) { return new immutable multiset builder < e > ( ) add all ( elements ) build ( ) ; }


public cell < t > fill x ( ) { fill x = onef ; return this ; }


public get user by name oper resp spec ( consumer < response spec builder > resp spec customizer ) { resp spec customizer accept ( resp spec ) ; return this ; }


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


let sub - classes of update site provide their own signature validator

protected j s o n signature validator get json signature validator ( @ check for null string name ) { if ( name = = null ) { name = signature validator prefix + " ' " + id + " ' " ; } return new j s o n signature validator ( name ) ; }


query the stream for a specific capability

public boolean has capability ( string capability ) { switch ( capability to lower case ( locale english ) ) { case stream capabilities hsync : case stream capabilities hflush : return true ; default : return false ; } }


returns an immutable range map mapping a single range to a single value

public static < k extends comparable < ? > , v > immutable range map < k , v > of ( range < k > range , v value ) { return new immutable range map < > ( immutable list of ( range ) , immutable list of ( value ) ) ; }


modify a property value object held in this object indexed from 0

public void set property value at ( property value pv , int i ) { this property value list set ( i , pv ) ; }


public boolean is wrapper for ( class < ? > iface ) throws s q l exception { if ( iface is instance ( this ) ) { return true ; } hikari pool p = pool ; if ( p ! = null ) { final data source unwrapped data source = p get unwrapped data source ( ) ; if ( iface is instance ( unwrapped data source ) ) { return true ; } if ( unwrapped data source ! = null ) { return unwrapped data source is wrapper for ( iface ) ; } } return false ; } / / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / / hikari config m x bean methods / / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


send input records with the given value list on the topic then commit each record individually the timestamp will be generated based on the constructor provided start time and time will auto advance based on { @ link # test input topic ( topology test driver , string , serializer , serializer , instant , duration ) auto advance } setting

public void pipe value list ( final list < v > values ) { for ( final v value : values ) { pipe input ( value ) ; } }


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


appends { @ link provider info } protos to a { @ link module info builder }

public proto renderer append provider infos ( collection < provider info > provider infos ) { for ( provider info provider info : provider infos ) { module info add provider info ( provider info ) ; } return this ; }


gets the indicated ( left or right ) side ' s address that is equivalent to the other side ' s address

private address get address ( int left or right , address other sides address ) { if ( is function compare ( ) ) { return get function address ( left or right , other sides address ) ; } if ( is data compare ( ) ) { return get data address ( left or right , other sides address ) ; } return null ; }


http2 only expresses that resources for the connection or a client - initiated stream are available from a different network location or protocol configuration see < a href = " http : tools ietf orghtmldraft - ietf - httpbis - alt - svc - 01 " > alt - svc

void alternate service ( int stream id , string origin , byte string protocol , string host , int port , long max age ) ;


get the jobs that match the given { @ code expression } note that when the { @ code job id } is { @ link metadata # all } all jobs are returned

public void expand jobs ( string expression , boolean allow no match , action listener < query page < job > > jobs listener ) { map < string , job > cluster state jobs = expand jobs from cluster state ( expression , allow no match , cluster service state ( ) ) ; job config provider expand jobs ( expression , allow no match , false , action listener wrap ( job builders - > { / / check for duplicate jobs for ( job builder jb : job builders ) { if ( cluster state jobs contains key ( jb get id ( ) ) ) { jobs listener on failure ( new illegal state exception ( " job [ " + jb get id ( ) + " ] configuration " + " exists in both clusterstate and index " ) ) ; return ; } } / / merge cluster state and index jobs list < job > jobs = new array list < > ( ) ; for ( job builder jb : job builders ) { jobs add ( jb build ( ) ) ; } jobs add all ( cluster state jobs values ( ) ) ; collections sort ( jobs , comparator comparing ( job : : get id ) ) ; jobs listener on response ( new query page < > ( jobs , jobs size ( ) , job results field ) ) ; } , jobs listener : : on failure ) ) ; }


local span analysis is triggered with extension logic service tags

public void test parse span with logic endpoint tag ( ) { final mock receiver mock receiver = new mock receiver ( ) ; multi scopes analysis listener listener = new multi scopes analysis listener ( mock receiver , config , cache , naming control ) ; final long start time = system current time millis ( ) ; final json object logic span tag value = new json object ( ) ; logic span tag value add property ( " name " , " / graph q l - service " ) ; logic span tag value add property ( " latency " , 100 ) ; logic span tag value add property ( " status " , false ) ; span object span object = span object new builder ( ) set operation name ( " / logic - call " ) set start time ( start time ) set end time ( start time + 1000l ) set is error ( false ) set span type ( span type local ) add tags ( key string value pair new builder ( ) set key ( logic endpoint ) set value ( logic span tag value to string ( ) ) build ( ) ) build ( ) ; final segment object segment = segment object new builder ( ) set service ( " mock - service " ) set service instance ( " mock - instance " ) add spans ( span object ) build ( ) ; listener parse local ( span object , segment ) ; listener build ( ) ; final list < source > received sources = mock receiver get received sources ( ) ; assert assert equals ( 1 , received sources size ( ) ) ; final endpoint source = ( endpoint ) received sources get ( 0 ) ; assert assert equals ( " / graph q l - service " , source get name ( ) ) ; mock receiver clear ( ) ; }


set whether the user should be enabled or not

public has privileges request builder source ( string username , bytes reference source , x content type x content type ) throws i o exception { final role descriptor role = role descriptor parse privileges check ( username + " / has privileges " , source , x content type ) ; request username ( username ) ; request index privileges ( role get indices privileges ( ) ) ; request cluster privileges ( role get cluster privileges ( ) ) ; request application privileges ( role get application privileges ( ) ) ; return this ; }


public list < cov exp > get branches ( ) { return branches ; }


calculates merging strategies for all options it applies options given by a user to the { @ link # default merging strategies } the { @ link merging strategy } specified for { @ link feature option # all } overwrites all the default options those can be further changed with a specific { @ link feature option }

public map < feature option , merging strategy > compute merging strategies ( list < sql table like sql table like option > merging options ) { map < feature option , merging strategy > result = new hash map < > ( default merging strategies ) ; optional < sql table like sql table like option > maybe all option = merging options stream ( ) filter ( option - > option get feature option ( ) = = feature option all ) find first ( ) ; maybe all option if present ( ( all option ) - > { merging strategy strategy = all option get merging strategy ( ) ; for ( feature option feature option : feature option values ( ) ) { if ( feature option ! = feature option all ) { result put ( feature option , strategy ) ; } } } ) ; for ( sql table like sql table like option merging option : merging options ) { result put ( merging option get feature option ( ) , merging option get merging strategy ( ) ) ; } return result ; }


protected static micro zookeeper service create secure z k instance ( string name ) throws exception { string context = zookeeper server context ; configuration conf = new configuration ( ) ; file testdir = new file ( system get property ( " test dir " , " target " ) ) ; file work dir = new file ( testdir , name ) ; if ( ! work dir mkdirs ( ) ) { assert true ( work dir is directory ( ) ) ; } system set property ( zookeeper config options prop zk server maintain connection despite sasl failure , " false " ) ; registry security validate context ( context ) ; conf set ( micro zookeeper service keys key registry zkservice jaas context , context ) ; micro zookeeper service secure z k = new micro zookeeper service ( name ) ; secure z k init ( conf ) ; log info ( secure z k get diagnostics ( ) ) ; return secure z k ; }


return a { @ link resolvable type } for the specified { @ link class } , using the full generic type information for assignability checks for example : { @ code resolvable type for class ( my array list class ) }

public static resolvable type for class ( @ nullable class < ? > clazz ) { return new resolvable type ( clazz ) ; }


test the gc time percentage could be got successfully

public void test gc time percentage metrics ( ) throws exception { metrics record builder rb = get metrics ( jvm metrics ) ; metrics asserts get int gauge ( gc time percentage name ( ) , rb ) ; }


returns the mapping version which is at least as up to date as the mapping version that the primary used to index the translog operations in this request if the mapping version on the replica is not older this version , we should not retry on { @ link org elasticsearch index mapper mapper exception } ; otherwise we should wait for a new mapping then retry

long mapping version on primary ( ) { return mapping version on primary ; }


verification will be triggered after given amount of millis , allowing testing of async code useful when interactions with the mock object did not happened yet extensive use of { @ code after ( ) } method can be a code smell - there are better ways of testing concurrent code not yet implemented to work with in order verification see also { @ link # timeout ( long ) } method for testing async code differences between { @ code timeout ( ) } and { @ code after ( ) } are explained below < pre class = " code " > < code class = " java " > passes after 1 0 0ms , if some method ( ) has only been called once at that time verify ( mock , after ( 100 ) ) some method ( ) ; above is an alias to : verify ( mock , after ( 100 ) times ( 1 ) ) some method ( ) ; passes if some method ( ) is called < b > exactly < b > 2 times , as tested after 100 millis verify ( mock , after ( 100 ) times ( 2 ) ) some method ( ) ; passes if some method ( ) has not been called , as tested after 100 millis verify ( mock , after ( 100 ) never ( ) ) some method ( ) ; verifies some method ( ) after a given time span using given verification mode useful only if you have your own custom verification modes verify ( mock , new after ( 100 , your own verification mode ) ) some method ( ) ; < code > timeout ( ) vs after ( ) timeout ( ) exits immediately with success when verification passes after ( ) awaits full duration to check if verification passes examples : < pre class = " code " > < code class = " java " > 1 mock foo ( ) ; verify ( mock , after ( 1000 ) ) foo ( ) ; waits 1000 millis and succeeds 2 mock foo ( ) ; verify ( mock , timeout ( 1000 ) ) foo ( ) ; succeeds immediately < code > see examples in javadoc for { @ link mockito } class

public static verification after delay after ( long millis ) { return new after ( millis , verification mode factory times ( 1 ) ) ; }


finagle ' s zipkin tracer breaks on a column width with a trailing newline

@ test void decodes span generated by finagle ( ) throws exception { log entry entry = new log entry ( ) ; entry category = " zipkin " ; entry message = " " + " cg a bq / s b mnz e 0 4 8 l a a m a a a a o z 2 v 0 v h jh y 2 vz qnl j z h m k a a t n 0p + 4 e gf td ao a bav 7 a t j 8x n o p dw a g d a a a a a q k a a e a b r / wq + 2 de as a ag a a a a jzcgw a awg a a x 8 a a a e g a a ikwws a aw a a a ax 6a x bra w 4tc x vlcnk a a ao a a q a f h / cr 7zj 4 cw a c a a a i a g fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh \ n " + " y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh y w fh d a a d c a a bfw a a a q y a ai t d cw a d a a a a d hppc gtpbi 1xd w vye q a a cg a b a a uf 8 kw l py i l a a i a a a b o r 2 mo o sww ll b t u 2 nhdm vu z 2 us mj ax n s 0w o s 0x ny ax mjoz nzow mi ar m d aw m cwz m d qub wlsb glz z w nvbm rz kzc 2 mi 5ta w nyb 3 nl y 2 9u z h mp d a a d c a a bfw a a a q y a ai t d cw a d a a a a d hppc gtpbi 1xd w vye q a i a a q a b k z 6 a ao a a q a f h / cs d lf a cw a c a a a a an nz d a a d c a a bfw a a a q y a ai t d cw a d a a a a d hppc gtpbi 1xd w vye q a a dw a i d a a a a a u l a a e a a a a tc 3 j 2 l 2 zpbm fnb g uudm vyc 2lvbgs a ag a a a a y 2 lj i 4 lj a i a a m a a a a g d a a e c a a bfw a a a q y a ag a a cw a d a a a a d hppc gtpbi 1xd w vye q a a cw a b a a a a d 3 nydi 9td xgv z w 5h ymxl z as a ag a a a a e b c a a d a a a a a aw a b ag a a x 8 a a a e g a a i a a as a aw a a a ax 6a x bra w 4tc x vlcnk a a as a a q a a a a jz y qs a ag a a a a e b c a a d a a a a a aw a b ag a a x 8 a a a e g a a ikwws a aw a a a ax 6a x bra w 4tc x vlcnk a a as a a q a a a a jj y qs a ag a a a a e b c a a d a a a a a aw a b ag a a x 8 a a a e g a a l 5 y as a aw a a a ax 6a x bra w 4tc x vlcnk a a as a a q a a a a zud w 1 j z h m l a a i a a a a e a a a a a qg a aw a a a a m m a a q i a a f / a a a b bg a c j m m l a a m a a a a memlwa 2lu l x f 1 z x j 5 a a a c a ak a a a = = \ n " ; scribe span consumer scribe = new scribe span consumer ( entry category , consumer ) ; expect success ( scribe , entry ) ; / / storage finishes after callback so wait for it await ( ) until asserted ( ( ) - > assert that ( storage get traces ( ) ) contains exactly ( as list ( v 2 ) ) ) ; assert that ( scribe metrics messages ( ) ) is equal to ( 1 ) ; assert that ( scribe metrics messages dropped ( ) ) is zero ( ) ; assert that ( scribe metrics bytes ( ) ) is equal to ( base 6 4 get mime decoder ( ) decode ( entry message ) length ) ; assert that ( scribe metrics spans ( ) ) is equal to ( 1 ) ; assert that ( scribe metrics spans dropped ( ) ) is zero ( ) ; }


adds a constant value by reference any value encountered during serialization which { @ code = = object } will be replaced by { @ code object } upon deserialization interned objects and effective singletons are ideal for reference constants these constants should be interned or effectively interned : it should not be possible to create objects that should be considered equal in which one has an element of this list and the other does not , since that would break bit - for - bit equality of the objects ' serialized bytes when used in { @ link com google devtools build skyframe sky key } s note that even { @ link boolean } does not satisfy this constraint , since { @ code new boolean ( true ) } is allowed , but upon deserialization , when a { @ code boolean } is boxed to a { @ link boolean } , it will always be { @ link boolean # true } or { @ link boolean # false } the same is not true for an empty { @ link immutable list } , since an empty non - { @ link immutable list } will not serialize to an { @ link immutable list } , and so won ' t be deserialized to an empty { @ link immutable list } if an object has a list field , and one codepath passes in an empty { @ link array list } and another passes in an empty { @ link immutable list } , and two objects constructed in this way can be considered equal , then those two objects already do not serialize bit - for - bit identical disregarding this list of constants , since the list object ' s codec will be different for the two objects

public builder add reference constant ( object object ) { reference constants builder add ( object ) ; return this ; }


public void set end ( int end ) { this end = end ; }


counts the number of temporary blobs in the backing store

private int get num temp blobs ( ) { int count = 0 ; for ( string key : backing store get keys ( ) ) { if ( key contains ( native azure file system azure temp folder ) ) { count + + ; } } return count ; }


public static internal log factory get factory ( ) { return factory ; }


invoked when the response is getting committed allowing sub - classes to make apply header values to the underlying response note that most sub - classes use an { @ link http headers } instance that wraps an adapter to the native response headers such that changes are propagated to the underlying response on the go that means this callback is typically not used other than for specialized updates such as setting the content type or character encoding fields in a servlet response

protected abstract void apply headers ( ) ;


performs a modifier key press does not release the modifier key - subsequent interactions may assume it ' s kept pressed note that the modifier key is < b > never < b > released implicitly - either key up ( the key ) or send keys ( keys null ) must be called to release the modifier

public actions key down ( char sequence key ) { if ( is building actions ( ) ) { action add action ( new key down action ( json keyboard , json mouse , as keys ( key ) ) ) ; } return add key action ( key , code point - > tick ( default keyboard create key down ( code point ) ) ) ; }


boolean try add ( task message task msg ) { if ( ( encoded length + msg encode length ( task msg ) ) > buffer size ) return false ; add ( task msg ) ; return true ; }


public string name ( ) { return name ; }


construct dex meta - info and write it to meta file and log

protected void log to dex meta ( file new file , file old file , file dex diff file , string dest md 5 in dvm , string dest md 5 in art , string dex diff md 5 , long new or full patched crc ) { if ( meta writer = = null & & log writer = = null ) { return ; } string parent relative = get parent relative path string to new file ( new file ) ; string relative = get relative path string to new file ( new file ) ; if ( meta writer ! = null ) { string file name = new file get name ( ) ; string dex mode = " jar " ; if ( config m dex raw ) { dex mode = " raw " ; } / / new file string old crc ; if ( old file = = null ) { old crc = " 0 " ; logger d ( " dex decoder : add newly dex file : % s " , parent relative ) ; } else { old crc = file operation get zip entry crc ( config m old apk file , relative ) ; if ( old crc = = null | | old crc equals ( " 0 " ) ) { throw new tinker patch exception ( string format ( " can ' t find zip entry % s from old apk file % s " , relative , config m old apk file get path ( ) ) ) ; } } string meta = file name + " , " + parent relative + " , " + dest md 5 in dvm + " , " + dest md 5 in art + " , " + dex diff md 5 + " , " + old crc + " , " + new or full patched crc + " , " + dex mode ; logger d ( " dex decoder : write meta file data : % s " , meta ) ; meta writer write line to info file ( meta ) ; } if ( log writer ! = null ) { string log = relative + " , old size = " + file operation get file sizes ( old file ) + " , new size = " + file operation get file sizes ( new file ) + " , diff size = " + file operation get file sizes ( dex diff file ) ; log writer write line to info file ( log ) ; } }


returns true if the specified value is in the map note this traverses the entire map and compares every value , which may be an expensive operation

public boolean contains value ( long value ) { k [ ] key table = this key table ; long [ ] value table = this value table ; for ( int i = value table length - 1 ; i > = 0 ; i - - ) if ( key table [ i ] ! = null & & value table [ i ] = = value ) return true ; return false ; }


test variants of using t ( ) and staticnon - static methodpropertyfield references

public void constructor reference spr13781 ( ) { / / static field access on a t ( ) referenced type expression = parser parse expression ( " t ( java util locale ) english " ) ; assert that ( expression get value ( ) to string ( ) ) is equal to ( " en " ) ; assert can compile ( expression ) ; assert that ( expression get value ( ) to string ( ) ) is equal to ( " en " ) ; / / the actual expression from the bug report it fails if the english reference fails / / to pop the type reference for locale off the stack ( if it isn ' t popped then / / to lower case ( ) will be called with a locale parameter ) in this situation the / / code generation for english should notice there is something on the stack that / / is not required and pop it off expression = parser parse expression ( " # user id to string ( ) to lower case ( t ( java util locale ) english ) " ) ; standard evaluation context context = new standard evaluation context ( ) ; context set variable ( " user id " , " ro dn ey " ) ; assert that ( expression get value ( context ) ) is equal to ( " rodney " ) ; assert can compile ( expression ) ; assert that ( expression get value ( context ) ) is equal to ( " rodney " ) ; / / property access on a class object expression = parser parse expression ( " t ( string ) name " ) ; assert that ( expression get value ( ) ) is equal to ( " java lang string " ) ; assert can compile ( expression ) ; assert that ( expression get value ( ) ) is equal to ( " java lang string " ) ; / / now the type reference isn ' t on the stack , and needs loading context = new standard evaluation context ( string class ) ; expression = parser parse expression ( " name " ) ; assert that ( expression get value ( context ) ) is equal to ( " java lang string " ) ; assert can compile ( expression ) ; assert that ( expression get value ( context ) ) is equal to ( " java lang string " ) ; expression = parser parse expression ( " t ( string ) get name ( ) " ) ; assert that ( expression get value ( ) ) is equal to ( " java lang string " ) ; assert can compile ( expression ) ; assert that ( expression get value ( ) ) is equal to ( " java lang string " ) ; / / these tests below verify that the chain of static accesses ( either method / property or field ) / / leave the right thing on top of the stack for processing by any outer consuming code / / here the consuming code is the string value of ( ) function if the wrong thing were on / / the stack ( for example if the compiled code for static methods wasn ' t popping the / / previous thing off the stack ) the value of ( ) would operate on the wrong value string shclass = statics helper class get name ( ) ; / / basic chain : property access then method access expression = parser parse expression ( " t ( string ) value of ( t ( string ) name value of ( 1 ) ) " ) ; assert that ( expression get value ( ) ) is equal to ( " 1 " ) ; assert can compile ( expression ) ; assert that ( expression get value ( ) ) is equal to ( " 1 " ) ; / / chain of statics ending with static method expression = parser parse expression ( " t ( string ) value of ( t ( " + shclass + " ) methoda ( ) methoda ( ) methodb ( ) ) " ) ; assert that ( expression get value ( ) ) is equal to ( " mb " ) ; assert can compile ( expression ) ; assert that ( expression get value ( ) ) is equal to ( " mb " ) ; / / chain of statics ending with static field expression = parser parse expression ( " t ( string ) value of ( t ( " + shclass + " ) fielda fielda fieldb ) " ) ; assert that ( expression get value ( ) ) is equal to ( " fb " ) ; assert can compile ( expression ) ; assert that ( expression get value ( ) ) is equal to ( " fb " ) ; / / chain of statics ending with static property access expression = parser parse expression ( " t ( string ) value of ( t ( " + shclass + " ) propertya propertya propertyb ) " ) ; assert that ( expression get value ( ) ) is equal to ( " pb " ) ; assert can compile ( expression ) ; assert that ( expression get value ( ) ) is equal to ( " pb " ) ; / / variety chain expression = parser parse expression ( " t ( string ) value of ( t ( " + shclass + " ) fielda methoda ( ) propertya fieldb ) " ) ; assert that ( expression get value ( ) ) is equal to ( " fb " ) ; assert can compile ( expression ) ; assert that ( expression get value ( ) ) is equal to ( " fb " ) ; expression = parser parse expression ( " t ( string ) value of ( fielda fieldb ) " ) ; assert that ( expression get value ( statics helper sh ) ) is equal to ( " fb " ) ; assert can compile ( expression ) ; assert that ( expression get value ( statics helper sh ) ) is equal to ( " fb " ) ; expression = parser parse expression ( " t ( string ) value of ( propertya propertyb ) " ) ; assert that ( expression get value ( statics helper sh ) ) is equal to ( " pb " ) ; assert can compile ( expression ) ; assert that ( expression get value ( statics helper sh ) ) is equal to ( " pb " ) ; expression = parser parse expression ( " t ( string ) value of ( methoda ( ) methodb ( ) ) " ) ; assert that ( expression get value ( statics helper sh ) ) is equal to ( " mb " ) ; assert can compile ( expression ) ; assert that ( expression get value ( statics helper sh ) ) is equal to ( " mb " ) ; }


public long long value ( ) { return sum ( ) ; }


test that the slot manager release resource when the number of slots exceed max limit when new task executor registered

public void test max slot limit register worker ( ) throws exception { final int number slots = 1 ; final int max slot num = 1 ; final completable future < instance i d > released resource future = new completable future < > ( ) ; resource actions resource actions = create resource actions builder ( ) set release resource consumer ( ( instance i d , e ) - > released resource future complete ( instance i d ) ) build ( ) ; try ( final task executor manager task executor manager = create task executor manager builder ( ) set num slots per worker ( number slots ) set max num slots ( max slot num ) set resource actions ( resource actions ) create task executor manager ( ) ) { create and register task executor ( task executor manager , 1 , resource profile any ) ; instance i d rejected task executor id = create and register task executor ( task executor manager , 1 , resource profile any ) ; assert that ( released resource future get ( ) , is ( rejected task executor id ) ) ; } }


return the { @ link web exception handler web exception handlers } to be used for handling exceptions

list < web exception handler > exception handlers ( ) ;


reset the values of the elements we ' re tracking in order to handle the next file

private void reset ( ) { elements clear ( ) ; for ( image element e : elements to track ) elements put ( e , null ) ; file size = 0l ; }


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


return true if this grandparent animal 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 ; } grandparent animal grandparent animal = ( grandparent animal ) o ; return objects equals ( this pet type , grandparent animal pet type ) ; }


determines whether a character is a bmp letter according to { @ linkplain character # is letter ( char ) java ' s definition } if you only care to match letters of the latin alphabet , you can use { @ code in range ( ' a ' , ' z ' ) or ( in range ( ' a ' , ' z ' ) ) }

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


assumes as inputs a { @ link broadcast stream } and a { @ link keyed stream } and applies the given { @ link keyed broadcast process function } on them , thereby creating a transformed output stream

public < key , out > single output stream operator < out > process ( final keyed broadcast process function < key , in1 , in2 , out > function , final type information < out > out type info ) { preconditions check not null ( function ) ; preconditions check argument ( non broadcast stream instanceof keyed stream , " a keyed broadcast process function can only be used on a keyed stream " ) ; return transform ( function , out type info ) ; }


returns the class name for { @ code key } , if { @ code key } was created with a class instance returns null if { @ code key } represents a parameterized type or an array type

public static string get class name ( string key ) { int start = 0 ; if ( key starts with ( " @ " ) | | key starts with ( " members / " ) ) { start = key last index of ( ' / ' ) + 1 ; } return ( key index of ( ' < ' , start ) = = - 1 & & key index of ( ' [ ' , start ) = = - 1 ) ? key substring ( start ) : null ; }


configures a friendly name for the generator this will be used by the generator to select the library with the - g flag

public string get name ( ) { return " java - vertx " ; }


return true if the object at the location in the drag gesture event is draggable

public boolean is start drag ok ( drag gesture event e ) { return false ; / / boolean drag ok = false ; / / / / need to check that the location is on a component / / point point = e get drag origin ( ) ; / / int index = table row at point ( point ) ; / / / / if we are on a component then drag is allowed / / if ( ( index > = 0 ) & & ( index < model get num components ( ) ) ) { / / drag ok = true ; / / } / / return drag ok ; }


returns additional persistent tasks executors added by this plugin

default list < persistent tasks executor < ? > > get persistent tasks executor ( cluster service cluster service , thread pool thread pool , client client , settings module settings module , index name expression resolver expression resolver ) { return collections empty list ( ) ; }


method to be called after starlark - transitions are applied checks outputs we only do validation on starlark - defined build settings native options ( designated with { @ code command line option prefix } ) already have their output values checked in { @ link function transition util # apply transition } remove build settings in { @ code to options } that have been set to their default value this is how we ensure that an unset build setting and a set - to - default build settings represent the same configuration deduplicate redundant build settings from the result of split transitions the first encountered split key is used to represent the deduped build setting

public static map < string , build options > validate ( configuration transition root , map < package value key , package value > build setting packages , map < string , build options > to options ) throws transition exception { / / collect settings changed during this transition and their types map < label , rule > changed setting to rule = maps new hash map ( ) ; root visit ( ( starlark transition visitor ) transition - > { immutable set < label > changed settings = get relevant starlark settings from transition ( transition , settings outputs ) ; for ( label setting : changed settings ) { changed setting to rule put ( setting , get actual ( build setting packages , setting ) get associated rule ( ) ) ; } } ) ; / / return early if no starlark settings were affected if ( changed setting to rule is empty ( ) ) { return to options ; } immutable map builder < label , label > alias to actual builder = new immutable map builder < > ( ) ; for ( map entry < label , rule > changed setting with rule : changed setting to rule entry set ( ) ) { label setting = changed setting with rule get key ( ) ; rule rule = changed setting with rule get value ( ) ; if ( ! rule get label ( ) equals ( setting ) ) { alias to actual builder put ( setting , rule get label ( ) ) ; } } immutable map < label , label > alias to actual = alias to actual builder build ( ) ; / / verify changed settings were changed to something reasonable for their type and filter out / / default values immutable map builder < string , build options > cleaned option map = immutable map builder ( ) ; set < build options > cleaned option set = sets new linked hash set with expected size ( to options size ( ) ) ; for ( string split key : to options key set ( ) ) { / / lazily initialized to optimize for the common case where we don ' t modify anything build options builder cleaned options = null ; / / clean up aliased values build options options = unalias ( to options get ( split key ) , alias to actual ) ; for ( map entry < label , rule > changed setting with rule : changed setting to rule entry set ( ) ) { / / if the build setting was referenced in the transition via an alias , this is that alias label maybe alias setting = changed setting with rule get key ( ) ; rule rule = changed setting with rule get value ( ) ; / / if the build setting was * not * referenced in the transition by an alias , this is the same / / value as { @ code maybe alias setting } above label actual setting = rule get label ( ) ; object new value = options get starlark options ( ) get ( actual setting ) ; / / todo ( b / 154132845 ) : fix npe occasionally observed here preconditions check state ( new value ! = null , " error while attempting to validate new values from starlark " + " transition ( s ) with the outputs % s post - transition configuration should include " + " ' % s ' but only includes starlark options : % s if you run into this error " + " please ping b / 154132845 or email blaze - configurability @ google com " , changed setting to rule key set ( ) , actual setting , options get starlark options ( ) key set ( ) ) ; boolean allows multiple = rule get rule class object ( ) get build setting ( ) allows multiple ( ) ; if ( allows multiple ) { / / if this setting allows multiple settings if ( ! ( new value instanceof list ) ) { throw new transition exception ( string format ( " ' % s ' allows multiple values and must be set " + " in transition using a starlark list instead of single value ' % s ' " , actual setting , new value ) ) ; } list < ? > raw new value as list = ( list < ? > ) new value ; list < object > converted value = new array list < > ( ) ; type < ? > type = rule get rule class object ( ) get build setting ( ) get type ( ) ; for ( object value : raw new value as list ) { try { converted value add ( type convert ( value , maybe alias setting ) ) ; } catch ( conversion exception e ) { throw new transition exception ( e ) ; } } if ( converted value equals ( immutable list of ( rule get attr ( starlark build setting default attr name ) ) ) ) { if ( cleaned options = = null ) { cleaned options = options to builder ( ) ; } cleaned options remove starlark option ( rule get label ( ) ) ; } } else { / / if this setting does not allow multiple settings object converted value ; try { converted value = rule get rule class object ( ) get build setting ( ) get type ( ) convert ( new value , maybe alias setting ) ; } catch ( conversion exception e ) { throw new transition exception ( e ) ; } if ( converted value equals ( rule get attr ( starlark build setting default attr name ) ) ) { if ( cleaned options = = null ) { cleaned options = options to builder ( ) ; } cleaned options remove starlark option ( rule get label ( ) ) ; } } } / / keep the same instance if we didn ' t do anything to maintain reference equality later on options = cleaned options ! = null ? cleaned options build ( ) : options ; if ( cleaned option set add ( options ) ) { cleaned option map put ( split key , options ) ; } } return cleaned option map build ( ) ; } / * * resolve aliased build setting issues * * < p > if a build setting is transitioned upon via an alias , the resulting { @ link * build options # get starlark options ( ) } map will look like this : * * < entry 1 > alias - label - > new - value * < entry 2 > actual - label - > old - value * * < p > we need to collapse this to the correct single entry : actual - label - > new - value * by the end of this method , the starlark options map in the returned { @ link build options }


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

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


optional as of 3 2 6 this method is no longer called by the core any locking needed by the cache must be provided internally by the cache provider

default read write lock get read write lock ( ) { return null ; }


set the time the resource was last changed , as specified by the { @ code last - modified } header

public void set if modified since ( zoned date time if modified since ) { set zoned date time ( if modified since , if modified since with zone same instant ( gmt ) ) ; }


assign the exclusive buffers to all remote input channels directly for credit - based mode

public void setup channels ( ) throws i o exception { synchronized ( request lock ) { for ( input channel input channel : input channels values ( ) ) { input channel setup ( ) ; } } }


returns the connect timeout in millis if the connection attempt to the destination does not finish within the timeout , the connection attempt will be failed

public final long connect timeout millis ( ) { return connect timeout millis ; }


returns an unmodifiable view of the specified row - sorted table this method allows modules to provide users with " read - only " access to internal tables query operations on the returned table " read through " to the specified table , and attempts to modify the returned table , whether direct or via its collection views , result in an { @ code unsupported operation exception } the returned table will be serializable if the specified table is serializable

public static < r , c , v > row sorted table < r , c , v > unmodifiable row sorted table ( row sorted table < r , ? extends c , ? extends v > table ) { / * * it ' s not ? extends r , because it ' s technically not covariant in r specifically , * table row map ( ) comparator ( ) could return a comparator that only works for the ? extends r * collections unmodifiable sorted map makes the same distinction * / return new unmodifiable row sorted map < > ( table ) ; }


construct catalog table properties from { @ link # to properties ( ) }

public static map < string , string > remove redundant ( map < string , string > properties , table schema schema , list < string > partition keys ) { map < string , string > ret = new hash map < > ( properties ) ; descriptor properties descriptor properties = new descriptor properties ( ) ; descriptor properties put table schema ( schema schema , schema ) ; descriptor properties put partition keys ( partition keys ) ; descriptor properties as map ( ) key set ( ) for each ( ret : : remove ) ; return ret ; }


setup the translog used to find the last refreshed location

public void set current refresh location supplier ( supplier < translog location > current refresh location supplier ) { this current refresh location supplier = current refresh location supplier ; }


assert that the given dir does not have the { @ code success } marker

protected void assert success marker does not exist ( path dir ) throws i o exception { assert path does not exist ( " success marker " , new path ( dir , success ) ) ; }


creates a regular expression that can be used to create a pattern that will < b > match < b > all strings that match the given input string this method can be used with { @ link matcher # matches ( ) } or { @ link matcher # find ( ) }

public static string create pattern string ( string input , boolean allow globbing ) { string wild card pattern string = create single star pattern string ( input , allow globbing ) ; if ( wild card pattern string ! = null ) { return wild card pattern string ; } string converted = convert user input to regex ( input , allow globbing ) ; return converted ; }


test if the { @ link advanced wizard } smokes whatever instance of { @ link tobacco } is passed to him through the constructor parameter

public void test smoke every thing ( ) throws exception { list < tobacco > tobaccos = list of ( new old toby tobacco ( ) , new rivendell tobacco ( ) , new second breakfast tobacco ( ) ) ; / / verify if the wizard is smoking the correct tobacco tobaccos for each ( tobacco - > { final advanced wizard advanced wizard = new advanced wizard ( tobacco ) ; advanced wizard smoke ( ) ; string last message = appender get last message ( ) ; assert equals ( " advanced wizard smoking " + tobacco get class ( ) get simple name ( ) , last message ) ; } ) ; / / and nothing else is happening assert equals ( tobaccos size ( ) , appender get log size ( ) ) ; }


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

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


checks whether the pruning marker was set

public boolean is prune marker set ( ) { return this p flag ; }


sets the hierarchy the controller should be detached when this method is called

public void set hierarchy ( @ nullable drawee hierarchy hierarchy ) { if ( f log is loggable ( f log verbose ) ) { f log v ( tag , " controller % x % s : set hierarchy : % s " , system identity hash code ( this ) , m id , hierarchy ) ; } m event tracker record event ( ( hierarchy ! = null ) ? event on set hierarchy : event on clear hierarchy ) ; / / force release in case request was submitted if ( m is request submitted ) { m deferred releaser cancel deferred release ( this ) ; release ( ) ; } / / clear the existing hierarchy if ( m settable drawee hierarchy ! = null ) { m settable drawee hierarchy set controller overlay ( null ) ; m settable drawee hierarchy = null ; } / / set the new hierarchy if ( hierarchy ! = null ) { preconditions check argument ( hierarchy instanceof settable drawee hierarchy ) ; m settable drawee hierarchy = ( settable drawee hierarchy ) hierarchy ; m settable drawee hierarchy set controller overlay ( m controller overlay ) ; } if ( m logging listener ! = null ) { set up logging listener ( ) ; } }


do not enable this this is an experimental feature and your section surface will take a perf hit if you use it whether the items of this recycler binder can change height after the initial measure only applicable to horizontally scrolling recycler binders if true , the children of this h - scroll are all measured with unspecified height when the component tree of a child is remeasured , this will cause the recycler binder to remeasure in case the height of the child changed and the recycler view needs to have a different height to account for it this only supports changing the height of the item that triggered the remeasuring , not the height of all items in the h - scroll

public builder has dynamic item height ( boolean has dynamic item height ) { this has dynamic item height = has dynamic item height ; return this ; }


return a { @ code response entity } with the body decoded to a { @ code flux } of elements of the given type for an error response ( status code of 4xx or 5xx ) , the { @ code mono } emits a { @ link web client exception } use { @ link # on status ( predicate , function ) } to customize error response handling note : the { @ code flux } representing the body must be subscribed to or else associated resources will not be released

< t > mono < response entity < flux < t > > > to entity flux ( class < t > element type ) ;


public application id get app id ( ) { return this application id ; }


check if the given array contains the given value ( with case - insensitive comparison )

public static boolean contains ignore case ( string [ ] array , string value ) { for ( string str : array ) { if ( value = = null & & str = = null ) { return true ; } if ( value ! = null & & value equals ignore case ( str ) ) { return true ; } } return false ; }


returns { @ code true } if dns server can handle recursive queries


when a session is connected through a higher - level protocol it has a chance to use heartbeat management to shut down sessions that are too slow to send or receive messages however , after a web socket session is established and before the higher level protocol is fully connected there is a possibility for sessions to hang this method checks and closes any sessions that have been connected for more than 60 seconds without having received a single message

private void check sessions ( ) { long current time = system current time millis ( ) ; if ( ! is running ( ) | | ( current time - this last session check time < get time to first message ( ) ) ) { return ; } if ( this session check lock try lock ( ) ) { try { for ( web socket session holder holder : this sessions values ( ) ) { if ( holder has handled messages ( ) ) { continue ; } long time since created = current time - holder get create time ( ) ; if ( time since created < get time to first message ( ) ) { continue ; } web socket session session = holder get session ( ) ; if ( logger is info enabled ( ) ) { logger info ( " no messages received after " + time since created + " ms " + " closing " + holder get session ( ) + " " ) ; } try { this stats increment no messages received count ( ) ; session close ( close status session not reliable ) ; } catch ( throwable ex ) { if ( logger is warn enabled ( ) ) { logger warn ( " failed to close unreliable " + session , ex ) ; } } } } finally { this last session check time = current time ; this session check lock unlock ( ) ; } } }


copy an object then , if the copy worked , delete it if the copy failed , the source object is not deleted

private void copy then delete object ( swift object path src object , swift object path dest object ) throws i o exception { / / do the copy copy object ( src object , dest object ) ; / / getting here means the copy worked swift rest client delete ( src object ) ; }


returns whether a new loading media period should be enqueued , if available

public boolean should load next media period ( ) { return loading = = null | | ( ! loading info is final & & loading is fully buffered ( ) & & loading info duration us ! = c time unset & & length < maximum buffer ahead periods ) ; }


public void set colors ( int [ ] colors ) { this colors = colors ; }


prints a help message for the command to the terminal

private void print help ( terminal terminal , boolean to std error ) throws i o exception { if ( to std error ) { terminal error println ( description ) ; terminal error println ( " " ) ; parser print help on ( terminal get error writer ( ) ) ; } else { terminal println ( description ) ; terminal println ( " " ) ; print additional help ( terminal ) ; parser print help on ( terminal get writer ( ) ) ; } }


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

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


gets all windows in the system ( including frames )

public static set < window > get all windows ( ) { set < window > set = new hash set < > ( ) ; frame shared owner frame = ( frame ) app context get app context ( ) get ( new string buffer ( " swing utilities shared owner frame " ) ) ; if ( shared owner frame ! = null ) { set add all ( get all windows ( shared owner frame ) ) ; } for ( frame frame : frame get frames ( ) ) { set add all ( get all windows ( frame ) ) ; } window [ ] windows = window get windows ( ) ; for ( window window : windows ) { set add ( window ) ; } return set ; }


public type get type ( ) { return this ; }


get c uint file designator if use of a , b , c is not suitable

protected string build test file designator ( int file index , string file path ) { return null ; }


returns an iterator containing the elements of { @ code array } in order the returned iterator is a view of the array ; subsequent changes to the array will be reflected in the iterator < b > note : < b > it is often preferable to represent your data using a collection type , for example using { @ link arrays # as list ( object [ ] ) } , making this method unnecessary the { @ code iterable } equivalent of this method is either { @ link arrays # as list ( object [ ] ) } , { @ link immutable list # copy of ( object [ ] ) } } , or { @ link immutable list # of }

public static < t > unmodifiable iterator < t > for array ( final t array ) { return for array ( array , 0 , array length , 0 ) ; }


decodes the received data and logs it on standard console

public void handle channel read ( abstract nio channel channel , object read object , selection key key ) { / * * as this handler is attached with both tcp and udp channels we need to check whether the data * received is a byte buffer ( from tcp channel ) or a datagram packet ( from udp channel ) * / if ( read object instanceof byte buffer ) { do logging ( ( byte buffer ) read object ) ; send reply ( channel , key ) ; } else if ( read object instanceof datagram packet ) { var datagram = ( datagram packet ) read object ; do logging ( datagram get data ( ) ) ; send reply ( channel , datagram , key ) ; } else { throw new illegal state exception ( " unknown data received " ) ; } }


completable future < upload handle > start upload ( path file path ) throws i o exception ;


public void wait for completion ( ) throws i o exception ;


forcefully closes any filesystems in the cache , then clears the list of cached filesystems

public synchronized void clear ( ) { for ( entry < f s r l root , f s cache info > entry : filesystems entry set ( ) ) { try { f s cache info fci = entry get value ( ) ; file system ref ref = fci ref ; g file system fs = ref get filesystem ( ) ; if ( ! ref get filesystem ( ) get ref manager ( ) can close ( ref ) ) { msg warn ( this , " forcing filesystem closed : " + fs ) ; } fs close ( ) ; } catch ( i o exception e ) { msg warn ( this , " error closing filesystem : " + e ) ; } } filesystems clear ( ) ; }


category path get category ( ) { return pdb category ; }


{ @ inherit doc } each attribute value is formatted as a string before being added

public redirect attributes model map add all attributes ( @ nullable map < string , ? > attributes ) { if ( attributes ! = null ) { attributes for each ( this : : add attribute ) ; } return this ; }


advise that the first block replica be written without regard to the client locality

public hdfs data output stream builder ignore client locality ( ) { get flags ( ) add ( create flag ignore client locality ) ; return this ; }


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

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


returns the left child of the given node

private static r b node left of ( r b node p ) { return ( p = = null ) ? null : p left ; }


create distributed cache directories also create a file that contains the list of distributed cache files that will be used as distributed cache files for all the simulated jobs

int setup generate dist cache data ( job story producer jsp ) throws i o exception { create dist cache directory ( ) ; return build dist cache files list ( jsp ) ; }


returns a view of the part of this range map that intersects with { @ code range } for example , if { @ code range map } had the entries { @ code [ 1 , 5 ] = > " foo " , ( 6 , 8 ) = > " bar " , ( 10 , ∞ ) = > " baz " } then { @ code range map sub range map ( range open ( 3 , 12 ) ) } would return a range map with the entries { @ code ( 3 , 5 ] = > " foo " , ( 6 , 8 ) = > " bar " , ( 10 , 12 ) = > " baz " } the returned range map supports all optional operations that this range map supports , except for { @ code as map of ranges ( ) iterator ( ) remove ( ) } the returned range map will throw an { @ link illegal argument exception } on an attempt to insert a range not { @ linkplain range # encloses ( range ) enclosed } by { @ code range }

range map < k , v > sub range map ( range < k > range ) ;


schedule prepare bulk request runnable to run after some delay this is where throttling plugs into reindexing so the request can be rescheduled over and over again

public void delay prepare bulk request ( thread pool thread pool , long last batch start time n s , int last batch size , abstract runnable prepare bulk request runnable ) { / / synchronize so we are less likely to schedule the same request twice synchronized ( delayed prepare bulk request reference ) { time value delay = throttle wait time ( last batch start time n s , system nano time ( ) , last batch size ) ; logger debug ( " [ { } ] : preparing bulk request for [ { } ] " , task get id ( ) , delay ) ; try { delayed prepare bulk request reference set ( new delayed prepare bulk request ( thread pool , get requests per second ( ) , delay , new run once ( prepare bulk request runnable ) ) ) ; } catch ( es rejected execution exception e ) { prepare bulk request runnable on rejection ( e ) ; } } }


creates a { @ link future combiner } that processes the completed futures whether or not they ' re successful any failures from the input futures will not be propagated to the returned future

public static < v > future combiner < v > when all complete ( listenable future < ? extends v > futures ) { return new future combiner < v > ( false , immutable list copy of ( futures ) ) ; }


load the param information only when needed

public object lookup variable ( string name ) { if ( this unavailable variables contains ( name ) ) { throw new variable not available exception ( name ) ; } return super lookup variable ( name ) ; }


make sure that a request using a deterministic script or not using a script get cached ensure requests using nondeterministic scripts do not get cached

public void test script caching ( ) throws exception { assert acked ( prepare create ( " cache test idx " ) set mapping ( " d " , " type = long " ) set settings ( settings builder ( ) put ( " requests cache enable " , true ) put ( " number of shards " , 1 ) put ( " number of replicas " , 1 ) ) get ( ) ) ; index random ( true , client ( ) prepare index ( " cache test idx " ) set id ( " 1 " ) set source ( " s " , 1 ) , client ( ) prepare index ( " cache test idx " ) set id ( " 2 " ) set source ( " s " , 2 ) ) ; / / make sure we are starting with a clear cache assert that ( client ( ) admin ( ) indices ( ) prepare stats ( " cache test idx " ) set request cache ( true ) get ( ) get total ( ) get request cache ( ) get hit count ( ) , equal to ( 0l ) ) ; assert that ( client ( ) admin ( ) indices ( ) prepare stats ( " cache test idx " ) set request cache ( true ) get ( ) get total ( ) get request cache ( ) get miss count ( ) , equal to ( 0l ) ) ; / / test that a request using a nondeterministic script does not get cached search response r = client ( ) prepare search ( " cache test idx " ) set size ( 0 ) add aggregation ( random builder ( ) field ( " d " ) script ( new script ( script type inline , aggregation test scripts plugin name , " math random ( ) " , empty map ( ) ) ) ) get ( ) ; assert search response ( r ) ; assert that ( client ( ) admin ( ) indices ( ) prepare stats ( " cache test idx " ) set request cache ( true ) get ( ) get total ( ) get request cache ( ) get hit count ( ) , equal to ( 0l ) ) ; assert that ( client ( ) admin ( ) indices ( ) prepare stats ( " cache test idx " ) set request cache ( true ) get ( ) get total ( ) get request cache ( ) get miss count ( ) , equal to ( 0l ) ) ; / / test that a request using a deterministic script gets cached r = client ( ) prepare search ( " cache test idx " ) set size ( 0 ) add aggregation ( random builder ( ) field ( " d " ) script ( new script ( script type inline , aggregation test scripts plugin name , " value - 1 " , empty map ( ) ) ) ) get ( ) ; assert search response ( r ) ; assert that ( client ( ) admin ( ) indices ( ) prepare stats ( " cache test idx " ) set request cache ( true ) get ( ) get total ( ) get request cache ( ) get hit count ( ) , equal to ( 0l ) ) ; assert that ( client ( ) admin ( ) indices ( ) prepare stats ( " cache test idx " ) set request cache ( true ) get ( ) get total ( ) get request cache ( ) get miss count ( ) , equal to ( 1l ) ) ; / / ensure that non - scripted requests are cached as normal r = client ( ) prepare search ( " cache test idx " ) set size ( 0 ) add aggregation ( random builder ( ) field ( " d " ) ) get ( ) ; assert search response ( r ) ; assert that ( client ( ) admin ( ) indices ( ) prepare stats ( " cache test idx " ) set request cache ( true ) get ( ) get total ( ) get request cache ( ) get hit count ( ) , equal to ( 0l ) ) ; assert that ( client ( ) admin ( ) indices ( ) prepare stats ( " cache test idx " ) set request cache ( true ) get ( ) get total ( ) get request cache ( ) get miss count ( ) , equal to ( 2l ) ) ; }


this method is invoked to finish current bundle and start a new one when the trigger was fired

void finish bundle ( ) throws exception ;


sends kill signal to all process belonging to same process group , forcefully terminating the process group

public static void kill process group ( string pgrp id ) { maybe signal process group ( pgrp id , sigkill , sigkill str , false ) ; }