public response put ( input stream is , @ context uri info uri info , @ path param ( " path " ) string path , @ query param ( operation param name ) operation param op , @ context parameters params , @ context http servlet request request ) throws i o exception , file system access exception { / / do not allow put commands in read - only mode if ( access mode = = access mode readonly ) { return response status ( response status forbidden ) build ( ) ; } user group information user = http user group information get ( ) ; response response ; path = make absolute ( path ) ; mdc put ( http f s file system op param , op value ( ) name ( ) ) ; mdc put ( " hostname " , request get remote addr ( ) ) ; switch ( op value ( ) ) { case create : { boolean has data = params get ( data param name , data param class ) ; uri redirect u r l = create upload redirection u r l ( uri info , http f s file system operation create ) ; boolean no redirect = params get ( no redirect param name , no redirect param class ) ; if ( no redirect ) { final string js = json util to json string ( " location " , redirect u r l ) ; response = response ok ( js ) type ( media type application json ) build ( ) ; } else if ( has data ) { short permission = params get ( permission param name , permission param class ) ; short unmasked permission = params get ( unmasked permission param name , unmasked permission param class ) ; boolean override = params get ( overwrite param name , overwrite param class ) ; short replication = params get ( replication param name , replication param class ) ; long block size = params get ( block size param name , block size param class ) ; f s operations f s create command = new f s operations f s create ( is , path , permission , override , replication , block size , unmasked permission ) ; fs execute ( user , command ) ; audit log info ( " [ { } ] permission [ { } ] override [ { } ] " + " replication [ { } ] block size [ { } ] unmaskedpermission [ { } ] " , new object [ ] { path , permission , override , replication , block size , unmasked permission } ) ; final string js = json util to json string ( " location " , uri info get absolute path ( ) ) ; response = response created ( uri info get absolute path ( ) ) type ( media type application json ) entity ( js ) build ( ) ; } else { response = response temporary redirect ( redirect u r l ) build ( ) ; } break ; } case allowsnapshot : { f s operations f s allow snapshot command = new f s operations f s allow snapshot ( path ) ; fs execute ( user , command ) ; audit log info ( " [ { } ] allowed snapshot " , path ) ; response = response ok ( ) build ( ) ; break ; } case disallowsnapshot : { f s operations f s disallow snapshot command = new f s operations f s disallow snapshot ( path ) ; fs execute ( user , command ) ; audit log info ( " [ { } ] disallowed snapshot " , path ) ; response = response ok ( ) build ( ) ; break ; } case createsnapshot : { string snapshot name = params get ( snapshot name param name , snapshot name param class ) ; f s operations f s create snapshot command = new f s operations f s create snapshot ( path , snapshot name ) ; string json = fs execute ( user , command ) ; audit log info ( " [ { } ] snapshot created as [ { } ] " , path , snapshot name ) ; response = response ok ( json ) type ( media type application json ) build ( ) ; break ; } case setxattr : { string xattr name = params get ( x attr name param name , x attr name param class ) ; string xattr value = params get ( x attr value param name , x attr value param class ) ; enum set < x attr set flag > flag = params get ( x attr set flag param name , x attr set flag param class ) ; f s operations f s set x attr command = new f s operations f s set x attr ( path , xattr name , xattr value , flag ) ; fs execute ( user , command ) ; audit log info ( " [ { } ] to x attr [ { } ] " , path , xattr name ) ; response = response ok ( ) build ( ) ; break ; } case renamesnapshot : { string old snapshot name = params get ( old snapshot name param name , old snapshot name param class ) ; string snapshot name = params get ( snapshot name param name , snapshot name param class ) ; f s operations f s rename snapshot command = new f s operations f s rename snapshot ( path , old snapshot name , snapshot name ) ; fs execute ( user , command ) ; audit log info ( " [ { } ] renamed snapshot [ { } ] to [ { } ] " , path , old snapshot name , snapshot name ) ; response = response ok ( ) build ( ) ; break ; } case removexattr : { string xattr name = params get ( x attr name param name , x attr name param class ) ; f s operations f s remove x attr command = new f s operations f s remove x attr ( path , xattr name ) ; fs execute ( user , command ) ; audit log info ( " [ { } ] removed x attr [ { } ] " , path , xattr name ) ; response = response ok ( ) build ( ) ; break ; } case mkdirs : { short permission = params get ( permission param name , permission param class ) ; short unmasked permission = params get ( unmasked permission param name , unmasked permission param class ) ; f s operations f s mkdirs command = new f s operations f s mkdirs ( path , permission , unmasked permission ) ; j s o n object json = fs execute ( user , command ) ; audit log info ( " [ { } ] permission [ { } ] unmaskedpermission [ { } ] " , path , permission , unmasked permission ) ; response = response ok ( json ) type ( media type application json ) build ( ) ; break ; } case rename : { string to path = params get ( destination param name , destination param class ) ; f s operations f s rename command = new f s operations f s rename ( path , to path ) ; j s o n object json = fs execute ( user , command ) ; audit log info ( " [ { } ] to [ { } ] " , path , to path ) ; response = response ok ( json ) type ( media type application json ) build ( ) ; break ; } case setowner : { string owner = params get ( owner param name , owner param class ) ; string group = params get ( group param name , group param class ) ; f s operations f s set owner command = new f s operations f s set owner ( path , owner , group ) ; fs execute ( user , command ) ; audit log info ( " [ { } ] to ( o / g ) [ { } ] " , path , owner + " : " + group ) ; response = response ok ( ) build ( ) ; break ; } case setpermission : { short permission = params get ( permission param name , permission param class ) ; f s operations f s set permission command = new f s operations f s set permission ( path , permission ) ; fs execute ( user , command ) ; audit log info ( " [ { } ] to [ { } ] " , path , permission ) ; response = response ok ( ) build ( ) ; break ; } case setreplication : { short replication = params get ( replication param name , replication param class ) ; f s operations f s set replication command = new f s operations f s set replication ( path , replication ) ; j s o n object json = fs execute ( user , command ) ; audit log info ( " [ { } ] to [ { } ] " , path , replication ) ; response = response ok ( json ) build ( ) ; break ; } case settimes : { long modified time = params get ( modified time param name , modified time param class ) ; long access time = params get ( access time param name , access time param class ) ; f s operations f s set times command = new f s operations f s set times ( path , modified time , access time ) ; fs execute ( user , command ) ; audit log info ( " [ { } ] to ( m / a ) [ { } ] " , path , modified time + " : " + access time ) ; response = response ok ( ) build ( ) ; break ; } case setacl : { string acl spec = params get ( acl permission param name , acl permission param class ) ; f s operations f s set acl command = new f s operations f s set acl ( path , acl spec ) ; fs execute ( user , command ) ; audit log info ( " [ { } ] to acl [ { } ] " , path , acl spec ) ; response = response ok ( ) build ( ) ; break ; } case removeacl : { f s operations f s remove acl command = new f s operations f s remove acl ( path ) ; fs execute ( user , command ) ; audit log info ( " [ { } ] removed acl " , path ) ; response = response ok ( ) build ( ) ; break ; } case modifyaclentries : { string acl spec = params get ( acl permission param name , acl permission param class ) ; f s operations f s modify acl entries command = new f s operations f s modify acl entries ( path , acl spec ) ; fs execute ( user , command ) ; audit log info ( " [ { } ] modify acl entry with [ { } ] " , path , acl spec ) ; response = response ok ( ) build ( ) ; break ; } case removeaclentries : { string acl spec = params get ( acl permission param name , acl permission param class ) ; f s operations f s remove acl entries command = new f s operations f s remove acl entries ( path , acl spec ) ; fs execute ( user , command ) ; audit log info ( " [ { } ] remove acl entry [ { } ] " , path , acl spec ) ; response = response ok ( ) build ( ) ; break ; } case removedefaultacl : { f s operations f s remove default acl command = new f s operations f s remove default acl ( path ) ; fs execute ( user , command ) ; audit log info ( " [ { } ] remove default acl " , path ) ; response = response ok ( ) build ( ) ; break ; } case setstoragepolicy : { string policy name = params get ( policy name param name , policy name param class ) ; f s operations f s set storage policy command = new f s operations f s set storage policy ( path , policy name ) ; fs execute ( user , command ) ; audit log info ( " [ { } ] to policy [ { } ] " , path , policy name ) ; response = response ok ( ) build ( ) ; break ; } case setecpolicy : { string policy name = params get ( e c policy param name , e c policy param class ) ; f s operations f s set erasure coding policy command = new f s operations f s set erasure coding policy ( path , policy name ) ; fs execute ( user , command ) ; audit log info ( " [ { } ] to policy [ { } ] " , path , policy name ) ; response = response ok ( ) build ( ) ; break ; } case satisfystoragepolicy : { f s operations f s satisy storage policy command = new f s operations f s satisy storage policy ( path ) ; fs execute ( user , command ) ; audit log info ( " satisfy storage policy for [ { } ] " , path ) ; response = response ok ( ) build ( ) ; break ; } default : { throw new i o exception ( message format format ( " invalid http put operation [ { 0 } ] " , op value ( ) ) ) ; } } return response ; }


returns whether this { @ code hash code } and that { @ code hash code } have the same value , given that they have the same number of bits

abstract boolean equals same bits ( hash code that ) ;


the response resources wrapped in the common mcp resource message < code > repeated istio mcp v 1alpha 1 resource resources = 2 ; < code >

public builder set resources ( int index , com alibaba nacos istio model mcp resource builder builder for value ) { if ( resources builder = = null ) { ensure resources is mutable ( ) ; resources set ( index , builder for value build ( ) ) ; on changed ( ) ; } else { resources builder set message ( index , builder for value build ( ) ) ; } return this ; }


public long get bind space ( ) { return ( ( data high level shader language symbol internals 3 2 extended ) internals ) get bind space ( ) ; }


public boolean delete config ( http servlet request request , http servlet response response , @ request param ( " namespace id " ) string namespace id ) { persist service remove tenant info atomic ( " 1 " , namespace id ) ; return true ; }


post fakeinline - additional properties : test inline additional properties

default response entity < void > test inline additional properties ( @ api param ( value = " request body " , required = true ) @ valid @ request body map < string , string > param ) { return get delegate ( ) test inline additional properties ( param ) ; }


