public void run test name node ports ( boolean with service ) throws exception { name node nn = null ; try { nn = start name node ( with service ) ; / / start another namenode on the same port configuration conf 2 = new hdfs configuration ( config ) ; conf 2 set ( d f s config keys dfs namenode name dir key , file as u r i ( new file ( hdfs dir , " name 2 " ) ) to string ( ) ) ; d f s test util format name node ( conf 2 ) ; boolean started = can start name node ( conf 2 ) ; assert false ( started ) ; / / should fail / / start on a different main port file system set default uri ( conf 2 , " hdfs : / / " + this host ) ; started = can start name node ( conf 2 ) ; assert false ( started ) ; / / should fail again / / reset conf 2 since name node modifies it file system set default uri ( conf 2 , " hdfs : / / " + this host ) ; / / different http port conf 2 set ( d f s config keys dfs namenode http address key , this host ) ; started = can start name node ( conf 2 ) ; if ( with service ) { assert false ( " should ' ve failed on service port " , started ) ; / / reset conf 2 since name node modifies it file system set default uri ( conf 2 , " hdfs : / / " + this host ) ; conf 2 set ( d f s config keys dfs namenode http address key , this host ) ; / / set service address conf 2 set ( d f s config keys dfs namenode service rpc address key , this host ) ; started = can start name node ( conf 2 ) ; } assert true ( started ) ; } finally { stop name node ( nn ) ; } }


public void remove ( int value ) { int index = ints index of ( value ) ; if ( index > = 0 ) { ints remove index ( index ) ; } }


public static bitmap to round corner ( final bitmap src , final float radius , @ float range ( from = 0 ) float border size , @ color int int border color , final boolean recycle ) { float [ ] radii = { radius , radius , radius , radius , radius , radius , radius , radius } ; return to round corner ( src , radii , border size , border color , recycle ) ; }


write a file and read it in , validating the result optional flags control whether file overwrite operations should be enabled , and whether the file should be deleted afterwards if there is a mismatch between what was written and what was expected , a small range of bytes either side of the first error are logged to aid diagnosing what problem occurred - whether it was a previous file or a corrupting of the current file this assumes that two sequential runs to the same path use datasets with different character moduli

protected void write and read ( path path , byte [ ] src , int len , boolean overwrite , boolean delete ) throws i o exception { assert true ( " not enough data in source array to write " + len + " bytes " , src length > = len ) ; fs mkdirs ( path get parent ( ) ) ; f s data output stream out = fs create ( path , overwrite , fs get conf ( ) get int ( " io file buffer size " , 4096 ) , ( short ) 1 , get block size ( ) ) ; out write ( src , 0 , len ) ; out close ( ) ; assert true ( " exists " , fs exists ( path ) ) ; assert equals ( " length " , len , fs get file status ( path ) get len ( ) ) ; f s data input stream in = fs open ( path ) ; byte [ ] buf = new byte [ len ] ; in read fully ( 0 , buf ) ; in close ( ) ; assert equals ( len , buf length ) ; int errors = 0 ; int first error byte = - 1 ; for ( int i = 0 ; i < len ; i + + ) { if ( src [ i ] ! = buf [ i ] ) { if ( errors = = 0 ) { first error byte = i ; } errors + + ; } } if ( errors > 0 ) { string message = string format ( " % d errors in file of length % d " , errors , len ) ; log warn ( message ) ; / / the range either side of the first error to print / / this is a purely arbitrary number , to aid user debugging final int overlap = 10 ; for ( int i = math max ( 0 , first error byte - overlap ) ; i < math min ( first error byte + overlap , len ) ; i + + ) { byte actual = buf [ i ] ; byte expected = src [ i ] ; string letter = to char ( actual ) ; string line = string format ( " [ % 0 4d ] % 2x % s \ n " , i , actual , letter ) ; if ( expected ! = actual ) { line = string format ( " [ % 0 4d ] % 2x % s - expected % 2x % s \ n " , i , actual , letter , expected , to char ( expected ) ) ; } log warn ( line ) ; } fail ( message ) ; } if ( delete ) { boolean deleted = fs delete ( path , false ) ; assert true ( " deleted " , deleted ) ; assert false ( " no longer exists " , fs exists ( path ) ) ; } }


