returns the ssl related configuration settings given the location of a key and certificate and the location of the pem certificates to be trusted

public static void add s s l settings for p e m files ( settings builder builder , string key path , string password , string certificate path , list < string > trusted certificates ) { add s s l settings for p e m files ( builder , " " , key path , password , certificate path , trusted certificates , true ) ; }


a shortcut for decoding the raw content of the message to text with the given character encoding this is useful for text web socket messages , or otherwise when the payload is expected to contain text

public string get payload as text ( charset charset ) { return this payload to string ( charset ) ; }


set the additional ( undeclared ) property with the specified name and value if the property does not already exist , create it otherwise replace it

public shape or null put additional property ( string key , object value ) { if ( this additional properties = = null ) { this additional properties = new hash map < string , object > ( ) ; } this additional properties put ( key , value ) ; return this ; }


factory method to create an appropriate instance of a queue configuration parser returns a parser that can parse either the deprecated property style queue configuration in mapred - site xml , or one that can parse hierarchical queues in mapred - queues xml first preference is given to configuration in mapred - site xml if no queue configuration is found there , then a parser that can parse configuration in mapred - queues xml is created

static queue configuration parser get queue configuration parser ( configuration conf , boolean reload conf , boolean are acls enabled ) { if ( conf ! = null & & conf get ( deprecated queue configuration parser mapred queue names key ) ! = null ) { if ( reload conf ) { conf reload configuration ( ) ; } return new deprecated queue configuration parser ( conf ) ; } else { url xml in url = thread current thread ( ) get context class loader ( ) get resource ( queue conf file name ) ; if ( xml in url = = null ) { xml in url = thread current thread ( ) get context class loader ( ) get resource ( queue conf default file name ) ; assert xml in url ! = null ; / / this should be in our jar } input stream stream = null ; try { stream = xml in url open stream ( ) ; return new queue configuration parser ( new buffered input stream ( stream ) , are acls enabled ) ; } catch ( i o exception ioe ) { throw new runtime exception ( " couldn ' t open queue configuration at " + xml in url , ioe ) ; } finally { i o utils close stream ( stream ) ; } } }


returns an array containing all of the elements in this queue , in proper sequence the returned array will be " safe " in that no references to it are maintained by this queue ( in other words , this method must allocate a new array ) the caller is thus free to modify the returned array this method acts as bridge between array - based and collection - based a p is

public object [ ] to array ( ) { final e [ ] items = this items ; final monitor monitor = this monitor ; monitor enter ( ) ; try { object [ ] a = new object [ count ] ; int k = 0 ; int i = take index ; while ( k < count ) { a [ k + + ] = items [ i ] ; i = inc ( i ) ; } return a ; } finally { monitor leave ( ) ; } }


multiplies the vector by the transpose of the given matrix

public vector 3 tra mul ( matrix 3 matrix ) { final float l mat [ ] = matrix val ; return set ( x * l mat [ matrix 3 m00 ] + y * l mat [ matrix 3 m10 ] + z * l mat [ matrix 3 m20 ] , x * l mat [ matrix 3 m01 ] + y * l mat [ matrix 3 m11 ] + z * l mat [ matrix 3 m21 ] , x * l mat [ matrix 3 m02 ] + y * l mat [ matrix 3 m12 ] + z * l mat [ matrix 3 m22 ] ) ; }


suitable for a 1 : 1 conversation or a gv1 group only

public static void send profile key ( final context context , final long thread id ) { application dependencies get job manager ( ) add ( profile key send job create ( context , thread id ) ) ; }


return the protocol scheme for the file system

public string get scheme ( ) { return web hdfs constants webhdfs scheme ; }


proceed to the state following the provided one

public static void proceed to next state from ( install state prior ) { install state next = get next install state ( prior ) ; if ( next ! = null ) { jenkins get ( ) set install state ( next ) ; } }


public collection < ? extends one time token account > get ( @ selector final string username ) { return repository get ( username ) ; }


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

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


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


creates a temporary table with optional partitioning requirements temporary table might have different default storage format , compression scheme , replication factor , etc , and gets automatically dropped when the transaction ends this spi is unstable and subject to change in the future

default connector table handle create temporary table ( connector session session , list < column metadata > columns , optional < connector partitioning metadata > partitioning metadata ) { throw new presto exception ( not supported , " this connector does not support creating temporary tables " ) ; }


an unused property this method will always return { @ code 0 }


runs before the { @ link builder } runs ( but after the checkout has occurred ) , and performs a set up

