get a { @ link sequence mining params } object populated with values from the dialog

public sequence mining params get sequence mining params ( ) { string percentage string = percentage box get text ( ) ; double parsed percentage ; try { parsed percentage = double parse double ( percentage string ) ; preferences set property ( percentage property , double to string ( parsed percentage ) ) ; } catch ( number format exception e ) { parsed percentage = double parse double ( default percentage ) ; } if ( parsed percentage < = 0 0 | | parsed percentage > = 100 0 ) { parsed percentage = double parse double ( default percentage ) ; } string min fixed bits string = min fixed bits box get text ( ) ; int parsed min fixed bits ; try { parsed min fixed bits = integer parse int ( min fixed bits string ) ; preferences set property ( min fixed bits property , integer to string ( parsed min fixed bits ) ) ; } catch ( number format exception e ) { parsed min fixed bits = integer parse int ( default min fixed bits ) ; } if ( parsed min fixed bits < 0 ) { parsed min fixed bits = integer parse int ( default min fixed bits ) ; } boolean use binary = false ; if ( b group get selection ( ) get mnemonic ( ) = = binary mnemonic ) { use binary = true ; preferences set property ( binary sequences property , boolean to string ( true ) ) ; } else { preferences set property ( binary sequences property , boolean to string ( false ) ) ; } preferences store ( ) ; return new sequence mining params ( parsed percentage / 100 0 , parsed min fixed bits , use binary ) ; }


public void post handle ( http servlet request request , http servlet response response , object handler , @ nullable model and view model and view ) throws exception { }


run both client and server using the given protocol

private void test dynamic log level ( final string bind protocol , final string connect protocol , final boolean is spnego , final string new level ) throws exception { if ( ! log level is valid protocol ( bind protocol ) ) { throw new exception ( " invalid server protocol " + bind protocol ) ; } if ( ! log level is valid protocol ( connect protocol ) ) { throw new exception ( " invalid client protocol " + connect protocol ) ; } level old level = log get effective level ( ) ; assert assert not equals ( " get default log level which shouldn ' t be error " , level error , old level ) ; / / configs needed for spnego at server side if ( is spnego ) { conf set ( principal , kerberos test utils get server principal ( ) ) ; conf set ( keytab , kerberos test utils get keytab file ( ) ) ; conf set ( common configuration keys public hadoop security authentication , " kerberos " ) ; conf set ( prefix + " type " , " kerberos " ) ; conf set ( prefix + " kerberos keytab " , kerberos test utils get keytab file ( ) ) ; conf set ( prefix + " kerberos principal " , kerberos test utils get server principal ( ) ) ; conf set ( http server 2 filter initializer property , authentication filter initializer class get name ( ) ) ; conf set boolean ( common configuration keys hadoop security authorization , true ) ; user group information set configuration ( conf ) ; } final http server 2 server = create server ( bind protocol , is spnego ) ; / / get server port final string authority = net utils get host port string ( server get connector address ( 0 ) ) ; kerberos test utils do as client ( new callable < void > ( ) { @ override public void call ( ) throws exception { / / client command line get level ( connect protocol , authority ) ; set level ( connect protocol , authority , new level ) ; return null ; } } ) ; server stop ( ) ; / / restore log level generic test utils set log level ( log , old level ) ; }


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


public long get branch id ( ) { return branch id ; }


returns the glyph pages for this unicode font

public list get glyph pages ( ) { return glyph pages ; }


notifies the registry about an unregistered kv state instance

