this test unit makes sure that if part of the config xml file is deleted it will still load everything else inside the folder the test unit expects an i o exception is thrown , and the one failed job fails to load

public void xml file fails to load ( ) throws exception { mock folder folder = r create folder ( " folder " ) ; assert not null ( folder ) ; abstract project project = folder create project ( free style project class , " job 1 " ) ; abstract project project 2 = folder create project ( free style project class , " job 2 " ) ; abstract project project 3 = folder create project ( free style project class , " job 3 " ) ; file config file = project get config file ( ) get file ( ) ; list < string > lines = file utils read lines ( config file ) sub list ( 0 , 5 ) ; config file delete ( ) ; / / remove half of the config xml file to make " invalid " or fail to load file utils write byte array to file ( config file , lines to string ( ) get bytes ( ) ) ; for ( int i = lines size ( ) / 2 ; i < lines size ( ) ; i + + ) { file utils write string to file ( config file , lines get ( i ) , true ) ; } / / reload jenkins r jenkins reload ( ) ; / / folder assert not null ( " folder failed to load " , r jenkins get item by full name ( " folder " ) ) ; assert null ( " job should have failed to load " , r jenkins get item by full name ( " folder / job 1 " ) ) ; assert not null ( " other job in folder should have loaded " , r jenkins get item by full name ( " folder / job 2 " ) ) ; assert not null ( " other job in folder should have loaded " , r jenkins get item by full name ( " folder / job 3 " ) ) ; }


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


delegates to the underlying file type map

public string get content type ( string file name ) { return get file type map ( ) get content type ( file name ) ; }


run a test checking that the given assembly parses , but does not assemble

protected void assert all semantic errors ( string assembly ) { run test ( assembly , null , null , default addr , null , false , false , false , true ) ; }


create a new method parameter for the given method or constructor this is a convenience factory method for scenarios where a method or constructor reference is treated in a generic fashion

public static method parameter for executable ( executable executable , int parameter index ) { if ( executable instanceof method ) { return new method parameter ( ( method ) executable , parameter index ) ; } else if ( executable instanceof constructor ) { return new method parameter ( ( constructor < ? > ) executable , parameter index ) ; } else { throw new illegal argument exception ( " not a method / constructor : " + executable ) ; } }


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

public void prepare response ( request matcher matcher , abstract response response , boolean disconnected ) { prepare response from ( matcher , response , null , disconnected , false ) ; }


notifies the given callback that the ping operation failed

public static void notify failed ( ping callback callback , executor executor , throwable cause ) { do execute ( executor , as runnable ( callback , cause ) ) ; }


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

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


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

< t > t convert send and receive ( d destination , object request , class < t > target class ) throws messaging exception ;


returns an integer value with value - 1 , 0 , or 1 , if this long value is less than , equal to , or greater than the given specific long value , respectively

public integer value compare ( specific long value other ) { return new comparison value ( this , other ) ; }


finds the variable or rule with the name < code > name < code > , defined in the current scope before the < code > offset < code > ( ninja allows to re - define the values of rules and variables )

private static < t > pair < long , t > find by name and offset ( long offset , string name , ninja scope scope , function < ninja scope , map < string , list < pair < long , t > > > > map function ) { list < pair < long , t > > pairs = preconditions check not null ( map function apply ( scope ) ) get ( name ) ; if ( pairs = = null ) { / / we may want to search in the parent scope return null ; } int insertion point = collections binary search ( pairs , pair of ( offset , null ) , comparator comparing ( pair : : get first ) ) ; if ( insertion point > = 0 ) { / / can not be , variable can not be defined in exactly same place throw new illegal state exception ( " trying to interpret declaration as reference " ) ; } / / we need to access the previous element , before the insertion point int idx = - insertion point - 2 ; if ( idx < 0 ) { / / check the parent scope return null ; } pair < long , t > pair = pairs get ( idx ) ; return pair of ( pair get first ( ) , pair get second ( ) ) ; }


public long get debug end offset ( ) { return internals get debug end offset ( ) ; }


sets if the progress bar should be vertical

public void set is vertical ( boolean is vertical ) { if ( m is vertical ! = is vertical ) { m is vertical = is vertical ; invalidate self ( ) ; } }


returns a rectangle that contains all vertices , in the layout space

public static < v , e > rectangle get bounds for vertices in layout space ( collection < v > vertices , function < v , rectangle > vertex to bounds ) { if ( vertices is empty ( ) ) { throw new illegal state exception ( " no vertices for which to find bounds ! " ) ; } double largest x = 0 ; double largest y = 0 ; double smallest x = integer max value ; double smallest y = integer max value ; for ( v v : vertices ) { rectangle bounds = vertex to bounds apply ( v ) ; int half width = bounds width > > 1 ; int half height = bounds height > > 1 ; double vertex x = bounds get x ( ) ; double vertex y = bounds get y ( ) ; double component min x = vertex x - half width ; double component min y = vertex y - half height ; double component max x = vertex x + half width ; double component max y = vertex y + half height ; smallest x = math min ( component min x , smallest x ) ; smallest y = math min ( component min y , smallest y ) ; largest x = math max ( component max x , largest x ) ; largest y = math max ( component max y , largest y ) ; } int width = ( int ) ( largest x - smallest x ) ; int height = ( int ) ( largest y - smallest y ) ; return new rectangle ( ( int ) smallest x , ( int ) smallest y , width , height ) ; }


return the number of bytes used on the file system

public long get used ( ) { return used ; }


utility function to get node info by calling rm web service

public static j s o n object get node info from r m web service ( configuration conf , string node id ) throws client handler exception , uniform interface exception { try { return web app utils exec on active r m ( conf , yarn web service utils : : get node info from r m , node id ) ; } catch ( exception e ) { if ( e instanceof client handler exception ) { throw ( ( client handler exception ) e ) ; } else if ( e instanceof uniform interface exception ) { throw ( ( uniform interface exception ) e ) ; } else { throw new runtime exception ( e ) ; } } }


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

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


whether this serializer supports the version of the output stream

default boolean supports version ( v value , version version ) { return true ; }


asserts that the storage lock file in each given directory has been released this method works by trying to acquire the lock file itself if locking fails here , then the main code must have failed to release it

private static void assert file locks released ( collection < string > dirs ) throws i o exception { for ( string dir : dirs ) { try { fs dataset test util assert file lock released ( dir ) ; } catch ( i o exception e ) { log warn ( " { } " , e ) ; } } }


post fake { pet id } upload image with required file

public model api response execute as ( function < response , response > handler ) { type ref < model api response > type = new type ref < model api response > ( ) { } ; return execute ( handler ) as ( type ) ; }


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

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


creates an { @ link ad display container } to hold the player for video ads , a container for non - linear ads , and slots for companion ads

ad display container create ad display container ( view group container , video ad player player ) ;


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