consider using { @ link # create statement ( string , parsing options ) }

public statement create statement ( string sql ) { return create statement ( sql , new parsing options ( ) ) ; }


use platform - based toolchain resolution

public void set up ( ) throws exception { overwrite file ( " java / bar / build " , " java library ( " , " name = ' bar ' , " , " srcs = [ ' s java ' ] , " , " data = [ ' robolectric - deps properties ' ] ) " ) ; overwrite file ( " java / bar / foo bzl " , " extra deps = [ ' / / java / bar : bar ' ] " ) ; }


returns { @ code true } if this { @ link request } is equivalent to the given { @ link request } ( has all of the same options and sizes ) this method is identical to { @ link object # equals ( object ) } except that it ' s specific to { @ link request } subclasses we do not use { @ link object # equals ( object ) } directly because we track { @ link request } s in collections like { @ link java util set } and it ' s perfectly legitimate to have two different { @ link request } objects for two different { @ link com bumptech glide request target target } s ( for example ) using a similar but different method let ' s us selectively compare { @ link request } objects to each other when it ' s useful in specific scenarios

boolean is equivalent to ( request other ) ;


adds the given plugin to the tool and then returns the instance of the plugin that was added

public static < t extends plugin > t add plugin ( plugin tool tool , class < t > c ) throws plugin exception { tool add plugin ( c get name ( ) ) ; return get plugin ( tool , c ) ; }


performs a cas operation on the { @ link # waiters } field

boolean cas waiters ( abstract future < ? > future , waiter expect , waiter update ) { return unsafe compare and swap object ( future , waiters offset , expect , update ) ; }


private void put long key record ( d b record record ) throws i o exception { / / boolean inserted = false ; try { / / ? ? do we need to validate record against schema / / establish root node + + mod count ; long key node root node = null ; if ( root buffer id < 0 ) { root node = long key record node create record node ( node mgr , schema ) ; } else { root node = node mgr get long key node ( root buffer id ) ; } / / put record and update root buffer id long rec key = record get key ( ) ; long key record node leaf = root node get leaf node ( rec key ) ; root node = leaf put record ( record , is indexed ? this : null ) ; int id = root node get buffer id ( ) ; if ( root buffer id ! = id ) { root buffer id = id ; table record set root buffer id ( root buffer id ) ; } / / update maximum key if ( maximum key < rec key ) { maximum key = rec key ; table record set max key ( maximum key ) ; } } finally { / / release node buffers and update record count int delta = node mgr release nodes ( ) ; if ( delta ! = 0 ) { / / inserted = true ; record count + = delta ; table record set record count ( record count ) ; } } }


get the platform plugins added in the version range

/ * package * / j s o n array get platform plugins for update ( version number from , version number to ) { jenkins jenkins = jenkins get ( ) ; j s o n array plugin categories = j s o n array from object ( get platform plugin list ( ) to string ( ) ) ; for ( iterator < ? > category iterator = plugin categories iterator ( ) ; category iterator has next ( ) ; ) { object category = category iterator next ( ) ; if ( category instanceof j s o n object ) { j s o n object cat = ( j s o n object ) category ; j s o n array plugins = cat get j s o n array ( " plugins " ) ; next plugin : for ( iterator < ? > plugin iterator = plugins iterator ( ) ; plugin iterator has next ( ) ; ) { object plugin data = plugin iterator next ( ) ; if ( plugin data instanceof j s o n object ) { j s o n object plugin = ( j s o n object ) plugin data ; if ( plugin has ( " added " ) ) { string since version = plugin get string ( " added " ) ; if ( since version ! = null ) { version number v = new version number ( since version ) ; if ( v compare to ( to ) < = 0 & & v compare to ( from ) > 0 ) { / / this plugin is valid , we ' ll leave " suggested " state / / to match the experience during install / / but only add it if it ' s currently uninstalled string plugin name = plugin get string ( " name " ) ; if ( null = = jenkins get plugin manager ( ) get plugin ( plugin name ) ) { / / also check that a compatible version exists in an update site boolean found compatible version = false ; for ( update site site : jenkins get update center ( ) get site list ( ) ) { update site plugin site plug = site get plugin ( plugin name ) ; if ( site plug ! = null & & ! site plug is for newer hudson ( ) & & ! site plug is for newer java ( ) & & ! site plug is needed dependencies for newer jenkins ( ) ) { found compatible version = true ; break ; } } if ( found compatible version ) { continue next plugin ; } } } } } } plugin iterator remove ( ) ; } if ( plugins is empty ( ) ) { category iterator remove ( ) ; } } } return plugin categories ; }


tests appending after soft - limit expires

public void test append 2 after soft limit ( ) throws exception { configuration conf = new hdfs configuration ( ) ; conf set int ( d f s config keys dfs replication key , 1 ) ; / / set small soft - limit for lease final long soft limit = 1l ; final long hard limit = 9999999l ; file builder base dir = new file ( generic test utils get randomized temp path ( ) ) ; mini d f s cluster cluster = new mini d f s cluster builder ( conf , builder base dir ) num data nodes ( 1 ) build ( ) ; cluster set lease period ( soft limit , hard limit ) ; cluster wait active ( ) ; distributed file system fs = cluster get file system ( ) ; distributed file system fs 2 = new distributed file system ( ) ; fs 2 initialize ( fs get uri ( ) , conf ) ; final path test path = new path ( " / test append after soft limit " ) ; final byte [ ] file contents = append test util init buffer ( 32 ) ; / / create a new file without closing f s data output stream out = fs create ( test path ) ; out write ( file contents ) ; / / wait for > soft - limit thread sleep ( 250 ) ; try { f s data output stream append stream 2 = fs 2 append ( test path , enum set of ( create flag append , create flag new block ) , 4096 , null ) ; append stream 2 write ( file contents ) ; append stream 2 close ( ) ; assert equals ( file contents length , fs get file status ( test path ) get len ( ) ) ; / / make sure we now have 1 block since the first writer was revoked located blocks blks = fs get client ( ) get located blocks ( test path to string ( ) , 0l ) ; assert equals ( 1 , blks get located blocks ( ) size ( ) ) ; for ( located block blk : blks get located blocks ( ) ) { assert equals ( file contents length , blk get block size ( ) ) ; } } finally { fs close ( ) ; fs 2 close ( ) ; cluster shutdown ( ) ; } }


groups the elements on some grouping keys use this before a selection with aggregations to perform the aggregation on a per - group basis similar to a sql group by statement scala example : { @ code tab group by ( $ ( " key " ) ) select ( $ ( " key " ) , $ ( " value " ) avg ( ) ) ; } scala example : { @ code tab group by ( $ " key " ) select ( $ " key " , $ " value " avg ) }

grouped table group by ( expression fields ) ;


uploads two byte arrays for different jobs into the server via the { @ link blob server } file transfers should be successful

private void test put buffer successful get ( @ nullable job i d job id 1 , @ nullable job i d job id 2 , blob key blob type blob type ) throws i o exception { final configuration config = new configuration ( ) ; config set string ( blob server options storage directory , temporary folder new folder ( ) get absolute path ( ) ) ; try ( blob server server = new blob server ( config , new void blob store ( ) ) ) { server start ( ) ; byte [ ] data = new byte [ 2000000 ] ; rnd next bytes ( data ) ; byte [ ] data 2 = arrays copy of range ( data , 10 , 54 ) ; / / put data for job id 1 and verify blob key key 1a = put ( server , job id 1 , data , blob type ) ; assert not null ( key 1a ) ; / / second upload of same data should yield a different blob key blob key key 1a 2 = put ( server , job id 1 , data , blob type ) ; assert not null ( key 1a 2 ) ; verify key different hash equals ( key 1a , key 1a 2 ) ; blob key key 1b = put ( server , job id 1 , data 2 , blob type ) ; assert not null ( key 1b ) ; verify contents ( server , job id 1 , key 1a , data ) ; verify contents ( server , job id 1 , key 1a 2 , data ) ; verify contents ( server , job id 1 , key 1b , data 2 ) ; / / now put data for job id 2 and verify that both are ok blob key key 2a = put ( server , job id 2 , data , blob type ) ; assert not null ( key 2a ) ; verify key different hash equals ( key 1a , key 2a ) ; blob key key 2b = put ( server , job id 2 , data 2 , blob type ) ; assert not null ( key 2b ) ; verify key different hash equals ( key 1b , key 2b ) ; / / verify the accessibility and the blob contents verify contents ( server , job id 2 , key 2a , data ) ; verify contents ( server , job id 2 , key 2b , data 2 ) ; / / verify the accessibility and the blob contents one more time ( transient b l o bs should / / not be deleted here ) verify contents ( server , job id 1 , key 1a , data ) ; verify contents ( server , job id 1 , key 1a 2 , data ) ; verify contents ( server , job id 1 , key 1b , data 2 ) ; verify contents ( server , job id 2 , key 2a , data ) ; verify contents ( server , job id 2 , key 2b , data 2 ) ; } }


returns the time when the result was created , in milliseconds since epoch

public long get time ( ) { return time ; }


< code > re diff sub set < code > re - determines the differences between the two programs for the indicated address set

synchronized void re diff sub set ( address set view sub set , task monitor monitor ) throws cancelled exception { if ( monitor = = null ) { / / create a do nothing task monitor that we can pass along monitor = task monitor adapter dummy monitor ; } monitor check canceled ( ) ; program diff sub diff ; try { sub diff = new program diff ( program 1 , program 2 , sub set ) ; sub diff get differences ( re diff filter , monitor ) ; monitor set message ( " adjusting differences due to apply " ) ; / / adjust any required address sets int [ ] pt = program diff filter get primary types ( ) ; for ( int element : pt ) { integer key = new integer ( element ) ; address set this set = diff addr sets get ( key ) ; if ( this set = = null ) { continue ; / / this is not part of current address sets } address set other set = sub diff diff addr sets get ( key ) ; this set = this set subtract ( sub set ) ; this set add ( other set ) ; diff addr sets put ( key , this set ) ; filter changed = true ; } } catch ( program conflict exception e 1 ) { msg error ( this , " unexpected exception : " + e 1 get message ( ) , e 1 ) ; } catch ( illegal argument exception e 1 ) { msg error ( this , " unexpected exception : " + e 1 get message ( ) , e 1 ) ; } }


public index request op type ( op type op type ) { if ( op type ! = op type create & & op type ! = op type index ) { throw new illegal argument exception ( " op type must be ' create ' or ' index ' , found : [ " + op type + " ] " ) ; } this op type = op type ; return this ; }


find a unique argument matching the given type

public method parameter arg ( class < ? > type , class < ? > generics ) { return new arg resolver ( ) arg ( type , generics ) ; }


public void set alt a s t pointers ( left recursive rule r , rule a s t t ) { / / system out println ( " rule : " + t to string tree ( ) ) ; block a s t rule blk = ( block a s t ) t get first child with type ( a n t l r parser block ) ; alt a s t main alt = ( alt a s t ) rule blk get child ( 0 ) ; block a s t primary blk = ( block a s t ) main alt get child ( 0 ) ; block a s t ops blk = ( block a s t ) main alt get child ( 1 ) get child ( 0 ) ; / / ( * block ) for ( int i = 0 ; i < r rec primary alts size ( ) ; i + + ) { left recursive rule alt info alt info = r rec primary alts get ( i ) ; alt info alt a s t = ( alt a s t ) primary blk get child ( i ) ; alt info alt a s t left recursive alt info = alt info ; alt info original alt a s t left recursive alt info = alt info ; / / alt info original alt a s t parent = alt info alt a s t parent ; / / system out println ( alt info alt a s t to string tree ( ) ) ; } for ( int i = 0 ; i < r rec op alts size ( ) ; i + + ) { left recursive rule alt info alt info = r rec op alts get element ( i ) ; alt info alt a s t = ( alt a s t ) ops blk get child ( i ) ; alt info alt a s t left recursive alt info = alt info ; alt info original alt a s t left recursive alt info = alt info ; / / alt info original alt a s t parent = alt info alt a s t parent ; / / system out println ( alt info alt a s t to string tree ( ) ) ; } }


sets the specified 16 - bit short integer at the current { @ code writer index } and increases the { @ code writer index } by { @ code 2 } in this buffer the 16 high - order bits of the specified value are ignored if { @ code this writable bytes } is less than { @ code 2 } , { @ link # ensure writable ( int ) } will be called in an attempt to expand capacity to accommodate

public abstract byte buf write short ( int value ) ;


add a long value at the specified address

public void add ( address addr , long value ) { lps put long ( addr map get key ( addr ) , value ) ; }


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


( asynchronously ) to test the collection format in query parameters

public okhttp 3 call test query parameter collection format async ( list < string > pipe , list < string > ioutil , list < string > http , list < string > url , list < string > context , final api callback < void > callback ) throws api exception { okhttp 3 call local var call = test query parameter collection format validate before call ( pipe , ioutil , http , url , context , callback ) ; local var api client execute async ( local var call , callback ) ; return local var call ; }


close the bundle view factories on context shutdown

public void destroy ( ) throws beans exception { for ( configurable application context factory : this bundle cache values ( ) ) { factory close ( ) ; } this locale cache clear ( ) ; this bundle cache clear ( ) ; }


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

public void set if unmodified since ( instant if unmodified since ) { set instant ( if unmodified since , if unmodified since ) ; }


reads a 16 - bit value at the address of < code > buf < code >

protected static long read word ( mem buffer buf ) throws memory access exception { return buf get short ( 0 ) ; }


add a new encryption zone called while holding the f s directory lock

void add encryption zone ( long inode id , cipher suite suite , crypto protocol version version , string key name ) { assert dir has write lock ( ) ; unprotected add encryption zone ( inode id , suite , version , key name ) ; }


each argument is prepended by the before each param

public builder add before ( @ compile time constant string before each ) { preconditions check not null ( before each ) ; this before each = before each ; return this ; }


convert nanoseconds time to milliseconds

public static long nanos to millis ( long nanos ) { return nanos / nanos per milli ; }


public void put ( string path , route route , response transformer transformer ) { add route ( http method put , response transformer route impl create ( path , route , transformer ) ) ; }


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


flush the section got table to a new % got memory block

private void create got ( ) { if ( last section got entry address = = null ) { return ; } int size = ( int ) last section got entry address subtract ( section got address ) + 1 ; string section name = relocation table get section to be relocated ( ) get name as string ( ) ; string block name = get section got name ( ) ; try { memory block block = memory block utils create initialized block ( program , false , block name , section got address , size , " got for " + section name + " section " , " mips - elf loader " , true , false , false , load helper get log ( ) ) ; data converter converter = program get memory ( ) is big endian ( ) ? big endian data converter instance : little endian data converter instance ; for ( long symbol value : got map key set ( ) ) { address addr = got map get ( symbol value ) ; byte [ ] bytes ; if ( program get default pointer size ( ) = = 4 ) { bytes = converter get bytes ( ( int ) symbol value ) ; } else { bytes = converter get bytes ( symbol value ) ; } block put bytes ( addr , bytes ) ; load helper create data ( addr , pointer data type data type ) ; } } catch ( memory access exception e ) { throw new assert exception ( e ) ; / / unexpected } }


returns the element at the specified depth in this stack 0 indicates the bottom of the stack size ( ) - 1 indicates the top of the stack

public e get ( int depth ) { return list get ( depth ) ; }


verifies that no interactions happened on given mocks < pre class = " code " > < code class = " java " > verify no interactions ( mock one , mock two ) ; < code > this method will also detect invocations that occurred before the test method , for example : in < code > set up ( ) < code > , < code > & # 064 ; before < code > method or in constructor consider writing nice code that makes interactions only in test methods see also { @ link mockito # never ( ) } - it is more explicit and communicates the intent well see examples in javadoc for { @ link mockito } class

public static void verify no interactions ( object mocks ) { mockito core verify no interactions ( mocks ) ; }


find the fields constant that matches name , or null if its not found

public static fields find by name ( java lang string name ) { return by name get ( name ) ; }


set the body of the request and build it the string is assumed to be utf - 8 encoded unless the request has a " content - type " header with a charset attribute

mock server http request body ( string body ) ;


draws a filled linear path on the canvas

protected void draw linear fill ( canvas c , i line data set data set , transformer trans , x bounds bounds ) { final path filled = m generate filled path buffer ; final int starting index = bounds min ; final int ending index = bounds range + bounds min ; final int index interval = 128 ; int current start index = 0 ; int current end index = index interval ; int iterations = 0 ; / / doing this iteratively in order to avoid out of memory errors that can happen on large bounds sets do { current start index = starting index + ( iterations * index interval ) ; current end index = current start index + index interval ; current end index = current end index > ending index ? ending index : current end index ; if ( current start index < = current end index ) { generate filled path ( data set , current start index , current end index , filled ) ; trans path value to pixel ( filled ) ; final drawable drawable = data set get fill drawable ( ) ; if ( drawable ! = null ) { draw filled path ( c , filled , drawable ) ; } else { draw filled path ( c , filled , data set get fill color ( ) , data set get fill alpha ( ) ) ; } } iterations + + ; } while ( current start index < = current end index ) ; }


try to delete a file , verify that it is not allowed

public static void assert delete forbidden ( final file system fs , final path path ) throws exception { intercept ( access denied exception class , " " , ( ) - > fs delete ( path , true ) ) ; }


{ @ inherit doc } if a cancellation attempt succeeds on a { @ code future } that had previously been { @ linkplain # set future set asynchronously } , then the cancellation will also be propagated to the delegate { @ code future } that was supplied in the { @ code set future } call

public boolean cancel ( boolean may interrupt if running ) { object local value = value ; boolean r value = false ; if ( local value = = null | local value instanceof set future ) { / / try to delay allocating the exception at this point we may still / / lose the cas , but it is certainly less likely throwable cause = generate cancellation causes ? new cancellation exception ( " future cancel ( ) was called " ) : null ; object value to set = new cancellation ( may interrupt if running , cause ) ; abstract future < ? > abstract future = this ; while ( true ) { if ( atomic helper cas value ( abstract future , local value , value to set ) ) { r value = true ; / / we call interupt task before calling complete ( ) , which is / / consistent with future task if ( may interrupt if running ) { abstract future interrupt task ( ) ; } complete ( abstract future ) ; if ( local value instanceof set future ) { / / propagate cancellation to the future set in setfuture , this is / / racy , and we don ' t care if we are successful or not listenable future < ? > future to propagate to = ( ( set future ) local value ) future ; if ( future to propagate to instanceof trusted future ) { / / if the future is a trusted future then we specifically avoid / / calling cancel ( ) this has 2 benefits / / 1 for long chains of futures strung together with set future / / we consume less stack / / 2 we avoid allocating cancellation objects at every level of / / the cancellation chain / / we can only do this for trusted future , because / / trusted future cancel is final and does nothing but delegate / / to this method abstract future < ? > trusted = ( abstract future < ? > ) future to propagate to ; local value = trusted value ; if ( local value = = null | local value instanceof set future ) { abstract future = trusted ; continue ; / / loop back up and try to complete the new future } } else { / / not a trusted future , call cancel directly future to propagate to cancel ( may interrupt if running ) ; } } break ; } / / obj changed , reread local value = abstract future value ; if ( ! ( local value instanceof set future ) ) { / / obj cannot be null at this point , because value can only change / / from null to non - null so if value changed ( and it did since we / / lost the cas ) , then it cannot be null and since it isn ' t a / / set future , then the future must be done and we should exit the loop break ; } } } return r value ; }


see { @ link # is attribute value explicitly specified ( string ) }

public boolean is attribute value explicitly specified ( attribute attribute ) { return is attribute value explicitly specified ( attribute get name ( ) ) ; }


excluded nodes are not verified and will be ignored by placement if they are not in the same nameservice as the file

public located block get additional datanode ( final string src , final long file id , final extended block blk , final datanode info [ ] existings , final string [ ] existing storage i ds , final datanode info [ ] excludes , final int num additional nodes , final string client name ) throws i o exception { return client proto get additional datanode ( src , file id , blk , existings , existing storage i ds , excludes , num additional nodes , client name ) ; }


gets the address of the rtti2 that is referred to from an rtti3 structure that is placed at the indicated address

public address get rtti 2 address ( ) throws invalid data type exception { check validity ( ) ; return get rtti 2 address ( get program ( ) , get address ( ) ) ; }


return if this transaction is defined as read - only transaction

public boolean is read only ( ) { return this read only ; }


gets the export address table jumps directory

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


public okhttp 3 call delete order call ( string order id , final api callback callback ) throws api exception { object local var post body = null ; / / create path and map variables string local var path = " / store / order / { order id } " replace all ( " \ \ { " + " order id " + " \ \ } " , local var api client escape string ( order id to string ( ) ) ) ; list < pair > local var query params = new array list < pair > ( ) ; list < pair > local var collection query params = new array list < pair > ( ) ; map < string , string > local var header params = new hash map < string , string > ( ) ; map < string , string > local var cookie params = new hash map < string , string > ( ) ; map < string , object > local var form params = new hash map < string , object > ( ) ; final string [ ] local var accepts = { } ; final string local var accept = local var api client select header accept ( local var accepts ) ; if ( local var accept ! = null ) { local var header params put ( " accept " , local var accept ) ; } final string [ ] local var content types = { } ; final string local var content type = local var api client select header content type ( local var content types ) ; local var header params put ( " content - type " , local var content type ) ; string [ ] local var auth names = new string [ ] { } ; return local var api client build call ( local var path , " delete " , local var query params , local var collection query params , local var post body , local var header params , local var cookie params , local var form params , local var auth names , callback ) ; }


returns the internal offload executor pool for offloading tasks

public object pool < ? extends executor > get offload executor pool ( ) { return this offload executor pool ; }


the shard routing passed to { @ link # can allocate ( shard routing , routing node , routing allocation ) } is not the initializing shard to this node but : - the unassigned shard routing in case if we want to assign an unassigned shard to this node - the initializing shard routing if we want to assign the initializing shard to this node instead - the started shard routing in case if we want to check if we can relocate to this node - the relocating shard routing if we want to relocate to this node now instead this method returns the corresponding initializing shard that would be allocated to this node

private shard routing initializing shard ( shard routing shard routing , string current node id ) { final shard routing initializing shard ; if ( shard routing unassigned ( ) ) { initializing shard = shard routing initialize ( current node id , null , shard routing unavailable expected shard size ) ; } else if ( shard routing initializing ( ) ) { unassigned info unassigned info = shard routing unassigned info ( ) ; if ( unassigned info = = null ) { / / unassigned shards must have unassigned info ( initializing shards might not ) unassigned info = new unassigned info ( unassigned info reason allocation failed , " fake " ) ; } initializing shard = shard routing move to unassigned ( unassigned info ) initialize ( current node id , null , shard routing unavailable expected shard size ) ; } else if ( shard routing relocating ( ) ) { initializing shard = shard routing cancel relocation ( ) relocate ( current node id , shard routing unavailable expected shard size ) get target relocating shard ( ) ; } else { assert shard routing started ( ) ; initializing shard = shard routing relocate ( current node id , shard routing unavailable expected shard size ) get target relocating shard ( ) ; } assert initializing shard initializing ( ) ; return initializing shard ; }


find a suitable { @ link security module factory } based on canonical name

public static security module factory find module factory ( string security module factory class ) throws no match security factory exception { return find factory internal ( security module factory class , security module factory class , security module factory class get class loader ( ) ) ; }


returns the encoding for a given aac audio object type

public static int get encoding for audio object type ( @ aac audio object type int audio object type ) { switch ( audio object type ) { case audio object type aac lc : return c encoding aac lc ; case audio object type aac sbr : return c encoding aac he v1 ; case audio object type aac ps : return c encoding aac he v2 ; case audio object type aac xhe : return c encoding aac xhe ; case audio object type aac eld : return c encoding aac eld ; case audio object type aac er bsac : return c encoding aac er bsac ; default : return c encoding invalid ; } }


returns all captured values use it when capturing varargs or when the verified method was called multiple times when varargs method was called multiple times , this method returns merged list of all values from all invocations example : < pre class = " code " > < code class = " java " > mock do something ( new person ( " john " ) ; mock do something ( new person ( " jane " ) ; argument captor & lt ; person & gt ; people captor = argument captor for class ( person class ) ; verify ( mock , times ( 2 ) ) do something ( people captor capture ( ) ) ; list & lt ; person & gt ; captured people = people captor get all values ( ) ; assert equals ( " john " , captured people get ( 0 ) get name ( ) ) ; assert equals ( " jane " , captured people get ( 1 ) get name ( ) ) ; example of capturing varargs : < pre class = " code " > < code class = " java " > mock count people ( new person ( " john " ) , new person ( " jane " ) ; vararg method argument captor & lt ; person & gt ; people captor = argument captor for class ( person class ) ; verify ( mock ) count people ( people captor capture ( ) ) ; list expected = as list ( new person ( " john " ) , new person ( " jane " ) ) ; assert equals ( expected , people captor get all values ( ) ) ; < code > see more examples in javadoc for { @ link argument captor } class

public list < t > get all values ( ) { return this capturing matcher get all values ( ) ; }


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


creates an artifact in a directory that is unique to the package that contains the rule , thus guaranteeing that it never clashes with artifacts created by rules in other packages

artifact get package relative artifact ( path fragment relative , artifact root root ) ;


return the list of argument resolvers to use subclasses should also take into account custom argument types configured via { @ link # set argument resolver configurer }

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


creates a builder for the { @ link external sorter }

public static < e > external sorter builder < e > new builder ( memory manager memory manager , abstract invokable parent task , type serializer < e > serializer , type comparator < e > comparator ) { return new external sorter builder < > ( check not null ( memory manager ) , check not null ( parent task ) , check not null ( serializer ) , check not null ( comparator ) ) ; }


given an array of weights , find the index with the highest weight

private static int find highest weight index ( double [ ] weights ) { double highest weight = double negative infinity ; int highest weight format index = - 1 ; for ( int index = 0 ; index < weights length ; + + index ) { double weight = weights [ index ] ; if ( weight > highest weight ) { highest weight = weight ; highest weight format index = index ; } } return highest weight format index ; }


checks the validity of the field and sets the appropriate field attributes

private void validate field ( ) { set background ( is field valid ( ) ? valid color : invalid color ) ; }


this method is handling the illegal access exceptions of field get ( )

public final object access field ( field field , object object ) { try { object = field get ( object ) ; } catch ( null pointer exception npex ) { throw new null key field exception ( " unable to access field " + field + " on object " + object ) ; } catch ( illegal access exception iaex ) { throw new runtime exception ( " this should not happen since we call set accesssible ( true ) in the ctor " + " fields : " + field + " obj : " + object ) ; } return object ; }


return the original sql input by the upper application


generates all test cases appropriate for the given method

private static void add tests ( test suite suite , method method ) { if ( is guarded ( method ) ) { for ( boolean fair 1 : new boolean [ ] { true , false } ) { for ( boolean fair 2 : new boolean [ ] { true , false } ) { suite add test ( generate guard with wrong monitor test case ( method , fair 1 , fair 2 ) ) ; } } } if ( is any enter ( method ) ) { add tests ( suite , method , scenario satisfied and unoccupied before entering , timeouts to use any , outcome success ) ; add tests ( suite , method , scenario unsatisfied and unoccupied before entering , timeouts to use finite , is guarded ( method ) ? ( is boolean ( method ) ? outcome failure : outcome hang ) : outcome success ) ; add tests ( suite , method , scenario unsatisfied and unoccupied before entering , timeouts to use infinite , is guarded ( method ) ? ( is try enter ( method ) | | is enter if ( method ) ? outcome failure : outcome hang ) : outcome success ) ; add tests ( suite , method , scenario satisfied and occupied before entering , timeouts to use finite , is boolean ( method ) ? outcome failure : outcome hang ) ; add tests ( suite , method , scenario satisfied and occupied before entering , timeouts to use infinite , is guarded ( method ) ? outcome hang : ( is try enter ( method ) ? outcome failure : outcome hang ) ) ; add tests ( suite , method , scenario satisfied unoccupied and interrupted before entering , timeouts to use any , is interruptible ( method ) ? outcome interrupt : outcome success ) ; } else { / / any wait for xxx method suite add test ( generate wait for when not occupying test case ( method , true ) ) ; suite add test ( generate wait for when not occupying test case ( method , false ) ) ; add tests ( suite , method , scenario satisfied before waiting , timeouts to use any , outcome success ) ; add tests ( suite , method , scenario satisfied while waiting , timeouts to use infinite , outcome success ) ; add tests ( suite , method , scenario satisfied while waiting , timeouts to use past , outcome failure ) ; add tests ( suite , method , scenario satisfied and interrupted before waiting , timeouts to use any , outcome success ) ; add tests ( suite , method , scenario unsatisfied before and while waiting , timeouts to use finite , outcome failure ) ; add tests ( suite , method , scenario unsatisfied before and while waiting , timeouts to use infinite , outcome hang ) ; add tests ( suite , method , scenario unsatisfied and interrupted before waiting , timeouts to use past , / / prefer responding to interrupt over timing out is interruptible ( method ) ? outcome interrupt : outcome failure ) ; add tests ( suite , method , scenario unsatisfied and interrupted before waiting , timeouts to use small , is interruptible ( method ) ? outcome interrupt : outcome failure ) ; add tests ( suite , method , scenario unsatisfied and interrupted before waiting , timeouts to use infinite , is interruptible ( method ) ? outcome interrupt : outcome hang ) ; } }


public list < mime type > get supported mime types ( ) { return collections unmodifiable list ( this supported mime types ) ; }


add the stats to the reporter , print if completed , and stop the simulator

private void report stats ( policy stats stats ) throws i o exception { reporter add ( stats ) ; if ( reporter stats ( ) size ( ) = = seq as java list ( router routees ( ) ) size ( ) ) { reporter print ( ) ; context ( ) stop ( self ( ) ) ; system out println ( " executed in " + stopwatch ) ; } }


appends the stack trace of the provided throwable onto the provided primary exception this is useful for when exceptions are thrown inside of asynchronous systems ( like runnables in an executor ) where you ' d otherwise lose important parts of the stack trace this lets you save a throwable at the entry point , and then combine it with any caught exceptions later

public static runtime exception append stack trace ( @ non null runtime exception primary , @ non null throwable secondary ) { stack trace element [ ] now = primary get stack trace ( ) ; stack trace element [ ] then = secondary get stack trace ( ) ; stack trace element [ ] combined = new stack trace element [ now length + then length ] ; system arraycopy ( now , 0 , combined , 0 , now length ) ; system arraycopy ( then , 0 , combined , now length , then length ) ; primary set stack trace ( combined ) ; return primary ; }


wraps the given animation backend with an activity check when no frame has been drawn for more than 2 seconds , an inactivity toast message will be displayed

public static animation backend wrap animation backend with inactivity check ( final context context , final animation backend animation backend ) { animation backend delegate with inactivity check inactivity listener inactivity listener = new animation backend delegate with inactivity check inactivity listener ( ) { @ override public void on inactive ( ) { / / forward the inactive callback to the backend if needed if ( animation backend instanceof animation backend delegate with inactivity check inactivity listener ) { ( ( animation backend delegate with inactivity check inactivity listener ) animation backend ) on inactive ( ) ; } toast make text ( context , " animation backend inactive " , toast length short ) show ( ) ; } } ; return create for backend ( animation backend , inactivity listener , realtime since boot clock get ( ) , ui thread immediate executor service get instance ( ) ) ; }


gets the proto representation of the python user - defined table aggregate function to be executed

public flink fn api user defined aggregate functions get user defined functions proto ( ) { flink fn api user defined aggregate functions builder builder = super get user defined functions proto ( ) to builder ( ) ; return builder build ( ) ; }


sets the min width and min height to the specified values

public cell < t > min size ( value width , value height ) { if ( width = = null ) throw new illegal argument exception ( " width cannot be null " ) ; if ( height = = null ) throw new illegal argument exception ( " height cannot be null " ) ; min width = width ; min height = height ; return this ; }


resolve the specified cached method argument or field value

private object resolved cached argument ( @ nullable string bean name , @ nullable object cached argument ) { if ( cached argument instanceof dependency descriptor ) { dependency descriptor descriptor = ( dependency descriptor ) cached argument ; assert state ( this bean factory ! = null , " no bean factory available " ) ; return this bean factory resolve dependency ( descriptor , bean name , null , null ) ; } else { return cached argument ; } }


protected method for plugging in a custom subclass of { @ link exception handler exception resolver }

protected exception handler exception resolver create exception handler exception resolver ( ) { return new exception handler exception resolver ( ) ; }


assign a new , unique port to the test this method works by assigning ports from a valid port range as identified by the total number of concurrent test processes and the id of this test process each concurrent test process uses an isolated range , so it ' s not possible for multiple test processes to collide on the same port within the port range , ports are assigned in monotonic increasing order , wrapping around to the beginning of the range if needed as an extra precaution , the method attempts to bind to the port and immediately close it before returning it to the caller if the port cannot be bound , then it tries the next one in the range this provides some resiliency in case the port is otherwise occupied , such as a developer running other servers on the machine running the tests

public static synchronized int unique ( ) { if ( port range = = null ) { integer thread id = integer get integer ( " zookeeper junit threadid " ) ; port range = setup port range ( system get property ( " test junit threads " ) , thread id ! = null ? " threadid = " + thread id : system get property ( " sun java command " ) ) ; next port = port range get minimum ( ) ; } int candidate port = next port ; for ( ; ; ) { + + candidate port ; if ( candidate port > port range get maximum ( ) ) { candidate port = port range get minimum ( ) ; } if ( candidate port = = next port ) { throw new illegal state exception ( string format ( " could not assign port from range % s the entire range has been exhausted " , port range ) ) ; } try { server socket s = new server socket ( candidate port ) ; s close ( ) ; next port = candidate port ; log info ( " assigned port { } from range { } " , next port , port range ) ; return next port ; } catch ( i o exception e ) { log debug ( " could not bind to port { } from range { } attempting next port " , candidate port , port range , e ) ; } } }


public void error ( supplier < ? extends char sequence > message supplier ) { if ( this log is error enabled ( ) ) { this log error ( log message of ( message supplier ) ) ; } }


tests range resource exhaustion ( i e insufficient resources )

public void test range resource exhaustion ( ) { mesos resource allocation allocation = new mesos resource allocation ( resources ( ports ( range ( 80 , 80 ) ) ) ) ; assert assert equals ( resources ( ports ( range ( 80 , 80 ) ) ) , allocation take ranges ( " ports " , 2 , as no role ) ) ; assert assert equals ( resources ( ) , allocation get remaining ( ) ) ; }


returns the installed embedded binaries directory , under the shared install base location

public path get embedded binaries root ( ) { return server directories get embedded binaries root ( ) ; }


returns the program object that the location refers to

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


public add pet oper resp spec ( consumer < response spec builder > resp spec customizer ) { resp spec customizer accept ( resp spec ) ; return this ; }


refresh the ejb home object and retry the given invocation called by invoke on connect failure

protected object refresh and retry ( method invocation invocation ) throws throwable { try { refresh home ( ) ; } catch ( naming exception ex ) { throw new remote lookup failure exception ( " failed to locate remote ejb [ " + get jndi name ( ) + " ] " , ex ) ; } return do invoke ( invocation ) ; }


start and wait until the negotiation is done , returns the negotiated protocol

public string negotiate ( s s l socket ssl socket , string hostname , @ nullable list < protocol > protocols ) throws i o exception { if ( protocols ! = null ) { configure tls extensions ( ssl socket , hostname , protocols ) ; } try { / / force handshake ssl socket start handshake ( ) ; string negotiated protocol = get selected protocol ( ssl socket ) ; if ( negotiated protocol = = null ) { throw new runtime exception ( " tls alpn negotiation failed with protocols : " + protocols ) ; } return negotiated protocol ; } finally { platform after handshake ( ssl socket ) ; } }


determines whether a get or head operation is configured to expect a body rfc7231 describes this behavior as : a payload within a get request message has no defined semantics ; sending a payload body on a get request might cause some existing implementations to reject the request see https : tools ietf orghtmlrfc 7 2 3 1 # section - 4 3 1 because there are no defined semantics , and because some client and server implementations may silently ignore the entire body ( see https : xhr spec whatwg org # the - send ( ) - method ) or throw an error ( see https : fetch spec whatwg org # ref - for - dfn - throw % e2 % 91 % a1 % e2 % 91 % a1 ) , we maintain that the existence of a body for this operation is most likely programmer error and raise awareness

private static validation rule result check antipattern get or head with body ( operation wrapper wrapper ) { if ( wrapper = = null ) { return validation rule pass empty ( ) ; } validation rule result result = validation rule pass empty ( ) ; if ( wrapper get http method ( ) = = path item http method get | | wrapper get http method ( ) = = path item http method head ) { request body body = wrapper get operation ( ) get request body ( ) ; if ( body ! = null ) { if ( string utils is not empty ( body get $ ref ( ) ) | | ( body get content ( ) ! = null & & body get content ( ) size ( ) > 0 ) ) { result = new validation rule fail ( ) ; result set details ( string format ( locale root , " % s % s contains a request body and is considered an anti - pattern " , wrapper get http method ( ) name ( ) , wrapper get operation ( ) get operation id ( ) ) ) ; } } } return result ; }


set the read - only status of this transaction the default is { @ code false }

public void set read only ( boolean read only ) { this read only = read only ; }


called when the view bound to this model is recycled subclasses can override this if their view should release resources when it ' s recycled note that { @ link # bind ( object ) } can be called multiple times without an unbind call in between if the view has remained on screen to be reused across item changes this means that you should not rely on unbind to clear a view or model ' s state before bind is called again

public void unbind ( @ non null t view ) { }


gets a clipping rect for the header based on the margins of the header and the padding of the recycler fixme : currently right margin in vertical orientation and bottom margin in horizontal orientation are clipped so they look accurate , but the headers are not being drawn at the correctly smaller width and height respectively

private rect get clip rect for header ( recycler view recycler view , view header ) { rect header margins = m dimension calculator get margins ( header ) ; if ( m orientation provider get orientation ( recycler view ) = = linear layout vertical ) { return new rect ( recycler view get padding left ( ) , recycler view get padding top ( ) , recycler view get width ( ) - recycler view get padding right ( ) - header margins right , recycler view get height ( ) - recycler view get padding bottom ( ) ) ; } else { return new rect ( recycler view get padding left ( ) , recycler view get padding top ( ) , recycler view get width ( ) - recycler view get padding right ( ) , recycler view get height ( ) - recycler view get padding bottom ( ) - header margins bottom ) ; } }


returns the decision for being allowed to rebalance the shard invoking this method will return { @ code null } if { @ link # can remain ( ) } ( ) } returns { @ code false } , which means the node is not allowed to remain on its current node , so the cluster is forced to attempt to move the shard to a different node , as opposed to attempting to rebalance the shard if a better cluster balance is possible by moving it if { @ link # is decision taken ( ) } returns { @ code false } , then invoking this method will throw an { @ code illegal state exception }

public decision get cluster rebalance decision ( ) { check decision state ( ) ; return cluster rebalance decision ; }


d b c query transformer create query transformer ( @ not null d b c query transform type type ) ;


public void save ( ) { / / save finished requirements by item type for ( item stack stack : finished requirements ) { core settings put ( " req - " + content name + " - " + stack item name , stack amount ) ; } }


checks if the input timeline entity object is an application entity

public static boolean is application entity ( timeline entity te ) { return ( te = = null ? false : te get type ( ) equals ( timeline entity type yarn application to string ( ) ) ) ; }


dispatches { @ link # on load completed ( int , media period id , load event info , media load data ) }

public void load completed ( load event info load event info , media load data media load data ) { for ( listener and handler listener and handler : listener and handlers ) { media source event listener listener = listener and handler listener ; post or run ( listener and handler handler , ( ) - > listener on load completed ( window index , media period id , load event info , media load data ) ) ; } }


sample all the mutable metrics and put the snapshot in the builder

public synchronized void snapshot ( metrics record builder builder , boolean all ) { for ( metrics tag tag : tags ( ) ) { builder add ( tag ) ; } for ( mutable metric metric : metrics ( ) ) { metric snapshot ( builder , all ) ; } }


find the one and only { @ code order by } in a plan

private order by order by ( logical plan plan ) { list < logical plan > l = plan children ( ) stream ( ) filter ( c - > c instanceof order by ) collect ( to list ( ) ) ; assert that ( " expected only one order by " , l , has size ( 1 ) ) ; return ( order by ) l get ( 0 ) ; }


obtain a " shortcut " non - singleton factory bean instance to use for a { @ code get object type ( ) } call , without full initialization of the factory bean

private factory bean < ? > get non singleton factory bean for type check ( string bean name , root bean definition mbd ) { if ( is prototype currently in creation ( bean name ) ) { return null ; } object instance ; try { / / mark this bean as currently in creation , even if just partially before prototype creation ( bean name ) ; / / give bean post processors a chance to return a proxy instead of the target bean instance instance = resolve before instantiation ( bean name , mbd ) ; if ( instance = = null ) { bean wrapper bw = create bean instance ( bean name , mbd , null ) ; instance = bw get wrapped instance ( ) ; } } catch ( unsatisfied dependency exception ex ) { / / don ' t swallow , probably misconfiguration throw ex ; } catch ( bean creation exception ex ) { / / instantiation failure , maybe too early if ( logger is debug enabled ( ) ) { logger debug ( " bean creation exception on non - singleton factory bean type check : " + ex ) ; } on suppressed exception ( ex ) ; return null ; } finally { / / finished partial creation of this bean after prototype creation ( bean name ) ; } return get factory bean ( bean name , instance ) ; }


sets the encoded image meta data if needed

private void parse metadata if needed ( ) { if ( m width < 0 | | m height < 0 ) { parse meta data ( ) ; } }


protected result check ( ) throws exception { try ( connection connection = pool get connection ( check timeout ms ) ) { return result healthy ( ) ; } catch ( s q l exception e ) { return result unhealthy ( e ) ; } }


returns { @ link set multimap # as map multimap as map ( ) } , with its type corrected from { @ code map < k , collection < v > > } to { @ code map < k , set < v > > }

public static < k , v > map < k , set < v > > as map ( set multimap < k , v > multimap ) { return ( map < k , set < v > > ) ( map < k , ? > ) multimap as map ( ) ; }


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

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


returns the key serializer for the queryable state instance

public type serializer < k > get key serializer ( ) { return key serializer ; }


this method is deprecated and will be removed in the future releases handle async db operation in your own logic instead

public < t > find executor < t > max async ( final string table name , final string column name , final class < t > column type ) { final find executor < t > executor = new find executor < > ( ) ; runnable runnable = new runnable ( ) { @ override public void run ( ) { synchronized ( lite pal support class ) { final t t = max ( table name , column name , column type ) ; if ( executor get listener ( ) ! = null ) { operator get handler ( ) post ( new runnable ( ) { @ override public void run ( ) { executor get listener ( ) on finish ( t ) ; } } ) ; } } } } ; executor submit ( runnable ) ; return executor ; }


public void test model return ( ) { / / todo : test model return }


the collection of items to add to the filter

public void set add items ( collection < string > add items ) { this add items = new tree set < > ( objects require non null ( add items , " [ " + add items get preferred name ( ) + " ] must not be null " ) ) ; }


test serialization of outer string types

public void fake outer string serialize ( string body , handler < async result < string > > result handler ) { fake outer string serialize ( body , null , result handler ) ; }


returns geo coordinate validation method to use

public geo validation method get validation method ( ) { return this validation method ; }


finishing reading the block release all resources

public void close ( ) throws i o exception { if ( closed = = true ) { return ; } try { / / do not set r blk state to null people may access stats after calling / / close ( ) r blk state finish ( ) ; } finally { closed = true ; } }


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

public response entity < set < pet > > find pets by tags ( @ not null @ api param ( value = " tags to filter by " , required = true ) @ valid @ request param ( value = " tags " , required = true ) set < string > tags ) { for ( media type media type : media type parse media types ( request get header ( " accept " ) ) ) { if ( media type is compatible with ( media type value of ( " application / json " ) ) ) { string example string = " { \ " photo urls \ " : [ \ " photo urls \ " , \ " photo urls \ " ] , \ " name \ " : \ " doggie \ " , \ " id \ " : 0 , \ " category \ " : { \ " name \ " : \ " default - name \ " , \ " id \ " : 6 } , \ " tags \ " : [ { \ " name \ " : \ " name \ " , \ " id \ " : 1 } , { \ " name \ " : \ " name \ " , \ " id \ " : 1 } ] , \ " status \ " : \ " available \ " } " ; api util set example response ( request , " application / json " , example string ) ; break ; } if ( media type is compatible with ( media type value of ( " application / xml " ) ) ) { string example string = " < pet > < id > 123456789 < / id > < name > doggie < / name > < photo urls > < photo urls > aeiou < / photo urls > < / photo urls > < tags > < / tags > < status > aeiou < / status > < / pet > " ; api util set example response ( request , " application / xml " , example string ) ; break ; } } return new response entity < > ( http status not implemented ) ; }


public void test no record length ( ) throws exception { local fs delete ( work dir , true ) ; path file = new path ( work dir , new string ( " test format txt " ) ) ; create file ( file , null , 10 , 10 ) ; / / create the job and do not set fixed record length job job = job get instance ( default conf ) ; file input format set input paths ( job , work dir ) ; fixed length input format format = new fixed length input format ( ) ; list < input split > splits = format get splits ( job ) ; boolean exception thrown = false ; for ( input split split : splits ) { try { task attempt context context = map reduce test util create dummy map task attempt context ( job get configuration ( ) ) ; record reader < long writable , bytes writable > reader = format create record reader ( split , context ) ; map context < long writable , bytes writable , long writable , bytes writable > mcontext = new map context impl < long writable , bytes writable , long writable , bytes writable > ( job get configuration ( ) , context get task attempt i d ( ) , reader , null , null , map reduce test util create dummy reporter ( ) , split ) ; reader initialize ( split , mcontext ) ; } catch ( i o exception ioe ) { exception thrown = true ; log info ( " exception message : " + ioe get message ( ) ) ; } } assert true ( " exception for not setting record length : " , exception thrown ) ; }


calls the smallest sub set overload that filters out the extreme values

sorted set < e > create sub set ( sorted set < e > set , e first exclusive , e last exclusive ) { if ( from = = bound no bound & & to = = bound exclusive ) { return set head set ( last exclusive ) ; } else if ( from = = bound inclusive & & to = = bound no bound ) { return set tail set ( first inclusive ) ; } else if ( from = = bound inclusive & & to = = bound exclusive ) { return set sub set ( first inclusive , last exclusive ) ; } else { throw new illegal argument exception ( ) ; } }


{ @ inherit doc } the default implementation returns the result of calling { @ link # visit children } on { @ code ctx }

@ override public t visit subquery ( sql base parser subquery context ctx ) { return visit children ( ctx ) ; }


change the auto - pass property for all functions with given full hash

public void set auto pass by full hash ( long hash , boolean value ) throws i o exception { check update allowed ( ) ; list < function record > func list = find functions by full hash ( hash ) ; modify flags ( func list , function record auto pass flag , value ) ; }


show the splash screen ; displayed only when ghidra is first coming up

public static splash screen show splash screen ( ) { if ( splash window ! = null ) { return splash window ; / / already showing } final j frame parent frame = get parent frame ( ) ; splash window = new splash screen ( parent frame ) ; initialize splash window and parent ( parent frame ) ; create splash screen close listeners ( parent frame ) ; parent frame set visible ( true ) ; splash window set visible ( true ) ; / / this call is needed for the splash screen to initially paint correctly on the mac splash window repaint ( ) ; return splash window ; }


test nextupdateremove during global iteration of state incremental visitor

public void test state incremental visitor ( ) { / / map to store expected states , namespace - > key - > state map < long , map < integer , string > > reference states = new hash map < > ( ) ; / / put some states for ( long namespace = 0 ; namespace < 15 ; namespace + + ) { for ( int key = 0 ; key < 20 ; key + + ) { string state = string value of ( namespace * key ) ; state map put ( key , namespace , state ) ; add to reference state ( reference states , key , namespace , state ) ; } } verify state ( reference states , state map ) ; internal kv state state incremental visitor < integer , long , string > visitor = state map get state incremental visitor ( 5 ) ; int op = 0 ; while ( visitor has next ( ) ) { for ( state entry < integer , long , string > state entry : visitor next entries ( ) ) { int key = state entry get key ( ) ; long namespace = state entry get namespace ( ) ; string state = state entry get state ( ) ; assert equals ( state , state map get ( key , namespace ) ) ; switch ( op ) { case 0 : visitor remove ( state entry ) ; remove from reference state ( reference states , key , namespace ) ; op = 1 ; break ; case 1 : string new state = state + " - update " ; visitor update ( state entry , new state ) ; add to reference state ( reference states , key , namespace , new state ) ; op = 2 ; break ; default : op = 0 ; break ; } } } verify state ( reference states , state map ) ; }


sets the preference to execute the search defaults to randomize across shards can be set to { @ code local } to prefer local shards or a custom value , which guarantees that the same order will be used across different requests

public multi get request builder set preference ( string preference ) { request preference ( preference ) ; return this ; }


returns true if the type for the memory blocks differ

public boolean is type different ( ) { return ( diff flags & type ) ! = 0 ; }


get or create a { @ link metric group } with the specified group name and the given tags each group is uniquely identified by the name and tags

public metric group group ( string group name , string tag key values ) { metric group id group id = group id ( group name , tag key values ) ; metric group group = groups by name get ( group id ) ; if ( group = = null ) { group = new metric group ( group id ) ; metric group previous = groups by name put if absent ( group id , group ) ; if ( previous ! = null ) group = previous ; } return group ; }


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


encodes the an integer as a string with given radix , then uses { @ link ints # try parse ( string , int ) } to parse the result asserts the result is the same as what we started with

private static void radix encode parse and assert equals ( integer value , int radix ) { assert equals ( " radix : " + radix , value , ints try parse ( integer to string ( value , radix ) , radix ) ) ; }


executed once for every failed shard level request this method is invoked before the next replica is tried for the given shard target

public final void on shard failure ( final int shard index , search shard target shard target , exception e ) { if ( transport actions is shard not available exception ( e ) ) { / / groups shard not available exceptions under a generic exception that returns a service unavailable ( 503 ) / / temporary error e = new no shard available action exception ( shard target get shard id ( ) , e get message ( ) ) ; } / / we don ' t aggregate shard on failures due to the internal cancellation , / / but do keep the header counts right if ( ( request cancelled get ( ) & & is task cancelled exception ( e ) ) = = false ) { atomic array < shard search failure > shard failures = this shard failures get ( ) ; / / lazily create shard failures , so we can early build the empty shard failure list in most cases ( no failures ) if ( shard failures = = null ) { / / this is double checked locking but it ' s fine since set once uses a volatile read internally synchronized ( shard failures mutex ) { shard failures = this shard failures get ( ) ; / / read again otherwise somebody else has created it ? if ( shard failures = = null ) { / / still null so we are the first and create a new instance shard failures = new atomic array < > ( get num shards ( ) ) ; this shard failures set ( shard failures ) ; } } } shard search failure failure = shard failures get ( shard index ) ; if ( failure = = null ) { shard failures set ( shard index , new shard search failure ( e , shard target ) ) ; } else { / / the failure is already present , try and not override it with an exception that is less meaningless / / for example , getting illegal shard state if ( transport actions is read override exception ( e ) & & ( e instanceof search context missing exception = = false ) ) { shard failures set ( shard index , new shard search failure ( e , shard target ) ) ; } } if ( results has result ( shard index ) ) { assert failure = = null : " shard failed before but shouldn ' t : " + failure ; successful ops decrement and get ( ) ; / / if this shard was successful before ( initial phase ) we have to adjust the counter } } results consume shard failure ( shard index ) ; }


hook for pre - processing a test immediately before execution of the { @ linkplain java lang reflect method test method } in the supplied { @ linkplain test context test context } & mdash ; for example , for timing or logging purposes this method must be called after framework - specific before lifecycle callbacks ( e g , methods annotated with j unit 4 ' s { @ link org junit before @ before } ) the managed { @ link test context } will be updated with the supplied { @ code test instance } and { @ code test method } an attempt will be made to give each registered { @ link test execution listener } a chance to perform its pre - processing if a listener throws an exception , however , the remaining registered listeners will not be called

public void before test execution ( object test instance , method test method ) throws exception { string callback name = " before test execution " ; prepare for before callback ( callback name , test instance , test method ) ; for ( test execution listener test execution listener : get test execution listeners ( ) ) { try { test execution listener before test execution ( get test context ( ) ) ; } catch ( throwable ex ) { handle before exception ( ex , callback name , test execution listener , test instance , test method ) ; } } }


associates the specified range with the specified value

public builder < k , v > put ( range < k > range , v value ) { check not null ( range ) ; check not null ( value ) ; check argument ( ! range is empty ( ) , " range must not be empty , but was % s " , range ) ; entries add ( maps immutable entry ( range , value ) ) ; return this ; }


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


after - commit callback for the given resource holder only called when the resource hasn ' t been released yet ( { @ link # should release before completion ( ) } )

protected void process resource after commit ( h resource holder ) { }


verifies that { @ code ctor } produces a { @ link null pointer exception } or { @ link unsupported operation exception } whenever any of its non - nullable parameters are null

public void test constructor ( constructor < ? > ctor ) { class < ? > declaring class = ctor get declaring class ( ) ; check argument ( modifier is static ( declaring class get modifiers ( ) ) | | declaring class get enclosing class ( ) = = null , " cannot test constructor of non - static inner class : % s " , declaring class get name ( ) ) ; class < ? > [ ] types = ctor get parameter types ( ) ; for ( int null index = 0 ; null index < types length ; null index + + ) { test constructor parameter ( ctor , null index ) ; } }


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


public string get description ( final string locale ) { if ( this ui info ! = null ) { val description = get localized values ( locale , this ui info get descriptions ( ) ) ; return optional of nullable ( description ) or else get ( super : : get description ) ; } return super get description ( ) ; }


retrieves the value from the cache , loading it if necessary

private @ nullable v get or load ( k key ) { boolean stats enabled = statistics is enabled ( ) ; long start = stats enabled ? ticker read ( ) : 0l ; long millis = 0l ; expirable < v > expirable = cache get if present ( key ) ; if ( ( expirable ! = null ) & & ! expirable is eternal ( ) ) { millis = nanos to millis ( ( start = = 0l ) ? ticker read ( ) : start ) ; if ( expirable has expired ( millis ) ) { expirable < v > expired = expirable ; cache as map ( ) compute if present ( key , ( k , e ) - > { if ( e = = expired ) { dispatcher publish expired ( this , key , expired get ( ) ) ; statistics record evictions ( 1 ) ; return null ; } return e ; } ) ; expirable = null ; } } if ( expirable = = null ) { expirable = cache get ( key ) ; statistics record misses ( 1l ) ; } else { statistics record hits ( 1l ) ; } v value = null ; if ( expirable ! = null ) { set access expiration time ( key , expirable , millis ) ; value = copy value ( expirable ) ; } if ( stats enabled ) { statistics record get time ( ticker read ( ) - start ) ; } return value ; }


gets the name of the strategy used to run the action

public string get strategy ( ) { return strategy ; }


the parent service name ( caller ) , { @ link span # local service name ( ) } if instrumented

public string parent ( ) { return parent ; }


public boolean is contrast mode ( ) { return is contrast mode ; }


puts one byte and two shorts into this byte vector the byte vector is automatically enlarged if necessary

final byte vector put 1 2 2 ( final int byte value , final int short value 1 , final int short value 2 ) { int current length = length ; if ( current length + 5 > data length ) { enlarge ( 5 ) ; } byte [ ] current data = data ; current data [ current length + + ] = ( byte ) byte value ; current data [ current length + + ] = ( byte ) ( short value 1 > > > 8 ) ; current data [ current length + + ] = ( byte ) short value 1 ; current data [ current length + + ] = ( byte ) ( short value 2 > > > 8 ) ; current data [ current length + + ] = ( byte ) short value 2 ; length = current length ; return this ; }


called to determine if there was an incomplete installation , what the statuses of the plugins are

public http response do incomplete install status ( ) { try { map < string , string > jobs = install util get persisted install status ( ) ; if ( jobs = = null ) { jobs = collections empty map ( ) ; } return http responses ok j s o n ( jobs ) ; } catch ( exception e ) { return http responses error j s o n ( string format ( " error : % s " , e get message ( ) ) ) ; } }


sets the rotation of this cell , in 90 degree increments

public cell set rotation ( int rotation ) { this rotation = rotation ; return this ; }


get a list of possible resource ids from multi cache key or get single resource id from cache key

public static list < string > get resource ids ( final cache key key ) { try { final list < string > ids ; if ( key instanceof multi cache key ) { list < cache key > keys = ( ( multi cache key ) key ) get cache keys ( ) ; ids = new array list < > ( keys size ( ) ) ; for ( int i = 0 ; i < keys size ( ) ; i + + ) { ids add ( secure hash key ( keys get ( i ) ) ) ; } } else { ids = new array list < > ( 1 ) ; ids add ( key is resource id for debugging ( ) ? key get uri string ( ) : secure hash key ( key ) ) ; } return ids ; } catch ( unsupported encoding exception e ) { / / this should never happen all v ms support utf - 8 throw new runtime exception ( e ) ; } }


create a stripped down string value for error messages

public static string to string ( final uri path uri ) { return path uri ! = null ? string format ( " % s : / / % s / % s " , path uri get scheme ( ) , path uri get host ( ) , path uri get path ( ) ) : " ( null uri ) " ; }


return true if the provided field may have multiple values per document in the leaf

private boolean is maybe multivalued ( leaf reader context context , sort field sort field ) throws i o exception { sort field type type = index sort config get sort field type ( sort field ) ; switch ( type ) { case string : final sorted set doc values v 1 = context reader ( ) get sorted set doc values ( sort field get field ( ) ) ; return v 1 ! = null & & doc values unwrap singleton ( v 1 ) = = null ; case double : case float : case long : case int : final sorted numeric doc values v 2 = context reader ( ) get sorted numeric doc values ( sort field get field ( ) ) ; return v 2 ! = null & & doc values unwrap singleton ( v 2 ) = = null ; default : / / we have no clue whether the field is multi - valued or not so we assume it is return true ; } }


returns an array type whose elements are all instances of { @ code component type }

public static generic array type array of ( type component type ) { return new generic array type impl ( component type ) ; }


protected void finalize encode ( final request abstract type authn request , final base s a m l 2 message encoder encoder , final t saml response , final string relay state ) throws exception { encoder initialize ( ) ; encoder encode ( ) ; }


decide whether the iterative algorithm has converged

boolean is converged ( int iteration , t value ) ;


testcases can override { @ link # get max string size ( ) } to control the max - size of strings in { @ link task status } note that the { @ link task status } is never exposed to clients or users ( i e map or reduce ) and hence users cannot override this api to pass large strings in { @ link task status }

protected int get max string size ( ) { return max string size ; }


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


removes all the items from the cache whose key matches the specified predicate

public int remove all ( predicate < k > predicate ) { array list < entry < k , v > > old l f u exclusives ; array list < entry < k , v > > old m f u exclusives ; array list < entry < k , v > > old entries ; synchronized ( this ) { old l f u exclusives = m least frequently used exclusive entries remove all ( predicate ) ; old m f u exclusives = m most frequently used exclusive entries remove all ( predicate ) ; old entries = m cached entries remove all ( predicate ) ; make orphans ( old entries ) ; } maybe close ( old entries ) ; maybe notify exclusive entries removal ( old l f u exclusives , old m f u exclusives ) ; maybe update cache params ( ) ; maybe evict entries ( ) ; return old entries size ( ) ; }


iff set to < code > true < code > this settings update will only add settings not already set on an index existing settings remain unchanged

public update settings cluster state update request set preserve existing ( boolean preserve existing ) { this preserve existing = preserve existing ; return this ; }


adds additional columns similar to a sql select statement the field expressions can contain complex expressions , but can not contain aggregations existing fields will be replaced if the added fields have duplicate field name , then the last one is used example : { @ code tab add or replace columns ( $ ( " a " ) plus ( 1 ) as ( " a 1 " ) , concat ( $ ( " b " ) , " sunny " ) as ( " b 1 " ) ) ; } scala example : { @ code tab add or replace columns ( $ " a " + 1 as " a 1 " , concat ( $ " b " , " sunny " ) as " b 1 " ) }

table add or replace columns ( expression fields ) ;


we will accept the selection in the workbench to see if we can initialize from it

public void init ( i workbench workbench , i structured selection selection ) { }


set the name of a subscription to create to be applied in case of a topic ( pub - sub domain ) with a shared or durable subscription the subscription name needs to be unique within this client ' s jms client id default is the class name of the specified message listener note : only 1 concurrent consumer ( which is the default of this message listener container ) is allowed for each subscription , except for a shared subscription ( which requires jms 2 0 )

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


test of is map method , of class task i d

public void test is map ( ) { job i d job id = new job i d ( " 1234 " , 0 ) ; for ( task type type : task type values ( ) ) { task i d task id = new task i d ( job id , type , 0 ) ; if ( type = = task type map ) { assert true ( " task i d for map task did not correctly identify itself " + " as a map task " , task id is map ( ) ) ; } else { assert false ( " task i d for " + type + " task incorrectly identified " + " itself as a map task " , task id is map ( ) ) ; } } task i d task id = new task i d ( ) ; assert false ( " task i d of default type incorrectly identified itself as a " + " map task " , task id is map ( ) ) ; }


private void run ( ) { / / this will contain the definition specs for each parameter final register spec [ ] param specs = new register spec [ ssa meth get param width ( ) ] ; / / insns to delete when all done final hash set < ssa insn > deleted insns = new hash set ( ) ; ssa meth for each insn ( new ssa insn visitor ( ) { public void visit move insn ( normal ssa insn insn ) { } public void visit phi insn ( phi insn phi ) { } public void visit non move insn ( normal ssa insn insn ) { if ( insn get opcode ( ) get opcode ( ) ! = reg ops move param ) { return ; } int param = get param index ( insn ) ; if ( param specs [ param ] = = null ) { param specs [ param ] = insn get result ( ) ; } else { final register spec spec a = param specs [ param ] ; final register spec spec b = insn get result ( ) ; local item local a = spec a get local item ( ) ; local item local b = spec b get local item ( ) ; local item new local ; / * * is there local information to preserve ? * / if ( local a = = null ) { new local = local b ; } else if ( local b = = null ) { new local = local a ; } else if ( local a equals ( local b ) ) { new local = local a ; } else { / * * oddly , these two identical move - params have distinct * debug info we ' ll just keep them distinct * / return ; } ssa meth get definition for register ( spec a get reg ( ) ) set result local ( new local ) ; / * * map all uses of spec b to spec a * / register mapper mapper = new register mapper ( ) { / * * @ inherit doc * / public int get new register count ( ) { return ssa meth get reg count ( ) ; } / * * @ inherit doc * / public register spec map ( register spec register spec ) { if ( register spec get reg ( ) = = spec b get reg ( ) ) { return spec a ; } return register spec ; } } ; list < ssa insn > uses = ssa meth get use list for register ( spec b get reg ( ) ) ; / / use list is modified by map source registers for ( int i = uses size ( ) - 1 ; i > = 0 ; i - - ) { ssa insn use = uses get ( i ) ; use map source registers ( mapper ) ; } deleted insns add ( insn ) ; } } } ) ; ssa meth delete insns ( deleted insns ) ; }


public void set uuid ( string id ) { this uuid = id ; }


whether to parse the path into path segments if the encoding mode is set to { @ link encoding mode # uri component encoding mode uri component }

public boolean should parse path ( ) { return this parse path ; }


return the matrix composed of the absolute values of all elements djm : fixed double allocation

public final mat 2 2 abs ( ) { return new mat 2 2 ( math utils abs ( ex x ) , math utils abs ( ey x ) , math utils abs ( ex y ) , math utils abs ( ey y ) ) ; }


provides an x stream replacement for an object unless a call to { @ link # write } is currently in progress as per jenkins - 45892 this may be used by any class which expects to be written at top level to an xml file but which cannot safely be serialized as a nested object ( for example , because it expects some { @ code on load } hook ) : implement a { @ code write replace } method delegating to this method the replacement need not be { @ link serializable } since it is only necessary for use from x stream

public static object replace if not at top level ( object o , supplier < object > replacement ) { file currently writing = writing get ( ) ; if ( being written contains key ( o ) | | currently writing = = null ) { return o ; } else { logger log ( level warning , " jenkins - 45892 : reference to " + o + " being saved from unexpected " + currently writing , new illegal state exception ( ) ) ; return replacement get ( ) ; } }


public void visit ( nested set < e > nested set ) throws interrupted exception { preconditions check argument ( nested set get order ( ) = = order stable order ) ; / / we can short - circuit empty nested set visitation here , avoiding load on the shared map / / visited state # seen nodes if ( ! nested set is empty ( ) ) { visit raw ( nested set get children interruptibly ( ) ) ; } }


return the type of map with the { @ code key type } and { @ code value type }

public static type get map type ( @ non null final type key type , @ non null final type value type ) { return type token get parameterized ( map class , key type , value type ) get type ( ) ; }


build a list of undeleted paths from a { @ code multi object delete exception } outside of unit tests , the qualifier function should be { @ link s 3 a file system # key to qualified path ( string ) }

public static list < path > extract undeleted paths ( final multi object delete exception delete exception , final function < string , path > qualifier fn ) { return to path list ( extract undeleted key paths ( delete exception , qualifier fn ) ) ; }


public http request get request ( ) { return this request ; }


create a new bean shell - scripted object from the given script source with this { @ code create bsh object } variant , the script needs to declare a full class or return an actual instance of the scripted object

public static object create bsh object ( string script source ) throws eval error { return create bsh object ( script source , null , null ) ; }


public void stop ( ) throws i o exception { if ( mr ! = null ) { mr stop ( ) ; } if ( dfs ! = null ) { dfs shutdown ( ) ; } }


computes the direct dependencies of a node in the configured target graph ( a configured target or an aspects ) returns null if skyframe hasn ' t evaluated the required dependencies yet in this case , the caller should also return null to skyframe

static ordered set multimap < dependency kind , configured target and data > compute dependencies ( environment env , skyframe dependency resolver resolver , target and configuration ctg value , iterable < aspect > aspects , immutable map < label , config matching provider > config conditions , @ nullable toolchain collection < toolchain context > toolchain contexts , boolean use toolchain transition , rule class provider rule class provider , build configuration host configuration , @ nullable nested set builder < package > transitive packages for package root resolution , nested set builder < cause > transitive root causes , build options default build options ) throws dependency evaluation exception , configured value creation exception , aspect creation exception , interrupted exception { / / create the map from attributes to set of ( target , transition ) pairs ordered set multimap < dependency kind , dependency key > initial dependencies ; build configuration configuration = ctg value get configuration ( ) ; label label = ctg value get label ( ) ; try { initial dependencies = resolver dependent node map ( ctg value , host configuration , aspects , config conditions , toolchain contexts , use toolchain transition , transitive root causes , ( ( configured rule class provider ) rule class provider ) get trimming transition factory ( ) ) ; } catch ( dependency resolver failure e ) { env get listener ( ) handle ( event error ( e get location ( ) , e get message ( ) ) ) ; env get listener ( ) post ( new analysis root cause event ( configuration , label , e get message ( ) ) ) ; throw new dependency evaluation exception ( new configured value creation exception ( e get message ( ) , label , configuration ) ) ; } catch ( inconsistent aspect order exception e ) { env get listener ( ) handle ( event error ( e get location ( ) , e get message ( ) ) ) ; throw new dependency evaluation exception ( e ) ; } / / trim each dep ' s configuration so it only includes the fragments needed by its transitive / / closure configuration resolver config resolver = new configuration resolver ( env , ctg value , host configuration , default build options , config conditions ) ; ordered set multimap < dependency kind , dependency > dep value names = config resolver resolve configurations ( initial dependencies ) ; / / return early in case packages were not loaded yet in theory , we could start configuring / / dependent targets in loaded packages however , that creates an artificial sync boundary / / between loading all dependent packages ( fast ) and configuring some dependent targets ( can / / have a long tail ) if ( env values missing ( ) ) { return null ; } / / resolve configured target dependencies and handle errors map < sky key , configured target and data > dep values = resolve configured target dependencies ( env , ctg value , dep value names values ( ) , transitive packages for package root resolution , transitive root causes ) ; if ( dep values = = null ) { return null ; } / / resolve required aspects ordered set multimap < dependency , configured aspect > dep aspects = aspect resolver resolve aspect dependencies ( env , dep values , dep value names values ( ) , transitive packages for package root resolution ) ; if ( dep aspects = = null ) { return null ; } / / merge the dependent configured targets and aspects into a single map try { return aspect resolver merge aspects ( dep value names , dep values , dep aspects ) ; } catch ( duplicate exception e ) { env get listener ( ) handle ( event error ( ctg value get target ( ) get location ( ) , e get message ( ) ) ) ; throw new configured value creation exception ( e get message ( ) , label , configuration ) ; } }


should the pointcut apply to the given interface or target class ?

public boolean matches ( class < ? > clazz ) { assert state ( this aspect j type pattern matcher ! = null , " no type pattern has been set " ) ; return this aspect j type pattern matcher matches ( clazz ) ; }


start the snapshot lifecycle management feature see https : www elastic coguideenelasticsearchclientjava - restcurrent java - rest - high - ilm - slm - start - slm html for more

public acknowledged response start s l m ( start s l m request request , request options options ) throws i o exception { return rest high level client perform request and parse entity ( request , index lifecycle request converters : : start s l m , options , acknowledged response : : from x content , empty set ( ) ) ; }


print exceptions resolved through a handler exception resolver

protected void print resolved exception ( @ nullable exception resolved exception ) throws exception { if ( resolved exception = = null ) { this printer print value ( " type " , null ) ; } else { this printer print value ( " type " , resolved exception get class ( ) get name ( ) ) ; } }


invoke the registered jms exception listener , if any

protected void invoke exception listener ( j m s exception ex ) { exception listener exception listener = get exception listener ( ) ; if ( exception listener ! = null ) { exception listener on exception ( ex ) ; } }


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


model tests for additional properties integer

public void test additional properties integer ( ) { / / todo : test additional properties integer }


serializes this filter into a save state object

public save state save ( ) { save state save state = new save state ( " column table filter " ) ; save state put string ( " name " , name ) ; save state put int ( " column filter count " , constraint sets size ( ) ) ; for ( int i = 0 ; i < constraint sets size ( ) ; i + + ) { column constraint set < r , ? > constraint set = constraint sets get ( i ) ; save state save = constraint set save ( ) ; save state put xml element ( " column filter " + i , save save to xml ( ) ) ; } return save state ; }


synchronized int allocate ( int n ) { final int remaining = max - count ; if ( remaining < = 0 ) { return 0 ; } else { final int allocated = remaining < n ? remaining : n ; count + = allocated ; return allocated ; } }