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


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

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


set this quaternion to the rotation between two vectors

public quaternion set from cross ( final float x 1 , final float y 1 , final float z 1 , final float x 2 , final float y 2 , final float z 2 ) { final float dot = math utils clamp ( vector 3 dot ( x 1 , y 1 , z 1 , x 2 , y 2 , z 2 ) , - 1f , 1f ) ; final float angle = ( float ) math acos ( dot ) ; return set from axis rad ( y 1 * z 2 - z 1 * y 2 , z 1 * x 2 - x 1 * z 2 , x 1 * y 2 - y 1 * x 2 , angle ) ; }


performs a retry delay if this is not the first attempt

protected void retry delay ( int attempt count ) { if ( attempt count > 0 ) { try { thread sleep ( attempt count * retry delay ) ; } catch ( interrupted exception e ) { log warn ( " failed to sleep " , e ) ; } } }


get the stack variable " first use offsets "

public int [ ] get stack var first use offsets ( ) { return stack var f u offsets ; }


invoked whenever the signal pin is changed or created

public static synchronized void on pin changed or created ( @ non null context context , @ non null string pin , @ non null pin keyboard type keyboard ) throws i o exception , unauthenticated response exception , invalid key exception { log i ( tag , " on pin changed or created ( ) " ) ; kbs values kbs values = signal store kbs values ( ) ; boolean is first pin = ! kbs values has pin ( ) | | kbs values has opted out ( ) ; master key master key = kbs values get or create master key ( ) ; key backup service key backup service = application dependencies get key backup service ( kbs enclaves current ( ) ) ; key backup service pin change session pin change session = key backup service new pin change session ( ) ; hashed pin hashed pin = pin hashing hash pin ( pin , pin change session ) ; kbs pin data kbs data = pin change session set pin ( hashed pin , master key ) ; kbs values set kbs master key ( kbs data , pin ) ; text secure preferences clear registration lock v 1 ( context ) ; signal store pin values ( ) set keyboard type ( keyboard ) ; signal store pin values ( ) reset pin reminders ( ) ; application dependencies get megaphone repository ( ) mark finished ( megaphones event pins for all ) ; if ( is first pin ) { log i ( tag , " first time setting a pin refreshing attributes to set the ' storage ' capability " ) ; best effort refresh attributes ( ) ; } else { log i ( tag , " not the first time setting a pin " ) ; } update state ( build inferred state from other fields ( ) ) ; }


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


returns the allocated byte size of the given bitmap

public static int get size ( @ non null bitmap bitmap ) { return get bitmap byte size ( bitmap ) ; }


calculate bit positions of { @ code str } , then check all the related { @ code bits } positions is 1

public boolean is hit ( string str , bits array bits ) { return is hit ( calc bit positions ( str ) , bits ) ; }


cas radius response authenticate ( string username , string password , optional state ) throws exception ;


public collection < ? extends d b s entity association > get associations ( @ not null d b r progress monitor monitor ) throws d b exception { return null ; }


views the array as an immutable list does not check for nulls

static < e > immutable list < e > as immutable list ( object [ ] elements , int length ) { if ( length = = 0 ) { return of ( ) ; } return new regular immutable list < e > ( elements , length ) ; }


a callback method that should never be invoked directly

public void on load failed ( glide exception e ) { on load failed ( e , log warn ) ; }


creates a new { @ code settable future } that can be completed or cancelled by a later method call

public static < v > settable future < v > create ( ) { return new settable future < v > ( ) ; }


copy the given headers into the entity ' s headers map

b headers ( @ nullable http headers headers ) ;


the number of shards skipped due to pre - filtering

public int get skipped shards ( ) { return shard stats skipped shards ; }


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


convert a { @ linkplain search request } into a { @ linkplain request }

static request search ( search request search request , string search endpoint ) throws i o exception { request request = new request ( http post method name , endpoint ( search request indices ( ) , search endpoint ) ) ; params params = new params ( ) ; add search request params ( params , search request ) ; if ( search request source ( ) ! = null ) { request set entity ( create entity ( search request source ( ) , request body content type ) ) ; } request add parameters ( params as map ( ) ) ; return request ; }


get an iterator over the list this can be used to remove elements it is not safe to do concurrent modifications from other threads while using this iterator

public iterator < e > iterator ( ) { return new intrusive iterator ( ) ; }


returns true if the { @ link data } instance is one of the many ' char ' data types

public static boolean is char ( data data ) { if ( data = = null ) { return false ; } data type dt = data get base data type ( ) ; return ( dt instanceof char data type ) | | ( dt instanceof wide char data type ) | | ( dt instanceof wide char 1 6 data type ) | | ( dt instanceof wide char 3 2 data type ) ; }


return if the container is not null and has more than zero elements

private boolean has length ( @ nullable path container container ) { return container ! = null & & container elements ( ) size ( ) > 0 ; }


verifies that reconfiguration result is incompatible if data type has changed

public void test migration strategy with different kryo type ( ) throws exception { kryo serializer < test class a > kryo serializer for a = new kryo serializer < > ( test class a class , new execution config ( ) ) ; / / snapshot configuration and serialize to bytes type serializer snapshot kryo serializer config snapshot = kryo serializer for a snapshot configuration ( ) ; byte [ ] serialized config ; try ( byte array output stream out = new byte array output stream ( ) ) { type serializer snapshot serialization util write serializer snapshot ( new data output view stream wrapper ( out ) , kryo serializer config snapshot , kryo serializer for a ) ; serialized config = out to byte array ( ) ; } kryo serializer < test class b > kryo serializer for b = new kryo serializer < > ( test class b class , new execution config ( ) ) ; / / read configuration again from bytes try ( byte array input stream in = new byte array input stream ( serialized config ) ) { kryo serializer config snapshot = type serializer snapshot serialization util read serializer snapshot ( new data input view stream wrapper ( in ) , thread current thread ( ) get context class loader ( ) , kryo serializer for b ) ; } @ suppress warnings ( " unchecked " ) type serializer schema compatibility < test class b > compat result = kryo serializer config snapshot resolve schema compatibility ( kryo serializer for b ) ; assert true ( compat result is incompatible ( ) ) ; }


creates a deep copy of the given { @ link operator stream state handle }

public static operator state handle deep dummy copy ( operator state handle original ) { if ( original = = null ) { return null ; } byte stream state handle state handle copy = clone byte stream state handle ( ( byte stream state handle ) original get delegate state handle ( ) ) ; map < string , operator state handle state meta info > offsets = original get state name to partition offsets ( ) ; map < string , operator state handle state meta info > offsets copy = new hash map < > ( offsets size ( ) ) ; for ( map entry < string , operator state handle state meta info > entry : offsets entry set ( ) ) { operator state handle state meta info meta info = entry get value ( ) ; operator state handle state meta info meta info copy = new operator state handle state meta info ( meta info get offsets ( ) , meta info get distribution mode ( ) ) ; offsets copy put ( string value of ( entry get key ( ) ) , meta info copy ) ; } return new operator stream state handle ( offsets copy , state handle copy ) ; }


create and initialize a new s3a file system instance this instance is always created without s 3 guard , so allowing a previously created metastore to be patched in note : this is a bit convoluted as it needs to also handle the situation of a per - bucket option in core - site xml , which isn ' t easily overridden the new config and the setting of the values before any { @ code configuration get ( ) } calls are critical

protected void init s 3 a file system ( string path ) throws i o exception { log debug ( " initializing s3a fs to { } " , path ) ; uri uri = to uri ( path ) ; / / make sure that s 3 a file system does not hold an actual metadata store / / implementation configuration conf = new configuration ( get conf ( ) ) ; string null store = null metadata store class get name ( ) ; conf set ( s3 metadata store impl , null store ) ; string bucket = uri get host ( ) ; s 3 a utils set bucket option ( conf , bucket , s3 metadata store impl , s3guard metastore null ) ; string updated bucket option = s 3 a utils get bucket option ( conf , bucket , s3 metadata store impl ) ; log debug ( " updated bucket store option { } " , updated bucket option ) ; preconditions check state ( s3guard metastore null equals ( updated bucket option ) , " expected bucket option to be % s but was % s " , s3guard metastore null , updated bucket option ) ; bind filesystem ( file system new instance ( uri , conf ) ) ; }