prepare a response for a request matching the provided matcher if the matcher does not match , { @ link kafka client # send ( client request , long ) } will throw illegal state exception

public void prepare response ( request matcher matcher , abstract response response ) { prepare response ( matcher , response , false ) ; }


handle refresh event when issued by the cloud bus

public void handle refresh event ( final refresh remote application event event ) { logger trace ( " received event [ { } ] " , event ) ; configuration properties environment manager rebind cas configuration properties ( this application context ) ; }


public prop groups view model something else ( int something else ) { assigned attributes epoxy generated model set ( 3 ) ; assigned attributes epoxy generated model clear ( 2 ) ; this something else char sequence = null ; on mutation ( ) ; this something else int = something else ; return this ; }


the unsigned high bytes and low bytes items of the constant long info structure together represent the value of the long constant ( ( long ) high bytes < < 32 ) + low bytes where the bytes of each of high bytes and low bytes are stored in big - endian ( high byte first ) order

public long get value ( ) { return ( ( ( long ) high bytes ) < < 32 ) + ( low bytes & 0xffffffff l ) ; }


specify whether to copy a byte array string into a temporary jdbc blob clob object created through the jdbc 4 0 { @ code create blob } { @ code create clob } methods default is " false " , using the common jdbc 2 0 { @ code set binary stream } { @ code set character stream } method for setting the content switch this to " true " for explicit blob clob creation using jdbc 4 0 this setting affects stream arguments as well as byte array string arguments , requiring jdbc 4 0 support for supporting lob content against jdbc 3 0 , check out the { @ link # set wrap as lob " wrap as lob " } setting

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


set whether or not detailed explanations of analysis should be returned

public analyze request explain ( boolean explain ) { this explain = explain ; return this ; }


retrieve all aggregated sessions for the given range of keys this iterator must be closed after use for each key , the iterator guarantees ordering of sessions , starting from the newestlatest available session to the oldestearliest session

default key value iterator < windowed < k > , agg > backward fetch ( final k from , final k to ) { throw new unsupported operation exception ( " this api is not supported by this implementation of read only session store " ) ; }


compute a vertex ' s predecessors the default implementation computes this from the in - edges note : if a non - default implementation is provided , it ought to return cached results if available

public default collection < v > get predecessors ( v v ) { set < v > result = new linked hash set < > ( ) ; for ( e edge : get in edges ( v ) ) { result add ( edge get start ( ) ) ; } return result ; }


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


actually obtain a r2dbc connection from the given { @ link connection factory } same as { @ link # get connection } , but preserving the original exceptions is aware of a corresponding connection bound to the current { @ link transaction synchronization manager } will bind a connection to the { @ link transaction synchronization manager } if transaction synchronization is active

public static mono < connection > do get connection ( connection factory connection factory ) { assert not null ( connection factory , " connection factory must not be null " ) ; return transaction synchronization manager for current transaction ( ) flat map ( synchronization manager - > { connection holder con holder = ( connection holder ) synchronization manager get resource ( connection factory ) ; if ( con holder ! = null & & ( con holder has connection ( ) | | con holder is synchronized with transaction ( ) ) ) { con holder requested ( ) ; if ( ! con holder has connection ( ) ) { return fetch connection ( connection factory ) do on next ( con holder : : set connection ) ; } return mono just ( con holder get connection ( ) ) ; } / / else we either got no holder or an empty thread - bound holder here mono < connection > con = fetch connection ( connection factory ) ; if ( synchronization manager is synchronization active ( ) ) { return con flat map ( connection - > mono just ( connection ) do on next ( conn - > { / / use same connection for further r2dbc actions within the transaction / / thread - bound object will get removed by synchronization at transaction completion connection holder holder to use = con holder ; if ( holder to use = = null ) { holder to use = new connection holder ( conn ) ; } else { holder to use set connection ( conn ) ; } holder to use requested ( ) ; synchronization manager register synchronization ( new connection synchronization ( holder to use , connection factory ) ) ; holder to use set synchronized with transaction ( true ) ; if ( holder to use ! = con holder ) { synchronization manager bind resource ( connection factory , holder to use ) ; } } ) / / unexpected exception from external delegation call - > close connection and rethrow on error resume ( e - > release connection ( connection , connection factory ) then ( mono error ( e ) ) ) ) ; } return con ; } ) on error resume ( no transaction exception class , e - > mono from ( connection factory create ( ) ) ) ; }


get the number of live in maintenance nodes

public int get num in maintenance live data nodes ( ) { return this in maintenance live data nodes ; }


if the value is an item , this is set < code > optional aapt pb item item = 4 ; < code >


public static void scal ( double a , dense vector x ) { f2j blas dscal ( x data length , a , x data , 1 ) ; }


testing read ahead counters in abfs input stream with 30 seconds timeout

public void test read ahead counters ( ) throws i o exception { describe ( " test to check correct values for read ahead counters in " + " abfs input stream " ) ; azure blob file system fs = get file system ( ) ; azure blob file system store abfss = fs get abfs store ( ) ; path read ahead counters path = path ( get method name ( ) ) ; / * * setting the block size for read ahead as 4kb * / abfss get abfs configuration ( ) set read buffer size ( custom block buffer size ) ; abfs output stream out = null ; abfs input stream in = null ; try { / * * creating a file of 1mb size * / out = create abfs output stream with flush enabled ( fs , read ahead counters path ) ; out write ( def buffer ) ; out close ( ) ; in = abfss open file for read ( read ahead counters path , fs get fs statistics ( ) ) ; / * * reading 1kb after each i * kb positions hence the reads are from 0 * to 1kb , 1kb to 2kb , and so on for 5 operations * / for ( int i = 0 ; i < 5 ; i + + ) { in seek ( one kb * i ) ; in read ( def buffer , one kb * i , one kb ) ; } abfs input stream statistics impl stats = ( abfs input stream statistics impl ) in get stream statistics ( ) ; / * * verifying the counter values of read ahead bytes read and remote bytes read * * read ahead bytes read : since , we read 1 k bs 5 times , that means we go * from 0 to 5kb in the file the buffer size is set to 4kb , and since * we have 8 blocks of read ahead buffer we would have 8 blocks of 4kb * buffer our read is till 5kb , hence read ahead would ideally read 2 * blocks of 4kb which is equal to 8kb but , sometimes to get blocks * from read ahead buffer we might have to wait for background * threads to fill the buffer and hence we might do remote read which * would be faster therefore , read ahead bytes read would be greater than * or equal to the value of bytes from read ahead at the point we measure it * * remote bytes read : since , the buffer size is set to 4kb and the number * of blocks or read ahead queue depth is equal to 8 we would read 8 * 4 * kb buffer on the first read , which is equal to 32kb but , if we are not * able to read some bytes that were in the buffer after doing * read ahead , we might use remote read again thus , the bytes read * remotely would be greater than or equal to the bytes from remote read * value that we measure at some point of the operation * * / assertions assert that ( stats get read ahead bytes read ( ) ) described as ( " mismatch in read ahead bytes read counter value " ) is greater than or equal to ( in get bytes from read ahead ( ) ) ; assertions assert that ( stats get remote bytes read ( ) ) described as ( " mismatch in remote bytes read counter value " ) is greater than or equal to ( in get bytes from remote read ( ) ) ; } finally { i o utils cleanup with logger ( log , out , in ) ; } }


set the given serialized remote invocation as request body the default implementation simply sets the serialized invocation as the http post ' s request body this can be overridden , for example , to write a specific encoding and to potentially set appropriate http request headers

protected void set request body ( http invoker client configuration config , http post http post , byte array output stream baos ) throws i o exception { byte array entity entity = new byte array entity ( baos to byte array ( ) ) ; entity set content type ( get content type ( ) ) ; http post set entity ( entity ) ; }


test to simulate interleaved checkpointing by 2 2 n ns after a storage directory has been taken offline the first will cause the directory to come back online , but it won ' t have any valid contents the second 2nn will then try to perform a checkpoint the nn should not serve up the image or edits from the restored ( empty ) dir

public void test multiple secondary checkpoint ( ) throws i o exception { secondary name node secondary = null ; try { cluster = new mini d f s cluster builder ( config ) num data nodes ( 1 ) manage name dfs dirs ( false ) build ( ) ; cluster wait active ( ) ; secondary = new secondary name node ( config ) ; f s image fs image = cluster get name node ( ) get f s image ( ) ; print storages ( fs image ) ; file system fs = cluster get file system ( ) ; path test path = new path ( " / " , " test " ) ; assert true ( fs mkdirs ( test path ) ) ; print storages ( fs image ) ; / / take name 1 offline invalidate storage ( fs image , immutable set of ( path 1 ) ) ; / / simulate a 2nn beginning a checkpoint , but not finishing this will / / cause name 1 to be restored cluster get name node rpc ( ) roll edit log ( ) ; print storages ( fs image ) ; / / now another 2nn comes along to do a full checkpoint secondary do checkpoint ( ) ; print storages ( fs image ) ; / / the created file should still exist in the in - memory fs state after the / / checkpoint assert true ( " path exists before restart " , fs exists ( test path ) ) ; secondary shutdown ( ) ; / / restart the nn so it reloads the edits from on - disk cluster restart name node ( ) ; / / the created file should still exist after the restart assert true ( " path should still exist after restart " , fs exists ( test path ) ) ; } finally { if ( cluster ! = null ) { cluster shutdown ( ) ; } if ( secondary ! = null ) { secondary shutdown ( ) ; } } }


look up the fs by uri , return a ( cast ) mock wrapper

public static mock s 3 a file system lookup wrapper f s ( configuration conf ) throws i o exception { return ( mock s 3 a file system ) file system get ( output path uri , conf ) ; }


to test \ & quot ; client \ & quot ; model to test \ & quot ; client \ & quot ; model

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


convert the given request object to serialized form , possibly using a { @ link org springframework messaging converter message converter } , apply the given post processor and send the resulting { @ link message } to the given destination , receive the reply and convert its body of the given target class

< t > t convert send and receive ( string destination name , object request , class < t > target class , message post processor request post processor ) throws messaging exception ;


public void zoom in graph ( ) { view zoom in graph ( ) ; }


public long get network bytes read ( ) { refresh if needed ( ) ; return net bytes read ; }


public void set decreasing paint style ( paint style decreasing paint style ) { this m decreasing paint style = decreasing paint style ; }


public void init ( scheduled log executor component log executor , consumer < list < e > > save function , comparator < e > batch update comparator ) { for ( int i = 0 ; i < max threads ; i + + ) { messages stats stats = stats factory create messages stats ( params get stats name prefix ( ) + " queue " + i ) ; tb sql blocking queue < e > queue = new tb sql blocking queue < > ( params , stats ) ; queues add ( queue ) ; queue init ( log executor , save function , batch update comparator , i ) ; } }


get the text preceding the caret in the given field

public string get text before cursor ( j text field where ) { int i = find field ( where ) ; if ( i = = - 1 ) { throw new illegal argument exception ( " " + where ) ; } return state get text before cursor ( i ) ; }


returns the subset of the given list of keep specifications , with matching shrinking flag

private list filtered keep specifications ( list keep specifications , boolean allow shrinking ) { list filtered keep specifications = new array list ( ) ; for ( int index = 0 ; index < keep specifications size ( ) ; index + + ) { keep class specification keep class specification = ( keep class specification ) keep specifications get ( index ) ; if ( keep class specification allow shrinking = = allow shrinking ) { filtered keep specifications add ( keep class specification ) ; } } return filtered keep specifications ; }


private void send log level request ( ) throws hadoop illegal argument exception , exception { switch ( operation ) { case getlevel : do get level ( ) ; break ; case setlevel : do set level ( ) ; break ; default : throw new hadoop illegal argument exception ( " expect either - getlevel or - setlevel " ) ; } }


regression test : " value in cycle depends on error " the mid value will have two parents - - top and cycle error bubbles up from mid to cycle , and we should detect cycle

private void cycle and error in bubble up ( boolean keep going ) throws exception { graph = new deterministic helper deterministic processable graph ( new in memory graph impl ( ) ) ; tester = new graph tester ( ) ; sky key error key = graph tester to sky key ( " error " ) ; sky key cycle key = graph tester to sky key ( " cycle " ) ; sky key mid key = graph tester to sky key ( " mid " ) ; sky key top key = graph tester to sky key ( " top " ) ; tester get or create ( top key ) add dependency ( mid key ) set computed value ( concatenate ) ; tester get or create ( mid key ) add dependency ( error key ) add dependency ( cycle key ) set computed value ( concatenate ) ; / / we need to ensure that cycle value has finished its work , and we have recorded dependencies count down latch cycle finish = new count down latch ( 1 ) ; tester get or create ( cycle key ) set builder ( new chained function ( null , null , cycle finish , false , new string value ( " " ) , immutable set < sky key > of ( mid key ) ) ) ; tester get or create ( error key ) set builder ( new chained function ( null , cycle finish , null , / * wait for exception = * / false , null , immutable set < sky key > of ( ) ) ) ; evaluation result < string value > result = eval ( keep going , immutable set of ( top key ) ) ; assert that evaluation result ( result ) has singleton error that ( top key ) has cycle info that ( ) contains exactly ( new cycle info ( immutable list of ( top key ) , immutable list of ( mid key , cycle key ) ) ) ; }


void set ( int x , byte value ) { row [ x ] = value ; }


performs a selection operation similar to a sql select statement the field expressions can contain complex expressions and aggregations scala example : { @ code tab select ( $ ( " key " ) , $ ( " value " ) avg ( ) plus ( " the average " ) as ( " average " ) ) ; } scala example : { @ code tab select ( $ " key " , $ " value " avg + " the average " as " average " ) }


sets the vertical space between rows when wrap is enabled

public horizontal group wrap space ( float wrap space ) { this wrap space = wrap space ; return this ; }


returns a { @ link internal timer service } that can be used to query current processing time and event time and to set timers an operator can have several timer services , where each has its own namespace serializer timer services are differentiated by the string key that is given when requesting them , if you call this method with the same key multiple times you will get the same timer service instance in subsequent requests timers are always scoped to a key , the currently active key of a keyed stream operation when a timer fires , this key will also be set as the currently active key each timer has attached metadata , the namespace different timer services can have a different namespace type if you don ' t need namespace differentiation you can use { @ link void namespace serializer } as the namespace serializer

public < k , n > internal timer service < n > get internal timer service ( string name , type serializer < n > namespace serializer , triggerable < k , n > triggerable ) { if ( time service manager = = null ) { throw new runtime exception ( " the timer service has not been initialized " ) ; } @ suppress warnings ( " unchecked " ) internal time service manager < k > keyed time service handler = ( internal time service manager < k > ) time service manager ; keyed state backend < k > keyed state backend = get keyed state backend ( ) ; check state ( keyed state backend ! = null , " timers can only be used on keyed operators " ) ; return keyed time service handler get internal timer service ( name , keyed state backend get key serializer ( ) , namespace serializer , triggerable ) ; }


returns the setting value ( as size ) associated with the setting key if it does not exists , returns the default value provided

public byte size value get as bytes size ( string setting , byte size value default value ) throws settings exception { return parse bytes size value ( get ( setting ) , default value , setting ) ; }


gets all possible template paths for a given location

protected string [ ] get modified file location ( string location ) { string [ ] extensions = get file extensions ( ) ; string [ ] result = new string [ extensions length ] ; for ( int i = 0 ; i < extensions length ; i + + ) { string extension = extensions [ i ] ; result [ i ] = string format ( locale root , " % s % s " , get path without extension ( location ) , extension ) ; } return result ; }


removes an event listener for android specific event such as on activity result ( )

public void remove android event listener ( android event listener listener ) { synchronized ( android event listeners ) { android event listeners remove value ( listener , true ) ; } }


returns a highlight object corresponding to the given x - and y - touch positions in pixels

highlight get highlight ( float x , float y ) ;


add mapper ( the last mapper ) that reads input from queue and writes output to the output context

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


returns the list of load strings of this compiled program , in source order

public immutable list < string > get loads ( ) { return loads ; }


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


enables or disables caching of the last successful credentials provider in this chain reusing the last successful credentials provider will typically return credentials faster than searching through the chain

public void set reuse last provider ( boolean b ) { this reuse last provider = b ; }


implements first - edge ( loop entry ) elimination as an optimization during closure operations see antlrantlr 4 # 1398 the optimization is to avoid adding the loop entry config when the exit path can only lead back to the same star loop entry state after popping context at the rule end state ( traversing only epsilon edges , so we ' re still in closure , in this same rule ) we need to detect any state that can reach loop entry on epsilon wo exiting rule we don ' t have to look at follow links , just ensure that all stack tops for config refer to key states in lr rule to verify we are in the right situation we must first check closure is at a star loop entry state generated during lr removal then we check that each stack top of context is a return state from one of these cases : 1 ' not ' expr , ' ( ' type ' ) ' expr the return state points at loop entry state 2 expr op expr the return state is the block end of internal block of ( ) 3 ' between ' expr ' and ' expr the return state of 2nd expr reference that state points at block end of internal block of ( ) 4 expr ' ? ' expr ' : ' expr the return state points at block end , which points at loop entry state if any is true for each stack top , then closure does not add a config to the current config set for edge [ 0 ] , the loop entry branch conditions fail if any context for the current config is : a empty ( we ' d fall out of expr to do a global follow which could even be to some weird spot in expr ) or , b lies outside of expr or , c lies within expr but at a state not the block end state generated during lr removal do we need to evaluate predicates ever in closure for this case ? no predicates , including precedence predicates , are only evaluated when computing a dfa start state i e , only before the lookahead ( but not parser ) consumes a token there are no epsilon edges allowed in lr rule alt blocks or in the " primary " part ( id here ) if closure is in star loop entry state any lookahead operation will have consumed a token as there are no epsilon - paths that lead to star loop entry state we do not have to evaluate predicates therefore if we are in the generated star loop entry state of a lr rule note that when making a prediction starting at that decision point , decision d = 2 , compute - start - state performs closure starting at edges [ 0 ] , edges [ 1 ] emanating from star loop entry state that means it is not performing closure on star loop entry state during compute - start - state how do we know this always gives same prediction answer ? without predicates , loop entry and exit paths are ambiguous upon remaining input + b ( in , say , a + b ) either paths lead to valid parses closure can lead to consuming + immediately or by falling out of this call to expr back into expr and loop back again to star loop entry state to match + b in this special case , we choose the more efficient path , which is to take the bypass path the lookahead language has not changed because closure chooses one path over the other both paths lead to consuming the same remaining input during a lookahead operation if the next token is an operator , lookahead will enter the choice block with operators if it is not , lookahead will exit expr same as if closure had chosen to enter the choice block immediately closure is examining one config ( some loopentrystate , some alt , context ) which means it is considering exactly one alt closure always copies the same alt to any derived configs how do we know this optimization doesn ' t mess up precedence in our parse trees ? looking through expr from left edge of stat only has to confirm that an input , say , a + b + c ; begins with any valid interpretation of an expression the precedence actually doesn ' t matter when making a decision in stat seeing through expr it is only when parsing rule expr that we must use the precedence to get the right interpretation and , hence , parse tree

protected boolean can drop loop entry edge in left recursive rule ( a t n config config ) { if ( turn off lr loop entry branch opt ) return false ; a t n state p = config state ; / / first check to see if we are in star loop entry state generated during / / left - recursion elimination for efficiency , also check if / / the context has an empty stack case if so , it would mean / / global follow so we can ' t perform optimization if ( p get state type ( ) ! = a t n state star loop entry | | ! ( ( star loop entry state ) p ) is precedence decision | | / / are we the special loop entry / exit state ? config context is empty ( ) | | / / if sll wildcard config context has empty path ( ) ) { return false ; } / / require all return states to return back to the same rule / / that p is in int num ctxs = config context size ( ) ; for ( int i = 0 ; i < num ctxs ; i + + ) { / / for each stack context a t n state return state = atn states get ( config context get return state ( i ) ) ; if ( return state rule index ! = p rule index ) return false ; } block start state decision start state = ( block start state ) p transition ( 0 ) target ; int block end state num = decision start state end state state number ; block end state block end state = ( block end state ) atn states get ( block end state num ) ; / / verify that the top of each stack context leads to loop entry / exit / / state through epsilon edges and w / o leaving rule for ( int i = 0 ; i < num ctxs ; i + + ) { / / for each stack context int return state number = config context get return state ( i ) ; a t n state return state = atn states get ( return state number ) ; / / all states must have single outgoing epsilon edge if ( return state get number of transitions ( ) ! = 1 | | ! return state transition ( 0 ) is epsilon ( ) ) { return false ; } / / look for prefix op case like ' not expr ' , ( ' type ' ) ' expr a t n state return state target = return state transition ( 0 ) target ; if ( return state get state type ( ) = = block end & & return state target = = p ) { continue ; } / / look for ' expr op expr ' or case where expr ' s return state is block end / / of ( ) * internal block ; the block end points to loop back / / which points to p but we don ' t need to check that if ( return state = = block end state ) { continue ; } / / look for ternary expr ? expr : expr the return state points at block end , / / which points at loop entry state if ( return state target = = block end state ) { continue ; } / / look for complex prefix ' between expr and expr ' case where 2nd expr ' s / / return state points at block end state of ( ) * internal block if ( return state target get state type ( ) = = block end & & return state target get number of transitions ( ) = = 1 & & return state target transition ( 0 ) is epsilon ( ) & & return state target transition ( 0 ) target = = p ) { continue ; } / / anything else ain ' t conforming return false ; } return true ; }


creates a { @ link leader election driver factory } implemented by zoo keeper

public static zoo keeper leader election driver factory create leader election driver factory ( final curator framework client , final configuration configuration , final string path suffix ) { final string latch path = configuration get string ( high availability options ha zookeeper latch path ) + path suffix ; final string leader path = configuration get string ( high availability options ha zookeeper leader path ) + path suffix ; return new zoo keeper leader election driver factory ( client , latch path , leader path ) ; }


public static list < string > read file 2 list ( final file file ) { return read file 2 list ( file , 0 , 0x 7 f f f f f f f , null ) ; }


runs the given runnable later , buffering the request until the timeout has expired see the header of { @ link abstract swing update manager } for details on the update process

public synchronized void run later ( runnable r ) { this next runnable = r ; update later ( ) ; }


public static string format ( float value , boolean is grouping , int fraction digits ) { return format ( value , is grouping , 1 , fraction digits , true ) ; }


this method walks a tree of c s queue and clones the portion of the state relevant for preemption in temp queue ( s ) it also maintains a pointer to the leaves finally it aggregates pending resources in each queue and rolls it up to higher levels

private temp queue per partition clone queues ( c s queue cur queue , resource partition resource , string partition to look at ) { temp queue per partition ret ; read lock read lock = cur queue get read lock ( ) ; / / acquire a read lock from parent / leaf queue read lock lock ( ) ; try { string queue path = cur queue get queue path ( ) ; queue capacities qc = cur queue get queue capacities ( ) ; float abs cap = qc get absolute capacity ( partition to look at ) ; float abs max cap = qc get absolute maximum capacity ( partition to look at ) ; boolean preemption disabled = cur queue get preemption disabled ( ) ; queue resource quotas queue resource quotas = cur queue get queue resource quotas ( ) ; resource eff min res = queue resource quotas get effective min resource ( partition to look at ) ; resource eff max res = queue resource quotas get effective max resource ( partition to look at ) ; resource current = resources clone ( cur queue get queue resource usage ( ) get used ( partition to look at ) ) ; resource killable = resources none ( ) ; resource reserved = resources clone ( cur queue get queue resource usage ( ) get reserved ( partition to look at ) ) ; if ( null ! = preemptable queues get ( queue path ) ) { killable = resources clone ( preemptable queues get ( queue path ) get killable resource ( partition to look at ) ) ; } / / when partition is a non - exclusive partition , the actual max capacity / / could more than specified max capacity try { if ( ! scheduler get r m context ( ) get node label manager ( ) is exclusive node label ( partition to look at ) ) { abs max cap = 1 0f ; } } catch ( i o exception e ) { / / this may cause by partition removed when running capacity monitor , / / just ignore the error , this will be corrected when doing next check } ret = new temp queue per partition ( queue path , current , preemption disabled , partition to look at , killable , abs cap , abs max cap , partition resource , reserved , cur queue , eff min res , eff max res ) ; if ( cur queue instanceof parent queue ) { string configured ordering policy = ( ( parent queue ) cur queue ) get queue ordering policy ( ) get config name ( ) ; / / recursively add children for ( c s queue c : cur queue get child queues ( ) ) { temp queue per partition subq = clone queues ( c , partition resource , partition to look at ) ; / / if we respect priority if ( string utils equals ( capacity scheduler configuration queue priority utilization ordering policy , configured ordering policy ) ) { subq relative priority = c get priority ( ) get priority ( ) ; } ret add child ( subq ) ; subq parent = ret ; } } } finally { read lock unlock ( ) ; } add temp queue partition ( ret ) ; return ret ; }


resolve special names from the name list such as : segment , class , overlay , names this routine also determines the readwriteexecute permissions for the segment based on the class name

protected void resolve names ( array list < string > name list ) throws omf exception { if ( segment name index = = 0 ) { segment name = " " ; / / name is unused } else { if ( segment name index > name list size ( ) ) { throw new omf exception ( " segment name index out of bounds " ) ; } segment name = name list get ( segment name index - 1 ) ; } if ( class name index = = 0 ) { class name = " " ; } else { if ( class name index > name list size ( ) ) { throw new omf exception ( " class name index out of bounds " ) ; } class name = name list get ( class name index - 1 ) ; } if ( overlay name index = = 0 ) { overlay name = " " ; } else { if ( overlay name index > name list size ( ) ) { throw new omf exception ( " overlay name index out of bounds " ) ; } overlay name = name list get ( overlay name index - 1 ) ; } / / once we know the class name , we can make some educated guesses about read / write / exec permissions is readable = true ; if ( class name equals ( " code " ) | | class name equals ( " code " ) ) { is code = true ; is writable = false ; is executable = true ; } else { is code = false ; is writable = true ; is executable = false ; } }


sorts the array , treating its elements as unsigned 64 - bit integers

public static void sort ( long [ ] array ) { check not null ( array ) ; sort ( array , 0 , array length ) ; }


get all the stack variables in the postive portion of the stack this excludes any variables defined before the parameter offset if the parameter offset is positive

private variable [ ] get positive variables ( ) { if ( variables is empty ( ) ) { return empty array ; } int length = variables size ( ) ; / / find the end of the negatives int index = 0 ; for ( index = 0 ; index < length ; index + + ) { variable var = variables get ( index ) ; int stack offset = var get stack offset ( ) ; if ( stack offset > = 0 & & stack offset > = param start ) { break ; } } if ( index = = length ) { return empty array ; } list < variable > vars = variables sub list ( index , length ) ; return vars to array ( empty array ) ; }


returns the longest prefix size such that the list of nodes can be grouped by those prefixes while not exceeding < tt > max nodes < tt > number of children

private static int get prefix size for grouping ( list < g tree node > list , int max nodes ) { int array prefix size count bins = new int array ( ) ; iterator < g tree node > it = list iterator ( ) ; string previous node name = it next ( ) get name ( ) ; prefix size count bins put ( 0 , 1 ) ; while ( it has next ( ) ) { string current node name = it next ( ) get name ( ) ; int prefix size = get common prefix size ( previous node name , current node name ) ; prefix size count bins put ( prefix size , prefix size count bins get ( prefix size ) + 1 ) ; previous node name = current node name ; } int bin contents total = 0 ; for ( int i = 0 ; i < = prefix size count bins get last non empty index ( ) ; i + + ) { bin contents total + = prefix size count bins get ( i ) ; if ( bin contents total > max nodes ) { return math max ( 0 , i - 1 ) ; / / we ' ve crossed the max ; take a step back } } return prefix size count bins get last non empty index ( ) ; / / all are allowed ; use max prefix size }


private config extractor get config ( ) { return config ; }


return true if the operator overloader supports the specified operation between the two operands and so should be invoked to handle it

boolean overrides operation ( operation operation , @ nullable object left operand , @ nullable object right operand ) throws evaluation exception ;


sets the prefix to use for each thread name created by any { @ link glide executor } s built by this { @ code builder }

public builder set name ( string name ) { this name = name ; return this ; }


closes this input stream as well as the underlying stream @ exception i o exception if an io error occurs while closing the underlying stream

public void close ( ) throws i o exception { if ( false = = closed ) { closed = true ; source close ( ) ; } }


clears the internal state of the view after this call , all read attempts will fail , until the { @ link # advance ( ) } or { @ link # seek input ( memory segment , int , int ) } method have been invoked

protected void clear ( ) { this current segment = null ; this position in segment = this header length ; this limit in segment = header length ; }


tests the progressive output by making sure that the state of { @ link console annotator } s are maintained across different progressive log calls

@ test public void progressive output ( ) throws exception { final sequence lock lock = new sequence lock ( ) ; jenkins rule web client wc = r create web client ( ) ; free style project p = r create free style project ( ) ; p get builders list ( ) add ( new test builder ( ) { public boolean perform ( abstract build < ? , ? > build , launcher launcher , build listener listener ) throws interrupted exception , i o exception { lock phase ( 0 ) ; / / make sure the build is now properly started lock phase ( 2 ) ; listener get logger ( ) println ( " line 1 " ) ; lock phase ( 4 ) ; listener get logger ( ) println ( " line 2 " ) ; lock phase ( 6 ) ; return true ; } } ) ; future < free style build > f = p schedule build 2 ( 0 ) ; lock phase ( 1 ) ; free style build b = p get build by number ( 1 ) ; progressive log client plc = new progressive log client ( wc , b ) ; / / the page should contain some output indicating the build has started why and etc plc next ( ) ; lock phase ( 3 ) ; assert equals ( " < b tag = 1 > line 1 < / b > \ r \ n " , plc next ( ) ) ; / / the new invocation should start from where the previous call left off lock phase ( 5 ) ; assert equals ( " < b tag = 2 > line 2 < / b > \ r \ n " , plc next ( ) ) ; lock done ( ) ; / / should complete successfully r assert build status success ( f ) ; }


public boolean parse ( ) throws i o exception { boolean success = true ; success & = metadata parse ( ) ; success & = resources parse ( ) ; success & = strong name signature parse ( ) ; success & = code manager table parse ( ) ; success & = v table fixups parse ( ) ; success & = export address table jumps parse ( ) ; success & = managed native header parse ( ) ; return success ; }


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


report a subcommand event to this executor ' s reporter and , if action logging is enabled , post it on its event bus

public void maybe report subcommand ( spawn spawn ) { show subcommands show subcommands = executor reports subcommands ( ) ; if ( ! show subcommands should show subcommands ) { return ; } string builder reason = new string builder ( ) ; action owner owner = spawn get resource owner ( ) get owner ( ) ; if ( owner = = null ) { reason append ( spawn get resource owner ( ) pretty print ( ) ) ; } else { reason append ( label print ( owner get label ( ) ) ) ; reason append ( " [ " ) ; reason append ( spawn get resource owner ( ) pretty print ( ) ) ; reason append ( " , configuration : " ) ; reason append ( owner get configuration checksum ( ) ) ; if ( owner get execution platform ( ) ! = null ) { reason append ( " , execution platform : " ) ; reason append ( owner get execution platform ( ) label ( ) ) ; } reason append ( " ] " ) ; } string message = spawns as shell command ( spawn , get exec root ( ) , show subcommands pretty print args ) ; get event handler ( ) handle ( event of ( event kind subcommand , null , " # " + reason + " \ n " + message ) ) ; }


performs this operation on the given arguments


the format of time bucket in day unit is " yyyy m mdd " , so which means the time bucket must be between 10000000 and 99999999

public static boolean is day bucket ( long time bucket ) { return time bucket < 99999999l & & time bucket > 10000000l ; }


public final @ non null string get absolute url ( ) { return project get absolute url ( ) + get number ( ) + ' / ' ; }


marks a range of rop registers as " reserved for a local variable "

private void mark reserved ( int rop reg , int category ) { reserved rop regs set ( rop reg , rop reg + category , true ) ; }


hooks the listeners needed on the window

private void hook title update listeners ( i workbench window configurer configurer ) { / / hook up the listeners to update the window title configurer get window ( ) add page listener ( new abstract page listener ( ) { @ override public void page activated ( i workbench page page ) { recompute title ( ) ; } @ override public void page closed ( i workbench page page ) { recompute title ( ) ; } } ) ; configurer get window ( ) add perspective listener ( new perspective adapter ( ) { @ override public void perspective activated ( i workbench page page , i perspective descriptor perspective ) { recompute title ( ) ; } @ override public void perspective saved as ( i workbench page page , i perspective descriptor old perspective , i perspective descriptor new perspective ) { recompute title ( ) ; } @ override public void perspective deactivated ( i workbench page page , i perspective descriptor perspective ) { recompute title ( ) ; } } ) ; configurer get window ( ) get part service ( ) add part listener ( new i part listener 2 ( ) { @ override public void part activated ( i workbench part reference ref ) { if ( ref instanceof i editor reference ) { recompute title ( ) ; } } @ override public void part brought to top ( i workbench part reference ref ) { if ( ref instanceof i editor reference ) { recompute title ( ) ; } } @ override public void part closed ( i workbench part reference ref ) { recompute title ( ) ; } @ override public void part deactivated ( i workbench part reference part ref ) { } @ override public void part opened ( i workbench part reference part ref ) { } @ override public void part hidden ( i workbench part reference ref ) { recompute title ( ) ; } @ override public void part visible ( i workbench part reference ref ) { recompute title ( ) ; } @ override public void part input changed ( i workbench part reference part ref ) { recompute title ( ) ; } } ) ; }


notification that the editors ' value has changed

protected void value changed ( ) { if ( ! has editor components ( ) ) { return ; } valid editor value = check editor value validity ( ) ; update info message ( valid editor value ) ; notify constraint changed ( ) ; }


check if prerequisite should be allowed based on required providers on the attribute

private boolean check rule dependency mandatory providers ( configured target and data prerequisite , attribute attribute , set < string > unfulfilled requirements ) { required providers required providers = attribute get required providers ( ) ; if ( required providers accepts any ( ) ) { / / if no required providers specified , we do not know if we should accept return false ; } if ( prerequisite get configured target ( ) satisfies ( required providers ) ) { return true ; } unfulfilled requirements add ( string format ( " ' % s ' does not have mandatory providers : % s " , prerequisite get target ( ) get label ( ) , prerequisite get configured target ( ) missing providers ( required providers ) get description ( ) ) ) ; return false ; }


check if there ' s at least one query parameter

public boolean get has query params ( ) { return nonempty ( query params ) ; }


queue a runnable to be run on the gl rendering thread this can be used to communicate with the renderer on the rendering thread must not be called before a renderer has been set

public void queue event ( runnable r ) { gl thread queue event ( r ) ; }


public boolean is compatible ( dalv insn insn ) { return true ; }


calculate the amount of bytes that can be sent by { @ code state } the lower bound is { @ code 0 }

public static int streamable bytes ( stream byte distributor stream state state ) { return max ( 0 , ( int ) min ( state pending bytes ( ) , state window size ( ) ) ) ; }


returns the { @ link bpmn model } corresponding with the process definition with the provided process definition id the { @ link bpmn model } is a pojo versions of the bpmn 2 0 xml and can be used to introspect the process definition using regular java

bpmn model get bpmn model ( string process definition id ) ;


{ @ code simple evaluation context } does not support use of type references

public type locator get type locator ( ) { return type not found type locator ; }


translate the given { @ link s q l exception } into a generic { @ link data access exception } the returned data access exception is supposed to contain the original { @ code s q l exception } as root cause however , client code may not generally rely on this due to data access exceptions possibly being caused by other resource a p is as well that said , a { @ code get root cause ( ) instanceof s q l exception } check ( and subsequent cast ) is considered reliable when expecting jdbc - based access to have happened

data access exception translate ( string task , @ nullable string sql , s q l exception ex ) ;


public string insn comment string ( dalv insn insn , boolean note indices ) { cst literal bits value = ( cst literal bits ) ( ( cst insn ) insn ) get constant ( ) ; return literal bits comment ( value , 16 ) ; }


return the index of the last component that would be overwritten by a new datatype , if we started overwriting with at a specific component all components , except the first , must be undefined datatypes or we return - 1

private static int get end component index ( structure struct , data type component comp , data type newtype ) { int newlen = newtype get length ( ) ; if ( newlen < = 0 ) { return - 1 ; / / don ' t support variable length types } data type curtype = comp get data type ( ) ; newlen - = curtype get length ( ) ; int index = comp get ordinal ( ) ; while ( newlen > 0 ) { index + = 1 ; if ( index > = struct get num components ( ) ) { return - 1 ; / / not enough space in the structure } comp = struct get component ( index ) ; / / string nm = comp get field name ( ) ; / / if ( ( nm ! = null ) & & ( nm length ( ) ! = 0 ) ) / / return - 1 ; curtype = comp get data type ( ) ; / / if ( ! undefined is undefined ( curtype ) ) / / return - 1 ; / / overlaps non - undefined datatype if ( curtype ! = data type default ) { return - 1 ; / / only allow overwrite of placeholder components } newlen - = curtype get length ( ) ; } return index ; }


public static string get internal app cache path ( ) { return get absolute path ( utils get app ( ) get cache dir ( ) ) ; }


casts and returns the py 2 - only - sources field ( or its default value )

public static boolean get has py 2 only sources ( struct impl info ) throws eval exception { object v = get value ( info , has py2 only sources ) ; if ( v instanceof boolean ) { return ( boolean ) v ; } throw starlark errorf ( " ' % s ' provider ' s ' % s ' field was % s , want bool " , provider name , has py2 only sources , starlark type ( v ) ) ; }


override this to match self characteristics alone typically , the implementation will use a visitor to extract information to perform matching

protected boolean match self ( metadata reader metadata reader ) { return false ; }


sets whether or not the script editor feature is enabled

public static void set script editor enabled ( boolean enabled ) { i preference store prefs = activator get default ( ) get preference store ( ) ; prefs set value ( ghidra script editor enabled , enabled ) ; }


returns whether this data entry is an output entry

public boolean is output ( ) { return output ; }


an integer indicating the number of entries in the symbol table

public int get number of symbols ( ) { return nsyms ; }


tests that cancel with savepoint without a properly configured savepoint directory , will fail with a meaningful exception message

public void test cancel with savepoint without configured savepoint directory ( ) throws exception { set up with checkpoint interval ( 10l ) ; try { cluster client cancel with savepoint ( job graph get job i d ( ) , null ) get ( ) ; } catch ( exception e ) { if ( ! exception utils find throwable with message ( e , " savepoint directory " ) is present ( ) ) { throw e ; } } }


defines whether or not given element should be returned from cache on further calls

public abstract boolean is lookup cached ( ) ;


{ @ code current location } needs to be supplied if a write path exists for the table

public synchronized void create table ( connector session session , table table , principal privileges principal privileges , optional < path > current path , boolean ignore existing , partition statistics statistics ) { set shared ( ) ; / / when creating a table , it should never have partition actions this is just a sanity check check no partition action ( table get database name ( ) , table get table name ( ) ) ; schema table name schema table name = new schema table name ( table get database name ( ) , table get table name ( ) ) ; action < table and more > old table action = table actions get ( schema table name ) ; table and more table and more = new table and more ( table , optional of ( principal privileges ) , current path , optional empty ( ) , ignore existing , statistics , statistics ) ; if ( old table action = = null ) { hdfs context context = new hdfs context ( session , table get database name ( ) , table get table name ( ) ) ; table actions put ( schema table name , new action < > ( action type add , table and more , context ) ) ; return ; } switch ( old table action get type ( ) ) { case drop : throw new presto exception ( transaction conflict , " dropping and then recreating the same table in a transaction is not supported " ) ; case add : case alter : case insert existing : throw new table already exists exception ( schema table name ) ; default : throw new illegal state exception ( " unknown action type " ) ; } }


protected void add attributes for pub ( publisher registration publisher registration ) { publisher registration set group ( default group ) ; }


restore all blocks and edges in this container from an xml stream

public void restore xml ( xml pull parser parser , address factory factory ) throws pcode x m l exception { block map resolver = new block map ( factory ) ; restore xml ( parser , resolver ) ; resolver resolve goto references ( ) ; }


returns the result of a { @ link listenable future } if successful , or throws any checked { @ link exception } directly if it ' s an { @ link i o exception } or else wraps it in an { @ link i o exception } cancel the future on { @ link interrupted exception }

public static < t > t get from future ( listenable future < t > f ) throws i o exception , interrupted exception { return get from future ( f , / * cancel on interrupt * / true ) ; }


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

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


returns ~ 2x the old capacity if small ; ~ 1 5x otherwise

private int calculate new capacity ( ) { int old capacity = queue length ; int new capacity = ( old capacity < 64 ) ? ( old capacity + 1 ) * 2 : int math checked multiply ( old capacity / 2 , 3 ) ; return cap at maximum size ( new capacity , maximum size ) ; }


returns the line number info corresponding to the given byte code program counter

public line number info get line number info ( int pc ) { for ( int index = u 2line number table length - 1 ; index > = 0 ; index - - ) { line number info info = line number table [ index ] ; if ( pc > = info u 2start p c ) { return info ; } } return u 2line number table length > 0 ? line number table [ 0 ] : null ; }


adds a data source to the streaming topology by default sources have a parallelism of 1 to enable parallel execution , the user defined source should implement { @ link org apache flink streaming api functions source parallel source function } or extend { @ link org apache flink streaming api functions source rich parallel source function } in these cases the resulting source will have the parallelism of the environment to change this afterwards call { @ link org apache flink streaming api datastream data stream source # set parallelism ( int ) }

public < out > data stream source < out > add source ( source function < out > function ) { return add source ( function , " custom source " ) ; }


sets the < code > class name < code > property

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


determine whether hikari c p will self - register { @ link hikari config m x bean } and { @ link hikari pool m x bean } instances in jmx

public boolean is register mbeans ( ) { return is register mbeans ; }


determines if the class or interface represented by this object is either the same as , or is a superclass or superinterface of , the class or interface represented by the specified parameter

public static boolean is assignable from ( class clazz , class cls ) { objects require non null ( cls , " cls " ) ; return clazz is assignable from ( cls ) ; }


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


checks whether the given string is entirely made up of ascii digits

private boolean is digits string valid ( string string ) { for ( int i = 0 ; i < string length ( ) ; i + + ) { char c = string char at ( i ) ; if ( c < ' 0 ' | | c > ' 9 ' ) { return false ; } } return true ; }


returns the double - click strategy ready to be used in this viewer when double clicking onto text of the given content type ( note : the same double - click strategy object is used for all content types )

public i text double click strategy get double click strategy ( i source viewer source viewer , string content type ) { return new s q l double click strategy ( ) ; }


reset that if we need to do the first refresh

protected void set should first refresh ( boolean should first refresh ) { this should first refresh = should first refresh ; }


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

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


gets the domain files from the provider and then undoes the checkout on any that are checked out

protected void undo check out ( ) { if ( ! check repository connected ( ) ) { return ; } close editors for undo check out ( ) ; list < archive > archive list = archive provider get archives ( ) ; list < domain file archive > unmodified check outs list = new array list < domain file archive > ( ) ; list < domain file archive > modified check outs list = new array list < domain file archive > ( ) ; for ( archive archive 2 : archive list ) { project archive archive = ( project archive ) archive 2 ; domain file domain file = archive get domain file ( ) ; if ( domain file is checked out ( ) ) { if ( domain file modified since checkout ( ) | | domain file is changed ( ) ) { modified check outs list add ( archive ) ; } else { unmodified check outs list add ( archive ) ; } } } try { undo check outs ( unmodified check outs list , modified check outs list ) ; } catch ( cancelled exception e ) { tool set status info ( " undo checkouts was canceled " ) ; return ; } }


set the total number of retries attempted for rejections there is no way to ask for unlimited retries

public self set max retries ( int max retries ) { this max retries = max retries ; return self ( ) ; }


returns whether this integer value is greater than or equal to the given particular integer value : < code > never < code > , < code > maybe < code > , or < code > always < code >

public final int greater than or equal ( particular integer value other ) { return - less than ( other ) ; }


delay the given action by the given delay

private static scheduled future < ? > delay ( runnable runnable , long delay , time unit time unit ) { check not null ( runnable ) ; check not null ( time unit ) ; return delayer schedule ( runnable , delay , time unit ) ; }


writes the magic number and frame descriptor to the underlying { @ link output stream }

private void write header ( ) throws i o exception { byte utils write unsigned int l e ( buffer , 0 , magic ) ; buffer offset = 4 ; buffer [ buffer offset + + ] = flg to byte ( ) ; buffer [ buffer offset + + ] = bd to byte ( ) ; / / todo write uncompressed content size , update flg validate ( ) / / compute checksum on all descriptor fields int offset = 4 ; int len = buffer offset - offset ; if ( this use broken flag descriptor checksum ) { len + = offset ; offset = 0 ; } byte hash = ( byte ) ( ( checksum hash ( buffer , offset , len , 0 ) > > 8 ) & 0x f f ) ; buffer [ buffer offset + + ] = hash ; / / write out frame descriptor out write ( buffer , 0 , buffer offset ) ; buffer offset = 0 ; }


< b > note : this is the default model of how to let users search for things in ghidra this is not a tool to allow regex searching , but instead allows users to perform searches while using familiar globbing characters such as ' ' and ' ? ' < b > this method can be used with { @ link matcher # matches ( ) } or { @ link matcher # find ( ) } create a regular expression from the given input < b > note : < b > the regular expression created by this method is not a pure regular expression more specifically , many regular expression characters passed to this method will be escaped ( see { @ link # escape all regex characters ( string ) } also , globbing characters < b > < u > will < u > < b > be changed from a regular expression meaning to a command - line style glob meaning < b > note : < b > this method < b > will < b > escape regular expression characters , such as : ? $ and many others thus , this method is not meant to < b > accept < b > regular expressions , but rather < b > generates < b > regular expressions

public static pattern create search pattern ( string input , boolean case sensitive ) { int options = 0 ; if ( ! case sensitive ) { options | = pattern case insensitive ; } pattern p = create pattern ( input , true , options ) ; return p ; }


this test verifies that resultion queries get relayed to the inner rack

public void test caching relays resolve queries ( ) throws throwable { static mapping mapping = new instance ( ) ; mapping set conf ( create conf ( " top " ) ) ; static mapping static mapping = mapping ; cached d n s to switch mapping cached map = new cached d n s to switch mapping ( static mapping ) ; assert map size ( cached map , 0 ) ; / / add a node to the static map static mapping add node to rack ( " n 1 " , " / r 1 " ) ; / / verify it is there assert map size ( static mapping , 1 ) ; / / verify that the cache hasn ' t picked it up yet assert map size ( cached map , 0 ) ; / / now relay the query cached map resolve ( create query list ( ) ) ; / / and verify the cache is no longer empty assert map size ( cached map , 2 ) ; }


test to check statistics from seek operation in abfs input stream

public void test seek statistics ( ) throws i o exception { describe ( " testing the values of statistics from seek operations in " + " abfs input stream " ) ; azure blob file system fs = get file system ( ) ; azure blob file system store abfss = fs get abfs store ( ) ; path seek stat path = path ( get method name ( ) ) ; abfs output stream out = null ; abfs input stream in = null ; try { out = create abfs output stream with flush enabled ( fs , seek stat path ) ; / / writing a default buffer in a file out write ( def buffer ) ; out hflush ( ) ; in = abfss open file for read ( seek stat path , fs get fs statistics ( ) ) ; / * * writing 1mb buffer to the file , this would make the f cursor ( current * position of cursor ) to the end of file * / int result = in read ( def buffer , 0 , one mb ) ; log info ( " result of read : { } " , result ) ; / * * seeking to start of file and then back to end would result in a * backward and a forward seek respectively 10 times * / for ( int i = 0 ; i < operations ; i + + ) { in seek ( 0 ) ; in seek ( one mb ) ; } abfs input stream statistics impl stats = ( abfs input stream statistics impl ) in get stream statistics ( ) ; log info ( " statistics : { } " , stats to string ( ) ) ; / * * seek ops - since we are doing backward and forward seek operations * times , total seeks would be 2 * operations * * backward seek ops - since we are doing a backward seek inside a loop * for operation times , total backward seeks would be operations * * forward seek ops - since we are doing a forward seek inside a loop * for operation times , total forward seeks would be operations * * negative bytes backwards on seek - since we are doing backward seeks from * end of file in a one mb file each time , this would mean the bytes from * backward seek would be operations * one mb * * bytes skipped on seek - since , we move from start to end in seek , but * our f cursor ( position of cursor ) always remain at end of file , this * would mean no bytes were skipped on seek since , all forward seeks * are in buffer * * seek in buffer - since all seeks were in buffer , the seek in buffer * would be equal to 2 * operations * * / assert equals ( " mismatch in seek ops value " , 2 * operations , stats get seek operations ( ) ) ; assert equals ( " mismatch in backward seek ops value " , operations , stats get backward seek operations ( ) ) ; assert equals ( " mismatch in forward seek ops value " , operations , stats get forward seek operations ( ) ) ; assert equals ( " mismatch in bytes backwards on seek value " , operations * one mb , stats get bytes backwards on seek ( ) ) ; assert equals ( " mismatch in bytes skipped on seek value " , 0 , stats get bytes skipped on seek ( ) ) ; assert equals ( " mismatch in seek in buffer value " , 2 * operations , stats get seek in buffer ( ) ) ; in close ( ) ; / / verifying whether stats are readable after stream is closed log info ( " statistics after closing : { } " , stats to string ( ) ) ; } finally { i o utils cleanup with logger ( log , out , in ) ; } }


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


this function shows how to construct a callable starlark value from a java method

immutable map < string , object > make environment ( ) { immutable map builder < string , object > env = immutable map builder ( ) ; env put ( " zero " , 0 ) ; starlark add methods ( env , new my functions ( ) , starlark semantics default ) ; / / adds ' square ' return env build ( ) ; }


decrements the latch count and releases any waiting threads when the count reaches 0

public void decrement ( ) { sync decrement ( ) ; }


performs task assignment based on the incremental cooperative connect protocol read more on the design and implementation in : {

protected map < string , byte buffer > perform task assignment ( string leader id , long max offset , map < string , extended worker state > member configs , worker coordinator coordinator , short protocol version ) { log debug ( " performing task assignment during generation : { } with member id : { } " , coordinator generation id ( ) , coordinator member id ( ) ) ; / / base set : the previous assignment of connectors - and - tasks is a standalone snapshot that / / can be used to calculate derived sets log debug ( " previous assignments : { } " , previous assignment ) ; int last completed generation id = coordinator last completed generation id ( ) ; if ( previous generation id ! = last completed generation id ) { log debug ( " clearing the view of previous assignments due to generation mismatch between " + " previous generation id { } and last completed generation id { } this can " + " happen if the leader fails to sync the assignment within a rebalancing round " + " the following view of previous assignments might be outdated and will be " + " ignored by the leader in the current computation of new assignments " + " possibly outdated previous assignments : { } " , previous generation id , last completed generation id , previous assignment ) ; this previous assignment = connectors and tasks empty ; } cluster config state snapshot = coordinator config snapshot ( ) ; set < string > configured connectors = new tree set < > ( snapshot connectors ( ) ) ; set < connector task id > configured tasks = configured connectors stream ( ) flat map ( c - > snapshot tasks ( c ) stream ( ) ) collect ( collectors to set ( ) ) ; / / base set : the set of configured connectors - and - tasks is a standalone snapshot that can / / be used to calculate derived sets connectors and tasks configured = new connectors and tasks builder ( ) with ( configured connectors , configured tasks ) build ( ) ; log debug ( " configured assignments : { } " , configured ) ; / / base set : the set of active connectors - and - tasks is a standalone snapshot that can be / / used to calculate derived sets connectors and tasks active assignments = assignment ( member configs ) ; log debug ( " active assignments : { } " , active assignments ) ; / / this means that a previous revocation did not take effect in this case , reset / / appropriately and be ready to re - apply revocation of tasks if ( ! previous revocation is empty ( ) ) { if ( previous revocation connectors ( ) stream ( ) any match ( c - > active assignments connectors ( ) contains ( c ) ) | | previous revocation tasks ( ) stream ( ) any match ( t - > active assignments tasks ( ) contains ( t ) ) ) { previous assignment = active assignments ; can revoke = true ; } previous revocation connectors ( ) clear ( ) ; previous revocation tasks ( ) clear ( ) ; } / / derived set : the set of deleted connectors - and - tasks is a derived set from the set / / difference of previous - configured connectors and tasks deleted = diff ( previous assignment , configured ) ; log debug ( " deleted assignments : { } " , deleted ) ; / / derived set : the set of remaining active connectors - and - tasks is a derived set from the / / set difference of active - deleted connectors and tasks remaining active = diff ( active assignments , deleted ) ; log debug ( " remaining ( excluding deleted ) active assignments : { } " , remaining active ) ; / / derived set : the set of lost or unaccounted connectors - and - tasks is a derived set from / / the set difference of previous - active - deleted connectors and tasks lost assignments = diff ( previous assignment , active assignments , deleted ) ; log debug ( " lost assignments : { } " , lost assignments ) ; / / derived set : the set of new connectors - and - tasks is a derived set from the set / / difference of configured - previous - active connectors and tasks new submissions = diff ( configured , previous assignment , active assignments ) ; log debug ( " new assignments : { } " , new submissions ) ; / / a collection of the complete assignment list < worker load > complete worker assignment = worker assignment ( member configs , connectors and tasks empty ) ; log debug ( " complete ( ignoring deletions ) worker assignments : { } " , complete worker assignment ) ; / / per worker connector assignments without removing deleted connectors yet map < string , collection < string > > connector assignments = complete worker assignment stream ( ) collect ( collectors to map ( worker load : : worker , worker load : : connectors ) ) ; log debug ( " complete ( ignoring deletions ) connector assignments : { } " , connector assignments ) ; / / per worker task assignments without removing deleted connectors yet map < string , collection < connector task id > > task assignments = complete worker assignment stream ( ) collect ( collectors to map ( worker load : : worker , worker load : : tasks ) ) ; log debug ( " complete ( ignoring deletions ) task assignments : { } " , task assignments ) ; / / a collection of the current assignment excluding the connectors - and - tasks to be deleted list < worker load > current worker assignment = worker assignment ( member configs , deleted ) ; map < string , connectors and tasks > to revoke = compute deleted ( deleted , connector assignments , task assignments ) ; log debug ( " connector and task to delete assignments : { } " , to revoke ) ; / / revoking redundant connectors / tasks if the the workers have duplicate assignments to revoke put all ( compute duplicated assignments ( member configs , connector assignments , task assignments ) ) ; log debug ( " connector and task to revoke assignments ( include duplicated assignments ) : { } " , to revoke ) ; / / recompute the complete assignment excluding the deleted connectors - and - tasks complete worker assignment = worker assignment ( member configs , deleted ) ; connector assignments = complete worker assignment stream ( ) collect ( collectors to map ( worker load : : worker , worker load : : connectors ) ) ; task assignments = complete worker assignment stream ( ) collect ( collectors to map ( worker load : : worker , worker load : : tasks ) ) ; handle lost assignments ( lost assignments , new submissions , complete worker assignment , member configs ) ; / / do not revoke resources for re - assignment while a delayed rebalance is active / / also we do not revoke in two consecutive rebalances by the same leader can revoke = delay = = 0 & & can revoke ; / / compute the connectors - and - tasks to be revoked for load balancing without taking into / / account the deleted ones log debug ( " can leader revoke tasks in this assignment ? { } ( delay : { } ) " , can revoke , delay ) ; if ( can revoke ) { map < string , connectors and tasks > to explicitly revoke = perform task revocation ( active assignments , current worker assignment ) ; log debug ( " connector and task to revoke assignments : { } " , to revoke ) ; to explicitly revoke for each ( ( worker , assignment ) - > { connectors and tasks existing = to revoke compute if absent ( worker , v - > new connectors and tasks builder ( ) build ( ) ) ; existing connectors ( ) add all ( assignment connectors ( ) ) ; existing tasks ( ) add all ( assignment tasks ( ) ) ; } ) ; can revoke = to explicitly revoke size ( ) = = 0 ; } else { can revoke = delay = = 0 ; } assign connectors ( complete worker assignment , new submissions connectors ( ) ) ; assign tasks ( complete worker assignment , new submissions tasks ( ) ) ; log debug ( " current complete assignments : { } " , current worker assignment ) ; log debug ( " new complete assignments : { } " , complete worker assignment ) ; map < string , collection < string > > current connector assignments = current worker assignment stream ( ) collect ( collectors to map ( worker load : : worker , worker load : : connectors ) ) ; map < string , collection < connector task id > > current task assignments = current worker assignment stream ( ) collect ( collectors to map ( worker load : : worker , worker load : : tasks ) ) ; map < string , collection < string > > incremental connector assignments = diff ( connector assignments , current connector assignments ) ; map < string , collection < connector task id > > incremental task assignments = diff ( task assignments , current task assignments ) ; log debug ( " incremental connector assignments : { } " , incremental connector assignments ) ; log debug ( " incremental task assignments : { } " , incremental task assignments ) ; coordinator leader state ( new leader state ( member configs , connector assignments , task assignments ) ) ; map < string , extended assignment > assignments = fill assignments ( member configs key set ( ) , assignment no error , leader id , member configs get ( leader id ) url ( ) , max offset , incremental connector assignments , incremental task assignments , to revoke , delay , protocol version ) ; previous assignment = compute previous assignment ( to revoke , connector assignments , task assignments , lost assignments ) ; previous generation id = coordinator generation id ( ) ; previous members = member configs key set ( ) ; log debug ( " actual assignments : { } " , assignments ) ; return serialize assignments ( assignments ) ; }


tests to verify that for the given path , only few of the blocks or block src locations ( src nodes ) under the given path will be scheduled for block movement for example , there are two block for a file : file 1 = > two blocks and default storage policy ( hot ) blk 1 [ locations = a ( disk ) , b ( disk ) , c ( disk ) , d ( disk ) , e ( disk ) ] , blk 2 [ locations = a ( disk ) , b ( disk ) , c ( disk ) , d ( disk ) , e ( disk ) ] now , set storage policy to cold only two dns are available with expected storage type archive , say a , e sps will schedule block movement to the coordinator node with the details , blk 1 [ move a ( disk ) - > a ( archive ) , move e ( disk ) - > e ( archive ) ] , blk 2 [ move a ( disk ) - > a ( archive ) , move e ( disk ) - > e ( archive ) ]

public void test when only few source nodes have matching target nodes ( ) throws exception { try { int num of dns = 5 ; config set long ( " dfs block size " , 1024 ) ; all disk types = new storage type [ ] [ ] { { storage type disk , storage type archive } , { storage type disk , storage type disk } , { storage type disk , storage type disk } , { storage type disk , storage type disk } , { storage type disk , storage type archive } } ; hdfs cluster = start cluster ( config , all disk types , num of dns , storages per datanode , capacity ) ; dfs = hdfs cluster get file system ( ) ; write content ( file , ( short ) 5 ) ; / / change policy to cold dfs set storage policy ( new path ( file ) , cold ) ; dfs satisfy storage policy ( new path ( file ) ) ; hdfs cluster trigger heartbeats ( ) ; / / wait till storge policy satisfier identified that block to move to / / archive area d f s test util wait expected storage type ( file , storage type archive , 2 , 30000 , dfs ) ; d f s test util wait expected storage type ( file , storage type disk , 3 , 30000 , dfs ) ; wait for blocks movement attempt report ( 1 , 30000 ) ; } finally { shutdown cluster ( ) ; } }


public int get code ( ) { return code ; }


get a long parameter , or { @ code null } if not present throws an exception if it the parameter value isn ' t a number

public static long get long parameter ( servlet request request , string name ) throws servlet request binding exception { if ( request get parameter ( name ) = = null ) { return null ; } return get required long parameter ( request , name ) ; }


void on interrupt ( postcard postcard ) ;


temporary hook for recording job failure

protected void on failure ( job job ) { log info ( job get job name ( ) + " ( " + job get job i d ( ) + " ) " + " failure " ) ; }


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


notifies the tracker of a non - fatal error in the current playback

public void on non fatal error ( event time event time , exception error ) { non fatal error count + + ; if ( keep history ) { non fatal error history add ( new event time and exception ( event time , error ) ) ; } }


returns the number of times an entry has been evicted this count does not include manual { @ linkplain cache # invalidate invalidations }

public long eviction count ( ) { return eviction count ; }


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


return the jdbc password to use for connecting through the driver

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


gets the alignment of the cue text within the cue box , or null if the alignment is undefined

public alignment get text alignment ( ) { return text alignment ; }


append a record to this patch the caller must first verify there is room for the batch using { @ link # has room for ( int ) }

public long append record ( t record , object serde context ) { if ( ! is open for appends ) { throw new illegal argument exception ( " cannot append new records after the batch has been built " ) ; } if ( next offset - base offset > integer max value ) { throw new illegal argument exception ( " cannot include more than " + integer max value + " records in a single batch " ) ; } long offset = next offset + + ; int record size in bytes = write record ( offset , record , serde context ) ; unflushed bytes + = record size in bytes ; records add ( record ) ; return offset ; }


end rendering one or more { @ link renderable } s must be called after a call to { @ link # begin ( camera ) } this will flush the batch , causing any renderables provided using one of the render ( ) methods to be rendered after a call to this method the open g l context can be altered again

public void end ( ) { flush ( ) ; if ( own context ) context end ( ) ; camera = null ; }


return the first header value for the given header name , if any

public string get first ( string header name ) { list < string > header values = this headers get ( header name ) ; return header values ! = null ? header values get ( 0 ) : null ; }


extracts and aggregates all requested metrics from the given metric stores , and maps the result to a json string

private aggregated metrics response body get aggregated metric values ( collection < ? extends metric store component metric store > stores , list < string > requested metrics , metric accumulator factory requested aggregations factories ) { collection < aggregated metric > aggregated metrics = new array list < > ( requested metrics size ( ) ) ; for ( string requested metric : requested metrics ) { final collection < double > values = new array list < > ( stores size ( ) ) ; try { for ( metric store component metric store store : stores ) { string string value = store metrics get ( requested metric ) ; if ( string value ! = null ) { values add ( double value of ( string value ) ) ; } } } catch ( number format exception nfe ) { log warn ( " the metric { } is not numeric and can ' t be aggregated " , requested metric , nfe ) ; / / metric is not numeric so we can ' t perform aggregations = > ignore it continue ; } if ( ! values is empty ( ) ) { iterator < double > values iterator = values iterator ( ) ; metric accumulator acc = requested aggregations factories get ( requested metric , values iterator next ( ) ) ; values iterator for each remaining ( acc : : add ) ; aggregated metrics add ( acc get ( ) ) ; } else { return new aggregated metrics response body ( collections empty list ( ) ) ; } } return new aggregated metrics response body ( aggregated metrics ) ; }


public void set location ( @ nullable string location ) { this location = location ; }


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


asserts that the given cluster state contains nb tasks tasks that are assigned

protected static void assert nb assigned tasks ( final long nb tasks , final cluster state cluster state ) { assert persistent tasks ( nb tasks , cluster state , persistent tasks custom metadata persistent task : : is assigned ) ; }


creates a builder for new server - side { @ link ssl context }

public static ssl context builder for server ( file key cert chain file , file key file ) { return new ssl context builder ( true ) key manager ( key cert chain file , key file ) ; }


resource of single - component services or the global default for multi - component services mandatory if it is a single - component service and if cpus and memory are not specified at the service level

public service resource ( resource resource ) { this resource = resource ; return this ; }


whether the given { @ linkplain method parameter method parameter } is supported by this resolver

boolean supports parameter ( method parameter parameter ) ;


get userlogout : logs out current logged in user session

default response entity < void > logout user ( ) { return new response entity < > ( http status not implemented ) ; }


get current phase of this task phase map in case of map tasks , for reduce one of phase shuffle , phase sort or phase reduce

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


public void test native i o ( ) throws i o exception { framework uploader uploader = new framework uploader ( ) ; file parent = new file ( test dir ) ; try { / / create a parent directory parent delete on exit ( ) ; assert assert true ( parent mkdirs ( ) ) ; / / create a target file file target file = new file ( parent , " a txt " ) ; try ( file output stream os = new file output stream ( target file ) ) { i o utils write lines ( lists new array list ( " a " , " b " ) , null , os ) ; } assert assert false ( uploader check symlink ( target file ) ) ; / / create a symlink to the target file symlink to target = new file ( parent , " symlink to target txt " ) ; try { files create symbolic link ( paths get ( symlink to target get absolute path ( ) ) , paths get ( target file get absolute path ( ) ) ) ; } catch ( unsupported operation exception e ) { / / symlinks are not supported , so ignore the test assume assume true ( false ) ; } assert assert true ( uploader check symlink ( symlink to target ) ) ; / / create a symlink to the target with / / in the path symlink to target = new file ( parent get absolute path ( ) + " / / symlink to target 2 txt " ) ; try { files create symbolic link ( paths get ( symlink to target get absolute path ( ) ) , paths get ( target file get absolute path ( ) ) ) ; } catch ( unsupported operation exception e ) { / / symlinks are not supported , so ignore the test assume assume true ( false ) ; } assert assert true ( uploader check symlink ( symlink to target ) ) ; / / create a symlink outside the current directory file symlink outside = new file ( parent , " symlink to parent txt " ) ; try { files create symbolic link ( paths get ( symlink outside get absolute path ( ) ) , paths get ( parent get absolute path ( ) ) ) ; } catch ( unsupported operation exception e ) { / / symlinks are not supported , so ignore the test assume assume true ( false ) ; } assert assert false ( uploader check symlink ( symlink outside ) ) ; } finally { file utils delete directory ( parent ) ; } }


get { @ link file status } of filesdirectories in the given path if path corresponds to a file then { @ link file status } of that file is returned else if path represents a directory then { @ link file status } of all filesdirectories inside given path is returned

public file status [ ] list status ( path f ) throws i o exception { map < string , string > params = new hash map < string , string > ( ) ; params put ( op param , operation liststatus to string ( ) ) ; http u r l connection conn = get connection ( operation liststatus get method ( ) , params , f , true ) ; http exception utils validate response ( conn , http u r l connection http ok ) ; j s o n object json = ( j s o n object ) http f s utils json parse ( conn ) ; return to file statuses ( json , f ) ; }


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


returns the collection of configured targets corresponding to any of the provided targets

static linked hash set < configured target > filter tests by targets ( collection < configured target > targets , set < label > allowed target labels ) { return targets stream ( ) filter ( ct - > allowed target labels contains ( ct get label ( ) ) ) collect ( collectors to collection ( linked hash set : : new ) ) ; }


public static byte set bit value ( byte source , int pos , byte value ) { byte mask = ( byte ) ( 1 < < pos ) ; if ( value > 0 ) { source | = mask ; } else { source & = ( ~ mask ) ; } return source ; }


evaluate all the entries and provide a list of the results this is not a snapshot , so if the evaluators actually return references to mutable objects ( e g a mean statistic instance ) then that value may still change

public collection < e > values ( ) { set < entry < string , function < string , e > > > eval entries = evaluators entry set ( ) ; return eval entries parallel stream ( ) map ( ( e ) - > e get value ( ) apply ( e get key ( ) ) ) collect ( collectors to list ( ) ) ; }


public void test type holder default ( ) { / / todo : test type holder default }


register an initial value for the currently deserializing value , for use by child objects that may have references to it this is a noop when memoization is disabled

public < t > void register initial value ( t initial value ) { if ( deserializer = = null ) { return ; } deserializer register initial value ( initial value ) ; }


tests whether the provided function returns { @ code true } for any of the id p ' s signing credentials

protected void check idp signature ( checked function < credential , boolean , exception > check , string signature text ) { final predicate < credential > predicate = credential - > { try { return check apply ( credential ) ; } catch ( signature exception | security exception e ) { logger debug ( ( ) - > new parameterized message ( " saml signature [ { } ] does not match credentials [ { } ] [ { } ] - - { } " , signature text , credential get entity id ( ) , credential get public key ( ) , e ) ) ; logger trace ( " saml signature failure caused by " , e ) ; return false ; } catch ( exception e ) { logger warn ( " exception while attempting to validate saml signature " , e ) ; return false ; } } ; final list < credential > credentials = idp get signing credentials ( ) ; if ( credentials stream ( ) any match ( predicate ) = = false ) { throw saml signature exception ( credentials , signature text ) ; } }


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


run the command in multiple modes and check that the hook assertions hold in each and that the command fails

abstract void assert hooks on failure ( func 0 < c > ctor , action 1 < c > assertion , boolean fail fast ) ;


it will change the case of the passing parameter into the case defined in litepal xml file

public static string change case ( string string ) { if ( string ! = null ) { lite pal attr lite pal attr = lite pal attr get instance ( ) ; string cases = lite pal attr get cases ( ) ; if ( const config cases keep equals ( cases ) ) { return string ; } else if ( const config cases upper equals ( cases ) ) { return string to upper case ( locale us ) ; } return string to lower case ( locale us ) ; } return null ; }


this method resets the properties to a state where no properties are given

public void reset ( ) { this partitioning = partitioning property random partitioned ; this ordering = null ; this partitioning fields = null ; }


determine if the user has at least one " new " token that was created after the last use of the legacy token

public boolean has fresh token ( @ non null user user , api token property token info and stats legacy stats ) { if ( legacy stats = = null ) { return false ; } api token property api token property = user get property ( api token property class ) ; return api token property get token list ( ) stream ( ) filter ( token - > ! token is legacy ) any match ( token - > { date creation date = token creation date ; date last use date = legacy stats last use date ; if ( last use date = = null ) { last use date = legacy stats creation date ; } return creation date ! = null & & last use date ! = null & & creation date after ( last use date ) ; } ) ; }


usually you don ' t need this value ; just in case you are mixing custom { @ link org greenrobot greendao query where condition string condition } into the query , this value allows to reference the joined ( target ) table

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


public int get patch ( ) { return patch ; }


public static boolean overloaded static ( ) { return true ; }


check patch signature , tinker id and meta files

void on load package check fail ( file patch file , int error code ) ;


visits the given type annotation of any type of class member

public void visit type annotation ( clazz clazz , member member , type annotation type annotation ) { visit type annotation ( clazz , type annotation ) ; }


creates a mock bitmap drawable with some methods stubbed

public static bitmap drawable mock bitmap drawable ( ) { return mock drawable ( bitmap drawable class ) ; }


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


synchronized void set resource limit ( long my pmem limit , long my vmem limit , int my cpu vcores ) { this pmem limit = my pmem limit ; this vmem limit = my vmem limit ; this cpu vcores = my cpu vcores ; }


returns the blessed boot class path as a list of { @ code file } objects each { @ code file } will represent a jar file that will exist while the current build action or test is executing

public static list < file > as files ( ) { return new array list < > ( as files ) ; }


from a set of statements , create a policy

public static policy policy ( final list < role model statement > statements ) { return new policy ( statements ) ; }


returns the current mode of how column constraints will be used to filter this column < p > this method is typically not overridden this is only needed in rare cases , such as when a column uses a renderer , but does not want this column to be filtered using a string column constraint or , if a column uses a renderer and wants that text to be available as a filter , along with any other column constraints

public default column constraint filter mode get column constraint filter mode ( ) { return column constraint filter mode allow renderer string filter only ; }


initialize this cipher with a key and iv

public void init ( int mode , byte [ ] key , byte [ ] iv ) { context = init ( context , mode , alg , padding , key , iv , engine ) ; }


public long get over time alive mills ( ) { return over time alive mills ; }


returns a color according to specific conditions : if material theme is enabled , returns the mt color otherwise if laf is dark returns the dark color otherwise if laf is light returns the light color

public static color get color ( final color mt color , @ not null final color dark color , @ not null final color light color ) { final color default color = u i util is under darcula ( ) ? dark color : light color ; return object utils not null ( mt color , default color ) ; }


return a composed routing function that routes to the given router function if this route does not match and the given request predicate applies this method is a convenient combination of { @ link # and ( router function ) } and { @ link router functions # nest ( request predicate , router function ) }

default router function < t > and nest ( request predicate predicate , router function < t > router function ) { return and ( router functions nest ( predicate , router function ) ) ; }


public void check enabled ( ) { if ( policy = = policy disable ) { throw new unsupported operation exception ( " this feature is disabled please refer to " + hdfs client config keys block write replace datanode on failure enable key + " configuration property " ) ; } }


pop a request to disable automatic sleep for hardware useful for making sure computers don ' t go to sleep during long builds must be matched with a previous { @ link # push disable sleep } call

public static native int pop disable sleep ( ) ;


this is used internally by generated models to do validation checking when " validate epoxy model usage " is enabled and the model is used with a { @ link epoxy controller } this method validates that the model ' s hash code hasn ' t been changed since it was added to the controller this is similar to { @ link # on mutation ( ) } , but that method is only used for specific model changes such as calling a setter by checking the hash code , this method allows us to catch more subtle changes , such as through setting a field directly or through changing an object that is set on the model

protected final void validate state has not changed since added ( string description of change , int model position ) { if ( is debug validation enabled ( ) & & ! currently in interceptors & & hash code when added ! = hash code ( ) ) { throw new immutable model exception ( this , description of change , model position ) ; } }


this method is called after visiting each child in { @ link # visit children } this method is first called before the first child is visited ; at that point { @ code current result } will be the initial value ( in the default implementation , the initial value is returned by a call to { @ link # default result } this method is not called after the last child is visited the default implementation always returns { @ code true } , indicating that { @ code visit children } should only return after all children are visited one reason to override this method is to provide a " short circuit " evaluation option for situations where the result of visiting a single child has the potential to determine the result of the visit operation as a whole

protected boolean should visit next child ( rule node node , t current result ) { return true ; }


gets the number of documents to terminate after collecting

public int terminate after ( ) { return terminate after ; }


returns the original element list , unchanged

public list < integer > order ( list < integer > insertion order ) { return insertion order ; }


stop all name node threads and wait for all to finish

public void stop ( ) { synchronized ( this ) { if ( stop requested ) return ; stop requested = true ; } try { if ( state ! = null ) { state exit state ( ha context ) ; } } catch ( service failed exception e ) { log warn ( " encountered exception while exiting state " , e ) ; } finally { stop metrics logger ( ) ; stop common services ( ) ; if ( metrics ! = null ) { metrics shutdown ( ) ; } if ( namesystem ! = null ) { namesystem shutdown ( ) ; } if ( name node status bean name ! = null ) { m beans unregister ( name node status bean name ) ; name node status bean name = null ; } if ( level d b alias map server ! = null ) { level d b alias map server close ( ) ; } } tracer close ( ) ; }


called whenever a new value is ready to be retrieved from the data source to retrieve the new value , call { @ code data source get result ( ) } to determine if the new value is the last , use { @ code data source is finished ( ) }

void on new result ( @ nonnull data source < t > data source ) ;