determine if the parameters in this { @ code mime type } and the supplied { @ code mime type } are equal , performing case - insensitive comparisons for { @ link charset charsets }

private boolean parameters are equal ( mime type other ) { if ( this parameters size ( ) ! = other parameters size ( ) ) { return false ; } for ( map entry < string , string > entry : this parameters entry set ( ) ) { string key = entry get key ( ) ; if ( ! other parameters contains key ( key ) ) { return false ; } if ( param charset equals ( key ) ) { if ( ! object utils null safe equals ( get charset ( ) , other get charset ( ) ) ) { return false ; } } else if ( ! object utils null safe equals ( entry get value ( ) , other parameters get ( key ) ) ) { return false ; } } return true ; }


returns the prerequisites keyed by their configuration transition keys if the split transition is not active ( e g split ( ) returned an empty list ) , the key is an empty optional

public map < optional < string > , ? extends list < ? extends transitive info collection > > get split prerequisites ( string attribute name ) { return maps transform values ( get split prerequisite configured target and targets ( attribute name ) , ( ctat list ) - > lists transform ( ctat list , configured target and data : : get configured target ) ) ; }


return a { @ link string } representation of the provided values that is typically used for scripts or for the ` map ` execution mode of terms aggs note : this is slow !

public static sorted binary doc values to string ( final sorted set doc values values ) { return new sorted binary doc values ( ) { private int count = 0 ; @ override public boolean advance exact ( int doc ) throws i o exception { if ( values advance exact ( doc ) = = false ) { return false ; } for ( int i = 0 ; ; + + i ) { if ( values next ord ( ) = = sorted set doc values no more ords ) { count = i ; break ; } } / / reset the iterator on the current doc boolean advanced = values advance exact ( doc ) ; assert advanced ; return true ; } @ override public int doc value count ( ) { return count ; } @ override public bytes ref next value ( ) throws i o exception { return values lookup ord ( values next ord ( ) ) ; } } ; }


signals that the preferences of this table ( visible columns , sort order , etc ) should be saved most clients never need to call this method , as changes are saved for free when the user manipulates columns however , sometimes the client can change the state of the columns programmatically , which is not guaranteed to get saved ; for example , setting the sort state of a sorted table model programmatically will not get saved

public void save preferences ( ) { if ( ! ( column model instanceof g table column model ) ) { throw new assert exception ( " saving preferences has no effect if not using a g table column model " ) ; } ( ( g table column model ) column model ) save state ( ) ; }


get an input stream that reads in the raw data for this segment

public input stream get raw data stream ( binary reader reader , message log log ) throws i o exception { return new section stream ( reader , log ) ; }


assigns an alias for this window that the following { @ code select ( ) } clause can refer to

public over window as ( string alias ) { return as ( expression parser parse expression ( alias ) ) ; }


override this to perform actions before the call { @ code actual on subscribe ( this ) } happens

protected boolean before downstream ( ) { return true ; }


check if the returnparam data types were defined by better than analysis ( user , import )

protected boolean is defined function data types ( function func ) { parameter [ ] func params = func get parameters ( ) ; for ( parameter parameter : func params ) { if ( parameter is auto parameter ( ) ) { / / automatic parameter , is ok continue ; } / / check for default type of data type data type dt = parameter get data type ( ) ; dt = data type utilities get base data type ( dt ) ; if ( dt = = null | | undefined is undefined ( dt ) ) { continue ; } / / if the parameters source is higher than if ( parameter get source ( ) is higher priority than ( source type analysis ) ) { return true ; } } / / if already a return type and this one has a return type data type return d t = func get return type ( ) ; return d t = data type utilities get base data type ( return d t ) ; if ( ! ( return d t = = null | | undefined is undefined ( return d t ) ) & & this get return type ( ) ! = null ) { return true ; } return false ; }


returns a single line of source code ( sans newline ) , or null if unavailable


hook for client or server specific typed writers

protected void extend typed writers ( list < http message writer < ? > > typed writers ) { }


set the instance that matches the one of child schema , check the instance parameter is valid against the one of child schemas : quadrilateral , triangle it could be an instance of the ' one of ' schemas the one of child schemas may themselves be a composed schema ( all of , any of , one of )

public void set actual instance ( object instance ) { if ( json is instance of ( quadrilateral class , instance , new hash set < class < ? > > ( ) ) ) { super set actual instance ( instance ) ; return ; } if ( json is instance of ( triangle class , instance , new hash set < class < ? > > ( ) ) ) { super set actual instance ( instance ) ; return ; } throw new runtime exception ( " invalid instance type must be quadrilateral , triangle " ) ; }


clear warnings from authentication handler execution result

authentication handler execution result clear warnings ( ) ;


deep equality for tuples by calling equals ( ) on the tuple members

public boolean equals ( object o ) { if ( this = = o ) { return true ; } if ( ! ( o instanceof tuple 1 1 ) ) { return false ; } @ suppress warnings ( " rawtypes " ) tuple 1 1 tuple = ( tuple 1 1 ) o ; if ( f 0 ! = null ? ! f 0 equals ( tuple f 0 ) : tuple f 0 ! = null ) { return false ; } if ( f 1 ! = null ? ! f 1 equals ( tuple f 1 ) : tuple f 1 ! = null ) { return false ; } if ( f 2 ! = null ? ! f 2 equals ( tuple f 2 ) : tuple f 2 ! = null ) { return false ; } if ( f 3 ! = null ? ! f 3 equals ( tuple f 3 ) : tuple f 3 ! = null ) { return false ; } if ( f 4 ! = null ? ! f 4 equals ( tuple f 4 ) : tuple f 4 ! = null ) { return false ; } if ( f 5 ! = null ? ! f 5 equals ( tuple f 5 ) : tuple f 5 ! = null ) { return false ; } if ( f 6 ! = null ? ! f 6 equals ( tuple f 6 ) : tuple f 6 ! = null ) { return false ; } if ( f 7 ! = null ? ! f 7 equals ( tuple f 7 ) : tuple f 7 ! = null ) { return false ; } if ( f 8 ! = null ? ! f 8 equals ( tuple f 8 ) : tuple f 8 ! = null ) { return false ; } if ( f 9 ! = null ? ! f 9 equals ( tuple f 9 ) : tuple f 9 ! = null ) { return false ; } if ( f 1 0 ! = null ? ! f 1 0 equals ( tuple f 1 0 ) : tuple f 1 0 ! = null ) { return false ; } return true ; }


called when a new format is read from the upstream source

