the main driver for < code > load typed bytes < code >

public int run ( string [ ] args ) throws exception { if ( args length = = 0 ) { system err println ( " too few arguments ! " ) ; print usage ( ) ; return 1 ; } path path = new path ( args [ 0 ] ) ; file system fs = path get file system ( get conf ( ) ) ; if ( fs exists ( path ) ) { system err println ( " given path exists already ! " ) ; return - 1 ; } typed bytes input tbinput = new typed bytes input ( new data input stream ( system in ) ) ; sequence file writer writer = sequence file create writer ( fs , conf , path , typed bytes writable class , typed bytes writable class ) ; try { typed bytes writable key = new typed bytes writable ( ) ; typed bytes writable value = new typed bytes writable ( ) ; byte [ ] raw key = tbinput read raw ( ) ; while ( raw key ! = null ) { byte [ ] raw value = tbinput read raw ( ) ; key set ( raw key , 0 , raw key length ) ; value set ( raw value , 0 , raw value length ) ; writer append ( key , value ) ; raw key = tbinput read raw ( ) ; } } finally { writer close ( ) ; } return 0 ; }


public string follower index ( ) { return follower index ; }


subscribe on the given topic , with the given qos when a message is received , mqtt client will invoke the { @ link mqtt handler # on message ( string , byte buf ) } function of the given handler this subscription is only once if the mqtt client has received 1 message , the subscription will be removed

public future < void > once ( string topic , mqtt handler handler , mqtt qo s qos ) { return create subscription ( topic , handler , true , qos ) ; }


returns a newly - created { @ code immutable network } based on the contents of this { @ code builder }

public immutable network < n , e > build ( ) { return immutable network copy of ( mutable network ) ; }


public string to url ( ) { string builder sb = new string builder ( ) ; for ( string key : params key set ( ) ) { sb append ( key ) append ( " = " ) append ( params get ( key ) ) append ( " & " ) ; } return sb to string ( ) ; }


returns true if all c + + compilations should produce position - independent code , links should produce position - independent executables , and dependencies with equivalent pre - built pic and nopic versions should apply the pic versions returns false if default settings should be applied ( i e make no special provisions for pic code )

public boolean force pic ( ) { return cpp options force pic ; }


public void set action context ( map < string , object > action context ) { this action context = action context ; }


keep calling this till you get a { @ link e o f exception } for getting logs of the specific types for a single container

public static int read container logs for a log type ( data input stream value stream , print stream out , long log uploaded time , list < string > log type ) throws i o exception { return read container logs for a log type ( value stream , out , log uploaded time , log type , long max value ) ; }


determines whether the given rectangle and segment intersect

public static boolean intersect segment rectangle ( float start x , float start y , float end x , float end y , rectangle rectangle ) { float rectangle end x = rectangle x + rectangle width ; float rectangle end y = rectangle y + rectangle height ; if ( intersect segments ( start x , start y , end x , end y , rectangle x , rectangle y , rectangle x , rectangle end y , null ) ) return true ; if ( intersect segments ( start x , start y , end x , end y , rectangle x , rectangle y , rectangle end x , rectangle y , null ) ) return true ; if ( intersect segments ( start x , start y , end x , end y , rectangle end x , rectangle y , rectangle end x , rectangle end y , null ) ) return true ; if ( intersect segments ( start x , start y , end x , end y , rectangle x , rectangle end y , rectangle end x , rectangle end y , null ) ) return true ; return rectangle contains ( start x , start y ) ; }


build an adapted m bean for the given bean instance , if possible the default implementation builds a jmx 1 2 standard m bean for the target ' s m bean m x bean interface in case of an aop proxy , delegating the interface ' s management operations to the proxy

protected dynamic m bean adapt m bean if possible ( object bean ) throws j m exception { class < ? > target class = aop utils get target class ( bean ) ; if ( target class ! = bean get class ( ) ) { class < ? > ifc = jmx utils get m x bean interface ( target class ) ; if ( ifc ! = null ) { if ( ! ifc is instance ( bean ) ) { throw new not compliant m bean exception ( " managed bean [ " + bean + " ] has a target class with an m x bean interface but does not expose it in the proxy " ) ; } return new standard m bean ( bean , ( ( class < object > ) ifc ) , true ) ; } else { ifc = jmx utils get m bean interface ( target class ) ; if ( ifc ! = null ) { if ( ! ifc is instance ( bean ) ) { throw new not compliant m bean exception ( " managed bean [ " + bean + " ] has a target class with an m bean interface but does not expose it in the proxy " ) ; } return new standard m bean ( bean , ( ( class < object > ) ifc ) ) ; } } } return null ; }


return the day of week in us the pattern is { @ code yyyy - mm - dd hh : mm : ss }

public static string get u s week ( final string time ) { return get u s week ( string 2 date ( time , get default format ( ) ) ) ; }


gets the maximum index ( exclusive ) for the given bit set

public static int get max ( int [ ] bits ) { return bits length * 0x 2 0 ; }


public static final calendar parse ( string date str , int order , boolean ignore changes ) throws calendar parser exception { if ( date str = = null ) { return null ; } return parse string ( date str , order , ignore changes ) ; }


get the world body origin position note that the same vector 2 instance is returned each time this method is called

public vector 2 get position ( ) { jni get position ( addr , tmp ) ; position x = tmp [ 0 ] ; position y = tmp [ 1 ] ; return position ; }


helper to create a project from a csv encoded as a file not much control is given on the import options , because this method is intended to be a quick way to create a project for a test for more control over the import , just call the importer directly the projects created via this method and their importing jobs will be disposed of at the end of each test

protected project create c s v project ( string project name , string input ) { project project = new project ( ) ; project metadata metadata = new project metadata ( ) ; metadata set name ( project name ) ; object node options = mock ( object node class ) ; prepare import options ( options , " , " , - 1 , 0 , 0 , 1 , false , false ) ; importing job job = importing manager create job ( ) ; separator based importer importer = new separator based importer ( ) ; list < exception > exceptions = new array list < exception > ( ) ; importer parse one file ( project , metadata , job , " filesource " , new string reader ( input ) , - 1 , options , exceptions ) ; project update ( ) ; project manager singleton register project ( project , metadata ) ; projects add ( project ) ; importing jobs add ( job ) ; return project ; }


public void set attribute factory ( attribute factory attribute factory ) { if ( attribute factory = = null ) { throw new null pointer exception ( " attribute factory = = null " ) ; } this attribute factory = attribute factory ; }


public void int 3 2 test ( ) { / / todo : test int 3 2 }


for this test , the body for this request much reference a schema named & # x 6 0 ; file & # x 6 0 ;

public void test body with file schema ( file schema test class body , handler < async result < void > > result handler ) { test body with file schema ( body , null , result handler ) ; }


public boolean remove watch ( string path , watcher type type , watcher watcher ) { return data tree remove watch ( path , type , watcher ) ; }


specify an exception handler to be used for event handlers and worker pools created by this disruptor the exception handler will be used by existing and future event handlers and worker pools created by this disruptor instance

public void set default exception handler ( final exception handler < ? super t > exception handler ) { check not started ( ) ; if ( ! ( this exception handler instanceof exception handler wrapper ) ) { throw new illegal state exception ( " set default exception handler can not be used after handle exceptions with " ) ; } ( ( exception handler wrapper < t > ) this exception handler ) switch to ( exception handler ) ; }


parses the semantics flags and updates the semantics used to filter predeclared bindings , and carried by subsequently created threads causes a new starlark thread and module to be created when next needed

public final void set semantics ( string options ) throws options parsing exception { this semantics = options parse ( build language options class , options ) get options ( ) to starlark semantics ( ) ; / / re - initialize the thread and module with the new semantics when needed this thread = null ; this module = null ; }


default with orc dependent , we should use v 2 3 0

static orc shim < vectorized row batch > default shim ( ) { return new orc shim v 2 3 0 ( ) ; }


public void on patch type extract fail ( file patch file , file extract to , string filename , int file type ) { share tinker log i ( tag , " patch reporter on patch type extract fail : file extract fail type : % s , path : % s , extract to : % s , filename : % s " , share tinker internals get type string ( file type ) , patch file get path ( ) , extract to get path ( ) , filename ) ; / / delete temp files tinker with ( context ) clean patch by patch apk ( patch file ) ; }


test verifies many child watchers also , verifies internal datastructure ' watch manager child watches '

public void test many child watchers ( boolean use async ) throws exception { int count = 50 ; list < my watcher > w list = new array list < my watcher > ( count ) ; my watcher w ; string path = " / node " ; / / child watcher for ( int i = 0 ; i < count ; i + + ) { string node path = path + i ; zk 1 create ( node path , null , ids open acl unsafe , create mode persistent ) ; node path + = " / " ; } for ( int i = 0 ; i < count ; i + + ) { string node path = path + i ; w = new my watcher ( path + i , 1 ) ; w list add ( w ) ; log info ( " adding child watcher { } on path { } " , w , node path ) ; zk 1 get children ( node path , w ) ; node path + = " / " ; } assert equals ( count , zk 1 get child watches ( ) size ( ) , " failed to add watchers ! " ) ; for ( int i = 0 ; i < count ; i + + ) { final my watcher watcher = w list get ( i ) ; remove watches ( zk 1 , path + i , watcher , watcher type children , false , code ok , use async ) ; assert true ( watcher matches ( ) , " didn ' t remove child watcher " ) ; } assert equals ( 0 , zk 1 get child watches ( ) size ( ) , " didn ' t remove watch references ! " ) ; }


default table source < t > create table source ( map < string , string > properties ) { return create batch table source ( properties ) ; }


create default container if it doesn ' t exist for hadoop swift integration non - reentrant , as this should only be needed once

private synchronized void create default container ( ) throws i o exception { create container ( container ) ; }


run mover with arguments specifying files and directories

public void test move specific paths ( ) throws exception { log info ( " test move specific paths " ) ; final path foo = new path ( " / foo " ) ; final path bar file = new path ( foo , " bar " ) ; final path foo 2 = new path ( " / foo 2 " ) ; final path bar 2 file = new path ( foo 2 , " bar 2 " ) ; map < path , block storage policy > policy map = maps new hash map ( ) ; policy map put ( foo , cold ) ; policy map put ( foo 2 , warm ) ; namespace scheme ns scheme = new namespace scheme ( arrays as list ( foo , foo 2 ) , arrays as list ( bar file , bar 2 file ) , block size , null , policy map ) ; cluster scheme cluster scheme = new cluster scheme ( default conf , num datanodes , repl , gen storage types ( num datanodes ) , null ) ; migration test test = new migration test ( cluster scheme , ns scheme ) ; test setup cluster ( ) ; try { test prepare namespace ( ) ; test set storage policy ( ) ; map < uri , list < path > > map = mover cli get name node paths to move ( test conf , " - p " , " / foo / bar " , " / foo 2 " ) ; int result = mover run ( map , test conf ) ; assert assert equals ( exit status success get exit code ( ) , result ) ; thread sleep ( 5000 ) ; test verify ( true ) ; } finally { test shutdown cluster ( ) ; } }


dispose the savepoint under the given path

completable future < acknowledge > dispose savepoint ( string savepoint path ) throws flink exception ;


the set of values defined for this entry , each corresponding to a different configurationvariant < code > repeated aapt pb config value config value = 4 ; < code >

public builder add config value ( int index , com android aapt resources config value value ) { copy on write ( ) ; instance add config value ( index , value ) ; return this ; }


on a concurrent computation that throws a checked exception , all threads should get the ( wrapped ) exception , with the loader called only once the result should not be cached ( a later request should call the loader again )

private static void test concurrent loading checked exception ( cache builder < object , object > builder ) throws interrupted exception { int count = 10 ; final atomic integer call count = new atomic integer ( ) ; final count down latch start signal = new count down latch ( count + 1 ) ; final i o exception e = new i o exception ( ) ; loading cache < string , string > cache = builder build ( new cache loader < string , string > ( ) { @ override public string load ( string key ) throws i o exception , interrupted exception { call count increment and get ( ) ; start signal await ( ) ; throw e ; } } ) ; list < object > result = do concurrent get ( cache , " bar " , count , start signal ) ; assert equals ( 1 , call count get ( ) ) ; for ( int i = 0 ; i < count ; i + + ) { / / do concurrent get alternates between calling get unchecked and calling get if we call get ( ) , / / we should get an execution exception ; if we call get unchecked ( ) , we should get an / / unchecked execution exception int mod = i % 3 ; if ( mod = = 0 | | mod = = 2 ) { assert that ( result get ( i ) ) is instance of ( execution exception class ) ; assert that ( ( execution exception ) result get ( i ) ) has cause that ( ) is same instance as ( e ) ; } else { assert that ( result get ( i ) ) is instance of ( unchecked execution exception class ) ; assert that ( ( unchecked execution exception ) result get ( i ) ) has cause that ( ) is same instance as ( e ) ; } } / / subsequent calls should call the loader again , not get the old exception try { cache get unchecked ( " bar " ) ; fail ( ) ; } catch ( unchecked execution exception expected ) { } assert equals ( 2 , call count get ( ) ) ; }


retry add block ( ) while another thread is in choose target ( ) see hdfs - 4452

public void test retry add block while in choose target ( ) throws exception { final string src = " / test retry add block while in choose target " ; final f s namesystem ns = cluster get namesystem ( ) ; final namenode protocols nn = cluster get name node rpc ( ) ; / / create file nn create ( src , fs permission get file default ( ) , " client name " , new enum set writable < create flag > ( enum set of ( create flag create ) ) , true , ( short ) 3 , 1024 , null , null , null ) ; / / start first add block ( ) log info ( " starting first add block for " + src ) ; located block [ ] on retry block = new located block [ 1 ] ; ns read lock ( ) ; f s dir write file op validate add block result r ; f s permission checker pc = mockito mock ( f s permission checker class ) ; try { r = f s dir write file op validate add block ( ns , pc , src , hdfs constants grandfather inode id , " client name " , null , on retry block ) ; } finally { ns read unlock ( ) ; ; } datanode storage info targets [ ] = f s dir write file op choose target for new block ( ns get block manager ( ) , src , null , null , null , r ) ; assert not null ( " targets must be generated " , targets ) ; / / run second add block ( ) log info ( " starting second add block for " + src ) ; nn add block ( src , " client name " , null , null , hdfs constants grandfather inode id , null , null ) ; assert true ( " penultimate block must be complete " , check file progress ( src , false ) ) ; located blocks lbs = nn get block locations ( src , 0 , long max value ) ; assert equals ( " must be one block " , 1 , lbs get located blocks ( ) size ( ) ) ; located block lb 2 = lbs get ( 0 ) ; assert equals ( " wrong replication " , replication , lb 2 get locations ( ) length ) ; / / continue first add block ( ) ns write lock ( ) ; located block new block ; try { new block = f s dir write file op store allocated block ( ns , src , hdfs constants grandfather inode id , " client name " , null , targets ) ; } finally { ns write unlock ( ) ; } assert equals ( " blocks are not equal " , lb 2 get block ( ) , new block get block ( ) ) ; / / check locations lbs = nn get block locations ( src , 0 , long max value ) ; assert equals ( " must be one block " , 1 , lbs get located blocks ( ) size ( ) ) ; located block lb 1 = lbs get ( 0 ) ; assert equals ( " wrong replication " , replication , lb 1 get locations ( ) length ) ; assert equals ( " blocks are not equal " , lb 1 get block ( ) , lb 2 get block ( ) ) ; }


gets the service config parsed by { @ link name resolver helper # parse service config ( map ) }

public config or error get service config ( ) { return service config ; }


returns the ttl values ( in milliseconds ) returned from the config provider instances for a given set of paths

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


inserts a sequence of bytes from the given file into this content , starting at the given position and shifting the existing ones

public void insert ( file a file , long position ) throws i o exception { long file length = a file length ( ) ; if ( file length < 1l | | position > length ( ) ) return ; range new range = new range ( position , a file , true ) ; dirty = true ; last upper nibble position = - 1l ; if ( actions ! = null ) actions event pre modify ( action history action type insert , position , false ) ; commit changes ( ) ; insert range ( new range ) ; if ( actions ! = null ) actions add inserted ( ( range ) new range clone ( ) ) ; notify listeners ( ) ; }


fetches the text contained within the given portion of the console please note : support for this method is optional based on the underlying console implementation if this method cannot be supported , please throw { @ link unsupported operation exception }

public string get text ( int offset , int length ) ;


parses an alac audio specific config ( i e an < a href = " https : github commacosforgealacblobmaster a l a c magic cookie description txt " > a l a c specific config )

public static pair < integer , integer > parse alac audio specific config ( byte [ ] audio specific config ) { parsable byte array byte array = new parsable byte array ( audio specific config ) ; byte array set position ( 9 ) ; int channel count = byte array read unsigned byte ( ) ; byte array set position ( 20 ) ; int sample rate = byte array read unsigned int to int ( ) ; return pair create ( sample rate , channel count ) ; }


transform the supplied control message to length encoded values and write to the output stream

protected void write message ( string message ) throws i o exception { length encoded writer write num fields ( number of fields ) ; / / write blank values for all fields other than the control field for ( int i = 1 ; i < number of fields ; + + i ) { length encoded writer write field ( " " ) ; } / / the control field comes last length encoded writer write field ( message ) ; }


a helper function for incompatible configured target ( ) to actually create the incompatible { @ link configured target }

private static configured target create incompatible configured target ( rule context rule context , @ nullable immutable list < configured target > targets responsible for incompatibility , @ nullable immutable list < constraint value info > violated constraints ) throws action conflict exception , interrupted exception { / / create a dummy configured target that has the incompatible platform provider set immutable list < artifact > output artifacts = rule context get output artifacts ( ) ; if ( rule context is test target ( ) & & output artifacts is empty ( ) ) { / / test targets require runfiles support to be added to the rule configured target builder / / which needs an " executable " create one here if none exist already / / / / it would be ideal if we could avoid this currently the problem is that some rules like / / sh test only declare an output artifact in the corresponding configured target factory / / function ( see sh binary java ) since this code path here replaces the factory function rules / / like sh test never get a chance to declare an output artifact / / / / on top of that , the rest of the code base makes the assumption that test targets provide an / / instance runfiles support this can be seen in the test provider , the test action builder , and / / the rule configured target builder classes there might be a way to break this assumption , but / / it ' s currently too heavily baked in to work around it more nicely than this / / / / theoretically , this hack shouldn ' t be an issue because the corresponding actions will never / / get executed they cannot be queried either output artifacts = immutable list of ( rule context create output artifact ( ) ) ; } nested set < artifact > files to build = nested set builder < artifact > stable order ( ) add all ( output artifacts ) build ( ) ; runfiles builder runfiles builder = new runfiles builder ( rule context get workspace name ( ) , rule context get configuration ( ) legacy external runfiles ( ) ) ; runfiles runfiles = runfiles builder add transitive artifacts ( files to build ) add runfiles ( rule context , runfiles provider default runfiles ) build ( ) ; rule configured target builder builder = new rule configured target builder ( rule context ) ; builder set files to build ( files to build ) ; if ( targets responsible for incompatibility ! = null ) { builder add ( incompatible platform provider class , incompatible platform provider incompatible due to targets ( targets responsible for incompatibility ) ) ; } else if ( violated constraints ! = null ) { builder add ( incompatible platform provider class , incompatible platform provider incompatible due to constraints ( violated constraints ) ) ; } else { throw new illegal argument exception ( " both violated constraints and targets responsible for incompatibility are null " ) ; } / / if this is an analysis test , rule configured target builder performs some additional sanity / / checks satisfy them with an appropriate provider if ( rule context get rule ( ) is analysis test ( ) ) { builder add native declared provider ( new analysis test result info ( / * success = * / false , " this test is incompatible and should not have been run please file a bug " + " upstream " ) ) ; } builder add ( runfiles provider class , runfiles provider simple ( runfiles ) ) ; if ( ! output artifacts is empty ( ) ) { artifact executable = output artifacts get ( 0 ) ; runfiles support runfiles support = runfiles support with executable ( rule context , runfiles , executable ) ; builder set runfiles support ( runfiles support , executable ) ; rule context register action ( new fail action ( rule context get action owner ( ) , output artifacts , " can ' t build this this target is incompatible please file a bug upstream " , code cant build incompatible target ) ) ; } return builder build ( ) ; }


set up the { @ link containers monitor } dependency of { @ link resource utilization tracker } so that we can verify the resource utilization

private void setup container monitor ( ) { containers monitor containers monitor = mock ( containers monitor class ) ; when ( containers monitor get v cores allocated for containers ( ) ) then return ( 10l ) ; when ( containers monitor get pmem allocated for containers ( ) ) then return ( 10240l ) ; when ( containers monitor get vmem ratio ( ) ) then return ( 1 0f ) ; when ( containers monitor get vmem allocated for containers ( ) ) then return ( 10240l ) ; container manager cm = mock ( container manager class ) ; when ( cm get containers monitor ( ) ) then return ( containers monitor ) ; when ( context get container manager ( ) ) then return ( cm ) ; spy = new container scheduler ( context , dispatcher , metrics , 0 ) ; }


necessary clean up iff restore operation failed

public void close ( ) { i o utils close quietly ( default column family handle ) ; i o utils close quietly ( native metric monitor ) ; i o utils close quietly ( db ) ; / / making sure the already created column family options will be closed column family descriptors for each ( ( cfd ) - > i o utils close quietly ( cfd get options ( ) ) ) ; }


create a new instance of the configured metadata store the returned metadata store will have been initialized via { @ link metadata store # initialize ( file system , i ttl time provider ) } by this function before returning it callers must clean up by calling { @ link metadata store # close ( ) } when done using the metadata store

public static metadata store get metadata store ( file system fs , i ttl time provider ttl time provider ) throws i o exception { preconditions check not null ( fs ) ; configuration conf = fs get conf ( ) ; preconditions check not null ( conf ) ; metadata store ms instance ; try { class < ? extends metadata store > ms class = get metadata store class ( conf ) ; ms instance = reflection utils new instance ( ms class , conf ) ; log debug ( " using { } metadata store for { } filesystem " , ms class get simple name ( ) , fs get scheme ( ) ) ; ms instance initialize ( fs , ttl time provider ) ; return ms instance ; } catch ( file not found exception e ) { / / don ' t log this exception as it means the table doesn ' t exist yet ; / / rely on callers to catch and treat specially throw e ; } catch ( runtime exception | i o exception e ) { string message = " failed to instantiate metadata store " + conf get ( s3 metadata store impl ) + " defined in " + s3 metadata store impl + " : " + e ; log error ( message , e ) ; if ( e instanceof i o exception ) { throw e ; } else { throw new i o exception ( message , e ) ; } } }


adds attributes which are defined by an aspect ( and not by rule class )

public builder set aspect attributes ( map < string , attribute > aspect attributes ) { this aspect attributes = immutable map copy of ( aspect attributes ) ; return this ; }


set the value of the ' { @ code disabled } ' attribute may be a runtime expression

public void set disabled ( boolean disabled ) { this disabled = disabled ; }


validates the given process definition against the rules for executing a process definition on the activiti engine to create such a { @ link bpmn model } from a string , following code may be used : x m l input factory xif = x m l input factory new instance ( ) ; input stream reader in = new input stream reader ( new byte array input stream ( my process get bytes ( ) ) , " utf - 8 " ) ; change to other streams for eg from classpath x m l stream reader xtr = xif create x m l stream reader ( in ) ; bpmn model = new bpmn x m l converter ( ) convert to bpmn model ( xtr ) ;

list < validation error > validate process ( bpmn model bpmn model ) ;


creates a bitmap of the specified width and height the bitmap will be created with the default argb 8888 configuration

public closeable reference < bitmap > create bitmap ( int width , int height ) { return create bitmap ( width , height , bitmap config argb 8888 ) ; }


set the interval , in milliseconds , at which the " system " relay session will , in the absence of any other data being sent , send a heartbeat to the stomp broker a value of zero will prevent heartbeats from being sent to the broker the default value is 10000

public stomp broker relay registration set system heartbeat send interval ( long system heartbeat send interval ) { this system heartbeat send interval = system heartbeat send interval ; return this ; }


appends the node to the tail of the list

public void append to tail ( node head ) { node tail = head prev ; head prev = this ; tail next = this ; next = head ; prev = tail ; }


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


clean up and release resources after completed memory revoking called by driver once future returned by start memory revoke is completed

default void finish memory revoke ( ) { }


return true if this inline object 2 object is equal to o

public boolean equals ( object o ) { if ( this = = o ) { return true ; } if ( o = = null | | get class ( ) ! = o get class ( ) ) { return false ; } inline object 2 inline object 2 = ( inline object 2 ) o ; return objects equals ( this enum form string array , inline object 2 enum form string array ) & & objects equals ( this enum form string , inline object 2 enum form string ) ; }


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

public okhttp 3 call delete order async ( string order id , final api callback < void > callback ) throws api exception { okhttp 3 call local var call = delete order validate before call ( order id , callback ) ; local var api client execute async ( local var call , callback ) ; return local var call ; }


get the plugin instance that implements a specific class , use to find your plugin singleton note : beware the classloader fun

public plugin wrapper get plugin ( class < ? extends plugin > plugin clazz ) { for ( plugin wrapper p : get plugins ( ) ) { if ( plugin clazz is instance ( p get plugin ( ) ) ) return p ; } return null ; }


protected void ok callback ( ) { apply callback ( ) ; close ( ) ; }


encodes " - sia - " in contexts where it is pronounced as x ( " sh " ) , j , or s

boolean encode sia ( ) { / / e g " controversial " , also " fuchsia " , " ch " is silent if ( string at ( ( m current - 2 ) , 5 , " chsia " , " " ) | | string at ( ( m current - 1 ) , 5 , " rsial " , " " ) ) { metaph add ( " x " ) ; advance counter ( 3 , 1 ) ; return true ; } / / names generally get ' x ' where terms , e g " aphasia " get ' j ' if ( ( string at ( 0 , 6 , " alesia " , " alysia " , " alisia " , " stasia " , " " ) & & ( m current = = 3 ) & & ! string at ( 0 , 9 , " anastasia " , " " ) ) | | string at ( ( m current - 5 ) , 9 , " dionysian " , " " ) | | string at ( ( m current - 5 ) , 8 , " theresia " , " " ) ) { metaph add ( " x " , " s " ) ; advance counter ( 3 , 1 ) ; return true ; } if ( ( string at ( m current , 3 , " sia " , " " ) & & ( ( m current + 2 ) = = m last ) ) | | ( string at ( m current , 4 , " sian " , " " ) & & ( ( m current + 3 ) = = m last ) ) | | string at ( ( m current - 5 ) , 9 , " ambrosial " , " " ) ) { if ( ( is vowel ( m current - 1 ) | | string at ( ( m current - 1 ) , 1 , " r " , " " ) ) / / exclude compounds based on names , or french or greek words & & ! ( string at ( 0 , 5 , " james " , " nicos " , " pegas " , " pepys " , " " ) | | string at ( 0 , 6 , " hobbes " , " holmes " , " jaques " , " keynes " , " " ) | | string at ( 0 , 7 , " malthus " , " homoous " , " " ) | | string at ( 0 , 8 , " maglemos " , " homoious " , " " ) | | string at ( 0 , 9 , " levallois " , " tardenois " , " " ) | | string at ( ( m current - 4 ) , 5 , " alges " , " " ) ) ) { metaph add ( " j " ) ; } else { metaph add ( " s " ) ; } advance counter ( 2 , 1 ) ; return true ; } return false ; }


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

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


we don ' t allow prohibited fullnames since this may encumber auditing

public void full name of unknown cant signup ( ) throws exception { hudson private security realm security realm = new hudson private security realm ( true , false , null ) ; j jenkins set security realm ( security realm ) ; jenkins rule web client wc = j create web client ( ) ; signup page signup = new signup page ( wc go to ( " signup " ) ) ; signup enter username ( " unknown 2 " ) ; signup enter password ( " unknown 2 " ) ; signup enter full name ( " unknown " ) ; signup enter email ( " noone @ nowhere com " ) ; signup = new signup page ( signup submit ( j ) ) ; signup assert error contains ( " prohibited as a full name " ) ; assert null ( user get ( " unknown 2 " , false , collections empty map ( ) ) ) ; }


emits a note to build log during annotation processing for debugging

private void note ( string note ) { env get messager ( ) print message ( diagnostic kind note , note ) ; }


public int get integer ( ) { return this value ; }


public void add contents ( dex file file ) { field ids section field ids = file get field ids ( ) ; field ids intern ( field ) ; }


check whether current user have permissions to access the path traverse is always checked parent path means the parent directory for the path ancestor path means the last ( the closest ) existing ancestor directory of the path note that if the parent path exists , then the parent path and the ancestor path are the same for example , suppose the path is " foobarbaz " no matter baz is a file or a directory , the parent path is " foobar " if bar exists , then the ancestor path is also " foobar " if bar does not exist and foo exists , then the ancestor path is " foo " further , if both foo and bar do not exist , then the ancestor path is " "

void check permission ( i nodes in path inodes in path , boolean do check owner , fs action ancestor access , fs action parent access , fs action access , fs action sub access , boolean ignore empty dir ) throws access control exception { if ( log is debug enabled ( ) ) { log debug ( " access check : " + this + " , do check owner = " + do check owner + " , ancestor access = " + ancestor access + " , parent access = " + parent access + " , access = " + access + " , sub access = " + sub access + " , ignore empty dir = " + ignore empty dir ) ; } / / check if ( parent access ! = null ) & & file exists , then check sb / / if resolve link , the check is performed on the link target final int snapshot id = inodes in path get path snapshot id ( ) ; final i node [ ] inodes = inodes in path get i nodes array ( ) ; final i node attributes [ ] inode attrs = new i node attributes [ inodes length ] ; final byte [ ] [ ] components = inodes in path get path components ( ) ; for ( int i = 0 ; i < inodes length & & inodes [ i ] ! = null ; i + + ) { inode attrs [ i ] = get i node attrs ( inodes [ i ] , snapshot id ) ; } string path = inodes in path get path ( ) ; int ancestor index = inodes length - 2 ; access control enforcer enforcer = get access control enforcer ( ) ; string op type = operation type get ( ) ; if ( this authorize with context & & op type ! = null ) { i node attribute provider authorization context builder builder = new i node attribute provider authorization context builder ( ) ; builder fs owner ( fs owner ) supergroup ( supergroup ) caller ugi ( caller ugi ) inode attrs ( inode attrs ) inodes ( inodes ) path by name arr ( components ) snapshot id ( snapshot id ) path ( path ) ancestor index ( ancestor index ) do check owner ( do check owner ) ancestor access ( ancestor access ) parent access ( parent access ) access ( access ) sub access ( sub access ) ignore empty dir ( ignore empty dir ) operation name ( op type ) caller context ( caller context get current ( ) ) ; enforcer check permission with context ( builder build ( ) ) ; } else { enforcer check permission ( fs owner , supergroup , caller ugi , inode attrs , inodes , components , snapshot id , path , ancestor index , do check owner , ancestor access , parent access , access , sub access , ignore empty dir ) ; } }


get the { @ linkplain merged annotation selectors # nearest ( ) nearest } matching annotation or meta - annotation of the specified type , or { @ link merged annotation # missing ( ) } if none is present

< a extends annotation > merged annotation < a > get ( class < a > annotation type , @ nullable predicate < ? super merged annotation < a > > predicate ) ;


build a { @ link configuration metadata repository } with the current state of this builder

public configuration metadata repository build ( ) { val result = new simple configuration metadata repository ( ) ; for ( val repository : this repositories ) { result include ( repository ) ; } return result ; }


public builder set id ( string id ) { this id = objects require non null ( id ) ; return this ; }


public void set relative offset ( hashtable < string , operand > op hash ) throws sled exception { if ( rel to name ! = null & & rel to name length ( ) ! = 0 ) { rel to = op hash get ( rel to name ) ; if ( rel to = = null ) throw new sled exception ( " unable to find relative operand " ) ; } }


get the containers running on the node ordered by which to kill first it tries to kill a ms last , then guaranteed containers , and it kills opportunistic first if the same time , it uses the creation time

public list < r m container > get containers to kill ( ) { list < r m container > result = get launched containers ( ) ; collections sort ( result , ( c 1 , c 2 ) - > { return new compare to builder ( ) append ( c 1 is a m container ( ) , c 2 is a m container ( ) ) append ( c 2 get execution type ( ) , c 1 get execution type ( ) ) / / reversed append ( c 2 get creation time ( ) , c 1 get creation time ( ) ) / / reversed to comparison ( ) ; } ) ; return result ; }


output the error message to the log and as a status message for this command this also creates a bookmark with the error message at the indicated address

protected void handle error message ( program program , address bookmark address , string message ) { handle error message ( program , bookmark address , message , message ) ; }


sets the authenticated state this is set by the server - side callback handler by matching the client provided password with the expected password

public void authenticated ( boolean authenticated ) { this authenticated = authenticated ; }


set the value for a parameter the method used is based on the sql type of the parameter and we can handle complex types like arrays and l o bs

private static void set parameter value internal ( prepared statement ps , int param index , int sql type , @ nullable string type name , @ nullable integer scale , @ nullable object in value ) throws s q l exception { string type name to use = type name ; int sql type to use = sql type ; object in value to use = in value ; / / override type info ? if ( in value instanceof sql parameter value ) { sql parameter value parameter value = ( sql parameter value ) in value ; if ( logger is debug enabled ( ) ) { logger debug ( " overriding type info with runtime info from sql parameter value : column index " + param index + " , sql type " + parameter value get sql type ( ) + " , type name " + parameter value get type name ( ) ) ; } if ( parameter value get sql type ( ) ! = sql type value type unknown ) { sql type to use = parameter value get sql type ( ) ; } if ( parameter value get type name ( ) ! = null ) { type name to use = parameter value get type name ( ) ; } in value to use = parameter value get value ( ) ; } if ( logger is trace enabled ( ) ) { logger trace ( " setting sql statement parameter value : column index " + param index + " , parameter value [ " + in value to use + " ] , value class [ " + ( in value to use ! = null ? in value to use get class ( ) get name ( ) : " null " ) + " ] , sql type " + ( sql type to use = = sql type value type unknown ? " unknown " : integer to string ( sql type to use ) ) ) ; } if ( in value to use = = null ) { set null ( ps , param index , sql type to use , type name to use ) ; } else { set value ( ps , param index , sql type to use , type name to use , scale , in value to use ) ; } }


add a list of events related to the entity to the existing event list

public void add events ( list < timeline event > events ) { this events add all ( events ) ; }


set an eh cache { @ link net sf ehcache bootstrap bootstrap cache loader } for this cache , if any

public void set bootstrap cache loader ( bootstrap cache loader bootstrap cache loader ) { this bootstrap cache loader = bootstrap cache loader ; }


this is a regressing test for antlrantlr 4 # 469 " not all internal lexer rule actions are executed " https : github comantlrantlr 4issues 4 6 9

@ test public void test eval multiple actions ( ) throws exception { string grammar = " lexer grammar l ; \ n " + " \ n " + " @ lexer : : members \ n " + " { \ n " + " class marker \ n " + " { \ n " + " marker ( lexer lexer ) { this lexer = lexer ; } \ n " + " \ n " + " public string get text ( ) \ n " + " { \ n " + " return lexer input get text ( new interval ( start index , stop index ) ) ; \ n " + " } \ n " + " \ n " + " public void start ( ) { start index = lexer input index ( ) ; system out println ( \ " start : \ " + start index ) ; } \ n " + " public void stop ( ) { stop index = lexer input index ( ) ; system out println ( \ " stop : \ " + stop index ) ; } \ n " + " \ n " + " private int start index = 0 ; \ n " + " private int stop index = 0 ; \ n " + " private lexer lexer ; \ n " + " } \ n " + " \ n " + " marker m name = new marker ( this ) ; \ n " + " } \ n " + " \ n " + " hello : ' hello ' ws { m name start ( ) ; } name { m name stop ( ) ; } ' \ \ n ' { system out println ( \ " hello : \ " + m name get text ( ) ) ; } ; \ n " + " name : ( ' a ' ' z ' | ' a ' ' z ' ) + ( ' \ \ n ' ) ? ; \ n " + " \ n " + " fragment ws : [ \ \ r \ \ t \ \ n ] + ; \ n " ; string found = exec lexer ( " l g 4 " , grammar , " l " , " hello steve \ n " ) ; string expecting = " start : 6 \ n " + " stop : 11 \ n " + " hello : steve \ n " + " \ n " + " [ @ 0 , 0 : 11 = ' hello steve \ \ n ' , < 1 > , 1 : 0 ] \ n " + " [ @ 1 , 12 : 11 = ' < eof > ' , < - 1 > , 2 : 0 ] \ n " ; assert equals ( expecting , found ) ; }


whether to match to u r ls irrespective of the presence of a trailing slash

public boolean use trailing slash match ( ) { return this use trailing slash match ; }


sets the processed attributes of the rule generating the deploy archive

public deploy archive builder set attributes ( java target attributes attributes ) { this attributes = attributes ; return this ; }


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


returns the { @ link invokable } for { @ code method } , which must be a member of { @ code t }

public final invokable < t , object > method ( method method ) { check argument ( this some raw type is subclass of ( method get declaring class ( ) ) , " % s not declared by % s " , method , this ) ; return new invokable method invokable < t > ( method ) { @ override type get generic return type ( ) { return get covariant type resolver ( ) resolve type ( super get generic return type ( ) ) ; } @ override type [ ] get generic parameter types ( ) { return get invariant type resolver ( ) resolve types in place ( super get generic parameter types ( ) ) ; } @ override type [ ] get generic exception types ( ) { return get covariant type resolver ( ) resolve types in place ( super get generic exception types ( ) ) ; } @ override public type token < t > get owner type ( ) { return type token this ; } @ override public string to string ( ) { return get owner type ( ) + " " + super to string ( ) ; } } ; }


helper : checks a fieldinfo and throws exception if its definitely not a lat lon doc values field

static void check compatible ( field info field info ) { / / dv properties could be " unset " , if you e g used only stored field with this same name in the segment if ( field info get doc values type ( ) ! = doc values type none & & field info get doc values type ( ) ! = doc values type binary ) { throw new illegal argument exception ( " field = \ " " + field info name + " \ " was indexed with doc values type = " + field info get doc values type ( ) + " but this type has doc values type = " + doc values type binary + " , is the field really a geo - shape field ? " ) ; } }


returns the number of times { @ link cache } lookup methods have returned either a cached or uncached value this is defined as { @ code hit count + miss count } < b > note : < b > the values of the metrics are undefined in case of overflow ( though it is guaranteed not to throw an exception ) if you require specific handling , we recommend implementing your own stats collector

public long request count ( ) { return saturated add ( hit count , miss count ) ; }


creates a { @ code rate limiter } with the specified stable throughput , given as " permits per second " ( commonly referred to as qps , queries per second ) , and a warmup period , during which the { @ code rate limiter } smoothly ramps up its rate , until it reaches its maximum rate at the end of the period ( as long as there are enough requests to saturate it ) similarly , if the { @ code rate limiter } is left unused for a duration of { @ code warmup period } , it will gradually return to its " cold " state , i e it will go through the same warming up process as when it was first created the returned { @ code rate limiter } is intended for cases where the resource that actually fulfills the requests ( e g , a remote server ) needs " warmup " time , rather than being immediately accessed at the stable ( maximum ) rate the returned { @ code rate limiter } starts in a " cold " state ( i e the warmup period will follow ) , and if it is left unused for long enough , it will return to that state

public static rate limiter create ( double permits per second , long warmup period , time unit unit ) { check argument ( warmup period > = 0 , " warmup period must not be negative : % s " , warmup period ) ; return create ( permits per second , warmup period , unit , 3 0 , sleeping stopwatch create from system timer ( ) ) ; }


clears out the source and targets lists and reloads them to ensure that they reflect the current state of the data model any currently - selected list items will be restored after the lists are reloaded

public void reload ( ) { reload source list ( ) ; function selected source = ( function ) source functions c b model get selected item ( ) ; reload target list ( selected source ) ; load functions ( selected source , ( function ) target functions c b model get selected item ( ) ) ; update tab text ( ) ; / / fire a notification to update the ui state ; without this the / / actions would not be properly enabled / disabled tool context changed ( provider ) ; tool set status info ( " function comparisons updated " ) ; }


this method is called after all records have been added to the operators via the methods { @ link one input stream operator # process element ( stream record ) } , or { @ link two input stream operator # process element 1 ( stream record ) } and { @ link two input stream operator # process element 2 ( stream record ) } the method is expected to flush all remaining buffered data exceptions during this flushing of buffered should be propagated , in order to cause the operation to be recognized asa failed , because the last data items are not processed properly

public void close ( ) throws exception { }


sets whether transpositions are supported in fuzzy queries the default metric used by fuzzy queries to determine a match is the damerau - levenshtein distance formula which supports transpositions setting transposition to false will switch to classic levenshtein distance < br > if not set , damerau - levenshtein distance metric will be used

public query string query builder fuzzy transpositions ( boolean fuzzy transpositions ) { this fuzzy transpositions = fuzzy transpositions ; return this ; }


public void process ( history event event ) { if ( event instanceof task attempt finished event ) { process task attempt finished event ( ( task attempt finished event ) event ) ; } else if ( event instanceof task attempt unsuccessful completion event ) { process task attempt unsuccessful completion event ( ( task attempt unsuccessful completion event ) event ) ; } else if ( event instanceof task started event ) { process task started event ( ( task started event ) event ) ; } else if ( event instanceof map attempt finished event ) { process map attempt finished event ( ( map attempt finished event ) event ) ; } else if ( event instanceof reduce attempt finished event ) { process reduce attempt finished event ( ( reduce attempt finished event ) event ) ; } / / i do not expect these if statements to be exhaustive }


private map < string , string > load package id properties ( file package id file ) throws i o exception { map < string , string > values = new hash map < string , string > ( ) ; if ( null ! = package id file & & package id file exists ( ) & & package id file is file ( ) ) { list < string > lines = file utils read lines ( package id file ) ; for ( string line : lines ) { string [ ] line values = string utils split ( line , " = " ) ; if ( null ! = line values & & line values length > = 2 ) { string key = string utils trim ( line values [ 0 ] ) ; string value = string utils trim ( line values [ 1 ] ) ; values put ( key , value ) ; } } } return values ; }


applies { @ code function } to each element of this fluent iterable and returns a fluent iterable with the concatenated combination of results { @ code function } returns an iterable of results the returned fluent iterable ' s iterator supports { @ code remove ( ) } if this function - returned iterables ' iterator does after a successful { @ code remove ( ) } call , the returned fluent iterable no longer contains the corresponding element < b > { @ code stream } equivalent : < b > { @ link stream # flat map } ( using a function that produces streams , not iterables )

public < t > fluent iterable < t > transform and concat ( function < ? super e , ? extends iterable < ? extends t > > function ) { return fluent iterable concat ( transform ( function ) ) ; }


this method must be implemented to provide a user implementation of a co group it is called for each pair of element groups where the elements share the same key

void co group ( iterable < in1 > first , iterable < in2 > second , collector < o > out ) throws exception ;


a unix command to get the current user ' s groups list

public static string [ ] get groups command ( ) { return ( windows ) ? new string [ ] { " cmd " , " / c " , " groups " } : new string [ ] { " groups " } ; }


returns a generic method handle for any operator , that can handle all valid signatures , nulls , corner cases

public static method handle lookup generic ( string name ) { return type op mapping get ( object class ) get ( name ) ; }


getter for the list of byte viewer components

public list < byte viewer component > get view list ( ) { return view list ; }


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


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


handles an inbound { @ code headers } frame only one of the following methods will be called for each { @ code headers } frame sequence one will be called when the { @ code end headers } flag has been received { @ link # on headers read ( channel handler context , int , http 2 headers , int , boolean ) } { @ link # on headers read ( channel handler context , int , http 2 headers , int , short , boolean , int , boolean ) } { @ link # on push promise read ( channel handler context , int , int , http 2 headers , int ) } to say it another way ; the { @ link http 2 headers } will contain all of the headers for the current message exchange step ( additional queuing is not necessary )

void on headers read ( channel handler context ctx , int stream id , http 2 headers headers , int padding , boolean end of stream ) throws http 2 exception ;


this picks a large number of nodes at random in order to ensure coverage

private map < node , integer > pick nodes at random ( int num nodes , string excluded scope , collection < node > excluded nodes ) { map < node , integer > frequency = new hash map < node , integer > ( ) ; for ( datanode descriptor dnd : data nodes ) { frequency put ( dnd , 0 ) ; } for ( int j = 0 ; j < num nodes ; j + + ) { node random = cluster choose random ( excluded scope , excluded nodes ) ; if ( random ! = null ) { frequency put ( random , frequency get ( random ) + 1 ) ; } } log info ( " result : " + frequency ) ; return frequency ; }


public void place order ( order body , handler < async result < order > > result handler ) { place order ( body , null , result handler ) ; }


finds pets by status multiple status values can be provided with comma separated strings

public list < pet > find pets by status ( @ query param ( " status " ) @ not null list < string > status ) ;


write to one file , then kill one datanode in the pipeline and then close the file

private void simple test ( int datanode to kill ) throws i o exception { configuration conf = new hdfs configuration ( ) ; conf set int ( d f s config keys dfs namenode heartbeat recheck interval key , 2000 ) ; conf set int ( d f s config keys dfs heartbeat interval key , 1 ) ; conf set int ( d f s config keys dfs namenode reconstruction pending timeout sec key , 2 ) ; conf set int ( hdfs client config keys dfs client socket timeout key , 5000 ) ; int my max nodes = 5 ; system out println ( " simple test starting with data node to kill " + datanode to kill ) ; mini d f s cluster cluster = new mini d f s cluster builder ( conf ) num data nodes ( my max nodes ) build ( ) ; cluster wait active ( ) ; file system fs = cluster get file system ( ) ; short repl = 3 ; path filename = new path ( " simpletest dat " ) ; try { / / create a file and write one block of data system out println ( " simple test creating file " + filename ) ; f s data output stream stm = create file ( fs , filename , repl ) ; d f s output stream dfstream = ( d f s output stream ) ( stm get wrapped stream ( ) ) ; / / these are test settings dfstream set chunks per packet ( 5 ) ; final long myseed = append test util next long ( ) ; byte [ ] buffer = append test util random bytes ( myseed , file size ) ; int mid = file size / 4 ; stm write ( buffer , 0 , mid ) ; datanode info [ ] targets = dfstream get pipeline ( ) ; int count = 5 ; while ( count - - > 0 & & targets = = null ) { try { system out println ( " simple test : waiting for pipeline to be created " ) ; thread sleep ( 1000 ) ; } catch ( interrupted exception e ) { } targets = dfstream get pipeline ( ) ; } if ( targets = = null ) { int victim = append test util next int ( my max nodes ) ; system out println ( " simple test stopping datanode random " + victim ) ; cluster stop data node ( victim ) ; } else { int victim = datanode to kill ; system out println ( " simple test stopping datanode " + targets [ victim ] ) ; cluster stop data node ( targets [ victim ] get xfer addr ( ) ) ; } system out println ( " simple test stopping datanode complete " ) ; / / write some more data to file , close and verify stm write ( buffer , mid , file size - mid ) ; stm close ( ) ; check file ( fs , filename , repl , num blocks , file size , myseed ) ; } catch ( throwable e ) { system out println ( " simple workload exception " + e ) ; e print stack trace ( ) ; assert true ( e to string ( ) , false ) ; } finally { fs close ( ) ; cluster shutdown ( ) ; } }


return the name of the servlet that handled the request

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


data asset overwrite ( data asset other ) ;


return whether this instance has expired depending on the amount of elapsed time since the call to { @ link # start expiration period }

public boolean is expired ( ) { return ( this expiration time ! = - 1 & & system current time millis ( ) > this expiration time ) ; }


for cli connection that goes through http , sometimes you need to pass in the custom authentication header ( before jenkins even get to authenticate the cli channel ) this method lets you specify the value of this header

public c l i connection factory authorization ( string value ) { this authorization = value ; return this ; }


sets the workspace status action factory contributed by this module only one factory per workspace is allowed

public workspace builder set workspace status action factory ( workspace status action factory workspace status action factory ) { preconditions check state ( this workspace status action factory = = null , " at most one workspace status action factory supported but found two : % s and % s " , this workspace status action factory , workspace status action factory ) ; this workspace status action factory = preconditions check not null ( workspace status action factory ) ; return this ; }


determines if at least one of the filter types is set to replace or merge

public boolean is set ( ) { int num = filter flags length ; for ( int i = 0 ; i < num ; i + + ) { if ( filter flags [ i ] ! = ignore ) { return true ; } } return false ; }


returns the name of the collection represented by this key in the starlark provider

public string get starlark key name ( ) { return starlark key name ; }


gets the status response of the async search from the index

public void get status response ( async execution id async execution id , bi function < r , long , async status response > status producer , action listener < async status response > listener ) { get request internal get = new get request ( index ) preference ( async execution id get encoded ( ) ) id ( async execution id get doc id ( ) ) ; client get ( internal get , action listener wrap ( get - > { if ( get is exists ( ) = = false ) { listener on failure ( new resource not found exception ( async execution id get encoded ( ) ) ) ; return ; } string encoded = ( string ) get get source ( ) get ( result field ) ; if ( encoded ! = null ) { long expiration time = ( long ) get get source ( ) get ( expiration time field ) ; listener on response ( status producer apply ( decode response ( encoded ) , expiration time ) ) ; } else { listener on response ( null ) ; } } , listener : : on failure ) ) ; }


{ @ inherit doc } the default implementation does nothing

@ override public void exit query ( sql base parser query context ctx ) { }


converts this descriptor into a set of properties

public map < string , string > to properties ( ) { final descriptor properties properties = new descriptor properties ( ) ; properties put properties ( internal properties ) ; return properties as map ( ) ; }


this test validates the correctness of get cluster metrics in case the cluster is composed of only 2 bad sub clusters the excepted result would be a cluster metrics info with all its values set to 0

public void test get cluster metrics two bad s cs ( ) throws yarn exception , i o exception , interrupted exception { setup cluster ( arrays as list ( bad 1 , bad 2 ) ) ; cluster metrics info response = interceptor get cluster metrics info ( ) ; assert assert not null ( response ) ; / / check if we got an empty metrics assert assert equals ( 0 , response get apps submitted ( ) ) ; }


writes the given bytes to a tempfile in the temp directory

protected void debug ( byte [ ] bytes , string file name ) { try { if ( system utilities is in development mode ( ) ) { file file = file create temp file ( file name , " ghidra tmp " ) ; output stream out = new file output stream ( file ) ; try { out write ( bytes ) ; } finally { out close ( ) ; } } } catch ( i o exception e ) { / / ignore } }


returns everything below the endpoint relative to the specified comparator , with the specified endpoint behavior

static < t > general range < t > up to ( comparator < ? super t > comparator , @ nullable decl t endpoint , bound type bound type ) { return new general range < t > ( comparator , false , null , open , true , endpoint , bound type ) ; }


public float get float ( @ non null final string key , final float default value ) { return sp get float ( key , default value ) ; }


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


should the visitor visit the tree given the bounding box of the tree called before visiting the tree

boolean push ( int min x , int min y , int max x , int max y ) ;


returns the most recent snapshot available of the playlist referenced by the provided { @ link uri }

hls media playlist get playlist snapshot ( uri url , boolean is for playback ) ;


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


given a property value , return a value , resolving any references to other beans in the factory if necessary the value could be : a bean definition , which leads to the creation of a corresponding new bean instance singleton flags and names of such " inner beans " are always ignored : inner beans are anonymous prototypes a runtime bean reference , which must be resolved a managed list this is a special collection that may contain runtime bean references or collections that will need to be resolved a managed set may also contain runtime bean references or collections that will need to be resolved a managed map in this case the value may be a runtime bean reference or collection that will need to be resolved an ordinary object or { @ code null } , in which case it ' s left alone

public object resolve value if necessary ( object arg name , @ nullable object value ) { / / we must check each value to see whether it requires a runtime reference / / to another bean to be resolved if ( value instanceof runtime bean reference ) { runtime bean reference ref = ( runtime bean reference ) value ; return resolve reference ( arg name , ref ) ; } else if ( value instanceof runtime bean name reference ) { string ref name = ( ( runtime bean name reference ) value ) get bean name ( ) ; ref name = string value of ( do evaluate ( ref name ) ) ; if ( ! this bean factory contains bean ( ref name ) ) { throw new bean definition store exception ( " invalid bean name ' " + ref name + " ' in bean reference for " + arg name ) ; } return ref name ; } else if ( value instanceof bean definition holder ) { / / resolve bean definition holder : contains bean definition with name and aliases bean definition holder bd holder = ( bean definition holder ) value ; return resolve inner bean ( arg name , bd holder get bean name ( ) , bd holder get bean definition ( ) ) ; } else if ( value instanceof bean definition ) { / / resolve plain bean definition , without contained name : use dummy name bean definition bd = ( bean definition ) value ; string inner bean name = " ( inner bean ) " + bean factory utils generated bean name separator + object utils get identity hex string ( bd ) ; return resolve inner bean ( arg name , inner bean name , bd ) ; } else if ( value instanceof dependency descriptor ) { set < string > autowired bean names = new linked hash set < > ( 4 ) ; object result = this bean factory resolve dependency ( ( dependency descriptor ) value , this bean name , autowired bean names , this type converter ) ; for ( string autowired bean name : autowired bean names ) { if ( this bean factory contains bean ( autowired bean name ) ) { this bean factory register dependent bean ( autowired bean name , this bean name ) ; } } return result ; } else if ( value instanceof managed array ) { / / may need to resolve contained runtime references managed array array = ( managed array ) value ; class < ? > element type = array resolved element type ; if ( element type = = null ) { string element type name = array get element type name ( ) ; if ( string utils has text ( element type name ) ) { try { element type = class utils for name ( element type name , this bean factory get bean class loader ( ) ) ; array resolved element type = element type ; } catch ( throwable ex ) { / / improve the message by showing the context throw new bean creation exception ( this bean definition get resource description ( ) , this bean name , " error resolving array type for " + arg name , ex ) ; } } else { element type = object class ; } } return resolve managed array ( arg name , ( list < ? > ) value , element type ) ; } else if ( value instanceof managed list ) { / / may need to resolve contained runtime references return resolve managed list ( arg name , ( list < ? > ) value ) ; } else if ( value instanceof managed set ) { / / may need to resolve contained runtime references return resolve managed set ( arg name , ( set < ? > ) value ) ; } else if ( value instanceof managed map ) { / / may need to resolve contained runtime references return resolve managed map ( arg name , ( map < ? , ? > ) value ) ; } else if ( value instanceof managed properties ) { properties original = ( properties ) value ; properties copy = new properties ( ) ; original for each ( ( prop key , prop value ) - > { if ( prop key instanceof typed string value ) { prop key = evaluate ( ( typed string value ) prop key ) ; } if ( prop value instanceof typed string value ) { prop value = evaluate ( ( typed string value ) prop value ) ; } if ( prop key = = null | | prop value = = null ) { throw new bean creation exception ( this bean definition get resource description ( ) , this bean name , " error converting properties key / value pair for " + arg name + " : resolved to null " ) ; } copy put ( prop key , prop value ) ; } ) ; return copy ; } else if ( value instanceof typed string value ) { / / convert value to target type here typed string value typed string value = ( typed string value ) value ; object value object = evaluate ( typed string value ) ; try { class < ? > resolved target type = resolve target type ( typed string value ) ; if ( resolved target type ! = null ) { return this type converter convert if necessary ( value object , resolved target type ) ; } else { return value object ; } } catch ( throwable ex ) { / / improve the message by showing the context throw new bean creation exception ( this bean definition get resource description ( ) , this bean name , " error converting typed string value for " + arg name , ex ) ; } } else if ( value instanceof null bean ) { return null ; } else { return evaluate ( value ) ; } }


tries to replay the buffered values to the subscriber inside the output if there is new value and requests available at the same time

void replay ( inner subscription < t > output ) ;


whether the native header map contains the give header name

public boolean contains native header ( string header name ) { map < string , list < string > > map = get native headers ( ) ; return ( map ! = null & & map contains key ( header name ) ) ; }


load the image namespace from the given image file , verifying it against the md5 sum stored in its associated md 5 file

private void load f s image ( file image file , f s namesystem target , meta recovery context recovery , boolean require same layout version ) throws i o exception { m d 5 hash expected m d 5 = m d 5 file utils read stored md 5 for file ( image file ) ; if ( expected m d 5 = = null ) { throw new i o exception ( " no md5 file found corresponding to image file " + image file ) ; } load f s image ( image file , expected m d 5 , target , recovery , require same layout version ) ; }


creates and configures a [ [ serialization schema ] ] using the given properties

serialization schema < t > create serialization schema ( map < string , string > properties ) ;


gets the min address of the encoded data

public address get address ( ) { return addr ; }


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

public model factory basic model with attribute on bind ( on model bound listener < model factory basic model with attribute , object > listener ) { on mutation ( ) ; this on model bound listener epoxy generated model = listener ; return this ; }


returns the maximum y - value for the specified axis

public float get y max ( axis dependency axis ) { if ( axis = = axis dependency left ) { if ( m left axis max = = - float max value ) { return m right axis max ; } else return m left axis max ; } else { if ( m right axis max = = - float max value ) { return m left axis max ; } else return m right axis max ; } }


returns true iff the t was caused by a java lang error that is unrecoverable note : not all java lang errors are unrecoverable

private boolean is unrecoverable ( throwable t ) { if ( t ! = null & & t get cause ( ) ! = null ) { throwable cause = t get cause ( ) ; if ( cause instanceof stack overflow error ) { return true ; } else if ( cause instanceof virtual machine error ) { return true ; } else if ( cause instanceof thread death ) { return true ; } else if ( cause instanceof linkage error ) { return true ; } } return false ; }


public int get num elements ( ) { return count ; }


name of the field to get contexts from at index - time

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


obtains the url of the specified class file this method calls < code > get resource ( string ) < code > on the class loader

public url find ( string classname ) { string cname = classname replace ( ' ' , ' / ' ) + " class " ; class loader cl = ( class loader ) clref get ( ) ; if ( cl = = null ) { return null ; / / not found } else { url url = cl get resource ( cname ) ; if ( url = = null & & ( cl ! = this get class ( ) get class loader ( ) ) ) { return this get class ( ) get class loader ( ) get resource ( cname ) ; } return url ; } }


populate the bean instance in the given bean wrapper with the property values from the bean definition

protected void populate bean ( string bean name , root bean definition mbd , @ nullable bean wrapper bw ) { if ( bw = = null ) { if ( mbd has property values ( ) ) { throw new bean creation exception ( mbd get resource description ( ) , bean name , " cannot apply property values to null instance " ) ; } else { / / skip property population phase for null instance return ; } } / / give any instantiation aware bean post processors the opportunity to modify the / / state of the bean before properties are set this can be used , for example , / / to support styles of field injection if ( ! mbd is synthetic ( ) & & has instantiation aware bean post processors ( ) ) { for ( instantiation aware bean post processor bp : get bean post processor cache ( ) instantiation aware ) { if ( ! bp post process after instantiation ( bw get wrapped instance ( ) , bean name ) ) { return ; } } } property values pvs = ( mbd has property values ( ) ? mbd get property values ( ) : null ) ; int resolved autowire mode = mbd get resolved autowire mode ( ) ; if ( resolved autowire mode = = autowire by name | | resolved autowire mode = = autowire by type ) { mutable property values new pvs = new mutable property values ( pvs ) ; / / add property values based on autowire by name if applicable if ( resolved autowire mode = = autowire by name ) { autowire by name ( bean name , mbd , bw , new pvs ) ; } / / add property values based on autowire by type if applicable if ( resolved autowire mode = = autowire by type ) { autowire by type ( bean name , mbd , bw , new pvs ) ; } pvs = new pvs ; } boolean has inst aware bpps = has instantiation aware bean post processors ( ) ; boolean needs dep check = ( mbd get dependency check ( ) ! = abstract bean definition dependency check none ) ; property descriptor [ ] filtered pds = null ; if ( has inst aware bpps ) { if ( pvs = = null ) { pvs = mbd get property values ( ) ; } for ( instantiation aware bean post processor bp : get bean post processor cache ( ) instantiation aware ) { property values pvs to use = bp post process properties ( pvs , bw get wrapped instance ( ) , bean name ) ; if ( pvs to use = = null ) { if ( filtered pds = = null ) { filtered pds = filter property descriptors for dependency check ( bw , mbd allow caching ) ; } pvs to use = bp post process property values ( pvs , filtered pds , bw get wrapped instance ( ) , bean name ) ; if ( pvs to use = = null ) { return ; } } pvs = pvs to use ; } } if ( needs dep check ) { if ( filtered pds = = null ) { filtered pds = filter property descriptors for dependency check ( bw , mbd allow caching ) ; } check dependencies ( bean name , mbd , filtered pds , pvs ) ; } if ( pvs ! = null ) { apply property values ( bean name , mbd , bw , pvs ) ; } }


evaluates whether the argument is an i pv 6 " compat " address an " i pv 4 compatible " , or " compat " , address is one with 96 leading bits of zero , with the remaining 32 bits interpreted as an i pv 4 address these are conventionally represented in string literals as { @ code " : : 192 168 0 1 " } , though { @ code " : : c 0a 8 : 1 " } is also considered an i pv 4 compatible address ( and equivalent to { @ code " : : 192 168 0 1 " } ) for more on i pv 4 compatible addresses see section 2 5 5 1 of < a target = " parent " href = " http : tools ietf orghtmlrfc 4 2 9 1 # section - 2 5 5 1 " > rfc 4291 note : this method is different from { @ link inet 6 address # is i pv 4 compatible address } in that it more correctly classifies { @ code " : : " } and { @ code " : : 1 " } as proper i pv 6 addresses ( which they are ) , not i pv 4 compatible addresses ( which they are generally not considered to be )

public static boolean is compat i pv 4 address ( inet 6 address ip ) { if ( ! ip is i pv 4 compatible address ( ) ) { return false ; } byte [ ] bytes = ip get address ( ) ; if ( ( bytes [ 12 ] = = 0 ) & & ( bytes [ 13 ] = = 0 ) & & ( bytes [ 14 ] = = 0 ) & & ( ( bytes [ 15 ] = = 0 ) | | ( bytes [ 15 ] = = 1 ) ) ) { return false ; } return true ; }


returns all the i ps associated with the provided interface , if any , as a list of inet address objects

public static list < inet address > get i ps as inet address list ( string str interface , boolean return subinterfaces ) throws unknown host exception { if ( " default " equals ( str interface ) ) { return arrays as list ( inet address get by name ( cached host address ) ) ; } network interface net if ; try { net if = network interface get by name ( str interface ) ; if ( net if = = null ) { net if = get subinterface ( str interface ) ; } } catch ( socket exception e ) { log warn ( " i / o error finding interface { } : { } " , str interface , e get message ( ) ) ; return arrays as list ( inet address get by name ( cached host address ) ) ; } if ( net if = = null ) { throw new unknown host exception ( " no such interface " + str interface ) ; } / / nb : using a linked hash set to preserve the order for callers / / that depend on a particular element being 1st in the array / / for example , get default i p always returns the first element linked hash set < inet address > all addrs = new linked hash set < inet address > ( ) ; all addrs add all ( collections list ( net if get inet addresses ( ) ) ) ; if ( ! return subinterfaces ) { all addrs remove all ( get subinterface inet addrs ( net if ) ) ; } return new vector < inet address > ( all addrs ) ; }


returns true if the set of windows associated with this window manager are visible

public boolean is visible ( ) { return is visible ; }


the underlying collection of retention leases

public collection < retention lease > leases ( ) { return collections unmodifiable collection ( leases values ( ) ) ; }


gets the opcode out of an opcode unit , the latter of which may also include one or more argument values

public static int extract opcode from unit ( int opcode unit ) { / * * note : this method bakes in knowledge that all opcodes are * either single - byte or of the forms ( byte value < < 8 ) or * ( ( byte value < < 8 ) | 0xff ) * / int low byte = opcode unit & 0xff ; return ( ( low byte = = 0 ) | | ( low byte = = 0xff ) ) ? opcode unit : low byte ; }


public builder set num handlers ( int num handlers ) { this num handlers = num handlers ; return this ; }


try to install our custom rule profile into sandbox init ( ) to block execution

private static void mac impl ( path tmp file ) throws i o exception { / / first be defensive : we can give nice errors this way , at the very least boolean supported = constants mac os x ; if ( supported = = false ) { throw new illegal state exception ( " bug : should not be trying to initialize seatbelt for an unsupported os " ) ; } / / we couldn ' t link methods , could be some really ancient os x ( < leopard ) or some bug if ( libc mac = = null ) { throw new unsupported operation exception ( " seatbelt unavailable : could not link methods requires leopard or above " ) ; } / / write rules to a temporary file , which will be passed to sandbox init ( ) path rules = files create temp file ( tmp file , " es " , " sb " ) ; files write ( rules , collections singleton ( sandbox rules ) ) ; boolean success = false ; try { pointer by reference error ref = new pointer by reference ( ) ; int ret = libc mac sandbox init ( rules to absolute path ( ) to string ( ) , sandbox named , error ref ) ; / / if sandbox init ( ) fails , add the message from the os ( e g syntax error ) and free the buffer if ( ret ! = 0 ) { pointer error buf = error ref get value ( ) ; runtime exception e = new unsupported operation exception ( " sandbox init ( ) : " + error buf get string ( 0 ) ) ; libc mac sandbox free error ( error buf ) ; throw e ; } logger debug ( " os x seatbelt initialization successful " ) ; success = true ; } finally { if ( success ) { files delete ( rules ) ; } else { i o utils delete files ignoring exceptions ( rules ) ; } } }


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

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


writes a float to the specified index of this buffer ; the position is not changed

public abstract float buffer put ( int index , float f ) ;


standard way of initializing this filter map config parameters onto bean properties of this filter , and invoke subclass initialization

public final void init ( filter config filter config ) throws servlet exception { assert not null ( filter config , " filter config must not be null " ) ; this filter config = filter config ; / / set bean properties from init parameters property values pvs = new filter config property values ( filter config , this required properties ) ; if ( ! pvs is empty ( ) ) { try { bean wrapper bw = property accessor factory for bean property access ( this ) ; resource loader resource loader = new servlet context resource loader ( filter config get servlet context ( ) ) ; environment env = this environment ; if ( env = = null ) { env = new standard servlet environment ( ) ; } bw register custom editor ( resource class , new resource editor ( resource loader , env ) ) ; init bean wrapper ( bw ) ; bw set property values ( pvs , true ) ; } catch ( beans exception ex ) { string msg = " failed to set bean properties on filter ' " + filter config get filter name ( ) + " ' : " + ex get message ( ) ; logger error ( msg , ex ) ; throw new nested servlet exception ( msg , ex ) ; } } / / let subclasses do whatever initialization they like init filter bean ( ) ; if ( logger is debug enabled ( ) ) { logger debug ( " filter ' " + filter config get filter name ( ) + " ' configured for use " ) ; } }


returns a list of values the register takes in the extent

public list < big integer > get values for register ( string register ) { list < big integer > values list = new array list < big integer > ( ) ; set < big integer > values = regs to values get ( register ) ; if ( ( register ! = null ) & & ( values ! = null ) ) { values list add all ( values ) ; collections sort ( values list ) ; } return values list ; }


prints out a note about the class cast to this class , if applicable

public void visit class constant ( clazz clazz , class constant class constant ) { / / print out a note about the class cast if ( note exception matcher = = null | | ! note exception matcher matches ( class constant get name ( clazz ) ) ) { note printer print ( clazz get name ( ) , class constant get name ( clazz ) , " note : " + class util external class name ( clazz get name ( ) ) + " calls ' ( " + class util external class name ( class constant get name ( clazz ) ) + " ) class for name ( variable ) new instance ( ) ' " ) ; } }


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


delegates to the wrapped mbean server , but if a mbean is already registered with the specified name , the existing instance is returned

public object instance register m bean ( object object , object name name ) throws m bean registration exception , not compliant m bean exception { while ( true ) { try { / / try to register the mbean return mbean server register m bean ( object , name ) ; } catch ( instance already exists exception ignored ) { } try { / / a mbean is already installed , try to return the already registered instance object instance object instance = mbean server get object instance ( name ) ; log debug ( " % s already bound to % s " , name , object instance ) ; return object instance ; } catch ( instance not found exception ignored ) { / / the mbean was removed before we could get the reference / / start the whole process over again } } }


sets the < code > name < code > property

public additional properties boolean name ( string name ) { this name = name ; return this ; }


configure whether to verify certificate and hostname when making https requests default to true note : do not set to false in production code , otherwise you would face multiple types of cryptographic attacks

public api client set verifying ssl ( boolean verifying ssl ) { this verifying ssl = verifying ssl ; apply ssl settings ( ) ; return this ; }


removes the field identified by the provided path

public void remove field ( string path ) { field path field path = new field path ( path ) ; object context = field path initial context ; for ( int i = 0 ; i < field path path elements length - 1 ; i + + ) { context = resolve ( field path path elements [ i ] , path , context ) ; } string leaf key = field path path elements [ field path path elements length - 1 ] ; if ( context instanceof map ) { @ suppress warnings ( " unchecked " ) map < string , object > map = ( map < string , object > ) context ; if ( map contains key ( leaf key ) ) { map remove ( leaf key ) ; return ; } throw new illegal argument exception ( " field [ " + leaf key + " ] not present as part of path [ " + path + " ] " ) ; } if ( context instanceof list ) { @ suppress warnings ( " unchecked " ) list < object > list = ( list < object > ) context ; int index ; try { index = integer parse int ( leaf key ) ; } catch ( number format exception e ) { throw new illegal argument exception ( " [ " + leaf key + " ] is not an integer , cannot be used as an index as part of path [ " + path + " ] " , e ) ; } if ( index < 0 | | index > = list size ( ) ) { throw new illegal argument exception ( " [ " + index + " ] is out of bounds for array with length [ " + list size ( ) + " ] as part of path [ " + path + " ] " ) ; } list remove ( index ) ; return ; } if ( context = = null ) { throw new illegal argument exception ( " cannot remove [ " + leaf key + " ] from null as part of path [ " + path + " ] " ) ; } throw new illegal argument exception ( " cannot remove [ " + leaf key + " ] from object of type [ " + context get class ( ) get name ( ) + " ] as part of path [ " + path + " ] " ) ; }


test that lines on stderr get passed as warn level log messages

public void test stderr logging ( ) { assert true ( fencer try fence ( test target , " echo hello > & 2 " ) ) ; mockito verify ( shell command fencer log ) warn ( mockito ends with ( " echo hello > & 2 : hello " ) ) ; }


do some basic verification on the input received - - being defensive

private boolean verify sanity ( long compressed length , long decompressed length , int for reduce , set < task attempt i d > remaining , task attempt i d map id ) { if ( compressed length < 0 | | decompressed length < 0 ) { wrong length errs increment ( 1 ) ; log warn ( get name ( ) + " invalid lengths in map output header : id : " + map id + " len : " + compressed length + " , decomp len : " + decompressed length ) ; return false ; } if ( for reduce ! = reduce ) { wrong reduce errs increment ( 1 ) ; log warn ( get name ( ) + " data for the wrong reduce map : " + map id + " len : " + compressed length + " decomp len : " + decompressed length + " for reduce " + for reduce ) ; return false ; } / / sanity check if ( ! remaining contains ( map id ) ) { wrong map errs increment ( 1 ) ; log warn ( " invalid map - output ! received output for " + map id ) ; return false ; } return true ; }


perform complete analysis on the built program limited analysis may already have been performed during disassembly - so it may not be necessary to do complete analysis

public void analyze ( ) { auto analysis manager mgr = auto analysis manager get analysis manager ( program ) ; tx ( ( ) - > { mgr re analyze all ( program get memory ( ) get loaded and initialized address set ( ) ) ; mgr start analysis ( task monitor dummy , false ) ; } ) ; plugin tool analysis tool = mgr get analysis tool ( ) ; if ( analysis tool ! = null ) { abstract ghidra headed integration test wait for busy tool ( analysis tool ) ; } }


returns a depth - qualified name this helps to avoid name collisions when recursion reuses symbol names

string make name ( string name ) { return name + depth ; }


copies the contents of < code > original dir < code > to < code > copy dir < code > if the < code > original dir < code > does not exist , then this method will do nothing if < code > copy dir < code > does not exist , then it will be created as necessary

public final static int copy dir ( file original dir , file copy dir , file filter filter , task monitor monitor ) throws i o exception , cancelled exception { if ( monitor = = null ) { monitor = task monitor dummy ; } if ( ! original dir exists ( ) ) { return 0 ; / / nothing to do } file [ ] original dir files = original dir list files ( filter ) ; if ( original dir files = = null | | original dir files length = = 0 ) { return 0 ; / / nothing to do } int copied files count = 0 ; monitor initialize ( original dir files length ) ; for ( file file : original dir files ) { monitor check canceled ( ) ; monitor set message ( " copying " + file get absolute path ( ) ) ; file destination file = new file ( copy dir , file get name ( ) ) ; if ( file is directory ( ) ) { copied files count + = do copy dir ( file , destination file , filter , monitor ) ; } else { destination file get parent file ( ) mkdirs ( ) ; / / use a dummy monitor as not to ruin the progress copy file ( file , destination file , false , task monitor dummy ) ; copied files count + + ; } monitor increment progress ( 1 ) ; } return copied files count ; }


public void set scroll view callbacks ( observable scroll view callbacks listener ) { m callbacks = listener ; }


add the parents of the function to the hash family

private void add parents ( hash family family , function function , task monitor monitor ) throws memory access exception , cancelled exception { array list < function > parents = get parents ( function , true ) ; for ( function relation : parents ) { monitor check canceled ( ) ; fid hash quad hash = cache factory get ( relation ) ; if ( hash ! = null ) { family add parent ( hash ) ; } } }


public double get double ( ) { return double ; }


compute the path where the output of a committed task is stored until the entire job is committed

public path get committed task path ( task attempt context context ) { return get committed task path ( get app attempt id ( context ) , context ) ; }


sets the r , g , b and a bits per channel based on the given { @ link display mode } and sets the fullscreen flag to true

public void set from display mode ( display mode mode ) { this width = mode width ; this height = mode height ; if ( mode bits per pixel = = 16 ) { this r = 5 ; this g = 6 ; this b = 5 ; this a = 0 ; } if ( mode bits per pixel = = 24 ) { this r = 8 ; this g = 8 ; this b = 8 ; this a = 0 ; } if ( mode bits per pixel = = 32 ) { this r = 8 ; this g = 8 ; this b = 8 ; this a = 8 ; } this fullscreen = true ; }


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


get the gp0 value ( from reginfo and generated symbol )

long get g p 0 value ( ) { symbol symbol = symbol utilities get label or function symbol ( program , mips elf extension mips gp0 value symbol , err - > get log ( ) error ( " mips elf " , err ) ) ; if ( symbol = = null ) { return - 1 ; } return symbol get address ( ) get offset ( ) ; }


public static model and view produce error view ( final exception e ) { return new model and view ( cas webflow constants view id service error , collection utils wrap ( " root cause exception " , e ) ) ; }


returns the selected files this will show the file chooser

public list < file > get selected files ( ) { show ( ) ; if ( was cancelled ) { return collections empty list ( ) ; } list < file > filtered list = filter files for selection mode ( validated files ) ; return filtered list ; }


return true if this capitalization object is equal to o

public boolean equals ( object o ) { if ( this = = o ) { return true ; } if ( o = = null | | get class ( ) ! = o get class ( ) ) { return false ; } capitalization capitalization = ( capitalization ) o ; return objects equals ( this small camel , capitalization small camel ) & & objects equals ( this capital camel , capitalization capital camel ) & & objects equals ( this small snake , capitalization small snake ) & & objects equals ( this capital snake , capitalization capital snake ) & & objects equals ( this sc a e t h flow points , capitalization sc a e t h flow points ) & & objects equals ( this att name , capitalization att name ) ; }


return the configured list of supported locales

public list < locale > get supported locales ( ) { return this supported locales ; }


joins a multicast group and notifies the { @ link channel future } once the operation completes

channel future join group ( inet address multicast address ) ;


{ @ inherit doc } the default implementation does nothing

@ override public void enter pipe ( eql base parser pipe context ctx ) { }


returns the { @ link server } built by the delegate by default overriding method can return different value

public server build ( ) { return delegate ( ) build ( ) ; }


timeout callback might remain in the timer scheduling queue for some time and it might hold the pointers to other objects as a result it ' s possible to run out of memory if a large number of tasks are executed

private void run and clean ( runnable run ) { try { run run ( ) ; } finally { runnable = null ; timeout future = null ; } }


void save node ref ids ( list < long > node ref id list ) { node ref ids = new hash set < > ( node ref id list ) ; }


updates the tree props map with outputs from all { @ link on create tree prop } methods

protected @ nullable tree props get tree props for children ( component context c , @ nullable tree props tree props ) { return tree props ; }


public string to string ( ) { return " zoom modem " ; }


creates a notification manager and a low - priority notification channel with the specified { @ code channel id } and { @ code channel name } if the player notification manager is intended to be used within a foreground service , { @ link # create with notification channel ( context , string , int , int , media description adapter , notification listener ) } should be used to which a { @ link notification listener } can be passed this way you ' ll receive the notification to put the service into the foreground by calling { @ link android app service # start foreground ( int , notification ) }

public static player notification manager create with notification channel ( context context , string channel id , @ string res int channel name , @ string res int channel description , int notification id , media description adapter media description adapter ) { notification util create notification channel ( context , channel id , channel name , channel description , notification util importance low ) ; return new player notification manager ( context , channel id , notification id , media description adapter ) ; }


returns the minor version number of the debugging information format

public int get minor version ( ) { return minor version ; }


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


depending on whether the user said " yes " or " no " , send him to the right place

public void do act ( stapler request req , stapler response rsp ) throws i o exception { jenkins get ( ) check permission ( jenkins administer ) ; if ( req has parameter ( " no " ) ) { disable ( true ) ; rsp send redirect ( req get context path ( ) + " / manage " ) ; } else { rsp send redirect ( req get context path ( ) + " / new view " ) ; } }


checks if the state should be persisted , if true do save state is called before continuing inherited classes can override this , to provide a better logic , when state should be saved

protected boolean trigger save state ( ) { / / implementors can overwrite this with something more intelligent than every - 50 return ( stats get num pages ( ) > 0 & & stats get num pages ( ) % 50 = = 0 ) ; }


return the files in the target directory if retrieving the list of files requires specific access rights , that access will happen as the specified user the list will not include entries for " " or " "

protected file [ ] read dir as user ( string user , path dir ) { return new file ( dir to string ( ) ) list files ( ) ; }


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


public static void apply ( dense matrix x , dense matrix y , function < double , double > func ) { assert ( x m = = y m & & x n = = y n ) : " x and y size mismatched " ; double [ ] xdata = x data ; double [ ] ydata = y data ; for ( int i = 0 ; i < xdata length ; i + + ) { ydata [ i ] = func apply ( xdata [ i ] ) ; } }


gets the size of an unsigned little endian base 128 integer

public static int get u l e b 1 2 8 length ( program program , address addr ) { unsigned leb 1 2 8 data type uleb = unsigned leb 1 2 8 data type data type ; mem buffer buf = new dumb mem buffer impl ( program get memory ( ) , addr ) ; return uleb get length ( buf , - 1 ) ; }


find how many of the containing nodes are " extra " , if any if there are any extras , call choose excess redundancies ( ) to mark them in the excess redundancy map

private void process extra redundancy block ( final block info block , final short replication , final datanode descriptor added node , datanode descriptor del node hint ) { assert namesystem has write lock ( ) ; if ( added node = = del node hint ) { del node hint = null ; } collection < datanode storage info > non excess = new array list < > ( ) ; collection < datanode descriptor > corrupt nodes = corrupt replicas get nodes ( block ) ; for ( datanode storage info storage : blocks map get storages ( block ) ) { if ( storage get state ( ) ! = state normal ) { continue ; } final datanode descriptor cur = storage get datanode descriptor ( ) ; if ( storage are block contents stale ( ) ) { log trace ( " block * process extra redundancy block : postponing { } " + " since storage { } does not yet have up - to - date information " , block , storage ) ; postpone block ( block ) ; return ; } if ( ! is excess ( cur , block ) ) { if ( cur is in service ( ) ) { / / exclude corrupt replicas if ( corrupt nodes = = null | | ! corrupt nodes contains ( cur ) ) { non excess add ( storage ) ; } } } } choose excess redundancies ( non excess , block , replication , added node , del node hint ) ; }


remove a list of i node directory snapshottable from the snapshot manager

void remove snapshottable dirs ( list < i node directory > to remove ) { if ( snapshot manager ! = null ) { snapshot manager remove snapshottable ( to remove ) ; } }


get the { @ link exception handler setup } corresponding to the given type the exception handler setup is created if this the first request for the given type

exception handler setup get setup ( type caught type ) { exception handler setup handler = setups get ( caught type ) ; if ( handler = = null ) { int handler setup label = exception setup label allocator get next label ( ) ; handler = new exception handler setup ( caught type , handler setup label ) ; setups put ( caught type , handler ) ; } return handler ; }


set the < code > placement constraint expression < code > of the request

public scheduling request builder placement constraint expression ( placement constraint placement constraint expression ) { scheduling request set placement constraint ( placement constraint expression ) ; return this ; }


public boolean get bool item ( ) { return bool item ; }


validates the given address for this transport

void validate socket address ( socket address address ) { if ( ! socket address validator is valid socket address ( address ) ) { throw new illegal argument exception ( " invalid address " + address + " for transport " + this ) ; } }


get the selected option ; called after the apply button was hit

int get selected option ( ) { return ( current panel = = comment panel ) ? comment panel get selected option ( ) : name panel get selected option ( ) ; }


visit a parse tree produced by { @ link painless parser # declaration }

t visit declaration ( painless parser declaration context ctx ) ;


return all known subclusters associated with an allocation id

private set < sub cluster id > get sub clusters for id ( long allocation id ) { if ( count containers per r m get ( allocation id ) = = null ) { return null ; } return count containers per r m get ( allocation id ) key set ( ) ; }


a 3 wants a 1 , a 1 wants a 2 , path is a 1 , a 2 , a 3 , so a 2 comes after a 1

public void validate order ( ) throws exception { aspect a 1 = create aspect ( " a 1 " , " a 2 " ) ; aspect a 2 = create aspect ( " a 2 " ) ; aspect a 3 = create aspect ( " a 3 " , " a 1 " ) ; aspect collection collection = aspect collection create ( immutable list of ( a 1 , a 2 , a 3 ) ) ; validate aspect collection ( collection , immutable list of ( a 1 , a 2 , a 3 ) , expect deps ( a 1 ) , expect deps ( a 2 ) , expect deps ( a 3 , a 1 ) ) ; }