public void notify kv state unregistered ( job vertex i d job vertex id , key group range key group range , string registration name ) { kv state location location = lookup table get ( registration name ) ; if ( location ! = null ) { / / duplicate name if vertex i ds don ' t match if ( ! location get job vertex id ( ) equals ( job vertex id ) ) { throw new illegal argument exception ( " another operator ( " + location get job vertex id ( ) + " ) registered the kv state " + " under ' " + registration name + " ' " ) ; } location unregister kv state ( key group range ) ; if ( location get num registered key groups ( ) = = 0 ) { lookup table remove ( registration name ) ; } } else { throw new illegal argument exception ( " unknown registration name ' " + registration name + " ' " + " probably registration / unregistration race " ) ; } }


returns the debugging information string to be shown by the target { @ link text view }

protected string get debug string ( ) { return get player state string ( ) + get video string ( ) + get audio string ( ) ; }


normalize the path by suppressing sequences like " path " and inner simple dots the result is convenient for path comparison for other uses , notice that windows separators ( " \ " ) are replaced by simple slashes

public static string clean path ( string path ) { if ( path = = null ) { return null ; } string path to use = replace ( path , windows folder separator , folder separator ) ; / / strip prefix from path to analyze , to not treat it as part of the / / first path element this is necessary to correctly parse paths like / / " file : core / / core / io / resource class " , where the " " should just / / strip the first " core " directory while keeping the " file : " prefix int prefix index = path to use index of ( " : " ) ; string prefix = " " ; if ( prefix index ! = - 1 ) { prefix = path to use substring ( 0 , prefix index + 1 ) ; path to use = path to use substring ( prefix index + 1 ) ; } if ( path to use starts with ( folder separator ) ) { prefix = prefix + folder separator ; path to use = path to use substring ( 1 ) ; } string [ ] path array = delimited list to string array ( path to use , folder separator ) ; list < string > path elements = new linked list < > ( ) ; int tops = 0 ; for ( int i = path array length - 1 ; i > = 0 ; i - - ) { string element = path array [ i ] ; if ( current path equals ( element ) ) { / / points to current directory - drop it } else if ( top path equals ( element ) ) { / / registering top path found tops + + ; } else { if ( tops > 0 ) { / / merging path element with element corresponding to top path tops - - ; } else { / / normal path element found path elements add ( 0 , element ) ; } } } / / remaining top paths need to be retained for ( int i = 0 ; i < tops ; i + + ) { path elements add ( 0 , top path ) ; } return prefix + collection to delimited string ( path elements , folder separator ) ; }


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


current registry center configuration , to replace xml config : < prev > & lt ; dubbo : registry id = " my - registry " address = " na " & gt ; < prev >

public registry config registry config ( ) { registry config registry config = new registry config ( ) ; registry config set address ( " n / a " ) ; return registry config ; }


write the header for a compressed record set in - place ( i e assuming the compressed record data has already been written at the value offset in a wrapped record ) this lets you dynamically create a compressed message set , and then go back later and fill in its size and crc , which saves the need for copying to another buffer

public static void write compressed record header ( byte buffer buffer , byte magic , int record size , long timestamp , compression type compression type , timestamp type timestamp type ) { int record position = buffer position ( ) ; int value size = record size - record overhead ( magic ) ; / / write the record header with a null value ( the key is always null for the wrapper ) write ( buffer , magic , timestamp , null , null , compression type , timestamp type ) ; buffer position ( record position ) ; / / now fill in the value size buffer put int ( record position + key offset ( magic ) , value size ) ; / / compute and fill the crc from the beginning of the message long crc = crc 3 2 crc 3 2 ( buffer , magic offset , record size - magic offset ) ; byte utils write unsigned int ( buffer , record position + crc offset , crc ) ; }


returns the program in use by this inspector ; may be null ;

public program get program ( ) { return program ; }


iterate over deferred got16 relocations iterator may be used to remove entries as they are processed

iterator < mips deferred relocation > iterate got 1 6 ( ) { return got 1 6list iterator ( ) ; }


starts a jnlp agent and makes sure it successfully connects to jenkins

public void test launch ( ) throws exception { assume assume false ( " skipping j n l p launcher test test launch because we are running headless " , graphics environment is headless ( ) ) ; computer c = add test agent ( false ) ; launch jnlp and verify ( c , build jnlp args ( c ) ) ; }


public model api response upload file with required file ( @ path param ( " pet id " ) long pet id , @ multipart ( value = " required file " ) attachment required file detail , @ multipart ( value = " additional metadata " , required = false ) string additional metadata ) ;


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


opens the { @ link f s data input stream } on the requested file on local file system , verifying the expected usergroup constraints if security is enabled

public static f s data input stream open f s data input stream ( file file , string expected owner , string expected group ) throws i o exception { if ( ! user group information is security enabled ( ) ) { return raw filesystem open ( new path ( file get absolute path ( ) ) ) ; } return force secure open f s data input stream ( file , expected owner , expected group ) ; }


appends the { @ link x 5 0 9 certificate } value to the { @ link byte buf } ( last arg ) and returns it if the { @ link byte buf } didn ' t exist yet it ' ll create it using the { @ link byte buf allocator }

private static byte buf append ( byte buf allocator allocator , boolean use direct , x 5 0 9 certificate cert , int count , byte buf pem ) throws certificate encoding exception { byte buf encoded = unpooled wrapped buffer ( cert get encoded ( ) ) ; try { byte buf base 6 4 = ssl utils to base 6 4 ( allocator , encoded ) ; try { if ( pem = = null ) { / / we try to approximate the buffer ' s initial size the sizes of / / certificates can vary a lot so it ' ll be off a bit depending / / on the number of elements in the array ( count argument ) pem = new buffer ( allocator , use direct , ( begin cert length + base 6 4 readable bytes ( ) + end cert length ) * count ) ; } pem write bytes ( begin cert ) ; pem write bytes ( base 6 4 ) ; pem write bytes ( end cert ) ; } finally { base 6 4 release ( ) ; } } finally { encoded release ( ) ; } return pem ; }


the host that reported this annotation or null if unknown in v 2 format , this is analogous to { @ link span # local endpoint ( ) }

public endpoint endpoint ( ) { return endpoint ; }


persist the given transient instance follows jsr - 220 semantics similar to { @ code save } , associating the given object with the current hibernate { @ link org hibernate session }

void persist ( string entity name , object entity ) throws data access exception ;


byte block set get byte block set ( ) { return block set ; }


extracts the first matching param in { @ code query params }

public string query param ( string name ) { list < string > values = query params get ( name ) ; return ( values = = null ) ? null : values get ( 0 ) ; }


get the utilization of the node this includes the containers

private resource utilization get node utilization ( ) { node resource monitor impl node resource monitor = ( node resource monitor impl ) this context get node resource monitor ( ) ; return node resource monitor get utilization ( ) ; }


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

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


protected void register multifactor trusted authentication ( final flow definition registry registry ) { validate flow definition configuration ( ) ; logger trace ( " flow definitions found in the registry are [ { } ] " , ( object [ ] ) registry get flow definition ids ( ) ) ; val flow id = arrays stream ( registry get flow definition ids ( ) ) find first ( ) or else throw ( ) ; logger trace ( " processing flow definition [ { } ] " , flow id ) ; val flow = ( flow ) registry get flow definition ( flow id ) ; assert not null ( flow , string format ( " % s flow cannot be null or undefined " , flow id ) ) ; val state = get state ( flow , cas webflow constants state id init login form , action state class ) ; assert not null ( state , string format ( " % s state cannot be null or undefined " , cas webflow constants state id init login form ) ) ; val transition = ( transition ) state get transition ( cas webflow constants transition id success ) ; assert not null ( state , string format ( " % s transition cannot be null or undefined " , cas webflow constants transition id success ) ) ; val target state id = transition get target state id ( ) ; transition set target state resolver ( new default target state resolver ( cas webflow constants state id verify trusted device ) ) ; val verify action = create action state ( flow , cas webflow constants state id verify trusted device , action id mfa verify trust action ) ; val enable device registration = cas properties get authn ( ) get mfa ( ) get trusted ( ) is device registration enabled ( ) ; if ( enable device registration ) { logger trace ( " device registration is turned on for multifactor flow [ { } ] " , flow id ) ; create transition for state ( verify action , cas webflow constants transition id yes , cas webflow constants state id finish mfa trusted auth ) ; } else { create transition for state ( verify action , cas webflow constants transition id yes , cas webflow constants state id real submit ) ; } create transition for state ( verify action , cas webflow constants transition id no , target state id ) ; create transition for state ( verify action , cas webflow constants transition id skip , target state id ) ; val submit = get state ( flow , cas webflow constants state id real submit , action state class ) ; val success = ( transition ) submit get transition ( cas webflow constants transition id success ) ; assert not null ( state , string format ( " % s transition cannot be null or undefined " , cas webflow constants transition id success ) ) ; if ( enable device registration ) { success set target state resolver ( new default target state resolver ( cas webflow constants state id prepare register trusted device ) ) ; } else { success set target state resolver ( new default target state resolver ( cas webflow constants state id register trusted device ) ) ; } create register device view ( flow ) ; val register action = create action state ( flow , cas webflow constants state id register trusted device , action id mfa set trust action ) ; create state default transition ( register action , cas webflow constants state id success ) ; if ( submit get action list ( ) size ( ) = = 0 ) { throw new illegal argument exception ( " there are no actions defined for the final submission event of " + flow id ) ; } val act = submit get action list ( ) iterator ( ) next ( ) ; val finish mfa trusted auth = create action state ( flow , cas webflow constants state id finish mfa trusted auth , act ) ; val finished transition = create transition ( cas webflow constants transition id success , cas webflow constants state id success ) ; finish mfa trusted auth get transition set ( ) add ( finished transition ) ; create state default transition ( finish mfa trusted auth , cas webflow constants state id success ) ; }


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


generate new storage id the format of this string can be changed in the future without requiring that old storage i ds be updated

public static string generate uuid ( ) { return storage id prefix + uuid random u u i d ( ) ; }


apply authentication settings to header and query params

void apply to params ( list < pair > query params , multi map header params , multi map cookie params ) ;


returns an { @ link android resources } for a list of resource artifacts

public static android resources for resources ( rule error consumer rule error consumer , immutable list < artifact > resources , string resources attr ) throws rule error exception { return new android resources ( resources , get resource roots ( rule error consumer , resources , resources attr ) ) ; }


protected void authenticate and resolve principal ( final authentication builder builder , final credential credential , final principal resolver resolver , final authentication handler handler ) throws general security exception , prevented exception { publish event ( new cas authentication transaction started event ( this , credential ) ) ; val result = handler authenticate ( credential ) ; val authentication handler name = handler get name ( ) ; builder add success ( authentication handler name , result ) ; logger debug ( " authentication handler [ { } ] successfully authenticated [ { } ] " , authentication handler name , credential ) ; publish event ( new cas authentication transaction successful event ( this , credential ) ) ; var principal = result get principal ( ) ; if ( resolver ! = null ) { principal = resolve principal ( handler , resolver , credential , principal ) ; } if ( principal = = null ) { val resolver name = resolver = = null ? authentication handler name : resolver get name ( ) ; if ( this principal resolution failure fatal ) { logger warn ( " principal resolution handled by [ { } ] produced a null principal for : [ { } ] " + " cas is configured to treat principal resolution failures as fatal " , resolver name , credential ) ; throw new unresolved principal exception ( ) ; } logger warn ( " principal resolution handled by [ { } ] produced a null principal " + " this is likely due to misconfiguration or missing attributes ; cas will attempt to use the principal " + " produced by the authentication handler , if any " , resolver name ) ; } else { builder set principal ( principal ) ; } logger debug ( " final principal resolved for this authentication event is [ { } ] " , principal ) ; publish event ( new cas authentication principal resolved event ( this , principal ) ) ; }


public audio recorder new audio recorder ( int sampling rate , boolean is mono ) { if ( sound pool = = null ) { throw new gdx runtime exception ( " android audio is not enabled by the application config " ) ; } return new android audio recorder ( sampling rate , is mono ) ; }


return the map of hints to use to customize body extraction


adds aapt to the command line and inputs

public busy box action builder add aapt ( ) { files to run provider aapt 2 = data context get sdk ( ) get aapt 2 ( ) ; command line add exec path ( " - - aapt 2 " , aapt 2 get executable ( ) ) ; spawn action builder add tool ( aapt 2 ) ; return this ; }


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


{ @ link # iterator ( ) } that converts each { @ link entry } ' s key and value to a { @ link string }

iterator < entry < string , string > > iterator as string ( ) ;


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


public disk balancer volume get destination volume ( ) { return destination volume ; }


return the { @ link job details } } for the given job

job details get available job details ( job i d job id ) ;


wraps an expression in a predicate or returns null

static predicate of ( rex node t ) { final predicate p = comparison of ( t ) ; if ( p ! = null ) { return p ; } return is predicate of ( t ) ; }


convert an address from the specified program to a comparable address in the specified other program

protected static address translate memory address ( address addr , program other program , boolean exact match only ) { if ( ! addr is memory address ( ) ) { return null ; } address space addr space = addr get address space ( ) ; address space other space = get compatible address space ( addr space , other program ) ; if ( other space ! = null ) { if ( addr space is overlay space ( ) ) { long offset = addr get offset ( ) ; if ( offset < other space get min address ( ) get offset ( ) ) { return exact match only ? null : other space get min address ( ) ; } else if ( offset > other space get max address ( ) get offset ( ) ) { return exact match only ? null : other space get max address ( ) ; } return other space get address ( offset ) ; } return other space get address ( addr get offset ( ) ) ; } return null ; }


protected final t create unmapped instance ( string name ) { map < string , object > metadata = new hash map < > ( ) ; int metadata count = random boolean ( ) ? 0 : between ( 1 , 10 ) ; while ( metadata size ( ) < metadata count ) { metadata put ( random alpha of length ( 5 ) , random alpha of length ( 5 ) ) ; } return create unmapped instance ( name , metadata ) ; }


the configuration for which the resource is defined < code > optional aapt pb config description config = 2 ; < code >


sets this matrix to a rotation matrix that will rotate any vector in counter - clockwise direction around the z - axis

public affine 2 set to rotation rad ( float radians ) { float cos = math utils cos ( radians ) ; float sin = math utils sin ( radians ) ; m 0 0 = cos ; m 0 1 = - sin ; m 0 2 = 0 ; m 1 0 = sin ; m 1 1 = cos ; m 1 2 = 0 ; return this ; }


performs intersect on the edge sets of the input graphs edges are considered equal , if they have the same source identifier , target identifier and edge value the method computes pairs of equal edges from the input graphs if the same edge occurs multiple times in the input graphs , there will be multiple edge pairs to be considered each edge instance can only be part of one pair if the given parameter { @ code distinct edges } is set to { @ code true } , there will be exactly one edge in the output graph representing all pairs of equal edges if the parameter is set to { @ code false } , both edges of each pair will be in the output vertices in the output graph will have no vertex values

public graph < k , null value , ev > intersect ( graph < k , vv , ev > graph , boolean distinct edges ) { data set < edge < k , ev > > intersect edges ; if ( distinct edges ) { intersect edges = get distinct edge intersection ( graph get edges ( ) ) ; } else { intersect edges = get pairwise edge intersection ( graph get edges ( ) ) ; } return graph from data set ( intersect edges , get context ( ) ) ; }


allows user to set analysis options by passing a mapping of analysis option to desired value this method does the work of converting the option value to its actual object type ( if needed )

public void set analysis options ( program program , map < string , string > analysis settings ) { options options = program get options ( program analysis properties ) ; string buffer error buffer = new string buffer ( ) ; for ( string analysis option name : analysis settings key set ( ) ) { string return string = set analysis option ( options , analysis option name , analysis settings get ( analysis option name ) ) ; if ( return string length ( ) > 0 ) { error buffer append ( return string ) ; error buffer append ( " \ n " ) ; } } if ( error buffer length ( ) > 0 ) { if ( is running headless ( ) ) { msg error ( this , error buffer to string ( ) ) ; } else { multi line message dialog dialog = new multi line message dialog ( " analysis options " , " ghidra encountered error ( s ) when attempting to set analysis options " , error buffer to string ( ) , multi line message dialog warning message , false ) ; docking window manager show dialog ( null , dialog ) ; } } }


gets the reference type of the type descriptor ( i e class , struct , union , enum )

public string get ref type ( ) { return has complex type ( ) ? md complex type get type name ( ) : null ; }


asynchronously delete all result types ( buckets , records , influencers ) from { @ code cut off time }

public void delete results from time ( long cutoff epoch ms , action listener < boolean > listener ) { query builder query = query builders bool query ( ) filter ( query builders exists query ( result result type get preferred name ( ) ) ) filter ( query builders range query ( result timestamp get preferred name ( ) ) gte ( cutoff epoch ms ) ) ; delete by query request dbq request = new delete by query request ( anomaly detectors index job results aliased name ( job id ) ) set query ( query ) set indices options ( indices options lenient expand open ( ) ) set abort on version conflict ( false ) set refresh ( true ) set slices ( abstract bulk by scroll request auto slices ) ; / / doc is the most efficient sort order and will also disable scoring dbq request get search request ( ) source ( ) sort ( elasticsearch mappings es doc ) ; execute async with origin ( client , ml origin , delete by query action instance , dbq request , action listener wrap ( r - > listener on response ( true ) , listener : : on failure ) ) ; }


finds or creates a float constant constant pool entry with the given value

public int add float constant ( float value ) { int constant pool count = target class u 2constant pool count ; constant [ ] constant pool = target class constant pool ; / / check if the entry already exists for ( int index = 1 ; index < constant pool count ; index + + ) { constant constant = constant pool [ index ] ; if ( constant ! = null & & constant get tag ( ) = = class constants constant float ) { float constant float constant = ( float constant ) constant ; if ( float constant get value ( ) = = value ) { return index ; } } } return add constant ( new float constant ( value ) ) ; }


create an instance of { @ code joined } with a value { @ link serde } { @ code null } values are accepted and will be replaced by the default value serde as defined in config

public static < k , v , vo > joined < k , v , vo > value serde ( final serde < v > value serde ) { return new joined < > ( null , value serde , null , null ) ; }


sets the field delimiter character ( ' , ' by default )

public csv field delimiter ( char delimiter ) { internal properties put character ( format field delimiter , delimiter ) ; return this ; }


concatenates input strings together into a single string using the separator returns null if the separator is null note : concat ws ( ) does not skip any empty strings , however it does skip any null values after the separator for example , concat ws ( " , " , " a " , null , " c " ) would yield " a , c "

public static binary string data concat ws ( binary string data separator , binary string data inputs ) { return concat ws ( separator , arrays as list ( inputs ) ) ; }


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


throw illegal state exception if load ( ) has not yet been called

private void check loaded ( ) { if ( ! loaded ) { throw new illegal state exception ( " image not yet loaded ! " ) ; } }


overridden to provide a web hdfs file system wrapper for the super - user

protected web hdfs file system create file system ( ) throws exception { return web hdfs test util get web hdfs file system ( conf , web hdfs constants webhdfs scheme ) ; }


get the optional int value associated with an index the default value is returned if there is no value for the index , or if the value is not a number and cannot be converted to a number

public int opt int ( int index , int default value ) { try { return get int ( index ) ; } catch ( exception e ) { return default value ; } }


returns the program object that the selection refers to

public program get program ( ) { return program ref get ( ) ; }


set the array of string values for the < code > name < code > property as as comma delimited values

public void set strings ( string name , string values ) { set ( name , string utils array to string ( values ) ) ; }


returns the special type string used during emit

protected abstract string get special type string ( ) ;


ends this comparison chain and returns its result : a value having the same sign as the first nonzero comparison result in the chain , or zero if every result was zero


test preads with { @ link java nio direct byte buffer } s

public void test pread with direct byte buffer ( ) throws i o exception { test pread with byte buffer ( byte buffer allocate direct ( file size ) ) ; test pread with full byte buffer ( byte buffer allocate direct ( file size ) ) ; test pread with positioned byte buffer ( byte buffer allocate direct ( file size ) ) ; test pread with limited byte buffer ( byte buffer allocate direct ( file size ) ) ; test positioned pread with byte buffer ( byte buffer allocate direct ( file size ) ) ; test pread fully with byte buffer ( byte buffer allocate direct ( file size ) ) ; }


post fakeinline - additional properties : test inline additional properties

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


returns a new eval exception with no location and an error message produced by java - style string formatting ( { @ code string format ( format , args ) } ) use { @ code errorf ( " % s " , msg ) } to produce an error message from a non - constant expression { @ code msg }

public static eval exception errorf ( string format , object args ) { return new eval exception ( string format ( format , args ) ) ; } / / - - - methods related to attributes ( fields and methods ) - - -


< code > required io netty example worldclock day of week day of week = 5 ; < code >

public builder set day of week ( io netty example worldclock world clock protocol day of week value ) { if ( value = = null ) { throw new null pointer exception ( ) ; } bit field 0 | = 0x 0 0 0 0 0 0 0 8 ; day of week = value ; on changed ( ) ; return this ; }


public static void setup message bundle ( context context ) { base error prone java compiler setup message bundle ( context ) ; }


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


sort the list remove over - lapping subnet sort the list again

private static list < ip subnet filter rule > sort and filter ( list < ip subnet filter rule > rules ) { collections sort ( rules ) ; iterator < ip subnet filter rule > iterator = rules iterator ( ) ; list < ip subnet filter rule > to keep = new array list < ip subnet filter rule > ( ) ; ip subnet filter rule parent rule = iterator has next ( ) ? iterator next ( ) : null ; if ( parent rule ! = null ) { to keep add ( parent rule ) ; } while ( iterator has next ( ) ) { / / grab a potential child rule ip subnet filter rule child rule = iterator next ( ) ; / / if parent rule matches child rule , then there ' s no need to keep the child rule / / otherwise , the rules are distinct and we need both if ( ! parent rule matches ( new inet socket address ( child rule get ip address ( ) , 1 ) ) ) { to keep add ( child rule ) ; / / then we ' ll keep the child rule around as the parent for the next round parent rule = child rule ; } } return to keep ; }


returns the number of pending timeouts of this { @ link timer }

public long pending timeouts ( ) { return pending timeouts get ( ) ; }


public static < e > array deque < e > new array deque ( int init size ) { return new array deque < e > ( init size ) ; }


protected void restore next in edge ( xml pull parser parser , block map resolver ) throws pcode x m l exception { block edge in edge = new block edge ( ) ; intothis add ( in edge ) ; in edge restore xml ( parser , resolver ) ; while ( in edge point outofthis size ( ) < = in edge reverse index ) { in edge point outofthis add ( null ) ; } block edge out edge = new block edge ( this , 0 , intothis size ( ) - 1 ) ; in edge point outofthis set ( in edge reverse index , out edge ) ; }


generates the name of the index that conforms to the default naming convention for backing indices on data streams given the specified data stream name and generation and the current system time

public static string get default backing index name ( string data stream name , long generation ) { return get default backing index name ( data stream name , generation , system current time millis ( ) , version current ) ; }


returns an ordering which tries each given comparator in order until a non - zero result is found , returning that result , and returning zero only if all comparators return zero the returned ordering is based on the state of the { @ code comparators } iterable at the time it was provided to this method the returned ordering is equivalent to that produced using { @ code ordering from ( comp 1 ) compound ( comp 2 ) compound ( comp 3 ) } < b > warning : < b > supplying an argument with undefined iteration order , such as a { @ link hash set } , will produce non - deterministic results < b > java 8 users : < b > use a chain of calls to { @ link comparator # then comparing ( comparator ) } , or { @ code comparator collection stream ( ) reduce ( comparator : : then comparing ) get ( ) } ( if the collection might be empty , also provide a default comparator as the { @ code identity } parameter to { @ code reduce } )

public static < t > ordering < t > compound ( iterable < ? extends comparator < ? super t > > comparators ) { return new compound ordering < t > ( comparators ) ; }


updates the message ringtone for a specific recipient if that recipient has no channel , this does nothing this has to update the database and should therefore be run on a background thread

public static synchronized void update message vibrate ( @ non null context context , @ non null recipient recipient , vibrate state vibrate state ) { if ( ! supported ( ) | | recipient get notification channel ( ) = = null ) { return ; } log i ( tag , " updating recipient vibrate with value : " + vibrate state ) ; boolean enabled = vibrate state = = vibrate state default ? get message vibrate ( context ) : vibrate state = = vibrate state enabled ; string new channel id = generate channel id for ( recipient ) ; boolean success = update existing channel ( service util get notification manager ( context ) , recipient get notification channel ( ) , new channel id , channel - > channel enable vibration ( enabled ) ) ; database factory get recipient database ( context ) set notification channel ( recipient get id ( ) , success ? new channel id : null ) ; ensure custom channel consistency ( context ) ; }


protected void node update ( r m node nm ) { log debug ( " node update : { } cluster capacity : { } " , nm , get cluster resource ( ) ) ; / / process new container information / / notice : it is possible to not find the node i d as a node can be / / decommissioned at the same time skip updates if node is null scheduler node scheduler node = get node ( nm get node i d ( ) ) ; list < container status > completed containers = update new container info ( nm , scheduler node ) ; / / notify scheduler node updated if ( scheduler node ! = null ) { scheduler node notify node update ( ) ; } / / process completed containers resource released resources = resource new instance ( 0 , 0 ) ; int released containers = update completed containers ( completed containers , released resources , nm get node i d ( ) , scheduler node ) ; / / if the node is decommissioning , send an update to have the total / / resource equal to the used resource , so no available resource to / / schedule if ( nm get state ( ) = = node state decommissioning & & scheduler node ! = null & & scheduler node get total resource ( ) compare to ( scheduler node get allocated resource ( ) ) ! = 0 ) { this rm context get dispatcher ( ) get event handler ( ) handle ( new r m node resource update event ( nm get node i d ( ) , resource option new instance ( scheduler node get allocated resource ( ) , 0 ) ) ) ; } update scheduler health information ( released resources , released containers ) ; if ( scheduler node ! = null ) { update node resource utilization ( nm , scheduler node ) ; } if ( scheduler node ! = null ) { signal containers if overcommitted ( scheduler node , true ) ; } / / now node data structures are up - to - date and ready for scheduling if ( log is debug enabled ( ) ) { log debug ( " node being looked for scheduling " + nm + " available resource : " + ( scheduler node = = null ? " unknown ( decommissioned ) " : scheduler node get unallocated resource ( ) ) ) ; } }


test the property ' enum string required '

public void enum string required test ( ) { / / todo : test enum string required }


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


inserts the given object into the current buffer this method returns a pointer that can be used to address the written record in this partition

public final long append record ( t record ) throws i o exception { long pointer = this write view get current pointer ( ) ; try { this serializer serialize ( record , this write view ) ; this record counter + + ; return pointer ; } catch ( e o f exception e ) { / / we ran out of pages / / first , reset the pages and then we need to trigger a compaction / / int old current buffer = this write view reset to ( pointer ) ; / / for ( int buf num = this partition pages size ( ) - 1 ; buf num > old current buffer ; / / buf num - - ) { / / this available memory add memory segment ( this partition pages remove ( buf num ) ) ; / / } throw e ; } }


add or replace the address of the given web - service endpoint with the given value

public process engine configuration add ws endpoint address ( q name endpoint name , url address ) { this ws overriden endpoint addresses put ( endpoint name , address ) ; return this ; }


string representation for this object , used for debugging

public string to string ( ) { return " byte viewer state : address = " + addr + " , view position index = = > " + vp get index as int ( ) + " , view y offset = = > " + vp get y offset ( ) ; }


add a number of samples and their sum to the running stat note that although use of this method will preserve accurate mean values , large values for num samples may result in inaccurate variance values due to the use of a single step of the welford method for variance calculation

public synchronized void add ( long num samples , long sum ) { interval stat add ( num samples , sum ) ; set changed ( ) ; }


find all resources in the file system that match the given location pattern via the ant - style path matcher

protected set < resource > do find path matching file resources ( resource root dir resource , string sub pattern ) throws i o exception { file root dir ; try { root dir = root dir resource get file ( ) get absolute file ( ) ; } catch ( file not found exception ex ) { if ( logger is debug enabled ( ) ) { logger debug ( " cannot search for matching files underneath " + root dir resource + " in the file system : " + ex get message ( ) ) ; } return collections empty set ( ) ; } catch ( exception ex ) { if ( logger is info enabled ( ) ) { logger info ( " failed to resolve " + root dir resource + " in the file system : " + ex ) ; } return collections empty set ( ) ; } return do find matching file system resources ( root dir , sub pattern ) ; }


a test where the connection fails twice and then the get operation succeeds ( job - related blob )

public void test blob for job fetch retries ( ) throws i o exception { final configuration config = new configuration ( ) ; config set string ( blob server options storage directory , temporary folder new folder ( ) get absolute path ( ) ) ; test blob fetch retries ( config , new void blob store ( ) , new job i d ( ) , transient blob ) ; }


public static litho view mount component ( component context context , component component ) { return mount component ( context , component , 100 , 100 ) ; }


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


parses ninja target using { @ link ninja scope } of the file , where it is defined , to expand variables

public ninja target parse ninja target ( ninja scope file scope , long offset ) throws generic parsing exception { ninja target builder builder = ninja target builder ( file scope , offset , name interner ) ; parse expected ( ninja token build ) ; map < input output kind , list < ninja variable value > > path values map = parse target dependencies part ( builder ) ; ninja scope target scope = parse target variables ( offset , file scope , builder ) ; / / variables from the build statement can be used in the input and output paths , so / / we are using target scope to resolve paths values for ( map entry < input output kind , list < ninja variable value > > entry : path values map entry set ( ) ) { list < path fragment > paths = entry get value ( ) stream ( ) map ( value - > path fragment interner intern ( path fragment create ( target scope get expanded value ( long max value , value ) ) ) ) collect ( collectors to list ( ) ) ; input output kind input output kind = entry get key ( ) ; if ( input output kind instanceof input kind ) { builder add inputs ( ( input kind ) input output kind , paths ) ; } else { builder add outputs ( ( output kind ) input output kind , paths ) ; } } return builder build ( ) ; }


takes the given string and puts spaces on the boundaries defined by the groups passed in eg : if the source is " aa bbbb cc dddddd " and the groups are { 2 , 1 , 4 } , and the whitespace list is { 5 , 1 } the returned string will be " aabb bb ccdddddd " note that the mode passed in determines how we interpret group sizes if the mode is hex then a group size of ' 2 ' will mean 4 characters ( 2 bytes ) , but if the mode is binary then we ' ll grab 16 characters for that group of 2

private string restore grouping and whitespace ( string source , list < integer > groups , list < string > whitespace , input mode mode ) { / / first remove all whitespace source = source replace all ( " \ \ s " , " " ) ; / / now set up the mode modifier int mode modifier = ( mode = = input mode binary ) ? 8 : 2 ; / / now set up a counter to track our position in the whitespace list int whitespace index = 0 ; / / now loop over all the groups , breaking up our source string and adding whitespaces string builder sb = new string builder ( ) ; for ( integer group : groups ) { sb append ( source substring ( 0 , group * mode modifier ) ) ; if ( whitespace index < whitespace size ( ) ) { sb append ( whitespace get ( whitespace index ) ) ; whitespace index + + ; } / / and chop off the part of the string we just processed for the next iteration source = source substring ( group * mode modifier ) ; } return sb to string ( ) ; }


validate the given block name : cannot be null , cannot be an empty string , cannot contain control characters ( ascii 0 0x 1 9 ) < br > note : when producing an overlay memory space which corresponds to a block , the space name will be modified to be consistent with address space name restrictions and to ensure uniqueness

public static boolean is valid memory block name ( string name ) { if ( name = = null | | name length ( ) = = 0 ) { return false ; } for ( int i = 0 ; i < name length ( ) ; i + + ) { char c = name char at ( i ) ; if ( c < 0x 2 0 ) { return false ; } } return true ; }


void alloc arrays ( ) { check state ( needs alloc arrays ( ) , " arrays already allocated " ) ; int expected size = mod count ; int buckets = closed table size ( expected size , load factor ) ; this table = new table ( buckets ) ; this entries = new entries ( expected size ) ; this keys = new object [ expected size ] ; this values = new object [ expected size ] ; }


returns a callback that , when executed , writes the given bytes to the given file path not meant to be called directly by tests

private static runnable make write file content callback ( path to change , byte [ ] contents ) { return ( ) - > { try ( output stream output stream = to change get output stream ( ) ) { output stream write ( contents ) ; } catch ( i o exception e ) { e print stack trace ( ) ; fail ( e get message ( ) ) ; } } ; }


serialize the given java object into json string

public string serialize ( object obj ) { return gson to json ( obj ) ; }


private string generate method arguments ( method method ) { class < ? > [ ] pts = method get parameter types ( ) ; return int stream range ( 0 , pts length ) map to obj ( i - > string format ( code method argument , pts [ i ] get canonical name ( ) , i ) ) collect ( collectors joining ( " , " ) ) ; }


clears the test byte buf allocator the default allocator will be used by all future instances of this class it is not recommended to use this method outside of testing

static void clear test allocator ( ) { test allocator set ( null ) ; }


scheduled future < ? > schedule ( channel handler context ctx , runnable task , long delay , time unit unit ) { return ctx executor ( ) schedule ( task , delay , unit ) ; }


shut down immediately , aborting any work in progress and discarding all pending work it is legal to store pending work for another thread to process


public void test lifecycle i2 c s1 ( ) { data source < object > data source = get and subscribe ( ) ; data subscriber < object > subscriber 1 = verify get and subscribe m ( m data source supplier 1 , m src 1 ) ; data subscriber < object > subscriber 2 = verify get and subscribe m ( m data source supplier 2 , m src 2 ) ; data subscriber < object > subscriber 3 = verify get and subscribe ( m data source supplier 3 , m src 3 ) ; object val 2a = mock ( object class ) ; set state ( m src 2 , not closed , not finished , with result , val 2a , not failed , null ) ; subscriber 2 on new result ( m src 2 ) ; m in order verify ( m src 3 ) close ( ) ; verify subscriber ( data source , m src 2 , on new result ) ; verify state ( data source , m src 2 , not closed , not finished , with result , val 2a , not failed , null ) ; test close ( data source , m src 1 , m src 2 ) ; verify subscriber ( data source , null , on cancellation ) ; verify state ( data source , null , closed , not finished , without result , null , not failed , null ) ; object val = mock ( object class ) ; set state ( m src 2 , not closed , finished , with result , val , not failed , null ) ; subscriber 2 on new result ( m src 2 ) ; verify subscriber ( data source , m src 2 , no interactions ) ; verify state ( data source , null , closed , not finished , without result , null , not failed , null ) ; }


the src file is on the local disk add it to filesystem at the given dst name and the source is kept intact afterwards

public void copy from local file ( path src , path dst ) throws i o exception { copy from local file ( false , src , dst ) ; }


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


called when the native type is a { @ link string }

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


get the canonical service name , which will be returned by { @ code file system get canonical service name ( ) } and so used to map the issued dt in credentials , including credential files collected for job submission if null is returned : fall back to the default filesystem logic only invoked on { @ link custom delegation token manager } instances

default string get canonical service name ( ) { return null ; }


the method used by the node manager ' s < code > shared cache upload service < code > to request whether a resource can be uploaded the < code > shared cache manager < code > responds with whether or not the node manager can upload the file

public s c m uploader can upload response can upload ( s c m uploader can upload request request ) throws yarn exception , i o exception ;


sets { @ link format # stereo mode } the default value is { @ link # no value }

public builder set stereo mode ( @ c stereo mode int stereo mode ) { this stereo mode = stereo mode ; return this ; }


public offset date time get date time ( ) { return date time ; }


public void big decimal test ( ) { / / todo : test big decimal }


called by subclasses whenever a data frame is received from the transport

protected void transport data received ( readable buffer frame , boolean end of stream ) { if ( transport error ! = null ) { / / we ' ve already detected a transport error and now we ' re just accumulating more detail / / for it transport error = transport error augment description ( " data - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ n " + readable buffers read as string ( frame , error charset ) ) ; frame close ( ) ; if ( transport error get description ( ) length ( ) > 1000 | | end of stream ) { http 2 processing failed ( transport error , false , transport error metadata ) ; } } else { if ( ! headers received ) { http 2 processing failed ( status internal with description ( " headers not received before payload " ) , false , new metadata ( ) ) ; return ; } int frame size = frame readable bytes ( ) ; inbound data received ( frame ) ; if ( end of stream ) { / / this is a protocol violation as we expect to receive trailers if ( frame size > 0 ) { transport error = status internal with description ( " received unexpected eos on non - empty data frame from server " ) ; } else { transport error = status internal with description ( " received unexpected eos on empty data frame from server " ) ; } transport error metadata = new metadata ( ) ; transport report status ( transport error , false , transport error metadata ) ; } } }


gets the value from a given index and moves it to the front of the mtf list ( inverse move to front transform )

byte index to front ( final int index ) { final byte value = mtf [ index ] ; system arraycopy ( mtf , 0 , mtf , 1 , index ) ; mtf [ 0 ] = value ; return value ; }


start a server instance on the specified port this server must be disposed before attempting to create another

public static synchronized void start server ( string dir path , int port , int auth mode , boolean enable alt login name , boolean enable s s h authentication , boolean enable anonymous authentication ) throws i o exception { if ( port = = 0 ) { port = ghidra test server port ; } msg debug ( server test util class , " - - - preparing to start ghidra server - - - " ) ; msg debug ( server test util class , " authentication : " + ( auth mode < 0 ? " none " : auth modes [ auth mode ] ) ) ; msg debug ( server test util class , " enable alternate login name : " + enable alt login name ) ; msg debug ( server test util class , " enable anonymous login : " + enable anonymous authentication ) ; / / force client - side use of newly generated ca certificates system set property ( application trust manager factory ghidra cacerts path property , get test pki c a certs path ( ) ) ; s s l context initializer initialize ( true ) ; array list < string > arg list = new array list < > ( ) ; string java command = system get property ( " java home " ) + file separator + " bin " + file separator + " java " ; arg list add ( java command ) ; arg list add ( " - cp " ) ; arg list add ( system get property ( " java class path " ) ) ; arg list add ( " - xmx 5 1 2 m " ) ; arg list add ( " - xdebug " ) ; arg list add ( " - xnoagent " ) ; arg list add ( " - djava compiler = none " ) ; arg list add ( " - d " + application trust manager factory ghidra cacerts path property + " = " + get test pki c a certs path ( ) ) ; arg list add ( " - d " + application key manager factory keystore path property + " = " + get test pki server keystore path ( ) ) ; arg list add ( " - d " + application key manager factory keystore password property + " = " + test pki server passphrase ) ; arg list add ( " - xrunjdwp : transport = dt socket , server = y , suspend = n , address = * : 18202 " ) ; / / * : for remote debug support arg list add ( " - d system utilities is testing = true " ) ; / / - djava security policy = c : / policy / / url policy = resource manager get resource ( " policy " ) ; / / if ( policy = = null ) { / / throw new runtime exception ( " failed to find security policy resource " ) ; / / } / / arg list add ( " - djava security policy = " + policy to external form ( ) ) ; arg list add ( " ghidra server remote ghidra server " ) ; if ( auth mode > = 0 ) { arg list add ( " - a " + auth mode ) ; } if ( enable alt login name ) { arg list add ( " - u " ) ; } if ( enable s s h authentication ) { arg list add ( " - ssh " ) ; } if ( enable anonymous authentication ) { arg list add ( " - anonymous " ) ; } arg list add ( " - ip " + localhost ) ; / / bind to loopback interface arg list add ( " - p " + port ) ; arg list add ( dir path ) ; string [ ] args = new string [ arg list size ( ) ] ; arg list to array ( args ) ; system out println ( ) ; for ( string arg : arg list ) { boolean include quotes = arg index of ( ' ' ) ! = - 1 ; if ( include quotes ) { system out print ( " ' " ) ; } system out print ( arg ) ; if ( include quotes ) { system out print ( " ' " ) ; } system out print ( " " ) ; } system out println ( ) ; try { server process = runtime get runtime ( ) exec ( args ) ; server repositories = dir path ; cmd out = new i o thread ( server process get input stream ( ) ) ; cmd err = new i o thread ( server process get error stream ( ) ) ; cmd out start ( ) ; cmd err start ( ) ; } catch ( exception e ) { e print stack trace ( ) ; throw new assert exception ( " exception starting ghidra server " , e ) ; } msg info ( server test util class , " waiting for ghidra server rmi registration to complete " ) ; cmd out wait for server start or termination ( ) ; / / based upon message output only if ( ! cmd out server start complete ) { throw new assert exception ( " ghidra server failed to start " ) ; } wait until server available ( ghidra test server port ) ; }


public void remove ( ) { prev next = next ; next prev = prev ; next = prev = null ; }


return the path for this resource ( as resource path within the class path )

public final string get path ( ) { return this path ; }


override any client properties in the original configs with overrides

private map < string , object > client props ( final set < string > config names , final map < string , object > originals ) { / / iterate all client config names , filter out non - client configs from the original / / property map and use the overridden values when they are not specified by users final map < string , object > parsed = new hash map < > ( ) ; for ( final string config name : config names ) { if ( originals contains key ( config name ) ) { parsed put ( config name , originals get ( config name ) ) ; } } return parsed ; }


returns a { @ code } string representation of the pattern

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


invoked after a user has successfully registered ensures all the necessary state is updated

public static synchronized void on registration ( @ non null context context , @ nullable kbs pin data kbs data , @ nullable string pin , boolean has pin to restore ) { log i ( tag , " on registration ( ) " ) ; text secure preferences set v 1 registration lock pin ( context , pin ) ; if ( kbs data = = null & & pin ! = null ) { log i ( tag , " registration lock v1 " ) ; signal store kbs values ( ) clear registration lock and pin ( ) ; text secure preferences set v 1 registration lock enabled ( context , true ) ; text secure preferences set registration lock last reminder time ( context , system current time millis ( ) ) ; text secure preferences set registration lock next reminder interval ( context , registration lock reminders initial interval ) ; } else if ( kbs data ! = null & & pin ! = null ) { log i ( tag , " registration lock v2 " ) ; text secure preferences set v 1 registration lock enabled ( context , false ) ; signal store kbs values ( ) set v 2 registration lock enabled ( true ) ; signal store kbs values ( ) set kbs master key ( kbs data , pin ) ; signal store pin values ( ) reset pin reminders ( ) ; reset pin retry count ( context , pin ) ; clear fallback kbs enclave job clear all ( ) ; } else if ( has pin to restore ) { log i ( tag , " has a pin to restore " ) ; signal store kbs values ( ) clear registration lock and pin ( ) ; text secure preferences set v 1 registration lock enabled ( context , false ) ; signal store storage service values ( ) set needs account restore ( true ) ; } else { log i ( tag , " no registration lock or pin at all " ) ; signal store kbs values ( ) clear registration lock and pin ( ) ; text secure preferences set v 1 registration lock enabled ( context , false ) ; } update state ( build inferred state from other fields ( ) ) ; }


equivalent of { @ link android opengl gles20 # gl tex sub image 2 d ( int , int , int , int , int , int , int , int , buffer ) } where < code > buffer < code > contains pixels of the current frame

public void gl tex sub image 2 d ( int target , int level ) { m gif info handle gl tex sub image 2 d ( target , level ) ; }


given an array list of section ' s , return all section ' s with the given name , or an empty list if none are found

private array list < file summary section > get sub sections of name ( array list < file summary section > sections , section name name ) { array list < file summary section > sub sec = new array list < > ( ) ; for ( file summary section s : sections ) { string n = s get name ( ) ; section name section name = section name from string ( n ) ; if ( section name = = name ) { sub sec add ( s ) ; } } return sub sec ; }


returns the corresponding primitive type if this is a wrapper type ; otherwise returns { @ code this } itself idempotent

public final type token < t > unwrap ( ) { if ( is wrapper ( ) ) { @ suppress warnings ( " unchecked " ) / / this is a wrapper class class < t > type = ( class < t > ) runtime type ; return of ( primitives unwrap ( type ) ) ; } return this ; }


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


get metrics ( { @ link yarn cluster metrics } ) about the cluster

public abstract yarn cluster metrics get yarn cluster metrics ( ) throws yarn exception , i o exception ;


get a metastore instrumentation get instrumentation ( ) instance for this context

public metastore instrumentation get s 3 guard instrumentation ( ) { return get instrumentation ( ) get s 3 guard instrumentation ( ) ; }


ensure that we fetch the latest shard store from the primary when a new node joins so we won ' t cancel the current recovery for the copy on the newly joined node unless we can perform a noop recovery with that node

public void test recent primary information ( ) throws exception { string index name = " test " ; string node with primary = internal cluster ( ) start node ( ) ; assert acked ( client ( ) admin ( ) indices ( ) prepare create ( index name ) set settings ( settings builder ( ) put ( index metadata setting number of shards , 1 ) put ( index metadata setting number of replicas , 1 ) put ( index settings file based recovery threshold setting get key ( ) , 0 1f ) put ( index service global checkpoint sync interval setting get key ( ) , " 1 0 0ms " ) put ( index service retention lease sync interval setting get key ( ) , " 1 0 0ms " ) put ( unassigned info index delayed node left timeout setting get key ( ) , " 1ms " ) ) ) ; string node with replica = internal cluster ( ) start data only node ( ) ; discovery node disco node with replica = internal cluster ( ) get instance ( cluster service class , node with replica ) local node ( ) ; settings node with replica settings = internal cluster ( ) data path settings ( node with replica ) ; ensure green ( index name ) ; index random ( random boolean ( ) , false , random boolean ( ) , int stream range ( 0 , between ( 10 , 100 ) ) map to obj ( n - > client ( ) prepare index ( index name ) set source ( " f " , " v " ) ) collect ( collectors to list ( ) ) ) ; internal cluster ( ) stop random node ( internal test cluster name filter ( node with replica ) ) ; if ( random boolean ( ) ) { index random ( random boolean ( ) , false , random boolean ( ) , int stream range ( 0 , between ( 10 , 100 ) ) map to obj ( n - > client ( ) prepare index ( index name ) set source ( " f " , " v " ) ) collect ( collectors to list ( ) ) ) ; } count down latch block recovery = new count down latch ( 1 ) ; count down latch recovery started = new count down latch ( 1 ) ; mock transport service transport service on primary = ( mock transport service ) internal cluster ( ) get instance ( transport service class , node with primary ) ; transport service on primary add send behavior ( ( connection , request id , action , request , options ) - > { if ( peer recovery target service actions files info equals ( action ) ) { recovery started count down ( ) ; try { block recovery await ( ) ; } catch ( interrupted exception e ) { thread current thread ( ) interrupt ( ) ; } } connection send request ( request id , action , request , options ) ; } ) ; string new node = internal cluster ( ) start data only node ( ) ; recovery started await ( ) ; / / index more documents and flush to destroy sync id and remove the retention lease ( as file based recovery threshold reached ) index random ( random boolean ( ) , random boolean ( ) , random boolean ( ) , int stream range ( 0 , between ( 50 , 200 ) ) map to obj ( n - > client ( ) prepare index ( index name ) set source ( " f " , " v " ) ) collect ( collectors to list ( ) ) ) ; client ( ) admin ( ) indices ( ) prepare flush ( index name ) get ( ) ; assert busy ( ( ) - > { for ( shard stats shard stats : client ( ) admin ( ) indices ( ) prepare stats ( index name ) get ( ) get shards ( ) ) { for ( retention lease lease : shard stats get retention lease stats ( ) retention leases ( ) leases ( ) ) { assert that ( lease id ( ) , not ( equal to ( replication tracker get peer recovery retention lease id ( disco node with replica get id ( ) ) ) ) ) ; } } } ) ; / / allocation service only calls gateway allocator if there are unassigned shards assert acked ( client ( ) admin ( ) indices ( ) prepare create ( " dummy - index " ) set wait for active shards ( 0 ) set settings ( settings builder ( ) put ( " index routing allocation require attr " , " not - found " ) ) ) ; internal cluster ( ) start data only node ( node with replica settings ) ; / / need to wait for events to ensure the reroute has happened since we perform it async when a new node joins client ( ) admin ( ) cluster ( ) prepare health ( index name ) set wait for yellow status ( ) set wait for events ( priority languid ) get ( ) ; block recovery count down ( ) ; ensure green ( index name ) ; assert that ( internal cluster ( ) nodes include ( index name ) , has item ( new node ) ) ; for ( recovery state recovery : client ( ) admin ( ) indices ( ) prepare recoveries ( index name ) get ( ) shard recovery states ( ) get ( index name ) ) { if ( recovery get primary ( ) = = false ) { assert that ( recovery get index ( ) file details ( ) , not ( empty ( ) ) ) ; } } transport service on primary clear all rules ( ) ; }


creates a new { @ code listenable future } whose value is a list containing the values of all its input futures , if all succeed the list of results is in the same order as the input list this differs from { @ link # successful as list ( listenable future [ ] ) } in that it will return a failed future if any of the items fails canceling this future will attempt to cancel all the component futures , and if any of the provided futures fails or is canceled , this one is , too

public static < v > listenable future < list < v > > all as list ( listenable future < ? extends v > futures ) { return new list future < v > ( immutable list copy of ( futures ) , true ) ; }


@ exception null pointer exception if { @ code listener } is { @ code null }

public void add error listener ( a n t l r error listener listener ) { if ( listener = = null ) { throw new null pointer exception ( " listener cannot be null " ) ; } listeners add ( listener ) ; }


called by the loader to indicate that it wishes for its { @ link # continue loading ( long ) } method to be called when it can continue to load data called on the playback thread

void on continue loading requested ( t source ) ;


adds a data { @ link source } to the environment to get a { @ link data stream } the result will be either a bounded data stream ( that can be processed in a batch way ) or an unbounded data stream ( that must be processed in a streaming way ) , based on the boundedness property of the source , as defined by { @ link source # get boundedness ( ) } the result type ( that is used to create serializers for the produced data events ) will be automatically extracted this is useful for sources that describe the produced types already in their configuration , to avoid having to declare the type multiple times for example the file sources and kafka sources already define the produced byte their parsersserializersformats , and can forward that information

public < out > data stream source < out > from source ( source < out , ? , ? > source , watermark strategy < out > timestamps and watermarks , string source name ) { return from source ( source , timestamps and watermarks , source name , null ) ; }


initializes the { @ link # tt } array this method is called when the required length of the array is known i don ' t initialize it at construction time to avoid unnecessary memory allocation when compressing small files

final int [ ] init t t ( int length ) { int [ ] tt shadow = this tt ; / / tt length should always be > = length , but theoretically / / it can happen , if the compressor mixed small and large / / blocks normally only the last block will be smaller / / than others if ( ( tt shadow = = null ) | | ( tt shadow length < length ) ) { this tt = tt shadow = new int [ length ] ; } return tt shadow ; }


returns whether or not to strip the binaries

public boolean should strip binaries ( ) { return strip binaries ; }


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


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


get type pool resolution of the witness class

private type pool resolution get resolution ( string witness class , class loader class loader ) { class loader mapping key = class loader = = null ? null class loader instance : class loader ; if ( ! pool map contains key ( mapping key ) ) { synchronized ( pool map ) { if ( ! pool map contains key ( mapping key ) ) { type pool class type pool = class loader = = null ? type pool default of boot loader ( ) : type pool default of ( class loader ) ; pool map put ( mapping key , class type pool ) ; } } } type pool type pool = pool map get ( mapping key ) ; return type pool describe ( witness class ) ; }


public long get sampler slot start ( ) { return ( ( data high level shader language symbol internals 3 2 ) internals ) get sampler slot start ( ) ; }


test of to array method , of class tree set

public void test to array ( ) { folded tree set < integer > tree = new folded tree set < > ( ) ; array list < integer > list = new array list < > ( 256 ) ; for ( int i = 0 ; i < 256 ; i + + ) { list add ( 1024 + i ) ; } tree add all ( list ) ; assert array equals ( list to array ( ) , tree to array ( ) ) ; }


registers an action context implementation identified by the given type and which can be { @ linkplain # restrict to restricted } by its provided command - line identifiers

public < t extends action context > builder register ( class < t > identifying type , t context , string command line identifiers ) { action contexts add ( new auto value module action context registry action context information < > ( context , identifying type , immutable list copy of ( command line identifiers ) ) ) ; return this ; }


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


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


public offset date time get date time ( ) { return date time ; }


return a version indicator ( older version , newer version or unknown version ) only an older version has the possibility of being upgradeable

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


returns an array containing each value of { @ code collection } , converted to a { @ code float } value in the manner of { @ link number # float value } elements are copied from the argument collection as if by { @ code collection to array ( ) } calling this method is as thread - safe as calling that method

public static float [ ] to array ( collection < ? extends number > collection ) { if ( collection instanceof float array as list ) { return ( ( float array as list ) collection ) to float array ( ) ; } object [ ] boxed array = collection to array ( ) ; int len = boxed array length ; float [ ] array = new float [ len ] ; for ( int i = 0 ; i < len ; i + + ) { / / check not null for gwt ( do not optimize ) array [ i ] = ( ( number ) check not null ( boxed array [ i ] ) ) float value ( ) ; } return array ; }


create a { @ link consumer record } with the given topic name and given topic , key , value , and timestamp does not auto advance internally tracked time

public consumer record < byte [ ] , byte [ ] > create ( final string topic name , final k key , final v value , final long timestamp ms ) { return create ( topic name , key , value , new record headers ( ) , timestamp ms ) ; }


public static void gemv ( double alpha , dense matrix mat a , boolean trans a , dense vector x , double beta , dense vector y ) { gemv dimension check ( mat a , trans a , x , y ) ; final int m = mat a num rows ( ) ; final int n = mat a num cols ( ) ; final int lda = mat a num rows ( ) ; final string ta = trans a ? " t " : " n " ; native blas dgemv ( ta , m , n , alpha , mat a get data ( ) , lda , x get data ( ) , 1 , beta , y get data ( ) , 1 ) ; }


reports whether this function has a residual positional arguments parameter , { @ code def f ( args ) }

public boolean has varargs ( ) { return rfn has varargs ( ) ; }


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

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


builder method for business key parameter

public builder with business key ( string business key ) { this business key = business key ; return this ; }


set the expire after write in nanoseconds

public void set expire after write ( optional long expire after write nanos ) { this expire after write nanos = expire after write nanos is present ( ) ? expire after write nanos get as long ( ) : null ; }


writes the given int value ( 3 2bit , 4 bytes ) to the given position in big endian byte order this method ' s speed depends on the system ' s native byte order , and it is possibly slower than { @ link # put int ( int , int ) } for most cases ( such as transient storage in memory or serialization for io and network ) , it suffices to know that the byte order in which the value is written is the same as the one in which it is read , and { @ link # put int ( int , int ) } is the preferable choice

public final void put int big endian ( int index , int value ) { if ( little endian ) { put int ( index , integer reverse bytes ( value ) ) ; } else { put int ( index , value ) ; } }


protected void perform delete ( ) throws i o exception , interrupted exception { get config file ( ) delete ( ) ; util delete recursive ( get root dir ( ) ) ; }


returns the last checkpoint id ( current - 1 )

public long get last ( ) { return checkpoint id counter get ( ) - 1 ; }


test nextupdateremove during global iteration of state incremental visitor

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


public double get double ( ) { return double ; }


parses the rest request on top of the search source builder , preserving values that are not overridden by the rest request

private static void parse search source ( final search source builder search source builder , rest request request , int consumer set size ) { query builder query builder = rest actions url params to query builder ( request ) ; if ( query builder ! = null ) { search source builder query ( query builder ) ; } if ( request has param ( " from " ) ) { search source builder from ( request param as int ( " from " , 0 ) ) ; } int size = request param as int ( " size " , - 1 ) ; if ( size ! = - 1 ) { set size accept ( size ) ; } if ( request has param ( " explain " ) ) { search source builder explain ( request param as boolean ( " explain " , null ) ) ; } if ( request has param ( " version " ) ) { search source builder version ( request param as boolean ( " version " , null ) ) ; } if ( request has param ( " seq no primary term " ) ) { search source builder seq no and primary term ( request param as boolean ( " seq no primary term " , null ) ) ; } if ( request has param ( " timeout " ) ) { search source builder timeout ( request param as time ( " timeout " , null ) ) ; } if ( request has param ( " terminate after " ) ) { int terminate after = request param as int ( " terminate after " , search context default terminate after ) ; if ( terminate after < 0 ) { throw new illegal argument exception ( " terminate after must be > 0 " ) ; } else if ( terminate after > 0 ) { search source builder terminate after ( terminate after ) ; } } stored fields context stored fields context = stored fields context from rest request ( search source builder stored fields field get preferred name ( ) , request ) ; if ( stored fields context ! = null ) { search source builder stored fields ( stored fields context ) ; } string s doc value fields = request param ( " docvalue fields " ) ; if ( s doc value fields ! = null ) { if ( strings has text ( s doc value fields ) ) { string [ ] s fields = strings split string by comma to array ( s doc value fields ) ; for ( string field : s fields ) { search source builder doc value field ( field , null ) ; } } } fetch source context fetch source context = fetch source context parse from rest request ( request ) ; if ( fetch source context ! = null ) { search source builder fetch source ( fetch source context ) ; } if ( request has param ( " track scores " ) ) { search source builder track scores ( request param as boolean ( " track scores " , false ) ) ; } if ( request has param ( " track total hits " ) ) { if ( booleans is boolean ( request param ( " track total hits " ) ) ) { search source builder track total hits ( request param as boolean ( " track total hits " , true ) ) ; } else { search source builder track total hits up to ( request param as int ( " track total hits " , search context default track total hits up to ) ) ; } } string s sorts = request param ( " sort " ) ; if ( s sorts ! = null ) { string [ ] sorts = strings split string by comma to array ( s sorts ) ; for ( string sort : sorts ) { int delimiter = sort last index of ( " : " ) ; if ( delimiter ! = - 1 ) { string sort field = sort substring ( 0 , delimiter ) ; string reverse = sort substring ( delimiter + 1 ) ; if ( " asc " equals ( reverse ) ) { search source builder sort ( sort field , sort order asc ) ; } else if ( " desc " equals ( reverse ) ) { search source builder sort ( sort field , sort order desc ) ; } } else { search source builder sort ( sort ) ; } } } string s stats = request param ( " stats " ) ; if ( s stats ! = null ) { search source builder stats ( arrays as list ( strings split string by comma to array ( s stats ) ) ) ; } string suggest field = request param ( " suggest field " ) ; if ( suggest field ! = null ) { string suggest text = request param ( " suggest text " , request param ( " q " ) ) ; int suggest size = request param as int ( " suggest size " , 5 ) ; string suggest mode = request param ( " suggest mode " ) ; search source builder suggest ( new suggest builder ( ) add suggestion ( suggest field , term suggestion ( suggest field ) text ( suggest text ) size ( suggest size ) suggest mode ( suggest mode resolve ( suggest mode ) ) ) ) ; } }


set the declaration order of this advice within the aspect

public void set declaration order ( int order ) { this declaration order = order ; }


public int num heap arenas ( ) { return allocator num heap arenas ( ) ; }


register this { @ code channel } on its { @ link event loop }

public void register ( ) throws exception { channel future future = loop register ( this ) ; assert future is done ( ) ; throwable cause = future cause ( ) ; if ( cause ! = null ) { platform dependent throw exception ( cause ) ; } }


return the object being encapsulated in the { @ link transferable object }


return the nanoseconds until the next scheduled task is ready to be run or { @ code - 1 } if no task is scheduled

protected final long next scheduled task nano ( ) { scheduled future task < ? > scheduled task = peek scheduled task ( ) ; return scheduled task ! = null ? scheduled task delay nanos ( ) : - 1 ; }


number of bytes needed to encode an integer in variable - length format

public static int size of varint ( int value ) { return size of unsigned varint ( ( value < < 1 ) ^ ( value > > 31 ) ) ; }


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 void user status test ( ) { / / todo : test user status }


output the type declaration of the property

public string get type declaration ( schema p ) { schema < ? > schema = model utils unalias schema ( this open a p i , p , import mapping ) ; schema < ? > target = model utils is generate alias as model ( ) ? p : schema ; if ( model utils is array schema ( target ) ) { schema < ? > items = get schema items ( ( array schema ) schema ) ; return get schema type ( target ) + " < " + get type declaration ( items ) + " > " ; } else if ( model utils is map schema ( target ) ) { / / note : model utils is map schema ( p ) returns true when p is a composed schema that also defines / / additionalproperties : true schema < ? > inner = get additional properties ( target ) ; if ( inner = = null ) { logger error ( " ` { } ` ( map property ) does not have a proper inner type defined default to type : string " , p get name ( ) ) ; inner = new string schema ( ) description ( " todo default missing map inner type to string " ) ; p set additional properties ( inner ) ; } return get schema type ( target ) + " < kotlin string , " + get type declaration ( inner ) + " > " ; } return super get type declaration ( target ) ; }


synchronized tuple < recovery source handler , remote recovery target handler > add new recovery ( start recovery request request , index shard shard ) { for ( recovery source handler existing handler : recovery handlers key set ( ) ) { if ( existing handler get request ( ) target allocation id ( ) equals ( request target allocation id ( ) ) ) { throw new delay recovery exception ( " recovery with same target already registered , waiting for " + " previous recovery attempt to be cancelled or completed " ) ; } } final tuple < recovery source handler , remote recovery target handler > handlers = create recovery source handler ( request , shard ) ; recovery handlers put ( handlers v 1 ( ) , handlers v 2 ( ) ) ; return handlers ; }


perform any cleanup to stop this task in sink tasks , this method is invoked only once outstanding calls to other methods have completed ( e g , { @ link # put ( collection ) } has returned ) and a final { @ link # flush ( map ) } and offset commit has completed implementations of this method should only need to perform final cleanup operations , such as closing network connections to the sink system


returns the first { @ link component } of the given type inside of the given dialog

public static < t extends component > t find component ( dialog component provider provider , class < t > desired class ) { return find component ( provider get component ( ) , desired class ) ; }


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


private void create symbols ( ) throws exception { dyld cache local symbols info local symbols info = dyld cache header get local symbols info ( ) ; if ( local symbols info ! = null ) { monitor set message ( " processing dyld symbols " ) ; monitor initialize ( local symbols info get n list ( ) size ( ) ) ; for ( n list nlist : local symbols info get n list ( ) ) { if ( ! nlist get string ( ) trim ( ) is empty ( ) ) { try { program get symbol table ( ) create label ( space get address ( nlist get value ( ) ) , symbol utilities replace invalid chars ( nlist get string ( ) , true ) , program get global namespace ( ) , source type imported ) ; } catch ( exception e ) { log append msg ( e get message ( ) + " " + nlist get string ( ) ) ; } } monitor check canceled ( ) ; monitor increment progress ( 1 ) ; } } }


always returns < tt > integer max value < tt > because a < tt > monitor based priority blocking queue < tt > is not capacity constrained

public int remaining capacity ( ) { return integer max value ; }


build a form - encoding request body with the given form parameters

public request body build request body form encoding ( map < string , object > form params ) { okhttp 3 form body builder form builder = new okhttp 3 form body builder ( ) ; for ( entry < string , object > param : form params entry set ( ) ) { form builder add ( param get key ( ) , parameter to string ( param get value ( ) ) ) ; } return form builder build ( ) ; }


given an index in the range < code > 0 size ( ) - 1 < code > , sets a new value for the < code > index < code > th key - value mapping that this sparse array stores

public void set value at ( int index , e value ) { if ( m garbage ) { gc ( ) ; } m values [ index ] = value ; }


returns the updater that is used to modify the primary graph viewer

public default visual graph view updater < v , e > get view updater ( graph viewer < v , e > viewer ) { visual graph view updater < v , e > updater = viewer get view updater ( ) ; return updater ; }


helper which will throw an exception if the given number of bytes is not available to be read

private void require length ( int required length ) throws i o exception { if ( input available ( ) < required length ) { throw new parse exception ( " truncated annotation attribute " ) ; } }


implementations must implement this method to process the entire result set

t extract data ( result set rs ) throws s q l exception , data access exception ;


specify the { @ code resource } from which mappings are loaded needs to follow the { @ code mime types } file format , as specified by the java activation framework , containing lines such as : < br > { @ code texthtml html htm html htm }

public void set mapping location ( resource mapping location ) { this mapping location = mapping location ; }


determine if option specified as args [ arg offset ]

private boolean has optional arg ( string [ ] args , int arg offset , string option ) { return ( arg offset < args length & & args [ arg offset ] content equals ( option ) ) ; }


public long get branch id ( ) { return branch id ; }


get the value of the ' { @ code onkeydown } ' attribute may be a runtime expression

protected string get onkeydown ( ) { return this onkeydown ; }


a callback that should never be invoked directly

public void get size ( @ non null size ready callback cb ) { cb on size ready ( width , height ) ; }


visits a non standard attribute of the record component

public void visit attribute ( final attribute attribute ) { if ( delegate ! = null ) { delegate visit attribute ( attribute ) ; } }


must be public as it is used during code generation

public void set java object ( t java object ) { this java object = java object ; }


return true if this category object is equal to o

public boolean equals ( object o ) { if ( this = = o ) { return true ; } if ( o = = null | | get class ( ) ! = o get class ( ) ) { return false ; } category category = ( category ) o ; return objects equals ( this id , category id ) & & objects equals ( this name , category name ) ; }


returns this reference object ' s referent if this reference object has been cleared , either by the program or by the garbage collector , then this method returns { @ code null }


returns the internal element type of a given internal array type

public static string internal type from array type ( string internal array type ) { int index = internal array type last index of ( class constants type array ) ; return internal array type substring ( index + 1 ) ; }


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


encode " - x - " in vowel contexts where it is usually pronounced kx ( " ksh " ) account also for bbc pronounciation of = > ks

boolean encode x vowel ( ) { / / e g " sexual " , " connexion " ( british ) , " noxious " if ( string at ( ( m current + 1 ) , 3 , " ual " , " ion " , " iou " , " " ) ) { metaph add ( " kx " , " ks " ) ; advance counter ( 3 , 1 ) ; return true ; } return false ; }


set the array of callbacks to use ignored if you use { @ link # create class } you must use a { @ link callback filter } to specify the index into this array for each method in the proxied class

public void set callbacks ( callback [ ] callbacks ) { if ( callbacks ! = null & & callbacks length = = 0 ) { throw new illegal argument exception ( " array cannot be empty " ) ; } this callbacks = callbacks ; }


returns true if indices with failed to snapshot shards should be partially restored

public boolean partial ( ) { return partial ; }


public static void async http delete ( 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 delete ) ; }


read in " length " bytes , convert to an ascii string this uses { @ link # to char ( byte ) } to escape bytes , so cannot be used for round trip operations

public static string read bytes to string ( file system fs , path path , int length ) throws i o exception { try ( f s data input stream in = fs open ( path ) ) { byte [ ] buf = new byte [ length ] ; in read fully ( 0 , buf ) ; return to char ( buf ) ; } }


the same as above , but specifically for google product search

public static string get product search country t l d ( context context ) { return do get t l d ( google product search country tld , context ) ; }


only one single scope can be added to any setting

public void test mutually exclusive scopes ( ) { / / those should pass setting < string > setting = setting simple string ( " foo bar " , property node scope ) ; assert that ( setting has node scope ( ) , is ( true ) ) ; assert that ( setting has index scope ( ) , is ( false ) ) ; setting = setting simple string ( " foo bar " , property index scope ) ; assert that ( setting has index scope ( ) , is ( true ) ) ; assert that ( setting has node scope ( ) , is ( false ) ) ; / / we accept settings with no scope but they will be rejected when we register with settings module register setting setting = setting simple string ( " foo bar " ) ; assert that ( setting has index scope ( ) , is ( false ) ) ; assert that ( setting has node scope ( ) , is ( false ) ) ; / / we accept settings with multiple scopes but they will be rejected when we register with settings module register setting setting = setting simple string ( " foo bar " , property index scope , property node scope ) ; assert that ( setting has index scope ( ) , is ( true ) ) ; assert that ( setting has node scope ( ) , is ( true ) ) ; }


returns the index to the start of the segment table , relative to the beginning of the file

int get non resident name table offset ( ) { return ne nrestab ; }


equivalent to { @ link # get all ( object ) } but no intermediate list is generated

public iterator < v > value iterator ( k name ) { return new value iterator ( name ) ; }


the stream is out of scope for the http message flow and will no longer be tracked

protected final void remove message ( http 2 stream stream , boolean release ) { full http message msg = stream remove property ( message key ) ; if ( release & & msg ! = null ) { msg release ( ) ; } }


returns true if field success is set ( has been assigned a value ) and false otherwise

public boolean is set success ( ) { return this success ! = null ; }


public final int get index ( ) { if ( index < 0 ) { throw new runtime exception ( " index not yet set " ) ; } return index ; }


matcher that succeeds if a { @ link inspectable component } has text content that matches the provided hamcrest matcher

public static condition < inspectable component > text ( final matcher < string > matcher ) { return text ( new hamcrest condition < > ( matcher ) ) ; }


serialize a response into a { @ link byte buffer } this is used when the response will be encapsulated in an { @ link envelope response } the buffer will contain both the serialized { @ link response header } as well as the bytes from the response there is no ` size ` prefix unlike the output from { @ link # build response send ( abstract response ) } note that envelope requests are reserved only for a p is which have set the { @ link api keys # forwardable } flag notably the ` fetch ` api cannot be forwarded , so we do not lose the benefit of " zero copy " transfers from disk

public byte buffer build response envelope payload ( abstract response body ) { return body serialize with header ( header to response header ( ) , api version ( ) ) ; }


gets the ip value for the ip to state map as either an address of ip or as an ip value , if there is one , in the ip to state map entry indicated by the ordinal

public object get i p ( int ip to state entry ordinal ) throws invalid data type exception { check validity ( ip to state entry ordinal ) ; data type ip to state dt = get data type ( ) ; mem buffer specific mem buffer = get specific mem buffer ( ip to state entry ordinal , ip to state dt ) ; / / component 0 is ulong or displacement if ( is relative ( ) ) { / / displacement address ref address = e h data type utilities get address ( ip to state dt , ip ordinal , specific mem buffer ) ; return get adjusted address ( ref address , 0 ) ; } / / ulong - does this actually represent an address ? scalar scalar value = e h data type utilities get scalar value ( ip to state dt , ip ordinal , specific mem buffer ) ; return scalar value ; }


< code > repeated org apache dubbo metadata definition protobuf model phone number phone = 8 ; < code >

public builder add all phone ( java lang iterable < ? extends org apache dubbo metadata definition protobuf model google p b phone number > values ) { if ( phone builder = = null ) { ensure phone is mutable ( ) ; com google protobuf abstract message lite builder add all ( values , phone ) ; on changed ( ) ; } else { phone builder add all messages ( values ) ; } return this ; }


the restitution ( elasticity ) usually in the range [ 0 , 1 ]

public float get restitution ( ) { return restitution ; }


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


test serialization of outer string types

public void fake outer string serialize test ( ) { string body = null ; / / string response = api fake outer string serialize ( body ) ; / / todo : test validations }


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

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


open and initialize state for { @ link data generator } see { @ link checkpointed function # initialize state }

void open ( string name , function initialization context context , runtime context runtime context ) throws exception ;


assign preempted containers to the applications that have reserved resources for preempted containers

static void assign preempted containers ( f s scheduler node node ) { for ( entry < f s app attempt , resource > entry : node get preemption list ( ) entry set ( ) ) { f s app attempt app = entry get key ( ) ; resource preemption pending = resources clone ( entry get value ( ) ) ; while ( ! app is stopped ( ) & & ! resources is none ( preemption pending ) ) { resource assigned = app assign container ( node ) ; if ( resources is none ( assigned ) | | assigned equals ( fair scheduler container reserved ) ) { / / fail to assign , let ' s not try further break ; } resources subtract from non negative ( preemption pending , assigned ) ; } } }


return the connection properties to be passed to the driver , if any

public properties get connection properties ( ) { return this connection properties ; }


count number of records of the original { @ link k table } that got { @ link k table # group by ( key value mapper ) mapped } to the same key into a new instance of { @ link k table } records with { @ code null } key are ignored the result is written into a local { @ link key value store } ( which is basically an ever - updating materialized view ) furthermore , updates to the store are sent downstream into a { @ link k table } changelog stream not all updates might get sent downstream , as an internal cache is used to deduplicate consecutive updates to the same key the rate of propagated updates depends on your input data rate , the number of distinct keys , the number of parallel running kafka streams instances , and the { @ link streams config configuration } parameters for { @ link streams config # cache max bytes buffering config cache size } , and { @ link streams config # commit interval ms config commit interval } for failure and recovery the store will be backed by an internal changelog topic that will be created in kafka the changelog topic will be named " $ { application id } - $ { internal store name } - changelog " , where " application id " is user - specified in { @ link streams config } via parameter { @ link streams config # application id config application id config } , " internal store name " is an internal name and " - changelog " is a fixed suffix note that the internal store name may not be queryable through interactive queries you can retrieve all generated internal topic names via { @ link topology # describe ( ) }


puts an element from the input stream into state if it is not late registers a timer for the next watermark

public void process element ( row data input , keyed process function < k , row data , row data > context ctx , collector < row data > out ) throws exception { / / register state - cleanup timer register processing cleanup timer ( ctx , ctx timer service ( ) current processing time ( ) ) ; long timestamp = input get long ( row time idx ) ; long cur watermark = ctx timer service ( ) current watermark ( ) ; if ( timestamp > cur watermark ) { / / ensure every key just registers one timer / / default watermark is long min , avoid overflow we use zero when watermark < 0 long trigger ts = cur watermark < 0 ? 0 : cur watermark + 1 ; ctx timer service ( ) register event time timer ( trigger ts ) ; / / put row into state list < row data > row list = input state get ( timestamp ) ; if ( row list = = null ) { row list = new array list < row data > ( ) ; } row list add ( input ) ; input state put ( timestamp , row list ) ; } else { / / discard late record num late records dropped inc ( ) ; } }


public void set physical memory usage ( long usage ) { physical memory usage = usage ; }


get estimated size in bytes for the pinot column deterministic for numeric fields ; use estimate for other types to save calculation

private int get estimated column size in bytes ( data schema column data type data type ) { if ( data type is number ( ) ) { switch ( data type ) { case long : return long bytes ; case float : return float bytes ; case double : return double bytes ; case int : default : return integer bytes ; } } return pinot config get estimated size in bytes for non numeric column ( ) ; }


clean all patch files without install tinker same as { @ code tinker clean patch }

public static void clean patch ( application like application like ) { if ( application like = = null | | application like get application ( ) = = null ) { throw new tinker runtime exception ( " tinker application is null " ) ; } final file tinker dir = share patch file util get patch directory ( application like get application ( ) ) ; if ( ! tinker dir exists ( ) ) { share tinker log w ( tag , " try to clean patch while there ' re not any applied patches " ) ; return ; } final file patch info file = share patch file util get patch info file ( tinker dir get absolute path ( ) ) ; if ( ! patch info file exists ( ) ) { share tinker log w ( tag , " try to clean patch while patch info file does not exist " ) ; return ; } final file patch info lock file = share patch file util get patch info lock file ( tinker dir get absolute path ( ) ) ; final share patch info patch info = share patch info read and check property with lock ( patch info file , patch info lock file ) ; if ( patch info ! = null ) { patch info is remove new version = true ; share patch info rewrite patch info file with lock ( patch info file , patch info , patch info lock file ) ; } }


get the authority score good authorities link to good hubs

public double value get authority score ( ) { return authority score ; }