test normal record storage within a leaf node chained - buffers will not be utilized

public void test get small long key record ( ) throws i o exception { insert one long key record ( false , true , 1 ) ; }


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

observable < set < pet > > find pets by tags ( @ retrofit 2 http query ( " tags " ) c s v params tags ) ;


return mock invoker contract ： directory list ( ) will return a list of normal invokers if constants invocation need mock is present in invocation , otherwise , a list of mock invokers will return if directory list ( ) returns more than one mock invoker , only one of them will be used

private list < invoker < t > > select mock invoker ( invocation invocation ) { list < invoker < t > > invokers = null ; / / todo generic invoker ？ if ( invocation instanceof rpc invocation ) { / / note the implicit contract ( although the description is added to the interface declaration , but extensibility is a problem the practice placed in the attachment needs to be improved ) ( ( rpc invocation ) invocation ) set attachment ( invocation need mock , boolean true to string ( ) ) ; / / directory will return a list of normal invokers if constants invocation need mock is present in invocation , otherwise , a list of mock invokers will return try { invokers = directory list ( invocation ) ; } catch ( rpc exception e ) { if ( logger is info enabled ( ) ) { logger info ( " exception when try to invoke mock get mock invokers error for service : " + get url ( ) get service interface ( ) + " , method : " + invocation get method name ( ) + " , will construct a new mock with ' new mock invoker ( ) ' " , e ) ; } } } return invokers ; }


public bi ad adapter switcher on enable refresh ( final int delay trigger ) { listview set default on refresh listener ( new swipe refresh layout on refresh listener ( ) { @ override public void on refresh ( ) { new handler ( ) post delayed ( refresh default , delay trigger ) ; } } ) ; return this ; }


set the < code > num containers < code > of the request

public resource request builder num containers ( int num containers ) { resource request set num containers ( num containers ) ; return this ; }


like get longest phase spawn runner name ( ) , but returns the runner details

public string get longest phase spawn runner subtype ( ) { return longest phase spawn runner subtype ; }


b context path ( string context path ) ;


rewrites invokestatic method calls static calls to non - public methods are rewritten according to the following pseudo code : before : < code > $ value = $ type protected static ( arg 1 , arg 2 ) ; < code > after : < code > $ value = ( unbox ) $ package android instant runtime invoke protected static method ( new object [ ] { arg 1 , arg 2 } , new class [ ] { string class , integer class } , " protected static " , $ type class ) ; < code >

private boolean handle static opcode ( string owner , string name , string desc , boolean itf ) { if ( debug ) { system out println ( " static method : " + name + " : " + desc + " : " + itf + " : " + is static ) ; } access right access right = get method access right ( owner , name , desc ) ; if ( access right = = access right public ) { return false ; } / / for anything else , private , protected and package private , we must go through / / reflection / / stack : < param 1 > / / < param 2 > / / / / < param n > push method redirect arguments on stack ( name , desc ) ; / / push the class implementing the original static method visit ldc insn ( type get type ( " l " + owner + " ; " ) ) ; / / stack : < boxed method parameter > / / < target parameter types > / / < target method name > / / < target class name > invoke static ( ali runtime type , method get method ( " object invoke protected static method ( object [ ] , class [ ] , string , class ) " ) ) ; / / stack : method return value or null if the method was void handle return type ( desc ) ; return true ; }


returns an unmodifiable set of encapsulated { @ link h a proxy t l v } s

public list < h a proxy t l v > encapsulated t l vs ( ) { return tlvs ; }


public void build ( ) { if ( sample status equals ( sample status sampled ) ) { source receiver receive ( error log ) ; } }


returns the { @ link sub cluster info } of all active sub cluster ( s )

public map < sub cluster id , sub cluster info > get sub clusters ( final boolean filter inactive sub clusters ) throws yarn exception { try { if ( is caching enabled ( ) ) { return ( map < sub cluster id , sub cluster info > ) cache get ( build get sub clusters cache request ( filter inactive sub clusters ) ) ; } else { return build sub cluster info map ( state store get sub clusters ( get sub clusters info request new instance ( filter inactive sub clusters ) ) ) ; } } catch ( throwable ex ) { throw new yarn exception ( ex ) ; } }


share connnect for registry , metadata , etc make sure the connection is connected

public zookeeper client connect ( url url ) { zookeeper client zookeeper client ; / / address format : { [ username : password @ ] address } list < string > address list = get u r l backup address ( url ) ; / / the field define the zookeeper server , including protocol , host , port , username , password if ( ( zookeeper client = fetch and update zookeeper client cache ( address list ) ) ! = null & & zookeeper client is connected ( ) ) { logger info ( " find valid zookeeper client from the cache for address : " + url ) ; return zookeeper client ; } / / avoid creating too many connections ， so add lock synchronized ( zookeeper client map ) { if ( ( zookeeper client = fetch and update zookeeper client cache ( address list ) ) ! = null & & zookeeper client is connected ( ) ) { logger info ( " find valid zookeeper client from the cache for address : " + url ) ; return zookeeper client ; } zookeeper client = create zookeeper client ( url ) ; logger info ( " no valid zookeeper client found from cache , therefore create a new client for url " + url ) ; write to client map ( address list , zookeeper client ) ; } return zookeeper client ; }


deletes index data for the specified cache this method may be slow and shouldn ' t normally be called on the main thread

public static void delete ( database provider database provider , long uid ) throws database i o exception { string hex uid = long to hex string ( uid ) ; try { string table name = get table name ( hex uid ) ; s q lite database writable database = database provider get writable database ( ) ; writable database begin transaction non exclusive ( ) ; try { version table remove version ( writable database , version table feature cache file metadata , hex uid ) ; drop table ( writable database , table name ) ; writable database set transaction successful ( ) ; } finally { writable database end transaction ( ) ; } } catch ( s q l exception e ) { throw new database i o exception ( e ) ; } }


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