helper for { @ link # assign addresses and fix branches } , which checks the branch target size requirement of each branch instruction to make sure it fits for instructions that don ' t fit , this rewrites them to use a { @ code goto } of some sort in the case of a conditional branch that doesn ' t fit , the sense of the test is reversed in order to branch around a { @ code goto } to the original target

private boolean fix branches ( ) { int size = insns size ( ) ; boolean any fixed = false ; for ( int i = 0 ; i < size ; i + + ) { dalv insn insn = insns get ( i ) ; if ( ! ( insn instanceof target insn ) ) { / / this loop only needs to inspect target insns continue ; } dop opcode = insn get opcode ( ) ; target insn target = ( target insn ) insn ; if ( opcode get format ( ) branch fits ( target ) ) { continue ; } if ( opcode get family ( ) = = opcodes goto ) { / / it is a goto ; widen it if possible opcode = find opcode for insn ( insn , opcode ) ; if ( opcode = = null ) { / * * the branch is already maximally large this should * only be possible if a method somehow manages to have * more than 2 ^ 31 code units * / throw new unsupported operation exception ( " method too long " ) ; } insns set ( i , insn with opcode ( opcode ) ) ; } else { / * * it is a conditional : reverse its sense , and arrange for * it to branch around an absolute goto to the original * branch target * * note : an invariant of the list being processed is * that every target insn is followed by a code address * hence , it is always safe to get the next element * after a target insn and cast it to code address , as * is happening a few lines down * * also note : size gets incremented by one here , as we * have - - in the net - - added one additional element * to the list , so we increment i to match the added * and changed elements will be inspected by a repeat * call to this method after this invocation returns * / code address new target ; try { new target = ( code address ) insns get ( i + 1 ) ; } catch ( index out of bounds exception ex ) { / / the target insn / code address invariant was violated throw new illegal state exception ( " unpaired target insn ( dangling ) " ) ; } catch ( class cast exception ex ) { / / the target insn / code address invariant was violated throw new illegal state exception ( " unpaired target insn " ) ; } target insn goto insn = new target insn ( dops goto , target get position ( ) , register spec list empty , target get target ( ) ) ; insns set ( i , goto insn ) ; insns add ( i , target with new target and reversed ( new target ) ) ; size + + ; i + + ; } any fixed = true ; } return any fixed ; }


gets the next partial solution from this bulk iteration node

public optimizer node get next partial solution ( ) { return next partial solution ; }


public sock js message codec get message codec ( ) { assert state ( this message codec ! = null , " no sock js message codec set " ) ; return this message codec ; }


returns an iterator over all of the children of this node with the specfied name

public iterator < xml tree node > get children ( string name ) { return new tag iterator ( name ) ; }


get the normal namespace path excluding any library name global namespace will be returned as empty string , while other namespace paths will be returned with trailing : : suffix

public static string get namespace path without library ( namespace namespace ) { string str = new string ( ) ; while ( namespace ! = null & & ! ( namespace instanceof global namespace ) & & ! ( namespace instanceof library ) ) { str = namespace get name ( ) + namespace delimiter + str ; namespace = namespace get parent namespace ( ) ; } return str ; }


public string get application owner ( ) throws i o exception { t file reader scanner owner scanner = null ; try { owner scanner = reader create scanner ( ) ; log key key = new log key ( ) ; while ( ! owner scanner at end ( ) ) { t file reader scanner entry entry = owner scanner entry ( ) ; key read fields ( entry get key stream ( ) ) ; if ( key to string ( ) equals ( application owner key to string ( ) ) ) { data input stream value stream = entry get value stream ( ) ; return value stream read u t f ( ) ; } owner scanner advance ( ) ; } return null ; } finally { i o utils cleanup with logger ( log , owner scanner ) ; } }


public outer enum get outer enum ( ) { return outer enum or else ( null ) ; }


resolve the given embedded value through this instance ' s { @ link string value resolver }

protected string resolve embedded value ( string value ) { return ( this embedded value resolver ! = null ? this embedded value resolver resolve string value ( value ) : value ) ; }


this test checks that on reconfig , a new dynamic file will be created with current version appended to file name meanwhile , the dynamic file pointer in static config file should also be changed

public void test reconfig create new version file ( ) throws exception { final int server count = 3 ; final int new server count = 5 ; final int [ ] client ports = new int [ new server count ] ; final int [ ] quorum ports = new int [ new server count ] ; final int [ ] election ports = new int [ new server count ] ; final string [ ] servers = new string [ new server count ] ; string builder sb = new string builder ( ) ; array list < string > old servers = new array list < string > ( ) ; array list < string > new servers = new array list < string > ( ) ; for ( int i = 0 ; i < new server count ; i + + ) { client ports [ i ] = port assignment unique ( ) ; quorum ports [ i ] = port assignment unique ( ) ; election ports [ i ] = port assignment unique ( ) ; servers [ i ] = " server " + i + " = localhost : " + quorum ports [ i ] + " : " + election ports [ i ] + " : participant ; localhost : " + client ports [ i ] ; new servers add ( servers [ i ] ) ; if ( i > = server count ) { continue ; } old servers add ( servers [ i ] ) ; sb append ( servers [ i ] + " \ n " ) ; } string quorum cfg section = sb to string ( ) ; main thread [ ] mt = new main thread [ new server count ] ; zoo keeper [ ] zk = new zoo keeper [ new server count ] ; zoo keeper admin [ ] zk admin = new zoo keeper admin [ new server count ] ; / / start old cluster for ( int i = 0 ; i < server count ; i + + ) { mt [ i ] = new main thread ( i , client ports [ i ] , quorum cfg section , " reconfig enabled = true \ n " ) ; mt [ i ] start ( ) ; } string first version = null , second version = null ; / / test old cluster for ( int i = 0 ; i < server count ; i + + ) { assert true ( client base wait for server up ( " 127 0 0 1 : " + client ports [ i ] , connection timeout ) , " waiting for server " + i + " being up " ) ; zk [ i ] = client base create z k client ( " 127 0 0 1 : " + client ports [ i ] ) ; zk admin [ i ] = new zoo keeper admin ( " 127 0 0 1 : " + client ports [ i ] , client base connection timeout , this ) ; zk admin [ i ] add auth info ( " digest " , " super : test " get bytes ( ) ) ; properties cfg = reconfig legacy test read properties from file ( mt [ i ] conf file ) ; string filename = cfg get property ( " dynamic config file " , " " ) ; string version = quorum peer config get version from filename ( filename ) ; assert not null ( version ) ; string config str = reconfig test test server has config ( zk [ i ] , old servers , null ) ; string config version = get version from config str ( config str ) ; / / the version appended to filename should be the same as / / the one of quorum verifier assert equals ( version , config version ) ; if ( i = = 0 ) { first version = version ; } else { assert equals ( first version , version ) ; } } reconfig test reconfig ( zk admin [ 1 ] , null , null , new servers , - 1 ) ; / / start additional new servers for ( int i = server count ; i < new server count ; i + + ) { mt [ i ] = new main thread ( i , client ports [ i ] , quorum cfg section + servers [ i ] ) ; mt [ i ] start ( ) ; } / / wait for new servers to be up running for ( int i = server count ; i < new server count ; i + + ) { assert true ( client base wait for server up ( " 127 0 0 1 : " + client ports [ i ] , connection timeout ) , " waiting for server " + i + " being up " ) ; zk [ i ] = client base create z k client ( " 127 0 0 1 : " + client ports [ i ] ) ; } / / test that all servers have : / / a different , larger version dynamic file for ( int i = 0 ; i < new server count ; i + + ) { properties cfg = reconfig legacy test read properties from file ( mt [ i ] conf file ) ; string filename = cfg get property ( " dynamic config file " , " " ) ; string version = quorum peer config get version from filename ( filename ) ; assert not null ( version ) ; string config str = reconfig test test server has config ( zk [ i ] , new servers , null ) ; string quorum version = get version from config str ( config str ) ; assert equals ( version , quorum version ) ; if ( i = = 0 ) { second version = version ; assert true ( long parse long ( second version , 16 ) > long parse long ( first version , 16 ) ) ; } else { assert equals ( second version , version ) ; } } for ( int i = 0 ; i < server count ; i + + ) { mt [ i ] shutdown ( ) ; zk [ i ] close ( ) ; zk admin [ i ] close ( ) ; } }


return an { @ link http entity } for the given part object

protected http entity < ? > get http entity ( object part ) { return ( part instanceof http entity ? ( http entity < ? > ) part : new http entity < > ( part ) ) ; }


return { @ code true } if the script needs { @ code score } calculated , or { @ code false } otherwise


deletes the given entities in the database using a transaction

public void delete in tx ( iterable < t > entities ) { delete in tx internal ( entities , null ) ; }


public void test outer composite ( ) { / / todo : test outer composite }


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


public synchronized advice get advice ( ) { if ( this instantiated advice = = null ) { this instantiated advice = instantiate advice ( this declared pointcut ) ; } return this instantiated advice ; }


called whenever the mouse button is pressed

void button pressed ( field location location , field field , mouse event ev ) ;


this method serializes the specified object , including those of generic types , into its equivalent json representation this method must be used if the specified object is a generic type for non - generic objects , use { @ link # to json ( object ) } instead if you want to write out the object to a { @ link appendable } , use { @ link # to json ( object , type , appendable ) } instead

public string to json ( object src , type type of src ) { string writer writer = new string writer ( ) ; to json ( src , type of src , writer ) ; return writer to string ( ) ; }


construct the first part of a " tc " command to define a qdisc child handler for the given interface this can only be used if a root handler has been appropriately defined first ( as in { @ link # root handler } )

private void child handler ( string network device , consumer < string > consumer ) { stream of ( " sudo " , " tc " , " qdisc " , " add " , " dev " , network device , " parent " , " 1 : 1 " , " handle " , " 10 : " ) for each ( consumer ) ; }


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


return all beans of the given type or subtypes , also picking up beans defined in ancestor bean factories if the current bean factory is a hierarchical bean factory the returned map will only contain beans of this type does consider objects created by factory beans , which means that factory beans will get initialized if the object created by the factory bean doesn ' t match , the raw factory bean itself will be matched against the type < b > note : beans of the same name will take precedence at the ' lowest ' factory level , i e such beans will be returned from the lowest factory that they are being found in , hiding corresponding beans in ancestor factories < b > this feature allows for ' replacing ' beans by explicitly choosing the same bean name in a child factory ; the bean in the ancestor factory won ' t be visible then , not even for by - type lookups

public static < t > map < string , t > beans of type including ancestors ( listable bean factory lbf , class < t > type ) throws beans exception { assert not null ( lbf , " listable bean factory must not be null " ) ; map < string , t > result = new linked hash map < > ( 4 ) ; result put all ( lbf get beans of type ( type ) ) ; if ( lbf instanceof hierarchical bean factory ) { hierarchical bean factory hbf = ( hierarchical bean factory ) lbf ; if ( hbf get parent bean factory ( ) instanceof listable bean factory ) { map < string , t > parent result = beans of type including ancestors ( ( listable bean factory ) hbf get parent bean factory ( ) , type ) ; parent result for each ( ( bean name , bean instance ) - > { if ( ! result contains key ( bean name ) & & ! hbf contains local bean ( bean name ) ) { result put ( bean name , bean instance ) ; } } ) ; } } return result ; }


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


set the single type of { @ link callback } to use this may be used instead of { @ link # set callback } when calling { @ link # create class } , since it may not be possible to have an array of actual callback instances

public void set callback type ( class callback type ) { set callback types ( new class [ ] { callback type } ) ; }


returns all the host names associated by the default nameserver with the address bound to the specified network interface

public static string [ ] get hosts ( string str interface ) throws unknown host exception { return get hosts ( str interface , null , false ) ; }


return the max number of { @ link byte buf } ' s that are composed in this instance

public int max num components ( ) { return max num components ; }


private void update node labels and queue resource ( node labels update scheduler event label update event ) { write lock lock ( ) ; try { set < string > update labels = new hash set < string > ( ) ; for ( entry < node id , set < string > > entry : label update event get updated node to labels ( ) entry set ( ) ) { node id id = entry get key ( ) ; set < string > labels = entry get value ( ) ; fi ca scheduler node node = node tracker get node ( id ) ; if ( node ! = null ) { / / update old partition to list update labels add ( node get partition ( ) ) ; } update labels on node ( id , labels ) ; update labels add all ( labels ) ; } refresh label to node cache ( update labels ) ; resource cluster resource = get cluster resource ( ) ; get root queue ( ) update cluster resource ( cluster resource , new resource limits ( cluster resource ) ) ; } finally { write lock unlock ( ) ; } }


< code > required string method name = 1 ; < code > name of the rpc method

public builder set method name ( java lang string value ) { if ( value = = null ) { throw new null pointer exception ( ) ; } bit field 0 | = 0x 0 0 0 0 0 0 0 1 ; method name = value ; on changed ( ) ; return this ; }


gets the memory size of the processor architecture of this process note that the memory address size might be different than the actual hardware architecture , due to the installed os ( 3 2bit os ) or when installing a 32 bit jre in a 64 bit os

public static memory address size get memory address size ( ) { return get processor architecture ( ) get address size ( ) ; }


gets the array of first - available image requests for performance reasons , the array is not deep - copied , but only stored by reference please don ' t modify

public request [ ] get first available image requests ( ) { return m multi image requests ; }


pick one of provided parameters randomly

private t generate param ( ) { int i = thread local random current ( ) next int ( 0 , params length ) ; return params [ i ] ; }


the position in the file at which this symbol is defined for debug use < code > optional aapt pb source position source = 2 ; < code >

private void set source ( com android aapt resources source position builder builder for value ) { source = builder for value build ( ) ; bit field 0 | = 0x 0 0 0 0 0 0 0 2 ; }


notify this analyzer that a run has been canceled

public void run canceled ( ) { / / throw away saved up address sets to be analyzed get added address set ( ) ; get removed address set ( ) ; scheduled = false ; }


public void put counters ( map < string , long > counters ) { this counters map = counters ; }


configure one or more request header names ( e g " accept - language " ) to add to the " vary " response header to inform clients that the response is subject to content negotiation and variances based on the value of the given request headers the configured request header names are added only if not already present in the response " vary " header

public final void set vary by request headers ( @ nullable string vary by request headers ) { this vary by request headers = vary by request headers ; }


extracts the id of the user from the provided credential this method should be overridden by subclasses to achieve more sophisticated strategies for producing a principal id from a credential

protected string extract principal id ( final credential credential , final optional < principal > current principal ) { logger debug ( " extracting credential id based on existing credential [ { } ] " , credential ) ; val id = credential get id ( ) ; if ( current principal is present ( ) ) { val principal = current principal get ( ) ; logger debug ( " principal is currently resolved as [ { } ] " , principal ) ; if ( context is use current principal id ( ) ) { logger debug ( " using the existing resolved principal id [ { } ] " , principal get id ( ) ) ; return principal get id ( ) ; } else { logger debug ( " cas will not be using the identifier from the resolved principal [ { } ] as it ' s not " + " configured to use the currently - resolved principal id and will fall back onto using the identifier " + " for the credential , that is [ { } ] , for principal resolution " , principal , id ) ; } } else { logger debug ( " no principal is currently resolved and available falling back onto using the identifier " + " for the credential , that is [ { } ] , for principal resolution " , id ) ; } logger debug ( " extracted principal id [ { } ] " , id ) ; return id ; }


default response entity < void > add pet ( pet body ) { return new response entity < > ( http status not implemented ) ; }


this method is { @ link deprecated } , use { @ link default rolling policy # builder ( ) } instead

public static default rolling policy policy builder create ( ) { return builder ( ) ; }


returns a view collection containing the value from each key - value pair contained in this multimap , without collapsing duplicates ( so { @ code values ( ) size ( ) = = size ( ) } ) changes to the returned collection will update the underlying multimap , and vice versa however , adding to the returned collection is not possible


create a new read only representation of headers used by clients

public static read only http 2 headers client headers ( boolean validate headers , ascii string method , ascii string path , ascii string scheme , ascii string authority , ascii string other headers ) { return new read only http 2 headers ( validate headers , new ascii string [ ] { pseudo header name method value ( ) , method , pseudo header name path value ( ) , path , pseudo header name scheme value ( ) , scheme , pseudo header name authority value ( ) , authority } , other headers ) ; }


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

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


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


returns the total number of nanoseconds the cache has spent loading new values this can be used to calculate the miss penalty this value is increased every time { @ code load success count } or { @ code load failure count } is incremented

public long total load time ( ) { return total load time ; }


validate the supplied { @ code target } object , which must be of a { @ link class } for which the { @ link # supports ( class ) } method typically has ( or would ) return { @ code true } the supplied { @ link errors errors } instance can be used to report any resulting validation errors

void validate ( object target , errors errors ) ;


returns a random int within 0 - integer max value

public static int next int ( ) { return next int ( 0 , integer max value ) ; }


returns estimated total number of bytes compaction needs to rewrite to get all levels down to under target size not valid for other compactions than level - based

public void enable estimate pending compaction bytes ( ) { this properties add ( rocks d b property estimate pending compaction bytes get rocks d b property ( ) ) ; }


public static int get screen width ( ) { window manager wm = ( window manager ) utils get app ( ) get system service ( context window service ) ; if ( wm = = null ) return - 1 ; point point = new point ( ) ; if ( build version sdk int > = build version codes jelly bean mr1 ) { wm get default display ( ) get real size ( point ) ; } else { wm get default display ( ) get size ( point ) ; } return point x ; }


public void trim payload ( ) { if ( packet array get data ( ) length = = ogg page header max page payload ) { return ; } packet array reset ( arrays copy of ( packet array get data ( ) , max ( ogg page header max page payload , packet array limit ( ) ) ) , / * limit = * / packet array limit ( ) ) ; }


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

public immutable sorted multiset < e > build ( ) { dedup and coalesce and delete empty ( ) ; if ( length = = 0 ) { return empty multiset ( comparator ) ; } regular immutable sorted set < e > element set = ( regular immutable sorted set < e > ) immutable sorted set construct ( comparator , length , elements ) ; long [ ] cumulative counts = new long [ length + 1 ] ; for ( int i = 0 ; i < length ; i + + ) { cumulative counts [ i + 1 ] = cumulative counts [ i ] + counts [ i ] ; } force copy elements = true ; return new regular immutable sorted multiset < e > ( element set , cumulative counts , 0 , length ) ; }


creates corresponding negotiator according to whether on android

static ok http protocol negotiator create negotiator ( class loader loader ) { boolean android = true ; try { / / attempt to find android 2 3 + a p is loader load class ( " com android org conscrypt open s s l socket impl " ) ; } catch ( class not found exception e 1 ) { logger log ( level fine , " unable to find conscrypt skipping " , e 1 ) ; try { / / older platform before being unbundled loader load class ( " org apache harmony xnet provider jsse open s s l socket impl " ) ; } catch ( class not found exception e 2 ) { logger log ( level fine , " unable to find any open s s l socket impl skipping " , e 2 ) ; android = false ; } } return android ? new android negotiator ( default platform ) : new ok http protocol negotiator ( default platform ) ; }


similar to { @ link # get variables ( collection ) ) } , but with a flag that indicates that all variables should be fetched when fetching the specific variables if set to false , only the specific variables will be fetched dependening on the use case , this can be better for performance , as it avoids fetching and processing the other variables however , if the other variables are needed further on , getting them in one go is probably better ( and the variables are cached during one { @ link command } execution )

map < string , object > get variables ( collection < string > variable names , boolean fetch all variables ) ;


get the map of local resources to be used for launching this container

private map < string , local resource > get local resources ( ) { map < string , local resource > local resources = new hash map < > ( ) ; map < string , string > envs = system getenv ( ) ; add as local resource from env ( dyno constants conf zip , local resources , envs ) ; add as local resource from env ( dyno constants start script , local resources , envs ) ; add as local resource from env ( dyno constants hadoop binary , local resources , envs ) ; add as local resource from env ( dyno constants version , local resources , envs ) ; add as local resource from env ( dyno constants dyno dependencies , local resources , envs ) ; if ( is name node launcher ) { add as local resource from env ( dyno constants fs image , local resources , envs ) ; add as local resource from env ( dyno constants fs image md5 , local resources , envs ) ; } else { int block files to localize = math max ( 1 , am options get data nodes per cluster ( ) ) ; for ( int i = 0 ; i < block files to localize ; i + + ) { try { local resources put ( dyno constants block list resource path prefix + i , block list files remove ( 0 ) ) ; } catch ( index out of bounds exception e ) { break ; } } } return local resources ; }


returns { @ code true } if the the given cipher ( in openssl format ) is for t l sv 1 3 , { @ code false } otherwise

static boolean is t l sv 1 3 cipher ( string cipher ) { / / see https : / / tools ietf org / html / rfc 8 4 4 6 # appendix - b 4 return tlsv13 ciphers contains ( cipher ) ; }


creates a { @ link char stream } given a { @ link reader } closes the reader before returning

public static code point char stream from reader ( reader r ) throws i o exception { return from reader ( r , int stream unknown source name ) ; }


initialize this transformer this is called once per instance when the topology gets initialized the provided { @ link processor context context } can be used to access topology and record meta data , to { @ link processor context # schedule ( duration , punctuation type , punctuator ) schedule } a method to be { @ link punctuator # punctuate ( long ) called periodically } and to access attached { @ link state store } s note that { @ link processor context } is updated in the background with the current record ' s meta data thus , it only contains valid record meta data when accessed within { @ link # transform ( object , object ) } note that using { @ link processor context # forward ( object , object ) } or { @ link processor context # forward ( object , object , to ) } is not allowed within any method of { @ code value transformer with key } and will result in an { @ link streams exception exception }

void init ( final processor context context ) ;


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


sets the label of the toolchain to resolve for use in toolchain - aware rules

public builder toolchain label ( label toolchain label ) { this toolchain label = toolchain label ; return this ; }


find the nth occurrence of the given byte b in a utf - 8 encoded string

public static int find nth byte ( byte [ ] utf , byte b , int n ) { return find nth byte ( utf , 0 , utf length , b , n ) ; }


aggregate response data and convert to a string using the " content - type " charset or " utf - 8 " by default

public mono < string > get body as string ( ) { charset charset = optional of nullable ( get headers ( ) get content type ( ) ) map ( mime type : : get charset ) or else ( standard charsets utf 8 ) ; return data buffer utils join ( get body ( ) ) map ( buffer - > { string s = buffer to string ( charset ) ; data buffer utils release ( buffer ) ; return s ; } ) default if empty ( " " ) ; }


creates a new { @ link object mapper } with guava , logback , and joda time support , as well as support for { @ link json snake case } also includes all { @ link discoverable } interface implementations

public static object mapper new object mapper ( ) { final object mapper mapper = new object mapper ( ) ; return configure ( mapper ) ; }


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

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


draws a rectangle with the bottom left corner at x , y having the given width and height in pixels the rectangle is offset by origin x , origin y relative to the origin scale specifies the scaling factor by which the rectangle should be scaled around origin x , origin y rotation specifies the angle of counter clockwise rotation of the rectangle around origin x , origin y the portion of the { @ link texture } given by src x , src y and src width , src height is used these coordinates and sizes are given in texels flip x and flip y specify whether the texture portion should be flipped horizontally or vertically

public void draw ( texture texture , float x , float y , float origin x , float origin y , float width , float height , float scale x , float scale y , float rotation , int src x , int src y , int src width , int src height , boolean flip x , boolean flip y ) ;


save the database to the specified buffer file

public synchronized void save as ( file file , boolean associate with new file , task monitor monitor ) throws i o exception , cancelled exception { if ( file exists ( ) ) { throw new duplicate file exception ( " file already exists : " + file ) ; } local buffer file out file = new local buffer file ( file , buffer mgr get buffer size ( ) ) ; boolean success = false ; try { save as ( out file , associate with new file , monitor ) ; success = true ; } finally { if ( ! success ) { out file delete ( ) ; } else if ( ! associate with new file ) { out file dispose ( ) ; } } }


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


get the punctuators scheduled so far the returned list is not affected by subsequent calls to { @ code schedule ( ) }

public list < captured punctuator > scheduled punctuators ( ) { return new linked list < > ( punctuators ) ; }


get a report of all ( containers ) of application attempt in the cluster

public abstract list < container report > get containers ( application attempt id application attempt id ) throws yarn exception , i o exception ;


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

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


returns the quotient of the given specific float value and this float value

public float value divide of ( specific float value other ) { return divide of ( ( float value ) other ) ; }


compute the arguments the binary should be run with by concatenating the arguments in its { @ code args } attribute and the arguments on the blaze command line

private list < string > compute args ( configured target target to run , list < string > command line args ) throws interrupted exception , command line expansion exception { list < string > args = lists new array list ( ) ; files to run provider provider = target to run get provider ( files to run provider class ) ; runfiles support runfiles support = provider = = null ? null : provider get runfiles support ( ) ; if ( runfiles support ! = null & & runfiles support get args ( ) ! = null ) { command line target args = runfiles support get args ( ) ; iterables add all ( args , target args arguments ( ) ) ; } args add all ( command line args ) ; return args ; }


replaces the resource at the specified index and returns the old resource

public disposable replace resource ( int index , disposable resource ) { for ( ; ; ) { disposable o = get ( index ) ; if ( o = = disposable helper disposed ) { resource dispose ( ) ; return null ; } if ( compare and set ( index , o , resource ) ) { return o ; } } }


authorized operations for this group , or null if that information is not known

public set < acl operation > authorized operations ( ) { return authorized operations ; }


trust access to writable memory based on initialized option

public boolean allow access ( varnode context context , address addr ) { return trust memory write ; }


sets optional thread pool for jetty server this is useful for overriding the default thread pool behaviour for example io dropwizard metrics jetty 9 instrumented queued thread pool

public embedded jetty server with thread pool ( thread pool thread pool ) { this thread pool = thread pool ; return this ; }


creates a configured instance of { @ link calcite parser }

public calcite parser create calcite parser ( ) { return new calcite parser ( get sql parser config ( ) ) ; }


set the domain owner the user doesn ' t need to set it , which will automatically set to the user who puts the domain

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


returns the { @ code float } value of a header with the specified { @ code name } and removes the header from this object if there is more than one value for the specified name , the first value in insertion order is returned in any case all values for { @ code name } are removed if an exception occurs during the translation from type { @ code t } all entries with { @ code name } may still be removed


returns the string " expression " after expanding all embedded references to " make " variables if any errors are encountered , they are reported , and " expression " is returned unchanged

public string expand ( @ nullable string attribute name , string expression ) { try { expansion expansion = template expander expand ( expression , template context ) ; looked up variables add all ( expansion looked up variables ( ) ) ; return expansion expansion ( ) ; } catch ( expansion exception e ) { if ( attribute name = = null ) { rule context rule error ( e get message ( ) ) ; } else { rule context attribute error ( attribute name , e get message ( ) ) ; } return expression ; } }


transforms the value in < code > slot < code > to a { @ link comparable } object

abstract t to comparable ( int slot ) throws i o exception ;


extract public key from resource public key

public static public key extract public key from resource ( final string secret key to use ) { logger debug ( " attempting to extract public key from [ { } ] " , secret key to use ) ; val resource = resource utils get resource from ( secret key to use ) ; val factory = new public key factory bean ( resource , rsa key util rsa ) ; factory set singleton ( false ) ; return factory get object ( ) ; }


visits a { @ link fill array data insn }

public void visit fill array data insn ( fill array data insn insn ) ;


sets the polygon to be rotated by the supplied degrees

public void set rotation ( float degrees ) { this rotation = degrees ; dirty = true ; }


refresh superuser proxy groups mappings ( used in rbf )

boolean refresh super user groups configuration ( ) throws i o exception ;


public void get gauge ( io grpc testing integration metrics gauge request request , io grpc stub stream observer < io grpc testing integration metrics gauge response > response observer ) { io grpc stub server calls async unimplemented unary call ( get get gauge method ( ) , response observer ) ; }


allocate the next external block entry location based upon the specified size

private address get next external block entry address ( int entry size ) { if ( next external block entry address = = null ) { int alignment = elf get load adapter ( ) get linkage block alignment ( ) ; external block limits = allocate linkage block ( alignment , - 1 , " external block " ) ; next external block entry address = external block limits ! = null ? external block limits get min address ( ) : address no address ; } address addr = next external block entry address ; if ( addr ! = address no address ) { try { address last addr = next external block entry address add no wrap ( entry size - 1 ) ; if ( external block limits contains ( last addr ) ) { last external block entry address = last addr ; next external block entry address = last external block entry address add no wrap ( 1 ) ; if ( ! external block limits contains ( next external block entry address ) ) { next external block entry address = address no address ; } } else { / / unable to allocation entry size next external block entry address = address no address ; return address no address ; } } catch ( address overflow exception e ) { next external block entry address = address no address ; } } return addr ! = address no address ? addr : null ; }


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


this method is called for each element in the second of the connected streams this function can output zero or more elements using the { @ link collector } parameter and also update internal state or set timers using the { @ link context } parameter

public abstract void process element 2 ( in2 value , context ctx , collector < out > out ) throws exception ;


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


static string [ ] break into path components ( final string path ) { return path = = null ? null : path split ( path separator ) ; }


returns a rule class name suitable for log messages , including an aspect name if applicable

public string get rule class name for logging ( ) { if ( aspects is empty ( ) ) { return target get associated rule ( ) get rule class ( ) ; } return joiner on ( " , " ) join ( aspects stream ( ) map ( a - > a get descriptor ( ) ) collect ( collectors to list ( ) ) ) + " aspect on " + target get associated rule ( ) get rule class ( ) ; }


gets the default mime type , which is { @ code " applicationoctet - stream " }

public static string get default mime type ( ) { return default mime type ; }


set the need sash borders for the controls

public void set sash borders ( boolean [ ] sash borders ) { int [ ] weights = get weights ( ) ; / / kludge this is a kludge just to see how many controls we have if ( weights length ! = 2 | | ( sash borders ! = null & & sash borders length ! = 2 ) ) { swt error ( swt error invalid argument ) ; } this sash borders = sash borders ; }


process a multi object delete exception by building two paths from the delete request : one of all deleted files , one of all undeleted values the latter are those rejected in the delete call

public pair < list < key path > , list < key path > > split undeleted keys ( final multi object delete exception delete exception , final collection < delete objects request key version > keys to delete ) { log debug ( " processing delete failure ; keys to delete count = { } ; " + " errors in exception { } ; successful deletions = { } " , keys to delete size ( ) , delete exception get errors ( ) size ( ) , delete exception get deleted objects ( ) size ( ) ) ; / / convert the collection of keys being deleted into paths final list < key path > paths being deleted = keys to key paths ( keys to delete ) ; / / take this ist of paths / / extract all undeleted entries contained in the exception and / / then remove them from the original list list < key path > undeleted = remove undeleted paths ( delete exception , paths being deleted , get store context ( ) : : key to path ) ; return pair of ( undeleted , paths being deleted ) ; }


waits for the value returned by the supplier to be non - null , throwing an exception if that does not happen by the default timeout

public static < t > t wait for ( supplier < t > supplier ) { return wait for value ( supplier ) ; }


helper method that creates update entry for the given shard id if such an entry does not exist yet

private updates changes ( shard id shard id ) { return shard changes compute if absent ( shard id , k - > new updates ( ) ) ; }


get the configuration for a connector the configuration will have been transformed by { @ link org apache kafka common config config transformer } by having all variable references replaced with the current values from external instances of { @ link config provider } , and may include secrets

public map < string , string > connector config ( string connector ) { map < string , string > configs = connector configs get ( connector ) ; if ( config transformer ! = null ) { configs = config transformer transform ( connector , configs ) ; } return configs ; }


returns the state descriptor for the queryable state instance

public state descriptor < ? , v > get state descriptor ( ) { return state descriptor ; }


does the given class or one of its superclasses at least have one or more methods with the supplied name ( with any argument types ) ? includes non - public methods

public static boolean has at least one method with name ( class < ? > clazz , string method name ) { assert not null ( clazz , " class must not be null " ) ; assert not null ( method name , " method name must not be null " ) ; method [ ] declared methods = clazz get declared methods ( ) ; for ( method method : declared methods ) { if ( method get name ( ) equals ( method name ) ) { return true ; } } class < ? > [ ] ifcs = clazz get interfaces ( ) ; for ( class < ? > ifc : ifcs ) { if ( has at least one method with name ( ifc , method name ) ) { return true ; } } return ( clazz get superclass ( ) ! = null & & has at least one method with name ( clazz get superclass ( ) , method name ) ) ; }


return the name of a subscription to create , if any

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


return whether the proxy currently holds a target connection

private boolean has target connection ( ) { return ( this target ! = null ) ; }


private native void gav 1 close ( long context ) ;


called when the native type is an { @ link float }

t for float ( function < float consumer , grok capture extracter > build extracter ) ;


returns true if this task is applicable to the given project

public abstract boolean is applicable ( abstract project < ? , ? > item ) ;


for a given attribute , returns all declared provider provided by targets of that attribute each declared provider is keyed by the { @ link build configuration } under which the provider was created

public < c extends info > immutable list multimap < build configuration , c > get prerequisites by configuration ( string attribute name , builtin provider < c > provider ) { check attribute is dependency ( attribute name ) ; list < configured target and data > ctat collection = get prerequisite configured targets ( attribute name ) ; immutable list multimap builder < build configuration , c > result = immutable list multimap builder ( ) ; for ( configured target and data prerequisite : ctat collection ) { c prerequisite provider = prerequisite get configured target ( ) get ( provider ) ; if ( prerequisite provider ! = null ) { result put ( prerequisite get configuration ( ) , prerequisite provider ) ; } } return result build ( ) ; }


get the current record leaf if the current record can not be found , attempt to recover the record position

private field key record node get record leaf ( boolean recover prev ) throws i o exception { if ( root buffer id < 0 | | record = = null ) { return null ; } field key = record get key field ( ) ; field key record node leaf = null ; is next = false ; is prev = false ; if ( expected mod count = = mod count ) { leaf = ( field key record node ) get field key node ( buffer id ) ; if ( record index > = leaf get key count ( ) | | ! leaf get key field ( record index ) equals ( key ) ) { leaf = null ; / / something changed - key search required } } if ( leaf = = null ) { / / something changed - try to relocate record using key field key node root node = get field key node ( root buffer id ) ; leaf = root node get leaf node ( key ) ; int index = leaf get key index ( key ) ; if ( index < 0 ) { / / record was deleted - position on next key index = - index - 1 ; if ( recover prev ) { - - index ; if ( index < 0 ) { leaf = leaf get previous leaf ( ) ; index = leaf ! = null ? ( leaf get key count ( ) - 1 ) : 0 ; } is prev = true ; } else { if ( index = = leaf get key count ( ) ) { leaf = leaf get next leaf ( ) ; index = 0 ; } is next = true ; } } if ( leaf ! = null ) { buffer id = leaf get buffer id ( ) ; record index = index ; } expected mod count = mod count ; } return leaf ; }


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


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


method called after restoring a batch of records in this case the maximum size of the batch is whatever the value of the max poll records is set to this method is called after restoring each batch and it is advised to keep processing to a minimum any heavy processing will hold up recovering the next batch , hence slowing down the restore process as a whole if you need to do any extended processing or connecting to an external service consider doing so asynchronously

void on batch restored ( final topic partition topic partition , final string store name , final long batch end offset , final long num restored ) ;


byte argument greater than or equal to the given value see examples in javadoc for { @ link additional matchers } class

public static byte geq ( byte value ) { report matcher ( new greater or equal < byte > ( value ) ) ; return 0 ; }


many times ( range of 1 integer max value )

public static expected count many times ( ) { return new expected count ( 1 , integer max value ) ; }


getter of the { @ link org apache flink streaming api graph stream graph } of the streaming job this call clears previously registered { @ link transformation transformations }

public stream graph get stream graph ( string job name ) { return get stream graph ( job name , true ) ; }


returns a string containing the supplied { @ code float } values , converted to strings as specified by { @ link float # to string ( float ) } , and separated by { @ code separator } for example , { @ code join ( " - " , 1 0f , 2 0f , 3 0f ) } returns the string { @ code " 1 0 - 2 0 - 3 0 " } note that { @ link float # to string ( float ) } formats { @ code float } differently in gwt in the previous example , it returns the string { @ code " 1 - 2 - 3 " }

public static string join ( string separator , float array ) { check not null ( separator ) ; if ( array length = = 0 ) { return " " ; } / / for pre - sizing a builder , just get the right order of magnitude string builder builder = new string builder ( array length * 12 ) ; builder append ( array [ 0 ] ) ; for ( int i = 1 ; i < array length ; i + + ) { builder append ( separator ) append ( array [ i ] ) ; } return builder to string ( ) ; }


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


checks that future get times out , with the default timeout of { @ code timeout millis ( ) }

void assert future times out ( future future ) { assert future times out ( future , timeout millis ( ) ) ; }


protected < t extends base record > byte [ ] serialize ( t record ) { return serializer serialize ( record ) ; }


public static byte [ ] decode hex ( char sequence input ) { return base encoding base 1 6 ( ) decode ( input ) ; }


public pattern evaluation stats evaluate patterns ( list < pattern info row object > rows ) { array list < pattern > pattern list = get pattern list ( rows ) ; if ( only pre patterns ) { msg show warn ( this , this , " only pre - patterns " , " only pre - patterns in selection : no true / false positive information will be calculated " ) ; } sequence search state root = sequence search state build state machine ( pattern list ) ; index to size clear ( ) ; for ( pattern pattern : pattern list ) { index to size put ( pattern get index ( ) , pattern get size ( ) ) ; } program current program = plugin get current program ( ) ; memory block [ ] blocks = current program get memory ( ) get blocks ( ) ; pattern evaluation stats match stats = new pattern evaluation stats ( ) ; for ( memory block block : blocks ) { if ( ! block is initialized ( ) ) { continue ; } / / todo : add toggle for searching non - executable blocks ? if ( ! block is execute ( ) ) { continue ; } search block ( root , block , match stats , current program , task monitor dummy ) ; } return match stats ; }


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


repeat a previous traversal of { @ code children } performed by { @ link # walk } and recorded in { @ code memo } , appending leaves to { @ code output }

private static < e > int replay ( immutable list builder < e > output , object [ ] children , byte [ ] memo , int pos ) { for ( object child : children ) { if ( ( memo [ pos > > 3 ] & ( 1 < < ( pos & 7 ) ) ) ! = 0 ) { if ( child instanceof object [ ] ) { pos = replay ( output , ( object [ ] ) child , memo , pos + 1 ) ; } else { output add ( ( e ) child ) ; + + pos ; } } else { + + pos ; } } return pos ; }


registers a listener to be { @ linkplain executor # execute ( runnable ) run } on the given executor the listener will run when the { @ code future } ' s computation is { @ linkplain future # is done ( ) complete } or , if the computation is already complete , immediately there is no guaranteed ordering of execution of listeners , but any listener added through this method is guaranteed to be called once the computation is complete exceptions thrown by a listener will be propagated up to the executor any exception thrown during { @ code executor execute } ( e g , a { @ code rejected execution exception } or an exception thrown by { @ linkplain more executors # direct executor direct execution } ) will be caught and logged note : if your listener is lightweight - - and will not cause stack overflow by completing more futures or adding more { @ code direct executor ( ) } listeners inline - - consider { @ link more executors # direct executor } otherwise , avoid it : see the warnings on the docs for { @ code direct executor } this is the most general listener interface for common operations performed using listeners , see { @ link futures } for a simplified but general listener interface , see { @ link futures # add callback add callback ( ) } memory consistency effects : actions in a thread prior to adding a listener < a href = " https : docs oracle comjavasespecsjlsse 7htmljls - 17 html # jls - 17 4 5 " > happen - before its execution begins , perhaps in another thread guava implementations of { @ code listenable future } promptly release references to listeners after executing them

void add listener ( runnable listener , executor executor ) ;


returns the < a href = " https : en wikipedia orgwiki endianness " > endianness of this buffer


flushes remaining output and cleans up resources if necessary this method is called whether or not there was an error

public void close ( boolean fail fast ) throws interrupted exception , i o exception { }


this method is the only entry point to get a base adapter helper

public static base adapter helper get ( context context , view convert view , view group parent , int layout id ) { return get ( context , convert view , parent , layout id , - 1 ) ; }


checks if there is at least one { @ link graph display provider } in the system

public boolean has default graph display provider ( ) ;


fake endpoint for testing various parameters 가짜 엔드 포인트 fake endpoint for testing various parameters 가짜 엔드 포인트

public void test endpoint parameters ( big decimal number , double double , string pattern without delimiter , byte [ ] byte , integer integer , integer int 3 2 , long int 6 4 , float float , string string , file binary , local date date , offset date time date time , string password , string param callback ) throws api exception { test endpoint parameters with http info ( number , double , pattern without delimiter , byte , integer , int 3 2 , int 6 4 , float , string , binary , date , date time , password , param callback ) ; }


makes a simple http get request to the price microservice

public string get price ( ) { var http client = http client new http client ( ) ; var http get = http request new builder ( ) get ( ) uri ( uri create ( " http : / / localhost : 50006 / price " ) ) build ( ) ; try { logger info ( " sending request to fetch price info " ) ; var http response = http client send ( http get , body handlers of string ( ) ) ; log response ( http response ) ; return http response body ( ) ; } catch ( i o exception | interrupted exception e ) { logger error ( " failure occurred while getting price info " , e ) ; } return null ; }


returns the divider location between the left margin areas and the main display

public int get divider location ( ) { if ( split pane ! = null ) { return split pane get divider location ( ) ; } return split pane divider location ; }


announce creates a log print preventing travis ci from killing the build


add headers to the request that is being built

protected void add headers to request ( http headers headers , web client request body spec request builder ) { for ( entry < string , list < string > > entry : headers entry set ( ) ) { list < string > values = entry get value ( ) ; for ( string value : values ) { if ( value ! = null ) { request builder header ( entry get key ( ) , value ) ; } } } }


returns entry data size , based on directory entry information for a valid zip file , this will be the correct size of of the entry data

public int data size ( ) { return get ( cenhow ) = = 0 ? get ( cenlen ) : get ( censiz ) ; }


schedule all registered tasks against the underlying { @ linkplain # set task scheduler ( task scheduler ) task scheduler }

protected void schedule tasks ( ) { if ( this task scheduler = = null ) { this local executor = executors new single thread scheduled executor ( ) ; this task scheduler = new concurrent task scheduler ( this local executor ) ; } if ( this trigger tasks ! = null ) { for ( trigger task task : this trigger tasks ) { add scheduled task ( schedule trigger task ( task ) ) ; } } if ( this cron tasks ! = null ) { for ( cron task task : this cron tasks ) { add scheduled task ( schedule cron task ( task ) ) ; } } if ( this fixed rate tasks ! = null ) { for ( interval task task : this fixed rate tasks ) { add scheduled task ( schedule fixed rate task ( task ) ) ; } } if ( this fixed delay tasks ! = null ) { for ( interval task task : this fixed delay tasks ) { add scheduled task ( schedule fixed delay task ( task ) ) ; } } }


public snapshot info bean [ ] get snapshots ( ) ;


the actual sync activity happens while not synchronized on this object thus , synchronized activities that require that they are not concurrent with file operations should wait for any running sync to finish

synchronized void wait for sync to finish ( ) { while ( is sync running ) { try { wait ( 1000 ) ; } catch ( interrupted exception ie ) { } } }


public static file find containing jar ( class my class ) throws i o exception { class loader loader = my class get class loader ( ) ; if ( loader = = null ) { throw new i o exception ( " class " + my class + " does not have a classloader ! " ) ; } string class file = my class get name ( ) replace all ( " \ \ " , " / " ) + " class " ; enumeration < url > url enumeration = loader get resources ( class file ) ; for ( ; url enumeration has more elements ( ) ; ) { url url = url enumeration next element ( ) ; if ( " jar " equals ( url get protocol ( ) ) ) { string to return = url get path ( ) ; if ( to return starts with ( " file : " ) ) { to return = to return substring ( " file : " length ( ) ) ; } / / u r l decoder is a misnamed class , since it actually decodes / / x - www - form - urlencoded mime type rather than actual / / url encoding ( which the file path has ) therefore it would / / decode + s to ' ' s which is incorrect ( spaces are actually / / either unencoded or encoded as " % 20 " ) replace + s first , so / / that they are kept sacred during the decoding process to return = to return replace all ( " \ \ + " , " % 2b " ) ; to return = u r l decoder decode ( to return , " utf - 8 " ) ; string jar file path = to return replace all ( " ! * $ " , " " ) ; return new file ( jar file path ) ; } else { log info ( " could not locate jar containing { } url = { } " , my class , url ) ; } } return null ; }


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


tests a tuple writable with more than 64 values and the values set written spread far apart

public void test sparse wide writable ( ) throws exception { writable [ ] many writs = make random writables ( 131 ) ; tuple writable s tuple = new tuple writable ( many writs ) ; for ( int i = 0 ; i < many writs length ; i + + ) { if ( i % 65 = = 0 ) { s tuple set written ( i ) ; } } byte array output stream out = new byte array output stream ( ) ; s tuple write ( new data output stream ( out ) ) ; byte array input stream in = new byte array input stream ( out to byte array ( ) ) ; tuple writable d tuple = new tuple writable ( ) ; d tuple read fields ( new data input stream ( in ) ) ; assert true ( " failed to write / read tuple " , s tuple equals ( d tuple ) ) ; assert equals ( " all tuple data has not been read from the stream " , - 1 , in read ( ) ) ; }


gets the release future which is completed once the execution reaches a terminal state and the assigned resource has been released this future is always completed from the job master ' s main thread

public completable future < ? > get release future ( ) { return release future ; }


public object node client beat ( http servlet request request ) throws exception { override parameter request wrapper request wrapper = override parameter request wrapper build request ( request ) ; request wrapper add parameter ( common params service name , constants default group + constants service info spliter + web utils required ( request , " dom " ) ) ; return beat ( request wrapper ) ; }


sets the strategy to use for the combine phase of the reduce if this method is not called , then the default hint will be used ( { @ link org apache flink api common operators base reduce operator base combine hint # optimizer chooses } )

public reduce operator < in > set combine hint ( combine hint strategy ) { this hint = strategy ; return this ; }


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


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


gets the total number of shards from all indices , including replicas and closed indices

public int get total number of shards ( ) { return this total number of shards ; }


any comments associated with the plural < code > optional string comment = 2 ; < code >

public com google protobuf byte string get comment bytes ( ) { return instance get comment bytes ( ) ; }


sets whether the job should be submitted in a detached manner

public job submission builder set detached ( final boolean detached ) { this detached = detached ; return this ; }


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


public static < k , v > builder < k , v > builder ( ) { return new builder < > ( ) ; }


creates a new int buffer by wrapping the given int array the new buffer ' s position will be { @ code start } , limit will be { @ code start + len } , capacity will be the length of the array

public static int buffer wrap ( int [ ] array , int start , int len ) { if ( array = = null ) { throw new null pointer exception ( ) ; } if ( start < 0 | | len < 0 | | ( long ) len + ( long ) start > array length ) { throw new index out of bounds exception ( ) ; } int buffer buf = buffer factory new int buffer ( array ) ; buf position = start ; buf limit = start + len ; return buf ; }


public void test model api response ( ) { / / todo : test model api response }


use the given { @ link clock } instance for the time

public builder with clock ( clock clock ) { this clock = clock ; return this ; }


authenticates against a url and returns a { @ link authenticated u r l token } to be used by subsequent requests

public void authenticate ( url url , authenticated u r l token token ) throws i o exception , authentication exception ;


set this to true to draw the text that is displayed in the center of the pie chart

public void set draw center text ( boolean enabled ) { this m draw center text = enabled ; }


get the throwable exception emitted by this command instance prior to checking the fallback this exception instance may have been generated via a number of mechanisms : 1 ) failed execution ( in this case , same result as { @ link # get failed execution exception ( ) } 2 ) timeout 3 ) short - circuit 4 ) rejection 5 ) bad request if the command execution was successful , then this exception instance is null ( there was no exception ) note that the caller of the command may not receive this exception , as fallbacks may be served as a response to the exception

public throwable get execution exception ( ) { return execution result get execution exception ( ) ; }


returns the version of the ghidra being run

public string get ghidra version ( ) { return application get application version ( ) ; }


return the file name of the api documentation

public string to api doc filename ( string name ) { return to api name ( name ) ; }


returns the appropriate { @ code get - field } rop for the given type the result is a shared instance

public static rop op get field ( type bearer type ) { switch ( type get basic type ( ) ) { case type bt int : return get field int ; case type bt long : return get field long ; case type bt float : return get field float ; case type bt double : return get field double ; case type bt object : return get field object ; case type bt boolean : return get field boolean ; case type bt byte : return get field byte ; case type bt char : return get field char ; case type bt short : return get field short ; } return throw bad type ( type ) ; }


returns a synchronized ( thread - safe ) table backed by the specified table in order to guarantee serial access , it is critical that < b > all < b > access to the backing table is accomplished through the returned table it is imperative that the user manually synchronize on the returned table when accessing any of its collection views : { @ code table < r , c , v > table = tables synchronized table ( hash based table < r , c , v > create ( ) ) ; map < c , v > row = table row ( row key ) ; needn ' t be in synchronized block synchronized ( table ) { synchronizing on table , not row ! iterator < entry < c , v > > i = row entry set ( ) iterator ( ) ; must be in synchronized block while ( i has next ( ) ) { foo ( i next ( ) ) ; } } } failure to follow this advice may result in non - deterministic behavior the returned table will be serializable if the specified table is serializable

public static < r , c , v > table < r , c , v > synchronized table ( table < r , c , v > table ) { return synchronized table ( table , null ) ; }


one request followed by one response response has cache control headers set such that a caching http proxy ( such as gfe ) can satisfy subsequent requests

public io grpc testing integration messages simple response cacheable unary call ( io grpc testing integration messages simple request request ) { return io grpc stub client calls blocking unary call ( get channel ( ) , get cacheable unary call method ( ) , get call options ( ) , request ) ; }


private void cancel all active futures ( ) { log debug ( " cancelling futures " ) ; for ( listenable future < part e tag > future : part e tags futures ) { future cancel ( true ) ; } }


public static http response execute get ( final string url ) { return execute get ( url , null , null , new linked hash map < > ( map size ) ) ; }


creates a char sequence reader wrapping the given char sequence and tests that the reader produces the same sequence when read using each type of read method it provides

private static void assert reads correctly ( char sequence char sequence ) throws i o exception { string expected = char sequence to string ( ) ; / / read char by char char sequence reader reader = new char sequence reader ( char sequence ) ; for ( int i = 0 ; i < expected length ( ) ; i + + ) { assert equals ( expected char at ( i ) , reader read ( ) ) ; } assert fully read ( reader ) ; / / read all to one array reader = new char sequence reader ( char sequence ) ; char [ ] buf = new char [ expected length ( ) ] ; assert equals ( expected length ( ) = = 0 ? - 1 : expected length ( ) , reader read ( buf ) ) ; assert equals ( expected , new string ( buf ) ) ; assert fully read ( reader ) ; / / read in chunks to fixed array reader = new char sequence reader ( char sequence ) ; buf = new char [ 5 ] ; string builder builder = new string builder ( ) ; int read ; while ( ( read = reader read ( buf , 0 , buf length ) ) ! = - 1 ) { builder append ( buf , 0 , read ) ; } assert equals ( expected , builder to string ( ) ) ; assert fully read ( reader ) ; / / read all to one char buffer reader = new char sequence reader ( char sequence ) ; char buffer buf 2 = char buffer allocate ( expected length ( ) ) ; assert equals ( expected length ( ) = = 0 ? - 1 : expected length ( ) , reader read ( buf 2 ) ) ; buf 2 flip ( ) ; assert equals ( expected , buf 2 to string ( ) ) ; assert fully read ( reader ) ; / / read in chunks to fixed char buffer reader = new char sequence reader ( char sequence ) ; buf 2 = char buffer allocate ( 5 ) ; builder = new string builder ( ) ; while ( reader read ( buf 2 ) ! = - 1 ) { buf 2 flip ( ) ; builder append ( buf 2 ) ; buf 2 clear ( ) ; } assert equals ( expected , builder to string ( ) ) ; assert fully read ( reader ) ; / / skip fully reader = new char sequence reader ( char sequence ) ; assert equals ( expected length ( ) , reader skip ( long max value ) ) ; assert fully read ( reader ) ; / / skip 5 and read the rest if ( expected length ( ) > 5 ) { reader = new char sequence reader ( char sequence ) ; assert equals ( 5 , reader skip ( 5 ) ) ; buf = new char [ expected length ( ) - 5 ] ; assert equals ( buf length , reader read ( buf , 0 , buf length ) ) ; assert equals ( expected substring ( 5 ) , new string ( buf ) ) ; assert fully read ( reader ) ; } }


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

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


public cancellable delete watch async ( delete watch request request , request options options , action listener < delete watch response > listener ) { return rest high level client perform request async and parse entity ( request , watcher request converters : : delete watch , options , delete watch response : : from x content , listener , singleton ( 404 ) ) ; }


initiates an orderly shutdown in which preexisting calls continue but new calls are immediately cancelled

public managed channel impl shutdown ( ) { channel logger log ( channel log level debug , " shutdown ( ) called " ) ; if ( ! shutdown compare and set ( false , true ) ) { return this ; } final class shutdown implements runnable { @ override public void run ( ) { channel logger log ( channel log level info , " entering shutdown state " ) ; channel state manager goto state ( shutdown ) ; } } sync context execute ( new shutdown ( ) ) ; real channel shutdown ( ) ; final class cancel idle timer implements runnable { @ override public void run ( ) { cancel idle timer ( / * permanent = * / true ) ; } } sync context execute ( new cancel idle timer ( ) ) ; return this ; }


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


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


appends a char subsequence to the printer ' s buffer

public final printer append ( char sequence s , int start , int end ) { buffer append ( s , start , end ) ; return this ; }


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


returns whether an animation is used to show and hide the playback controls

public boolean is animation enabled ( ) { return control view layout manager is animation enabled ( ) ; }


returns the number of retries this job has left whenever the jobexecutor fails to execute the job , this value is decremented when it hits zero , the job is supposed to be dead and not retried again ( ie a manual retry is required then )


long key node remove leaf ( ) throws i o exception { long key = get key ( 0 ) ; int prev buffer id = buffer get int ( prev leaf id offset ) ; int next buffer id = buffer get int ( next leaf id offset ) ; if ( prev buffer id > = 0 ) { long key record node prev node = ( long key record node ) node mgr get long key node ( prev buffer id ) ; prev node get buffer ( ) put int ( next leaf id offset , next buffer id ) ; } if ( next buffer id > = 0 ) { long key record node next node = ( long key record node ) node mgr get long key node ( next buffer id ) ; next node get buffer ( ) put int ( prev leaf id offset , prev buffer id ) ; } node mgr delete node ( this ) ; if ( parent = = null ) { return null ; } return parent delete child ( key ) ; }


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


serializes the value with the given serializer

public static < t > byte [ ] serialize value ( t value , type serializer < t > serializer ) throws i o exception { if ( value ! = null ) { / / serialize data output serializer dos = new data output serializer ( 32 ) ; serializer serialize ( value , dos ) ; return dos get copy of buffer ( ) ; } else { return null ; } }


set a resolved java method for the factory method on this bean definition

public void set resolved factory method ( @ nullable method method ) { this factory method to introspect = method ; }


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


removes all ranges from this { @ code range set } ( optional operation ) after this operation , { @ code this contains ( c ) } will return false for all { @ code c } this is equivalent to { @ code remove ( range all ( ) ) }


list children ; mark the result as non - auth if the ttl has expired if the allow authoritative flag is true , return without filtering or checking for ttl expiry if false : the expiry scan takes place and the todo : should we always purge tombstones ? even in auth ?

public static dir listing metadata list children with ttl ( metadata store ms , path path , @ nullable i ttl time provider time provider , boolean allow authoritative ) throws i o exception { dir listing metadata dlm = ms list children ( path ) ; if ( time provider = = null ) { log debug ( " time provider is null , returning dir listing metadata as is " ) ; return dlm ; } if ( allow authoritative ) { log debug ( " allow authoritative is true , returning path metadata as is " ) ; return dlm ; } / / filter expired entries if ( dlm ! = null ) { list < path metadata > expired = dlm remove expired entries from listing ( time provider get metadata ttl ( ) , time provider get now ( ) ) ; / / now purge the tombstones for ( path metadata metadata : expired ) { if ( metadata is deleted ( ) ) { ms forget metadata ( metadata get file status ( ) get path ( ) ) ; } } } return dlm ; }


public int execute ( ) throws service launch exception , i o exception { try { final file scan file = new file ( dest path + scan csv ) get canonical file ( ) ; file parent dir = scan file get parent file ( ) ; if ( ! parent dir mkdirs ( ) & & ! parent dir is directory ( ) ) { throw new path i o exception ( parent dir to string ( ) , " could not create destination directory " ) ; } try ( csv file csv = new csv file ( scan file ) ; duration info ignored = new duration info ( log , " scan file dump to % s " , scan file ) ) { scan entry result = scan metastore ( csv ) ; } if ( get filesystem ( ) ! = null ) { path base path = get filesystem ( ) qualify ( new path ( get uri ( ) ) ) ; final file dest file = new file ( dest path + store csv ) get canonical file ( ) ; log info ( " writing store details to { } " , dest file ) ; try ( csv file csv = new csv file ( dest file ) ; duration info ignored = new duration info ( log , " list metastore " ) ) { log info ( " base path : { } " , base path ) ; dump metastore ( csv , base path ) ; } / / these operations all update the metastore as they list , / / that is : they are side - effecting final file treewalk file = new file ( dest path + tree csv ) get canonical file ( ) ; try ( csv file csv = new csv file ( treewalk file ) ; duration info ignored = new duration info ( log , " treewalk to % s " , treewalk file ) ) { treewalk count = treewalk filesystem ( csv , base path ) ; } final file flatlist file = new file ( dest path + flat csv ) get canonical file ( ) ; try ( csv file csv = new csv file ( flatlist file ) ; duration info ignored = new duration info ( log , " flat list to % s " , flatlist file ) ) { list status count = list status filesystem ( csv , base path ) ; } final file raw file = new file ( dest path + raw csv ) get canonical file ( ) ; try ( csv file csv = new csv file ( raw file ) ; duration info ignored = new duration info ( log , " raw dump to % s " , raw file ) ) { raw object store count = dump raw s 3 object store ( csv ) ; } final file scan file 2 = new file ( dest path + scan2 csv ) get canonical file ( ) ; try ( csv file csv = new csv file ( scan file ) ; duration info ignored = new duration info ( log , " scan file dump to % s " , scan file 2 ) ) { second scan result = scan metastore ( csv ) ; } } return launcher exit codes exit success ; } catch ( i o exception | runtime exception e ) { log error ( " failure " , e ) ; throw e ; } }


creates a replaying connectable observable with a time bound buffer

public static < t > connectable flowable < t > create ( flowable < t > source , long max age , time unit unit , scheduler scheduler , boolean eager truncate ) { return create ( source , max age , unit , scheduler , integer max value , eager truncate ) ; }


if < code > true < code > the analysis component created by this provider requires certain settings to be instantiated it can ' t be created with defaults the default is < code > false < code >

default boolean requires analysis settings ( ) { return false ; }


tests that the namenode edits dirs and shared edits dirs are gotten with duplicates removed

public void test h a unique edit dirs ( ) throws i o exception { configuration conf = new configuration ( ) ; conf set ( dfs namenode edits dir key , " file : / / edits / dir , " + " file : / / edits / shared / dir " ) ; / / overlapping conf set ( dfs namenode shared edits dir key , " file : / / edits / shared / dir " ) ; / / get namespace edits dirs removes duplicates across edits and shared edits collection < uri > edits dirs = f s namesystem get namespace edits dirs ( conf ) ; assert equals ( 2 , edits dirs size ( ) ) ; }


judge whether current server own the lock or not

public boolean can current server own the lock ( ) { boolean current owner is me = sub info collect lock owner = = null | | inet utils get self i p ( ) equals ( sub info collect lock owner ) ; if ( current owner is me ) { return true ; } if ( system current time millis ( ) - this sub info collect lock expire time > lock expire duration ) { 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 " ) ; }


deletes this file or directory and all children , recursively @ throw gdx runtime exception if this file handle is a { @ link file type # classpath } or { @ link file type # internal } file

public boolean delete directory ( ) { throw new gdx runtime exception ( " cannot delete an internal file : " + file ) ; }


set the flag to indicate if this datanode is disallowed from communicating with the namenode

public void set disallowed ( boolean flag ) { disallowed = flag ; }


public integer get snake case ( ) { return snake case ; }


get next offset for reading if current < 0 then choose initial offset according to the read type

private long next offset ( long current ) { if ( skip size = = 0 ) return rnd next long ( file size ) ; if ( skip size > 0 ) return ( current < 0 ) ? 0 : ( current + buffer size + skip size ) ; / / skip size < 0 return ( current < 0 ) ? math max ( 0 , file size - buffer size ) : math max ( 0 , current + skip size ) ; }


provides local access to an output block stream this method should only be used if the associated { @ link buffer file adapter # is remote ( ) } is false

public output block stream get output block stream ( int block count ) throws i o exception ;


get a representation of an address as it would appear in bytes in memory

public static byte [ ] get direct address bytes ( program program , address to address ) { memory memory = program get memory ( ) ; boolean is big endian = memory is big endian ( ) ; int addr size = to address get size ( ) ; data converter data converter = data converter get instance ( memory is big endian ( ) ) ; byte [ ] address bytes = new byte [ addr size / 8 ] ; if ( to address instanceof segmented address ) { / / only search for offset ( exclude segment ) address bytes = new byte [ 2 ] ; segmented address seg addr = ( segmented address ) to address ; short addr short = ( short ) seg addr get segment offset ( ) ; data converter get bytes ( addr short , address bytes ) ; } else if ( addr size = = 64 ) { long addr long = to address get addressable word offset ( ) ; data converter get bytes ( addr long , address bytes ) ; } else if ( addr size = = 32 ) { int addr int = ( int ) to address get addressable word offset ( ) ; data converter get bytes ( addr int , address bytes ) ; } else if ( addr size = = 16 ) { short addr short = ( short ) to address get addressable word offset ( ) ; data converter get bytes ( addr short , address bytes ) ; } else { / / handle any addr size the hard way byte [ ] temp bytes = new byte [ 8 ] ; long addr long = to address get addressable word offset ( ) ; data converter get bytes ( addr long , temp bytes ) ; system arraycopy ( temp bytes , is big endian ? ( temp bytes length - address bytes length ) : 0 , address bytes , 0 , address bytes length ) ; } return address bytes ; }


test the property ' map of map property '

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


test the method node heartbeat method should return a not null result

public void test node heartbeat ( ) throws exception { node heartbeat request request = record factory new record instance ( node heartbeat request class ) ; assert not null ( client node heartbeat ( request ) ) ; resource tracker test impl exception = true ; try { client node heartbeat ( request ) ; fail ( " there should be yarn exception " ) ; } catch ( yarn exception e ) { assert true ( e get message ( ) starts with ( " test message " ) ) ; } finally { resource tracker test impl exception = false ; } }


specifies the window on which the join operation works

public < w extends window > with window < t1 , t2 , key , w > window ( window assigner < ? super tagged union < t1 , t2 > , w > assigner ) { return new with window < > ( input 1 , input 2 , key selector 1 , key selector 2 , key type , assigner , null , null , null ) ; }


the attributes of this element < code > repeated aapt pb xml attribute attribute = 4 ; < code >

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


boolean dispatch rewind ( player player ) ;


adds the given value to the configuration object the main key of the config option will be used to map the value

public void set double ( config option < double > key , double value ) { set value internal ( key key ( ) , value ) ; }


enables and disables the rendering of html content in this renderer if enabled , this renderer will interpret html content when the text this renderer is showing begins with { @ code < html > }

public void set h t m l rendering enabled ( boolean enable ) { if ( renderer instanceof j component ) { ( ( j component ) renderer ) put client property ( g component html disable string , ! enable ) ; } super set h t m l rendering enabled ( enable ) ; }


protected static i person attribute dao get attribute repository ( ) { val repositories = application context provider get attribute repository ( ) ; return repositories or else ( null ) ; }


greet server if provided , the first element of { @ code args } is the name to use in the greeting and the second is the client identifier to set in jwt

public static void main ( string [ ] args ) throws exception { string host = " localhost " ; int port = 50051 ; string user = " world " ; string client id = " default - client " ; if ( args length > 0 ) { host = args [ 0 ] ; / / use the arg as the server host if provided } if ( args length > 1 ) { port = integer parse int ( args [ 1 ] ) ; / / use the second argument as the server port if provided } if ( args length > 2 ) { user = args [ 2 ] ; / / use the the third argument as the name to greet if provided } if ( args length > 3 ) { client id = args [ 3 ] ; / / use the fourth argument as the client identifier if provided } call credentials credentials = new jwt credential ( client id ) ; auth client client = new auth client ( credentials , host , port ) ; try { client greet ( user ) ; } finally { client shutdown ( ) ; } }


path to an externalembedded script that allows for triggering of mfa


friendly way to create an array of bytes with static values

public static byte [ ] bytes ( int unsigned bytes ) { byte [ ] result = new byte [ unsigned bytes length ] ; for ( int i = 0 ; i < unsigned bytes length ; i + + ) { result [ i ] = ( byte ) unsigned bytes [ i ] ; } return result ; }


set the debug script to run when the reduce tasks fail the debug script can aid debugging of failed reduce tasks the script is given task ' s stdout , stderr , syslog , jobconf files as arguments the debug command , run on the node where the map failed , is : < blockquote > $ script $ stdout $ stderr $ syslog $ jobconf < blockquote > the script file is distributed through { @ link distributed cache } a p is the script file needs to be symlinked here is an example on how to submit a script < blockquote > job set reduce debug script ( " myscript " ) ; distributed cache create symlink ( job ) ; distributed cache add cache file ( " debugscriptsmyscript # myscript " ) ; < blockquote >

public void set reduce debug script ( string r dbg script ) { set ( job context reduce debug script , r dbg script ) ; }


return whether the file for this property file exists

public boolean exists ( ) { return property file exists ( ) ; }


public float get particle radius ( ) { return m particle system get particle radius ( ) ; }


reads a jvms ' stack map frame ' structure and stores the result in the given { @ link context } object this method can also be used to read a full frame structure , excluding its frame type field ( this is used to parse the legacy stack map attributes )

private int read stack map frame ( final int stack map frame offset , final boolean compressed , final boolean expand , final context context ) { int current offset = stack map frame offset ; final char [ ] char buffer = context char buffer ; final label [ ] labels = context current method labels ; int frame type ; if ( compressed ) { / / read the frame type field frame type = class file buffer [ current offset + + ] & 0x f f ; } else { frame type = frame full frame ; context current frame offset = - 1 ; } int offset delta ; context current frame local count delta = 0 ; if ( frame type < frame same locals 1 stack item frame ) { offset delta = frame type ; context current frame type = opcodes f same ; context current frame stack count = 0 ; } else if ( frame type < frame reserved ) { offset delta = frame type - frame same locals 1 stack item frame ; current offset = read verification type info ( current offset , context current frame stack types , 0 , char buffer , labels ) ; context current frame type = opcodes f same1 ; context current frame stack count = 1 ; } else if ( frame type > = frame same locals 1 stack item frame extended ) { offset delta = read unsigned short ( current offset ) ; current offset + = 2 ; if ( frame type = = frame same locals 1 stack item frame extended ) { current offset = read verification type info ( current offset , context current frame stack types , 0 , char buffer , labels ) ; context current frame type = opcodes f same1 ; context current frame stack count = 1 ; } else if ( frame type > = frame chop frame & & frame type < frame same frame extended ) { context current frame type = opcodes f chop ; context current frame local count delta = frame same frame extended - frame type ; context current frame local count - = context current frame local count delta ; context current frame stack count = 0 ; } else if ( frame type = = frame same frame extended ) { context current frame type = opcodes f same ; context current frame stack count = 0 ; } else if ( frame type < frame full frame ) { int local = expand ? context current frame local count : 0 ; for ( int k = frame type - frame same frame extended ; k > 0 ; k - - ) { current offset = read verification type info ( current offset , context current frame local types , local + + , char buffer , labels ) ; } context current frame type = opcodes f append ; context current frame local count delta = frame type - frame same frame extended ; context current frame local count + = context current frame local count delta ; context current frame stack count = 0 ; } else { final int number of locals = read unsigned short ( current offset ) ; current offset + = 2 ; context current frame type = opcodes f full ; context current frame local count delta = number of locals ; context current frame local count = number of locals ; for ( int local = 0 ; local < number of locals ; + + local ) { current offset = read verification type info ( current offset , context current frame local types , local , char buffer , labels ) ; } final int number of stack items = read unsigned short ( current offset ) ; current offset + = 2 ; context current frame stack count = number of stack items ; for ( int stack = 0 ; stack < number of stack items ; + + stack ) { current offset = read verification type info ( current offset , context current frame stack types , stack , char buffer , labels ) ; } } } else { throw new illegal argument exception ( ) ; } context current frame offset + = offset delta + 1 ; create label ( context current frame offset , labels ) ; return current offset ; }


maps a range to a specified value ( optional operation ) specifically , after a call to { @ code put ( range , value ) } , if { @ link range # contains ( comparable ) range contains ( k ) } , then { @ link # get ( comparable ) get ( k ) } will return { @ code value } if { @ code range } { @ linkplain range # is empty ( ) is empty } , then this is a no - op

void put ( range < k > range , v value ) ;


get total interval length of the sliding window

public double get interval in second ( ) { return interval in second ; }


set the interval for the date histogram grouping

public builder set interval ( interval interval ) { this interval = interval ; return this ; }


public static long get length ( final file file ) { if ( file = = null ) return 0 ; if ( file is directory ( ) ) { return get dir length ( file ) ; } return get file length ( file ) ; }