returns true if the specified oas model has at least one operation with api key authentication

public static boolean has api key methods ( open a p i open a p i ) { final map < string , security scheme > security schemes = get security schemes ( open a p i ) ; if ( security schemes ! = null ) { for ( map entry < string , security scheme > scheme : security schemes entry set ( ) ) { if ( security scheme type apikey equals ( scheme get value ( ) get type ( ) ) ) { return true ; } } } return false ; }


returns an unmodifiable { @ code iterable } over the nodes reachable from any of the { @ code start nodes } , in the order of a depth - first post - order traversal this is equivalent to a depth - first post - order traversal of a graph with an additional root node whose successors are the listed { @ code start nodes }

public final iterable < n > depth first post order ( iterable < ? extends n > start nodes ) { final immutable set < n > validated = validate ( start nodes ) ; return new iterable < n > ( ) { @ override public iterator < n > iterator ( ) { return new traversal ( ) post order ( validated iterator ( ) ) ; } } ; }


protected void insert strict transport security header ( final http servlet response http servlet response , final http servlet request http servlet request ) { insert strict transport security header ( http servlet response , http servlet request , this strict transport security header ) ; }


set whether proxies should perform aggressive optimizations the exact meaning of " aggressive optimizations " will differ between proxies , but there is usually some tradeoff default is " false " for example , optimization will usually mean that advice changes won ' t take effect after a proxy has been created for this reason , optimization is disabled by default an optimize value of " true " may be ignored if other settings preclude optimization : for example , if " expose proxy " is set to " true " and that ' s not compatible with the optimization

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


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


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

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


test that when a function throws an exception this is propagated through on error

public void function throws error ( ) { test flowable f = new test flowable ( " one " ) ; flowable < string > w = flowable unsafe create ( f ) ; final atomic reference < throwable > captured exception = new atomic reference < > ( ) ; flowable < string > flowable = w on error return ( new function < throwable , string > ( ) { @ override public string apply ( throwable e ) { captured exception set ( e ) ; throw new runtime exception ( " exception from function " ) ; } } ) ; subscriber < string > subscriber = test helper mock subscriber ( ) ; flowable subscribe ( subscriber ) ; try { f t join ( ) ; } catch ( interrupted exception e ) { fail ( e get message ( ) ) ; } / / we should get the " one " value before the error verify ( subscriber , times ( 1 ) ) on next ( " one " ) ; / / we should have received an on error call on the observer since the resume function threw an exception verify ( subscriber , times ( 1 ) ) on error ( any ( throwable class ) ) ; verify ( subscriber , times ( 0 ) ) on complete ( ) ; assert not null ( captured exception get ( ) ) ; }


loads the global configuration and adds the given dynamic properties configuration

public static configuration load configuration ( configuration dynamic properties ) { final string config dir = system getenv ( config constants env flink conf dir ) ; if ( config dir = = null ) { return new configuration ( dynamic properties ) ; } return load configuration ( config dir , dynamic properties ) ; }


returns the { @ link executor } that will be used to run this service subclasses may override this method to use a custom { @ link executor } , which may configure its worker thread with a specific name , thread group or priority the returned executor ' s { @ link executor # execute ( runnable ) execute ( ) } method is called when this service is started and stopped , and should return promptly

protected executor executor ( ) { return new executor ( ) { @ override public void execute ( runnable command ) { more executors new thread ( thread name supplier get ( ) , command ) start ( ) ; } } ; }


sets the requirements that need to be met for downloads to progress

public void set requirements ( requirements requirements ) { if ( requirements equals ( requirements watcher get requirements ( ) ) ) { return ; } requirements watcher stop ( ) ; requirements watcher = new requirements watcher ( context , requirements listener , requirements ) ; int not met requirements = requirements watcher start ( ) ; on requirements state changed ( requirements watcher , not met requirements ) ; }


set the isolation level by the name of the corresponding constant in transaction definition , e g " isolation default "

public final void set isolation level name ( string constant name ) throws illegal argument exception { if ( ! constant name starts with ( prefix isolation ) ) { throw new illegal argument exception ( " only isolation constants allowed " ) ; } set isolation level ( constants as number ( constant name ) int value ( ) ) ; }


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


record that the tuple does not contain an element at the position provided

void clear written ( int i ) { written clear ( i ) ; }


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


creates a configured instance from the submitted form hudson only invokes this method when the user wants an instance of { @ code t } so there ' s no need to check that in the implementation starting 1 206 , the default implementation of this method does the following : req bind j s o n ( clazz , form data ) ; which performs the databinding on the constructor of { @ link # clazz } for some types of { @ link describable } , such as { @ link list view column } , this method can be invoked with null request object for historical reason such design is considered broken , but due to the compatibility reasons we cannot fix it because of this , the default implementation gracefully handles null request , but the contract of the method still is " request is always non - null " extension points that need to define the " default instance " semantics should define a descriptor subtype and add the no - arg new instance method

public t new instance ( @ nullable stapler request req , @ non null j s o n object form data ) throws form exception { try { method m = get class ( ) get method ( " new instance " , stapler request class ) ; if ( ! modifier is abstract ( m get declaring class ( ) get modifiers ( ) ) ) { / / this class overrides new instance ( stapler request ) / / maintain the backward compatible behavior return verify new instance ( new instance ( req ) ) ; } else { if ( req = = null ) { / / yes , req is supposed to be always non - null , but see the note above return verify new instance ( clazz new instance ( ) ) ; } / / new behavior as of 1 206 bind interceptor old interceptor = req get bind interceptor ( ) ; try { new instance bind interceptor interceptor ; if ( old interceptor instanceof new instance bind interceptor ) { interceptor = ( new instance bind interceptor ) old interceptor ; } else { interceptor = new new instance bind interceptor ( old interceptor ) ; req set bind interceptor ( interceptor ) ; } interceptor processed put ( form data , true ) ; return verify new instance ( req bind j s o n ( clazz , form data ) ) ; } finally { req set bind interceptor ( old interceptor ) ; } } } catch ( no such method exception e ) { throw new assertion error ( e ) ; / / impossible } catch ( instantiation exception | illegal access exception | runtime exception e ) { throw new error ( " failed to instantiate " + clazz + " from " + redact secret json in error message sanitizer instance sanitize ( form data ) , e ) ; } }


the value of the num annotations item gives the number of runtime - visible annotations represented by the structure note that a maximum of 65535 runtime - visible java programming language annotations may be directly attached to a program element

public int get number of annotations ( ) { return number of annotations & 0xffff ; }


immediately stops a request within a filter or route with specified status code and body content note : when using this don ' t catch exceptions of type halt exception , or if catched , re - throw otherwise halt will not work

public static halt exception halt ( int status , string body ) { throw get instance ( ) halt ( status , body ) ; }


parses an expression - used only in tests

public expression create expression ( string expression , list < sql typed param value > params ) { if ( log is debug enabled ( ) ) { log debug ( " parsing as expression : { } " , expression ) ; } return invoke parser ( expression , params , utc , sql base parser : : single expression , ast builder : : expression ) ; }


returns a factory that always provides a single sample with { @ code time = sample time us } and then end - of - stream

static track data factory single sample with time us ( long sample time us ) { return ( unused format , unused media period id ) - > immutable list of ( one byte sample ( sample time us ) , end of stream item ) ; }


create property matches for the given field property

public static property matches for field ( string property name , class < ? > bean class , int max distance ) { return new field property matches ( property name , bean class , max distance ) ; }