protected void on input format changed ( format holder format holder ) throws exo playback exception { waiting for first sample in format = true ; format new format = assertions check not null ( format holder format ) ; set source drm session ( format holder drm session ) ; format old format = input format ; input format = new format ; if ( decoder = = null ) { maybe init decoder ( ) ; } else if ( source drm session ! = decoder drm session | | ! can keep codec ( old format , input format ) ) { if ( decoder received buffers ) { / / signal end of stream and wait for any final output buffers before re - initialization decoder reinitialization state = reinitialization state signal end of stream ; } else { / / there aren ' t any final output buffers , so release the decoder immediately release decoder ( ) ; maybe init decoder ( ) ; } } event dispatcher input format changed ( input format ) ; }


public static byte get bit value ( byte source , int pos ) { return ( byte ) ( ( source > > pos ) & 1 ) ; }


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


sets the width of the candle - shadow - line in pixels default 3f

public void set shadow width ( float width ) { m shadow width = utils convert dp to pixel ( width ) ; }


get the value stored under the specified { @ code attribute name } as an enum

public < e extends enum < ? > > e get enum ( string attribute name ) { return ( e ) get required attribute ( attribute name , enum class ) ; }


returns the name of the directory where the solib symlinks for the dynamic runtime libraries live the directory itself will be under the root of the host configuration in the ' bin ' directory

public path fragment get dynamic runtime solib dir ( ) { return dynamic runtime solib dir ; }


returns a new token object , by default however , if you want , you can create and return subclass objects based on the value of of kind simply add the cases to the switch for all those special cases for example , if you have a subclass of token called i d token that you want to create if of kind is id , simply add something like : < p > case my parser constants id : return new i d token ( of kind , image ) ; < p > to the following switch statement then you can cast matched token variable to the appropriate type and use sit in your lexical actions

public static token new token ( int of kind , string image ) { switch ( of kind ) { default : return new token ( of kind , image ) ; } }


check on whether or not a parameter should be serialized

boolean check ( boolean include defaults , boolean is configured , t value ) ;


create a { @ code char sequence encoder } that supports only " textplain "

public static char sequence encoder text plain only ( ) { return new char sequence encoder ( new mime type ( " text " , " plain " , default charset ) ) ; }


block until the latch is counted down then rethrow any exception received ( wrapped if checked ) or return the received value ( the default value if none )

public t blocking get ( t default value ) { if ( get count ( ) ! = 0 ) { try { blocking helper verify non blocking ( ) ; await ( ) ; } catch ( interrupted exception ex ) { dispose ( ) ; throw exception helper wrap or throw ( ex ) ; } } throwable ex = error ; if ( ex ! = null ) { throw exception helper wrap or throw ( ex ) ; } t v = value ; return v ! = null ? v : default value ; }


setup the message listener to use throws an { @ link illegal argument exception } if that message listener type is not supported

void setup message listener ( object message listener ) ;


called when the relevant data changes executed on a serial executor , so don ' t do any long - running tasks !


public static string get string ( @ non null final string key ) { return get string ( key , get default cache disk utils ( ) ) ; }


reset a daemon thread to the callback client thread pool so that the callback server can be terminated when gate way server is shutting down we need to shut down the none - daemon thread firstly , then set a new thread created in a daemon thread to the executor service

private static void reset callback client executor service ( gateway server gateway server ) throws no such field exception , illegal access exception , no such method exception , invocation target exception { callback client callback client = ( callback client ) gateway server get callback client ( ) ; / / the java api of py 4j does not provide approach to set " daemonize connections " parameter / / use reflect to daemonize the connection thread field executor = callback client class get declared field ( " executor " ) ; executor set accessible ( true ) ; ( ( scheduled executor service ) executor get ( callback client ) ) shutdown ( ) ; executor set ( callback client , executors new scheduled thread pool ( 1 , thread : : new ) ) ; method setup cleaner = callback client class get declared method ( " setup cleaner " ) ; setup cleaner set accessible ( true ) ; setup cleaner invoke ( callback client ) ; }


sets the address set for this multi listing layout model

public void set address set ( address set view view ) { primary addr set = view ; model size changed ( ) ; }


create user this can only be done by the logged in user

public void create user test ( ) { user user = null ; / / api create user ( user ) ; / / todo : test validations }


return the { @ code series } enum constant for the supplied { @ code http status }

public static series value of ( http status status ) { return status series ; }


compute the path where the output of a committed task is stored until the entire job is committed for a specific application attempt

protected path get committed task path ( int app attempt id , task attempt context context ) { return new path ( get job attempt path ( app attempt id ) , string value of ( context get task attempt i d ( ) get task i d ( ) ) ) ; }


adds a clause that should be matched by the returned documents for a boolean query with no { @ code must } clauses one or more < code > should < code > clauses must match a document for the boolean query to match no { @ code null } value allowed

public bool query builder should ( query builder query builder ) { if ( query builder = = null ) { throw new illegal argument exception ( " inner bool query clause cannot be null " ) ; } should clauses add ( query builder ) ; return this ; }


register the rpc request deserializer for writable rpc engine

private static synchronized void initialize ( ) { org apache hadoop ipc server register protocol engine ( rpc rpc kind rpc writable , invocation class , new server writable rpc invoker ( ) ) ; is initialized = true ; }


returns true if the current program has a selection

boolean has selection ( ) { program selection selection = get selection ( ) ; return selection ! = null & & ! selection is empty ( ) ; }


this member gives the offset from the beginning of the file at which the first byte of the segment resides

public long get offset ( ) { return p offset ; }


issue a select call , expect the specific number of rows back error text will include the sql

private list < string > expect selected ( final int expected , final configuration conf , final string header , final string sql , final object args ) throws exception { conf set ( csv input header , header ) ; return verify selection count ( expected , sql ( sql , args ) , select csv file ( conf , sql , args ) ) ; }


verify that the set of credentials contains a token for the given canonical service name , and that it is of the given kind

public stub abfs token identifier verify credentials contains token ( final credentials credentials , final string service name , final string token service ) throws i o exception { token < ? extends token identifier > token = credentials get token ( new text ( service name ) ) ; assert equals ( " token kind in " + token , stub abfs token identifier token kind , token get kind ( ) ) ; assert equals ( " token service kind in " + token , token service , token get service ( ) to string ( ) ) ; stub abfs token identifier abfs id = ( stub abfs token identifier ) token decode identifier ( ) ; log info ( " created token { } " , abfs id ) ; assert equals ( " token uri in " + abfs id , token service , abfs id get uri ( ) to string ( ) ) ; return abfs id ; }


return the checksum for the singleton master storage directory for datanode

public static long checksum master data node contents ( ) { return datanode storage checksum ; }


exactly like guard is satisfied ( ) , but in addition signals all waiting threads in the ( hopefully unlikely ) event that is satisfied ( ) throws

private boolean is satisfied ( guard guard ) { try { return guard is satisfied ( ) ; } catch ( throwable throwable ) { signal all waiters ( ) ; throw throwable ; } }


gets the script ' s target source folder this is where the script will get created

public i folder get script folder ( ) { if ( ! script folder text get text ( ) is empty ( ) ) { try { i path path = new path ( script folder text get text ( ) ) ; return resources plugin get workspace ( ) get root ( ) get folder ( path ) ; } catch ( illegal argument exception e ) { / / fall through to return null } } return null ; }


check whether the matrix is symmetric matrix

public boolean is symmetric ( ) { if ( m ! = n ) { return false ; } for ( int i = 0 ; i < n ; i + + ) { for ( int j = i + 1 ; j < n ; j + + ) { if ( this get ( i , j ) ! = this get ( j , i ) ) { return false ; } } } return true ; }


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


get the { @ link version } of the underlying federation state store client


writes all the instructions in this instance to the given output destination

public void write to ( annotated output out ) { int start cursor = out get cursor ( ) ; int sz = size ( ) ; if ( out annotates ( ) ) { boolean verbose = out is verbose ( ) ; for ( int i = 0 ; i < sz ; i + + ) { dalv insn insn = ( dalv insn ) get 0 ( i ) ; int code bytes = insn code size ( ) * 2 ; string s ; if ( ( code bytes ! = 0 ) | | verbose ) { s = insn listing string ( " " , out get annotation width ( ) , true ) ; } else { s = null ; } if ( s ! = null ) { out annotate ( code bytes , s ) ; } else if ( code bytes ! = 0 ) { out annotate ( code bytes , " " ) ; } } } for ( int i = 0 ; i < sz ; i + + ) { dalv insn insn = ( dalv insn ) get 0 ( i ) ; try { insn write to ( out ) ; } catch ( runtime exception ex ) { throw exception with context with context ( ex , " while writing " + insn ) ; } } / / sanity check of the amount written int written = ( out get cursor ( ) - start cursor ) / 2 ; if ( written ! = code size ( ) ) { throw new runtime exception ( " write length mismatch ; expected " + code size ( ) + " but actually wrote " + written ) ; } }


@ check for null < r > holder < r > make ( @ non null r referent ) ;


encodes the value which may be a string , number , boolean , null , map , or list

public final json writer json value ( @ nullable object value ) throws i o exception { if ( value instanceof map < ? , ? > ) { begin object ( ) ; for ( map entry < ? , ? > entry : ( ( map < ? , ? > ) value ) entry set ( ) ) { object key = entry get key ( ) ; if ( ! ( key instanceof string ) ) { throw new illegal argument exception ( key = = null ? " map keys must be non - null " : " map keys must be of type string : " + key get class ( ) get name ( ) ) ; } name ( ( ( string ) key ) ) ; json value ( entry get value ( ) ) ; } end object ( ) ; } else if ( value instanceof list < ? > ) { begin array ( ) ; for ( object element : ( ( list < ? > ) value ) ) { json value ( element ) ; } end array ( ) ; } else if ( value instanceof string ) { value ( ( ( string ) value ) ) ; } else if ( value instanceof boolean ) { value ( ( ( boolean ) value ) boolean value ( ) ) ; } else if ( value instanceof double ) { value ( ( ( double ) value ) double value ( ) ) ; } else if ( value instanceof long ) { value ( ( ( long ) value ) long value ( ) ) ; } else if ( value instanceof number ) { value ( ( ( number ) value ) ) ; } else if ( value = = null ) { null value ( ) ; } else { throw new illegal argument exception ( " unsupported type : " + value get class ( ) get name ( ) ) ; } return this ; }


adds the values in the collection to the builder , each preceded by the given flag , if the collection was non - empty and the condition was true

aapt command builder then add repeated ( string flag , collection < string > values ) ;


removes and returns first element , or null if empty

private e unlink first ( ) { / / assert lock is held by current thread ( ) ; node < e > f = first ; if ( f = = null ) return null ; node < e > n = f next ; e item = f item ; f item = null ; f next = f ; / / help gc first = n ; if ( n = = null ) last = null ; else n prev = null ; - - count ; not full signal ( ) ; return item ; }


advance the calendar to the particular hour paying particular attention to daylight saving problems

protected void set calendar hour ( calendar cal , int hour ) { cal set ( calendar hour of day , hour ) ; if ( cal get ( calendar hour of day ) ! = hour & & hour ! = 24 ) { cal set ( calendar hour of day , hour + 1 ) ; } }


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


returns all sink vertices ( those with no outgoing edges ) in the graph

public static < v , e extends g edge < v > > set < v > get sinks ( g directed graph < v , e > g ) { set < v > sinks = new hash set < > ( ) ; collection < v > vertices = g get vertices ( ) ; for ( v v : vertices ) { collection < e > out edges = g get out edges ( v ) ; if ( out edges is empty ( ) ) { sinks add ( v ) ; } } return sinks ; }


the { @ link rest high level client } must declare the following execution methods using the < code > protected < code > modifier so that they can be used by subclasses to implement custom logic

public void test methods visibility ( ) { final string [ ] method names = new string [ ] { " convert exists response " , " parse entity " , " parse response exception " , " perform request " , " perform request and parse entity " , " perform request and parse optional entity " , " perform request async " , " perform request async and parse entity " , " perform request async and parse optional entity " } ; final set < string > protected methods = arrays stream ( rest high level client class get declared methods ( ) ) filter ( method - > modifier is protected ( method get modifiers ( ) ) ) map ( method : : get name ) collect ( collectors to collection ( tree set : : new ) ) ; assert that ( protected methods , contains ( method names ) ) ; }


returns a range that contains all values strictly greater than { @ code endpoint }

public static < c extends comparable < ? > > range < c > greater than ( c endpoint ) { return create ( cut above value ( endpoint ) , cut < c > above all ( ) ) ; }


adds the specified number of new free objects to the pool usually called early on as a pre - allocation mechanism but can be used at any time

public void fill ( int size ) { for ( int i = 0 ; i < size ; i + + ) if ( free objects size < max ) free objects add ( new object ( ) ) ; peak = math max ( peak , free objects size ) ; }


delegate to { @ link abstract auto proxy creator # get custom target source ( class , string ) } if the bean name matches one of the names in the configured list of supported names , returning { @ code null } otherwise

protected target source get custom target source ( class < ? > bean class , string bean name ) { return ( is supported bean name ( bean class , bean name ) ? super get custom target source ( bean class , bean name ) : null ) ; }


actually perform sorting of the given source list , according to the given sort definition the default implementation uses spring ' s property comparator can be overridden in subclasses

protected void do sort ( list < e > source , sort definition sort ) { property comparator sort ( source , sort ) ; }


called when creating a new hooks handler for a layout calculation it copies the source of truth hooks these blocks are run immediately to update this hook before we start creating components

private void copy hooks from ( hooks handler other ) { m hooks container = new hash map < > ( other m hooks container size ( ) ) ; for ( map entry < string , hooks > entry : other m hooks container entry set ( ) ) { m hooks container put ( entry get key ( ) , new hooks ( entry get value ( ) ) ) ; } }


set the iso format used to format date values

public void set iso ( iso iso ) { this iso = iso ; }


maps all local - associated registers that are not parameters tries to find an unreserved range that ' s wide enough for all of the ssa registers , and then tries to map them all to that range if not all fit , a new range is tried until all registers have been fit

private void handle local associated other ( ) { for ( array list < register spec > specs : local variables values ( ) ) { int rop reg = param range end ; boolean done = false ; do { int max category = 1 ; / / compute max category for remaining unmapped registers int sz = specs size ( ) ; for ( int i = 0 ; i < sz ; i + + ) { register spec ssa spec = specs get ( i ) ; int category = ssa spec get category ( ) ; if ( ! ssa regs mapped get ( ssa spec get reg ( ) ) & & category > max category ) { max category = category ; } } rop reg = find rop reg for local ( rop reg , max category ) ; if ( can map regs ( specs , rop reg ) ) { done = try map regs ( specs , rop reg , max category , true ) ; } / / increment for next call to find rop reg for local rop reg + + ; } while ( ! done ) ; } }


returns whether the checkpoint should be discarded when the owning job reaches the { @ link job status # failed } state

boolean discard on job failed ( ) { return discard failed ; }


rename the existing current dir to previous tmp , and create a new empty current dir

public static void rename cur to tmp ( storage directory sd ) throws i o exception { file cur dir = sd get current dir ( ) ; file prev dir = sd get previous dir ( ) ; final file tmp dir = sd get previous tmp ( ) ; preconditions check state ( cur dir exists ( ) , " current directory must exist for preupgrade " ) ; preconditions check state ( ! prev dir exists ( ) , " previous directory must not exist for preupgrade " ) ; preconditions check state ( ! tmp dir exists ( ) , " previous tmp directory must not exist for preupgrade " + " consider restarting for recovery " ) ; / / rename current to tmp n n storage rename ( cur dir , tmp dir ) ; if ( ! cur dir mkdir ( ) ) { throw new i o exception ( " cannot create directory " + cur dir ) ; } }


return the name of the constructor argument

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


get integer representation of the big - endian value does not handle char format , use { @ link string data instance # get char representation ( data type , byte [ ] , settings ) }

/ * package * / string get representation ( big integer big int , settings settings , int bit length ) { int format = get format settings definition ( ) get format ( settings ) ; boolean padded = padding is padded ( settings ) ; boolean negative = big int signum ( ) < 0 ; if ( negative & & ( ! signed | | ( format ! = format settings definition decimal ) ) ) { / / force use of unsigned value big int = big int add ( big integer value of ( 2 ) pow ( bit length ) ) ; } string val str ; int nominal len ; switch ( format ) { default : case format settings definition hex : val str = big int to string ( 16 ) to upper case ( ) + " h " ; nominal len = ( bit length + 3 ) / 4 ; break ; case format settings definition decimal : return big int to string ( 10 ) ; case format settings definition binary : val str = big int to string ( 2 ) + " b " ; nominal len = bit length ; break ; case format settings definition octal : val str = big int to string ( 8 ) + " o " ; nominal len = ( bit length + 2 ) / 3 ; break ; } if ( padded ) { / / + 1 to account for format suffix char val str = string format pad it ( val str , nominal len + 1 , ( char ) 0 , true ) ; } return val str ; }


public static < t > iterator < t > empty ( ) { return collections empty iterator ( ) ; }


must only be called if the pseudo time queue is non - empty !

state poll pseudo time queue ( ) { state state = pseudo time queue poll ( ) ; / / this method is only ever called if the pseudo time queue is non - empty total queued weights - = state weight ; return state ; }


the credential name stands for a unique identifier that can be used to identify the server certificate and the private key the credential name appended with suffix " - cacert " is used to identify the ca certificates associated with this server gateway workloads capable of fetching credentials from a remote credential store such as kubernetes secrets , will be configured to retrieve the server certificate and the private key using credential name , instead of using the file system paths specified above if using mutual tls , gateway workload instances will retrieve the ca certificates using credential name - cacert the semantics of the name are platform dependent in kubernetes , the default istio supplied credential server expects the credential name to match the name of the kubernetes secret that holds the server certificate , the private key , and the ca certificate ( if using mutual tls ) set the ` istio meta user sds ` metadata variable in the gateway ' s proxy to enable the dynamic credential fetching feature < code > string credential name = 10 ; < code >

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


public static boolean finish to activity ( @ non null final class < ? extends activity > clz , final boolean is include self , final boolean is load anim ) { list < activity > activities = utils bridge get activity list ( ) ; for ( activity act : activities ) { if ( act get class ( ) equals ( clz ) ) { if ( is include self ) { finish activity ( act , is load anim ) ; } return true ; } finish activity ( act , is load anim ) ; } return false ; }


returns the set of all subsets of { @ code set } of size { @ code size } for example , { @ code combinations ( immutable set of ( 1 , 2 , 3 ) , 2 ) } returns the set { @ code { { 1 , 2 } , { 1 , 3 } , { 2 , 3 } } } elements appear in these subsets in the same iteration order as they appeared in the input set the order in which these subsets appear in the outer set is undefined the returned set and its constituent sets use { @ code equals } to decide whether two elements are identical , even if the input set uses a different concept of equivalence performance notes : the memory usage of the returned set is only { @ code o ( n ) } when the result set is constructed , the input set is merely copied only as the result set is iterated are the individual subsets created each of these subsets occupies an additional o ( n ) memory but only for as long as the user retains a reference to it that is , the set returned by { @ code combinations } does not retain the individual subsets

public static < e > set < set < e > > combinations ( set < e > set , final int size ) { final immutable map < e , integer > index = maps index map ( set ) ; check nonnegative ( size , " size " ) ; check argument ( size < = index size ( ) , " size ( % s ) must be < = set size ( ) ( % s ) " , size , index size ( ) ) ; if ( size = = 0 ) { return immutable set < set < e > > of ( immutable set < e > of ( ) ) ; } else if ( size = = index size ( ) ) { return immutable set < set < e > > of ( index key set ( ) ) ; } return new abstract set < set < e > > ( ) { @ override public boolean contains ( @ nullable decl object o ) { if ( o instanceof set ) { set < ? > s = ( set < ? > ) o ; return s size ( ) = = size & & index key set ( ) contains all ( s ) ; } return false ; } @ override public iterator < set < e > > iterator ( ) { return new abstract iterator < set < e > > ( ) { final bit set bits = new bit set ( index size ( ) ) ; @ override protected set < e > compute next ( ) { if ( bits is empty ( ) ) { bits set ( 0 , size ) ; } else { int first set bit = bits next set bit ( 0 ) ; int bit to flip = bits next clear bit ( first set bit ) ; if ( bit to flip = = index size ( ) ) { return end of data ( ) ; } / * * the current set in sorted order looks like * { first set bit , first set bit + 1 , , bit to flip - 1 , } * where it does * not * contain bit to flip * * the next combination is * * { 0 , 1 , , bit to flip - first set bit - 2 , bit to flip , } * * this is lexicographically next if you look at the combinations in descending order * e g { 2 , 1 , 0 } , { 3 , 1 , 0 } , { 3 , 2 , 0 } , { 3 , 2 , 1 } , { 4 , 1 , 0 } * / bits set ( 0 , bit to flip - first set bit - 1 ) ; bits clear ( bit to flip - first set bit - 1 , bit to flip ) ; bits set ( bit to flip ) ; } final bit set copy = ( bit set ) bits clone ( ) ; return new abstract set < e > ( ) { @ override public boolean contains ( @ nullable decl object o ) { integer i = index get ( o ) ; return i ! = null & & copy get ( i ) ; } @ override public iterator < e > iterator ( ) { return new abstract iterator < e > ( ) { int i = - 1 ; @ override protected e compute next ( ) { i = copy next set bit ( i + 1 ) ; if ( i = = - 1 ) { return end of data ( ) ; } return index key set ( ) as list ( ) get ( i ) ; } } ; } @ override public int size ( ) { return size ; } } ; } } ; } @ override public int size ( ) { return int math binomial ( index size ( ) , size ) ; } @ override public string to string ( ) { return " sets combinations ( " + index key set ( ) + " , " + size + " ) " ; } } ; }


returns the sum of total term frequencies of all terms in this field

public long get sum total term freq ( ) { return sum total term freq ; }


set the default format style of { @ link java time local time } objects default is { @ link java time format format style # short }

public void set time style ( format style time style ) { this factories get ( type time ) set time style ( time style ) ; }


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


get userlogin : logs user into the system

default response entity < string > login user ( @ not null @ api param ( value = " the user name for login " , required = true ) @ valid @ request param ( value = " username " , required = true ) string username , @ not null @ api param ( value = " the password for login in clear text " , required = true ) @ valid @ request param ( value = " password " , required = true ) string password ) { return new response entity < > ( http status not implemented ) ; }


gets the information about the available storage space either internal or external depends on the give input

public long get available storage space ( storage type storage type ) { ensure initialized ( ) ; maybe update stats ( ) ; stat fs stat f s = storage type = = storage type internal ? m internal stat fs : m external stat fs ; if ( stat f s ! = null ) { long block size , available blocks ; if ( build version sdk int > = build version codes jelly bean mr2 ) { block size = stat f s get block size long ( ) ; available blocks = stat f s get available blocks long ( ) ; } else { block size = stat f s get block size ( ) ; available blocks = stat f s get available blocks ( ) ; } return block size * available blocks ; } return 0 ; }


returns true if this placeholder is currently associated with a component if it is not , then it exists as a place holder

boolean has provider ( ) { return component provider ! = null ; }


used by the mobile emulators that refuse to access localhost or 127 0 0 1 the ip4ip6 requirements of this method are as - of - yet unspecified , but we return the string that is associated with the ip4 interface

public string get non loopback address of this machine ( ) { inet address ip 4 non loopback address of this machine = get ip 4 non loopback address of this machine ( ) ; if ( ! objects equals ( cached ip 4 non loopback address of this machine , ip 4 non loopback address of this machine ) ) { cached ip 4 non loopback address of this machine = ip 4 non loopback address of this machine ; cached ip 4 non loopback address host name = ip 4 non loopback address of this machine get host address ( ) ; } return cached ip 4 non loopback address host name ; }


add token stats to the owner to token count mapping

private void add token for owner stats ( token ident id ) { string real owner = get token real owner ( id ) ; token owner stats put ( real owner , token owner stats get or default ( real owner , 0l ) + 1 ) ; }


peeks the amr header from the beginning of the input , and consumes it if it exists

private boolean read amr header ( extractor input input ) throws i o exception { if ( peek amr signature ( input , amr signature nb ) ) { is wide band = false ; input skip fully ( amr signature nb length ) ; return true ; } else if ( peek amr signature ( input , amr signature wb ) ) { is wide band = true ; input skip fully ( amr signature wb length ) ; return true ; } return false ; }


public boolean is filter executors ( ) { return filter executors ; }


returns the first node in the tree that is in range

private @ nullable avl node < e > first node ( ) { avl node < e > root = root reference get ( ) ; if ( root = = null ) { return null ; } avl node < e > node ; if ( range has lower bound ( ) ) { e endpoint = range get lower endpoint ( ) ; node = root reference get ( ) ceiling ( comparator ( ) , endpoint ) ; if ( node = = null ) { return null ; } if ( range get lower bound type ( ) = = bound type open & & comparator ( ) compare ( endpoint , node get element ( ) ) = = 0 ) { node = node succ ; } } else { node = header succ ; } return ( node = = header | | ! range contains ( node get element ( ) ) ) ? null : node ; }


expands the range set to include the given value if the set already includes this number , this will be a no - op

public synchronized void add ( int n ) { for ( int i = 0 ; i < ranges size ( ) ; i + + ) { range r = ranges get ( i ) ; if ( r includes ( n ) ) return ; / / already included if ( r end = = n ) { ranges set ( i , r expand right ( ) ) ; check collapse ( i ) ; return ; } if ( r start = = n + 1 ) { ranges set ( i , r expand left ( ) ) ; check collapse ( i - 1 ) ; return ; } if ( r is bigger than ( n ) ) { / / needs to insert a single - value range ranges add ( i , new range ( n , n + 1 ) ) ; return ; } } ranges add ( new range ( n , n + 1 ) ) ; }


{ @ inherit doc } the state of the ticket is affected by this operation and the ticket will be considered used the state update subsequently may impact the ticket expiration policy in that , depending on the policy configuration , the ticket may be considered expired

public synchronized service ticket grant service ticket ( final string id , final service service , final expiration policy expiration policy , final boolean credential provided , final boolean only track most recent session ) { val service ticket = new service ticket impl ( id , this , service , credential provided , expiration policy ) ; track service session ( service ticket get id ( ) , service , only track most recent session ) ; return service ticket ; }


what is the index of the current character of lookahead ?

public int get char index ( ) { return input index ( ) ; }


filter on annotated methods see { @ link org springframework web testfixture method mvc annotation predicates }

public final builder < t > annot ( predicate < method > filters ) { this filters add all ( arrays as list ( filters ) ) ; return this ; }


get a forward iterator over addresses that have comments of the given type

public address iterator get comment address iterator ( int comment type , address set view set , boolean forward ) { try { address key iterator key iter = comment adapter get keys ( set , forward ) ; address iterator addr iter = new address key address iterator ( key iter , forward , addr map , program ) ; return new comment type filter address iterator ( program , addr iter , comment type ) ; } catch ( i o exception e ) { program db error ( e ) ; } return new empty address iterator ( ) ; }


creates a blocking stub for csi controller plugin on the given channel

public controller grpc controller blocking stub create controller blocking stub ( ) { return controller grpc new blocking stub ( channel ) ; }


returns true if the drop target can accept the data flavor that is to be dropped

protected boolean is drag flavor supported ( drop target drag event e ) { if ( drop flavors = = null ) { return false ; / / this drop target doesn ' t accept any flavors } / / check each flavor to see that this accepts at least one flavor the event can drop for ( data flavor drop flavor : drop flavors ) { if ( e is data flavor supported ( drop flavor ) ) { return true ; } } return false ; }


reads the given file { @ code path } , assumed to have size { @ code file size } , and does a check on the number of bytes read use this method when you already know the size of the file the check is intended to catch issues where filesystems incorrectly truncate files

public static byte [ ] read with known file size ( path path , long file size ) throws i o exception { if ( file size > integer max value ) { throw new i o exception ( " cannot read file with size larger than 2gb " ) ; } int file size int = ( int ) file size ; byte [ ] bytes = read content with limit ( path , file size int ) ; if ( file size int > bytes length ) { throw new short read i o exception ( path , file size int , bytes length ) ; } return bytes ; }


creates a function at entry point in the specified program

public final function create function ( address entry point , program current program , task monitor monitor ) { create function cmd cmd = new create function cmd ( null , entry point , null , source ) ; if ( cmd apply to ( current program , monitor ) ) { return current program get listing ( ) get function at ( entry point ) ; } return null ; }


should only be called by { @ link org thoughtcrime securesms migrations registration pin v 2 migration job }

public static synchronized void on migrate to registration lock v 2 ( @ non null context context , @ non null string pin ) throws i o exception , unauthenticated response exception , invalid key exception { log i ( tag , " on migrate to registration lock v 2 ( ) " ) ; kbs values kbs values = signal store kbs values ( ) ; 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 ) ; pin change session enable registration lock ( master key ) ; kbs values set kbs master key ( kbs data , pin ) ; text secure preferences clear registration lock v 1 ( context ) ; update state ( build inferred state from other fields ( ) ) ; }


private string get thread prefix ( string thread prefix ) { return thread prefix + thread prefix split char + transaction role name ( ) ; }


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 builder error handler ( error event handler error event handler ) { this error event handler = error event handler ; return this ; }


check whether polygons defined by the given vertex arrays overlap ( clockwise or counter - clockwise wound doesn ' t matter ) if they do , optionally obtain a minimum translation vector indicating the minimum magnitude vector required to push the polygon defined by verts 1 out of the collision with the polygon defined by verts 2

public static boolean overlap convex polygons ( float [ ] verts 1 , int offset 1 , int count 1 , float [ ] verts 2 , int offset 2 , int count 2 , minimum translation vector mtv ) { boolean overlaps ; if ( mtv ! = null ) { mtv depth = float max value ; mtv normal set zero ( ) ; } overlaps = overlaps on axis of shape ( verts 2 , offset 2 , count 2 , verts 1 , offset 1 , count 1 , mtv , true ) ; if ( overlaps ) { overlaps = overlaps on axis of shape ( verts 1 , offset 1 , count 1 , verts 2 , offset 2 , count 2 , mtv , false ) ; } if ( ! overlaps ) { if ( mtv ! = null ) { mtv depth = 0 ; mtv normal set zero ( ) ; } return false ; } return true ; }


register a callback to execute on message arrival for concurrent consuming

public void register message listener ( message listener concurrently message listener ) { this message listener = message listener ; this default m q push consumer impl register message listener ( message listener ) ; }


public void add ( string operation , duration duration , boolean success ) { duration stats duration stats ; string key = operation ; if ( ! success ) { key + = " - fail " ; } synchronized ( this ) { duration stats = stats table get ( key ) ; if ( duration stats = = null ) { duration stats = new duration stats ( key ) ; stats table put ( key , duration stats ) ; } } synchronized ( duration stats ) { duration stats add ( duration ) ; } }


extracts the list of type names from a list of schemas excludes ` any type ` if there are other valid types extracted

protected list < string > get types from schemas ( list < schema > schemas ) { list < schema > filtered schemas = schemas size ( ) > 1 ? schemas stream ( ) filter ( schema - > ! " any type " equals ( super get schema type ( schema ) ) ) collect ( collectors to list ( ) ) : schemas ; return filtered schemas stream ( ) map ( schema - > { string schema type = get schema type ( schema ) ; if ( model utils is array schema ( schema ) ) { array schema ap = ( array schema ) schema ; schema inner = ap get items ( ) ; schema type = schema type + " < " + get schema type ( inner ) + " > " ; } return schema type ; } ) distinct ( ) collect ( collectors to list ( ) ) ; }


returns true if this predicate matches nothing

public boolean is none ( ) { return this = = file type set no file ; }


public static void main ( final string [ ] args ) throws exception { final var in memory dao = new in memory customer dao ( ) ; perform operations using ( in memory dao ) ; final var data source = create data source ( ) ; create schema ( data source ) ; final var db dao = new db customer dao ( data source ) ; perform operations using ( db dao ) ; delete schema ( data source ) ; }


writes a sequence of bytes from the given buffer into this content , starting at the given position and overwriting the existing ones

public void overwrite ( byte buffer source , long position ) { if ( source remaining ( ) > 0 & & position < length ( ) ) overwrite internal ( new range ( position , source , true ) ) ; }


the degree can be counted from either the edge source or target i ds by default the source i ds are counted reducing on target i ds may optimize the algorithm if the input edge list is sorted by target id

public maximum degree < k , vv , ev > set reduce on target id ( boolean reduce on target id ) { this reduce on target id set ( reduce on target id ) ; return this ; }


returns the service dependencies of this service the service will be instantiated only if all the service dependencies are already initialized this method returns an empty array ( size 0 )

public class [ ] get service dependencies ( ) { return new class [ 0 ] ; }


read the given byte buffer from its current position to its limit into a byte array

public static byte [ ] to array ( byte buffer buffer ) { return to array ( buffer , 0 , buffer remaining ( ) ) ; }


default value for { @ link tool installation # get properties ( ) } used in the form binding

public describable list < tool property < ? > , tool property descriptor > get default properties ( ) throws i o exception { describable list < tool property < ? > , tool property descriptor > r = new describable list < > ( noop ) ; list < ? extends tool installer > installers = get default installers ( ) ; if ( ! installers is empty ( ) ) r add ( new install source property ( installers ) ) ; return r ; }


invoked when one of the cors checks failed

protected void reject request ( server http response response ) { response set status code ( http status forbidden ) ; }


return the additional ( undeclared ) property

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


constructs a function def signature for the function and adds it as a comment , either eol or pre depending on how small the inline func is

private void add comments for inline func ( d i e aggregate diea , address block start , address block end ) { function definition func def = dwarf d t m get function signature ( diea ) ; if ( func def ! = null ) { long inline func len = block end subtract ( block start ) ; boolean is short = inline func len < inline func short len ; if ( is short ) { append comment ( block start , code unit eol comment , " inline " + func def get prototype string ( ) , " ; " ) ; } else { append comment ( block start , code unit pre comment , " begin : inline " + func def get prototype string ( ) , " \ n " ) ; } } }


asserts that the current response didn ' t use the cache

public recorded response assert no cache response ( ) { assert that ( response cache response ( ) ) is null ( ) ; return this ; }


gets the total number of all currently cached items

public synchronized int get count ( ) { return m cached entries get count ( ) ; }


visits the end of the method this method , which is the last one to be called , is used to inform the visitor that all the annotations and attributes of the method have been visited

public void visit end ( ) { if ( mv ! = null ) { mv visit end ( ) ; } }


return the maximum number of rows specified for this jdbc template

public int get max rows ( ) { return this max rows ; }


public string get small snake ( ) { return small snake ; }


entry point to an operation increments the statistic ; verifies the fs is active

protected void entry point ( statistic operation ) throws i o exception { check not closed ( ) ; increment statistic ( operation ) ; }


raise an error the request will be marked as failed

public void raise ( errors error ) { raise ( error exception ( ) ) ; }


create an http server instance for the given webapp

public static http server 2 create server ( string webapp ) throws i o exception { return local server builder ( webapp ) set find port ( true ) build ( ) ; }


returns the resolved { @ link input writer } class

public class < ? extends input writer > get input writer class ( ) { return input writer class ; }


{ @ code true } if the first write request shouldn ' t be encrypted

public ssl context builder start tls ( boolean start tls ) { this start tls = start tls ; return this ; }


same test as above , but for file context

public void test file context doesnt dns resolve logical u r i ( ) throws exception { file system fs = h a test util configure failover fs ( cluster , conf ) ; name service spy n s = spy on name service ( ) ; string logical host = fs get uri ( ) get host ( ) ; configuration ha client conf = fs get conf ( ) ; file context fc = file context get file context ( ha client conf ) ; path root = new path ( " / " ) ; fc list status ( root ) ; fc list status ( fc make qualified ( root ) ) ; fc get default file system ( ) get canonical service name ( ) ; / / ensure that the logical hostname was never resolved mockito verify ( spy n s , mockito never ( ) ) lookup all host addr ( mockito eq ( logical host ) ) ; }


applies the given window function to each window the window function is called for each evaluation of the window for each key individually the output of the window function is interpreted as a regular non - windowed stream arriving data is incrementally aggregated using the given aggregate function this means that the window function typically has only a single value to process when called

public < acc , v , r > bootstrap transformation < t > aggregate ( aggregate function < t , acc , v > aggregate function , window function < v , r , k , w > window function , type information < acc > accumulator type ) { check not null ( aggregate function , " aggregate function " ) ; check not null ( window function , " window function " ) ; check not null ( accumulator type , " accumulator type " ) ; if ( aggregate function instanceof rich function ) { throw new unsupported operation exception ( " this aggregate function cannot be a rich function " ) ; } / / clean the closures window function = input clean ( window function ) ; aggregate function = input clean ( aggregate function ) ; window operator < k , t , ? , r , w > operator = builder aggregate ( aggregate function , window function , accumulator type ) ; savepoint writer operator factory factory = ( timestamp , path ) - > new state bootstrap wrapper operator < > ( timestamp , path , operator ) ; return new bootstrap transformation < > ( input , operator max parallelism , timestamper , factory , key selector , key type ) ; }


tests that when the parent dirs does not exist in fallback but the parent dir is same as mount internal directory , then we create parent structure ( mount internal directory tree structure ) in fallback

public void test mkdirs with fallback link with mount path matching dir exist ( ) throws exception { configuration conf = new configuration ( ) ; conf set boolean ( constants config viewfs mount links as symlinks , false ) ; config util add link ( conf , " / user 1 / hive " , new path ( target test root to string ( ) ) to uri ( ) ) ; path fallback target = new path ( target test root , " fallback dir " ) ; fs target mkdirs ( fallback target ) ; config util add link fallback ( conf , fallback target to uri ( ) ) ; try ( file system vfs = file system get ( view fs default cluster uri , conf ) ) { / / user 1 does not exist in fallback path immediate level to internal dir = new path ( " / user 1 / test " ) ; path test = path merge paths ( fallback target , immediate level to internal dir ) ; assert false ( fs target exists ( test ) ) ; assert true ( vfs mkdirs ( immediate level to internal dir ) ) ; assert true ( fs target exists ( test ) ) ; } }


public static counter build counter ( meter id meter id , skywalking config config ) { return meter factory counter ( meter id ) mode ( get counter mode ( meter id , config ) ) build ( ) ; }


asynchronously execute a snapshot lifecycle definition see https : www elastic coguideenelasticsearchclientjava - restcurrent java - rest - high - ilm - slm - execute - snapshot - lifecycle - policy html for more

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


loads a { @ link item } from a config file

public static item load ( item group parent , file dir ) throws i o exception { item item = ( item ) get config file ( dir ) read ( ) ; item on load ( parent , dir get name ( ) ) ; return item ; }


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


builds a map from client to state , and readies each client state for assignment by adding any missing prev tasks and computing the per - task overall lag based on the fetched end offsets for each changelog

private boolean populate client states map ( final map < uuid , client state > client states , final map < uuid , client metadata > client metadata map , final map < topic partition , task id > task for partition , final map < task id , set < topic partition > > changelogs by stateful task , final set < string > newly created changelogs , final set < string > optimized source changelogs ) { boolean fetch end offsets successful ; map < task id , long > all task end offset sums ; try { final collection < topic partition > all changelog partitions = changelogs by stateful task values ( ) stream ( ) flat map ( collection : : stream ) collect ( collectors to list ( ) ) ; final set < topic partition > preexisting changelog partitions = new hash set < > ( ) ; final set < topic partition > preexisting source changelog partitions = new hash set < > ( ) ; final set < topic partition > newly created changelog partitions = new hash set < > ( ) ; for ( final topic partition changelog : all changelog partitions ) { if ( newly created changelogs contains ( changelog topic ( ) ) ) { newly created changelog partitions add ( changelog ) ; } else if ( optimized source changelogs contains ( changelog topic ( ) ) ) { preexisting source changelog partitions add ( changelog ) ; } else { preexisting changelog partitions add ( changelog ) ; } } / / make the list offsets request first so it can fetch the offsets for non - source changelogs / / asynchronously while we use the blocking consumer # committed call to fetch source - changelog offsets final kafka future < map < topic partition , list offsets result info > > end offsets future = fetch end offsets future ( preexisting changelog partitions , admin client ) ; final map < topic partition , long > source changelog end offsets = fetch committed offsets ( preexisting source changelog partitions , main consumer supplier get ( ) ) ; final map < topic partition , list offsets result info > end offsets = client utils get end offsets ( end offsets future ) ; all task end offset sums = compute end offset sums by task ( changelogs by stateful task , end offsets , source changelog end offsets , newly created changelog partitions ) ; fetch end offsets successful = true ; } catch ( final streams exception | timeout exception e ) { all task end offset sums = changelogs by stateful task key set ( ) stream ( ) collect ( collectors to map ( t - > t , t - > unknown offset sum ) ) ; fetch end offsets successful = false ; } for ( final map entry < uuid , client metadata > entry : client metadata map entry set ( ) ) { final uuid uuid = entry get key ( ) ; final client state state = entry get value ( ) state ; state initialize prev tasks ( task for partition ) ; state compute task lags ( uuid , all task end offset sums ) ; client states put ( uuid , state ) ; } return fetch end offsets successful ; }


returns the x screen location of the popup point


convert the micrometer meter id to skywalking meter id

private meter id convert id ( meter id id ) { return meter builder convert id ( id , get convention name ( id ) ) ; }


< code > optional float cash = 2 ; < code >


this test validates the correctness of submit application in case of multiple submission the first retry has to be submitted to the same sub cluster of the first attempt

public void test submit application multiple submission ( ) throws yarn exception , i o exception , interrupted exception { application id app id = application id new instance ( system current time millis ( ) , 1 ) ; application submission context info context = new application submission context info ( ) ; context set application id ( app id to string ( ) ) ; / / first attempt response response = interceptor submit application ( context , null ) ; assert assert not null ( response ) ; assert assert equals ( accepted , response get status ( ) ) ; sub cluster id sc id result = state store util query application home s c ( app id ) ; assert assert not null ( sc id result ) ; / / first retry response = interceptor submit application ( context , null ) ; assert assert not null ( response ) ; assert assert equals ( accepted , response get status ( ) ) ; sub cluster id sc id result 2 = state store util query application home s c ( app id ) ; assert assert not null ( sc id result 2 ) ; assert assert equals ( sc id result , sc id result 2 ) ; }


returns the output directory for this build configuration

artifact root get output directory ( repository name repository name ) { return sibling repository layout ? build derived root ( " " , repository name ) : output directory ; }


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


call { @ code list located status ( base path ) } the list here returns the marker peer before the dir reason : the listing iterators return the objects before the common prefixes , and the marker dir is coming back as a prefix

public void test list located status base dir ( ) throws throwable { list < file status > statuses = exec ( " list located status " , ( ) - > to list ( get file system ( ) list located status ( base path ) ) ) ; assert contains exactly status of paths ( statuses , marker peer , marker dir ) ; }


register a listener that will be called when this model is bound to a view the listener will contribute to this model ' s hash code state per the { @ link com airbnb epoxy epoxy attribute option # do not hash } rules you may clear the listener by setting a null value , or by calling { @ link # reset ( ) }

public model returning class type with varargs on bind ( on model bound listener < model returning class type with varargs , object > listener ) { on mutation ( ) ; this on model bound listener epoxy generated model = listener ; return this ; }


this test checks that reinterpreting a data stream to a keyed stream works as expected this test consists of two jobs the first job materializes a key by into files , one files per partition the second job opens the files created by the first jobs as sources ( doing the correct assignment of files to partitions ) and reinterprets the sources as keyed , because we know they have been partitioned in a key by from the first job

public void test reinterpret as keyed stream ( ) throws exception { final int max parallelism = 8 ; final int num events per instance = 100 ; final int parallelism = 3 ; final int num total events = num events per instance * parallelism ; final int num unique keys = 100 ; final stream execution environment env = stream execution environment get execution environment ( ) ; env set max parallelism ( max parallelism ) ; env set parallelism ( parallelism ) ; env enable checkpointing ( 100 ) ; env set restart strategy ( restart strategies fixed delay restart ( 1 , 0l ) ) ; final list < file > partition files = new array list < > ( parallelism ) ; for ( int i = 0 ; i < parallelism ; + + i ) { file partition file = temporary folder new file ( ) ; partition files add ( i , partition file ) ; } env add source ( new random tuple source ( num events per instance , num unique keys ) ) key by ( 0 ) add sink ( new to partition file sink ( partition files ) ) ; env execute ( ) ; data stream < tuple 2 < integer , integer > > source = env add source ( new from partition file source ( partition files ) ) assign timestamps and watermarks ( ingestion time watermark strategy create ( ) ) ; data stream utils reinterpret as keyed stream ( source , ( key selector < tuple 2 < integer , integer > , integer > ) value - > value f 0 , type information of ( integer class ) ) window ( tumbling event time windows of ( time seconds ( 1 ) ) ) / / test that also timers and aggregated state work as / / expected reduce ( ( reduce function < tuple 2 < integer , integer > > ) ( value 1 , value 2 ) - > new tuple 2 < > ( value 1 f 0 , value 1 f 1 + value 2 f 1 ) ) add sink ( new validating sink ( num total events ) ) set parallelism ( 1 ) ; env execute ( ) ; }


set the value of the < code > name < code > property to a < code > double < code >

public void set double ( string name , double value ) { set ( name , double to string ( value ) ) ; }


return location ( owner ) of specified item owner is the next entry on the hash ring ( with a hash value & gt ; hash value of item )

public string get location ( string item ) { read lock lock ( ) ; try { if ( ring is empty ( ) ) { return null ; } string hash = get hash ( item ) ; if ( ! ring contains key ( hash ) ) { sorted map < string , string > tail map = ring tail map ( hash ) ; hash = tail map is empty ( ) ? ring first key ( ) : tail map first key ( ) ; } string virtual node = ring get ( hash ) ; int index = virtual node last index of ( separator ) ; if ( index > = 0 ) { return virtual node substring ( 0 , index ) ; } else { return virtual node ; } } finally { read lock unlock ( ) ; } }


to display the accumulator for the ad position

public final int at ad pos ( final int pos ) { final int take int = ( int ) math floor ( ( pos + 1 ) / adfrequency ) ; log d ( " at ad pos e 2 " , take int + " " ) ; return take int ; }


format url template using given variables

public string url ( map < string , string > variables ) { string url = this url ; / / go through variables and replace placeholders for ( map entry < string , server variable > variable : this variables entry set ( ) ) { string name = variable get key ( ) ; server variable server variable = variable get value ( ) ; string value = server variable default value ; if ( variables ! = null & & variables contains key ( name ) ) { value = variables get ( name ) ; if ( server variable enum values size ( ) > 0 & & ! server variable enum values contains ( value ) ) { throw new runtime exception ( " the variable " + name + " in the server url has invalid value " + value + " " ) ; } } url = url replace all ( " \ \ { " + name + " \ \ } " , value ) ; } return url ; }


raw ( no need to be html escaped ) content


set a custom host name for the target service

public api client set host ( string host ) { this host = host ; return this ; }


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


public static debug info entry read ( binary reader reader , d w a r f compilation unit unit , d w a r f attribute factory attribute factory ) throws i o exception { long offset = reader get pointer index ( ) ; int abbreviation code = leb128 decode 3 2u ( reader ) ; / / check for terminator die if ( abbreviation code = = 0 ) { return new debug info entry ( unit , offset , null ) ; } d w a r f abbreviation abbreviation = unit get code to abbreviation map ( ) get ( abbreviation code ) ; if ( abbreviation = = null ) { throw new i o exception ( " abbreviation code " + abbreviation code + " not found in the abbreviation map for compunit " + unit ) ; } debug info entry result = new debug info entry ( unit , offset , abbreviation ) ; / / read in all of the attribute values based on the attribute specification d w a r f attribute specification [ ] attribute specs = result abbreviation get attributes ( ) ; for ( int i = 0 ; i < attribute specs length ; i + + ) { d w a r f attribute specification attribute spec = attribute specs [ i ] ; result attributes [ i ] = attribute factory read ( reader , unit , attribute spec get attribute form ( ) ) ; } return result ; }


https : jira spring iobrowse s p r - 2788

public void as body tag with no errors and existing messages attribute in request scope are not clobbered ( ) throws exception { assert when no errors existing messages in scope are not clobbered ( page context request scope ) ; }


transforms the obfuscated frame into one or more original frames , if the frame contains information about a method that can be remapped

private void transform method info ( frame info obfuscated frame , string original class name , list < frame info > original method frames ) { / / class name - > obfuscated method names map < string , set < method info > > method map = class method map get ( original class name ) ; if ( method map ! = null ) { / / obfuscated method names - > methods string obfuscated method name = obfuscated frame get method name ( ) ; set < method info > method set = method map get ( obfuscated method name ) ; if ( method set ! = null ) { int obfuscated line number = obfuscated frame get line number ( ) ; string obfuscated type = obfuscated frame get type ( ) ; string original type = obfuscated type = = null ? null : original type ( obfuscated type ) ; string obfuscated arguments = obfuscated frame get arguments ( ) ; string original arguments = obfuscated arguments = = null ? null : original arguments ( obfuscated arguments ) ; / / find all matching methods iterator < method info > method info iterator = method set iterator ( ) ; while ( method info iterator has next ( ) ) { method info method info = method info iterator next ( ) ; if ( method info matches ( obfuscated line number , original type , original arguments ) ) { / / do we have a different original first line number ? / / we ' re allowing unknown values , represented as 0 int line number = obfuscated frame get line number ( ) ; if ( method info original first line number ! = method info obfuscated first line number ) { / / do we have an original line number range and / / sufficient information to shift the line number ? line number = method info original last line number ! = 0 & & method info original last line number ! = method info original first line number & & method info obfuscated first line number ! = 0 & & line number ! = 0 ? method info original first line number - method info obfuscated first line number + line number : method info original first line number ; } original method frames add ( new frame info ( method info original class name , source file name ( method info original class name ) , line number , method info original type , obfuscated frame get field name ( ) , method info original name , method info original arguments ) ) ; } } } } }


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


protected authentication handler execution result create result ( final client credential credentials , final common profile profile , final base client client ) throws general security exception { if ( profile = = null ) { throw new failed login exception ( " authentication did not produce a user profile for : " + credentials ) ; } val id = determine principal id from ( profile , client ) ; if ( string utils is blank ( id ) ) { throw new failed login exception ( " no identifier found for this user profile : " + profile ) ; } credentials set user profile ( profile ) ; credentials set typed id used ( is typed id used ) ; val attributes = core authentication utils convert attribute values to multi valued objects ( profile get attributes ( ) ) ; val principal = this principal factory create principal ( id , attributes ) ; logger debug ( " constructed authenticated principal [ { } ] based on user profile [ { } ] " , principal , profile ) ; return finalize authentication handler result ( credentials , principal , profile , client ) ; }


throws { @ link illegal argument exception } if builder args are incompleteinconsistent

protected void validate ( ) { if ( starlark semantics = = null ) { throw new illegal argument exception ( " must call either set starlark semantics or use default starlark semantics " ) ; } }


fix the problem of topping the scroll view nested list view grid view web view recycler view

public static void fix scroll view topping ( view view ) { view set focusable ( false ) ; view group view group = null ; if ( view instanceof view group ) { view group = ( view group ) view ; } if ( view group = = null ) { return ; } for ( int i = 0 , n = view group get child count ( ) ; i < n ; i + + ) { view child at = view group get child at ( i ) ; child at set focusable ( false ) ; if ( child at instanceof view group ) { fix scroll view topping ( child at ) ; } } }


test request scoped caching with a mixture of commands

public void test no request cache 3 ( ) { final test collapser timer timer = new test collapser timer ( ) ; successful cacheable collapsed command command 1 = new successful cacheable collapsed command ( timer , " a " , false ) ; successful cacheable collapsed command command 2 = new successful cacheable collapsed command ( timer , " b " , false ) ; successful cacheable collapsed command command 3 = new successful cacheable collapsed command ( timer , " b " , false ) ; future < string > f 1 = command 1 queue ( ) ; future < string > f 2 = command 2 queue ( ) ; future < string > f 3 = command 3 queue ( ) ; / / increment past batch time so it executes timer increment time ( 15 ) ; try { assert equals ( " a " , f 1 get ( 1000 , time unit milliseconds ) ) ; assert equals ( " b " , f 2 get ( 1000 , time unit milliseconds ) ) ; assert equals ( " b " , f 3 get ( 1000 , time unit milliseconds ) ) ; } catch ( exception e ) { throw new runtime exception ( e ) ; } future < string > f 4 = command 1 queue ( ) ; future < string > f 5 = command 2 queue ( ) ; future < string > f 6 = command 3 queue ( ) ; / / increment past batch time so it executes timer increment time ( 15 ) ; try { assert equals ( " a " , f 4 get ( 1000 , time unit milliseconds ) ) ; assert equals ( " b " , f 5 get ( 1000 , time unit milliseconds ) ) ; assert equals ( " b " , f 6 get ( 1000 , time unit milliseconds ) ) ; } catch ( exception e ) { throw new runtime exception ( e ) ; } / / request caching is turned off on this so we expect 2 command executions assert equals ( 2 , hystrix request log get current request ( ) get all executed commands ( ) size ( ) ) ; / / we expect to see it with success and collapsed and both hystrix invokable info < ? > command a = hystrix request log get current request ( ) get all executed commands ( ) to array ( new hystrix invokable info < ? > [ 2 ] ) [ 0 ] ; assert equals ( 2 , command a get execution events ( ) size ( ) ) ; assert true ( command a get execution events ( ) contains ( hystrix event type success ) ) ; assert true ( command a get execution events ( ) contains ( hystrix event type collapsed ) ) ; / / we expect to see it with success and collapsed and both hystrix invokable info < ? > command b = hystrix request log get current request ( ) get all executed commands ( ) to array ( new hystrix invokable info < ? > [ 2 ] ) [ 1 ] ; assert equals ( 2 , command b get execution events ( ) size ( ) ) ; assert true ( command b get execution events ( ) contains ( hystrix event type success ) ) ; assert true ( command b get execution events ( ) contains ( hystrix event type collapsed ) ) ; iterator < hystrix invokable info < ? > > cmd iterator = hystrix request log get current request ( ) get all executed commands ( ) iterator ( ) ; assert equals ( 2 , cmd iterator next ( ) get number collapsed ( ) ) ; / / 1 for a , 1 for b batch contains only unique arguments ( no duplicates ) assert equals ( 2 , cmd iterator next ( ) get number collapsed ( ) ) ; / / 1 for a , 1 for b batch contains only unique arguments ( no duplicates ) }


determines the parameter injection of the initialization method

private object look up ( class < ? > type ) { jenkins j = jenkins get ( ) ; assert j ! = null : " this method is only invoked after the jenkins singleton instance has been set " ; if ( type = = jenkins class | | type = = hudson class ) return j ; injector i = j get injector ( ) ; if ( i ! = null ) return i get instance ( type ) ; throw new illegal argument exception ( " unable to inject " + type ) ; }


public void prefix boolean test ( ) { / / todo : test prefix boolean }


commit an individual { @ link source record } when the callback from the producer client is received this method is also called when a record is filtered by a transformation , and thus will never be ack ' d by a broker this is an alias for { @ link # commit record ( source record , record metadata ) } for backwards compatibility the default implementation of { @ link # commit record ( source record , record metadata ) } just calls this method it is not necessary to override both methods source tasks are not required to implement this functionality ; kafka connect will record offsets automatically this hook is provided for systems that also need to store offsets internally in their own system

public void commit record ( source record record ) throws interrupted exception { / / this space intentionally left blank }


delete purchase order by id for valid response try integer i ds with value & lt ; 1000 anything above 1000 or nonintegers will generate api errors

public void delete order test ( ) throws api exception { / / string order id = null ; / / api delete order ( order id ) ; / / todo : test validations }


creates a table that uses the specified backing map and factory it can generate a table based on arbitrary { @ link map } classes the { @ code factory } - generated and { @ code backing map } classes determine the table iteration order however , the table ' s { @ code row ( ) } method returns instances of a different class than { @ code factory get ( ) } does call this method only when the simpler factory methods in classes like { @ link hash based table } and { @ link tree based table } won ' t suffice the views returned by the { @ code table } methods { @ link table # column } , { @ link table # column key set } , and { @ link table # column map } have iterators that don ' t support { @ code remove ( ) } otherwise , all optional operations are supported null row keys , columns keys , and values are not supported lookups by row key are often faster than lookups by column key , because the data is stored in a { @ code map < r , map < c , v > > } a method call like { @ code column ( column key ) get ( row key ) } still runs quickly , since the row key is provided however , { @ code column ( column key ) size ( ) } takes longer , since an iteration across all row keys occurs note that this implementation is not synchronized if multiple threads access this table concurrently and one of the threads modifies the table , it must be synchronized externally the table is serializable if { @ code backing map } , { @ code factory } , the maps generated by { @ code factory } , and the table contents are all serializable note : the table assumes complete ownership over of { @ code backing map } and the maps returned by { @ code factory } those objects should not be manually updated and they should not use soft , weak , or phantom references

public static < r , c , v > table < r , c , v > new custom table ( map < r , map < c , v > > backing map , supplier < ? extends map < c , v > > factory ) { check argument ( backing map is empty ( ) ) ; check not null ( factory ) ; / / todo ( jlevy ) : wrap factory to validate that the supplied maps are empty ? return new standard table < > ( backing map , factory ) ; }


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


similar to { @ link # cardinality ( string , int , int , string ) } , but determines only the maximum cardinality ( the minimum cardinality is 0 )

public static abstract constraint max cardinality ( string scope , int max cardinality , string allocation tags ) { return cardinality ( scope , 0 , max cardinality , allocation tags ) ; }


return a { @ code request predicate } that matches if request ' s http method is { @ code get } and the given { @ code pattern } matches against the request path

public static request predicate get ( string pattern ) { return method ( http method get ) and ( path ( pattern ) ) ; }


obtain a connection using the given properties template method to be implemented by subclasses

protected abstract connection get connection from driver ( properties props ) throws s q l exception ;


verifies that { @ code key } and { @ code value } are non - null , and returns a new immutable entry with those values a call to { @ link entry # set value } on the returned entry will always throw { @ link unsupported operation exception }

static < k , v > entry < k , v > entry of ( k key , v value ) { check entry not null ( key , value ) ; return new abstract map simple immutable entry < > ( key , value ) ; }


public void logout user test ( ) throws api exception { api logout user ( ) ; / / todo : test validations }


searches for the property with the specified key in this property list if the key is not found in this property list , the default property list , and its defaults , recursively , are then checked the method returns the default value argument if the property is not found

public boolean get boolean ( string key , boolean default value ) { string argument = get property ( key , null ) ; return argument = = null ? default value : boolean parse boolean ( argument ) ; }


starts the actual compact tree layout algorithm at the given node

protected void layout ( tree node node ) { if ( node ! = null ) { tree node child = node child ; while ( child ! = null ) { layout ( child ) ; child = child next ; } if ( node child ! = null ) { attach parent ( node , join ( node ) ) ; } else { layout leaf ( node ) ; } } }


return a resource representation of this multipart file this can be used as input to the { @ code rest template } or the { @ code web client } to expose content length and the filename along with the input stream

default resource get resource ( ) { return new multipart file resource ( this ) ; }


attempts to retrieve the { @ code object name } via the given key , trying to find a mapped value in the mappings first

public object name get object name ( object managed bean , @ nullable string bean key ) throws malformed object name exception { assert not null ( bean key , " key naming strategy requires bean key " ) ; string object name = null ; if ( this merged mappings ! = null ) { object name = this merged mappings get property ( bean key ) ; } if ( object name = = null ) { object name = bean key ; } return object name manager get instance ( object name ) ; }


set the message converters to use this is delegated to { @ link standalone mock mvc builder # set message converters ( http message converter [ ] ) }

controller spec message converters ( http message converter < ? > message converters ) ;


creates a bitmap from subset of the source bitmap , transformed by the optional matrix it is initialized with the same density as the original bitmap

public closeable reference < bitmap > create bitmap ( bitmap source , int x , int y , int width , int height , @ nullable matrix matrix , boolean filter , @ nullable object caller context ) { preconditions check not null ( source , " source bitmap cannot be null " ) ; check x y sign ( x , y ) ; check width height ( width , height ) ; check final image bounds ( source , x , y , width , height ) ; / / assigned because matrix can modify the final width , height int new width = width ; int new height = height ; canvas canvas ; closeable reference < bitmap > bitmap ref ; paint paint ; rect src rectangle = new rect ( x , y , x + width , y + height ) ; rect f dst rectangle = new rect f ( 0 , 0 , width , height ) ; bitmap config new config = get suitable bitmap config ( source ) ; if ( matrix = = null | | matrix is identity ( ) ) { bitmap ref = create bitmap ( new width , new height , new config , source has alpha ( ) , caller context ) ; set property from source bitmap ( source , bitmap ref get ( ) ) ; canvas = new canvas ( bitmap ref get ( ) ) ; paint = null ; / / not needed } else { boolean transformed = ! matrix rect stays rect ( ) ; rect f device rectangle = new rect f ( ) ; matrix map rect ( device rectangle , dst rectangle ) ; new width = math round ( device rectangle width ( ) ) ; new height = math round ( device rectangle height ( ) ) ; bitmap ref = create bitmap ( new width , new height , transformed ? bitmap config argb 8888 : new config , transformed | | source has alpha ( ) , caller context ) ; set property from source bitmap ( source , bitmap ref get ( ) ) ; canvas = new canvas ( bitmap ref get ( ) ) ; canvas translate ( - device rectangle left , - device rectangle top ) ; canvas concat ( matrix ) ; paint = new paint ( ) ; paint set filter bitmap ( filter ) ; if ( transformed ) { paint set anti alias ( true ) ; } } canvas draw bitmap ( source , src rectangle , dst rectangle , paint ) ; canvas set bitmap ( null ) ; return bitmap ref ; }


constructs a { @ code linked hash multimap } with the same mappings as the specified multimap if a key - value mapping appears multiple times in the input multimap , it only appears once in the constructed multimap the new multimap has the same { @ link multimap # entries ( ) } iteration order as the input multimap , except for excluding duplicate mappings

public static < k , v > linked hash multimap < k , v > create ( multimap < ? extends k , ? extends v > multimap ) { linked hash multimap < k , v > result = create ( multimap key set ( ) size ( ) , default value set capacity ) ; result put all ( multimap ) ; return result ; }


creates a flink { @ link input format } that wraps the given hadoop { @ link org apache hadoop mapreduce input format }

public static < k , v > org apache flink api java hadoop mapreduce hadoop input format < k , v > create hadoop input ( org apache hadoop mapreduce input format < k , v > mapreduce input format , class < k > key , class < v > value , job job ) { return new org apache flink api java hadoop mapreduce hadoop input format < > ( mapreduce input format , key , value , job ) ; }


the sink node making the request < code > istio mcp v 1alpha 1 sink node sink node = 2 ; < code >

public builder set sink node ( com alibaba nacos istio model mcp sink node builder builder for value ) { if ( sink node builder = = null ) { sink node = builder for value build ( ) ; on changed ( ) ; } else { sink node builder set message ( builder for value build ( ) ) ; } return this ; }


static int convert buffer to int ( byte [ ] buf ) { return ( ( buf [ 0 ] & 0xff ) + ( ( buf [ 1 ] & 0xff ) < < 8 ) + ( ( buf [ 2 ] & 0xff ) < < 16 ) + ( ( buf [ 3 ] & 0xff ) < < 24 ) ) ; }


public string to string ( ) { return integer to hex string ( address ) + " " + disposition + " " + spec ; }


returns the value of the { @ code sec - web socket - accept } header

public string get sec web socket accept ( ) { return get first ( sec websocket accept ) ; }


method creates a filename to store the service

public string build ( final registered service service , final string extension ) { return string utils remove ( service get name ( ) , ' ' ) + ' - ' + service get id ( ) + ' ' + extension ; }


reads the entire { @ link readable buffer } to a new { @ link string } with the given charset

public static string read as string ( readable buffer buffer , charset charset ) { preconditions check not null ( charset , " charset " ) ; byte [ ] bytes = read array ( buffer ) ; return new string ( bytes , charset ) ; }


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


protected abstract s 3 a committer create committer ( task attempt context context ) throws i o exception { return create committer ( get out dir ( ) , context ) ; }


returns the sha256 digest for the setting ' s value , even after { @ code # close ( ) } has been called the setting must exist the digest is used to check for value changes without actually storing the value

public byte [ ] get s h a 2 5 6 digest ( string setting ) { assert entries get ( ) ! = null : " keystore is not loaded " ; entry entry = entries get ( ) get ( setting ) ; return entry sha 2 5 6 digest ; }


creates an { @ code array list } instance to hold { @ code estimated size } elements , plus an unspecified amount of padding ; you almost certainly mean to call { @ link # new array list with capacity } ( see that method for further advice on usage ) < b > note : < b > this method will soon be deprecated even in the rare case that you do want some amount of padding , it ' s best if you choose your desired amount explicitly

public static < e > array list < e > new array list with expected size ( int estimated size ) { return new array list < > ( compute array list capacity ( estimated size ) ) ; } / / linked list


check whether the service monitors the given job

public boolean contains job ( job i d job id ) { preconditions check state ( default job leader service state started = = state , " the service is currently not running " ) ; return job leader services contains key ( job id ) ; }


test that after renaming , the nested file is moved along with all its ancestors it is similar to { @ link # test rename populates directory ancestors }

public void test rename populates file ancestors ( ) throws i o exception { final file system fs = get file system ( ) ; final path src = path ( " test rename populates file ancestors / source " ) ; fs mkdirs ( src ) ; final string nested file = " / dir 1 / dir 2 / dir 3 / file 4 " ; byte [ ] src dataset = dataset ( 256 , ' a ' , ' z ' ) ; write dataset ( fs , path ( src + nested file ) , src dataset , src dataset length , 1024 , false ) ; path dst = path ( " test rename populates file ancestors new " ) ; fs rename ( src , dst ) ; validate ancestors moved ( src , dst , nested file ) ; }


remove the property value at the given address

public boolean remove ( address addr ) { return property mgr remove ( addr map get key ( addr ) ) ; }


returns the type of the h 265 nal unit in { @ code data } that starts at { @ code offset }

public static int get h 2 6 5 nal unit type ( byte [ ] data , int offset ) { return ( data [ offset + 3 ] & 0x 7 e ) > > 1 ; }


sets the current collector which is used to emit the final result

public void set collector ( collector < t > collector ) { this collector = collector ; }


read encrypted private key file content with default pass phrase

public static private key read encrypted private key ( byte [ ] file contents ) { return read encrypted private key ( file contents , default pass phrase , false ) ; }


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


sets the adapter result of the current lookup

< t > void adapter found ( json adapter < t > result ) { lookup < t > current lookup = ( lookup < t > ) stack get last ( ) ; current lookup adapter = result ; }


the body type : static , kinematic , or dynamic note : if a dynamic body would have zero mass , the mass is set to one

public body type get type ( ) { return type ; }


verifies the class is loaded by the right classloader

public static void check class loader ( class cls , boolean should be loaded by app class loader ) { boolean loaded by app class loader = cls get class loader ( ) instanceof application class loader ; if ( ( should be loaded by app class loader & & ! loaded by app class loader ) | | ( ! should be loaded by app class loader & & loaded by app class loader ) ) { throw new runtime exception ( " incorrect classloader used " ) ; } }


returns true if the raw value of this { @ link cookie } , was wrapped with double quotes in original set - cookie header


sleeps until the given time has elapsed throws assertion failed error if interrupted

void sleep ( long millis ) { try { delay ( millis ) ; } catch ( interrupted exception ie ) { assertion failed error afe = new assertion failed error ( " unexpected interrupted exception " ) ; afe init cause ( ie ) ; throw afe ; } }


only for histogram order : backwards compatibility logic to write a { @ link bucket order } to a stream

public static void write histogram order ( bucket order order , stream output out ) throws i o exception { order write to ( out ) ; }


applies the given window function to each window the window function is called for each evaluation of the window the output of the window function is interpreted as a regular non - windowed stream note that this function requires that all data in the windows is buffered until the window is evaluated , as the function provides no means of incremental aggregation

public < r > single output stream operator < r > process ( process all window function < t , r , w > function , type information < r > result type ) { string call location = utils get call location name ( ) ; function = input get execution environment ( ) clean ( function ) ; return apply ( new internal iterable process all window function < > ( function ) , result type , call location ) ; }


updated user this can only be done by the logged in user

public void update user test ( ) throws api exception { string username = null ; user body = null ; api update user ( username , body ) ; / / todo : test validations }


public long get bytes to copy ( ) { return bytes to copy ; }


returns all { @ link option definition } objects loaded , mapped by their canonical names entries appear ordered first by their options class ( the order in which they were passed to { @ link # from ( collection ) } , and then in alphabetic order within each options class

public iterable < map entry < string , option definition > > get all option definitions ( ) { return name to field entry set ( ) ; }


return the cache operations for this method , or { @ code null } if the method contains no jsr - 107 related metadata

j cache operation < ? > get cache operation ( method method , @ nullable class < ? > target class ) ;


returns the field ' s content using the specified field name note : the row must operate in name - based field mode this method avoids a lot of manual casting in the user implementation

public < t > t get field as ( string name ) { return ( t ) get field ( name ) ; }


get the sources of the other symbols not in a function scope

public source type [ ] get other symbol sources ( ) { return other symbol sources ; }


schedules a task to occur once after the specified delay and then repeatedly at the specified interval until cancelled

public task schedule task ( task task , float delay seconds , float interval seconds ) { return schedule task ( task , delay seconds , interval seconds , - 1 ) ; }


writes the ' { @ code input } ' tag to the supplied { @ link tag writer } uses the value returned by { @ link # get type ( ) } to determine which type of ' { @ code input } ' element to render

protected int write tag content ( tag writer tag writer ) throws jsp exception { tag writer start tag ( " input " ) ; write default attributes ( tag writer ) ; map < string , object > attributes = get dynamic attributes ( ) ; if ( attributes = = null | | ! attributes contains key ( " type " ) ) { tag writer write attribute ( " type " , get type ( ) ) ; } write value ( tag writer ) ; / / custom optional attributes write optional attribute ( tag writer , size attribute , get size ( ) ) ; write optional attribute ( tag writer , maxlength attribute , get maxlength ( ) ) ; write optional attribute ( tag writer , alt attribute , get alt ( ) ) ; write optional attribute ( tag writer , onselect attribute , get onselect ( ) ) ; write optional attribute ( tag writer , autocomplete attribute , get autocomplete ( ) ) ; tag writer end tag ( ) ; return skip body ; }


/ * package * / void set new data type ( data type data type ) { new data type = data type ; }


appends the contents of this source to the given { @ link appendable } ( such as a { @ link writer } ) does not close { @ code appendable } if it is { @ code closeable }

public long copy to ( appendable appendable ) throws i o exception { check not null ( appendable ) ; closer closer = closer create ( ) ; try { reader reader = closer register ( open stream ( ) ) ; return char streams copy ( reader , appendable ) ; } catch ( throwable e ) { throw closer rethrow ( e ) ; } finally { closer close ( ) ; } }


load layout version from root element in the xml configuration file

private int load layout version ( element root ) { int layout version ; text text = ( text ) root get elements by tag name ( " layoutversion " ) item ( 0 ) get first child ( ) ; if ( text ! = null ) { string value = text get data ( ) trim ( ) ; try { layout version = integer parse int ( value ) ; } catch ( number format exception e ) { throw new illegal argument exception ( " bad layout version value " + value + " is found it should be an integer " ) ; } } else { throw new illegal argument exception ( " value of < layout version > is null " ) ; } return layout version ; }


test { @ link r m audit logger } with ip set

public void test r m audit logger with i p ( ) throws exception { configuration conf = new configuration ( ) ; rpc set protocol engine ( conf , test rpc service class , protobuf rpc engine 2 class ) ; / / create server side implementation my test r p c server server impl = new my test r p c server ( ) ; blocking service service = test rpc service protos test protobuf rpc proto new reflective blocking service ( server impl ) ; / / start the ipc server server server = new rpc builder ( conf ) set protocol ( test rpc service class ) set instance ( service ) set bind address ( " 0 0 0 0 " ) set port ( 0 ) set num handlers ( 5 ) set verbose ( true ) build ( ) ; server start ( ) ; inet socket address addr = net utils get connect address ( server ) ; / / make a client connection and test the audit log test rpc service proxy = rpc get proxy ( test rpc service class , test protocol version i d , addr , conf ) ; / / start the testcase test protos empty request proto ping request = test protos empty request proto new builder ( ) build ( ) ; proxy ping ( null , ping request ) ; server stop ( ) ; rpc stop proxy ( proxy ) ; }


requests a slot with the respective resource profile

default boolean register slot request ( slot request slot request ) throws resource manager exception { throw new unsupported operation exception ( ) ; }


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


public list < integer > get namespace array ( ) { return namespace array ; }


configure path prefixes to apply to controller methods prefixes are used to enrich the mappings of every { @ code @ request mapping } method whose controller type is matched by a corresponding { @ code predicate } in the map the prefix for the first matching predicate is used , assuming the input map has predictable order consider using { @ link org springframework web method handler type predicate handler type predicate } to group controllers

public void set path prefixes ( map < string , predicate < class < ? > > > prefixes ) { this path prefixes clear ( ) ; prefixes entry set ( ) stream ( ) filter ( entry - > string utils has text ( entry get key ( ) ) ) for each ( entry - > this path prefixes put ( entry get key ( ) , entry get value ( ) ) ) ; }


test nn restart if a failure happens in between creating the fsimage md5 file and renaming the fsimage

public void test failure before rename ( ) throws i o exception { configuration conf = new hdfs configuration ( ) ; f s data output stream fos = null ; secondary name node secondary = null ; mini d f s cluster cluster = null ; file system fs = null ; try { cluster = new mini d f s cluster builder ( conf ) num data nodes ( num datanodes ) build ( ) ; cluster wait active ( ) ; fs = cluster get file system ( ) ; secondary = start secondary name node ( conf ) ; fos = fs create ( new path ( " tmpfile 0 " ) ) ; fos write ( new byte [ ] { 0 , 1 , 2 , 3 } ) ; secondary do checkpoint ( ) ; fos write ( new byte [ ] { 0 , 1 , 2 , 3 } ) ; fos hsync ( ) ; / / cause merge to fail in next checkpoint mockito do throw ( new i o exception ( " injecting failure after m d 5 rename " ) ) when ( fault injector ) after m d 5 rename ( ) ; try { secondary do checkpoint ( ) ; fail ( " fault injection failed " ) ; } catch ( i o exception ioe ) { / / this is expected } mockito reset ( fault injector ) ; / / namenode should still restart successfully cluster restart name node ( ) ; } finally { if ( fs ! = null ) { fs close ( ) ; } cleanup ( secondary ) ; secondary = null ; cleanup ( cluster ) ; cluster = null ; mockito reset ( fault injector ) ; } }