this unit test should correctly return the { @ link abstract event } class type when calling the { @ link abstract event # get type ( ) get type } method

public void test get event type ( ) { var user = new user ( " iluwatar " ) ; var user created event = new user created event ( user ) ; assert equals ( user created event class , user created event get type ( ) ) ; }


public static < t extends vector < t > > t cubic derivative ( final t out , final float t , final t p 0 , final t p 1 , final t p 2 , final t p 3 , final t tmp ) { / / b3 ' ( t ) = 3 * ( 1 - t ) * ( 1 - t ) * ( p 1 - p 0 ) + 6 * ( 1 - t ) * t * ( p 2 - p 1 ) + 3 * t * t * ( p 3 - p 2 ) final float dt = 1f - t ; final float dt 2 = dt * dt ; final float t 2 = t * t ; return out set ( p 1 ) sub ( p 0 ) scl ( dt 2 * 3 ) add ( tmp set ( p 2 ) sub ( p 1 ) scl ( dt * t * 6 ) ) add ( tmp set ( p 3 ) sub ( p 2 ) scl ( t 2 * 3 ) ) ; }


checks whether a contact is currently registered with the server

public optional < contact token details > get contact ( string e 1 6 4number ) throws i o exception { string contact token = create directory server token ( e 1 6 4number , true ) ; contact token details contact token details = this push service socket get contact token details ( contact token ) ; if ( contact token details ! = null ) { contact token details set number ( e 1 6 4number ) ; } return optional from nullable ( contact token details ) ; }


public void set comment ( string comment ) throws zip exception { zip data set comment ( comment ) ; }


gets the jdk installation of the given name , or returns null

public jdk get j d k ( string name ) { if ( name = = null ) { / / if only one jdk is configured , " default jdk " should mean that jdk list < jdk > jdks = get j d ks ( ) ; if ( jdks size ( ) = = 1 ) return jdks get ( 0 ) ; return null ; } for ( jdk j : get j d ks ( ) ) { if ( j get name ( ) equals ( name ) ) return j ; } return null ; }


private fs permission get permissions ( ls entry sftp file ) { return new fs permission ( ( short ) sftp file get attrs ( ) get permissions ( ) ) ; }


load bean definitions from the given groovy scripts or xml files note that " xml " files will be parsed as xml content ; all other kinds of resources will be parsed as groovy scripts

public void load ( resource resources ) { this reader load bean definitions ( resources ) ; }


build aws credentials to talk to the sts also where checks for the session tests being disabled are implemented

public static a w s credentials provider build aws credentials provider ( final configuration conf ) throws i o exception { assume session tests enabled ( conf ) ; s 3x login helper login login = s 3 a utils get a w s access keys ( uri create ( " s 3a : / / foobar " ) , conf ) ; if ( ! login has login ( ) ) { skip ( " test s t s disabled because aws credentials not configured " ) ; } return new simple a w s credentials provider ( login ) ; }


for patterns of type { @ link type # single target } and { @ link type # targets in package } , returns the { @ link package identifier } corresponding to the package that would contain the target ( s ) matched by this { @ link target pattern }

public package identifier get directory for target or targets in package ( ) { throw new illegal state exception ( ) ; }


indicates whether the cached has unsaved changes


subscribe for notifications whenever the state of the data source changes all changes will be observed on the provided executor

void subscribe ( data subscriber < t > data subscriber , executor executor ) ;


route to resources using the provided lookup function if the lookup function provides a { @ link resource } for the given request , it will be it will be exposed using a { @ link handler function } that handles get , head , and options requests

public static router function < server response > resources ( function < server request , mono < resource > > lookup function ) { return new resources router function ( lookup function ) ; }


given a collection of string representation of hosts , return a list of corresponding ip addresses in the textual representation

public static list < string > normalize host names ( collection < string > names ) { list < string > host names = new array list < string > ( names size ( ) ) ; for ( string name : names ) { host names add ( normalize host name ( name ) ) ; } return host names ; }


public long get reserved space ( ) { return reserved space ; }


deletes the contents of { @ code dir } throws an i o exception if any file could not be deleted , or if { @ code dir } is not a readable directory

static void delete contents ( file dir ) throws i o exception { file [ ] files = dir list files ( ) ; if ( files = = null ) { throw new i o exception ( " not a readable directory : " + dir ) ; } for ( file file : files ) { if ( file is directory ( ) ) { delete contents ( file ) ; } if ( ! file delete ( ) ) { throw new i o exception ( " failed to delete file : " + file ) ; } } }


{ @ inherit doc } file licenses are strange , and require some special handling when you ask " what license covers this file ? " in a query , the answer should be the license declared for the enclosing package on the other hand , if the file is a source for a rule target , and the rule ' s license declares more exceptions than the default inherited by the file , the rule ' s more liberal target should override the stricter license of the file in other words , the license of the rule always overrides the license of the non - rule file targets that are inputs to that rule

public license get license ( ) { return get package ( ) get default license ( ) ; }


sets the results list to be the given single value < b > note : < b > if there is more than one result value , the others may be added by using { @ link # add result }

protected final void set result ( type bearer result ) { if ( result = = null ) { throw new null pointer exception ( " result = = null " ) ; } results [ 0 ] = result ; result count = 1 ; }


reports whether the value { @ code x } has a field or method of the given name , as if by the starlark expression { @ code hasattr ( x , name ) }

public static boolean hasattr ( starlark semantics semantics , object x , string name ) throws eval exception { return ( x instanceof structure & & ( ( structure ) x ) get value ( name ) ! = null ) | | call utils get annotated methods ( semantics , x get class ( ) ) contains key ( name ) ; }


public static void create table ( database db , boolean if not exists ) { string constraint = if not exists ? " if not exists " : " " ; db exec s q l ( " create table " + constraint + " \ " keep entity \ " ( " + / / " \ " id \ " integer primary key ) ; " ) ; / / 0 : id }


disable the connect tools if 1 or less than 1 tool is running

void enable connect tools ( ) { project project = plugin get active project ( ) ; if ( project = = null ) { connect tools action set enabled ( false ) ; return ; } / / only enable if project has more than 1 running tool tool manager tm = project get tool manager ( ) ; plugin tool [ ] running tools = tm get running tools ( ) ; connect tools action set enabled ( running tools length > 1 ) ; }


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

public immutable list multimap < build configuration , transitive info collection > get prerequisites by configuration ( string attribute name ) { 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 , transitive info collection > result = immutable list multimap builder ( ) ; for ( configured target and data prerequisite : ctat collection ) { result put ( prerequisite get configuration ( ) , prerequisite get configured target ( ) ) ; } return result build ( ) ; }


get the value of the ' { @ code name } ' attribute

protected string get name ( ) throws jsp exception { return this name ; }


creates a fixture and attach it to this body use this function if you need to set some fixture parameters , like friction otherwise you can create the fixture directly from a shape if the density is non - zero , this function automatically updates the mass of the body contacts are not created until the next time step

public final fixture create fixture ( fixture def def ) { assert ( m world is locked ( ) = = false ) ; if ( m world is locked ( ) = = true ) { return null ; } fixture fixture = new fixture ( ) ; fixture create ( this , def ) ; if ( ( m flags & e active flag ) = = e active flag ) { broad phase broad phase = m world m contact manager m broad phase ; fixture create proxies ( broad phase , m xf ) ; } fixture m next = m fixture list ; m fixture list = fixture ; + + m fixture count ; fixture m body = this ; / / adjust mass properties if needed if ( fixture m density > 0 0f ) { reset mass data ( ) ; } / / let the world know we have a new fixture this will cause new contacts / / to be created at the beginning of the next time step m world m flags | = world new fixture ; return fixture ; }


returns a new { @ link page } using the given vm template file path the template file path must be the resource path for the vm file in the jar since the velocity engine is configured to load vm files from jar resources

public static page new page ( string template ) { velocity engine engine = new velocity engine ( ) ; engine set property ( " resource loader " , " classpath , jar " ) ; engine set property ( " classpath resource loader class " , classpath resource loader class get name ( ) ) ; engine set property ( " jar resource loader class " , jar resource loader class get name ( ) ) ; engine set property ( " input encoding " , " utf - 8 " ) ; engine set property ( " output encoding " , " utf - 8 " ) ; engine set property ( " directive set null allowed " , true ) ; engine set property ( " parser pool size " , 3 ) ; engine set property ( " runtime references strict " , true ) ; return new page ( engine , template ) ; }


check to see if guid and age in xml file matches g u i d signature and age of binary

private void verify pdb signature ( ) throws i o exception , pdb exception { xml element xmlelem ; try { xmlelem = parser peek ( ) ; } catch ( exception e ) { if ( ! is x m l ) { if ( has errors ( ) ) { throw new pdb exception ( get error and warning messages ( ) ) ; } throw new pdb exception ( " pdb execution failure of " + pdb exe + " \ n " + " this was likely caused by severe execution failure which can occur if executed \ n " + " on an unsupported platform it may be necessary to rebuild the pdb executable \ n " + " for your platform ( see ghidra / features / pdb / src ) " ) ; } throw new pdb exception ( " pdb parsing problem : " + e get message ( ) ) ; } if ( ! " pdb " equals ( xmlelem get name ( ) ) ) { throw new pdb exception ( " unexpected pdb xml element : " + xmlelem get name ( ) ) ; } string xml guid = xmlelem get attribute ( " guid " ) ; string xml age = xmlelem get attribute ( " age " ) ; string warning = " " ; string pdb guid = program attributes get pdb guid ( ) ; if ( pdb guid = = null ) { string pdb signature = program attributes get pdb signature ( ) ; if ( pdb signature ! = null ) { pdb guid = reformat signature to guid form ( pdb signature ) ; } } string pdb age = program attributes get pdb age ( ) ; if ( ( xml guid = = null ) | | ( pdb guid = = null ) ) { if ( xml guid = = null ) { warning + = " no guid was listed in the xml file " ; } if ( pdb guid = = null ) { warning + = " could not find a pdb guid for the binary " ; } warning + = " could not complete verification of matching pdb signatures " ; } else { / / reformat pdb guid so that it matches the way g u i ds are stored in xml pdb guid = pdb guid to upper case ( ) ; pdb guid = " { " + pdb guid + " } " ; if ( ! xml guid equals ( pdb guid ) ) { warning = " pdb signature does not match \ n " + " program guid : " + pdb guid + " \ n x m l guid : " + xml guid ; } else { / / also check that pdb ages match , if they are both available if ( ( xml age ! = null ) & & ( pdb age ! = null ) ) { int pdb age decimal = integer parse int ( pdb age , 16 ) ; int xml age decimal = integer parse int ( xml age ) ; if ( xml age decimal ! = pdb age decimal ) { warning = " pdb ages do not match " ; } } } } if ( warning length ( ) > 0 ) { if ( system utilities is in headless mode ( ) ) { throw new pdb exception ( warning + " skipping pdb processing " ) ; } int option = option dialog show yes no dialog ( null , " continue loading pdb ? " , warning + " \ n " + " \ n continue anyway ? " + " \ n " + " \ n please note : invalid disassembly may be produced ! " ) ; if ( option ! = option dialog option one ) { throw new pdb exception ( warning ) ; } } }


public void set user limit factor ( float user limit factor ) { this user limit factor = user limit factor ; }


tests using s3 select on a file where the version visible in s3 does not initially match the version tracked in the metadata store , but eventually ( after retries ) does

public void test select eventually consistent file ( ) throws throwable { describe ( " eventually consistent s3 select " ) ; require s 3 guard ( ) ; require s 3 select ( ) ; amazon s 3 s 3 client spy = spy on filesystem ( ) ; final path testpath 1 = write eventually consistent file version ( " select 1 dat " , s 3 client spy , 0 , test max retries , 0 ) ; / / should succeed since the inconsistency doesn ' t last longer than the / / configured retry limit fs open file ( testpath 1 ) must ( select sql , " select * from s3object " ) build ( ) get ( ) close ( ) ; / / select ( ) makes a get file status ( ) call before the consistency checking / / that will match the stub as such , we need an extra inconsistency here / / to cross the threshold int get metadata inconsistency count = test max retries + 2 ; final path testpath 2 = write eventually consistent file version ( " select 2 dat " , s 3 client spy , 0 , get metadata inconsistency count , 0 ) ; if ( expected exception interactions contains ( interaction type eventually consistent select ) ) { / / should fail since the inconsistency lasts longer than the configured / / retry limit intercept future ( remote file changed exception class , " select " , fs open file ( testpath 2 ) must ( select sql , " select * from s3object " ) build ( ) ) ; } else { fs open file ( testpath 2 ) must ( select sql , " select * from s3object " ) build ( ) get ( ) close ( ) ; } }


a thread pool that that blocks clients submitting additional tasks if there are already { @ code active tasks } running threads and { @ code waiting tasks } tasks waiting in its queue

public static blocking thread pool executor service new instance ( int active tasks , int waiting tasks , long keep alive time , time unit unit , string prefix name ) { / * although we generally only expect up to waiting tasks tasks in the queue , we need to be able to buffer all tasks in case dequeueing is slower than enqueueing * / final blocking queue < runnable > work queue = new linked blocking queue < > ( waiting tasks + active tasks ) ; thread pool executor event processing executor = new thread pool executor ( active tasks , active tasks , keep alive time , unit , work queue , new daemon thread factory ( prefix name ) , new rejected execution handler ( ) { @ override public void rejected execution ( runnable r , thread pool executor executor ) { / / this is not expected to happen log error ( " could not submit task to executor { } " , executor to string ( ) ) ; } } ) ; event processing executor allow core thread time out ( true ) ; return new blocking thread pool executor service ( waiting tasks + active tasks , event processing executor ) ; }


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


returns the { @ link transformation } that represents the operation that logically creates this { @ link data stream }

public transformation < t > get transformation ( ) { return transformation ; }


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

public void test client model test ( test context context ) { async async = context async ( ) ; client body = null ; api test client model ( body , result - > { / / todo : test validations async complete ( ) ; } ) ; }


returns a new array based escaper map for creating array based char escaper or array based unicode escaper instances

public static array based escaper map create ( map < character , string > replacements ) { return new array based escaper map ( create replacement array ( replacements ) ) ; }


return the path of storageemulated 0 pictures

public static string get external pictures path ( ) { if ( ! utils bridge is s d card enable by environment ( ) ) return " " ; return get absolute path ( environment get external storage public directory ( environment directory pictures ) ) ; }


refreshes cache entry by creating { @ link pending cache entry } when the { @ code pending cache entry } received data from rls server , it will replace the data entry if valid data still exists flow looks like following timeline | async refresh v put new cache ( entry 2 ) entry 1 : pending | has value | staled | entry 2 : | ov | pending | has value | staled | ov : old value

void maybe refresh ( ) { synchronized ( lock ) { if ( pending call cache contains key ( request ) ) { / / pending already requested return ; } final listenable future < route lookup response > async call = async rls call ( request ) ; if ( ! async call is done ( ) ) { pending call cache put ( request , new pending cache entry ( request , async call ) ) ; } else { / / async call returned finished future is most likely throttled try { route lookup response response = async call get ( ) ; linked hash lru cache cache ( request , new data cache entry ( request , response ) ) ; } catch ( interrupted exception e ) { thread current thread ( ) interrupt ( ) ; } catch ( exception e ) { backoff cache entry backoff entry = new backoff cache entry ( request , status from throwable ( e ) , backoff provider get ( ) ) ; linked hash lru cache cache ( request , backoff entry ) ; } } } }


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


public static smtp request rcpt ( char sequence recipient , char sequence rcpt parameters ) { object util check not null ( recipient , " recipient " ) ; if ( rcpt parameters = = null | | rcpt parameters length = = 0 ) { return new default smtp request ( smtp command rcpt , " to : < " + recipient + ' > ' ) ; } else { list < char sequence > params = new array list < char sequence > ( rcpt parameters length + 1 ) ; params add ( " to : < " + recipient + ' > ' ) ; collections add all ( params , rcpt parameters ) ; return new default smtp request ( smtp command rcpt , params ) ; } }


returns the list of fields allowed by this provider , or null if the provider is schemaless

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


defines whether the producer should fail on errors , or only log them if this is set to true , then exceptions will be only logged , if set to false , exceptions will be eventually thrown and cause the streaming program to fail ( and enter recovery )

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


writes a boolean as a typed bytes sequence

public void write bool ( boolean b ) throws i o exception { out write ( type bool code ) ; out write boolean ( b ) ; }


return true if this xml item object is equal to o

public boolean equals ( object o ) { if ( this = = o ) { return true ; } if ( o = = null | | get class ( ) ! = o get class ( ) ) { return false ; } xml item xml item = ( xml item ) o ; return objects equals ( this attribute string , xml item attribute string ) & & objects equals ( this attribute number , xml item attribute number ) & & objects equals ( this attribute integer , xml item attribute integer ) & & objects equals ( this attribute boolean , xml item attribute boolean ) & & objects equals ( this wrapped array , xml item wrapped array ) & & objects equals ( this name string , xml item name string ) & & objects equals ( this name number , xml item name number ) & & objects equals ( this name integer , xml item name integer ) & & objects equals ( this name boolean , xml item name boolean ) & & objects equals ( this name array , xml item name array ) & & objects equals ( this name wrapped array , xml item name wrapped array ) & & objects equals ( this prefix string , xml item prefix string ) & & objects equals ( this prefix number , xml item prefix number ) & & objects equals ( this prefix integer , xml item prefix integer ) & & objects equals ( this prefix boolean , xml item prefix boolean ) & & objects equals ( this prefix array , xml item prefix array ) & & objects equals ( this prefix wrapped array , xml item prefix wrapped array ) & & objects equals ( this namespace string , xml item namespace string ) & & objects equals ( this namespace number , xml item namespace number ) & & objects equals ( this namespace integer , xml item namespace integer ) & & objects equals ( this namespace boolean , xml item namespace boolean ) & & objects equals ( this namespace array , xml item namespace array ) & & objects equals ( this namespace wrapped array , xml item namespace wrapped array ) & & objects equals ( this prefix ns string , xml item prefix ns string ) & & objects equals ( this prefix ns number , xml item prefix ns number ) & & objects equals ( this prefix ns integer , xml item prefix ns integer ) & & objects equals ( this prefix ns boolean , xml item prefix ns boolean ) & & objects equals ( this prefix ns array , xml item prefix ns array ) & & objects equals ( this prefix ns wrapped array , xml item prefix ns wrapped array ) ; }


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


resume the container from pause state the default implementation ignores this event specific implementations can override this behavior

public void resume container ( container container ) { log warn ( " { } doesn ' t support resume " , container get container id ( ) ) ; throw new unsupported operation exception ( ) ; }


checks that the current page is actually the page this page object represents


if instantiated from a file , this method must be invoked prior to the factory handing out this instance this will complete the parsing of the old language file and the initialization of this instance

void validate ( ) throws j d o m exception , s a x exception , i o exception { if ( old lang file ! = null & & address factory = = null | | register mgr = = null ) { read old language ( false ) ; } }


configure simple automated controllers pre - configured with the response status code andor a view to render the response body this is useful in cases where there is no need for custom controller logic - - e g render a home page , perform simple site url redirects , return a 404 status with html content , a 204 with no content , and more

default void add view controllers ( view controller registry registry ) { }


see { @ link stream tracer # inbound message read } called from { @ link io grpc internal message deframer }

public void inbound message read ( int seq no , long optional wire size , long optional uncompressed size ) { for ( stream tracer tracer : tracers ) { tracer inbound message read ( seq no , optional wire size , optional uncompressed size ) ; } }


return true if the path was successfully deleted false if it failed with access control exception any other exceptions are propagated to the caller

private boolean delete path ( file system fs , path path ) throws i o exception { try { fs delete ( path , true ) ; return true ; } catch ( access control exception ace ) { return false ; } }


tests that a one - byte file is displayed correctly

public void test two byte text fil ( ) throws exception { byte [ ] two byte contents = { ' x ' , ' y ' } ; string output = read using text command ( text filename , two byte contents ) ; assert true ( new string ( two byte contents ) equals ( output ) ) ; }


given an array of frame durations , generate an array of timestamps corresponding to when each frame beings

public int [ ] get frame time stamps from durations ( int [ ] frame durations ms ) { int [ ] frame timestamps ms = new int [ frame durations ms length ] ; int accumulated duration ms = 0 ; for ( int i = 0 ; i < frame durations ms length ; i + + ) { frame timestamps ms [ i ] = accumulated duration ms ; accumulated duration ms + = frame durations ms [ i ] ; } return frame timestamps ms ; }


set the value of the { @ code retry } field

builder < t > retry ( duration retry ) ;


public static string to hex ( byte [ ] ba ) { byte array output stream baos = new byte array output stream ( ) ; string str hex = " " ; try { print stream ps = new print stream ( baos , false , " utf - 8 " ) ; for ( byte b : ba ) { ps printf ( " % x " , b ) ; } str hex = baos to string ( " utf - 8 " ) ; } catch ( unsupported encoding exception e ) { } return str hex ; }


implementations of { @ link # compute next } < b > must < b > invoke this method when there are no elements left in the iteration

protected final t end of data ( ) { state = state done ; return null ; }


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


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


determine if this exception handler is complus

public boolean is complus ( ) { return is bit set ( complus bit ) ; }


creates list of users with given input array

public void create users with array input test ( ) throws exception { list < user > body = cache get objects ( " / create users with array input / body " , user class ) ; api create users with array input ( body ) ; }


returns the { @ link files to run provider } of the header compiler deploy jar for direct - classpath , non - annotation processing actions

public java toolchain tool get header compiler direct ( ) { return header compiler direct ; }


submit the job to the cluster and wait for it to finish

public boolean wait for completion ( boolean verbose ) throws i o exception , interrupted exception , class not found exception { if ( state = = job state define ) { submit ( ) ; } if ( verbose ) { monitor and print job ( ) ; } else { / / get the completion poll interval from the client int completion poll interval millis = job get completion poll interval ( cluster get conf ( ) ) ; while ( ! is complete ( ) ) { try { thread sleep ( completion poll interval millis ) ; } catch ( interrupted exception ie ) { } } } return is successful ( ) ; }


public void acquire lock failed ( branch session branch session 1 , branch session branch session 2 ) throws exception { lock manager lock manager = new file lock manager for test ( ) ; assertions assert true ( lock manager acquire lock ( branch session 1 ) ) ; assertions assert false ( lock manager acquire lock ( branch session 2 ) ) ; }


returns a module which creates bindings for provider methods from the given module

public static module for module ( module module ) { return for object ( module ) ; }


parse case - insensitive kind string and return corresponding pdb kind it is expected that kind strings will be camel notation ( e g , object pointer kind string would be object pointer ) if not identified unknown will be returned

public static pdb kind parse ( string kind ) { for ( pdb kind pdb kind : values ( ) ) { if ( pdb kind camel name equals ignore case ( kind ) ) { return pdb kind ; } } return unknown ; }


model tests for additional properties array

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


get the raw list of dependencies this method is exposed for testing purposes and { @ link # get settings dependencies ( string ) } should be preferred for most all cases

public set < affix setting dependency > get dependencies ( ) { return collections unmodifiable set ( dependencies ) ; }


add an attachment to the mime message , taking the content from a { @ code javax activation data source } note that the input stream returned by the data source implementation needs to be a fresh one on each call , as java mail will invoke { @ code get input stream ( ) } multiple times

public void add attachment ( string attachment filename , data source data source ) throws messaging exception { assert not null ( attachment filename , " attachment filename must not be null " ) ; assert not null ( data source , " data source must not be null " ) ; try { mime body part mime body part = new mime body part ( ) ; mime body part set disposition ( mime body part attachment ) ; mime body part set file name ( is encode filenames ( ) ? mime utility encode text ( attachment filename ) : attachment filename ) ; mime body part set data handler ( new data handler ( data source ) ) ; get root mime multipart ( ) add body part ( mime body part ) ; } catch ( unsupported encoding exception ex ) { throw new messaging exception ( " failed to encode attachment filename " , ex ) ; } }


specifies whether query parsing should be lenient defaults to false

public simple query string builder lenient ( boolean lenient ) { this settings lenient ( lenient ) ; this lenient set = true ; return this ; }


return an { @ code assertion error } that a sub - class can raise for an unexpected request

protected assertion error create unexpected request error ( client http request request ) { http method method = request get method ( ) ; uri uri = request get u r i ( ) ; string message = " no further requests expected : http " + method + " " + uri + " \ n " ; return new assertion error ( message + get request details ( ) ) ; }


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


gets the maximum sequentially allocated contiguous block id for this filesystem

public long get last allocated contiguous block id ( ) { return block id generator get current value ( ) ; }


filter on method arguments with annotations see { @ link org springframework web method mvc annotation predicates }

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


return the request from the underlying http library


returns whether the rpc endpoint is started and not stopped or being stopped

protected boolean is running ( ) { validate runs in main thread ( ) ; return is running ; }


patch another - fakedummy : to test special tags to test special tags and operation id starting with number

default response entity < client > call 1 2 3test special tags ( @ api param ( value = " client model " , required = true ) @ valid @ request body client body ) { get request ( ) if present ( request - > { for ( media type media type : media type parse media types ( request get header ( " accept " ) ) ) { if ( media type is compatible with ( media type value of ( " application / json " ) ) ) { string example string = " { \ " client \ " : \ " client \ " } " ; api util set example response ( request , " application / json " , example string ) ; break ; } } } ) ; return new response entity < > ( http status not implemented ) ; }


get fakejson form data : test json serialization of form data

default response entity < void > test json form data ( @ api param ( value = " field 1 " , required = true ) @ valid @ request part ( value = " param " , required = true ) string param , @ api param ( value = " field 2 " , required = true ) @ valid @ request part ( value = " param 2 " , required = true ) string param 2 ) { return new response entity < > ( http status not implemented ) ; }


public iterable < group entry > get imports ( ) { for ( deferred import selector holder deferred import : this deferred imports ) { this group process ( deferred import get configuration class ( ) get metadata ( ) , deferred import get import selector ( ) ) ; } return this group select imports ( ) ; }


public static string encode map ( map < string , string > map ) { if ( map = = null ) { return null ; } if ( map is empty ( ) ) { return string utils empty ; } string builder sb = new string builder ( ) ; for ( map entry < string , string > entry : map entry set ( ) ) { sb append ( entry get key ( ) ) append ( kv split ) append ( entry get value ( ) ) append ( pair split ) ; } return sb substring ( 0 , sb length ( ) - 1 ) ; }


reads the next byte of data from this input stream the value byte is returned as an { @ code int } in the range { @ code 0 } to { @ code 255 } if no byte is available because the end of the stream has been reached , the value { @ code - 1 } is returned the end of the stream is reached if the end of the underlying stream is reached , and reset has not been called or there are no more bytes to replay following a reset this method blocks until input data is available , the end of the stream is detected , or an exception is thrown

public int read ( ) throws i o exception { ensure open ( ) ; byte [ ] arr = new byte [ 1 ] ; int read result = read ( arr , 0 , arr length ) ; if ( read result = = - 1 ) { return - 1 ; } return arr [ 0 ] ; }


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


finds the next previous position of a given byte sequence in a given byte buffer , starting from the buffer ' s current position ( excluded )

static int scan backwards to ( byte [ ] target , byte buffer buffer ) { preconditions check not null ( target ) ; preconditions check not null ( buffer ) ; if ( target length = = 0 ) { return buffer position ( ) - 1 ; } int pos = buffer position ( ) - target length ; if ( pos < 0 ) { return - 1 ; } scan : while ( true ) { while ( pos > = 0 & & buffer get ( pos ) ! = target [ 0 ] ) { pos - - ; } if ( pos < 0 ) { return - 1 ; } for ( int i = 1 ; i < target length ; i + + ) { if ( buffer get ( pos + i ) ! = target [ i ] ) { pos - - ; continue scan ; } } return pos ; } }


we use this instead of check success in airlift so we can propagate the error message and so that we throw a presto exception rather than an illegal argument exception

public static void check spill succeeded ( future spill in progress ) { try { get future value ( spill in progress ) ; } catch ( presto exception presto exception ) { throw new presto exception ( presto exception : : get error code , presto exception get message ( ) , presto exception ) ; } catch ( runtime exception runtime exception ) { throw new presto exception ( generic internal error , format ( " spilling failed : % s " , runtime exception get message ( ) ) , runtime exception ) ; } }


a notification that the bean definition for the specified name has been reset , and that this post - processor should clear any metadata for the affected bean the default implementation is empty

default void reset bean definition ( string bean name ) { }


declare executor service : if null , the tasks are executed in a single thread

public builder < i > execute with ( submitter submitter ) { this service = submitter ; return this ; }


applies the given visitor to all class annotations

public void annotations accept ( clazz clazz , annotation visitor annotation visitor ) { for ( int index = 0 ; index < u 2annotations count ; index + + ) { / / we don ' t need double dispatching here , since there is only one / / type of annotation annotation visitor visit annotation ( clazz , annotations [ index ] ) ; } }


public long get end pointer ( ) { return end pointer ; }


public void stop ( ) { context unregister receiver ( check not null ( receiver ) ) ; receiver = null ; if ( util sdk int > = 24 & & network callback ! = null ) { unregister network callback v 2 4 ( ) ; } }


given the id of a categorizer state document it extracts the job id

public static final string extract job id ( string doc id ) { int suffix index = doc id last index of ( " " + type ) ; return suffix index < = 0 ? null : doc id substring ( 0 , suffix index ) ; }


returns the { @ code double } value of a header with the specified name if there is more than one value for the specified name , the first value in insertion order is returned

double get double ( k name , double default value ) ;


set the min , max number of worker threads ( simultaneous connections )

public void set threads ( int min , int max ) { queued thread pool pool = ( queued thread pool ) web server get thread pool ( ) ; pool set min threads ( min ) ; pool set max threads ( max ) ; }


converts this descriptor into a set of connector properties usually prefixed with { @ link connector descriptor validator # connector }

protected abstract map < string , string > to connector properties ( ) ;


public int get characteristics ( ) { return characteristics ; }


set the container id - to - exception map in which the exception indicates error from per container for failed request

public abstract void set failed requests ( map < container id , serialized exception > failed containers ) ;


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


a float between 0 0 and 1 0 , indicating the % of setup work completed

public float setup progress ( ) throws i o exception { return job setup progress ( ) ; }


sets the listener for key status change events this is an optional method , and some implementations may only support it on certain android api levels

void set on key status change listener ( @ nullable on key status change listener listener ) ;


generate error view stuffing the code and description of the error into the model view name is set to { @ link # failure view }

private model and view generate error view ( final string code , final object [ ] args , final http servlet request request ) { val model and view = new model and view ( this failure view ) ; model and view add object ( " code " , string escape utils escape html 4 ( code ) ) ; val desc = string escape utils escape html 4 ( this context get message ( code , args , code , request get locale ( ) ) ) ; model and view add object ( " description " , desc ) ; return model and view ; }


provide old file rootdirtoold dex , new file rootdirtonew dex , return dirtoold dex or dirtonew dex if any one is not null

protected string get relative dex name ( file old dex file , file new dex file ) { return old dex file ! = null ? get relative path string to old file ( old dex file ) : get relative path string to new file ( new dex file ) ; }


public void set symbol data 1 ( long value ) { lock acquire ( ) ; try { check deleted ( ) ; if ( record ! = null ) { record set long value ( symbol database adapter symbol data1 col , value ) ; update record ( ) ; symbol mgr symbol data changed ( this ) ; } } finally { lock release ( ) ; } }


source line and column info < code > optional aapt pb source position source = 4 ; < code >

public builder set source ( com android aapt resources source position builder builder for value ) { copy on write ( ) ; instance set source ( builder for value ) ; return this ; }


allows the update of the specified variable before each following test

scenario update ( string name , object value ) { setup register update ( name , value ) ; return this ; }


adds an an input that will be return from { @ link # read secret ( string ) } values are read in fifo order

public void add secret input ( string input ) { secret input add ( input ) ; }


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


when the incremental mesh config request is the first in a stream , the initial resource versions must be populated otherwise , initial resource versions must be omitted the keys are the resources names of the mcp resources known to the mcp client the values in the map are the associated resource level version info < code > map & lt ; string , string & gt ; initial resource versions = 3 ; < code >

public builder remove initial resource versions ( java lang string key ) { if ( key = = null ) { throw new java lang null pointer exception ( ) ; } internal get mutable initial resource versions ( ) get mutable map ( ) remove ( key ) ; return this ; }


returns estimate of capacity lost this is said to be an estimate , because in some cases it ' s impossible to know the capacity of the volume , such as if we never had a chance to query its capacity before the failure occurred

public long get estimated capacity lost total ( ) { return this estimated capacity lost total ; }


map an extension to a media type ignore if extension already mapped

protected void add mapping ( string extension , media type media type ) { media type previous = this media types put if absent ( extension , media type ) ; if ( previous = = null ) { add file extension ( media type , extension ) ; this all file extensions add ( extension ) ; } }


create the panel for the buttons ; the button are aligned vertically ; the side margins on the panel has a default value of 20

public static j panel create button panel ( j button [ ] buttons ) { return create button panel ( buttons , side margin , y axis ) ; }


computes the list of other form fields that the given field depends on , via the do fill xyz items method , and sets that as the ' fill depends on ' attribute also computes the url of the do fill xyz items and sets that as the ' fill url ' attribute

public void calc fill settings ( string field , map < string , object > attributes ) { string capitalized field name = string utils capitalize ( field ) ; string method name = " do fill " + capitalized field name + " items " ; method method = reflection utils get public method named ( get class ( ) , method name ) ; if ( method = = null ) throw new illegal state exception ( string format ( " % s doesn ' t have the % s method for filling a drop - down list " , get class ( ) , method name ) ) ; / / build query parameter line by figuring out what should be submitted list < string > depends = build fill dependencies ( method , new array list < > ( ) ) ; if ( ! depends is empty ( ) ) attributes put ( " fill depends on " , util join ( depends , " " ) ) ; attributes put ( " fill url " , string format ( " % s / % s / fill % s items " , get current descriptor by name url ( ) , get descriptor url ( ) , capitalized field name ) ) ; }


accepts a { @ link value and closer } for the last step in a { @ link closing future } pipeline

void accept ( value and closer < v > value and closer ) ;


return the underlying conditions ( possibly empty but never { @ code null } )

public list < request condition < ? > > get conditions ( ) { return unwrap ( ) ; }


see { @ link kafka producer # close ( duration ) }


public void remove ( ) { check state ( key ! = long min value ) ; prev next = next ; next prev = prev ; prev = next = null ; }


sets { @ code num hash functions } bits of the given bit array , by hashing a user element returns whether any bits changed as a result of this operation

< t > boolean put ( t object , funnel < ? super t > funnel , int num hash functions , lock free bit array bits ) ;


return a string that is used as the scope for metrics recorded by metered stores


a storage request failed and was dropped due to a limit , resource unavailability , or a timeout implementations of throttling can use this signal to differentiate between failures , for example to reduce traffic callers of this method will submit an exception raised by { @ link call # execute ( ) } or on the error callback of { @ link call # enqueue ( callback ) } by default , this returns true if the input is a { @ link rejected execution exception } when originating exceptions , use this type to indicate a load related failure it is generally preferred to specialize this method to handle relevant exceptions for the particular storage rather than wrapping them in { @ link rejected execution exception } at call sites extra wrapping can make errors harder to read , for example , by making it harder to " google " a solution for a well known error message for the storage client , instead thinking the error is in zipkin code itself < h 3 > see also < h 3 > while implementation is flexible , one known use is < a href = " https : github com netflixconcurrency - limits " > netflix concurrency limits

public boolean is over capacity ( throwable e ) { return e instanceof rejected execution exception ; }


select process instances whose process definition name is process definition name

process instance query process definition name ( string process definition name ) ;


< code > optional int 3 2 age = 3 ; < code >


obtain a jpa entity manager from the given factory is aware of a corresponding entity manager bound to the current thread , e g when using jpa transaction manager note : will return { @ code null } if no thread - bound entity manager found !

public static entity manager get transactional entity manager ( entity manager factory emf , @ nullable map < ? , ? > properties ) throws data access resource failure exception { try { return do get transactional entity manager ( emf , properties , true ) ; } catch ( persistence exception ex ) { throw new data access resource failure exception ( " could not obtain jpa entity manager " , ex ) ; } }


set the context register names and values for a function

public void set context registers ( list < context register info > context registers ) { this context registers = context registers ; }


public void test to string ( ) { global rollback request global rollback request = new global rollback request ( ) ; global rollback request set xid ( " 127 0 0 1 : 8091 : 1249853 " ) ; global rollback request set extra data ( " test extra data " ) ; assertions assert equals ( " xid = 127 0 0 1 : 8091 : 1249853 , extra data = test extra data " , global rollback request to string ( ) ) ; }


gets the right side function ' s entry point address

private address get right function address ( ) { if ( functions [ right ] ! = null ) { return functions [ right ] get entry point ( ) ; } return null ; }


returns an executor that prioritizes newer work this is the opposite of a traditional executor , which processor work in fifo order

public static executor service new fixed lifo thread executor ( string name , int min threads , int max threads ) { return new thread pool executor ( min threads , max threads , 0 , time unit milliseconds , new linked blocking lifo queue < > ( ) , new numbered thread factory ( name ) ) ; }


write 8 byte fixed length integer to byte buffers

public void write int 8 ( final long value ) { byte buf write long ( value ) ; }


creates a { @ link future combiner } that processes the completed futures whether or not they ' re successful any failures from the input futures will not be propagated to the returned future

public static < v > future combiner < v > when all complete ( listenable future < ? extends v > futures ) { return new future combiner < v > ( false , immutable list copy of ( futures ) ) ; }


tests purge where the data directory contains old snapshots and data logs , newest snapshots and data logs , ( newest + n ) snapshots and data logs

public void test snap files greater than to retain ( ) throws exception { int n recent count = 4 ; int file above recent count = 4 ; int file to purge count = 2 ; atomic integer offset = new atomic integer ( 0 ) ; file version 2 = new file ( tmp dir to string ( ) , " version - 2 " ) ; assert true ( version 2 mkdir ( ) , " failed to create version 2 dir : " + version 2 to string ( ) ) ; list < file > snaps to purge = new array list < file > ( ) ; list < file > logs to purge = new array list < file > ( ) ; list < file > snaps = new array list < file > ( ) ; list < file > logs = new array list < file > ( ) ; list < file > snaps above recent files = new array list < file > ( ) ; list < file > logs above recent files = new array list < file > ( ) ; create data dir files ( offset , file to purge count , false , version 2 , snaps to purge , logs to purge ) ; create data dir files ( offset , n recent count , false , version 2 , snaps , logs ) ; logs add ( logs to purge remove ( 0 ) ) ; / / log that precedes first retained snapshot is also retained create data dir files ( offset , file above recent count , false , version 2 , snaps above recent files , logs above recent files ) ;


subtype to provide { @ link run # get number ( ) } so that this class doesn ' t have to depend on it

protected abstract int get number of ( r r ) ;


the resource name in the deployment of the diagram image ( if any )


public synchronized int find number ( @ non null string id ) { integer number = id to number get ( id ) ; return number ! = null ? number : 0 ; }


this method replicates the json response that would be given by the jobs overview handler when listing both running and finished jobs every job archive contains a joboverview json file containing the same structure since jobs are archived on their own however the list of finished jobs only contains a single job for the display in the history server web frontend we have to combine these overviews

private static void update job overview ( file web overview dir , file web dir ) { try ( json generator gen = jackson factory create generator ( history server create or get file ( web dir , jobs overview headers url ) ) ) { file [ ] overviews = new file ( web overview dir get path ( ) ) list files ( ) ; if ( overviews ! = null ) { collection < job details > all jobs = new array list < > ( overviews length ) ; for ( file overview : overviews ) { multiple jobs details sub jobs = mapper read value ( overview , multiple jobs details class ) ; all jobs add all ( sub jobs get jobs ( ) ) ; } mapper write value ( gen , new multiple jobs details ( all jobs ) ) ; } } catch ( i o exception ioe ) { log error ( " failed to update job overview " , ioe ) ; } }


builds how long it took to execute the msearch

private long build took in millis ( ) { return time unit nanoseconds to millis ( relative time provider get as long ( ) - relative start time ) ; }


public static string parent of ( string path ) throws path not found exception { list < string > elements = split ( path ) ; int size = elements size ( ) ; if ( size = = 0 ) { throw new path not found exception ( " no parent of " + path ) ; } if ( size = = 1 ) { return " / " ; } elements remove ( size - 1 ) ; string builder parent = new string builder ( path length ( ) ) ; for ( string element : elements ) { parent append ( " / " ) ; parent append ( element ) ; } return parent to string ( ) ; }


public static omf file header parse ( binary reader reader , task monitor monitor ) throws i o exception , omf exception { omf record record = omf record read record ( reader ) ; if ( ( record get record type ( ) & ( byte ) 0xfc ) ! = omf record theadr ) { throw new omf exception ( " object file does not start with proper header " ) ; } omf file header header = ( omf file header ) record ; object last data block = null ; while ( ( record get record type ( ) & ( byte ) 0xfe ) ! = omf record modend ) { if ( monitor is cancelled ( ) ) { break ; / / return what we have } record = omf record read record ( reader ) ; byte type = record get record type ( ) ; type & = 0xfe ; / / mask off the least significant bit switch ( type ) { case coment : byte comment class = ( ( omf comment record ) record ) get comment class ( ) ; if ( comment class = = ( byte ) 0 ) { header translator = ( ( omf comment record ) record ) get value ( ) ; } else if ( comment class = = ( byte ) 0x a 3 ) { header lib module name = ( ( omf comment record ) record ) get value ( ) ; } break ; case modend : / / header end module = ( omf module end ) record ; / / we are not currently examining the end module record break ; case comdef : case lcomdef : header evaluate comdef ( ( omf comdef record ) record ) ; header externsymbols add ( ( omf external symbol ) record ) ; break ; case lextdef : case extdef : header externsymbols add ( ( omf external symbol ) record ) ; break ; case pubdef : header symbols add ( ( omf symbol record ) record ) ; break ; case linnum : break ; / / not saving this information currently case lnames : ( ( omf names record ) record ) append names ( header name list ) ; / / keep names , otherwise don ' t save record break ; case segdef : header segments add ( ( omf segment header ) record ) ; break ; case grpdef : header groups add ( ( omf group record ) record ) ; break ; case fixupp : omf fixup record fixuprec = ( omf fixup record ) record ; fixuprec set data block ( last data block ) ; header fixup add ( fixuprec ) ; break ; case ledata : omf enumerated data enumheader = ( omf enumerated data ) record ; header add enumerated block ( enumheader ) ; last data block = enumheader ; break ; case lidata : omf iterated data iterheader = ( omf iterated data ) record ; if ( iterheader get segment index ( ) < = 0 | | iterheader get segment index ( ) > header segments size ( ) ) { throw new omf exception ( " bad segment index on lidata " ) ; } omf segment header segheader 2 = header segments get ( iterheader get segment index ( ) - 1 ) ; segheader 2 add iterated data ( iterheader ) ; last data block = iterheader ; break ; default : / / should never reach here } } return header ; }


removes the influencer of the given type

public < k extends influencer > void remove influencer ( class < k > type ) { int index = find index ( type ) ; if ( index > - 1 ) influencers remove index ( index ) ; }


@ serial data the expected values per key , the number of distinct keys , the number of entries , and the entries in order

private void write object ( object output stream stream ) throws i o exception { stream default write object ( ) ; stream write int ( key set ( ) size ( ) ) ; for ( k key : key set ( ) ) { stream write object ( key ) ; } stream write int ( size ( ) ) ; for ( entry < k , v > entry : entries ( ) ) { stream write object ( entry get key ( ) ) ; stream write object ( entry get value ( ) ) ; } }


returns the logical or of this integer value and the given specific integer value

public integer value or ( specific integer value other ) { return or ( ( integer value ) other ) ; }


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


wait for < code > check < code > to return true for each < code > check every millis < code > ms see also { @ link # wait for ( java util function supplier , int , int ) }

public void wait for ( supplier < boolean > check , int check every millis ) throws interrupted exception { wait for ( check , check every millis , 1 ) ; }


adds the given toolchains as requirements for this aspect

public builder add required toolchains ( list < label > required toolchains ) { this required toolchains add all ( required toolchains ) ; return this ; }


sets the value of " exclude interim " when { @ code true } , interim influencers will be filtered out

public void set exclude interim ( boolean exclude interim ) { this exclude interim = exclude interim ; }


attempt to markup any or all addresses contained within the representation list

private boolean perform address markup ( instruction instr , int op index , function func , reference primary ref , list < object > representation list ) { if ( primary ref = = null | | ! primary ref is memory reference ( ) ) { return false ; } address ref addr = primary ref get to address ( ) ; int size = representation list size ( ) ; for ( int i = 0 ; i < size ; i + + ) { object obj = representation list get ( i ) ; if ( ! ( obj instanceof address ) ) { continue ; } address addr = ( address ) obj ; if ( ref addr get physical address ( ) equals ( addr get physical address ( ) ) ) { representation list set ( i , get memory reference label ( instr , primary ref ) ) ; return true ; } } return false ; }


public int get width ( ) { return width ; }


decides whether this proto library should check for strict proto deps only takes into account the command - line flag - - strict proto deps

public static boolean are deps strict ( rule context rule context ) { strict deps mode get bool = rule context get fragment ( proto configuration class ) strict proto deps ( ) ; return get bool ! = strict deps mode off & & get bool ! = strict deps mode default ; }


instruments the given { @ link ehcache } instance with get and put timers and a set of gauges for ehcache ' s built - in statistics : < table > < caption > ehcache timered metrics < caption > < tr > < td > { @ code hits } < td > < td > the number of times a requested item was found in the cache < td > < tr > < tr > < td > { @ code in - memory - hits } < td > < td > number of times a requested item was found in the memory store < td > < tr > < tr > < td > { @ code off - heap - hits } < td > < td > number of times a requested item was found in the off - heap store < td > < tr > < tr > < td > { @ code on - disk - hits } < td > < td > number of times a requested item was found in the disk store < td > < tr > < tr > < td > { @ code misses } < td > < td > number of times a requested item was not found in the cache < td > < tr > < tr > < td > { @ code in - memory - misses } < td > < td > number of times a requested item was not found in the memory store < td > < tr > < tr > < td > { @ code off - heap - misses } < td > < td > number of times a requested item was not found in the off - heap store < td > < tr > < tr > < td > { @ code on - disk - misses } < td > < td > number of times a requested item was not found in the disk store < td > < tr > < tr > < td > { @ code objects } < td > < td > number of elements stored in the cache < td > < tr > < tr > < td > { @ code in - memory - objects } < td > < td > number of objects in the memory store < td > < tr > < tr > < td > { @ code off - heap - objects } < td > < td > number of objects in the off - heap store < td > < tr > < tr > < td > { @ code on - disk - objects } < td > < td > number of objects in the disk store < td > < tr > < tr > < td > { @ code mean - get - time } < td > < td > the average get time because ehcache support jdk1 4 2 , each get time uses { @ link system # current time millis ( ) } , rather than nanoseconds the accuracy is thus limited < td > < tr > < tr > < td > { @ code mean - search - time } < td > < td > the average execution time ( in milliseconds ) within the last sample period < td > < tr > < tr > < td > { @ code eviction - count } < td > < td > the number of cache evictions , since the cache was created , or statistics were cleared < td > < tr > < tr > < td > { @ code searches - per - second } < td > < td > the number of search executions that have completed in the last second < td > < tr > < tr > < td > { @ code accuracy } < td > < td > a human readable description of the accuracy setting one of " none " , " best effort " or " guaranteed " < td > < tr > < table > < b > n b : this enables ehcache ' s sampling statistics with an accuracy level of " none " < b >

public static ehcache instrument ( metric registry registry , final ehcache cache ) { final string prefix = name ( cache get class ( ) , cache get name ( ) ) ; registry register ( name ( prefix , " hits " ) , ( gauge < long > ) ( ) - > cache get statistics ( ) cache hit count ( ) ) ; registry register ( name ( prefix , " in - memory - hits " ) , ( gauge < long > ) ( ) - > cache get statistics ( ) local heap hit count ( ) ) ; registry register ( name ( prefix , " off - heap - hits " ) , ( gauge < long > ) ( ) - > cache get statistics ( ) local off heap hit count ( ) ) ; registry register ( name ( prefix , " on - disk - hits " ) , ( gauge < long > ) ( ) - > cache get statistics ( ) local disk hit count ( ) ) ; registry register ( name ( prefix , " misses " ) , ( gauge < long > ) ( ) - > cache get statistics ( ) cache miss count ( ) ) ; registry register ( name ( prefix , " in - memory - misses " ) , ( gauge < long > ) ( ) - > cache get statistics ( ) local heap miss count ( ) ) ; registry register ( name ( prefix , " off - heap - misses " ) , ( gauge < long > ) ( ) - > cache get statistics ( ) local off heap miss count ( ) ) ; registry register ( name ( prefix , " on - disk - misses " ) , ( gauge < long > ) ( ) - > cache get statistics ( ) local disk miss count ( ) ) ; registry register ( name ( prefix , " objects " ) , ( gauge < long > ) ( ) - > cache get statistics ( ) get size ( ) ) ; registry register ( name ( prefix , " in - memory - objects " ) , ( gauge < long > ) ( ) - > cache get statistics ( ) get local heap size ( ) ) ; registry register ( name ( prefix , " off - heap - objects " ) , ( gauge < long > ) ( ) - > cache get statistics ( ) get local off heap size ( ) ) ; registry register ( name ( prefix , " on - disk - objects " ) , ( gauge < long > ) ( ) - > cache get statistics ( ) get local disk size ( ) ) ; registry register ( name ( prefix , " mean - get - time " ) , ( gauge < double > ) ( ) - > cache get statistics ( ) cache get operation ( ) latency ( ) average ( ) value ( ) ) ; registry register ( name ( prefix , " mean - search - time " ) , ( gauge < double > ) ( ) - > cache get statistics ( ) cache search operation ( ) latency ( ) average ( ) value ( ) ) ; registry register ( name ( prefix , " eviction - count " ) , ( gauge < long > ) ( ) - > cache get statistics ( ) cache eviction operation ( ) count ( ) value ( ) ) ; registry register ( name ( prefix , " searches - per - second " ) , ( gauge < double > ) ( ) - > cache get statistics ( ) cache search operation ( ) rate ( ) value ( ) ) ; registry register ( name ( prefix , " writer - queue - size " ) , ( gauge < long > ) ( ) - > cache get statistics ( ) get writer queue length ( ) ) ; return new instrumented ehcache ( registry , cache ) ; }


specify a prefix that can be used for parameters that indicate default value fields , having " prefix + field " as name the value of the default field is used when the field is not provided default is " ! " , for " ! field " parameters ( e g " ! subscribe to newsletter " ) set this to null if you want to turn off the field defaults completely html checkboxes only send a value when they ' re checked , so it is not possible to detect that a formerly checked box has just been unchecked , at least not with standard html means a default field is especially useful when a checkbox represents a non - boolean value the presence of a default parameter preempts the behavior of a field marker for the given field

public void set field default prefix ( @ nullable string field default prefix ) { this field default prefix = field default prefix ; }


test that we can search for results only within the currently - selected region

public void test search current selection ( ) { / / make sure " current selection is selected set toggle button selected ( component , " search selection " , true ) ; / / wait for the gui to finish updating dialog wait for current task ( ) ; / / now do an initial search that should return a single result this is the case where / / we ' re searching for a set of instructions that matches exactly our selection press search all ( ) ; / / wait for the results window and verify the result count assert results table row count ( 1 ) ; }


< code > optional second msg blah = 2 ; < code >

public builder clear blah ( ) { if ( blah builder = = null ) { blah = second msg get default instance ( ) ; on changed ( ) ; } else { blah builder clear ( ) ; } bit field 0 = ( bit field 0 & ~ 0x 0 0 0 0 0 0 0 2 ) ; return this ; }


public boolean server healthy ( ) { try { string result = req api ( util and coms nacos url base + " / operator / metrics " , new hash map < string , string > ( 2 ) , http method get ) ; json node json = jackson utils to obj ( result ) ; string server status = json get ( " status " ) as text ( ) ; return " up " equals ( server status ) ; } catch ( exception e ) { return false ; } }


restitution mixing law feel free to customize this todo djm : add customization

public static float mix restitution ( float restitution 1 , float restitution 2 ) { return restitution 1 > restitution 2 ? restitution 1 : restitution 2 ; }


return varnode of given size and starting address defined by a pcode op with a given sequence number

public varnode find varnode ( int sz , address addr , sequence number sq ) { return vbank find ( sz , addr , sq get target ( ) , sq get time ( ) ) ; }


clears all text from the information buffer

void clear resolve info ( ) { if ( info buf length ( ) > 0 ) { info buf = new string buffer ( ) ; } }


create an button that has an icon created from the given image file

public static j button create image button ( string image file , string alternate text , dimension preferred size ) { image icon button icon = resource manager load image ( image file ) ; return create image button ( button icon , alternate text , preferred size ) ; }


public b get ( a model , int width , int height ) { model key < a > key = model key get ( model , width , height ) ; b result = cache get ( key ) ; key release ( ) ; return result ; }


returns true if the output should bypass output filtering this is used for test actions

boolean shows output unconditionally ( ) ;


returns the next action that the producer should take in regards to transactions this method should be called every time before a producer sends a message this means that most of the time it should return # { @ link transaction action # no op } to signal the producer that its next step should be to send a message


read encrypted private key file content with default pass phrase

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


synchronous observable and semaphore isolation only [ main ] thread is involved in this

public void test short circuited with fallback request context with semaphore isolated synchronous observable ( ) { request context test results results = test request context on short circuited with fallback ( execution isolation strategy semaphore , schedulers immediate ( ) ) ; assert true ( results is context initialized get ( ) ) ; assert true ( results origin thread get ( ) equals ( thread current thread ( ) ) ) ; / / all synchronous assert true ( results is context initialized observe on get ( ) ) ; assert true ( results observe on thread get ( ) equals ( thread current thread ( ) ) ) ; / / all synchronous / / semaphore isolated assert false ( results command is executed in thread ( ) ) ; }


handle any blocks that have a simple single computable flow with no switch type flow in it by trying to resolving the reference

private boolean handle simple block ( address location , task monitor monitor ) throws cancelled exception { basic block model basic block model = new basic block model ( program ) ; return resolve computable flow ( location , monitor , basic block model ) ; }


list a path , verify that there are no direct child entries

protected void verify no listing ( final path path ) throws exception { intercept ( file not found exception class , ( ) - > { file status [ ] statuses = get file system ( ) list status ( path ) ; return arrays deep to string ( statuses ) ; } ) ; }


reads binary spawn log protos from the input stream , sorts them and outputs to the message output stream the sorting is done according to the following rules : - if some output of action a appears as an input to action b , a will appear before b - when not constrained by ( transitive ) 1 , any action whose name of the first output is lexicographically smaller would appear earlier we assume that in the input stream , at most one spawn exec declares a given file as its output we assume that there are no cyclic dependencies

public static void stable sort ( input stream in , message output stream out ) throws i o exception { stable sort ( read ( in ) , out ) ; }


return the interval in common between this and o

public interval intersection ( interval other ) { return interval of ( math max ( a , other a ) , math min ( b , other b ) ) ; }


returns the cleanup time for a window , which is { @ code window max timestamp + allowed lateness } in case this leads to a value greated than { @ link long # max value } then a cleanup time of { @ link long # max value } is returned

private long cleanup time ( w window ) { if ( window assigner is event time ( ) ) { long cleanup time = window max timestamp ( ) + allowed lateness ; return cleanup time > = window max timestamp ( ) ? cleanup time : long max value ; } else { return window max timestamp ( ) ; } }


post - processes a test class after execution of all tests within the class this method should be called immediately after framework - specific after class lifecycle callbacks the default implementation is empty can be overridden by concrete classes as necessary

default void after test class ( test context test context ) throws exception { }


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


check whether required attributes are found in the given map

protected boolean required attributes found in map ( final map < string , object > principal attributes , final map < string , set < string > > required attributes ) { val difference = required attributes key set ( ) stream ( ) filter ( a - > principal attributes key set ( ) contains ( a ) ) collect ( collectors to set ( ) ) ; logger debug ( " difference of checking required attributes : [ { } ] " , difference ) ; if ( this require all attributes & & difference size ( ) < required attributes size ( ) ) { return false ; } if ( this require all attributes ) { return difference stream ( ) all match ( key - > required attribute found ( key , principal attributes , required attributes ) ) ; } return difference stream ( ) any match ( key - > required attribute found ( key , principal attributes , required attributes ) ) ; }


method to allow setting preallocate size of log file to pad the file

public static void set prealloc size ( long size ) { pre alloc size = size ; }


public to string creator append ( string field name , byte value ) { return append ( field name , byte value of ( value ) ) ; }


increment a property of a j s o n object if there is no such property , create one with a value of 1 if there is such a property , and if it is an integer , long , double , or float , then add one to it

public j s o n object increment ( string key ) throws j s o n exception { object value = opt ( key ) ; if ( value = = null ) { put ( key , 1 ) ; } else { if ( value instanceof integer ) { put ( key , ( ( integer ) value ) int value ( ) + 1 ) ; } else if ( value instanceof long ) { put ( key , ( ( long ) value ) long value ( ) + 1 ) ; } else if ( value instanceof double ) { put ( key , ( ( double ) value ) double value ( ) + 1 ) ; } else if ( value instanceof float ) { put ( key , ( ( float ) value ) float value ( ) + 1 ) ; } else { throw new j s o n exception ( " unable to increment [ " + key + " ] " ) ; } } return this ; }


this method is invoked each time a field type is tested in { @ link aggregator test case # test supported field types ( ) } the field type and name are provided , and the implementor is expected to return an agg builder accordingly the agg builder should be returned even if the aggregation does not support the field type , because the test will check if an exception is thrown in that case the list of supported types are provided by { @ link aggregator test case # get supported values source types ( ) } , which must also be implemented

protected aggregation builder create agg builder for type test ( mapped field type field type , string field name ) { throw new unsupported operation exception ( " if get supported values source types ( ) is implemented , " + " create agg builder for type test ( ) must be implemented as well " ) ; }


create a server builder that will bind with the given name

public static in process server builder for name ( string name ) { return new in process server builder ( name ) ; }


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


returns a future that delegates to another but will finish early ( via a { @ link timeout exception } wrapped in an { @ link execution exception } ) if the specified duration expires the delegate future is interrupted and cancelled if it times out

public static < v > listenable future < v > with timeout ( listenable future < v > delegate , duration time , scheduled executor service scheduled executor ) { return with timeout ( delegate , to nanos saturated ( time ) , time unit nanoseconds , scheduled executor ) ; }


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 a model and view object with the specified view name the content of the { @ link request context utils # get input flash map " input " flash map } is also added to the model

protected model and view handle request internal ( http servlet request request , http servlet response response ) throws exception { string view name = get view name ( ) ; if ( get status code ( ) ! = null ) { if ( get status code ( ) is 3xx redirection ( ) ) { request set attribute ( view response status attribute , get status code ( ) ) ; } else { response set status ( get status code ( ) value ( ) ) ; if ( get status code ( ) equals ( http status no content ) & & view name = = null ) { return null ; } } } if ( is status only ( ) ) { return null ; } model and view model and view = new model and view ( ) ; model and view add all objects ( request context utils get input flash map ( request ) ) ; if ( view name ! = null ) { model and view set view name ( view name ) ; } else { model and view set view ( get view ( ) ) ; } return model and view ; }


define the package information associated with a class

protected void define package ( file container , string class name ) throws i o exception { int class index = class name last index of ( ' ' ) ; if ( class index = = - 1 ) { return ; } string package name = class name substring ( 0 , class index ) ; if ( get package ( package name ) ! = null ) { / / already defined return ; } / / define the package now manifest manifest = get jar manifest ( container ) ; if ( manifest = = null ) { define package ( package name , null , null , null , null , null , null , null ) ; } else { define package ( container , package name , manifest ) ; } }


appends the node to the tail of the list

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


if key provided matches that of this composite , give join collector iterator over values it may emit

public void accept ( composite record reader join collector jc , k key ) throws i o exception { if ( has next ( ) & & 0 = = cmp compare ( key , key ( ) ) ) { fill join collector ( create key ( ) ) ; jc add ( id , get delegate ( ) ) ; return ; } jc add ( id , empty ) ; }


get the number of occupied reduce slots in the cluster

public int get occupied reduce slots ( ) { return occupied reduce slots ; }


receive a message from the given destination

message < ? > receive ( d destination ) throws messaging exception ;


notepad pdb does not exist notepad pdb xml is here : < tepdb xml repo location set to the default location on windows , no file should be found on non - windows , no file should be found

public void test find pdb 2 5 ( ) throws exception { created files = create files ( pdb location none , pdb xml location own dir ) ; file pdb = pdb parser find p d b ( test program , false , no such symbols repo dir ) ; assert null ( pdb ) ; }


enqueue the job to be submitted per the deadline associated with it

public void add ( final gridmix job job ) throws interrupted exception { final boolean add to queue = ! shutdown ; if ( add to queue ) { final submit task task = new submit task ( job ) ; log info ( " total number of queued jobs : " + ( queue depth - sem available permits ( ) ) ) ; sem acquire ( ) ; try { sched execute ( task ) ; } catch ( rejected execution exception e ) { sem release ( ) ; } } }


get replica state as reported by the data - node

hdfs server constants replica state get state ( ) { return state ; }


visit a parse tree produced by the { @ code binary } labeled alternative in { @ link painless parser # noncondexpression }

t visit binary ( painless parser binary context ctx ) ;


public int get branchingness ( ) { return branchingness ; }


concatenates a varargs array of iterables without making a defensive copy of the array

private static < t > fluent iterable < t > concat no defensive copy ( final iterable < ? extends t > inputs ) { for ( iterable < ? extends t > input : inputs ) { check not null ( input ) ; } return new fluent iterable < t > ( ) { @ override public iterator < t > iterator ( ) { return iterators concat ( / * lazily generate the iterators on each input only as needed * / new abstract indexed list iterator < iterator < ? extends t > > ( inputs length ) { @ override public iterator < ? extends t > get ( int i ) { return inputs [ i ] iterator ( ) ; } } ) ; } } ; }


creates n new { @ link stream record } of { @ link row data } based on the given fields array and a default update after row kind

public static stream record < row data > update after record ( object fields ) { row data row = row ( fields ) ; row set row kind ( row kind update after ) ; return new stream record < > ( row ) ; }


returns the < a href = " http : en wikipedia orgwiki standard deviation # definition of population values " > population standard deviation of the values the count must be non - zero this is guaranteed to return zero if the dataset contains only exactly one finite value it is not guaranteed to return zero when the dataset consists of the same value multiple times , due to numerical errors however , it is guaranteed never to return a negative result < h 3 > non - finite values < h 3 > if the dataset contains any non - finite values ( { @ link double # positive infinity } , { @ link double # negative infinity } , or { @ link double # na n } ) then the result is { @ link double # na n }

public double population standard deviation ( ) { return math sqrt ( population variance ( ) ) ; }


sets the background drawable and adjusts the container ' s padding to match the background

public void set background ( @ null drawable background ) { set background ( background , true ) ; }


sets the failed result of this { @ code future } unless this { @ code future } has already been cancelled or set ( including { @ linkplain # set future set asynchronously } ) when a call to this method returns , the { @ code future } is guaranteed to be { @ linkplain # is done done } < b > only if < b > the call was accepted ( in which case it returns { @ code true } ) if it returns { @ code false } , the { @ code future } may have previously been set asynchronously , in which case its result may not be known yet that result , though not yet known , cannot be overridden by a call to a { @ code set } method , only by a call to { @ link # cancel }

protected boolean set exception ( throwable throwable ) { object value to set = new failure ( check not null ( throwable ) ) ; if ( atomic helper cas value ( this , null , value to set ) ) { complete ( this ) ; return true ; } return false ; }


connect a { @ link channel } to the remote peer

public channel future connect ( string inet host , int inet port ) { return connect ( inet socket address create unresolved ( inet host , inet port ) ) ; }


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


reads the entire file using the given charset and returns the contents as a string

public static string read content ( path input file , charset charset ) throws i o exception { return as byte source ( input file ) as char source ( charset ) read ( ) ; }


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


returns the number of files in this snapshot

public int size ( ) { return metadata size ( ) ; }


updates the mount path tree with a new set of mount table entries it also updates the needed caches

public void refresh entries ( final collection < mount table > entries ) { / / the tree read / write must be atomic write lock lock ( ) ; try { / / new entries map < string , mount table > new entries = new concurrent hash map < > ( ) ; for ( mount table entry : entries ) { string src path = entry get source path ( ) ; new entries put ( src path , entry ) ; } / / old entries ( reversed to sort from the leaves to the root ) set < string > old entries = new tree set < > ( collections reverse order ( ) ) ; for ( mount table entry : get tree values ( " / " ) ) { string src path = entry get source path ( ) ; old entries add ( src path ) ; } / / entries that need to be removed for ( string src path : old entries ) { if ( ! new entries contains key ( src path ) ) { this tree remove ( src path ) ; invalidate location cache ( src path ) ; log info ( " removed stale mount point { } from resolver " , src path ) ; } } / / entries that need to be added for ( mount table entry : entries ) { string src path = entry get source path ( ) ; if ( ! old entries contains ( src path ) ) { / / add node , it does not exist this tree put ( src path , entry ) ; invalidate location cache ( src path ) ; log info ( " added new mount point { } to resolver " , src path ) ; } else { / / node exists , check for updates mount table existing entry = this tree get ( src path ) ; if ( existing entry ! = null & & ! existing entry equals ( entry ) ) { log info ( " entry has changed from \ " { } \ " to \ " { } \ " " , existing entry , entry ) ; this tree put ( src path , entry ) ; invalidate location cache ( src path ) ; log info ( " updated mount point { } in resolver " , src path ) ; } } } } finally { write lock unlock ( ) ; } this init = true ; }


begin to specify a new request with the given metadata value , which can be a concrete value or any producer of a single value that can be adapted to a { @ link publisher } via { @ link reactive adapter registry }

request spec metadata ( object metadata , @ nullable mime type mime type ) ;


public void update binary stream ( string column label , input stream x , int length ) throws s q l exception { }


public blob get blob ( string column label ) throws s q l exception { return null ; }


sets a custom option to be passed to client interceptors on the channel { @ link io grpc client interceptor } via the call options parameter

public final < t > s with option ( call options key < t > key , t value ) { return build ( channel , call options with option ( key , value ) ) ; }


void write ( object msg , channel promise promise ) ;


if the callback handler handles the ` o auth bearer extensions validator callback ` and finds an invalid extension , sasl server should throw an authentication exception

public void throws authentication exception on invalid extensions ( ) { o auth bearer unsecured validator callback handler invalid handler = new o auth bearer unsecured validator callback handler ( ) { @ override public void handle ( callback [ ] callbacks ) throws unsupported callback exception { for ( callback callback : callbacks ) { if ( callback instanceof o auth bearer validator callback ) { o auth bearer validator callback validation callback = ( o auth bearer validator callback ) callback ; validation callback token ( new o auth bearer token mock ( ) ) ; } else if ( callback instanceof o auth bearer extensions validator callback ) { o auth bearer extensions validator callback extensions callback = ( o auth bearer extensions validator callback ) callback ; extensions callback error ( " first key " , " is not valid " ) ; extensions callback error ( " second key " , " is not valid either " ) ; } else throw new unsupported callback exception ( callback ) ; } } } ; sasl server = new o auth bearer sasl server ( invalid handler ) ; map < string , string > custom extensions = new hash map < > ( ) ; custom extensions put ( " first key " , " value " ) ; custom extensions put ( " second key " , " value " ) ; assert throws ( sasl authentication exception class , ( ) - > sasl server evaluate response ( client initial response ( null , false , custom extensions ) ) ) ; }


set the message - id header applies to the message frame

public void set message id ( @ nullable string message id ) { set ( message id , message id ) ; }


get the information about remote nodes to be rendered on { @ code remoteinfo } requests

public remote connection info get connection info ( ) { return new remote connection info ( cluster alias , connection strategy get mode info ( ) , initial connection timeout , skip unavailable ) ; }


returns the number of ranges in the list

public int get num ranges ( ) { return set size ( ) ; }


public static list < string > read file 2 list ( final file file , final int st , final int end ) { return read file 2 list ( file , st , end , null ) ; }


read one line from the input stream into the given text

public int read line ( text str , int max line length , int max bytes to consume ) throws i o exception { if ( this record delimiter bytes ! = null ) { return read custom line ( str , max line length , max bytes to consume ) ; } else { return read default line ( str , max line length , max bytes to consume ) ; } }


public synchronized void add open channels ( list < file i o channel > to open ) { check argument ( ! closed ) ; for ( file i o channel channel : to open ) { open channels add ( channel ) ; channels remove ( channel get channel i d ( ) ) ; } }


rename operation safety check for attempts to rename the root directory verifies that src no longer exists after rename

public static void rename ( file system file system , path src , path dst ) throws i o exception { reject root operation ( src , false ) ; assert true ( " rename ( " + src + " , " + dst + " ) failed " , file system rename ( src , dst ) ) ; assert path does not exist ( file system , " renamed source dir " , src ) ; }


replaces the instruction at a given offset by a given push instruction

private void replace instruction ( clazz clazz , int offset , instruction instruction , instruction replacement instruction ) { / / pop unneeded stack entries if necessary int pop count = instruction stack pop count ( clazz ) - replacement instruction stack pop count ( clazz ) ; insert pop instructions ( offset , pop count ) ; if ( debug ) system out println ( " replacing instruction " + instruction to string ( offset ) + " - > " + replacement instruction to string ( ) + ( pop count = = 0 ? " " : " ( " + pop count + " pops ) " ) ) ; code attribute editor replace instruction ( offset , replacement instruction ) ; / / visit the instruction , if required if ( extra instruction visitor ! = null ) { / / note : we ' re not passing the right arguments for now , knowing that / / they aren ' t used anyway instruction accept ( clazz , null , null , offset , extra instruction visitor ) ; } }


sets the default value to use for a rule ' s { @ link rule class # compatible environment attr } attribute when not explicitly specified by the rule records a package error if any labels are duplicated

void set default compatible with ( list < label > environments , string attr name , location location ) { if ( has duplicate labels ( environments , " package " + pkg get name ( ) , attr name , location , this : : add event ) ) { set contains errors ( ) ; } pkg set default compatible with ( immutable set copy of ( environments ) ) ; }


cancels all tasks in the currently running group tasks in the group that have not yet started will never run and will immediately be put into the task results list the task monitor for the currently running task will be cancelled , but the task will continue to run until it checks the monitor

public void cancel running group ( g task group group ) { lock lock ( ) ; try { if ( group = = running group ) { group set cancelled ( ) ; if ( running task ! = null ) { running task get task monitor ( ) cancel ( ) ; } if ( suspended ) { process cancelled jobs in priority q ( ) ; } } } finally { lock unlock ( ) ; } }


subclasses can call this to register the supplied { @ link bean definition decorator } to handle the specified element the element name is the local ( non - namespace qualified ) name

protected final void register bean definition decorator ( string element name , bean definition decorator dec ) { this decorators put ( element name , dec ) ; }


returns the function definition being created by this applier

function definition data type get function definition ( ) { return function definition ; }


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

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


returns a value a fraction { @ code ( remainder scale ) } of the way between { @ code lower } and { @ code upper } assumes that { @ code lower < = upper } correctly handles infinities ( but not { @ code na n } )

private static double interpolate ( double lower , double upper , double remainder , double scale ) { if ( lower = = negative infinity ) { if ( upper = = positive infinity ) { / / return na n when lower = = negative infinity and upper = = positive infinity : return na n ; } / / return negative infinity when negative infinity = = lower < = upper < positive infinity : return negative infinity ; } if ( upper = = positive infinity ) { / / return positive infinity when negative infinity < lower < = upper = = positive infinity : return positive infinity ; } return lower + ( upper - lower ) * remainder / scale ; }


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


adds the given keyvalue pair to the configuration object

public void set boolean ( string key , boolean value ) { set value internal ( key , value ) ; }


perform the second query to get the groups of the user if posix groups is enabled , use use posix giduid to find otherwise , use the general group member attribute to find it

private set < string > lookup group ( search result result , dir context c , int go up hierarchy ) throws naming exception { set < string > groups = new linked hash set < > ( ) ; set < string > group d ns = new hash set < > ( ) ; naming enumeration < search result > group results ; / / perform the second ldap query if ( is posix ) { group results = lookup posix group ( result , c ) ; } else { string user dn = result get name in namespace ( ) ; group results = c search ( groupbase d n , " ( & " + group search filter + " ( " + group member attr + " = { 0 } ) ) " , new object [ ] { user dn } , search controls ) ; } / / if the second query is successful , group objects of the user will be / / returned get group names from the returned objects if ( group results ! = null ) { while ( group results has more elements ( ) ) { search result group result = group results next element ( ) ; get group names ( group result , groups , group d ns , go up hierarchy > 0 ) ; } if ( go up hierarchy > 0 & & ! is posix ) { go up group hierarchy ( group d ns , go up hierarchy , groups ) ; } } return groups ; }