returns < code > true < code > if this shard is a relocation target for another shard ( i e , was created with { @ link # initialize target relocating shard ( ) }

public boolean is relocation target ( ) { return state = = shard routing state initializing & & relocating node id ! = null ; }


returns true if the field contains valid input

public boolean is field valid ( ) { if ( required & & get text ( ) is empty ( ) ) { return false ; } if ( verifier ! = null ) { if ( ! verifier verify ( this ) ) { return false ; } } return true ; }


determines whether the two memory blocks are the same

private boolean same memory block ( memory block block 1 , memory block block 2 ) { if ( block 1 = = null ) { return ( block 2 = = null ) ; } else if ( block 2 = = null ) { return false ; } if ( ! block 1 get name ( ) equals ( block 2 get name ( ) ) ) { return false ; } if ( ! block 1 get start ( ) equals ( block 2 get start ( ) ) ) { return false ; } if ( ! block 1 get end ( ) equals ( block 2 get end ( ) ) ) { return false ; } if ( block 1 get size ( ) ! = block 2 get size ( ) ) { return false ; } if ( block 1 get permissions ( ) ! = block 2 get permissions ( ) ) { return false ; } if ( ! block 1 get type ( ) equals ( block 2 get type ( ) ) ) { return false ; } if ( block 1 is initialized ( ) ! = block 2 is initialized ( ) ) { return false ; } if ( ! system utilities is equal ( block 1 get source name ( ) , block 2 get source name ( ) ) ) { return false ; } if ( ! system utilities is equal ( block 1 get comment ( ) , block 2 get comment ( ) ) ) { return false ; } if ( block 1 is mapped ( ) ! = block 2 is mapped ( ) ) { return false ; } return true ; }


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


returns a string that shows the current line with the field under the cursor in between ' [ ] ' chars

string current token to string ( ) { decompiler panel decompiler panel = controller get decompiler panel ( ) ; field location cursor = decompiler panel get cursor position ( ) ; list < clang line > lines = decompiler panel get lines ( ) ; clang line line = lines get ( cursor get row ( ) ) ; clang token token at cursor = decompiler panel get token at cursor ( ) ; list < clang token > tokens = arrays as list ( token at cursor ) ; string string = line to debug string ( tokens ) ; return string ; }


gets an array with all the scalar values at a code unit and operand index there can be multiple sub - operands and therefore multiple scalars for an operand

private scalar [ ] get scalars ( code unit code unit , int op index ) { scalar cu scalar = code unit get scalar ( op index ) ; if ( cu scalar ! = null ) { return new scalar [ ] { cu scalar } ; } array list < scalar > list = new array list < > ( ) ; if ( code unit instanceof instruction ) { object [ ] objs = ( ( instruction ) code unit ) get op objects ( op index ) ; for ( int index = 0 ; index < objs length ; index + + ) { if ( index > = 0 & & index < objs length & & objs [ index ] instanceof scalar ) { scalar scalar = ( scalar ) objs [ index ] ; if ( ! list contains ( scalar ) ) { list add ( scalar ) ; } } } } return list to array ( new scalar [ list size ( ) ] ) ; }


register a listener that will be called when this model visibility has changed the listener will contribute to this model ' s hash code state per the { @ link com airbnb epoxy epoxy attribute option # do not hash } rules

public model with annotation on visibility changed ( on model visibility changed listener < model with annotation , object > listener ) { on mutation ( ) ; this on model visibility changed listener epoxy generated model = listener ; return this ; }


assert that the counter field is at a specific value

protected void assert counter value ( final int expected ) { assert that ( counter ) described as ( " counter value " ) is equal to ( expected ) ; }


default void begin force landscape ( ) { }


returns the value of a specific property that is included in this profile instance

public string get property value ( string property name ) { return get properties ( ) get ( property name ) ; }


string to string ( final integer n ) { return n = = null ? null : integer to string ( n , radix ) ; }


add exception classes for which server won ' t log stack traces

public void add terse exceptions ( class < ? > exception class ) { exceptions handler add terse logging exceptions ( exception class ) ; }


returns true if this graph allows self - loops ( edges that connect a node to itself ) attempting to add a self - loop to a graph that does not allow them will throw an { @ link illegal argument exception }


returns the next defined data whose min address is closest to and less than the specified address

public data get defined data before ( address addr ) { lock acquire ( ) ; try { d b record rec = data adapter get record before ( addr ) ; return get data d b ( rec ) ; } catch ( i o exception e ) { program db error ( e ) ; } finally { lock release ( ) ; } return null ; }


test serialization of outer string types

public single < string > rx fake outer string serialize ( string body , api client auth info auth info ) { return single create ( new io vertx rx java single on subscribe adapter < > ( fut - > delegate fake outer string serialize ( body , auth info , fut ) ) ) ; }


get the content of the request body as a byte array

public byte [ ] get content as byte array ( ) { return this content ; }


number of lines read , when printing to the console

public long get lines read ( ) { return lines read ; }


inserts the specified element at the front of this deque

public void add first ( e e ) { if ( e = = null ) throw new null pointer exception ( " e = = null " ) ; elements [ head = ( head - 1 ) & ( elements length - 1 ) ] = e ; if ( head = = tail ) double capacity ( ) ; }


public consumer < http response < input stream > > get response interceptor ( ) { return response interceptor ; }


changes the names of the parameters in the array to unique names that won ' t conflict with any other names in the function ' s namespace when the parameters are used to replace the existing parameters in the function appends an integer number to the base name if necessary to create a unique name in the function ' s namespace

public static void set unique parameter names ( function function , list < parameter > parameters ) throws duplicate name exception , invalid input exception { symbol table symbol table = function get program ( ) get symbol table ( ) ; / / create a set containing all the unique parameter names determined so far so they can / / be avoided as additional parameter names are determined set < string > names so far = new hash set < > ( ) ; for ( parameter parameter : parameters ) { string base name = parameter get name ( ) ; string unique name = get unique replacement parameter name ( symbol table , function , base name , names so far ) ; names so far add ( unique name ) ; if ( ! system utilities is equal ( base name , unique name ) ) { parameter set name ( unique name , parameter get source ( ) ) ; } } }


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


listenable future < presto thrift split batch > get splits ( @ thrift field ( name = " schema table name " ) presto thrift schema table name schema table name , @ thrift field ( name = " desired columns " ) presto thrift nullable column set desired columns , @ thrift field ( name = " output constraint " ) presto thrift tuple domain output constraint , @ thrift field ( name = " max split count " ) int max split count , @ thrift field ( name = " next token " ) presto thrift nullable token next token ) ;


set whether to optimize as read - only transaction default is " false " the read - only flag applies to any transaction context , whether backed by an actual resource transaction ( { @ link # propagation required } { @ link # propagation requires new } ) or operating non - transactionally at the resource level ( { @ link # propagation supports } ) in the latter case , the flag will only apply to managed resources within the application , such as a hibernate { @ code session } this just serves as a hint for the actual transaction subsystem ; it will not necessarily cause failure of write access attempts a transaction manager which cannot interpret the read - only hint will not throw an exception when asked for a read - only transaction

public final void set read only ( boolean read only ) { this read only = read only ; }


gets passwordless authentication account

public static < t > t get passwordless authentication account ( final event event , final class < t > clazz ) { if ( event ! = null ) { return event get attributes ( ) get ( " passwordless account " , clazz ) ; } return null ; }


changes the { @ link path pattern parser } on the given { @ linkplain router function router function } this method can be used to change the { @ code path pattern parser } properties from the defaults , for instance to change { @ linkplain path pattern parser # set case sensitive ( boolean ) case sensitivity }

public static < t extends server response > router function < t > change parser ( router function < t > router function , path pattern parser parser ) { assert not null ( router function , " router function must not be null " ) ; assert not null ( parser , " parser must not be null " ) ; change path pattern parser visitor visitor = new change path pattern parser visitor ( parser ) ; router function accept ( visitor ) ; return router function ; }


return a { @ code request predicate } that matches if request ' s http method is { @ code get } and the given { @ code pattern } matches against the request path

public static request predicate get ( string pattern ) { return method ( http method get ) and ( path ( pattern ) ) ; }


write the byte array { @ link # data } to the given output stream

private void write data ( f s data output stream s ) throws i o exception { s write ( data ) ; s close ( ) ; }


returns the expression text for this execution listener comes in handy if you want to check which listeners you already have

public string get expression text ( ) { return expression get expression text ( ) ; }


return the result of processing all the bytes


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


reads the next chunk in the file past the last one specified in the { @ link chunk model }

public synchronized list < string > read next chunk ( ) throws file not found exception , i o exception { if ( raf = = null ) { return collections < string > empty list ( ) ; } / / need to figure out the position of the last read , and the last corresponding line long read pos = 0 ; / / get end file pos of the last visible chunk , if there is one ; if there isn ' t , just / / stay at 0 if ( model get size ( ) > 0 ) { chunk last = model get ( model get size ( ) - 1 ) ; if ( last = = null ) { return collections < string > empty list ( ) ; } read pos = last end ; } / / seek to the point in the file indicated by the chunk , and start reading raf seek ( read pos ) ; return read chunk ( raf get file pointer ( ) ) ; } / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * private methods * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /


constructs a key for loading the prelude bzl

static key key for build prelude ( root root , label label ) { return key create ( root , label , kind prelude ) ; }


shuffles the current play queue this method first backs up the existing play queue and item being played then a newly shuffled play queue will be generated along with currently playing item placed at the beginning of the queue will emit a { @ link reorder event } in any context

public synchronized void shuffle ( ) { if ( backup = = null ) { backup = new array list < > ( streams ) ; } final int origin index = get index ( ) ; final play queue item current = get item ( ) ; collections shuffle ( streams ) ; final int new index = streams index of ( current ) ; if ( new index ! = - 1 ) { streams add ( 0 , streams remove ( new index ) ) ; } queue index set ( 0 ) ; if ( streams size ( ) > 0 ) { history add ( streams get ( 0 ) ) ; } broadcast ( new reorder event ( origin index , queue index get ( ) ) ) ; }


performs a binary search to find the last term with ' key ' as a prefix

static long find max ord ( bytes ref key , sorted set doc values delegate ) throws i o exception { long low = 0 ; long high = delegate get value count ( ) - 1 ; long result = - 1 ; while ( low < = high ) { long mid = ( low + high ) > > > 1 ; final bytes ref term = delegate lookup ord ( mid ) ; int cmp = compare ( key , term ) ; if ( cmp = = 0 ) { result = mid ; low = mid + 1 ; } else if ( cmp < 0 ) { high = mid - 1 ; } else { low = mid + 1 ; } } return result ; }


returns whether this node is a leader node


returns the path for the lock node relative to the given path

protected string get lock path ( string root path ) { return root path + ' / ' + lock node ; }


returns a new server - side { @ link s s l engine } with the current configuration

public final s s l engine new engine ( byte buf allocator alloc ) { return new engine ( alloc , null , - 1 ) ; }


cancel changes made by clicking the cancel button

public album list page cancel changes ( ) { var cancel button = ( html submit input ) page get element by id ( " cancel button " ) ; try { cancel button click ( ) ; } catch ( i o exception e ) { logger error ( " an error occured on cancel changes " , e ) ; } return new album list page ( web client ) ; }


only select jobs which are executable , ie duedate is null or duedate is in the past


check if the current register value and word offset are off by just the low - bit

private boolean check off by one ( register reg , long word offset ) { if ( reg = = null ) { return false ; } big integer val = context get value ( reg , false ) ; if ( val = = null ) { return false ; } long lval = val long value ( ) & pointer mask ; return ( lval = = word offset | | ( lval ^ word offset ) = = 1 ) ; }


configure a path prefix to apply to matching controller methods prefixes are used to enrich the mappings of every { @ code @ request mapping } method whose controller type is matched by the corresponding { @ code predicate } the prefix for the first matching predicate is used consider using { @ link org springframework web method handler type predicate handler type predicate } to group controllers

public path match configurer add path prefix ( string prefix , predicate < class < ? > > predicate ) { if ( this path prefixes = = null ) { this path prefixes = new linked hash map < > ( ) ; } this path prefixes put ( prefix , predicate ) ; return this ; }


allows subclasses to add extra fields to the { @ code descriptor } for an m bean the default implementation sets the { @ code currency time limit } field to the specified " default currency time limit " , if any ( by default none )

protected void populate m bean descriptor ( descriptor descriptor , object managed bean , string bean key ) { apply default currency time limit ( descriptor ) ; }


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


add the other { @ link runfiles } object transitively

private builder merge ( runfiles runfiles , boolean include artifacts ) { / / propagate the most strict conflict checking from merged - in runfiles if ( runfiles conflict policy compare to ( conflict policy ) > 0 ) { conflict policy = runfiles conflict policy ; } if ( runfiles is empty ( ) ) { return this ; } / / the suffix should be the same within any blaze build , except for the empty runfiles , which / / may have an empty suffix , but that is covered above preconditions check argument ( suffix equals ( runfiles suffix ) , " % s ! = % s " , suffix , runfiles suffix ) ; if ( include artifacts ) { artifacts builder add transitive ( runfiles get artifacts ( ) ) ; } symlinks builder add transitive ( runfiles get symlinks ( ) ) ; root symlinks builder add transitive ( runfiles get root symlinks ( ) ) ; extra middlemen builder add transitive ( runfiles get extra middlemen ( ) ) ; if ( empty files supplier = = dummy empty files supplier ) { empty files supplier = runfiles get empty files provider ( ) ; } else { empty files supplier other supplier = runfiles get empty files provider ( ) ; preconditions check state ( ( other supplier = = dummy empty files supplier ) | | empty files supplier equals ( other supplier ) ) ; } return this ; }


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


make sure shutdown now ( ) after shutdown ( ) has an effect

public void calls and shutdown and shutdown now ( ) { subtest calls and shutdown ( false , true ) ; }


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


create a proxy for the specified { @ code target source } that extends the target class of the { @ code target source }

public static object get proxy ( target source target source ) { if ( target source get target class ( ) = = null ) { throw new illegal argument exception ( " cannot create class proxy for target source with null target class " ) ; } proxy factory proxy factory = new proxy factory ( ) ; proxy factory set target source ( target source ) ; proxy factory set proxy target class ( true ) ; return proxy factory get proxy ( ) ; }


specify the pattern to use to format number values if not specified , the default decimal format pattern is used

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


encodes the specified cookie into a cookie header value

public string encode ( cookie cookie ) { string builder buf = string builder ( ) ; encode ( buf , check not null ( cookie , " cookie " ) ) ; return strip trailing separator ( buf ) ; }


the east panel contains the status panel and a spacer

private j panel create east panel ( j panel status panel ) { j panel east panel = new j panel ( new horizontal layout ( 0 ) ) ; east panel add ( status panel ) ; east panel add ( new status bar spacer ( ) ) ; return east panel ; }


this is the main routine for launching a distributed random write job it runs 10 mapsnode and each node writes 1 gig of data to a dfs file the reduce doesn ' t do anything

public int run ( string [ ] args ) throws exception { if ( args length = = 0 ) { return print usage ( ) ; } job job = create job ( get conf ( ) ) ; file output format set output path ( job , new path ( args [ 0 ] ) ) ; date start time = new date ( ) ; system out println ( " job started : " + start time ) ; int ret = job wait for completion ( true ) ? 0 : 1 ; date end time = new date ( ) ; system out println ( " job ended : " + end time ) ; system out println ( " the job took " + ( end time get time ( ) - start time get time ( ) ) / 1000 + " seconds " ) ; return ret ; }


returns an empty { @ link prioritized operator subtask state } singleton for an empty , not - restored operator state

public static prioritized operator subtask state empty not restored ( ) { return empty non restored instance ; }


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


output the language - specific type declaration of a given oas name

public string get type declaration ( string name ) { return name ; }


attempt calling overridden { @ link # do call ( path ) } method with specified { @ link file system } and { @ link path } if the call fails with an unresolved link exception , it will try to resolve the path and retry the call by calling { @ link # next ( file system , path ) }

public t resolve ( final file system filesys , final path path ) throws i o exception { int count = 0 ; t in = null ; path p = path ; / / assumes path belongs to this file system / / callers validate this by passing paths through file system # check path file system fs = filesys ; for ( boolean is link = true ; is link ; ) { try { in = do call ( p ) ; is link = false ; } catch ( unresolved link exception e ) { if ( ! filesys resolve symlinks ) { throw new i o exception ( " path " + path + " contains a symlink " + " and symlink resolution is disabled ( " + common configuration keys fs client resolve remote symlinks key + " ) " , e ) ; } if ( ! file system are symlinks enabled ( ) ) { throw new i o exception ( " symlink resolution is disabled in " + " this version of hadoop " ) ; } if ( count + + > fs constants max path links ) { throw new i o exception ( " possible cyclic loop while " + " following symbolic link " + path ) ; } / / resolve the first unresolved path component p = f s link resolver qualify symlink target ( fs get uri ( ) , p , filesys resolve link ( p ) ) ; fs = file system get f sof path ( p , filesys get conf ( ) ) ; / / have to call next if it ' s a new fs if ( ! fs equals ( filesys ) ) { return next ( fs , p ) ; } / / else , we keep resolving with this filesystem } } / / successful call , path was fully resolved return in ; }


an item leaves the buildable phase it will move to the " left " state if the executors are allocated to it , or it will move to the blocked phase if someone starts vetoing once again

public void on leave buildable ( buildable item bi ) { }


return the default value of the property return null if you do not want a default value any non - null value will cause { { # default value } check to pass

public string to default value ( schema schema ) { if ( schema get default ( ) ! = null ) { return schema get default ( ) to string ( ) ; } return get property default value ( schema ) ; }


on demand stringifier of an i o statistics instance whenever this object ' s to string ( ) method is called , it evaluates the statistics this is for use in log statements where for the cost of creation of this entry is low ; it is affordable to use in log statements

public static object demand stringify i o statistics ( @ nullable i o statistics statistics ) { return new statistics to string ( statistics ) ; }


returns information about the preferred decoder for a given mime type

public static media codec info get decoder info ( string mime type , boolean secure , boolean tunneling ) throws decoder query exception { list < media codec info > decoder infos = get decoder infos ( mime type , secure , tunneling ) ; return decoder infos is empty ( ) ? null : decoder infos get ( 0 ) ; }


protected void after release ( boolean recycled ) { / / nothing to do }


notify the strategy about the task failure cause


displays tag differences if they exist between the two functions

private void add tag details ( styled document doc 1 , styled document doc 2 ) { function func 1 = l 1 get function at ( current p 1 address ) ; function func 2 = ( current p 2 address ! = null ) ? l 2 get function at ( current p 2 address ) : null ; if ( func 1 = = null | | func 2 = = null ) { msg error ( this , " couldn ' t find functions for addresses : " + current p 1 address + " : : " + current p 2 address ) ; } set < function tag > func 1 tags = func 1 get tags ( ) ; set < function tag > func 2 tags = func 2 get tags ( ) ; / / sort the tags before we print out the details - this will make viewing / / the differences much easier func 1 tags = new tree set < > ( func 1 tags ) ; func 2 tags = new tree set < > ( func 2 tags ) ; if ( ! program diff equivalent tag sets ( func 1 tags , func 2 tags ) ) { add text ( doc 1 , indent 2 + " tags : " ) ; add color text ( doc 1 , get tag info ( func 1 tags ) ) ; add text ( doc 1 , new line ) ; add text ( doc 2 , indent 2 + " tags : " ) ; add color text ( doc 2 , get tag info ( func 2 tags ) ) ; add text ( doc 2 , new line ) ; has tag diffs = true ; } has tag diffs = false ; }


returns the { @ link stream operator factory } of this { @ code legacy sink transformation }

public stream operator factory < object > get operator factory ( ) { return operator factory ; }


public string follower index u u i d ( ) { return follower index u u i d ; }


returns the constraints boolean value for matching

public boolean get value ( ) { return match value ; }


returns the callee save registers byte count

public long get callee save registers byte count ( ) { return callee save registers byte count ; }


public status new status ( final q name code value , final string status message ) { val status = saml utils new saml object ( status class ) ; val code = saml utils new saml object ( status code class ) ; code set value ( code value ) ; status set status code ( code ) ; if ( string utils is not blank ( status message ) ) { val message = saml utils new saml object ( status message class ) ; message set value ( status message ) ; status set status message ( message ) ; } return status ; }


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


public builder local endpoint ( @ nullable endpoint local endpoint ) { if ( empty endpoint equals ( local endpoint ) ) local endpoint = null ; this local endpoint = local endpoint ; return this ; }


string get data source ( string name , string primary data source name , list < string > data source names ) ;


public int size ( ) { return on going recoveries size ( ) ; }


public static void start activity ( @ non null final class < ? extends activity > clz , @ nullable final bundle options ) { context context = get top activity or app ( ) ; start activity ( context , null , context get package name ( ) , clz get name ( ) , options ) ; }


scan through the given input , and perform the defined actions

protected void run ( scanner scanner ) { string current profile name = null ; try { while ( scanner has next line ( ) ) { string line = scanner next line ( ) trim ( ) ; / / empty or comment lines if ( line is empty ( ) | | line starts with ( " # " ) ) { on empty or comment line ( current profile name , line ) ; continue ; } / / parse group name returns null if this line does not / / indicate a new property group string new profile name = parse profile name ( line ) ; boolean at new profile starting line = new profile name ! = null ; if ( at new profile starting line ) { if ( current profile name ! = null ) { on profile ending line ( current profile name ) ; } on profile starting line ( new profile name , line ) ; / / start the new profile current profile name = new profile name ; } else { / / parse the property line entry < string , string > property = parse property line ( line ) ; if ( current profile name = = null ) { throw new illegal argument exception ( " property is defined without a preceding profile name " + " current line : " + line ) ; } on profile property ( current profile name , property get key ( ) , property get value ( ) , is supported property ( property get key ( ) ) , line ) ; } } / / eof if ( current profile name ! = null ) { on profile ending line ( current profile name ) ; } on end of file ( ) ; } finally { scanner close ( ) ; } }


public string get sc a e t h flow points ( ) { return sc a e t h flow points ; }


persist the state of the given detached instance according to the given replication mode , reusing the current identifier value

void replicate ( string entity name , object entity , replication mode replication mode ) throws data access exception ;


returns the glyph for the specified code point if the glyph does not exist yet , it is created and queued to be loaded

public glyph get glyph ( int glyph code , int code point , rectangle bounds , glyph vector vector , int index ) { if ( glyph code < 0 | | glyph code > = max glyph code ) { / / glyph vector # get glyph code sometimes returns negative numbers on os x ! ? return new glyph ( code point , bounds , vector , index , this ) { public boolean is missing ( ) { return true ; } } ; } int page index = glyph code / page size ; int glyph index = glyph code & ( page size - 1 ) ; glyph glyph = null ; glyph [ ] page = glyphs [ page index ] ; if ( page ! = null ) { glyph = page [ glyph index ] ; if ( glyph ! = null ) return glyph ; } else page = glyphs [ page index ] = new glyph [ page size ] ; / / add glyph so size information is available and queue it so its image can be loaded later glyph = page [ glyph index ] = new glyph ( code point , bounds , vector , index , this ) ; queued glyphs add ( glyph ) ; return glyph ; }


the number of slices this task should be divided into defaults to 1 meaning the task isn ' t sliced into subtasks a value of 0 is equivalent to the " auto " slices parameter of the rest api

public self set slices ( int slices ) { if ( slices < 0 ) { throw new illegal argument exception ( " [ slices ] must be at least 0 but was [ " + slices + " ] " ) ; } this slices = slices ; return self ( ) ; }


specifies the types for the csv fields this method parses the csv data to a 8 - tuple which has fields of the specified types this method is overloaded for each possible length of the tuples to support type safe creation of data sets through csv parsing

public < t0 , t1 , t2 , t3 , t4 , t5 , t6 , t7 > data source < tuple 8 < t0 , t1 , t2 , t3 , t4 , t5 , t6 , t7 > > types ( class < t0 > type 0 , class < t1 > type 1 , class < t2 > type 2 , class < t3 > type 3 , class < t4 > type 4 , class < t5 > type 5 , class < t6 > type 6 , class < t7 > type 7 ) { tuple type info < tuple 8 < t0 , t1 , t2 , t3 , t4 , t5 , t6 , t7 > > types = tuple type info get basic and basic value tuple type info ( type 0 , type 1 , type 2 , type 3 , type 4 , type 5 , type 6 , type 7 ) ; csv input format < tuple 8 < t0 , t1 , t2 , t3 , t4 , t5 , t6 , t7 > > input format = new tuple csv input format < tuple 8 < t0 , t1 , t2 , t3 , t4 , t5 , t6 , t7 > > ( path , types , this included mask ) ; configure input format ( input format ) ; return new data source < tuple 8 < t0 , t1 , t2 , t3 , t4 , t5 , t6 , t7 > > ( execution context , input format , types , utils get call location name ( ) ) ; }


this implementation returns the hash code of the underlying class path location

public int hash code ( ) { return this path hash code ( ) ; }


returns the handler for the given method and version if a handler for given version do not exist , a handler for version current will be returned the reasoning behind is that in a minor a new api could be added passively , therefore new a p is are compatible ( as opposed to non - compatiblebreaking ) or { @ code null } if none exists

rest handler get handler ( rest request method method , version version ) { map < version , rest handler > version to handlers = method handlers get ( method ) ; if ( version to handlers = = null ) { return null ; / / method not found } final rest handler handler = version to handlers get ( version ) ; return handler = = null ? version to handlers get ( version current ) : handler ; }


generate salted hash for specified message supplied salt is returned as prefix to returned hash

public static char [ ] get salted hash ( string algorithm , char [ ] salt , char [ ] msg ) { message digest message digest = get message digest ( algorithm ) ; byte [ ] msg bytes = new byte [ msg length + salt length ] ; try { for ( int i = 0 ; i < salt length ; i + + ) { msg bytes [ i ] = ( byte ) salt [ i ] ; } for ( int i = 0 ; i < msg length ; i + + ) { msg bytes [ i + salt length ] = ( byte ) msg [ i ] ; } char [ ] hash = hex dump ( message digest digest ( msg bytes ) ) ; char [ ] salted hash = new char [ hash length + salt length ] ; system arraycopy ( salt , 0 , salted hash , 0 , salt length ) ; system arraycopy ( hash , 0 , salted hash , salt length , hash length ) ; return salted hash ; } finally { / / attempt to remove message from memory since it may be a password arrays fill ( msg bytes , ( byte ) 0 ) ; } }


protected string home dir ( string username ) { return registry utils home path for user ( username ) ; }


asserts that there were no verification errors during the current test , failing immediately if any are found

public void check for verification errors ( ) { stb check for verification errors ( ) ; }


form parameter enum test ( string array )

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


public int normal cache size ( ) { return normal cache size ; }


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


enumerate the parameter names and values with their corresponding sql type if available , or just return the simple { @ code sql parameter source } implementation class name otherwise

public string to string ( ) { string [ ] parameter names = get parameter names ( ) ; if ( parameter names ! = null ) { string joiner result = new string joiner ( " , " , get class ( ) get simple name ( ) + " { " , " } " ) ; for ( string parameter name : parameter names ) { object value = get value ( parameter name ) ; if ( value instanceof sql parameter value ) { value = ( ( sql parameter value ) value ) get value ( ) ; } string type name = get type name ( parameter name ) ; if ( type name = = null ) { int sql type = get sql type ( parameter name ) ; if ( sql type ! = type unknown ) { type name = jdbc utils resolve type name ( sql type ) ; if ( type name = = null ) { type name = string value of ( sql type ) ; } } } string builder entry = new string builder ( ) ; entry append ( parameter name ) append ( ' = ' ) append ( value ) ; if ( type name ! = null ) { entry append ( " ( type : " ) append ( type name ) append ( ' ) ' ) ; } result add ( entry ) ; } return result to string ( ) ; } else { return get class ( ) get simple name ( ) ; } }


public boolean is timed out ( ) { return internal response timed out ( ) ; }


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


given a shortname , built a long name with the krb instance and realm info

private string user on host ( final string shortname ) { return shortname + " / " + krb instance + " @ " + get realm ( ) ; }


called upon the establishment of a new client connection

server transport listener transport created ( server transport transport ) ;


prefix a property with { @ link # restore consumer prefix } this is used to isolate { @ link consumer config restore consumer configs } from other client configs

public static string restore consumer prefix ( final string consumer prop ) { return restore consumer prefix + consumer prop ; }


extends the amount of time after which the result will expire ( defaults to no extension )

public get async result request set keep alive ( time value time value ) { this keep alive = time value ; return this ; }


gets a string that provides information about the function information for this object ' s program and address

public string to string ( ) { string buffer buffer = new string buffer ( ) ; buffer append ( " e h function info " + new line ) ; buffer append ( indent + " program : " + get program ( ) get domain file ( ) get pathname ( ) + new line ) ; buffer append ( indent + " address : " + get address ( ) to string ( true ) + new line ) ; buffer append ( indent + " fits in single memory block : " + fits in single memory block ( ) + new line ) ; buffer append ( indent + " is relative : " + is relative ( ) + new line ) ; buffer append ( indent + " default pointer size : " + get default pointer size ( ) + new line ) ; buffer append ( indent + " magic num : " + " 0x " + long to hex string ( magic num ) + new line ) ; buffer append ( indent + " bbt flags : " + " 0x " + long to hex string ( bbt flags ) + new line ) ; data type dt = get data type ( ) ; if ( dt ! = null ) { buffer append ( new line + dt to string ( ) + new line ) ; if ( dt instanceof type def ) { data type base data type = ( ( type def ) dt ) get base data type ( ) ; buffer append ( new line + base data type to string ( ) + new line ) ; } } return buffer to string ( ) ; }


public void set pdb file type ( pdb file type file type ) { this file type = file type ; }


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


fallback if none of the other { @ code decorrelate rel } methods match

public frame decorrelate rel ( rel node rel ) { rel node new rel = rel copy ( rel get trait set ( ) , rel get inputs ( ) ) ; if ( rel get inputs ( ) size ( ) > 0 ) { list < rel node > old inputs = rel get inputs ( ) ; list < rel node > new inputs = new array list < > ( ) ; for ( int i = 0 ; i < old inputs size ( ) ; + + i ) { final frame frame = get invoke ( old inputs get ( i ) , rel ) ; if ( frame = = null | | ! frame cor def outputs is empty ( ) ) { / / if input is not rewritten , or if it produces correlated / / variables , terminate rewrite return null ; } new inputs add ( frame r ) ; new rel replace input ( i , frame r ) ; } if ( ! util equal shallow ( old inputs , new inputs ) ) { new rel = rel copy ( rel get trait set ( ) , new inputs ) ; } } / / the output position should not change since there are no cor vars / / coming from below return register ( rel , new rel , identity map ( rel get row type ( ) get field count ( ) ) , immutable sorted map of ( ) ) ; }


like { @ code scratch file } , but the file is first deleted if it already exists

public path overwrite file ( string path name , charset charset , string lines ) throws i o exception { path old file = resolve ( path name ) ; long new m time = old file exists ( ) ? old file get last modified time ( ) + 1 : - 1 ; old file delete ( ) ; path new file = file ( path name , charset , lines ) ; new file set last modified time ( new m time ) ; return new file ; }


returns the { @ link dialog component provider } with the given title this method is not preferred , but instead you should use a { @ link # wait for dialog component ( class ) } that takes a class so that you can get the correct return type this method is meant for clients that need a dialog , but that type is private of package restricted and thus cannot be referenced by a test also , code that relies on a title is more subject to breaking when code is refactored ; code that relies on class types will get refactored along side the referenced code < p > this method will fail if no dialog can be found

public static dialog component provider wait for dialog component ( string title ) { window window = wait for window ( title ) ; assert not null ( " no window found with title ' " + title + " ' " , window ) ; if ( ! ( window instanceof docking dialog ) ) { fail ( " window is not a docking dialog - ' " + title + " ' " ) ; } docking dialog dd = ( docking dialog ) window ; return dd get dialog component ( ) ; }


public void put ( @ non null final string key , final long value , final boolean is commit ) { if ( is commit ) { sp edit ( ) put long ( key , value ) commit ( ) ; } else { sp edit ( ) put long ( key , value ) apply ( ) ; } }


set the highlight based on the current program differences , but do not set the highlight for set of addresses to be ignored

private void set diff highlight ( ) { if ( diff control = = null ) { return ; } address set view p 1 diff set = null ; try { p 1 diff set = diff control get filtered differences ( task monitor adapter dummy monitor ) ; } catch ( cancelled exception e ) { / / shouldn ' t get this , since using a dummy monitor } address set p 2 diff set = diff utility get compatible address set ( p 1 diff set , secondary diff program ) ; program selection p 2 diff selection = new program selection ( p 2 address factory , p 2 diff set ) ; p 2 diff highlight = p 2 diff selection ; address set p 2 diff set as p 1 = diff utility get compatible address set ( p 2 diff set , primary program ) ; / / must be on the swing thread to modify marker sets run swing ( ( ) - > { / / right side markers need p 1 addresses since they use p 1 index map marker set diff markers = get diff markers ( ) ; / / get right side markers for program 2 diff markers clear all ( ) ; diff markers add ( p 2 diff set ) ; marker set code viewer diff markers = get code viewer markers ( ) ; / / get left side markers for program 1 code viewer diff markers clear all ( ) ; code viewer diff markers add ( p 2 diff set as p 1 ) ; diff listing panel get field panel ( ) repaint ( ) ; } ) ; }


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


model tests for additional properties integer

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


after all tests have run , close the filesystems

public static void close file systems ( ) { i o utils cleanup with logger ( log , auth f s , unguarded f s ) ; }


returns the first program being compared by this < code > program diff < code >

public program get program one ( ) { return program 1 ; }


public void update pet test ( ) { pet body = null ; / / api update pet ( body ) ; / / todo : test validations }


used as ad hoc to check the time stamp of the last full cycle of { @ link # lazy persist file scrubber } daemon this is used by the junit tests to block until { @ link # lazy persist file scrubber t s } is updated

public long get lazy persist file scrubber t s ( ) { return lazy persist file scrubber = = null ? - 1 : lazy persist file scrubber t s get ( ) ; }


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

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


validates that schemes other than ' file : ' are not allowed

public void test non file scheme path ( ) throws exception { string checkpoint path = temp folder new folder ( ) to u r i ( ) to string ( ) ; rocks d b state backend rocks db backend = new rocks d b state backend ( checkpoint path ) ; rocks db backend set db storage path ( " hdfs : / / / some / path / to / perdition " ) ; }


runs the specified script with the specified state

private boolean run script ( ghidra state script state , ghidra script script ) { resource file src file = script get source file ( ) ; string script name = src file ! = null ? src file get absolute path ( ) : ( script get class ( ) get name ( ) + " class " ) ; try { print writer writer = new print writer ( system out ) ; msg info ( this , " script : " + script name ) ; script execute ( script state , task monitor dummy , writer ) ; writer flush ( ) ; } catch ( exception exc ) { program prog = script state get current program ( ) ; string path = ( prog ! = null ? prog get executable path ( ) : " current program is null " ) ; string log error msg = path + " \ n r e p o r t script error : " + script name + " : " + exc get message ( ) ; msg error ( this , log error msg , exc ) ; return false ; } return true ; }


public void delete datafeed config ( string datafeed id , action listener < delete response > action listener ) { delete request request = new delete request ( ml config index index name ( ) , datafeed config document id ( datafeed id ) ) ; request set refresh policy ( write request refresh policy immediate ) ; execute async with origin ( client , ml origin , delete action instance , request , new action listener < delete response > ( ) { @ override public void on response ( delete response delete response ) { if ( delete response get result ( ) = = doc write response result not found ) { action listener on failure ( exceptions helper missing datafeed exception ( datafeed id ) ) ; return ; } assert delete response get result ( ) = = doc write response result deleted ; action listener on response ( delete response ) ; } @ override public void on failure ( exception e ) { action listener on failure ( e ) ; } } ) ; }


controls the response of an observer to the receipt of a quorumpacket

protected void process packet ( quorum packet qp ) throws exception { txn log entry log entry ; txn header hdr ; txn digest digest ; record txn ; switch ( qp get type ( ) ) { case leader ping : ping ( qp ) ; break ; case leader proposal : log warn ( " ignoring proposal " ) ; break ; case leader commit : log warn ( " ignoring commit " ) ; break ; case leader uptodate : log error ( " received an uptodate message after observer started " ) ; break ; case leader revalidate : revalidate ( qp ) ; break ; case leader sync : ( ( observer zoo keeper server ) zk ) sync ( ) ; break ; case leader inform : server metrics get metrics ( ) learner commit received count add ( 1 ) ; log entry = serialize utils deserialize txn ( qp get data ( ) ) ; hdr = log entry get header ( ) ; txn = log entry get txn ( ) ; digest = log entry get digest ( ) ; request request = new request ( hdr get client id ( ) , hdr get cxid ( ) , hdr get type ( ) , hdr , txn , 0 ) ; request log latency ( server metrics get metrics ( ) commit propagation latency ) ; request set txn digest ( digest ) ; observer zoo keeper server obs = ( observer zoo keeper server ) zk ; obs commit request ( request ) ; break ; case leader informandactivate : / / get new designated leader from ( current ) leader ' s message byte buffer buffer = byte buffer wrap ( qp get data ( ) ) ; long suggested leader id = buffer get long ( ) ; byte [ ] remainingdata = new byte [ buffer remaining ( ) ] ; buffer get ( remainingdata ) ; log entry = serialize utils deserialize txn ( remainingdata ) ; hdr = log entry get header ( ) ; txn = log entry get txn ( ) ; digest = log entry get digest ( ) ; quorum verifier qv = self config from string ( new string ( ( ( set data txn ) txn ) get data ( ) , utf 8 ) ) ; request = new request ( hdr get client id ( ) , hdr get cxid ( ) , hdr get type ( ) , hdr , txn , 0 ) ; request set txn digest ( digest ) ; obs = ( observer zoo keeper server ) zk ; boolean major change = self process reconfig ( qv , suggested leader id , qp get zxid ( ) , true ) ; obs commit request ( request ) ; if ( major change ) { throw new exception ( " changes proposed in reconfig " ) ; } break ; default : log warn ( " unknown packet type : { } " , learner handler packet to string ( qp ) ) ; break ; } }


clear any record of which writables have been written to , without releasing storage

void clear written ( ) { written clear ( ) ; }


void incr expired heartbeats ( ) { expired heartbeats + + ; }


public boolean keyed ( ) { return keyed ; }


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


returns all vertices on any task failure

public set < execution vertex i d > get tasks needing restart ( execution vertex i d execution vertex id , throwable cause ) { return iterable utils to stream ( topology get vertices ( ) ) map ( scheduling execution vertex : : get id ) collect ( collectors to set ( ) ) ; }


load layout version from root element in the xml configuration file

private int load layout version ( element root ) { int layout version ; text text = ( text ) root get elements by tag name ( " layoutversion " ) item ( 0 ) get first child ( ) ; if ( text ! = null ) { string value = text get data ( ) trim ( ) ; try { layout version = integer parse int ( value ) ; } catch ( number format exception e ) { throw new illegal argument exception ( " bad layout version value " + value + " is found it should be an integer " ) ; } } else { throw new illegal argument exception ( " value of < layout version > is null " ) ; } return layout version ; }


{ @ link mockito # verify no more interactions ( object ) }


helper method to pre - set the oauth access token of the first oauth found in the api authorizations ( there should be only one )

public void set access token ( string access token , long expires in ) { for ( request interceptor api authorization : api authorizations values ( ) ) { if ( api authorization instanceof o auth ) { o auth oauth = ( o auth ) api authorization ; oauth set access token ( access token , expires in ) ; return ; } } }


access to response body assertions with specific namespaces using an x path expression to inspect a specific subset of the body the x path expression can be a parameterized string using formatting specifiers as defined in { @ link string # format }

xpath assertions xpath ( string expression , @ nullable map < string , string > namespaces , object args ) ;


public static void assert gauge ( string name , int expected , metrics source source ) { assert gauge ( name , expected , get metrics ( source ) ) ; }


0 11 0 0 clients can talk with older brokers , but the create topic api was added in 0 10 1 0 that means , if our topic admin talks to a pre 0 10 1 broker , it should receive an unsupported version exception , should create no topics , and return false

public void return null with api version mismatch on create ( ) { final new topic new topic = topic admin define topic ( " my topic " ) partitions ( 1 ) compacted ( ) build ( ) ; cluster cluster = create cluster ( 1 ) ; try ( admin client unit test env env = new admin client unit test env ( new mock time ( ) , cluster ) ) { env kafka client ( ) set node api versions ( node api versions create ( ) ) ; env kafka client ( ) prepare response ( create topic response with unsupported version ( new topic ) ) ; topic admin admin = new topic admin ( null , env admin client ( ) ) ; boolean created = admin create topic ( new topic ) ; assert false ( created ) ; } }


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

public static fields find by thrift id ( int field id ) { switch ( field id ) { default : return null ; } }


computes the hash for the composite of key and namespace and performs some steps of incremental rehash if incremental rehashing is in progress

private int compute hash for operation and do incremental rehash ( k key , n namespace ) { if ( is rehashing ( ) ) { incremental rehash ( ) ; } return composite hash ( key , namespace ) ; }


public file system get file system ( ) { return file system ; }


filter by enableddisabled status of jobs null for no filter , true for enabled - only , false for disabled - only status filter is now controlled via a job view filter , see { @ link status filter }

public boolean get status filter ( ) { return status filter ; }


this tests whether merging works correctly with the count trigger

public void test session windows with count trigger ( ) throws exception { close called set ( 0 ) ; final int session size = 3 ; list state descriptor < tuple 2 < string , integer > > state desc = new list state descriptor < > ( " window - contents " , string int tuple create serializer ( new execution config ( ) ) ) ; window operator < string , tuple 2 < string , integer > , iterable < tuple 2 < string , integer > > , tuple 3 < string , long , long > , time window > operator = new window operator < > ( event time session windows with gap ( time seconds ( session size ) ) , new time window serializer ( ) , new tuple key selector ( ) , basic type info string type info create serializer ( new execution config ( ) ) , state desc , new internal iterable window function < > ( new session window function ( ) ) , purging trigger of ( count trigger of ( 4 ) ) , 0 , null / * late data output tag * / ) ; one input stream operator test harness < tuple 2 < string , integer > , tuple 3 < string , long , long > > test harness = create test harness ( operator ) ; concurrent linked queue < object > expected output = new concurrent linked queue < > ( ) ; test harness open ( ) ; / / add elements out - of - order test harness process element ( new stream record < > ( new tuple 2 < > ( " key 2 " , 1 ) , 0 ) ) ; test harness process element ( new stream record < > ( new tuple 2 < > ( " key 2 " , 2 ) , 1000 ) ) ; test harness process element ( new stream record < > ( new tuple 2 < > ( " key 2 " , 3 ) , 2500 ) ) ; test harness process element ( new stream record < > ( new tuple 2 < > ( " key 2 " , 4 ) , 3500 ) ) ; test harness process element ( new stream record < > ( new tuple 2 < > ( " key 1 " , 1 ) , 10 ) ) ; test harness process element ( new stream record < > ( new tuple 2 < > ( " key 1 " , 2 ) , 1000 ) ) ; / / do a snapshot , close and restore again operator subtask state snapshot = test harness snapshot ( 0l , 0l ) ; test harness close ( ) ; expected output add ( new stream record < > ( new tuple 3 < > ( " key 2 - 10 " , 0l , 6500l ) , 6499 ) ) ; test harness util assert output equals sorted ( " output was not correct " , expected output , test harness get output ( ) , new tuple 3 result sort comparator ( ) ) ; expected output clear ( ) ; test harness = create test harness ( operator ) ; test harness setup ( ) ; test harness initialize state ( snapshot ) ; test harness open ( ) ; test harness process element ( new stream record < > ( new tuple 2 < > ( " key 1 " , 3 ) , 2500 ) ) ; test harness process element ( new stream record < > ( new tuple 2 < > ( " key 1 " , 1 ) , 6000 ) ) ; test harness process element ( new stream record < > ( new tuple 2 < > ( " key 1 " , 2 ) , 6500 ) ) ; test harness process element ( new stream record < > ( new tuple 2 < > ( " key 1 " , 3 ) , 7000 ) ) ; test harness util assert output equals sorted ( " output was not correct " , expected output , test harness get output ( ) , new tuple 3 result sort comparator ( ) ) ; / / add an element that merges the two " key 1 " sessions , they should now have count 6 , and / / therefore fire test harness process element ( new stream record < > ( new tuple 2 < > ( " key 1 " , 10 ) , 4500 ) ) ; expected output add ( new stream record < > ( new tuple 3 < > ( " key 1 - 22 " , 10l , 10000l ) , 9999l ) ) ; test harness util assert output equals sorted ( " output was not correct " , expected output , test harness get output ( ) , new tuple 3 result sort comparator ( ) ) ; test harness close ( ) ; }


return the configured passcode to use for connections to the stomp broker on behalf of connected clients

public string get client passcode ( ) { return this client passcode ; }


public long get $ special property name ( ) { return $ special property name ; }


create a shallow copy of this builder with a new slice configuration

public search source builder shallow copy ( ) { return shallow copy ( query builder , post query builder , aggregations , slice builder , sorts , rescore builders , highlight builder ) ; }


returns the new { @ link platform info } instance

public platform info build ( ) throws duplicate constraint exception , exec properties exception { check remote execution properties ( ) ; / / merge the remote execution properties string remote execution properties = merge remote execution properties ( parent , this remote execution properties ) ; immutable map < string , string > exec properties = merge exec properties ( parent , this exec properties ) ; if ( exec properties = = null ) { exec properties = immutable map of ( ) ; } return new platform info ( label , constraints build ( ) , remote execution properties , exec properties , creation location ) ; }


ends the tar archive without closing the underlying output stream the result is that the two eof records of nulls are written

public void finish ( ) throws i o exception { / / see bugzilla 28776 for a discussion on this / / http : / / issues apache org / bugzilla / show bug cgi ? id = 28776 this write e o f record ( ) ; this write e o f record ( ) ; }


map from the given { @ link message headers } to the specified target message

void from headers ( message headers headers , t target ) ;


returns the current selection color setting

public final color get selected highlight color ( ) { return selected highlight color ; }


public static < t > ordering < t > from ( ordering < t > ordering ) { return check not null ( ordering ) ; }


helper method to return a literal bits comment string

protected static string literal bits comment ( cst literal bits value , int width ) { string buffer sb = new string buffer ( 20 ) ; sb append ( " # " ) ; long bits ; if ( value instanceof cst literal 6 4 ) { bits = ( ( cst literal 6 4 ) value ) get long bits ( ) ; } else { bits = value get int bits ( ) ; } switch ( width ) { case 4 : sb append ( hex u nibble ( ( int ) bits ) ) ; break ; case 8 : sb append ( hex u 1 ( ( int ) bits ) ) ; break ; case 16 : sb append ( hex u 2 ( ( int ) bits ) ) ; break ; case 32 : sb append ( hex u 4 ( ( int ) bits ) ) ; break ; case 64 : sb append ( hex u 8 ( bits ) ) ; break ; default : { throw new runtime exception ( " shouldn ' t happen " ) ; } } return sb to string ( ) ; }


returns the maximum height in pixels across all legend labels

public float get maximum entry height ( paint p ) { float max = 0f ; for ( legend entry entry : m entries ) { string label = entry label ; if ( label = = null ) continue ; float length = ( float ) utils calc text height ( p , label ) ; if ( length > max ) max = length ; } return max ; }


test with record length set to a negative value

public void test negative record length ( ) throws exception { local fs delete ( work dir , true ) ; path file = new path ( work dir , new string ( " test format txt " ) ) ; create file ( file , null , 10 , 10 ) ; / / set the fixed length record length config property job job = job get instance ( default conf ) ; fixed length input format format = new fixed length input format ( ) ; format set record length ( job get configuration ( ) , - 10 ) ; file input format set input paths ( job , work dir ) ; list < input split > splits = format get splits ( job ) ; boolean exception thrown = false ; for ( input split split : splits ) { try { task attempt context context = map reduce test util create dummy map task attempt context ( job get configuration ( ) ) ; record reader < long writable , bytes writable > reader = format create record reader ( split , context ) ; map context < long writable , bytes writable , long writable , bytes writable > mcontext = new map context impl < long writable , bytes writable , long writable , bytes writable > ( job get configuration ( ) , context get task attempt i d ( ) , reader , null , null , map reduce test util create dummy reporter ( ) , split ) ; reader initialize ( split , mcontext ) ; } catch ( i o exception ioe ) { exception thrown = true ; log info ( " exception message : " + ioe get message ( ) ) ; } } assert true ( " exception for negative record length : " , exception thrown ) ; }


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


public string get location ( ) { return location ; }


removes correlated variables from the tree at root cor rel

private void remove cor var from tree ( correlate correlate ) { if ( cm map cor to cor rel get ( correlate get correlation id ( ) ) = = correlate ) { cm map cor to cor rel remove ( correlate get correlation id ( ) ) ; } }


recursively run through this structured block graph finding the block copy leaves using the block copy altindex , lookup the original block copy in - ingraph - and transfer the object ref and address into the leaf

public void transfer object ref ( block graph ingraph ) { array list < block graph > queue = new array list < block graph > ( ) ; int pos = 0 ; queue add ( this ) ; while ( pos < queue size ( ) ) { block graph curgraph = queue get ( pos ) ; pos + = 1 ; int sz = curgraph get size ( ) ; for ( int i = 0 ; i < sz ; + + i ) { pcode block block = curgraph get block ( i ) ; if ( block instanceof block copy ) { block copy copyblock = ( block copy ) block ; int altindex = copyblock get alt index ( ) ; if ( altindex < ingraph get size ( ) ) { pcode block block 2 = ingraph get block ( altindex ) ; if ( block 2 instanceof block copy ) { block copy copyblock 2 = ( block copy ) block 2 ; copyblock set ( copyblock 2 get ref ( ) , copyblock 2 get start ( ) ) ; / / transfer the object reference } } } else if ( block instanceof block graph ) queue add ( ( block graph ) block ) ; } } }


verify iterator of { @ link map state } supporting arbitrary access , see [ flink - 10267 ] to know more details

public void test map state iterator arbitrary access ( ) throws exception { map state descriptor < integer , long > kv id = new map state descriptor < > ( " id " , integer class , long class ) ; checkpointable keyed state backend < integer > backend = create keyed backend ( int serializer instance ) ; try { map state < integer , long > state = backend get partitioned state ( void namespace instance , void namespace serializer instance , kv id ) ; backend set current key ( 1 ) ; int state size = 4096 ; for ( int i = 0 ; i < state size ; i + + ) { state put ( i , i * 2l ) ; } iterator < map entry < integer , long > > iterator = state iterator ( ) ; int iterator count = 0 ; while ( iterator has next ( ) ) { map entry < integer , long > entry = iterator next ( ) ; assert equals ( iterator count , ( int ) entry get key ( ) ) ; switch ( thread local random current ( ) next int ( ) % 3 ) { case 0 : / / remove twice iterator remove ( ) ; try { iterator remove ( ) ; fail ( ) ; } catch ( illegal state exception e ) { / / ignore expected exception } break ; case 1 : / / has next - > remove iterator has next ( ) ; iterator remove ( ) ; break ; case 2 : / / nothing to do break ; } iterator count + + ; } assert equals ( state size , iterator count ) ; } finally { backend dispose ( ) ; } }


return { @ link http message writer http message writers } to write and encode the request body with

list < http message writer < ? > > message writers ( ) ;


creates an ndk release for r 1 1 + ( uses source properties )

private static ndk release create from source properties ( string release string ) { properties properties = new properties ( ) ; try { properties load ( new string reader ( release string ) ) ; } catch ( i o exception e ) { / / this shouldn ' t happen from a string reader throw new illegal state exception ( e ) ; } string revision = properties get property ( revision property ) ; string [ ] revision parsed = revision split ( " \ \ " ) ; if ( revision parsed length < 2 ) { / / unable to parse pkg revision return invalid ndk release that is assumed to be the / / latest ndk revision return new ndk release ( revision , false , android ndk crosstools latest known revision get key ( ) , null , null , false ) ; } else { return new ndk release ( revision , / / raw revision / * is valid = * / true , integer parse int ( revision parsed [ 0 ] ) , / / major revision revision parsed [ 1 ] , / / minor revision null , / / release candidate true / / is 6 4 bit 32 - bit n d ks are provided for only windows ) ; } }


called right after { @ link web element # get text ( ) } method is being called

void after get text ( web element element , web driver driver , string text ) ;


compare string array 1 and string array 2 return the different in str 1

public static string [ ] compare string ( final string [ ] string array 1 , final string [ ] string array 2 ) { string [ ] different string = null ; if ( string array 1 ! = null & & string array 2 ! = null ) { list < string > list = new array list < string > ( ) ; for ( int i = 0 ; i < string array 1 length ; i + + ) { boolean sign = false ; for ( int j = 0 ; j < string array 2 length ; j + + ) { if ( string array 1 [ i ] equals ( string array 2 [ j ] ) ) { sign = true ; break ; } } if ( ! sign ) { list add ( string array 1 [ i ] ) ; } } different string = new string [ list size ( ) ] ; different string = list to array ( different string ) ; } return different string ; }


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


close the closeable objects and < b > ignore < b > any { @ link i o exception } or null pointers must only be used for cleanup in exception handlers

public static void cleanup with logger ( logger log , java io closeable closeables ) { for ( java io closeable c : closeables ) { if ( c ! = null ) { try { c close ( ) ; } catch ( throwable e ) { if ( log ! = null & & log is debug enabled ( ) ) { log debug ( " exception in closing " + c , e ) ; } } } } }


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


disposes this model once a model has been disposed , it cannot be reused

public void dispose ( ) { update manager dispose ( ) ; if ( worker ! = null ) { worker dispose ( ) ; } do clear data ( ) ; dispose dynamic column data ( ) ; }


queries whether any threads are waiting for the given guard to become satisfied note that because timeouts and interrupts may occur at any time , a { @ code true } return does not guarantee that the guard becoming satisfied in the future will awaken any threads this method is designed primarily for use in monitoring of the system state

public boolean has waiters ( guard guard ) { return get wait queue length ( guard ) > 0 ; }


sets the < code > my boolean < code > property

public outer composite my boolean ( boolean my boolean ) { this my boolean = my boolean ; return this ; }


add a starved application if it is not already added

void add starved app ( f s app attempt app ) { if ( ! app equals ( app being processed ) & & ! apps to process contains ( app ) ) { apps to process add ( app ) ; } }


gets the underlying queue that backs the executor service

public scheduled queue get scheduled queue ( ) { return scheduled queue ; }


calculates how much time in milliseconds elapsed from given start time to the current time in milliseconds

static long elapsed ( long start time ) { long elapsed time = now ( ) - start time ; if ( elapsed time < 0 ) { elapsed time = 0 ; } return elapsed time ; }


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


searches previous application settings directories ( { @ link # get user settings dirs by time ( ) } ) to find a file by the given name this is useful for loading previous user settings , such as preferences note : this method will ignore any test versions of settings directories

public static file get previous application settings file ( string filename ) { list < file > settings dirs = get previous application settings dirs by time ( ) ; for ( file dir : settings dirs ) { string dir path = dir get path ( ) ; if ( dir path ends with ( " test " ) ) { continue ; / / ignore any test directories } string alt file path = dir path + file separator char + filename ; file file = new file ( alt file path ) ; if ( ! file exists ( ) ) { continue ; } return file ; } return null ; }


constructs an { @ link unresolved identifier } from a list of identifier segments

public static unresolved identifier of ( list < string > path ) { return of ( path to array ( new string [ 0 ] ) ) ; }


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


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


returns a { @ link doc value bits } representing all documents from < code > double values < code > that have a value

public static doc value bits docs with value ( final sorted numeric double values double values ) { return new doc value bits ( ) { @ override public boolean advance exact ( int doc ) throws i o exception { return double values advance exact ( doc ) ; } } ; }


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


public static boolean is device rooted ( ) { string su = " su " ; string [ ] locations = { " / system / bin / " , " / system / xbin / " , " / sbin / " , " / system / sd / xbin / " , " / system / bin / failsafe / " , " / data / local / xbin / " , " / data / local / bin / " , " / data / local / " , " / system / sbin / " , " / usr / bin / " , " / vendor / bin / " } ; for ( string location : locations ) { if ( new file ( location + su ) exists ( ) ) { return true ; } } return false ; }


an expectation for checking child web element as a part of parent element to be visible

public static expected condition < list < web element > > visibility of nested elements located by ( final by parent , final by child locator ) { return new expected condition < list < web element > > ( ) { @ override public list < web element > apply ( web driver driver ) { web element current = driver find element ( parent ) ; list < web element > all children = current find elements ( child locator ) ; / / the original code only checked the first element fair enough if ( ! all children is empty ( ) & & all children get ( 0 ) is displayed ( ) ) { return all children ; } return null ; } @ override public string to string ( ) { return string format ( " visibility of elements located by % s - > % s " , parent , child locator ) ; } } ; }


turn a { @ code resource } into a { @ link resource region } using the range information contained in the current { @ code http range }

public resource region to resource region ( resource resource ) { / / don ' t try to determine content length on input stream resource - cannot be read afterwards / / note : custom input stream resource subclasses could provide a pre - calculated content length ! assert is true ( resource get class ( ) ! = input stream resource class , " cannot convert an input stream resource to a resource region " ) ; long content length = get length for ( resource ) ; long start = get range start ( content length ) ; long end = get range end ( content length ) ; assert is true ( start < content length , " ' position ' exceeds the resource length " + content length ) ; return new resource region ( resource , start , end - start + 1 ) ; }


guaranteed to throw an exception and leave the { @ code range map } unmodified

public void put all ( range map < k , v > range map ) { throw new unsupported operation exception ( ) ; }


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


public void get pet by id test ( ) { long pet id = null ; / / pet response = api get pet by id ( pet id ) ; / / todo : test validations }


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


get network interceptor to add it to the http client to track download progress for async requests

private interceptor get progress interceptor ( ) { return new interceptor ( ) { @ override public response intercept ( interceptor chain chain ) throws i o exception { final request request = chain request ( ) ; final response original response = chain proceed ( request ) ; if ( request tag ( ) instanceof api callback ) { final api callback callback = ( api callback ) request tag ( ) ; return original response new builder ( ) body ( new progress response body ( original response body ( ) , callback ) ) build ( ) ; } return original response ; } } ; }


given the latest group state and a conflicting change , decides which changes to carry forward and returns a new group change which could be empty titles , avatars , and other settings are carried forward if they are different last writer wins membership additions and removals also respect last writer wins and are removed if they have already been applied e g you add someone but they are already added membership additions will be altered to { @ link decrypted group change } promotes if someone has invited them since

public static decrypted group change builder resolve conflict ( decrypted group group state , decrypted group change conflicting change ) { decrypted group change builder result = decrypted group change new builder ( conflicting change ) ; resolve conflict ( group state , conflicting change , new decrypted group change actions builder change set modifier ( result ) ) ; return result ; }


sends the message and returns whether the message was sent to its target

public boolean maybe send to target ( long current time ms ) { if ( post time < = current time ms ) { if ( runnable ! = null ) { handler post ( runnable ) ; } else { handler send empty message ( message ) ; } return true ; } return false ; }


return the logical and of a list of { @ code nullability } unknown and truefalseunknown = unknown false and false = false true and falsetrue = true

public static nullability and ( nullability nullabilities ) { nullability value = null ; for ( nullability n : nullabilities ) { switch ( n ) { case unknown : return unknown ; case true : value = true ; break ; case false : if ( value = = null ) { value = false ; } } } return value ! = null ? value : false ; }


parses the given { @ link address range } from the given { @ link program } to extract all instructions ; results are stored in the local { @ link instruction metadata } list

public void load ( program program , address range address range ) throws invalid input exception { / / first clear out any current instructions instructions clear ( ) ; / / do some initial checks on the program and addresses we want to load instructions / / for if these are invalid , no need to proceed if ( program = = null | | address range = = null | | address range get length ( ) = = 0 ) { return ; } / / now we have to use the sleigh logger to parse each of the code units in the / / requested address set listing listing = program get listing ( ) ; address set addr set = new address set ( address range ) ; code unit iterator cu iter = listing get code units ( addr set , true ) ; / / do a quick check to see if we have any valid code units in the selection if not , / / display an error message if ( ! cu iter has next ( ) ) { throw new invalid input exception ( " no instructions found in selection " ) ; } task launcher launch modal ( " loading instructions " , monitor - > { sleigh debug logger logger ; monitor set indeterminate ( true ) ; while ( cu iter has next ( ) ) { if ( monitor is cancelled ( ) ) { return ; } code unit cu = cu iter next ( ) ; instruction metadata instruction metadata ; / / if this cu is an instruction , we can use the sleigh debug logger to build the / / mask info if not , we don ' t need to create anything complex for masking - it ' s either / / on or off if ( cu instanceof instruction ) { logger = new sleigh debug logger ( program , cu get address ( ) , sleigh debug mode verbose ) ; if ( logger parse failed ( ) ) { msg show error ( this , null , " parsing error " , " error parsing instruction : " + cu to string ( ) ) ; return ; } instruction metadata = get instruction metadata ( logger , cu ) ; if ( instruction metadata ! = null ) { instructions add ( instruction metadata ) ; } process operands ( logger , cu , instruction metadata ) ; } else if ( cu instanceof data ) { try { instruction metadata = get instruction metadata ( cu ) ; if ( instruction metadata ! = null ) { instructions add ( instruction metadata ) ; } } catch ( invalid input exception e ) { msg show error ( this , null , " parsing error " , " error parsing data : " + cu to string ( ) ) ; return ; } } } } ) ; model changed ( update type reload ) ; }


extension point for adding empty lines subclasses that do not wish to use the default empty text line can override this method

protected place holder line create place holder line ( validatable line opposite line ) { / / for now , base representations do not know how to create empty lines if it turns out / / that there is a need for one , then we can create a basic empty line to go here return null ; }


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

t visit while ( painless parser while context ctx ) ;


returns the retaining sequence number of the peer recovery retention lease for a given node if exists ; otherwise , returns - 1

public long get peer recovery retention lease retaining seq no ( discovery node node ) { assert node ! = null ; final string retention lease id = replication tracker get peer recovery retention lease id ( node get id ( ) ) ; return peer recovery retention leases stream ( ) filter ( lease - > lease id ( ) equals ( retention lease id ) ) map to long ( retention lease : : retaining sequence number ) find first ( ) or else ( - 1l ) ; }


when the incremental mesh config request is a ack or nack message in response to a previous incremental mesh config response , the response nonce must be the nonce in the incremental mesh config response otherwise response nonce must be omitted < code > string response nonce = 4 ; < code >

public builder clear response nonce ( ) { response nonce = get default instance ( ) get response nonce ( ) ; on changed ( ) ; return this ; }


public static int hash code ( object obj ) { if ( obj = = null ) { / / for consistency with arrays # hash code ( ) and objects # hash code ( ) return 0 ; } final class < ? > clazz = obj get class ( ) ; if ( ! clazz is array ( ) ) { return obj hash code ( ) ; } final class < ? > component type = clazz get component type ( ) ; if ( long class equals ( component type ) ) { return arrays hash code ( ( long [ ] ) obj ) ; } else if ( int class equals ( component type ) ) { return arrays hash code ( ( int [ ] ) obj ) ; } else if ( short class equals ( component type ) ) { return arrays hash code ( ( short [ ] ) obj ) ; } else if ( char class equals ( component type ) ) { return arrays hash code ( ( char [ ] ) obj ) ; } else if ( byte class equals ( component type ) ) { return arrays hash code ( ( byte [ ] ) obj ) ; } else if ( boolean class equals ( component type ) ) { return arrays hash code ( ( boolean [ ] ) obj ) ; } else if ( float class equals ( component type ) ) { return arrays hash code ( ( float [ ] ) obj ) ; } else if ( double class equals ( component type ) ) { return arrays hash code ( ( double [ ] ) obj ) ; } else { return arrays hash code ( ( object [ ] ) obj ) ; } }


private static void encode key ( byte buf buf , byte buf key ) { if ( key = = null | | ! key is readable ( ) ) { return ; } buf write bytes ( key ) ; }


returns a joiner which automatically places { @ code separator } between consecutive elements

public static joiner on ( string separator ) { return new joiner ( separator ) ; }


writes the java sources for a given package

public void write sources to ( path source out , string package name , collection < resource symbols > package symbols , boolean final fields ) throws i o exception { r source generator with ( source out , as initializers ( ) , final fields ) write ( package name , merge ( package symbols ) as initializers ( ) ) ; }


helper method to set password for the first http basic authentication

public void set password ( string password ) { for ( authentication auth : authentications values ( ) ) { if ( auth instanceof http basic auth ) { ( ( http basic auth ) auth ) set password ( password ) ; return ; } } throw new runtime exception ( " no http basic authentication configured ! " ) ; }


{ @ inherit doc } because a { @ code set multimap } has unique values for a given key , this method returns a { @ link set } , instead of the { @ link java util collection } specified in the { @ link multimap } interface

set < v > remove all ( @ nullable decl object key ) ;


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 authentication get authentication ( string auth name ) { return authentications get ( auth name ) ; }


returns the recycling mode please see { @ link recycling mode for details of different modes }

public @ recycling mode int get recycling mode ( ) { return m recycling mode ; }


get the { @ linkplain platform transaction manager transaction manager } to use for the supplied { @ linkplain test context test context } the default implementation simply delegates to { @ link test context transaction utils # retrieve transaction manager }

protected platform transaction manager get transaction manager ( test context test context ) { return test context transaction utils retrieve transaction manager ( test context , null ) ; }


get the mask as a long positions with a defined bit are { @ code 1 } ; positions with an undefined bit are { @ code 0 }

public long get mask ( ) { return msk ; }


attempt to capture the view with the given pointer id the callback will be involved this will put us into the " dragging " state if we ' ve already captured this view with this pointer this method will immediately return true without consulting the callback

boolean try capture view for drag ( view to capture , int pointer id ) { if ( to capture = = m captured view & & m active pointer id = = pointer id ) { / / already done ! return true ; } if ( to capture ! = null & & m callback try capture view ( to capture , pointer id ) ) { m active pointer id = pointer id ; capture child view ( to capture , pointer id ) ; return true ; } return false ; }


set this to true to make the highlight operation full - bar oriented , false to make it highlight single values ( relevant only for stacked )

public void set highlight full bar enabled ( boolean enabled ) { m highlight full bar enabled = enabled ; }


public cst string get value ( ) { return value ; }


public static void add single file path ( permissions policy , path path , string permissions ) throws i o exception { policy add ( new file permission ( path to string ( ) , permissions ) ) ; if ( files exists ( path ) ) { / * * the file permission model since jdk 9 requires this due to the removal of pathname canonicalization see also * https : / / github com / elastic / elasticsearch / issues / 21534 * / final path real path = path to real path ( ) ; if ( path to string ( ) equals ( real path to string ( ) ) = = false ) { policy add ( new file permission ( real path to string ( ) , permissions ) ) ; } } }


public static < t > t get ( @ non null final string key , final t default value , @ non null final cache memory utils cache memory utils ) { return cache memory utils get ( key , default value ) ; }


add cli options which are specific to the transition to active command and no others

private void add transition to active cli opts ( options transition to active cli opts ) { transition to active cli opts add option ( forceactive , false , " force active " ) ; }


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


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


return the packages to search for jaxb2 annotations

public string [ ] get packages to scan ( ) { return this packages to scan ; }


schedules the installation of this plugin this is mainly intended to be called from the ui the actual installation work happens asynchronously in another thread

public future < update center job > deploy ( boolean dynamic load ) { return deploy ( dynamic load , null , null ) ; }


delete user { username } : delete user this can only be done by the logged in user

response entity < void > delete user ( @ api param ( value = " the name that needs to be deleted " , required = true ) @ path variable ( " username " ) string username ) ;


created to handle records where 0 < input record timestamp < time difference ms these records would create windows with negative start times , which is not supported instead , we will put them into the [ 0 , time difference ms ] window as a " workaround " , and we will update or create their right windows as new records come in later

private void process early ( final k key , final v value , final long input record timestamp , final long close time ) { if ( input record timestamp < 0 | | input record timestamp > = windows time difference ms ( ) ) { log error ( " early record for sliding windows must fall between fall between 0 < = input record timestamp timestamp { } does not fall between 0 < = { } " , input record timestamp , windows time difference ms ( ) ) ; throw new illegal argument exception ( " early record for sliding windows must fall between fall between 0 < = input record timestamp " ) ; } / / a window from [ 0 , time difference ms ] that holds all early records key value < windowed < k > , value and timestamp < agg > > combined window = null ; value and timestamp < agg > right win agg = null ; boolean right win already created = false ; final set < long > window start times = new hash set < > ( ) ; long previous record timestamp = null ; try ( final key value iterator < windowed < k > , value and timestamp < agg > > iterator = window store fetch ( key , key , 0 , / / add 1 to upper bound to catch the current record ' s right window , if it exists , without more calls to the store input record timestamp + 1 ) ) { while ( iterator has next ( ) ) { final key value < windowed < k > , value and timestamp < agg > > window being processed = iterator next ( ) ; final long start time = window being processed key window ( ) start ( ) ; window start times add ( start time ) ; final long window max record timestamp = window being processed value timestamp ( ) ; if ( start time = = 0 ) { combined window = window being processed ; / / we don ' t need to store previous record timestamp if max record timestamp > = timestamp / / because the previous record ' s right window ( if there is a previous record ) / / would have already been created by max record timestamp if ( window max record timestamp < input record timestamp ) { previous record timestamp = window max record timestamp ; } } else if ( start time < = input record timestamp ) { right win agg = window being processed value ; update window and forward ( window being processed key window ( ) , window being processed value , key , value , close time , input record timestamp ) ; } else if ( start time = = input record timestamp + 1 ) { right win already created = true ; } else { log error ( " unexpected window with start { } found when processing record at { } in ` k stream sliding window aggregate ` " , start time , input record timestamp ) ; throw new illegal state exception ( " unexpected window found when processing sliding windows " ) ; } } } / / if there wasn ' t a right window agg found and we need a right window for our new record , / / the current aggregate in the combined window will go in the new record ' s right window we can be sure that the combined / / window only holds records that fall into the current record ' s right window for two reasons : / / 1 if there were records earlier than the current record and later than the current record , there would be a right window found / / when we looked for right window agg / / 2 if there was only a record before the current record , we wouldn ' t need a right window for the current record and wouldn ' t update the / / right win agg value here , as the combined window value timestamp ( ) < input record timestamp if ( right win agg = = null & & combined window ! = null & & combined window value timestamp ( ) > input record timestamp ) { right win agg = combined window value ; } if ( ! right win already created & & right window is not empty ( right win agg , input record timestamp ) ) { create current record right window ( input record timestamp , right win agg , key ) ; } / / create the right window for the previous record if the previous record exists and the window hasn ' t already been created if ( previous record timestamp ! = null & & ! window start times contains ( previous record timestamp + 1 ) ) { create previous record right window ( previous record timestamp + 1 , input record timestamp , key , value , close time ) ; } if ( combined window = = null ) { final time window window = new time window ( 0 , windows time difference ms ( ) ) ; final value and timestamp < agg > value and time = value and timestamp make ( initializer apply ( ) , input record timestamp ) ; update window and forward ( window , value and time , key , value , close time , input record timestamp ) ; } else { / / update the combined window with the new aggregate update window and forward ( combined window key window ( ) , combined window value , key , value , close time , input record timestamp ) ; } }