public environment set up ( abstract build build , launcher launcher , build listener listener ) throws i o exception , interrupted exception { / / if it ' s a build , and the plugin implements the deprecated api , use it if ( build instanceof build & & util is overridden ( build wrapper class , get class ( ) , " set up " , build class , launcher class , build listener class ) ) return set up ( ( build ) build , launcher , listener ) ; else / / not a supported build type throw new unsupported operation exception ( " plugin class ' " + this get class ( ) get name ( ) + " ' does not support a build of type ' " + build get class ( ) get name ( ) + " ' " ) ; }


synchronized void remove volume ( string storage id ) { if ( executors = = null ) { throw new runtime exception ( " async disk service is already shutdown " ) ; } thread pool executor executor = executors get ( storage id ) ; if ( executor = = null ) { throw new runtime exception ( " can not find volume with storage id " + storage id + " to remove " ) ; } else { executor shutdown ( ) ; executors remove ( storage id ) ; } }


returns true if there is any scanner thread registered

public synchronized boolean has any registered scanner ( ) { return ! scanners is empty ( ) ; }


public int get server socket send buf size ( ) { return server socket send buf size ; }


creates a copy of the { @ link table source } that projects its output to the given field indexes the field indexes relate to the physical produced data type ( { @ link table source # get produced data type ( ) } ) and not to the table schema ( { @ link table source # get table schema ( ) } of the { @ link table source } the table schema ( { @ link table source # get table schema ( ) } of the { @ link table source } copy must not be modified by this method , but only the produced data type ( { @ link table source # get produced data type ( ) } ) and the produced { @ code data set } ( { @ code batch table source get data set ( } ) or { @ code data stream } ( { @ code stream table source get data stream ( ) } ) the produced data type may only be changed by removing or reordering first level fields the type of the first level fields must not be changed if the { @ link table source } implements the { @ link defined field mapping } interface , it might be necessary to adjust the mapping as well the { @ code nested fields } parameter contains all nested fields that are accessed by the query this information can be used to only read and set the accessed fields non - accessed fields may be left empty , set to null , or to a default value this method is called with parameters as shown in the example below : { @ code schema table schema = { id , student < \ school < \ city , tuition > , age , name > , teacher < \ age , name > } query select ( id , student school city , student age , teacher ) parameters fields = field = [ 0 , 1 , 2 ] nested fields \ [ \ [ " " ] , [ " school city " , " age " ] , [ " " \ ] \ ] } important : this method must return a true copy and must not modify the original table source object

table source < t > project nested fields ( int [ ] fields , string [ ] [ ] nested fields ) ;


returns true iff the value of the specified attribute is explicitly set in the build file ( as opposed to its default value ) this also returns true if the value from the build file is the same as the default value

boolean is attribute value explicitly specified ( attribute attribute ) ;


public void close ( ) { this closed = true ; }


specifies that a cors request should be rejected if it ' s invalid before being further processing cors headers are set after a request is processed this may not always be desired and this setting will check that the origin is valid and if it is not valid no further processing will take place , and an error will be returned to the calling client

public cors config builder short circuit ( ) { short circuit = true ; return this ; }


returns all the function records that have the provided full hash , searching across all attached databases

public list < function record > find functions by full hash ( long full hash ) { array list < function record > result = new array list < function record > ( ) ; for ( fid d b fid db : fid db list ) { list < function record > list = fid db find functions by full hash ( full hash ) ; if ( list ! = null ) { result add all ( list ) ; } } return result ; }


checks if cgroup stats are available by checking for the existence of { @ code procselfcgroup } , { @ code sysfscgroupcpu } , { @ code sysfscgroupcpuacct } and { @ code sysfscgroupmemory }

boolean are cgroup stats available ( ) { if ( ! files exists ( path utils get ( " / proc / self / cgroup " ) ) ) { return false ; } if ( ! files exists ( path utils get ( " / sys / fs / cgroup / cpu " ) ) ) { return false ; } if ( ! files exists ( path utils get ( " / sys / fs / cgroup / cpuacct " ) ) ) { return false ; } if ( ! files exists ( path utils get ( " / sys / fs / cgroup / memory " ) ) ) { return false ; } return true ; }


marks this runner ' s job as not running other job manager will not recover the job after this call this method never throws an exception

private void unregister job from high availability ( ) { try { running jobs registry set job finished ( job graph get job i d ( ) ) ; } catch ( throwable t ) { log error ( " could not un - register from high - availability services job { } ( { } ) " + " other job manager ' s may attempt to recover it and re - execute it " , job graph get name ( ) , job graph get job i d ( ) , t ) ; } }


public long get failed elapsed ( ) { return failed elapsed get ( ) ; }


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


customize the set of property sources with those appropriate for any standard java environment : { @ value # system properties property source name } { @ value # system environment property source name } properties present in { @ value # system properties property source name } will take precedence over those in { @ value # system environment property source name }

protected void customize property sources ( mutable property sources property sources ) { property sources add last ( new properties property source ( system properties property source name , get system properties ( ) ) ) ; property sources add last ( new system environment property source ( system environment property source name , get system environment ( ) ) ) ; }


moves the camera by the given amount on each axis

public void translate ( float x , float y ) { translate ( x , y , 0 ) ; }


where the enumflag item was defined < code > optional aapt pb source source = 1 ; < code >

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


public api client add default header ( string key , string value ) { default header map put ( key , value ) ; return this ; }


sorts the given list of local variables and trims their code blocks when necessary the block is trimmed at the end , which is a bit arbitrary

private void trim local variables ( local variable info [ ] local variable infos , int local variable info count , int max locals ) { / / sort the local variable entries arrays sort ( local variable infos , 0 , local variable info count ) ; int [ ] start p cs = create max array ( max locals ) ; / / trim the local variable entries , starting at the last one for ( int index = local variable info count - 1 ; index > = 0 ; index - - ) { local variable info local variable info = local variable infos [ index ] ; / / make sure the variable ' s code block doesn ' t overlap with the / / next one for the same variable int max length = start p cs [ local variable info u 2index ] - local variable info u 2start p c ; if ( local variable info u 2length > max length ) { local variable info u 2length = max length ; } start p cs [ local variable info u 2index ] = local variable info u 2start p c ; } }


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


tries to infer the type information of an aggregate function ' s accumulator type

public static < t > type information < t > get return type of table function ( table function < t > table function ) { return get return type of table function ( table function , null ) ; }


the { @ link method descriptor } for the call

public abstract method descriptor < req t , resp t > get method descriptor ( ) ;


returns true if the format factory can be found using the given factory base class and identifier

private boolean format factory exists ( context context , class < ? > factory class ) { configuration options = configuration from map ( context get catalog table ( ) get options ( ) ) ; string identifier = options get ( factory util format ) ; if ( identifier = = null ) { throw new validation exception ( string format ( " table options do not contain an option key ' % s ' for discovering a format " , factory util format key ( ) ) ) ; } final list < factory > factories = new linked list < > ( ) ; service loader load ( factory class , context get class loader ( ) ) iterator ( ) for each remaining ( factories : : add ) ; final list < factory > found factories = factories stream ( ) filter ( f - > factory class is assignable from ( f get class ( ) ) ) collect ( collectors to list ( ) ) ; final list < factory > matching factories = found factories stream ( ) filter ( f - > f factory identifier ( ) equals ( identifier ) ) collect ( collectors to list ( ) ) ; return ! matching factories is empty ( ) ; }


returns the approximate number of bytes per frame for the current flac stream

public long get approx bytes per frame ( ) { long approx bytes per frame ; if ( max frame size > 0 ) { approx bytes per frame = ( ( long ) max frame size + min frame size ) / 2 + 1 ; } else { / / uses the stream ' s block - size if it ' s a known fixed block - size stream , otherwise uses the / / default value for flac block - size , which is 4096 long block size samples = ( min block size samples = = max block size samples & & min block size samples > 0 ) ? min block size samples : 4096 ; approx bytes per frame = ( block size samples * channels * bits per sample ) / 8 + 64 ; } return approx bytes per frame ; }


public int get weak bind offset ( ) { return weak bind off ; }


test the property ' sc a e t h flow points '

public void sc a e t h flow points test ( ) { / / todo : test sc a e t h flow points }


< code > optional org apache dubbo common serialize protobuf model p b request type c dubbo p b request type = 3 ; < code >

public builder clear c dubbo p b request type ( ) { if ( c dubbo p b request type builder = = null ) { c dubbo p b request type = null ; on changed ( ) ; } else { c dubbo p b request type builder clear ( ) ; } bit field 0 = ( bit field 0 & ~ 0x 0 0 0 0 0 0 0 2 ) ; return this ; }


reads this file into a string , by using the current system encoding on the remote machine

public string read to string ( ) throws i o exception , interrupted exception { return act ( new read to string ( ) ) ; }


use this if you can ' t bundle images with your app this may be useful if you download the animations from the network or have the images saved to an sd card in that case , lottie will defer the loading of the bitmap to this delegate

@ suppress warnings ( " unused " ) public void set image asset delegate ( image asset delegate asset delegate ) { lottie drawable set image asset delegate ( asset delegate ) ; }


returns true if { @ code annotations } contains an instance of { @ code cls }

static boolean is annotation present ( annotation [ ] annotations , class < ? extends annotation > cls ) { for ( annotation annotation : annotations ) { if ( cls is instance ( annotation ) ) { return true ; } } return false ; }


private static map < string , attribute value > build table attribute values map ( final cas event record ) { val values = new hash map < string , attribute value > ( ) ; values put ( column names principal get column name ( ) , attribute value builder ( ) s ( record get principal id ( ) ) build ( ) ) ; values put ( column names id get column name ( ) , attribute value builder ( ) n ( string value of ( record get id ( ) ) ) build ( ) ) ; values put ( column names creation time get column name ( ) , attribute value builder ( ) s ( record get creation time ( ) ) build ( ) ) ; values put ( column names type get column name ( ) , attribute value builder ( ) s ( record get type ( ) ) build ( ) ) ; val properties = mapper write value as string ( record get properties ( ) ) ; values put ( column names properties get column name ( ) , attribute value builder ( ) s ( properties ) build ( ) ) ; logger debug ( " created attribute values [ { } ] based on [ { } ] " , values , record ) ; return values ; }


get the virtual memory used by all the processes in the process - tree that are older than the passed in age

public long get virtual memory size ( int older than age ) { return unavailable ; }


public void set frame duration ( float frame duration ) { this frame duration = frame duration ; this animation duration = key frames length * frame duration ; }


private void parse inputs ( final string [ ] args ) { / / if there are no command line arguments , exit if ( args length = = 0 ) { display usage ( ) ; throw new hadoop illegal argument exception ( " give valid inputs " ) ; } / / parse command line args for ( int i = 0 ; i < args length ; i + + ) { if ( args [ i ] equals ( " - operation " ) ) { operation = args [ + + i ] ; } else if ( args [ i ] equals ( " - maps " ) ) { check args ( i + 1 , args length ) ; number of maps = long parse long ( args [ + + i ] ) ; } else if ( args [ i ] equals ( " - reduces " ) ) { check args ( i + 1 , args length ) ; number of reduces = long parse long ( args [ + + i ] ) ; } else if ( args [ i ] equals ( " - start time " ) ) { check args ( i + 1 , args length ) ; start time = long parse long ( args [ + + i ] ) * 1000 ; } else if ( args [ i ] equals ( " - block size " ) ) { check args ( i + 1 , args length ) ; block size = long parse long ( args [ + + i ] ) ; } else if ( args [ i ] equals ( " - bytes to write " ) ) { check args ( i + 1 , args length ) ; bytes to write = integer parse int ( args [ + + i ] ) ; } else if ( args [ i ] equals ( " - bytes per checksum " ) ) { check args ( i + 1 , args length ) ; bytes per checksum = long parse long ( args [ + + i ] ) ; } else if ( args [ i ] equals ( " - number of files " ) ) { check args ( i + 1 , args length ) ; number of files = long parse long ( args [ + + i ] ) ; } else if ( args [ i ] equals ( " - replication factor per file " ) ) { check args ( i + 1 , args length ) ; replication factor per file = short parse short ( args [ + + i ] ) ; } else if ( args [ i ] equals ( " - base dir " ) ) { check args ( i + 1 , args length ) ; base dir = args [ + + i ] ; } else if ( args [ i ] equals ( " - read file after open " ) ) { check args ( i + 1 , args length ) ; read file after open = boolean parse boolean ( args [ + + i ] ) ; } else if ( args [ i ] equals ( " - help " ) ) { display usage ( ) ; is help message = true ; } } log info ( " test inputs : " ) ; log info ( " test operation : " + operation ) ; log info ( " start time : " + sdf format ( new date ( start time ) ) ) ; log info ( " number of maps : " + number of maps ) ; log info ( " number of reduces : " + number of reduces ) ; log info ( " block size : " + block size ) ; log info ( " bytes to write : " + bytes to write ) ; log info ( " bytes per checksum : " + bytes per checksum ) ; log info ( " number of files : " + number of files ) ; log info ( " replication factor : " + replication factor per file ) ; log info ( " base dir : " + base dir ) ; log info ( " read file after open : " + read file after open ) ; / / set user - defined parameters , so the map method can access the values get conf ( ) set ( " test nnbench operation " , operation ) ; get conf ( ) set long ( " test nnbench maps " , number of maps ) ; get conf ( ) set long ( " test nnbench reduces " , number of reduces ) ; get conf ( ) set long ( " test nnbench starttime " , start time ) ; get conf ( ) set long ( " test nnbench blocksize " , block size ) ; get conf ( ) set int ( " test nnbench bytestowrite " , bytes to write ) ; get conf ( ) set long ( " test nnbench bytesperchecksum " , bytes per checksum ) ; get conf ( ) set long ( " test nnbench numberoffiles " , number of files ) ; get conf ( ) set int ( " test nnbench replicationfactor " , ( int ) replication factor per file ) ; get conf ( ) set ( " test nnbench basedir " , base dir ) ; get conf ( ) set boolean ( " test nnbench read file after open " , read file after open ) ; get conf ( ) set ( " test nnbench datadir name " , data dir name ) ; get conf ( ) set ( " test nnbench outputdir name " , output dir name ) ; get conf ( ) set ( " test nnbench controldir name " , control dir name ) ; }


sets this block to have an instruction error

public void set instruction error ( instruction error instruction error type type , address intended instruction address , address conflict address , address flow from address , string message ) { if ( type = = instruction error type parse ) { throw new illegal argument exception ( " use set parse conflict for parse conflicts " ) ; } instruction error = new instruction error ( this , type , intended instruction address , conflict address , flow from address , message ) ; }


decides what needs to be done based on the request input and always returns a valid non - null fetch source context

private fetch source context normalize fetch source content ( @ nullable fetch source context context , @ nullable string [ ] g fields ) { if ( context ! = null ) { return context ; } if ( g fields = = null ) { return fetch source context fetch source ; } for ( string field : g fields ) { if ( source field mapper name equals ( field ) ) { return fetch source context fetch source ; } } return fetch source context do not fetch source ; }


gets the { @ code signed byte } value at a particular offset

public int get byte ( int off ) { check offsets ( off , off + 1 ) ; return get byte 0 ( off ) ; }


template method that subclasses may override to construct the object returned by this factory invoked lazily the first time { @ link # get object ( ) } is invoked in case of a shared singleton ; else , on each { @ link # get object ( ) } call the default implementation returns the merged { @ code map } instance

protected map < string , object > create map ( ) { map < string , object > result = new linked hash map < > ( ) ; process ( ( properties , map ) - > merge ( result , map ) ) ; return result ; } @ suppress warnings ( { " rawtypes " , " unchecked " }


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

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


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


adds a constant fieldref info to the constant pool of this symbol table does nothing if the constant pool already contains a similar item

symbol add constant fieldref ( final string owner , final string name , final string descriptor ) { return add constant member reference ( symbol constant fieldref tag , owner , name , descriptor ) ; }


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


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


returns an immutable list with the given elements equivalent to { @ code copy of ( null , elems ) }

public static < t > starlark list < t > immutable copy of ( iterable < ? extends t > elems ) { return copy of ( null , elems ) ; }


returns an immutable array containing the given values , in order

public static immutable int array copy of ( int [ ] values ) { return values length = = 0 ? empty : new immutable int array ( arrays copy of ( values , values length ) ) ; }


returns the default i value formatter that has been determined by the chart considering the provided minimum and maximum values

public i value formatter get default value formatter ( ) { return m default value formatter ; }


utility method for testing versioned writables

public static void test versioned writable ( writable before , writable after ) throws exception { data output buffer dob = new data output buffer ( ) ; before write ( dob ) ; data input buffer dib = new data input buffer ( ) ; dib reset ( dob get data ( ) , dob get length ( ) ) ; try { after read fields ( dib ) ; } catch ( version mismatch exception vmme ) { system out println ( " good , we expected this : " + vmme ) ; return ; } throw new exception ( " a version mismatch didn ' t happen ! " ) ; }


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

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


return if element at specified index is a separator

boolean is separator ( int path index ) { return this path elements get ( path index ) instanceof separator ; }


store a working range information into a list for later use by { @ link layout state }

protected static void register working range ( string name , working range working range , component component , string global key ) { if ( component m working range registrations = = null ) { component m working range registrations = new array list < > ( ) ; } component m working range registrations add ( new working range container registration ( name , working range , component , global key ) ) ; }


find the nearest overridden { @ link method method } from the inherited class

static method find nearest overridden method ( method overrider ) { class < ? > declaring class = overrider get declaring class ( ) ; method overridden method = null ; for ( class < ? > inherited type : get all inherited types ( declaring class ) ) { overridden method = find overridden method ( overrider , inherited type ) ; if ( overridden method ! = null ) { break ; } } return overridden method ; }


default void rename table ( connector session session , connector table handle table handle , schema table name new table name ) { throw new presto exception ( not supported , " this connector does not support renaming tables " ) ; }


returns a handle to the child with the specified name @ throw gdx runtime exception if this file handle is a { @ link file type # classpath } or { @ link file type # internal } and the child doesn ' t exist

public file handle child ( string name ) { return new gwt file handle ( preloader , ( file is empty ( ) ? " " : ( file + ( file ends with ( " / " ) ? " " : " / " ) ) ) + name , file type internal ) ; }


formats the given date into a string this is in contrast to { @ link # format date timestamp ( date ) } , which will also return the time portion of the date

public static string format date ( date date ) { return date formatter format ( to local date ( date ) ) ; }


returns completion hints for the given statement at the given cursor position the completion happens case insensitively

string [ ] get completion hints ( string statement , int position ) ;


private void markup headers ( ) throws exception { monitor set message ( " marking up dyld headers " ) ; monitor initialize ( 1 ) ; dyld cache header parse from memory ( program , space , log , monitor ) ; dyld cache header markup ( program , space , monitor , log ) ; monitor increment progress ( 1 ) ; }


checks that running a given command returns the expected map asserts that all specified keys are present with values of the specified types and that there are no extra entries

public void test command ( string cmd name , map < string , string > kwargs , field fields ) throws i o exception , interrupted exception { zoo keeper server zks = server factory get zoo keeper server ( ) ; map < string , object > result = commands run command ( cmd name , zks , kwargs ) to map ( ) ; assert true ( result contains key ( " command " ) ) ; / / this is only true because we ' re setting cmd name to the primary name assert equals ( cmd name , result remove ( " command " ) ) ; assert true ( result contains key ( " error " ) ) ; assert null ( result remove ( " error " ) , " error : " + result get ( " error " ) ) ; for ( field field : fields ) { string k = field key ; assert true ( result contains key ( k ) , " result from command " + cmd name + " missing field \ " " + k + " \ " " + " \ n " + result ) ; class < ? > t = field type ; object v = result remove ( k ) ; assert true ( t is assignable from ( v get class ( ) ) , " \ " " + k + " \ " field from command " + cmd name + " should be of type " + t + " , is actually of type " + v get class ( ) ) ; } assert true ( result is empty ( ) , " result from command " + cmd name + " contains extra fields : " + result ) ; }


return the configured header initializer

public message header initializer get header initializer ( ) { return this header initializer ; }


inserts the string representation of the specified { @ code float } value at the specified { @ code offset } the { @ code float } value is converted to a string according to the rule defined by { @ link string # value of ( float ) }

public string builder insert ( int offset , float f ) { insert 0 ( offset , float to string ( f ) ) ; return this ; }


returned information is a json representation of an array , each element of the array is a map contains the information about a block pool service actor

public string get b p service actor info ( ) { final array list < map < string , string > > info array = new array list < map < string , string > > ( ) ; for ( b p offer service bpos : block pool manager get all namenode threads ( ) ) { if ( bpos ! = null ) { for ( b p service actor actor : bpos get b p service actors ( ) ) { info array add ( actor get actor info map ( ) ) ; } } } return json to string ( info array ) ; }


public just symbol enum get just symbol ( ) { return just symbol ; }


public object get anytype 1 ( ) { return anytype 1 ; }


same as resizable queue test , but in reverse

public void resizable deque test ( ) { final long queue q = new long queue ( 8 ) ; assert true ( " new deque is not empty ! " , q size = = 0 ) ; for ( int i = 0 ; i < 100 ; i + + ) { for ( int j = 0 ; j < i ; j + + ) { try { q add first ( j ) ; } catch ( illegal state exception e ) { fail ( " failed to add element " + j + " ( " + i + " ) " ) ; } final long peeked = q first ( ) ; assert true ( " peek shows " + peeked + " , should be " + j + " ( " + i + " ) " , peeked = = j ) ; final int size = q size ; assert true ( " size should be " + ( j + 1 ) + " but is " + size + " ( " + i + " ) " , size = = j + 1 ) ; } if ( i ! = 0 ) { final long peek = q last ( ) ; assert true ( " last thing is not zero but " + peek + " ( " + i + " ) " , peek = = 0 ) ; } for ( int j = 0 ; j < i ; j + + ) { final long pop = q remove last ( ) ; assert true ( " popped should be " + j + " but is " + pop + " ( " + i + " ) " , pop = = j ) ; final int size = q size ; assert true ( " size should be " + ( i - 1 - j ) + " but is " + size + " ( " + i + " ) " , size = = i - 1 - j ) ; } assert true ( " not empty after cycle " + i , q size = = 0 ) ; } for ( int i = 0 ; i < 56 ; i + + ) { q add first ( 42 ) ; } q clear ( ) ; assert true ( " clear did not clear properly " , q size = = 0 ) ; }


dump the filesystem statistics after the class

public static void dump file system i o statistics ( ) { log info ( " aggregate file system statistics { } " , io statistics to pretty string ( filesystem iostats ) ) ; }


public list < setting < ? > > get settings ( ) { return list of ( eql enabled setting ) ; }


where the enumflag item was defined < code > optional aapt pb source source = 1 ; < code >

public com android aapt resources source get source ( ) { return source = = null ? com android aapt resources source get default instance ( ) : source ; }


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


returns whether the artifact represents a fileset if true , this artifact is necessarily a { @ link special artifact } with type { @ link special artifact type # fileset }

public boolean is fileset ( ) { return false ; }


public file write ( map < string , object > data , string template , file target ) throws i o exception { if ( this engine adapter handles file ( template ) ) { / / only pass files with valid endings through template engine string template content = this engine adapter compile template ( this , data , template ) ; return write to file ( target get path ( ) , template content ) ; } else { / / do a straight copy of the file if not listed as supported by the template engine input stream is ; try { / / look up the file using the same template resolution logic the adapters would use string full template path = get full template file ( template ) ; is = get input stream ( full template path ) ; } catch ( template not found exception ex ) { is = new file input stream ( paths get ( template ) to file ( ) ) ; } return write to file ( target get absolute path ( ) , i o utils to byte array ( is ) ) ; } }


returns the ' remember me ' cookie if set , otherwise return null we don ' t care about the type , only whether it ' s null

private object get remember me cookie ( web client wc ) { return wc get cookie manager ( ) get cookie ( abstract remember me services spring security remember me cookie key ) ; }


merge from another component into this component without overwriting

public void merge from ( component that ) { if ( this get artifact ( ) = = null ) { this set artifact ( that get artifact ( ) ) ; } if ( this get resource ( ) = = null ) { this set resource ( that get resource ( ) ) ; } if ( this get number of containers ( ) = = null ) { this set number of containers ( that get number of containers ( ) ) ; } if ( this get launch command ( ) = = null ) { this set launch command ( that get launch command ( ) ) ; } this get configuration ( ) merge from ( that get configuration ( ) ) ; if ( this get quicklinks ( ) = = null ) { this set quicklinks ( that get quicklinks ( ) ) ; } if ( this get run privileged container ( ) = = null ) { this set run privileged container ( that get run privileged container ( ) ) ; } if ( this get dependencies ( ) = = null ) { this set dependencies ( that get dependencies ( ) ) ; } if ( this get placement policy ( ) = = null ) { this set placement policy ( that get placement policy ( ) ) ; } if ( this get readiness check ( ) = = null ) { this set readiness check ( that get readiness check ( ) ) ; } }


see { @ link socket # is bound ( ) } calling this method does not trigger mode detection

public boolean is bound ( ) { return get socket allow unknown mode ( ) is bound ( ) ; }


determine if location corresponds to a reference destination

public boolean is reference destination ( ) { return reference class ! = null ; }


public int get socket timeout ( ) { return socket timeout ; }


public boolean delete ( ) throws i o exception , interrupted exception { act ( new delete ( ) ) ; return true ; }


validates that milliseconds from { @ code instant } can be retrieved

public static long validate millisecond instant ( final instant instant , final string message prefix ) { try { if ( instant = = null ) { throw new illegal argument exception ( message prefix + validate millisecond null suffix ) ; } return instant to epoch milli ( ) ; } catch ( final arithmetic exception e ) { throw new illegal argument exception ( message prefix + validate millisecond overflow suffix , e ) ; } }


returns { @ link cc toolchain variables } instance with build variables that only depend on the toolchain

static cc toolchain variables get build variables ( build options build options , cpp configuration cpp configuration , path fragment sysroot , additional build variables computer additional build variables computer ) { cc toolchain variables builder variables = cc toolchain variables builder ( ) ; string min os version = cpp configuration get minimum os version ( ) ; if ( min os version ! = null ) { variables add string variable ( cc common minimum os version variable name , min os version ) ; } if ( sysroot ! = null ) { variables add string variable ( cc common sysroot variable name , sysroot get path string ( ) ) ; } variables add all non transitive ( additional build variables computer apply ( build options ) ) ; return variables build ( ) ; }


retrieve all attributes of all annotations of the given type , if any ( i e if defined on the underlying element , as direct annotation or meta - annotation ) note that this variant does not take attribute overrides into account

default multi value map < string , object > get all annotation attributes ( string annotation name , boolean class values as string ) { adapt [ ] adaptations = adapt values ( class values as string , true ) ; return get annotations ( ) stream ( annotation name ) filter ( merged annotation predicates unique ( merged annotation : : get meta types ) ) map ( merged annotation : : with non merged attributes ) collect ( merged annotation collectors to multi value map ( map - > map is empty ( ) ? null : map , adaptations ) ) ; }


inform the parser of user - defined types

private void add user identifiers ( job conf job ) throws i o exception { pattern x = pattern compile ( " ^ mapred \ \ join \ \ define \ \ ( \ \ w + ) $ " ) ; for ( map entry < string , string > kv : job ) { matcher m = x matcher ( kv get key ( ) ) ; if ( m matches ( ) ) { try { parser c node add identifier ( m group ( 1 ) , job get class ( m group ( 0 ) , null , composable record reader class ) ) ; } catch ( no such method exception e ) { throw ( i o exception ) new i o exception ( " invalid define for " + m group ( 1 ) ) init cause ( e ) ; } } } }


reverses the elements of { @ code array } between { @ code from index } inclusive and { @ code to index } exclusive this is equivalent to { @ code collections reverse ( doubles as list ( array ) sub list ( from index , to index ) ) } , but is likely to be more efficient

public static void reverse ( double [ ] array , int from index , int to index ) { check not null ( array ) ; check position indexes ( from index , to index , array length ) ; for ( int i = from index , j = to index - 1 ; i < j ; i + + , j - - ) { double tmp = array [ i ] ; array [ i ] = array [ j ] ; array [ j ] = tmp ; } }


increments the index by count does no testing for whether the index surpasses the length of the string also does internal processing for creating a genericized string

public void increment ( int count ) { while ( count - - > 0 ) { char c = super get and increment ( ) ; genericized string append ( c ) ; } }


returns < code > true < code > if the index has a custom data path

public boolean has custom data path ( ) { return strings is not empty ( custom data path ( ) ) ; }


parse the relocations and line number information for this section

void parse ( binary reader reader , coff file header header , task monitor monitor ) throws i o exception { long orig index = reader get pointer index ( ) ; try { parse relocations ( reader , header , monitor ) ; parse line numbers ( reader , monitor ) ; } finally { reader set pointer index ( orig index ) ; } }


save the success data to the { @ code success } file

public void create success marker ( path output path , success data success data , boolean add metrics ) throws i o exception { preconditions check argument ( output path ! = null , " null output path " ) ; if ( add metrics ) { add file system statistics ( success data get metrics ( ) ) ; } / / add any diagnostics configuration conf = fs get conf ( ) ; success data add diagnostic ( s3 metadata store impl , conf get trimmed ( s3 metadata store impl , " " ) ) ; success data add diagnostic ( metadatastore authoritative , conf get trimmed ( metadatastore authoritative , " false " ) ) ; success data add diagnostic ( authoritative path , conf get trimmed ( authoritative path , " " ) ) ; success data add diagnostic ( magic committer enabled , conf get trimmed ( magic committer enabled , " false " ) ) ; / / now write path marker path = new path ( output path , success ) ; log debug ( " touching success marker for job { } : { } " , marker path , success data ) ; try ( duration info ignored = new duration info ( log , " writing success file % s " , marker path ) ) { success data save ( fs , marker path , true ) ; } }


return the source of the resolver ( used for hash code and equals )


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


use xml pull parser to parse the litepal xml file it will store the result in the instance of lite pal attr note while analyzing litepal xml file , parse configuration file exception could be thrown be careful of writing litepal xml file , or developer ' s application may be crash

private lite pal config use pull parse ( ) { try { lite pal config lite pal config = new lite pal config ( ) ; xml pull parser factory factory = xml pull parser factory new instance ( ) ; xml pull parser xml pull parser = factory new pull parser ( ) ; xml pull parser set input ( get config input stream ( ) , " utf - 8 " ) ; int event type = xml pull parser get event type ( ) ; while ( event type ! = xml pull parser end document ) { string node name = xml pull parser get name ( ) ; switch ( event type ) { case xml pull parser start tag : { if ( node db name equals ( node name ) ) { string db name = xml pull parser get attribute value ( " " , attr value ) ; lite pal config set db name ( db name ) ; } else if ( node version equals ( node name ) ) { string version = xml pull parser get attribute value ( " " , attr value ) ; lite pal config set version ( integer parse int ( version ) ) ; } else if ( node mapping equals ( node name ) ) { string class name = xml pull parser get attribute value ( " " , attr class ) ; lite pal config add class name ( class name ) ; } else if ( node cases equals ( node name ) ) { string cases = xml pull parser get attribute value ( " " , attr value ) ; lite pal config set cases ( cases ) ; } else if ( node storage equals ( node name ) ) { string storage = xml pull parser get attribute value ( " " , attr value ) ; lite pal config set storage ( storage ) ; } break ; } default : break ; } event type = xml pull parser next ( ) ; } return lite pal config ; } catch ( xml pull parser exception e ) { throw new parse configuration file exception ( parse configuration file exception file format is not correct ) ; } catch ( i o exception e ) { throw new parse configuration file exception ( parse configuration file exception io exception ) ; } }


sets the color of the text to be displayed

public void set text color ( int text color ) { this text color = text color ; set color filter ( text color , porter duff mode src in ) ; invalidate self ( ) ; }


public builder add output ( string arch , output type output type , artifact artifact ) { outputs by arch compute if absent ( arch , k - > new hash map < string , artifact > ( ) ) ; outputs by arch get ( arch ) put ( output type to string ( ) , artifact ) ; return this ; }


convert secret to bytes honoring { @ link registered service property registered service properties # token secrets are base64 encoded } config parameter

private static byte [ ] get secret bytes ( final string secret , final boolean secret is base 6 4 encoded ) { return secret is base 6 4 encoded ? new base 6 4 ( secret ) decode ( ) : secret get bytes ( utf 8 ) ; }


public string get message ( ) { return message ; }


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

public test field prop child view model on unbind ( on model unbound listener < test field prop child view model , test field prop child view > listener ) { on mutation ( ) ; this on model unbound listener epoxy generated model = listener ; return this ; }


writes all the remaining floats of the { @ code src } float buffer to this buffer ' s current position , and increases both buffers ' position by the number of floats copied

public float buffer put ( float buffer src ) { if ( src = = this ) { throw new illegal argument exception ( ) ; } if ( src remaining ( ) > remaining ( ) ) { throw new buffer overflow exception ( ) ; } float [ ] contents = new float [ src remaining ( ) ] ; src get ( contents ) ; put ( contents ) ; return this ; }


async observable and semaphore isolation with functioning request context use hystrix context scheduler to make the user provided scheduler capture context

public void test graceful failure request context with thread isolated asynchronous observable and captured context scheduler ( ) { request context test results results = test request context on graceful failure ( execution isolation strategy thread , new hystrix context scheduler ( schedulers new thread ( ) ) ) ; assert true ( results is context initialized get ( ) ) ; / / the user scheduler captures context assert true ( results origin thread get ( ) get name ( ) starts with ( " rx new thread " ) ) ; / / the user provided thread / scheduler assert true ( results is context initialized observe on get ( ) ) ; / / the user scheduler captures context assert true ( results observe on thread get ( ) get name ( ) starts with ( " rx new thread " ) ) ; / / thread isolated assert true ( results command is executed in thread ( ) ) ; }


specify a factory method name that refers to an overloaded method

public void set non unique factory method name ( string name ) { assert has text ( name , " factory method name must not be empty " ) ; set factory method name ( name ) ; this is factory method unique = false ; }


public object get ( string group , string sub key ) { if ( string utils is blank ( sub key ) ) { return meta data map get ( group ) ; } else { if ( meta data map contains key ( group ) ) { return meta data map get ( group ) get ( sub key ) ; } return null ; } }


return whether this program selection is equal to obj

public boolean equals ( object obj ) { if ( obj = = null ) { return false ; } if ( this = = obj ) { return true ; } if ( get class ( ) ! = obj get class ( ) ) { return false ; } program selection ps = ( program selection ) obj ; if ( interior selection ! = null ) { return interior selection equals ( ps interior selection ) ; } return address set has same addresses ( ps address set ) ; }


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


query all configuration information by page

page < config info base > find all config info base ( final int page no , final int page size ) ;


convert an array of file status to an array of path

public static path [ ] stat 2 paths ( file status [ ] stats ) { if ( stats = = null ) return null ; path [ ] ret = new path [ stats length ] ; for ( int i = 0 ; i < stats length ; + + i ) { ret [ i ] = stats [ i ] get path ( ) ; } return ret ; }


public long add cache directive ( cache directive info info , enum set < cache flag > flags ) throws i o exception { statistics increment write ops ( 1 ) ; storage statistics increment op counter ( op type add cache directive ) ; preconditions check not null ( info get path ( ) ) ; path path = new path ( get path name ( fix relative part ( info get path ( ) ) ) ) make qualified ( get uri ( ) , get working directory ( ) ) ; return dfs add cache directive ( new cache directive info builder ( info ) set path ( path ) build ( ) , flags ) ; }


variant of { @ link # set accept language ( list ) } using { @ link locale } ' s

public void set accept language as locales ( list < locale > locales ) { set accept language ( locales stream ( ) map ( locale - > new locale language range ( locale to language tag ( ) ) ) collect ( collectors to list ( ) ) ) ; }


returns the number of fields used in the match

private int find locations ( int field index ) { listing field field = ( listing field ) current layout get field ( field index ) ; field factory ff = field get field factory ( ) ; string field name = ff get field name ( ) ; if ( ! do search field ( field name ) ) { return 0 ; } int field count = 1 ; / / we always match on one field , unless it is the mnemonic / operand combo / / if field is the mnemonic , and instructions or data are / / being searched , get the next field as well boolean is mnemonic = field name equals ( mnemonic field factory field name ) ; boolean is instructions or data = options search all fields ( ) | | options search both data mnemonics and operands ( ) | | options search both instruction mnemonic and operands ( ) ; if ( is mnemonic & & is instructions or data ) { if ( current field index < = current layout get num fields ( ) - 2 ) { listing field op field = ( listing field ) current layout get field ( field index + 1 ) ; find mnemonic operand locations ( field , op field ) ; field count = 2 ; / / if we match here , then signal that we matched across two fields } else { find locations ( field ) ; } } else { find locations ( field ) ; } if ( location list size ( ) > 0 ) { / / we found a match ! return field count ; } return 0 ; }


iterate over the records in ascending sorted order sorting occurs on the primary key value starting at the specified start key

public record iterator iterator ( field min key , field max key , field start key ) throws i o exception { synchronized ( db ) { if ( schema use long key nodes ( ) ) { long min = min key ! = null ? min key get long value ( ) : long min value ; long max = max key ! = null ? max key get long value ( ) : long max value ; long start = start key ! = null ? start key get long value ( ) : min ; return new long key record iterator ( min , max , start ) ; } return new field key record iterator ( min key , max key , start key ) ; } }


get the { @ code n } th entry in the constant pool , which must be valid unless { @ code n = = 0 } , in which case { @ code null } is returned


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


create random { @ link direct candidate generator builder }

public static direct candidate generator builder random candidate generator ( ) { direct candidate generator builder generator = new direct candidate generator builder ( random alpha of length ( 10 ) ) ; maybe set ( generator : : accuracy , random float ( ) ) ; maybe set ( generator : : max edits , random int between ( 1 , 2 ) ) ; maybe set ( generator : : max inspections , random int between ( 1 , 20 ) ) ; maybe set ( generator : : max term freq , random float ( ) ) ; maybe set ( generator : : min doc freq , random float ( ) ) ; maybe set ( generator : : min word length , random int between ( 1 , 20 ) ) ; maybe set ( generator : : prefix length , random int between ( 1 , 20 ) ) ; maybe set ( generator : : pre filter , random alpha of length between ( 1 , 20 ) ) ; maybe set ( generator : : post filter , random alpha of length between ( 1 , 20 ) ) ; maybe set ( generator : : size , random int between ( 1 , 20 ) ) ; maybe set ( generator : : sort , random from ( " score " , " frequency " ) ) ; maybe set ( generator : : string distance , random from ( " internal " , " damerau levenshtein " , " levenshtein " , " jaro winkler " , " ngram " ) ) ; maybe set ( generator : : suggest mode , random from ( " missing " , " popular " , " always " ) ) ; return generator ; }


remove an action note : calls to { @ link # get all actions ( ) } that happen before calls to this method may not see the update note : this method does not affect transient actions contributed by a { @ link transient action factory } note : this method cannot provide concurrency control due to the backing storage being a { @ link copy on write array list } so concurrent calls to any of the mutation methods may produce surprising results though technically consistent from the concurrency contract of { @ link copy on write array list } ( we would need some form of transactions or a different backing type )

public boolean remove action ( @ nullable action a ) { if ( a = = null ) { return false ; } / / copy on write array list does not support iterator remove , so need to do it this way : return get actions ( ) remove all ( collections singleton ( a ) ) ; }


sleeps until the given time has elapsed throws assertion failed error if interrupted

void sleep ( long millis ) { try { delay ( millis ) ; } catch ( interrupted exception ie ) { assertion failed error afe = new assertion failed error ( " unexpected interrupted exception " ) ; afe init cause ( ie ) ; throw afe ; } }


callback from reference manager when a new fall - through reference is set

public void fall through changed ( address from addr , reference new fall through ref ) { lock acquire ( ) ; try { instruction d b instr = get instruction at ( addr map get key ( from addr , false ) ) ; / / todo : should prevent this if instruction is null or is in delay slot if ( instr ! = null ) { instr fall through changed ( new fall through ref ) ; } } finally { lock release ( ) ; } }


handle the case where the result set does not contain a row

protected void handle no row found ( ) throws data access exception { throw new empty result data access exception ( " lob streaming result set extractor did not find row in database " , 1 ) ; }


updates ssl context via the passed callback

public synchronized void update ssl context ( final ssl context provider callback callback ) { check not null ( callback , " callback " ) ; check state ( ! shutdown , " supplier is shutdown ! " ) ; if ( ssl context provider = = null ) { ssl context provider = tls context manager find or create client ssl context provider ( upstream tls context ) ; } / / we want to increment the ref - count so call find or create again final ssl context provider to release = tls context manager find or create client ssl context provider ( upstream tls context ) ; ssl context provider add callback ( new ssl context provider callback ( callback get executor ( ) ) { @ override public void update secret ( ssl context ssl context ) { callback update secret ( ssl context ) ; tls context manager release client ssl context provider ( to release ) ; } @ override public void on exception ( throwable throwable ) { callback on exception ( throwable ) ; tls context manager release client ssl context provider ( to release ) ; } } ) ; }


public static cyclic barrier cyclic barrier ( int count ) { return new cyclic barrier ( count ) ; }


get the current date interval that is set on this builder

public date histogram interval date histogram interval ( ) { return date histogram interval date histogram interval ( ) ; }


let the next bulk request fail completely with the provided throwable if this is set , the failures list provided with set mock item failures list for next bulk item responses is not respected

public void set fail next bulk request completely ( throwable failure ) { this next bulk failure = failure ; }


verifies that { @ code key } and { @ code value } are non - null , and returns a new immutable entry with those values a call to { @ link entry # set value } on the returned entry will always throw { @ link unsupported operation exception }

static < k , v > entry < k , v > entry of ( k key , v value ) { check entry not null ( key , value ) ; return new abstract map simple immutable entry < > ( key , value ) ; }


public static void async http post ( string url , list < string > headers , map < string , string > param values , callback < string > callback ) throws exception { async http request ( url , headers , param values , callback , http method post ) ; }


test code generation for any type here the & # 39 ; type & # 39 ; attribute is not specified , which means the value can be anything , including the null value , string , number , boolean , array or object the & # 39 ; nullable & # 39 ; attribute does not change the allowed values

public object get any type prop nullable ( ) { return any type prop nullable or else ( null ) ; }


returns a ghidra { @ link data type datatype } that corresponds to a type that can be used to represent an offset

public data type get offset type ( int size ) { return find matching data type by size ( base data type untyped , size ) ; }


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

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


public field list get fields ( ) { parse to end if necessary ( ) ; return fields ; }


verify that the contents on disk for the given index is deleted ; if not , delete the contents this method assumes that an index is already deleted in the cluster state andor explicitly through index tombstones

public index metadata verify index is deleted ( final index index , final cluster state cluster state ) { / / this method should only be called when we know the index ( name + uuid ) is not part of the cluster state if ( cluster state metadata ( ) index ( index ) ! = null ) { throw new illegal state exception ( " cannot delete index [ " + index + " ] , it is still part of the cluster state " ) ; } if ( node env has node file ( ) & & file system utils exists ( node env index paths ( index ) ) ) { final index metadata metadata ; try { metadata = meta state service load index state ( index ) ; if ( metadata = = null ) { return null ; } } catch ( exception e ) { logger warn ( ( ) - > new parameterized message ( " [ { } ] failed to load state file from a stale deleted index , " + " folders will be left on disk " , index ) , e ) ; return null ; } final index settings index settings = build index settings ( metadata ) ; try { delete index store if deletion allowed ( " stale deleted index " , index , index settings , always true ) ; } catch ( exception e ) { / / we just warn about the exception here because if delete index store if deletion allowed / / throws an exception , it gets added to the list of pending deletes to be tried again logger warn ( ( ) - > new parameterized message ( " [ { } ] failed to delete index on disk " , metadata get index ( ) ) , e ) ; } return metadata ; } return null ; }


bind the parameters of the given request to this binder ' s target , also binding multipart files in case of a multipart request this call can create field errors , representing basic binding errors like a required field ( code " required " ) , or type mismatch between value and bean property ( code " type mismatch " ) multipart files are bound via their parameter name , just like normal http parameters : i e " uploaded file " to an " uploaded file " bean property , invoking a " set uploaded file " setter method the type of the target property for a multipart file can be multipart file , byte [ ] , or string the latter two receive the contents of the uploaded file ; all metadata like original file name , content type , etc are lost in those cases

public void bind ( servlet request request ) { mutable property values mpvs = new servlet request parameter property values ( request ) ; multipart request multipart request = web utils get native request ( request , multipart request class ) ; if ( multipart request ! = null ) { bind multipart ( multipart request get multi file map ( ) , mpvs ) ; } else if ( string utils starts with ignore case ( request get content type ( ) , " multipart / " ) ) { http servlet request http servlet request = web utils get native request ( request , http servlet request class ) ; if ( http servlet request ! = null ) { standard servlet part utils bind parts ( http servlet request , mpvs , is bind empty multipart files ( ) ) ; } } add bind values ( mpvs , request ) ; do bind ( mpvs ) ; }


public synchronized t from json ( string json ) throws i o exception , json parse exception , json mapping exception { if ( json is empty ( ) ) { throw new e o f exception ( " no data " ) ; } try { return mapper read value ( json , class type ) ; } catch ( i o exception e ) { log error ( " exception while parsing json : { } \ n { } " , e , json , e ) ; throw e ; } }


removes the label or alias that the cursor is over from the current label field if an exception is caught during the removal of the label or alias , a message is written to the status area

protected void remove label callback ( listing action context context ) { symbol s = get symbol ( context ) ; if ( s ! = null ) { command cmd = new delete label cmd ( s get address ( ) , s get name ( ) , s get parent namespace ( ) ) ; if ( ! tool execute ( cmd , context get program ( ) ) ) { tool set status info ( cmd get status msg ( ) ) ; } } }


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


public string [ ] get http methods ( ) { return this http methods ; }


resource definitions corresponding to an android package < code > repeated aapt pb package package = 2 ; < code >

public java util list < com android aapt resources package > get package list ( ) { return java util collections unmodifiable list ( instance get package list ( ) ) ; }


abstract template method for marshalling the given object graph to a sax { @ code content handler }

protected abstract void marshal sax handlers ( object graph , content handler content handler , @ nullable lexical handler lexical handler ) throws xml mapping exception ;


public int get connect timeout ( ) { return connection timeout ; }


returns the hostname of the syslog server

public string get host ( ) { return host ; }


create a builder that is initialized with the given path

public static uri components builder from path ( string path ) { uri components builder builder = new uri components builder ( ) ; builder path ( path ) ; return builder ; }


returns a copy of the configured options which will be used for the child channels

public map < channel option < ? > , object > child options ( ) { return bootstrap child options ( ) ; }


determines whether a { @ link path data } item is recursable default implementation is to recurse directories but can be overridden to recurse through symbolic links

protected boolean is path recursable ( path data item ) throws i o exception { return item stat is directory ( ) ; }


set owner of a path ( i e a file or a directory ) the parameters owner and group cannot both be null

public void set owner ( final path path , final string owner , final string group ) throws i o exception { log debug ( " azure blob file system set owner path : { } " , path ) ; if ( ! get is namespace enabled ( ) ) { super set owner ( path , owner , group ) ; return ; } if ( ( owner = = null | | owner is empty ( ) ) & & ( group = = null | | group is empty ( ) ) ) { throw new illegal argument exception ( " a valid owner or group must be specified " ) ; } path qualified path = make qualified ( path ) ; try { abfs store set owner ( qualified path , owner , group ) ; } catch ( azure blob file system exception ex ) { check exception ( path , ex ) ; } }


private byte buffer get buffer ( ) { byte buffer buffer = buffer pool poll ( ) ; if ( buffer = = null ) { buffer = byte buffer allocate direct ( buffer size ) ; } return buffer ; }


get the style used to render the given symbol

public int get style ( symbol s ) { return get style ( get screen element ( s ) ) ; }


override this method to specialize the type of { @ link sequence file reader } returned

protected sequence file reader create data file reader ( path data file , configuration conf , sequence file reader option options ) throws i o exception { sequence file reader option [ ] new options = options prepend options ( options , sequence file reader file ( data file ) ) ; return new sequence file reader ( conf , new options ) ; }


get { @ link entry type } of this wrapper

public entry type get entry type ( ) { return entry type ; }


com netflix hystrix hystrix command < response entity < void > > delete pet ( @ api param ( value = " pet id to delete " , required = true ) @ path variable ( " pet id " ) long pet id , @ api param ( value = " " ) @ request header ( value = " api key " , required = false ) string api key ) ;


set whether or not file extensions should be stripped from the uri when generating the view name default is " true "

public void set strip extension ( boolean strip extension ) { this strip extension = strip extension ; }


can be used to check a checkbox by default used from views like { @ code h default to true ( scm use update ) } the expression will evaluate to true if scm is null

public static boolean default to true ( boolean b ) { if ( b = = null ) return true ; return b ; }


set the sleep state of the body a sleeping body has very low cpu cost

public void set awake ( boolean flag ) { jni set awake ( addr , flag ) ; }


public void test multidimenstional arrays serialization ( ) { string [ ] [ ] items = new string [ ] [ ] { { " 3m co " , " 71 72 " , " 0 02 " , " 0 03 " , " 4 / 2 12 : 0 0am " , " manufacturing " } , { " alcoa inc " , " 29 01 " , " 0 42 " , " 1 47 " , " 4 / 1 12 : 0 0am " , " manufacturing " } } ; string json = gson to json ( items ) ; assert true ( json contains ( " [ [ \ " 3m co " ) ) ; assert true ( json contains ( " manufacturing \ " ] ] " ) ) ; }


remembers to place the given instruction right after the instruction at the given offset

public void insert after instruction ( int instruction offset , instruction instruction ) { if ( instruction offset < 0 | | instruction offset > = code length ) { throw new illegal argument exception ( " invalid instruction offset [ " + instruction offset + " ] in code with length [ " + code length + " ] " ) ; } post insertions [ instruction offset ] = shrink instructions ? instruction shrink ( ) : instruction ; modified = true ; simple = false ; }


maps different exceptions thrown by http f s server to http status codes security exception : http unauthorized file not found exception : http not found i o exception : internal http server error unsupporte operation exception : http bad request all other exceptions : http internal server error

public response to response ( throwable throwable ) { response status status ; if ( throwable instanceof file system access exception ) { throwable = throwable get cause ( ) ; } if ( throwable instanceof container exception ) { throwable = throwable get cause ( ) ; } if ( throwable instanceof security exception ) { status = response status unauthorized ; } else if ( throwable instanceof file not found exception ) { status = response status not found ; } else if ( throwable instanceof i o exception ) { status = response status internal server error ; log error fully ( status , throwable ) ; } else if ( throwable instanceof unsupported operation exception ) { status = response status bad request ; log error fully ( status , throwable ) ; } else if ( throwable instanceof illegal argument exception ) { status = response status bad request ; log error fully ( status , throwable ) ; } else { status = response status internal server error ; log error fully ( status , throwable ) ; } return create response ( status , throwable ) ; }


add a specific provider with a given value

public < t extends transitive info provider > rule configured target builder add ( class < t > key , t value ) { return add provider ( key , value ) ; }


indicate if the touch position is at the adview

protected boolean is on ad view ( int pos ) { final int zero for admob selection = ( pos + 1 ) % adfrequency ; return zero for admob selection = = 0 ; }


# # # # # # # # # # # # color getting related methods # # # # # # # # # # #

public list < integer > get colors ( ) { return m colors ; }


you may not overwrite an item you know is there even if you cannot see it

@ test public void overwrite known target ( ) throws exception { cannot overwrite ( " known " ) ; }


{ @ inherit doc } this implementation is guaranteed to throw an { @ link unsupported operation exception }

public final entry < e > poll last entry ( ) { throw new unsupported operation exception ( ) ; }


public static object get field value ( final object object , final field field ) { if ( null = = object | | null = = field ) { return null ; } field set accessible ( true ) ; object result = null ; try { result = field get ( object ) ; } catch ( illegal access exception ignored ) { } return result ; }


returns the labels of all starlark options that caused a difference between the first and second options set

public set < label > get changed starlark options ( ) { return immutable set < label > builder ( ) add all ( starlark first key set ( ) ) add all ( starlark second key set ( ) ) add all ( extra starlark options first ) add all ( extra starlark options second key set ( ) ) build ( ) ; }


public boolean is read ( ) { return false ; }


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

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


set static attributes as a csv string format is : attname 0 = { value 1 } , attname 1 = { value 1 } " static " attributes are fixed attributes that are specified in the view instance configuration " dynamic " attributes , on the other hand , are values passed in as part of the model

public void set attributes c s v ( @ nullable string prop string ) throws illegal argument exception { if ( prop string ! = null ) { string tokenizer st = new string tokenizer ( prop string , " , " ) ; while ( st has more tokens ( ) ) { string tok = st next token ( ) ; int eq idx = tok index of ( ' = ' ) ; if ( eq idx = = - 1 ) { throw new illegal argument exception ( " expected ' = ' in attributes csv string ' " + prop string + " ' " ) ; } if ( eq idx > = tok length ( ) - 2 ) { throw new illegal argument exception ( " at least 2 characters ( [ ] ) required in attributes csv string ' " + prop string + " ' " ) ; } string name = tok substring ( 0 , eq idx ) ; / / delete first and last characters of value : { and } int begin index = eq idx + 2 ; int end index = tok length ( ) - 1 ; string value = tok substring ( begin index , end index ) ; add static attribute ( name , value ) ; } } }


the locality associated with the endpoint a locality corresponds to a failure domain ( e g , countryregionzone ) arbitrary failure domain hierarchies can be represented by separating each encapsulating failure domain by for example , the locality of an an endpoint in us , in us - east - 1 region , within availability zone az - 1 , in data center rack r 1 1 can be represented as usus - east - 1az - 1r 1 1 istio will configure the sidecar to route to endpoints within the same locality as the sidecar if none of the endpoints in the locality are available , endpoints parent locality ( but within the same network id ) will be chosen for example , if there are two endpoints in same network ( network i d " n 1 " ) , say e 1 with locality usus - east - 1az - 1r 1 1 and e 2 with locality usus - east - 1az - 2r 1 2 , a sidecar from usus - east - 1az - 1r 1 1 locality will prefer e 1 from the same locality over e 2 from a different locality endpoint e 2 could be the ip associated with a gateway ( that bridges networks n 1 and n 2 ) , or the ip associated with a standard service endpoint < code > string locality = 5 ; < code >

public com google protobuf byte string get locality bytes ( ) { java lang object ref = locality ; if ( ref instanceof java lang string ) { com google protobuf byte string b = com google protobuf byte string copy from utf 8 ( ( java lang string ) ref ) ; locality = b ; return b ; } else { return ( com google protobuf byte string ) ref ; } }


test that a configuration with no service information fails

public void test h a conf without service info ( ) { configuration conf = new configuration ( configuration ) ; conf set boolean ( yarn configuration rm ha enabled , true ) ; conf set boolean ( yarn configuration auto failover enabled , true ) ; conf set boolean ( yarn configuration auto failover embedded , true ) ; conf set ( yarn configuration rm ha ids , " rm 1 , rm 2 " ) ; conf set ( yarn configuration rm ha id , " rm 1 " ) ; check bad configuration ( conf ) ; }


gets the commit data from { @ link index writer } as a map

private static map < string , string > commit data as map ( final index writer index writer ) { final map < string , string > commit data = new hash map < > ( 8 ) ; for ( map entry < string , string > entry : index writer get live commit data ( ) ) { commit data put ( entry get key ( ) , entry get value ( ) ) ; } return commit data ; }


public char peek char ( ) { return ( char ) ( ( data [ position ] & 0x f f ) < < 8 | ( data [ position + 1 ] & 0x f f ) ) ; }


returns file id associated with original buffer file

long get original file i d ( ) { return original file id ; }


returns true if the edges in this network are directed directed edges connect a { @ link endpoint pair # source ( ) source node } to a { @ link endpoint pair # target ( ) target node } , while undirected edges connect a pair of nodes to each other


whether we ' re ignoring timing rules for features

public static boolean is demo mode ( ) { return demo mode ; }


compute an id that has the format : { state uuid } : { node id | | ' na ' } : { index } : { shard } : { ' p ' | | ' r ' }

public static string id ( string state u u i d , shard routing shard routing ) { string builder builder = new string builder ( ) ; builder append ( state u u i d ) ; builder append ( ' : ' ) ; if ( shard routing assigned to node ( ) ) { builder append ( shard routing current node id ( ) ) ; } else { builder append ( " na " ) ; } builder append ( ' : ' ) ; builder append ( shard routing get index name ( ) ) ; builder append ( ' : ' ) ; builder append ( integer value of ( shard routing id ( ) ) ) ; builder append ( ' : ' ) ; if ( shard routing primary ( ) ) { builder append ( " p " ) ; } else { builder append ( " r " ) ; } return builder to string ( ) ; }


helper methods that tests for a variety of { @ link mono } decoding scenarios this methods invokes : { @ link # test decode to mono ( publisher , resolvable type , consumer , mime type , map ) } { @ link # test decode to mono error ( publisher , resolvable type , mime type , map ) } { @ link # test decode to mono cancel ( publisher , resolvable type , mime type , map ) } { @ link # test decode to mono empty ( resolvable type , mime type , map ) }

protected < t > void test decode to mono all ( publisher < data buffer > input , class < ? extends t > output class , consumer < step verifier first step < t > > step consumer ) { test decode to mono all ( input , resolvable type for class ( output class ) , step consumer , null , null ) ; }


remove all values for the given key without returning them this is a minor performance optimization if you do not need the previous values

public < t > void discard all ( key < t > key ) { if ( is empty ( ) ) { return ; } int write idx = 0 ; int read idx = 0 ; for ( ; read idx < size ; read idx + + ) { if ( bytes equal ( key ascii name ( ) , name ( read idx ) ) ) { continue ; } name ( write idx , name ( read idx ) ) ; value ( write idx , value ( read idx ) ) ; write idx + + ; } int new size = write idx ; / / multiply by two since names and values is interleaved arrays fill ( names and values , write idx * 2 , len ( ) , null ) ; size = new size ; }


explain the lifecycle state for an index see https : www elastic coguideenelasticsearchclientjava - restcurrent java - rest - high - ilm - ilm - explain - lifecycle html for more

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


this method ignores signs of the left and right returns overflow value

private static long add unsigned return overflow ( slice left , slice right , slice result , boolean result negative ) { / / todo : consider two 7 bytes operations int l 0 = get int ( left , 0 ) ; int l 1 = get int ( left , 1 ) ; int l 2 = get int ( left , 2 ) ; int l 3 = get int ( left , 3 ) ; int r 0 = get int ( right , 0 ) ; int r 1 = get int ( right , 1 ) ; int r 2 = get int ( right , 2 ) ; int r 3 = get int ( right , 3 ) ; long intermediate result ; intermediate result = ( l 0 & long mask ) + ( r 0 & long mask ) ; int z 0 = ( int ) intermediate result ; intermediate result = ( l 1 & long mask ) + ( r 1 & long mask ) + ( intermediate result > > > 32 ) ; int z 1 = ( int ) intermediate result ; intermediate result = ( l 2 & long mask ) + ( r 2 & long mask ) + ( intermediate result > > > 32 ) ; int z 2 = ( int ) intermediate result ; intermediate result = ( l 3 & long mask ) + ( r 3 & long mask ) + ( intermediate result > > > 32 ) ; int z 3 = ( int ) intermediate result & ( ~ sign int mask ) ; pack ( result , z 0 , z 1 , z 2 , z 3 , result negative ) ; return intermediate result > > 31 ; }


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


constructs a class visitor to efficiently travel to the specified class members

private static class visitor create class visitor ( class specification class specification , member visitor member visitor ) { multi class visitor multi class visitor = new multi class visitor ( ) ; add member visitors ( class specification field specifications , true , multi class visitor , member visitor ) ; add member visitors ( class specification method specifications , false , multi class visitor , member visitor ) ; / / mark the class member in this class and in super classes return new class hierarchy traveler ( true , true , false , false , multi class visitor ) ; }


set the active animation , replacing any current animation

public animation desc set animation ( final string id , int loop count , final animation listener listener ) { return set animation ( id , loop count , 1 0f , listener ) ; }


verify that adding padding bytes won ' t violate boundaries or allow defined data or instructions to be overwritten

private int get valid pad length ( program program , address string end address , int pad length ) { listing listing = program get listing ( ) ; address address = string end address ; for ( int i = 0 ; i < pad length ; i + + ) { address = address next ( ) ; if ( address = = null ) { return 0 ; } code unit cu = listing get code unit containing ( address ) ; if ( cu = = null ) { return 0 ; / / null implies there cannot be data here } if ( ! ( cu instanceof data ) | | ( ( data ) cu ) is defined ( ) ) { return 0 ; } } return pad length ; }


get properties map for the cluster - side after removal of some keys

private map < string , string > get cluster side properties map ( configuration flink config ) { final configuration cluster side config = flink config clone ( ) ; / / remove some configuration options that should not be taken to cluster side cluster side config remove config ( kubernetes config options kube config file ) ; cluster side config remove config ( deployment options internal conf dir ) ; return cluster side config to map ( ) ; }


the exception to be used when a failure is triggered

public throwable failure exception ( ) { return failure exception ; }


returns a distinct set of a { @ link data set } if the input is a { @ link org apache flink api common typeutils composite type } ( tuple or pojo type ) , distinct is performed on all fields and each field must be a key type


load an instance from a file , then validate it

public static success data load ( file system fs , path path ) throws i o exception { log debug ( " reading success data from { } " , path ) ; success data instance = serializer ( ) load ( fs , path ) ; instance validate ( ) ; return instance ; }


set the value of the { @ literal creation - date } parameter

builder creation date ( zoned date time creation date ) ;


indicates whether this condition is empty , i e whether or not it contains any discrete items

public boolean is empty ( ) { return get content ( ) is empty ( ) ; }


sets the scatter shape this data set should be drawn with this will search for an available i shape renderer and set this renderer for the data set

public void set scatter shape ( scatter chart scatter shape shape ) { m shape renderer = get renderer for shape ( shape ) ; }


set if all items opened will be closed when the user moves the list view

public void set swipe close all items when move list ( boolean swipe close all items when move list ) { touch listener set swipe closes all items when list moves ( swipe close all items when move list ) ; }


public boolean is triggered ( ) { return triggered ; }


returns the values of a given property in qualifiers

protected list < value > find values ( list < snak group > groups , string pid ) { list < value > results = new array list < > ( ) ; for ( snak group group : groups ) { if ( group get property ( ) get id ( ) equals ( pid ) ) { for ( snak snak : group get snaks ( ) ) results add ( snak get value ( ) ) ; } } return results ; }


returns a shift count that is used to align the logical sector < br > this count is log 2 of the segment sector size this value corresponds to the alignment [ a ] linker switch it is typically 4 , but the default is 9 when the linker command line contains a : 16 , the shift count is 4 when the linker command line contains a : 256 , the shift count is 9

short get segment alignment shift count ( ) { return ne align ; }


compares the { @ link authentication } that was used to create the { @ link async execution id } with the current authentication

boolean ensure authenticated user is same ( authentication original , authentication current ) { final boolean same principal = original get user ( ) principal ( ) equals ( current get user ( ) principal ( ) ) ; final boolean same realm type ; if ( original get user ( ) is run as ( ) ) { if ( current get user ( ) is run as ( ) ) { same realm type = original get looked up by ( ) get type ( ) equals ( current get looked up by ( ) get type ( ) ) ; } else { same realm type = original get looked up by ( ) get type ( ) equals ( current get authenticated by ( ) get type ( ) ) ; } } else if ( current get user ( ) is run as ( ) ) { same realm type = original get authenticated by ( ) get type ( ) equals ( current get looked up by ( ) get type ( ) ) ; } else { same realm type = original get authenticated by ( ) get type ( ) equals ( current get authenticated by ( ) get type ( ) ) ; } return same principal & & same realm type ; }


add a new sink that forwards records from upstream parent processor andor source nodes to the named kafka topic , using the supplied partitioner the sink will use the { @ link streams config # default key serde class config default key serializer } and { @ link streams config # default value serde class config default value serializer } specified in the { @ link streams config stream configuration } the sink will also use the specified { @ link stream partitioner } to determine how records are distributed among the named kafka topic ' s partitions such control is often useful with topologies that use { @ link # add state store ( store builder , string ) state stores } in its processors in most other cases , however , a partitioner needs not be specified and kafka will automatically distribute records among partitions using kafka ' s default partitioning logic

public synchronized < k , v > topology add sink ( final string name , final string topic , final stream partitioner < ? super k , ? super v > partitioner , final string parent names ) { internal topology builder add sink ( name , topic , null , null , partitioner , parent names ) ; return this ; }


determine whether the underlying element has an annotation or meta - annotation of the given type defined if this method returns { @ code true } , then { @ link # get annotation attributes } will return a non - null map

default boolean is annotated ( string annotation name ) { return get annotations ( ) is present ( annotation name ) ; }


returns the paths of the files not yet processed

private map < path , file status > list eligible files ( file system file system , path path ) { final file status [ ] statuses ; try { statuses = file system list status ( path ) ; } catch ( i o exception e ) { / / we may run into an i o exception if files are moved while listing their status / / delay the check for eligible files in this case return collections empty map ( ) ; } if ( statuses = = null ) { log warn ( " path does not exist : { } " , path ) ; return collections empty map ( ) ; } else { map < path , file status > files = new hash map < > ( ) ; / / handle the new files for ( file status status : statuses ) { if ( ! status is dir ( ) ) { path file path = status get path ( ) ; long modification time = status get modification time ( ) ; if ( ! should ignore ( file path , modification time ) ) { files put ( file path , status ) ; } } else if ( format get nested file enumeration ( ) & & format accept file ( status ) ) { files put all ( list eligible files ( file system , status get path ( ) ) ) ; } } return files ; } }


updates the node ' s location in the policy ' s deque

static < k , v > void reorder ( linked deque < node < k , v > > deque , node < k , v > node ) { / / an entry may be scheduled for reordering despite having been removed this can occur when the / / entry was concurrently read while a writer was removing it if the entry is no longer linked / / then it does not need to be processed if ( deque contains ( node ) ) { deque move to back ( node ) ; } }


repository change event [ ] get events ( ) throws interrupted i o exception { repository handle handle ; synchronized ( server adapter ) { / / be careful with synchronization since get events will block / / until an event occurs if ( repository = = null ) { throw new interrupted i o exception ( ) ; } handle = repository ; } try { return handle get events ( ) ; } catch ( not connected exception | remote exception e ) { / / initiate recover - dispatcher will be restarted recover connection ( e ) ; throw new interrupted i o exception ( ) ; } catch ( i o exception e ) { synchronized ( server adapter ) { if ( ! thread current thread ( ) is interrupted ( ) ) { server adapter verify connection ( ) ; disconnect ( true , true ) ; } } throw new interrupted i o exception ( ) ; } }


replaces all non - word characters in a string by a given character the only characters not replaced are the characters that qualify as word characters or digit characters with respect to { @ link character # is letter ( char ) } or { @ link character # is digit ( char ) } , as well as the underscore character this operation is intended to simplify strings for counting distinct words

public static void replace non word chars ( string value string , char replacement ) { final char [ ] chars = string get char array ( ) ; final int len = string length ( ) ; for ( int i = 0 ; i < len ; i + + ) { final char c = chars [ i ] ; if ( ! ( character is letter ( c ) | | character is digit ( c ) | | c = = ' ' ) ) { chars [ i ] = replacement ; } } }


public script script ( ) { return script ; }