corrupts random translog file ( translog - n tlog or translog - n ckp or translog ckp ) from the given translog directory , ignoring translogs and checkpoints with generations below the generation recorded in the latest index commit found in translog dir index , or writes a corrupted translog - n ckp file as if from a crash while rolling a generation see { @ link test translog # corrupt file ( logger , random , path , boolean ) } for details of the corruption applied

public static void corrupt random translog file ( logger logger , random random , path translog dir ) throws i o exception { corrupt random translog file ( logger , random , translog dir , translog read checkpoint ( translog dir ) min translog generation ) ; }


get a report ( application report ) of all applications in the cluster if the user does not have < code > view app < code > access for an application then the corresponding report will be filtered as described in { @ link # get application report ( application id ) }

public abstract list < application report > get applications ( ) throws yarn exception , i o exception ;


if the specified collection is backed by an object count hash map , it will be much more efficient to iterate over it by index rather than an entry iterator , which will need to allocate an object for each entry , so we check for that

static < t > object count hash map < t > try get map ( iterable < t > multiset ) { if ( multiset instanceof regular immutable multiset ) { return ( ( regular immutable multiset < t > ) multiset ) contents ; } else if ( multiset instanceof abstract map based multiset ) { return ( ( abstract map based multiset < t > ) multiset ) backing map ; } else { return null ; } }


a sensible definition of { @ link # to string } in terms of { @ link # get key } and { @ link # get value } if you override either of these methods , you may wish to override { @ link # equals } to forward to this implementation

protected string standard to string ( ) { return get key ( ) + " = " + get value ( ) ; }


close current block and update { @ link # stream c r c }

private void close block ( byte buf out ) { final bzip 2 block compressor block compressor = this block compressor ; if ( ! block compressor is empty ( ) ) { block compressor close ( out ) ; final int block c r c = block compressor crc ( ) ; stream c r c = ( stream c r c < < 1 | stream c r c > > > 31 ) ^ block c r c ; } }


public byte [ ] wrap ( byte [ ] bytes , int off , int len ) throws sasl exception { if ( sasl client ! = null ) { return sasl client wrap ( bytes , off , len ) ; } else { return sasl server wrap ( bytes , off , len ) ; } }


determines the number of instructions from the first function that do not match an instruction in the second function

public list < instruction > get unmatched instructions in first ( ) { return src store get unmatched instructions ( ) ; }


public void prop 1 test ( ) { / / todo : test prop 1 }


convenient method to execute without context

public t find object by named param ( map < string , ? > param map ) throws data access exception { return find object by named param ( param map , null ) ; }


gets the string that says how long since this build has started

public @ non null string get timestamp string ( ) { long duration = new gregorian calendar ( ) get time in millis ( ) - timestamp ; return util get time span string ( duration ) ; }


get the bean name of { @ link reference bean } if { @ link reference # id ( ) id attribute } is present , or { @ link # generate reference bean name ( annotation attributes , class ) generate }

private string get reference bean name ( annotation attributes attributes , class < ? > interface class ) { / / id attribute appears since 2 7 3 string bean name = get attribute ( attributes , " id " ) ; if ( ! has text ( bean name ) ) { bean name = generate reference bean name ( attributes , interface class ) ; } return bean name ; }


set the matcher for the workers portion of the response

public bulk index by scroll response matcher slices ( matcher < collection < ? extends bulk index by scroll response matcher > > slices matcher ) { this slices matcher = slices matcher ; return this ; }


create a { @ link consumer record } with { @ code null } - key and the given topic name , value , and timestamp does not auto advance internally tracked time

public consumer record < byte [ ] , byte [ ] > create ( final string topic name , final v value , final long timestamp ms ) { return create ( topic name , null , value , new record headers ( ) , timestamp ms ) ; }


returns the index of the last character that is not an identifier character in the given string , at or before the given index

private int last non identifier index ( string line , int index ) { while ( index > = 0 & & character is java identifier part ( line char at ( index ) ) ) { index - - ; } return index ; }


only select executions which have a local string variable which is not the given value , case insensitive this method only works if your database has encodingcollation that supports case - sensitive queries for example , use " collate utf - 8 " on my s q l and for mssql , select one of the case - sensitive collations available ( < a href = " http : msdn microsoft comen - uslibraryms 1 4 4 2 5 0 ( v = sql 105 ) aspx " > msdn server collation reference )

execution query variable value not equals ignore case ( string name , string value ) ;


public void update date ( string column label , date x ) throws s q l exception { }


sets the last number of bytes the user entered for a data type

public void set last num duplicates ( int num duplicates ) { last num duplicates = num duplicates ; }


this method copies the attributes from an edge ' e ' from directed graph ' other ' into this graph associated with edge ' newe '

protected void copy edge attribute values ( edge newe , edge e , directed graph other ) { attribute manager < edge > aman = other edge attributes ( ) ; string vam names [ ] = aman get attribute names ( ) ; for ( int i = 0 ; i < vam names length ; i + + ) { object attribute < edge > att = ( object attribute < edge > ) aman get attribute ( vam names [ i ] ) ; if ( ! this edge attributes ( ) has attribute named ( vam names [ i ] ) ) { this edge attributes ( ) create attribute ( vam names [ i ] , att attribute type ( ) ) ; } object o = other get edge property ( vam names [ i ] , e ) ; if ( o ! = null ) this set edge property ( vam names [ i ] , newe , o ) ; } }


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


public int write class def ( class def class def ) { ensure four bytes aligned ( table of contents class defs , true ) ; return super write class def ( class def ) ; }


involves a user with a process instance the type of identity link is defined by the given identity link type

void add user identity link ( string process instance id , string user id , string identity link type ) ;


public static long get long ( @ non null final string key , @ non null final s p utils sp utils ) { return sp utils get long ( key ) ; }


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 id : return is set id ( ) ; } throw new illegal state exception ( ) ; }


replaces a state handle in zoo keeper and discards the old state handle

public void replace ( string path in zoo keeper , integer resource version expected version , t state ) throws exception { check not null ( path in zoo keeper , " path in zoo keeper " ) ; check not null ( state , " state " ) ; final string path = normalize path ( path in zoo keeper ) ; retrievable state handle < t > old state handle = get ( path , false ) ; retrievable state handle < t > new state handle = storage store ( state ) ; boolean success = false ; try { / / serialize the new state handle this writes the state to the backend byte [ ] serialized state handle = instantiation util serialize object ( new state handle ) ; / / replace state handle in zoo keeper client set data ( ) with version ( expected version get value ( ) ) for path ( path , serialized state handle ) ; success = true ; } catch ( keeper exception no node exception e ) { / / we wrap the exception here so that it could be caught in default job graph store throw new not exist exception ( " zoo keeper node " + path + " does not exist " , e ) ; } finally { if ( success ) { old state handle discard state ( ) ; } else { new state handle discard state ( ) ; } } }


returns a value that is a percentage of the actor ' s height

static public value percent height ( final float percent ) { return new value ( ) { public float get ( @ null actor actor ) { return actor get height ( ) * percent ; } } ; }


loads parts of the asset asynchronously if the loader is an { @ link asynchronous asset loader }

public void call ( ) throws exception { if ( cancel ) return null ; asynchronous asset loader async loader = ( asynchronous asset loader ) loader ; if ( ! dependencies loaded ) { dependencies = async loader get dependencies ( asset desc file name , resolve ( loader , asset desc ) , asset desc params ) ; if ( dependencies ! = null ) { remove duplicates ( dependencies ) ; manager inject dependencies ( asset desc file name , dependencies ) ; } else { / / if we have no dependencies , we load the async part of the task immediately async loader load async ( manager , asset desc file name , resolve ( loader , asset desc ) , asset desc params ) ; async done = true ; } } else { async loader load async ( manager , asset desc file name , resolve ( loader , asset desc ) , asset desc params ) ; async done = true ; } return null ; }


public class loader get class loader ( ) { return class loader ; }


setup the expected exception class , and exception message that the test is supposed to fail with

protected void set expected failure message ( string operation , path path ) { expected ex expect ( wasb authorization exception class ) ; expected ex expect message ( string format ( " % s operation for path : % s not allowed " , operation , path make qualified ( fs get uri ( ) , fs get working directory ( ) ) ) ) ; }


note : returns null if engine is not yet started ( e g recovery phase 1 , copying over index files , is still running ) , or if engine is closed

protected engine get engine or null ( ) { return this current engine reference get ( ) ; }


public void get user by name test ( test context test context ) { async async = test context async ( ) ; string username = null ; api get user by name ( username , result - > { / / todo : test validations async complete ( ) ; } ) ; }


public active span set baggage item ( string key , string value ) { return this ; }


public static list < string > retrieve addresses uri type ( endpoint epr ) throws invalid record exception { if ( epr = = null ) { return null ; } require address type ( address uri , epr ) ; list < map < string , string > > addresses = epr addresses ; if ( addresses size ( ) < 1 ) { throw new invalid record exception ( epr to string ( ) , " no addresses in endpoint " ) ; } list < string > results = new array list < string > ( addresses size ( ) ) ; for ( map < string , string > address : addresses ) { results add ( get address field ( address , address uri ) ) ; } return results ; }


constructs a mapping of configuration properties to be used for filter initialization the mapping includes all properties that start with the specified configuration prefix property names in the mapping are trimmed to remove the configuration prefix

public static map < string , string > get filter params ( configuration conf , string conf prefix ) { return conf get props with prefix ( conf prefix ) ; }


removes all but the base acl entries of files and directories the entries for user , group , and others are retained for compatibility with permission bits

public void remove acl ( path path ) throws i o exception { throw new unsupported operation exception ( get class ( ) get simple name ( ) + " doesn ' t support remove acl " ) ; }


fill the next buffer of bytes being provided by this stream

private void establish next buffer ( ) throws i o exception { while ( data up next < data blocks size ( ) ) { omf data data = data blocks get ( data up next ) ; if ( pointer < data get data offset ( ) ) { / / we have some fill to produce before the next section long size = data get data offset ( ) - pointer ; if ( size > omf loader max uninitialized fill ) { throw new i o exception ( " unfilled hole in omf data blocks for segment : " + segment name ) ; } buffer = new byte [ ( int ) size ] ; for ( int i = 0 ; i < size ; + + i ) { buffer [ i ] = 0 ; } bufferpointer = 0 ; return ; } else if ( pointer = = data get data offset ( ) ) { buffer = data get byte array ( reader ) ; bufferpointer = 0 ; data up next + + ; if ( buffer length = = 0 ) { continue ; } return ; } else { data up next + + ; throw new i o exception ( string format ( " segment % s : % s has bad data offset ( 0x % x ) in data block % d skipping " , segment name , class name , data get data offset ( ) , data up next - 1 ) ) ; } } / / we may have filler after the last block long size = segment length - pointer ; if ( size > omf loader max uninitialized fill ) { throw new i o exception ( " large hole at the end of omf segment : " + segment name ) ; } buffer = new byte [ ( int ) size ] ; for ( int i = 0 ; i < size ; + + i ) { buffer [ i ] = 0 ; } bufferpointer = 0 ; }


creates a { @ link flag group } from a { @ link starlark info }

static flag group flag group from starlark ( starlark info flag group struct ) throws eval exception { check right provider type ( flag group struct , " flag group " ) ; immutable list builder < expandable > expandable builder = immutable list builder ( ) ; immutable list < string > flags = get string list from starlark provider field ( flag group struct , " flags " ) ; for ( string flag : flags ) { string value parser parser = new string value parser ( flag ) ; expandable builder add ( flag create ( parser get chunks ( ) ) ) ; } immutable list < starlark info > flag groups = get starlark provider list from starlark field ( flag group struct , " flag groups " ) ; for ( starlark info flag group : flag groups ) { expandable builder add ( flag group from starlark ( flag group ) ) ; } if ( flag groups size ( ) > 0 & & flags size ( ) > 0 ) { throw info error ( flag group struct , " flag group must contain either a list of flags or a list of flag groups " ) ; } if ( flag groups size ( ) = = 0 & & flags size ( ) = = 0 ) { throw info error ( flag group struct , " both ' flags ' and ' flag groups ' are empty " ) ; } string iterate over = get mandatory field from starlark provider ( flag group struct , " iterate over " , string class ) ; string expand if available = get mandatory field from starlark provider ( flag group struct , " expand if available " , string class ) ; string expand if not available = get mandatory field from starlark provider ( flag group struct , " expand if not available " , string class ) ; string expand if true = get mandatory field from starlark provider ( flag group struct , " expand if true " , string class ) ; string expand if false = get mandatory field from starlark provider ( flag group struct , " expand if false " , string class ) ; starlark info expand if equal struct = get mandatory field from starlark provider ( flag group struct , " expand if equal " , starlark info class ) ; variable with value expand if equal = expand if equal struct = = null ? null : variable with value from starlark ( expand if equal struct ) ; return new flag group ( expandable builder build ( ) , iterate over , expand if available = = null ? immutable set of ( ) : immutable set of ( expand if available ) , expand if not available = = null ? immutable set of ( ) : immutable set of ( expand if not available ) , expand if true , expand if false , expand if equal ) ; }


gets ready to start working on a new block this will clear the { @ link # insns } list , set { @ link # catches } , reset whether it has been used , reset whether the block contains a { @ code return } , and reset { @ link # primary successor index }

public void start block ( type list catches ) { this catches = catches ; insns clear ( ) ; catches used = false ; returns = false ; primary successor index = 0 ; extra block count = 0 ; block can throw = false ; has jsr = false ; return address = null ; }


we ' re doing 4 - phased lto build , and this is the final link action ( 4 - th phase )

private boolean is final link of lto build ( ) { return ! is lto indexing & & all lto artifacts ! = null ; }


adds a listener to be notified when a format changes

public void add format model listener ( format model listener listener ) { format listeners add ( listener ) ; }


like { @ code equals } , but only consider the simple types of the registers that is , this compares { @ code get type ( ) } on the types to ignore whatever arbitrary extra stuff might be carried around by an outer { @ link type bearer }

public boolean equals using simple type ( register spec other ) { if ( ! matches variable ( other ) ) { return false ; } return ( reg = = other reg ) ; }


throws an { @ link unsupported operation exception } since the type of annotation represented by an { @ code untyped annotation descriptor } is unknown

public set < annotation > find all local merged annotations ( ) { throw new unsupported operation exception ( " find all local merged annotations ( ) is unsupported in untyped annotation descriptor " ) ; }


performs an bitwise or on the given arrays

public static byte [ ] byte array or ( byte [ ] arr 1 , byte [ ] arr 2 ) { byte [ ] result = new byte [ arr 1 length ] ; if ( arr 1 length ! = arr 2 length ) { return null ; } for ( int x = 0 ; x < arr 1 length ; x + + ) { result [ x ] = ( byte ) ( arr 1 [ x ] | arr 2 [ x ] ) ; } return result ; }


called to log an audit event this method must return as quickly as possible , since it ' s called in a critical section of the name node ' s operation

void log audit event ( boolean succeeded , string user name , inet address addr , string cmd , string src , string dst , file status stat ) ;


returns the current ordinal or { @ code 0 } if this build has not been advanced via { @ link # next ordinal ( ) }

public long current ordinal ( ) { return current ord ; }


executed after the query phase successfully finished note : this is not invoked if the query phase execution failed

default void on query phase ( search context search context , long took in nanos ) { }


invoke this method to transition the service to the { @ link state # failed } the service will < b > not be stopped < b > if it is running invoke this method when a service has failed critically or otherwise cannot be started nor stopped

protected final void notify failed ( throwable cause ) { check not null ( cause ) ; monitor enter ( ) ; try { state previous = state ( ) ; switch ( previous ) { case new : case terminated : throw new illegal state exception ( " failed while in state : " + previous , cause ) ; case running : case starting : case stopping : snapshot = new state snapshot ( failed , false , cause ) ; enqueue failed event ( previous , cause ) ; break ; case failed : / / do nothing break ; } } finally { monitor leave ( ) ; dispatch listener events ( ) ; } }


replace the generic test from superclass , wrapper query only expects to find ` query ` field with nested query and should throw exception for anything else

public void test unknown field ( ) { string json = " { \ " " + wrapper query builder name + " \ " : { \ " bogus field \ " : \ " some value \ " } } " ; parsing exception e = expect throws ( parsing exception class , ( ) - > parse query ( json ) ) ; assert true ( e get message ( ) contains ( " bogus field " ) ) ; }


compares this object with the specified object for order

public int compare to ( m d 5 hash that ) { return writable comparator compare bytes ( this digest , 0 , md5 len , that digest , 0 , md5 len ) ; }


return true if the given key is in the hashtable

public boolean contains ( short key ) { return indexer get ( key ) > = 0 ; }


the interface used by clients to obtain a new { @ link reservation id } for submitting new reservations the < code > resource manager < code > responds with a new , unique , { @ link reservation id } which is used by the client to submit a new reservation

get new reservation response get new reservation ( get new reservation request request ) throws yarn exception , i o exception ;


set the schema language default is the w3c xml schema : { @ code http : www w 3 org 2 0 0 1 x m l schema " }

public void set schema language ( string schema language ) { this schema language = schema language ; }


set the active animation , replacing any current animation

public animation desc set animation ( final string id , int loop count , final animation listener listener ) { return set animation ( id , loop count , 1 0f , listener ) ; }


returns the name of all streaming { @ link output formatter } s in the input

public static string streaming formatter names ( iterable < output formatter > formatters ) { return streams stream ( formatters ) filter ( predicates instance of ( streamed formatter class ) ) map ( output formatter : : get name ) collect ( joining ( " , " ) ) ; }


renders the specified output buffer the implementation of this method takes ownership of the output buffer and is responsible for calling { @ link video decoder output buffer # release ( ) } either immediately or in the future

protected void render output buffer ( video decoder output buffer output buffer , long presentation time us , format output format ) throws decoder exception { if ( frame metadata listener ! = null ) { frame metadata listener on video frame about to be rendered ( presentation time us , system nano time ( ) , output format , / * media format = * / null ) ; } last render time us = c ms to us ( system clock elapsed realtime ( ) * 1000 ) ; int buffer mode = output buffer mode ; boolean render surface = buffer mode = = c video output mode surface yuv & & surface ! = null ; boolean render yuv = buffer mode = = c video output mode yuv & & output buffer renderer ! = null ; if ( ! render yuv & & ! render surface ) { drop output buffer ( output buffer ) ; } else { maybe notify video size changed ( output buffer width , output buffer height ) ; if ( render yuv ) { output buffer renderer set output buffer ( output buffer ) ; } else { render output buffer to surface ( output buffer , surface ) ; } consecutive dropped frame count = 0 ; decoder counters rendered output buffer count + + ; maybe notify rendered first frame ( ) ; } }


given a group path , find its corresponding tree path object

private tree path find tree path ( group path group path ) { for ( int i = 0 ; i < node list size ( ) ; i + + ) { program node node = node list get ( i ) ; group path p = node get group path ( ) ; if ( p equals ( group path ) ) { return node get tree path ( ) ; } } return null ; }


checks that the current starlark thread is in the loading phase

public void check loading phase ( string function ) throws eval exception { if ( phase ! = phase loading ) { throw starlark errorf ( " ' % s ' can only be called during the loading phase " , function ) ; } }


public context get context ( ) { return context ; }


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


writes a raw field with the value taken from the bytes in the stream

public x content builder raw field ( string name , input stream value , x content type content type ) throws i o exception { generator write raw field ( name , value , content type ) ; return this ; }


public server build ( ) throws i o exception , hadoop illegal argument exception { if ( this conf = = null ) { throw new hadoop illegal argument exception ( " conf is not set " ) ; } if ( this protocol = = null ) { throw new hadoop illegal argument exception ( " protocol is not set " ) ; } if ( this instance = = null ) { throw new hadoop illegal argument exception ( " instance is not set " ) ; } return get protocol engine ( this protocol , this conf ) get server ( this protocol , this instance , this bind address , this port , this num handlers , this num readers , this queue size per handler , this verbose , this conf , this secret manager , this port range config , this alignment context ) ; }


optional choice of single - value field on which to diversify sampled search results

public graph explore request builder sample diversity field ( string field name ) { request sample diversity field ( field name ) ; return this ; }


applies network disruption for requests send from the node represented by the source transport service to the node represented by the target transport service

public abstract void apply disruption ( mock transport service source transport service , mock transport service target transport service ) ;


convenience method that creates a < code > http u r l connection < code > for the http f s server file system operations this methods performs and injects any needed authentication credentials via the { @ link # get connection ( url , string ) } method

private http u r l connection get connection ( final string method , map < string , string > params , path path , boolean make qualified ) throws i o exception { return get connection ( method , params , null , path , make qualified ) ; }


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


validates that the interval between snapshots is not smaller than the minimum interval ( see { @ link lifecycle settings # slm minimum interval setting } )

public static void validate minimum interval ( final snapshot lifecycle policy lifecycle , final cluster state state ) { time value minimum = lifecycle settings slm minimum interval setting get ( state metadata ( ) settings ( ) ) ; time value next = lifecycle calculate next interval ( ) ; if ( next duration ( ) > 0 & & minimum duration ( ) > 0 & & next millis ( ) < minimum millis ( ) ) { throw new illegal argument exception ( " invalid schedule [ " + lifecycle get schedule ( ) + " ] : " + " schedule would be too frequent , executing more than every [ " + minimum get string rep ( ) + " ] " ) ; } }


queries whether any threads are waiting for the given guard to become satisfied note that because timeouts and interrupts may occur at any time , a { @ code true } return does not guarantee that the guard becoming satisfied in the future will awaken any threads this method is designed primarily for use in monitoring of the system state

public boolean has waiters ( guard guard ) { return get wait queue length ( guard ) > 0 ; }


updates a pet in the store with form data

public void update pet with form ( long pet id , string name , string status ) throws api exception { update pet with form with http info ( pet id , name , status ) ; }


get the loop count of the animation the returned value is either { @ link animation information # loop count infinite } if the animation is repeated infinitely or a positive integer that corresponds to the number of loops if no animation backend is set , { @ link animation information # loop count infinite } will be returned

public int get loop count ( ) { return m animation backend = = null ? 0 : m animation backend get loop count ( ) ; }


if the field type passed in is byte , it will change it into blob as column type

public string object 2 relation ( string field type ) { if ( field type ! = null ) { if ( field type equals ( " [ b " ) ) { return " blob " ; } } return null ; }


creates handling mode for null key map data see { @ link # json map null key mode fail } , { @ link # json map null key mode drop } , and { @ link # json map null key mode literal } for more information

public static map null key mode get map null key mode ( readable config config ) { string map null key mode = config get ( map null key mode ) ; switch ( map null key mode to upper case ( ) ) { case json map null key mode fail : return map null key mode fail ; case json map null key mode drop : return map null key mode drop ; case json map null key mode literal : return map null key mode literal ; default : throw new table exception ( string format ( " unsupported map null key handling mode ' % s ' validator should have checked that " , map null key mode ) ) ; } }


see { @ link j check box # set text ( string ) } overridden to warn about html text in non - html enabled checkbox

public void set text ( string text ) { g component warn about html text ( text ) ; super set text ( text ) ; }


create a new advisor that will expose the given bean name , with no introduction

public static advisor create advisor without introduction ( string bean name ) { return new default pointcut advisor ( new expose bean name interceptor ( bean name ) ) ; }


protected connection pool id get connection pool id ( ) { return this connection pool id ; }


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

public com google protobuf byte string get prefix bytes ( ) { return com google protobuf byte string copy from utf 8 ( prefix ) ; }


loads finished missions from the data source

private array list < finished mission > load finished missions ( ) { array list < finished mission > finished missions = m finished mission store load finished missions ( ) ; / / check if the files exists , otherwise , forget the download for ( int i = finished missions size ( ) - 1 ; i > = 0 ; i - - ) { finished mission mission = finished missions get ( i ) ; if ( ! mission storage exists as file ( ) ) { if ( debug ) log d ( tag , " downloaded file removed : " + mission storage get name ( ) ) ; m finished mission store delete mission ( mission ) ; finished missions remove ( i ) ; } } return finished missions ; }


sets the < code > email < code > property

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


test serialization of outer string types

public completable future < string > fake outer string serialize ( string body ) throws api exception { try { http request builder local var request builder = fake outer string serialize request builder ( body ) ; return member var http client send async ( local var request builder build ( ) , http response body handlers of string ( ) ) then compose async ( local var response - > { if ( local var response status code ( ) / 100 ! = 2 ) { return completable future failed future ( get api exception ( " fake outer string serialize " , local var response ) ) ; } try { return completable future completed future ( member var object mapper read value ( local var response body ( ) , new type reference < string > ( ) { } ) ) ; } catch ( i o exception e ) { return completable future failed future ( new api exception ( e ) ) ; } } ) ; } catch ( api exception e ) { return completable future failed future ( e ) ; } }


whether to use suffix pattern match ( " " ) when matching patterns to requests if enabled a method mapped to " users " also matches to " users " by default this is set to { @ code true } note : this property is mutually exclusive with and ignored when { @ link # set pattern parser ( path pattern parser ) } is set

public path match configurer set use suffix pattern match ( boolean suffix pattern match ) { this suffix pattern match = suffix pattern match ; return this ; }


set the " global " cors configurations based on url patterns by default the first matching url pattern is combined with handler - level cors configuration if any

public void set cors configurations ( map < string , cors configuration > cors configurations ) { assert not null ( cors configurations , " cors configurations must not be null " ) ; if ( ! cors configurations is empty ( ) ) { url based cors configuration source source = new url based cors configuration source ( this pattern parser ) ; source set cors configurations ( cors configurations ) ; this cors configuration source = source ; } else { this cors configuration source = null ; } }


previous valuable entity or attribute manipulation keyword all functions , aggregate operators and other keywords are ignored

public string get prev key word ( ) { return prev key word ; }


wraps a provided directory reader , exposing a subset of fields note that for convenience , the returned reader can be used normally ( e g passed to { @ link directory reader # open if changed ( directory reader ) } ) and so on

public static directory reader wrap ( directory reader in , character run automaton filter ) throws i o exception { return new field subset directory reader ( in , filter ) ; }


public string fuzzy rewrite ( ) { return this fuzzy rewrite ; }


ensure that the buffer has room for < code > size < code > bytes

byte [ ] ensure buffer size ( final int size , final context context ) { if ( ( context buffer = = null ) | | ( context buffer length < context pos + size ) ) { return resize buffer ( context ) ; } return context buffer ; }


adds a route to the given handler function that handles all http { @ code get } requests that match the given pattern

builder get ( string pattern , handler function < server response > handler function ) ;


retrieves the data with the given keys at the given properties file

public config data get ( string path , set < string > keys ) { map < string , string > data = new hash map < > ( ) ; if ( path = = null | | path is empty ( ) ) { return new config data ( data ) ; } try ( reader reader = reader ( path ) ) { properties properties = new properties ( ) ; properties load ( reader ) ; for ( string key : keys ) { string value = properties get property ( key ) ; if ( value ! = null ) { data put ( key , value ) ; } } return new config data ( data ) ; } catch ( i o exception e ) { throw new config exception ( " could not read properties from file " + path ) ; } }


get the length of a string , { @ code null } input is considered { @ code 0 } length

public static int length ( string s ) { return s = = null ? 0 : s length ( ) ; }


create a temporary output stream for this view this is typically used as ie workaround , for setting the content length header from the temporary stream before actually writing the content to the http response

protected byte array output stream create temporary output stream ( ) { return new byte array output stream ( output byte array initial size ) ; }


it ' s important to invoke the { @ link # cas application context provider ( ) } method here forcefully and not rely on the { @ link # application context } certain tests in the cas context require access to the application context from the { @ link # cas application context provider ( ) }

public void after properties set ( ) { val app context = cas application context provider ( ) get configurable application context ( ) ; val conversion service = new default formatting conversion service ( true ) ; conversion service set embedded value resolver ( new cas embedded value resolver ( app context ) ) ; app context get environment ( ) set conversion service ( conversion service ) ; if ( app context get parent ( ) ! = null ) { var env = ( configurable environment ) app context get parent ( ) get environment ( ) ; env set conversion service ( conversion service ) ; } val registry = ( converter registry ) default conversion service get shared instance ( ) ; registry add converter ( zoned date time to string converter ( ) ) ; }


sets the radius of the hole in the shape ( applies to square , circle and triangle ) set this to < = 0 to remove holes

public void set scatter shape hole radius ( float hole radius ) { m scatter shape hole radius = hole radius ; }


removes the object with the given key from the cache

public synchronized void delete ( long key ) { process queue ( ) ; keyed soft reference ref = map get ( key ) ; if ( ref ! = null ) { t obj = ref get ( ) ; if ( obj ! = null ) { obj set deleted ( ) ; ref clear ( ) ; } map remove ( key ) ; } }


gets the zoomable controller zoomable controller can be used to zoom to point , or to map point from view to image coordinates for instance

public zoomable controller get zoomable controller ( ) { return m zoomable controller ; }


ensure that the correct hint is passed to the block receiver when the client is local

public void test with local client ( ) throws i o exception { argument captor < boolean > captor = argument captor for class ( boolean class ) ; data xceiver xceiver = make stub data xceiver ( peer locality local , non local lazy persist not allowed , captor ) ; for ( boolean lazy persist setting : arrays as list ( true , false ) ) { issue write block call ( xceiver , lazy persist setting ) ; assert that ( captor get value ( ) , is ( lazy persist setting ) ) ; } }


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


sets the component displayed in the top of this panel

public void set top component ( j component comp ) { if ( top comp = = comp ) { return ; } if ( top comp ! = null ) { remove ( top comp ) ; } top comp = comp ; if ( top comp ! = null ) { add ( top comp , border layout north ) ; } validate ( ) ; }


returns an instance of < code > argb evaluator < code > that may be used in { @ link android animation value animator # set evaluator ( type evaluator ) } the same instance may be used in multiple < code > animator < code > s because it holds no state

public static argb evaluator get instance ( ) { return s instance ; }


the default cleanup subclasses can override this with a custom cleanup

public void cleanup ( ) throws i o exception { super close ( ) ; if ( super should preserve input ( ) ) return ; parent container cleanup ( ) ; }


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


public void merge ( int set other ) { if ( other instanceof bit int set ) { bit int set o = ( bit int set ) other ; ensure capacity ( bits get max ( o bits ) + 1 ) ; bits or ( bits , o bits ) ; } else if ( other instanceof list int set ) { list int set o = ( list int set ) other ; int sz = o ints size ( ) ; if ( sz > 0 ) { ensure capacity ( o ints get ( sz - 1 ) ) ; } for ( int i = 0 ; i < o ints size ( ) ; i + + ) { bits set ( bits , o ints get ( i ) , true ) ; } } else { int iterator iter = other iterator ( ) ; while ( iter has next ( ) ) { add ( iter next ( ) ) ; } } }


return the location of the imported resource

public final string get imported resource ( ) { return this imported resource ; }


public collection < type handler < ? > > get type handlers ( ) { return collections unmodifiable collection ( all type handlers map values ( ) ) ; }


test verifies uncaught exception handling of zoo keeper thread

public void test uncaught exception ( ) throws exception { my thread t 1 = new my thread ( " test - thread " ) ; t 1 start ( ) ; assert true ( running latch await ( 10000 , time unit milliseconds ) , " uncaught exception is not properly handled " ) ; running latch = new count down latch ( 1 ) ; my critical thread t 2 = new my critical thread ( " test - critical - thread " ) ; t 2 start ( ) ; assert true ( running latch await ( 10000 , time unit milliseconds ) , " uncaught exception is not properly handled " ) ; }


returns a topological sort of the directed graph return the vertices in the explored portion of the graph with the following property : { @ literal if the graph is acyclic then v [ i ] - > v [ j ] = > i < j } if the graph contains cycles , then the above is true except when ( v [ i ] , v [ j ] ) is a back edge

public vertex [ ] topological sort ( ) { return finish list in reverse order to array ( new vertex [ finish list in reverse order size ( ) ] ) ; }


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


public static void show soft input ( @ non null activity activity ) { if ( ! is soft input visible ( activity ) ) { toggle soft input ( ) ; } }


returns the address for the given section and offset

address get address ( int segment , long offset ) { return pdb address manager get raw address ( segment , offset ) ; }


sort the entries in both the normal and root manifests and write the output file

private void write file ( output stream out , map < path fragment , artifact > output ) throws i o exception { writer manifest file = new buffered writer ( new output stream writer ( out , iso 8859 1 ) ) ; list < map entry < path fragment , artifact > > sorted manifest = new array list < > ( output entry set ( ) ) ; collections sort ( sorted manifest , entry comparator ) ; for ( map entry < path fragment , artifact > line : sorted manifest ) { manifest writer write entry ( manifest file , line get key ( ) , line get value ( ) ) ; } manifest file flush ( ) ; }


set the window maintain duration ( retention time ) in milliseconds this retention time is a guaranteed lower bound for how long a window will be maintained

public session windows until ( final long duration ms ) throws illegal argument exception { if ( duration ms < gap ms ) { throw new illegal argument exception ( " window retention time ( duration ms ) cannot be smaller than window gap " ) ; } return new session windows ( gap ms , duration ms , grace ms ) ; }


public string get property class ( ) { return property class ; }


returns the index of this channel within its { @ link single input gate }

public int get channel index ( ) { return channel info get input channel idx ( ) ; }


create a specific cache loader according to the configuration if persistent memory volume is not configured , return a cache loader for dram cache otherwise , return a cache loader for pmem cache

public static mappable block loader create cache loader ( d n conf conf ) { if ( conf get pmem volumes ( ) = = null | | conf get pmem volumes ( ) length = = 0 ) { return new memory mappable block loader ( ) ; } if ( native i o is available ( ) & & native i o posix is pmdk available ( ) ) { return new native pmem mappable block loader ( ) ; } return new pmem mappable block loader ( ) ; }


get the count of " 012 " triads which have one unidirectional edge among the vertices

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


gets a string that provides information about the function information for this object ' s program and address

public string to string ( ) { string buffer buffer = new string buffer ( ) ; buffer append ( " e h function info " + new line ) ; buffer append ( indent + " program : " + get program ( ) get domain file ( ) get pathname ( ) + new line ) ; buffer append ( indent + " address : " + get address ( ) to string ( true ) + new line ) ; buffer append ( indent + " fits in single memory block : " + fits in single memory block ( ) + new line ) ; buffer append ( indent + " is relative : " + is relative ( ) + new line ) ; buffer append ( indent + " default pointer size : " + get default pointer size ( ) + new line ) ; buffer append ( indent + " magic num : " + " 0x " + long to hex string ( magic num ) + new line ) ; buffer append ( indent + " bbt flags : " + " 0x " + long to hex string ( bbt flags ) + new line ) ; data type dt = get data type ( ) ; if ( dt ! = null ) { buffer append ( new line + dt to string ( ) + new line ) ; if ( dt instanceof type def ) { data type base data type = ( ( type def ) dt ) get base data type ( ) ; buffer append ( new line + base data type to string ( ) + new line ) ; } } return buffer to string ( ) ; }


finds pets by tags multiple tags can be provided with comma separated strings use tag 1 , tag 2 , tag 3 for testing

observable < set < pet > > find pets by tags ( @ retrofit 2 http query ( " tags " ) c s v params tags ) ;


tests that we can correctly recognize multiple conflicts with the tag merge resolver in this case we do the following : 1 add tags a & b to both programs 2 rename a and b in latest 3 rename a and b in my 4 verify we have 2 conflicts

public void test multiple tag conflicts ( ) throws exception { mtf initialize ( notepad , new original program modifier listener ( ) { @ override public void modify latest ( program d b program ) throws exception { int transaction i d = program start transaction ( " latest " ) ; try { edit tag name ( program , tag name a , tag name a latest ) ; edit tag name ( program , tag name b , tag name b latest ) ; } finally { program end transaction ( transaction i d , true ) ; } } @ override public void modify private ( program d b program ) throws exception { int transaction i d = program start transaction ( " my " ) ; try { edit tag name ( program , tag name a , tag name a my ) ; edit tag name ( program , tag name b , tag name b my ) ; } finally { program end transaction ( transaction i d , true ) ; } } @ override public void modify original ( program d b program ) throws exception { int transaction i d = program start transaction ( " original " ) ; try { function tag manager tag manager = get tag manager ( program ) ; tag manager create function tag ( tag name a , " " ) ; tag manager create function tag ( tag name b , " " ) ; } finally { program end transaction ( transaction i d , true ) ; } } } ) ; execute merge ( ask user ) ; int conflicts = get tag conflict count ( ) ; assert true ( conflicts = = 2 ) ; choose function tag button ( latest button , false ) ; choose function tag button ( my button , false ) ; wait for merge completion ( ) ; assert true ( is tag in program ( tag name a latest , mtf get result program ( ) ) ) ; assert true ( is tag in program ( tag name b my , mtf get result program ( ) ) ) ; }


this is here to check up on the s 3 a test utils probes themselves

public void test authentication contains probes ( ) { configuration conf = new configuration ( false ) ; assert false ( " found assumed role credential provider " , authentication contains ( conf , assumed role credential provider name ) ) ; conf set ( aws credentials provider , assumed role credential provider name ) ; assert true ( " didn ' t find assumed role credential provider " , authentication contains ( conf , assumed role credential provider name ) ) ; }


this method returns a { @ code immutable sorted map } , consisting of the entries whose keys ranges from { @ code from key } to { @ code to key } , inclusive or exclusive as indicated by the boolean flags the { @ link sorted map # sub map } documentation states that a submap of a submap throws an { @ link illegal argument exception } if passed a { @ code from key } less than an earlier { @ code from key } however , this method doesn ' t throw an exception in that situation , but instead keeps the original { @ code from key } similarly , this method keeps the original { @ code to key } , instead of throwing an exception , if passed a { @ code to key } greater than an earlier { @ code to key }

public immutable sorted map < k , v > sub map ( k from key , boolean from inclusive , k to key , boolean to inclusive ) { check not null ( from key ) ; check not null ( to key ) ; check argument ( comparator ( ) compare ( from key , to key ) < = 0 , " expected from key < = to key but % s > % s " , from key , to key ) ; return head map ( to key , to inclusive ) tail map ( from key , from inclusive ) ; }


construct a temporary ' impl ' { @ link function definition } data type using the information found in the specified { @ link d i e aggregate }

public function definition get function signature ( d i e aggregate diea ) { diea = get func d i e a ( diea ) ; if ( diea ! = null ) { d w a r f name info dni = prog get name ( diea ) ; return create function definition data type ( diea , dni ) ; } return null ; }


scan the surplus marker list and remove from it all where the directory policy says " keep " this is useful when auditing

public list < path > remove allowed markers ( directory policy policy ) { list < path > removed = new array list < > ( ) ; iterator < map entry < path , marker > > entries = surplus markers entry set ( ) iterator ( ) ; while ( entries has next ( ) ) { map entry < path , marker > entry = entries next ( ) ; path path = entry get key ( ) ; if ( policy keep directory markers ( path ) ) { / / there ' s a match / / remove it from the map entries remove ( ) ; log debug ( " removing { } " , entry get value ( ) ) ; removed add ( path ) ; } } return removed ; }


this makes sure that when dn closes clients socket after client had successfully connected earlier , the data can still be fetched

public void test write timeout at data node ( ) throws i o exception , interrupted exception { final int write timeout = 100 ; / / milliseconds / / set a very short write timeout for datanode , so that tests runs fast conf set int ( hdfs client config keys dfs datanode socket write timeout key , write timeout ) ; / / set a smaller block size final int block size = 10 * 1024 * 1024 ; conf set int ( d f s config keys dfs block size key , block size ) ; conf set int ( hdfs client config keys dfs client max block acquire failures key , 1 ) ; / / set a small buffer size final int buffer size = 4096 ; conf set int ( common configuration keys io file buffer size key , buffer size ) ; mini d f s cluster cluster = new mini d f s cluster builder ( conf ) num data nodes ( 3 ) build ( ) ; try { cluster wait active ( ) ; file system fs = cluster get file system ( ) ; path file path = new path ( " / test write timeout at data node " ) ; output stream out = fs create ( file path , true , buffer size ) ; / / write a 2 block file write data ( out , 2 * block size ) ; out close ( ) ; byte [ ] buf = new byte [ 1024 * 1024 ] ; / / enough to empty tcp buffers input stream in = fs open ( file path , buffer size ) ; / / first read a few bytes i o utils read fully ( in , buf , 0 , buffer size / 2 ) ; / / now read few more chunks of data by sleeping in between : for ( int i = 0 ; i < 10 ; i + + ) { thread sleep ( 2 * write timeout ) ; / / force write timeout at the datanode / / read enough to empty out socket buffers i o utils read fully ( in , buf , 0 , buf length ) ; } / / successfully read with write timeout on datanodes in close ( ) ; } finally { cluster shutdown ( ) ; } } / / more tests related to different failure cases can be added here


tests d f s client close throws no concurrent modification exception if multiple files are open also tests that any cached sockets are closed ( hdfs - 3359 ) also tests deprecated list open files ( enum set < > ) ( hdfs - 14595 )

public void test d f s close ( ) throws exception { configuration conf = get test configuration ( ) ; mini d f s cluster cluster = null ; try { cluster = new mini d f s cluster builder ( conf ) num data nodes ( 2 ) build ( ) ; distributed file system file sys = cluster get file system ( ) ; / / create two files , leaving them open file sys create ( new path ( " / test / dfsclose / file - 0 " ) ) ; file sys create ( new path ( " / test / dfsclose / file - 1 " ) ) ; / / test list open files ( enum set < > ) list < open files iterator open files type > types = new array list < > ( ) ; types add ( open files iterator open files type all open files ) ; remote iterator < open file entry > list open files = file sys list open files ( enum set copy of ( types ) ) ; assert true ( " two files should be open " , list open files has next ( ) ) ; int count open files = 0 ; while ( list open files has next ( ) ) { list open files next ( ) ; + + count open files ; } assert equals ( " mismatch of open files count " , 2 , count open files ) ; / / create another file , close it , and read it , so / / the client gets a socket in its socket cache path p = new path ( " / non - empty - file " ) ; d f s test util create file ( file sys , p , 1l , ( short ) 1 , 0l ) ; d f s test util read file ( file sys , p ) ; file sys close ( ) ; d f s client dfs client = file sys get client ( ) ; verify ops using closed client ( dfs client ) ; } finally { if ( cluster ! = null ) { cluster shutdown ( ) ; } } }


to test the collection format in query parameters

public void test query parameter collection format ( list < string > pipe , list < string > ioutil , list < string > http , list < string > url , list < string > context ) throws api exception { test query parameter collection format with http info ( pipe , ioutil , http , url , context ) ; }


returns a { @ link hasher } instance of the appropriate algorithm and associated cost as indicated by the { @ code name } name identifiers for the default costs for bcrypt and pbkdf2 return the he default bcrypt and pbkdf2 hasher instead of the specific instances for the associated cost

public static hasher resolve ( string name ) { switch ( name to lower case ( locale root ) ) { case " bcrypt " : return bcrypt ; case " bcrypt 4 " : return bcrypt4 ; case " bcrypt 5 " : return bcrypt5 ; case " bcrypt 6 " : return bcrypt6 ; case " bcrypt 7 " : return bcrypt7 ; case " bcrypt 8 " : return bcrypt8 ; case " bcrypt 9 " : return bcrypt9 ; case " bcrypt 1 0 " : return bcrypt ; case " bcrypt 1 1 " : return bcrypt11 ; case " bcrypt 1 2 " : return bcrypt12 ; case " bcrypt 1 3 " : return bcrypt13 ; case " bcrypt 1 4 " : return bcrypt14 ; case " pbkdf 2 " : return pbkdf2 ; case " pbkdf 2 1000 " : return pbkdf2 1000 ; case " pbkdf 2 10000 " : return pbkdf2 ; case " pbkdf 2 50000 " : return pbkdf2 50000 ; case " pbkdf 2 100000 " : return pbkdf2 100000 ; case " pbkdf 2 500000 " : return pbkdf2 500000 ; case " pbkdf 2 1000000 " : return pbkdf2 1000000 ; case " pbkdf 2 stretch " : return pbkdf2 stretch ; case " pbkdf 2 stretch 1000 " : return pbkdf2 stretch 1000 ; case " pbkdf 2 stretch 10000 " : return pbkdf2 stretch 10000 ; case " pbkdf 2 stretch 50000 " : return pbkdf2 stretch 50000 ; case " pbkdf 2 stretch 100000 " : return pbkdf2 stretch 100000 ; case " pbkdf 2 stretch 500000 " : return pbkdf2 stretch 500000 ; case " pbkdf 2 stretch 1000000 " : return pbkdf2 stretch 1000000 ; case " sha 1 " : return sha1 ; case " md 5 " : return md5 ; case " ssha 2 5 6 " : return ssha256 ; case " noop " : case " clear text " : return noop ; default : throw new illegal argument exception ( " unknown hash function [ " + name + " ] " ) ; } }


locates a vertex for the given info < b > without creating that vertex < b > this is in contrast to { @ link # get vertex ( f g controller , map ) } , which will create a vertex ( and supporting vertices if it is a group )

f g vertex locate vertex ( f g controller controller , map < address hasher , f g vertex > vertex map ) { return super get vertex ( controller , vertex map ) ; }


sets the doc source of the update request to be used when the document does not exists

public update request builder set upsert ( byte [ ] source , int offset , int length , x content type x content type ) { request upsert ( source , offset , length , x content type ) ; return this ; }


if { @ link epoll # is available ( ) } < code > = = true < code > , returns a new { @ link epoll event loop group } , otherwise returns a new { @ link nio event loop group } creates the event loop group using the specified number of threads instead of the default

public static event loop group new nio or epoll event loop group ( int n threads ) { if ( epoll is available ( ) ) { return new epoll event loop group ( n threads ) ; } else { return new nio event loop group ( n threads ) ; } }


copy the properties of the supplied { @ link annotation } to the supplied target bean any properties defined in { @ code excluded properties } will not be copied a specified value resolver may resolve placeholders in property values , for example

public static void copy properties to bean ( annotation ann , object bean , @ nullable string value resolver value resolver , string excluded properties ) { set < string > excluded = ( excluded properties length = = 0 ? collections empty set ( ) : new hash set < > ( arrays as list ( excluded properties ) ) ) ; method [ ] annotation properties = ann annotation type ( ) get declared methods ( ) ; bean wrapper bw = property accessor factory for bean property access ( bean ) ; for ( method annotation property : annotation properties ) { string property name = annotation property get name ( ) ; if ( ! excluded contains ( property name ) & & bw is writable property ( property name ) ) { object value = reflection utils invoke method ( annotation property , ann ) ; if ( value resolver ! = null & & value instanceof string ) { value = value resolver resolve string value ( ( string ) value ) ; } bw set property value ( property name , value ) ; } } }


assuming the given cache has maximum size { @ code max size } , this method populates the cache ( by getting a bunch of different keys ) , then makes sure all the items in the cache are also in the eviction queue it will invoke the given { @ code operation } on the first element in the eviction queue , and then reverify that all items in the cache are in the eviction queue , and verify that the head of the eviction queue has changed as a result of the operation

static void check recency ( loading cache < integer , integer > cache , int max size , receiver < reference entry < integer , integer > > operation ) { check not null ( operation ) ; if ( has local cache ( cache ) ) { warm up ( cache , 0 , 2 * max size ) ; local cache < integer , integer > cchm = to local cache ( cache ) ; segment < ? , ? > segment = cchm segments [ 0 ] ; drain recency queue ( segment ) ; assert equals ( max size , access queue size ( cache ) ) ; assert equals ( max size , cache size ( ) ) ; reference entry < ? , ? > original head = segment access queue peek ( ) ; @ suppress warnings ( " unchecked " ) reference entry < integer , integer > entry = ( reference entry < integer , integer > ) original head ; operation accept ( entry ) ; drain recency queue ( segment ) ; assert not same ( original head , segment access queue peek ( ) ) ; assert equals ( cache size ( ) , access queue size ( cache ) ) ; } }


checks if there is a database with given name in a given catalog or is there a temporary object registered within a given catalog and database < b > note : < b > it is primarily used for interacting with calcite ' s schema

public boolean schema exists ( string catalog name , string database name ) { return temporary database exists ( catalog name , database name ) | | permanent database exists ( catalog name , database name ) ; }


returns the string path representation of the values directory and qualifiers certain resource types live in the " values " directory this will calculate the directory and ensure the qualifiers are represented

public string values path ( ) { return paths get ( dash joiner join ( immutable list < string > builder ( ) add ( " values " ) add all ( qualifiers ) build ( ) ) , " values xml " ) to string ( ) ; }


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


flag to the producer that we are ready to receive more events

void request record ( ) { if ( ! cancelled ) { log debug ( " requesting more records from efo subscription - { } ( { } ) " , shard id , consumer arn ) ; subscription request ( 1 ) ; } }


process elf symbol if it has a versioned name attempt to establish as comment on associated external symbol

private boolean process versioned external ( elf symbol elf symbol ) { string sym name = elf symbol get name as string ( ) ; int index = sym name index of ( " @ " ) ; if ( index < 0 ) { return false ; } / / todo : versioned symbols may also exist on real addresses / / corresponding to external linkages in the got , plt and / / other memory locations which may relate to external functions / / unsure if this approach is appropriate since we are not / / handling these versioned symbols in a consistent fashion , / / however their existence can interfere with demangling for / / externals and related thunks if ( last external block entry address = = null ) { return false ; } int alt index = sym name index of ( " @ @ " ) ; if ( alt index > 0 ) { index = alt index ; } string real name = sym name substring ( 0 , index ) ; / / find real symbol ( assumes real symbol is always processed first ) symbol s = find external block symbol ( real name , external block limits get min address ( ) , last external block entry address ) ; if ( s = = null ) { return false ; } / / add versioned symbol as comment only address address = s get address ( ) ; string comment = listing get comment ( code unit pre comment , address ) ; if ( comment = = null | | comment length ( ) = = 0 ) { comment = sym name ; } else { comment + = " \ n " + sym name ; } listing set comment ( address , code unit pre comment , comment ) ; set elf symbol address ( elf symbol , address ) ; return true ; }


tests that a " - - force pic " configuration applies " - pie " to executable links

public void test pic mode ( ) throws exception { string pie arg = " - pie " ; / / disabled : assert that ( basic argv ( link target type executable ) ) does not contain ( pie arg ) ; assert that ( basic argv ( link target type nodeps dynamic library ) ) does not contain ( pie arg ) ; assert that ( basic argv ( link target type static library ) ) does not contain ( pie arg ) ; assert that ( basic argv ( link target type pic static library ) ) does not contain ( pie arg ) ; assert that ( basic argv ( link target type always link static library ) ) does not contain ( pie arg ) ; assert that ( basic argv ( link target type always link pic static library ) ) does not contain ( pie arg ) ; cc toolchain variables builder pic variables = get mock build variables ( ) add string variable ( link build variables force pic get variable name ( ) , " " ) ; / / enabled : use configuration ( " - - force pic " ) ; assert that ( basic argv ( link target type executable , pic variables ) ) contains ( pie arg ) ; assert that ( basic argv ( link target type nodeps dynamic library , pic variables ) ) does not contain ( pie arg ) ; assert that ( basic argv ( link target type static library , pic variables ) ) does not contain ( pie arg ) ; assert that ( basic argv ( link target type pic static library , pic variables ) ) does not contain ( pie arg ) ; assert that ( basic argv ( link target type always link static library , pic variables ) ) does not contain ( pie arg ) ; assert that ( basic argv ( link target type always link pic static library , pic variables ) ) does not contain ( pie arg ) ; }


translates a starlark objc provider value to a java objc provider value

nested set < ? > value for java ( key < ? > java key , object starlark value ) throws eval exception ;


opens the given input split this method opens the input stream to the specified file , allocates read buffers and positions the stream at the correct position , making sure that any partial record at the beginning is skipped

public void open ( file input split split ) throws i o exception { super open ( split ) ; init buffers ( ) ; this offset = split start ; if ( this split start ! = 0 ) { this stream seek ( offset ) ; read line ( ) ; / / if the first partial record already pushes the stream over / / the limit of our split , then no record starts within this split if ( this over limit ) { this end = true ; } } else { fill buffer ( 0 ) ; } initialize split ( split , null ) ; }


creates a new , empty { @ code linked hash multimap } with the default initial capacities

public static < k , v > linked hash multimap < k , v > create ( ) { return new linked hash multimap < > ( default key capacity , default value set capacity ) ; }


show the component that is used to resolve conflicts this method is called by the merge resolvers when user input is required if the component is not null , this method blocks until the user either cancels the merge process or resolves a conflict if comp is null , then the default component is displayed , and the method does not wait for user input

public void show component ( final j component comp , final string component i d , help location help loc ) { help service help = help get help service ( ) ; if ( help loc ! = null & & comp ! = null ) { help register help ( comp , help loc ) ; } swing utilities invoke later ( ( ) - > { show merge tool ( ) ; dimension old size = merge tool get size ( ) ; if ( comp = = null ) { merge plugin show default component ( ) ; } else { merge plugin set merge component ( comp , component i d ) ; } dimension new size = merge tool get size ( ) ; if ( ! new size equals ( old size ) ) { point center loc = window utilities center on screen ( merge tool get size ( ) ) ; merge tool set location ( center loc x , center loc y ) ; } } ) ; if ( comp ! = null ) { input received = false ; / / block until the user takes action wait for input ( ) ; } }


creates a mutable { @ code array list } instance containing the given elements < b > note : < b > essentially the only reason to use this method is when you will need to add or remove elements later otherwise , for non - null elements use { @ link immutable list # of ( ) } ( for varargs ) or { @ link immutable list # copy of ( object [ ] ) } ( for an array ) instead if any elements might be null , or you need support for { @ link list # set ( int , object ) } , use { @ link arrays # as list } note that even when you do need the ability to add or remove , this method provides only a tiny bit of syntactic sugar for { @ code new array list ( } { @ link arrays # as list as list } { @ code ( ) ) } , or for creating an empty list then calling { @ link collections # add all } this method is not actually very useful and will likely be deprecated in the future

public static < e > array list < e > new array list ( e elements ) { check not null ( elements ) ; / / for gwt / / avoid integer overflow when a large array is passed in int capacity = compute array list capacity ( elements length ) ; array list < e > list = new array list < > ( capacity ) ; collections add all ( list , elements ) ; return list ; }


content type depending on the request might be used by some formatters ( like csv ) to specify certain metadata like whether the header is returned or not

string content type ( rest request request ) { return content type ( ) ; }


returns a new { @ link default channel pipeline } instance

protected default channel pipeline new channel pipeline ( ) { return new default channel pipeline ( this ) ; }


sets the value that this dialog will display in it ' s editor when initially shown

public void set initial data type ( data type data type ) { editor set cell editor value ( data type ) ; }


parse the sql statement and locate any placeholders or named parameters named parameters are substituted for a r2dbc placeholder , and any select list is expanded to the required number of placeholders select lists may contain an array of objects , and in that case the placeholders will be grouped and enclosed with parentheses this allows for the use of " expression lists " in the sql statement like : { @ code select id , name , state from table where ( name , age ) in ( ( ' john ' , 35 ) , ( ' ann ' , 50 ) ) } the parameter values passed in are used to determine the number of placeholders to be used for a select list select lists should be limited to 100 or fewer elements a larger number of elements is not guaranteed to be supported by the database and is strictly vendor - dependent

public static prepared operation < string > substitute named parameters ( parsed sql parsed sql , bind markers factory bind markers factory , bind parameter source param source ) { named parameters marker holder = new named parameters ( bind markers factory ) ; string original sql = parsed sql get original sql ( ) ; list < string > param names = parsed sql get parameter names ( ) ; if ( param names is empty ( ) ) { return new expanded query ( original sql , marker holder , param source ) ; } string builder actual sql = new string builder ( original sql length ( ) ) ; int last index = 0 ; for ( int i = 0 ; i < param names size ( ) ; i + + ) { string param name = param names get ( i ) ; int [ ] indexes = parsed sql get parameter indexes ( i ) ; int start index = indexes [ 0 ] ; int end index = indexes [ 1 ] ; actual sql append ( original sql , last index , start index ) ; named parameters named parameter marker = marker holder get or create ( param name ) ; if ( param source has value ( param name ) ) { object value = param source get value ( param name ) ; if ( value instanceof collection ) { iterator < ? > entry iter = ( ( collection < ? > ) value ) iterator ( ) ; int k = 0 ; int counter = 0 ; while ( entry iter has next ( ) ) { if ( k > 0 ) { actual sql append ( " , " ) ; } k + + ; object entry item = entry iter next ( ) ; if ( entry item instanceof object [ ] ) { object [ ] expression list = ( object [ ] ) entry item ; actual sql append ( ' ( ' ) ; for ( int m = 0 ; m < expression list length ; m + + ) { if ( m > 0 ) { actual sql append ( " , " ) ; } actual sql append ( marker get placeholder ( counter ) ) ; counter + + ; } actual sql append ( ' ) ' ) ; } else { actual sql append ( marker get placeholder ( counter ) ) ; counter + + ; } } } else { actual sql append ( marker get placeholder ( ) ) ; } } else { actual sql append ( marker get placeholder ( ) ) ; } last index = end index ; } actual sql append ( original sql , last index , original sql length ( ) ) ; return new expanded query ( actual sql to string ( ) , marker holder , param source ) ; }


adds a route to the given handler function that handles all http { @ code delete } requests that match the given pattern

builder delete ( string pattern , handler function < server response > handler function ) ;


tests whether multiple call of has next ( ) changes the state of the iterator

public void test has next ( ) { try { / / create the resettable iterator spilling resettable iterator < int value > iterator = new spilling resettable iterator < int value > ( this reader , this serializer , this memman , this ioman , 2 , this mem owner ) ; / / open the iterator iterator open ( ) ; int cnt = 0 ; while ( iterator has next ( ) ) { iterator has next ( ) ; iterator next ( ) ; cnt + + ; } assert assert true ( cnt + " elements read from iterator , but " + num testrecords + " expected " , cnt = = num testrecords ) ; iterator close ( ) ; } catch ( exception ex ) { ex print stack trace ( ) ; assert fail ( " test encountered an exception " ) ; } }


returns a { @ link channel matcher } that matches all { @ link channel } s

public static channel matcher all ( ) { return all matcher ; }


prints usage information to standard output

private static void usage ( ) { system out println ( " generates a distance field image from a black and white input image \ n " + " the distance field image contains a solid color and stores the distance \ n " + " in the alpha channel \ n " + " \ n " + " the output file format is inferred from the file name \ n " + " \ n " + " command line arguments : infile outfile [ option ] \ n " + " \ n " + " possible options : \ n " + " - - color rrggbb color of output image ( default : ffffff ) \ n " + " - - downscale n downscale by factor of n ( default : 1 ) \ n " + " - - spread n edge scan distance ( default : 1 ) \ n " ) ; }


registers a response received from the backend for a request allowed by should throttle this should be called for every response received from the backend ( i e , once for each request for which should throttle returned false ) this updates the internal statistics used by should throttle

void register backend response ( boolean throttled ) ;


the reason for resetting the stream represented as an http2 error code


public byte get op code ( ) { return op code ; }


detect the default configuration classes for the supplied test class the default implementation simply delegates to { @ link annotation config context loader utils # detect default configuration classes ( class ) }

protected class < ? > [ ] detect default configuration classes ( class < ? > declaring class ) { return annotation config context loader utils detect default configuration classes ( declaring class ) ; } / / abstract context loader


public static dummy exo media drm get instance ( ) { return new dummy exo media drm ( ) ; }


public cancellable delete async ( delete async search request request , request options options , action listener < acknowledged response > listener ) { return rest high level client perform request async and parse entity ( request , async search request converters : : delete async search , options , acknowledged response : : from x content , listener , empty set ( ) ) ; }


public static void main ( final string args ) throws file not found exception { prepare ( ) ; execute ( ) ; unprepare ( ) ; }


starts the thread for the update method pattern if it was not started previously also when the thread is is ready initializes the indexes of the queue

public void init ( ) { if ( update thread = = null ) { update thread = new thread ( ( ) - > { while ( ! thread current thread ( ) is interrupted ( ) ) { update ( ) ; } } ) ; } start thread ( ) ; }


perform pre - save of source file to pre save file the pre save file is changed to null if an error occurs

public void run ( ) { data buffer buf = new data buffer ( get buffer size ( ) ) ; boolean success = false ; try { / / initial delay thread sleep ( 100 ) ; / / copy non - empty buffers only / / remaining content established by bufferm mgr save as ( ) int cnt = src file get index count ( ) ; max index = cnt - 1 ; for ( cur index = 0 ; cur index < cnt ; cur index + + ) { while ( true ) { synchronized ( pre save lock ) { / / check for canceled task check pre save monitor ( ) ; if ( task thread is interrupted ( ) ) { return ; } / / continue to back - off while primary buffer file instance is in use if ( ! pre save backoff ) { break ; } pre save backoff = false ; } / / back - off a little thread sleep ( 50 ) ; } src file get ( buf , cur index ) ; pre save file put ( buf , cur index ) ; } success = true ; } catch ( interrupted exception e ) { check pre save monitor ( ) ; } catch ( throwable t ) { msg error ( this , t ) ; } finally { if ( ! success ) { pre save file set temporary ( true ) ; try { pre save file close ( ) ; } catch ( i o exception e ) { msg error ( this , e ) ; } finally { pre save file = null ; pre save failed = true ; } } try { src file close ( ) ; } catch ( i o exception e ) { msg error ( this , e ) ; } } }


metric reporter create metric reporter ( final properties properties ) ;


resolve a map of all public services methods from the specified service type and its interface class , whose key is the declared method , and the value is the overrider method

protected map < method , method > resolve service methods map ( class < ? > service type , class < ? > service interface class ) { map < method , method > service methods map = new linked hash map < > ( ) ; / / exclude the public methods declared in java lang object class list < method > declared service methods = new array list < > ( get all methods ( service interface class , excluded declared class ( object class ) ) ) ; list < method > service methods = new array list < > ( get all methods ( service type , excluded declared class ( object class ) ) ) ; / / sort methods sort ( declared service methods , method comparator instance ) ; sort ( service methods , method comparator instance ) ; for ( method declared service method : declared service methods ) { for ( method service method : service methods ) { if ( overrides ( service method , declared service method ) ) { service methods map put ( service method , declared service method ) ; continue ; } } } / / make them to be read - only return unmodifiable map ( service methods map ) ; }


this function is not thread - safe , need to synchronized when iterate through this set

public iterator < integer > iterator ( ) { / / sample current size at the beginning int current size = size ( ) ; if ( cache size ( ) = = current size ) { return cache iterator ( ) ; } return new iterator < integer > ( ) { int returned count = 0 ; int bit index = 0 ; @ override public boolean has next ( ) { return returned count < current size ; } @ override public integer next ( ) { int bit = element bits next set bit ( bit index ) ; bit index = bit + 1 ; returned count + + ; return bit ; } @ override public void remove ( ) { throw new unsupported operation exception ( ) ; } } ; }


query string parameters the returned map is an unmodifiable view of the map in the request so calls to { @ link # add parameter ( string , string ) } will change it

public map < string , string > get parameters ( ) { return unmodifiable map ( parameters ) ; }


determine if all objects for the current requestresponse should be ignored or not messages will stop being ignored the next time { @ link # is content message ( object ) } returns { @ code true }

protected abstract boolean ignore content after continue response ( object msg ) throws exception ;


restarts the cluster with a c ls enabled or disabled

private static void restart ( boolean acls enabled ) throws exception { shutdown ( ) ; init cluster ( false , acls enabled ) ; }


map of string keys and values that can be used by source and sink to communicate arbitrary metadata about this resource < code > map & lt ; string , string & gt ; annotations = 5 ; < code >

public builder put annotations ( java lang string key , java lang string value ) { if ( key = = null ) { throw new java lang null pointer exception ( ) ; } if ( value = = null ) { throw new java lang null pointer exception ( ) ; } internal get mutable annotations ( ) get mutable map ( ) put ( key , value ) ; return this ; }


override to split ( shard ) a batch of requests into multiple batches that will each call < code > create command < code > separately the purpose of this is to allow collapsing to work for services that have sharded backends and batch executions that need to be shard - aware for example , a batch of 100 requests could be split into 4 different batches sharded on name ( ie a - g , h - n , o - t , u - z ) that each result in a separate { @ link hystrix command } being created and executed for them by default this method does nothing to the collection and is a pass - thru

protected collection < collection < collapsed request < response type , request argument type > > > shard requests ( collection < collapsed request < response type , request argument type > > requests ) { return collections singleton list ( requests ) ; }


sets the note associated with this pattern

public void set note ( string note ) { this note = note trim ( ) ; }


public void set branch id ( long branch id ) { this branch id = branch id ; }


schedules a task to occur once after the specified delay and then a number of additional times at the specified interval

public task schedule task ( task task , float delay seconds , float interval seconds , int repeat count ) { if ( task repeat count ! = cancelled ) throw new illegal argument exception ( " the same task may not be scheduled twice " ) ; task execute time millis = time utils nano time ( ) / 1000000 + ( long ) ( delay seconds * 1000 ) ; task interval millis = ( long ) ( interval seconds * 1000 ) ; task repeat count = repeat count ; synchronized ( tasks ) { tasks add ( task ) ; } wake ( ) ; return task ; }


called once a message hit the end of the { @ link channel pipeline } without been handled by the user in { @ link channel inbound handler # channel read ( channel handler context , object ) } this method is responsible to call { @ link reference count util # release ( object ) } on the given msg at some point

protected void on unhandled inbound message ( object msg ) { try { logger debug ( " discarded inbound message { } that reached at the tail of the pipeline " + " please check your pipeline configuration " , msg ) ; } finally { reference count util release ( msg ) ; } }


change the size of this array content between indexes < code > 0 < code > and < code > min ( size ( ) , new size ) < code > will be preserved

public void resize ( long new size ) { final int num pages = num pages ( new size ) ; if ( num pages > pages length ) { pages = arrays copy of ( pages , array util oversize ( num pages , ram usage estimator num bytes object ref ) ) ; } for ( int i = num pages - 1 ; i > = 0 & & pages [ i ] = = null ; - - i ) { pages [ i ] = new int page ( i ) ; } for ( int i = num pages ; i < pages length & & pages [ i ] ! = null ; + + i ) { pages [ i ] = null ; release page ( i ) ; } this size = new size ; }


public object get permissions ( @ request param int page no , @ request param int page size , @ request param ( name = " role " , default value = string utils empty ) string role ) { return nacos role service get permissions from database ( role , page no , page size ) ; }


public void write ( short u 0 , short u 1 ) { write ( u 0 ) ; write ( u 1 ) ; }


a storage request failed and was dropped due to a limit , resource unavailability , or a timeout implementations of throttling can use this signal to differentiate between failures , for example to reduce traffic callers of this method will submit an exception raised by { @ link call # execute ( ) } or on the error callback of { @ link call # enqueue ( callback ) } by default , this returns true if the input is a { @ link rejected execution exception } when originating exceptions , use this type to indicate a load related failure it is generally preferred to specialize this method to handle relevant exceptions for the particular storage rather than wrapping them in { @ link rejected execution exception } at call sites extra wrapping can make errors harder to read , for example , by making it harder to " google " a solution for a well known error message for the storage client , instead thinking the error is in zipkin code itself < h 3 > see also < h 3 > while implementation is flexible , one known use is < a href = " https : github com netflixconcurrency - limits " > netflix concurrency limits

public boolean is over capacity ( throwable e ) { return e instanceof rejected execution exception ; }


creates a hadoop file committer for commit the pending file

hadoop file committer recover for commit ( configuration configuration , path target file path , path in progress path ) throws i o exception ;


set { @ link flags } for this entity ( default = { @ link enum set # none of ( class ) } )

public builder flags ( enum set < flags > flags ) { this flags = flags ; return this ; }


public void reset ( ) { f log v ( tag , " reset " ) ; m gesture detector reset ( ) ; m previous transform reset ( ) ; m active transform reset ( ) ; on transform changed ( ) ; }


sets a string attribute ( like ios application app icon ) for this target

public scratch attribute writer set ( string name , string value ) { new string attribute ( name , value ) append line ( this build string ) ; return this ; }


get the margin providers in this listing panel

public list < margin provider > get margin providers ( ) { return margin providers ; }


post a notification to be shown in the status bar

public static void notify ( string tag , int id , utils consumer < notification compat builder > consumer ) { notify ( tag , id , channel config default channel config , consumer ) ; }


returns the current context register value the context value returned reflects its state when the previously executed instruction was parsedexecuted the context value returned will feed into the next instruction to be parsed with its non - flowing bits cleared and any future context state merged in

public register value get context register value ( ) { return emulator get context register value ( ) ; }


public static void set default ( json json ) { json json = json ; }


get the timestamp of the latest non - null resource allocation

public long get latest non null time ( ) { read lock lock ( ) ; try { if ( cumulative capacity is empty ( ) ) { return - 1 ; } else { / / the last entry might contain null ( to terminate / / the sequence ) return previous one entry < long , resource > last = cumulative capacity last entry ( ) ; if ( last get value ( ) = = null ) { return cumulative capacity floor key ( last get key ( ) - 1 ) ; } else { return last get key ( ) ; } } } finally { read lock unlock ( ) ; } }


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


protected abstract string get type string ( ) ;


creates a health - checking - capable load balancer this method is used to implement health - checking - capable { @ link io grpc load balancer factory } s , which will typically written this way : public class health checking foo lb factory extends load balancer factory { this is the original balancer implementation that doesn ' t have health checking private final load balancer factory foo lb factory ; returns the health - checking - capable version of foo lb public load balancer new load balancer ( helper helper ) { return health checking load balancer util new health checking load balancer ( foo lb factory , helper ) ; } } as a requirement for the original load balancer , it must call { @ code helper create subchannel ( ) } from the { @ link helper # get synchronization context ( ) synchronization context } , or { @ code create subchannel ( ) } will throw

public static load balancer new health checking load balancer ( load balancer factory factory , helper helper ) { health checking load balancer factory hc factory = new health checking load balancer factory ( factory , new exponential backoff policy provider ( ) , grpc util stopwatch supplier ) ; return hc factory new load balancer ( helper ) ; }


public string [ ] get possible matches ( ) { return this possible matches ; }


selects subroutines that are not directly referenced this is commonly referred to as dead code

private address set select dead subroutines ( task monitor monitor , program program , address set start addresses ) throws cancelled exception { / / create a new address set to hold the entire selection address set new address set = new address set ( ) ; / / if we don ' t have any addresses simply return if ( ( start addresses = = null ) | | ( start addresses get num addresses ( ) < = 0 ) ) { return new address set ; } monitor initialize ( start addresses get num addresses ( ) ) ; reference manager rm = program get reference manager ( ) ; code block model cbm = block model service get active subroutine model ( ) ; code block iterator cb iter = cbm get code blocks containing ( start addresses , monitor ) ; while ( cb iter has next ( ) ) { if ( monitor is cancelled ( ) ) { return new address set ; } code block block = cb iter next ( ) ; monitor set message ( block get name ( ) ) ; if ( ! block has references ( rm , block ) ) { new address set add ( block ) ; } monitor increment progress ( block get num addresses ( ) ) ; } return new address set ; }


returns a key for { @ code type } with no annotation

public static string get ( type type ) { return get ( type , null ) ; }


get the motor speed in radians per second

public float get motor speed ( ) { return jni get motor speed ( addr ) ; }


returns the specific integer value , if applicable


< t > t named object ( class < t > category class , string name , object context ) throws i o exception ;


update the results of metadata requests sent

void update metadata results ( task id task id , metadata updates metadata updates ) ;


returns whether the flag { @ code acc static } is on in the given flags

public static boolean is static ( int flags ) { return ( flags & acc static ) ! = 0 ; }


added statements are recorded as a list because their order of insertion matters

public list < statement > get added statements ( ) { return added statements ; }


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


public < request , response > server call listener < request > intercept call ( server call < request , response > server call , metadata metadata , server call handler < request , response > server call handler ) { string token = metadata get ( auth head header name ) ; if ( expected token equals ( token ) ) { return server call handler start call ( server call , metadata ) ; } else { server call close ( status permission denied , new metadata ( ) ) ; return listener ; } }


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

public boolean has value ( ) { return instance has value ( ) ; }


basically same as { @ link # find ( class , long ) } but pending to a new thread for executing

public static < t > find executor < t > find async ( class < t > model class , long id ) { return operator find async ( model class , id ) ; }