test jenkins startup sequences and the changes to the startup type

public void test type transitions ( ) { install util get last exec version file ( ) delete ( ) ; install util get config file ( ) delete ( ) ; / / a new test instance sets up security first assert assert equals ( install state initial security setup , install util get next install state ( install state unknown ) ) ; / / and proceeds to the new state assert assert equals ( install state new , install util get next install state ( install state initial security setup ) ) ; / / save the last exec version this will only be done by jenkins after one of : / / 1 a successful run of the install wizard / / 2 a success upgrade / / 3 a successful restart install util save last exec version ( ) ; / / fudge things a little now , pretending there ' s a restart / / now if we ask what is the install state , we should be told it ' s a restart because / / the install wizard is complete and the version matches the currently executing / / jenkins version assert assert equals ( install state restart , install util get next install state ( install state unknown ) ) ; / / fudge things again , changing the stored version to something old , faking an upgrade install util save last exec version ( " 1 584 " ) ; assert assert equals ( install state upgrade , install util get next install state ( install state unknown ) ) ; / / fudge things yet again , changing the stored version to something very very new , faking a downgrade install util save last exec version ( " 1000 0 " ) ; assert assert equals ( install state downgrade , install util get next install state ( install state unknown ) ) ; }


this is the set of actions to perform when verifying the file actually was created with the s 3guard committer , the file doesn ' t come into existence ; a different set of assertions must be checked

public void test 030 post creation assertions ( ) throws throwable { s 3 a file system fs = get file system ( ) ; contract test utils assert path exists ( fs , " huge file " , hugefile ) ; file status status = fs get file status ( hugefile ) ; contract test utils assert is file ( hugefile , status ) ; assert equals ( " file size in " + status , filesize , status get len ( ) ) ; }


should we track blocks in safe mode < p > never track blocks incrementally in non - ha code < p > in the ha case , the standby node can be in safemode while the namespace is modified by the edit log tailer in this case , the number of total blocks changes as edits are processed ( eg blocks are added and deleted ) however , we don ' t want to do the incremental tracking during the startup - time loading process - - only once the initial total has been set after the image has been loaded

boolean is safe mode tracking blocks ( ) { assert namesystem has write lock ( ) ; return ha enabled & & status ! = b m safe mode status off ; }


helper method to create a message indicating a invalid decoding result

private m invalid message ( exception cause ) { state = state bad message ; m message = build invalid message ( ) ; message set decoder result ( decoder result failure ( cause ) ) ; return message ; }


looks up the { @ link scheduling result partition } for the given { @ link intermediate result partition i d }

scheduling result partition get result partition ( intermediate result partition i d intermediate result partition id ) ;


this test checks if a consumer that has a valid member id but an invalid generation ( { @ link org apache kafka clients consumer internals abstract coordinator generation # no generation } ) can still execute a leave group request such a situation may arise when a consumer has initiated a join group request without a member id , but is shutdown or restarted before it has a chance to initiate and complete the second request

public void test pending member should leave group ( ) { final string consumer id = " consumer - id " ; subscriptions subscribe ( singleton ( topic 1 ) , rebalance listener ) ; client prepare response ( group coordinator response ( node , errors none ) ) ; coordinator ensure coordinator ready ( time timer ( long max value ) ) ; / / here we return a default generation id , but valid member id and leader id client prepare response ( join group follower response ( - 1 , consumer id , " leader - id " , errors member id required ) ) ; / / execute join group coordinator join group if needed ( time timer ( 0 ) ) ; final atomic boolean received = new atomic boolean ( false ) ; client prepare response ( body - > { received set ( true ) ; leave group request leave request = ( leave group request ) body ; return validate leave group ( group id , consumer id , leave request ) ; } , new leave group response ( new leave group response data ( ) set error code ( errors none code ( ) ) ) ) ; coordinator maybe leave group ( " pending member leaves " ) ; assert true ( received get ( ) ) ; }


asserts the given number of subscriptions happened

public void assert subscriptions ( int n ) { assert assert equals ( n , get ( ) ) ; }


drops capabilities that we shouldn ' t send over the wire used for capabilities which aren ' t bean to json - convertable , and are only used by the local launcher

private static capabilities drop capabilities ( capabilities capabilities ) { if ( capabilities = = null ) { return new immutable capabilities ( ) ; } mutable capabilities caps ; if ( is legacy ( capabilities ) ) { final set < string > to remove = sets new hash set ( capability binary , capability profile ) ; caps = new mutable capabilities ( maps filter keys ( capabilities as map ( ) , key - > ! to remove contains ( key ) ) ) ; } else { caps = new mutable capabilities ( capabilities ) ; } / / ensure that the proxy is in a state fit to be sent to the extension proxy proxy = proxy extract from ( capabilities ) ; if ( proxy ! = null ) { caps set capability ( proxy , proxy ) ; } return caps ; }


steps : 1 create a directory with default permissions : 777 with umask 022 2 check the directory has good permissions : 755 3 set the umask to 062 4 create a new directory with default permissions 5 for this directory we expect 715 as permission not 755

public void test set umask in real time ( ) throws exception { assume not windows ( ) ; local file system localfs = file system get local ( new configuration ( ) ) ; configuration conf = localfs get conf ( ) ; conf set ( common configuration keys fs permissions umask key , " 022 " ) ; logger info ( " current umask is { } " , conf get ( common configuration keys fs permissions umask key ) ) ; path dir = new path ( test path prefix + " dir " ) ; path dir 2 = new path ( test path prefix + " dir 2 " ) ; try { assert true ( localfs mkdirs ( dir ) ) ; fs permission initial permission = get permission ( localfs , dir ) ; assert equals ( " with umask 022 permission should be 755 since the default " + " permission is 777 " , new fs permission ( " 755 " ) , initial permission ) ; / / modify umask and create a new directory / / and check if new umask is applied conf set ( common configuration keys fs permissions umask key , " 062 " ) ; assert true ( localfs mkdirs ( dir 2 ) ) ; fs permission final permission = localfs get file status ( dir 2 ) get permission ( ) ; assert that ( " with umask 062 permission should not be 755 since the " + " default permission is 777 " , new fs permission ( " 755 " ) , is ( not ( final permission ) ) ) ; assert equals ( " with umask 062 we expect 715 since the default permission is 777 " , new fs permission ( " 715 " ) , final permission ) ; } finally { conf set ( common configuration keys fs permissions umask key , " 022 " ) ; cleanup ( localfs , dir ) ; cleanup ( localfs , dir 2 ) ; } }


static map < string , object > decode attributes ( final map < string , object > attributes , final registered service registered service , final web application service web application service ) { val final attributes = maps < string , object > new hash map with expected size ( attributes size ( ) ) ; attributes for each ( ( k , v ) - > { val attribute name = protocol attribute encoder decode attribute ( k ) ; logger debug ( " decoded saml attribute [ { } ] to [ { } ] with value ( s ) [ { } ] " , k , attribute name , v ) ; final attributes put ( attribute name , v ) ; } ) ; return final attributes ; }


public static void nearby ( rect rect , cons < unit > cons ) { nearby ( rect x , rect y , rect width , rect height , cons ) ; }


add the parents of the function to the hash family

private void add parents ( hash family family , function function , task monitor monitor ) throws memory access exception , cancelled exception { array list < function > parents = get parents ( function , true ) ; for ( function relation : parents ) { monitor check canceled ( ) ; fid hash quad hash = cache factory get ( relation ) ; if ( hash ! = null ) { family add parent ( hash ) ; } } }


< code > optional aapt pb style style = 2 ; < code >


todo un - restrict it in a weekly after the patch

public boolean support is descendant ( ) { return true ; }


this is overridden to ensure that this class ' s create ( ) method is ultimately called { @ inherit doc }

public f s data output stream builder append file ( path path ) { return create data output stream builder ( this , path ) append ( ) ; }


writes the contents of this instance as either a binary or a human - readable form , or both

public void write to ( output stream out , writer human out , boolean verbose ) throws i o exception { boolean annotate = ( human out ! = null ) ; byte array annotated output result = to dex 0 ( annotate , verbose ) ; if ( out ! = null ) { out write ( result get array ( ) ) ; } if ( annotate ) { result write annotations to ( human out ) ; } }


set if this bean is " abstract " , i e not meant to be instantiated itself but rather just serving as parent for concrete child bean definitions default is " false " specify true to tell the bean factory to not try to instantiate that particular bean in any case

public void set abstract ( boolean abstract flag ) { this abstract flag = abstract flag ; }


returns true if the there is a column filter on the column specified

public default boolean has column filter ( int column model index ) { return false ; }


probe for a path being a file metrics are only checked on unguarded stores

protected void is file ( path path , boolean expected , operation cost cost ) throws exception { boolean b = verify raw ( cost , ( ) - > get file system ( ) is file ( path ) ) ; assertions assert that ( b ) described as ( " is file ( % s ) " , path ) is equal to ( expected ) ; }


type - inferring factory method for creating a { @ link queuing removal listener }

static < k , v > queuing removal listener < k , v > queuing removal listener ( ) { return new queuing removal listener < > ( ) ; }


get the value of sigma to use when calculating the standard deviation bounds

public double sigma ( ) { return sigma ; }


convenience shorthand for { @ link # add user identity link ( string , string , string ) } ; with type { @ link identity link type # candidate }

void add participant user ( string process instance id , string user id ) ;


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


returns the commands of this instance arguments with spaces in are presented with quotes round ; other arguments are presented raw

public string to string ( ) { string builder builder = new string builder ( ) ; string [ ] args = get exec string ( ) ; for ( string s : args ) { if ( s index of ( ' ' ) > = 0 ) { builder append ( ' " ' ) append ( s ) append ( ' " ' ) ; } else { builder append ( s ) ; } builder append ( ' ' ) ; } return builder to string ( ) ; }


whether an update to models is currently pending this can either be because { @ link # request model build ( ) } was called , or because models are currently being built or diff on a background thread

public boolean has pending model build ( ) { return requested model build type ! = requested model build type none / / model build is posted | | thread building models ! = null / / model build is in progress | | adapter is diff in progress ( ) ; / / diff in progress }


creates a new data stream that contains elements in the iterator the iterator is splittable , allowing the framework to create a parallel data stream source that returns the elements in the iterator because the iterator will remain unmodified until the actual execution happens , the type of data returned by the iterator must be given explicitly in the form of the type class ( this is due to the fact that the java compiler erases the generic type information )

public < out > data stream source < out > from parallel collection ( splittable iterator < out > iterator , class < out > type ) { return from parallel collection ( iterator , type extractor get for class ( type ) ) ; }


returns a string representation of { @ code iterator } , with the format { @ code [ e 1 , e 2 , , en ] } the iterator will be left exhausted : its { @ code has next ( ) } method will return { @ code false }

public static string to string ( iterator < ? > iterator ) { string builder sb = new string builder ( ) append ( ' [ ' ) ; boolean first = true ; while ( iterator has next ( ) ) { if ( ! first ) { sb append ( " , " ) ; } first = false ; sb append ( iterator next ( ) ) ; } return sb append ( ' ] ' ) to string ( ) ; }


calculate a resource ' s min share ratios assuming that cpu and memory are the only configured resource types the return array will be populated with the { @ code resource info } divided by { @ code min share info } for each resource type if the min shares are 5 mb and 10 vcores , and the usage ( { @ code resource info } ) is 10 mb and 5 cpu , the ratios will be 2 and 0 5 the length of the { @ code ratios } array must be 2

double [ ] calculate min share ratios ( resource information [ ] resource info , resource information [ ] min share info ) { double [ ] min shares 1 = new double [ 2 ] ; / / both are needy below min share min shares 1 [ resource memory index ] = ( ( double ) resource info [ resource memory index ] get value ( ) ) / min share info [ resource memory index ] get value ( ) ; min shares 1 [ resource vcores index ] = ( ( double ) resource info [ resource vcores index ] get value ( ) ) / min share info [ resource vcores index ] get value ( ) ; return min shares 1 ; }


test verifies the multi create with invalid create mode flag

public void test invalid create mode flag ( boolean use async ) throws exception { list < integer > expected result codes = new array list < integer > ( ) ; expected result codes add ( keeper exception code runtimeinconsistency int value ( ) ) ; expected result codes add ( keeper exception code badarguments int value ( ) ) ; expected result codes add ( keeper exception code runtimeinconsistency int value ( ) ) ; int create mode flag = 6789 ; list < op > op list = arrays as list ( op create ( " / multi 0 " , new byte [ 0 ] , ids open acl unsafe , create mode persistent ) , op create ( " / multi 1 " , new byte [ 0 ] , ids open acl unsafe , create mode flag ) , op create ( " / multi 2 " , new byte [ 0 ] , ids open acl unsafe , create mode persistent ) ) ; string expected err = keeper exception code badarguments name ( ) ; multi having errors ( zk , op list , expected result codes , expected err , use async ) ; } @ parameterized test @ value source ( booleans = { true , false }


converts the specified byte array into a hexadecimal value and appends it to the specified buffer

public static < t extends appendable > t to hex string padded ( t dst , byte [ ] src , int offset , int length ) { final int end = offset + length ; for ( int i = offset ; i < end ; i + + ) { byte to hex string padded ( dst , src [ i ] ) ; } return dst ; }


performs a slow search of all function records , looking for functions whose name matches the regular expression provided as an argument

public list < function record > get function records by name regex ( string regex ) throws i o exception { matcher matcher = pattern compile ( regex ) matcher ( " " ) ; d b field iterator iterator = table index key iterator ( name id col ) ; if ( ! iterator has next ( ) ) { return collections empty list ( ) ; } list < function record > list = new array list < > ( ) ; while ( iterator has next ( ) ) { field key = iterator next ( ) ; function record function record = function cache get ( key get long value ( ) ) ; if ( function record = = null ) { d b record record = table get record ( key ) ; long name i d = record get long value ( name id col ) ; string record name record = strings table lookup string ( name i d ) ; string name = name record get value ( ) ; matcher reset ( name ) ; if ( matcher matches ( ) ) { function record = new function record ( fid db , function cache , record ) ; } } else { matcher reset ( function record get name ( ) ) ; if ( ! matcher matches ( ) ) { function record = null ; } } if ( function record ! = null ) { list add ( function record ) ; } } return list ; }


in a parallel test run there is more than one thread doing the execution

public boolean is parallel ( ) { return num threads > 1 ; }


to test class name in snake case to test class name in snake case

public single < client > rx test classname ( client body ) { return single create ( new io vertx rx java single on subscribe adapter < > ( fut - > delegate test classname ( body , fut ) ) ) ; }


gets the { @ link user token } with the given { @ code user token id } and { @ code token version } by fetching and parsing the corresponding token document

private void get user token from id ( string user token id , version token version , action listener < user token > listener ) { final security index manager tokens index = get tokens index for version ( token version ) ; final security index manager frozen tokens index = tokens index freeze ( ) ; if ( frozen tokens index is available ( ) = = false ) { logger warn ( " failed to get access token [ { } ] because index [ { } ] is not available " , user token id , tokens index alias name ( ) ) ; listener on failure ( frozen tokens index get unavailable reason ( ) ) ; } else { final get request get request = client prepare get ( tokens index alias name ( ) , get token document id ( user token id ) ) request ( ) ; final consumer < exception > on failure = ex - > listener on failure ( trace log ( " get token from id " , user token id , ex ) ) ; tokens index check index version then execute ( ex - > listener on failure ( trace log ( " prepare tokens index [ " + tokens index alias name ( ) + " ] " , user token id , ex ) ) , ( ) - > execute async with origin ( client thread pool ( ) get thread context ( ) , security origin , get request , action listener < get response > wrap ( response - > { if ( response is exists ( ) ) { map < string , object > access token source = ( map < string , object > ) response get source ( ) get ( " access token " ) ; if ( access token source = = null ) { on failure accept ( new illegal state exception ( " token document is missing the access token field " ) ) ; } else if ( access token source contains key ( " user token " ) = = false ) { on failure accept ( new illegal state exception ( " token document is missing the user token field " ) ) ; } else { map < string , object > user token source = ( map < string , object > ) access token source get ( " user token " ) ; listener on response ( user token from source map ( user token source ) ) ; } } else { / / the chances of a random token string decoding to something that we can read is minimal , so / / we assume that this was a token we have created but is now expired / revoked and deleted logger trace ( " the access token [ { } ] is expired and already deleted " , user token id ) ; listener on response ( null ) ; } } , e - > { / / if the index or the shard is not there / available we assume that / / the token is not valid if ( is shard not available exception ( e ) ) { logger warn ( " failed to get access token [ { } ] because index [ { } ] is not available " , user token id , tokens index alias name ( ) ) ; } else { logger error ( new parameterized message ( " failed to get access token [ { } ] " , user token id ) , e ) ; } listener on failure ( e ) ; } ) , client : : get ) ) ; } }


returns the given list of line numbers , without the ones that have empty code blocks or that exceed the code size

private int remove empty line numbers ( line number info [ ] line number infos , int line number info count , int code length ) { / / overwrite all empty line number entries int new index = 0 ; for ( int index = 0 ; index < line number info count ; index + + ) { line number info line number info = line number infos [ index ] ; int start p c = line number info u 2start p c ; if ( start p c < code length & & ( index = = 0 | | start p c > line number infos [ index - 1 ] u 2start p c ) ) { line number infos [ new index + + ] = line number info ; } } return new index ; }


given two components this method accesses all their internal fields , excluding the fields of state container if the class type is a component , to check if they are equivalent there ' s special equality code to handle special class types e g components , event handlers , etc

public static boolean is equivalent ( @ nullable final component current , @ nullable final component next ) { if ( current = = next ) { return true ; } if ( current = = null | | next = = null ) { return false ; } return current is equivalent to ( next ) ; }


method for passing user defined operators along with the type information that will transform the operator transformation < b > important : < b > any output from this operator will be discarded

public bootstrap transformation < t > transform ( savepoint writer operator factory factory ) { return new bootstrap transformation < > ( data set , operator max parallelism , timestamper , factory ) ; }


deletes all children of this directory , recursively

public void empty directory ( ) { throw new gdx runtime exception ( " not available on gwt " ) ; }


sets whether the query builder should ignore unmapped types ( and run a { @ link match no docs query } in place of this query ) or throw an exception if the type is unmapped

public has child query builder ignore unmapped ( boolean ignore unmapped ) { this ignore unmapped = ignore unmapped ; if ( inner hit builder ! = null ) { inner hit builder set ignore unmapped ( ignore unmapped ) ; } return this ; }


indicates whether or not this { @ link org springframework web servlet view resolver } can handle the supplied view name if not , { @ link # create view ( string , java util locale ) } will return { @ code null } the default implementation checks against the configured { @ link # set view names view names }

protected boolean can handle ( string view name , locale locale ) { string [ ] view names = get view names ( ) ; return ( view names = = null | | pattern match utils simple match ( view names , view name ) ) ; }


public builder sleep interval ms ( long value ) { this sleep interval ms = value ; return this ; }


check that multiple blank lines are reduced to a single line

public void test multiple blanks reduced to one ( ) { list < string > input = list of ( " status = error " , " " , " " , " root logger level = info " ) ; list < string > expected = list of ( " status = error " , " " , " root logger level = info " ) ; final list < string > transformed = transform log 4j config skip blanks ( input ) ; assert that ( transformed , equal to ( expected ) ) ; }


sets the { @ code data type features } and returns a reference to this builder so that the methods can be chained together

public builder data type features ( enum set < data type feature > data type features ) { if ( data type features ! = null ) { this data type features = data type features ; } else { this data type features = enum set none of ( data type feature class ) ; } return this ; }


public void login user ( string username , string password , final response listener < string > response listener , final response error listener error listener ) { object post body = null ; / / verify the required parameter ' username ' is set if ( username = = null ) { volley error error = new volley error ( " missing the required parameter ' username ' when calling login user " , new api exception ( 400 , " missing the required parameter ' username ' when calling login user " ) ) ; } / / verify the required parameter ' password ' is set if ( password = = null ) { volley error error = new volley error ( " missing the required parameter ' password ' when calling login user " , new api exception ( 400 , " missing the required parameter ' password ' when calling login user " ) ) ; } / / create path and map variables string path = " / user / login " replace all ( " \ \ { format \ \ } " , " json " ) ; / / query params list < pair > query params = new array list < pair > ( ) ; / / header params map < string , string > header params = new hash map < string , string > ( ) ; / / form params map < string , string > form params = new hash map < string , string > ( ) ; query params add all ( api invoker parameter to pairs ( " " , " username " , username ) ) ; query params add all ( api invoker parameter to pairs ( " " , " password " , password ) ) ; string [ ] content types = { } ; string content type = content types length > 0 ? content types [ 0 ] : " application / json " ; if ( content type starts with ( " multipart / form - data " ) ) { / / file uploading multipart entity builder local var builder = multipart entity builder create ( ) ; http entity http entity = local var builder build ( ) ; post body = http entity ; } else { / / normal form params } string [ ] auth names = new string [ ] { } ; try { api invoker invoke a p i ( base path , path , " get " , query params , post body , header params , form params , content type , auth names , new response listener < string > ( ) { @ override public void on response ( string local var response ) { try { response listener on response ( ( string ) api invoker deserialize ( local var response , " " , string class ) ) ; } catch ( api exception exception ) { error listener on error response ( new volley error ( exception ) ) ; } } } , new response error listener ( ) { @ override public void on error response ( volley error error ) { error listener on error response ( error ) ; } } ) ; } catch ( api exception ex ) { error listener on error response ( new volley error ( ex ) ) ; } }


set the rome feed type to use defaults to atom 1 0

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


subclasses must implement this method to convert each row of the result set into an object of the result type subclasses of this class , as opposed to direct subclasses of mapping sql query with parameters , don ' t need to concern themselves with the parameters to the execute method of the query object

protected abstract t map row ( result set rs , int row num ) throws s q l exception ;


disposes of all resources this vertex buffer object uses

public void dispose ( ) { gl30 gl = gdx gl 3 0 ; gl gl bind buffer ( gl20 gl array buffer , 0 ) ; gl gl delete buffer ( buffer handle ) ; buffer handle = 0 ; delete v a o ( ) ; }


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


copies the contents of this source to the given sink

public long copy to ( char sink sink ) throws i o exception { check not null ( sink ) ; closer closer = closer create ( ) ; try { reader reader = closer register ( open stream ( ) ) ; writer writer = closer register ( sink open stream ( ) ) ; return char streams copy ( reader , writer ) ; } catch ( throwable e ) { throw closer rethrow ( e ) ; } finally { closer close ( ) ; } }


adds { @ code node } if it is not already present < b > nodes must be unique < b > , just as { @ code map } keys must be they must also be non - null


grant or deny authorization to an operation on a node as a function of :

public void check a c l ( server cnxn cnxn , list < acl > acl , int perm , list < id > ids , string path , list < acl > set acls ) throws keeper exception no auth exception { if ( skip a c l ) { return ; } log debug ( " permission requested : { } " , perm ) ; log debug ( " a c ls for node : { } " , acl ) ; log debug ( " client credentials : { } " , ids ) ; if ( acl = = null | | acl size ( ) = = 0 ) { return ; } for ( id auth id : ids ) { if ( auth id get scheme ( ) equals ( " super " ) ) { return ; } } for ( acl a : acl ) { id id = a get id ( ) ; if ( ( a get perms ( ) & perm ) ! = 0 ) { if ( id get scheme ( ) equals ( " world " ) & & id get id ( ) equals ( " anyone " ) ) { return ; } server authentication provider ap = provider registry get server provider ( id get scheme ( ) ) ; if ( ap ! = null ) { for ( id auth id : ids ) { if ( auth id get scheme ( ) equals ( id get scheme ( ) ) & & ap matches ( new server authentication provider server objs ( this , cnxn ) , new server authentication provider match values ( path , auth id get id ( ) , id get id ( ) , perm , set acls ) ) ) { return ; } } } } } throw new keeper exception no auth exception ( ) ; }


maps the given path to the given web socket handler this is currently only available in the embedded server mode

public static void web socket ( string path , class < ? > handler ) { get instance ( ) web socket ( path , handler ) ; }


public string type name ( ) { return " field " ; }


configure how long , as a duration , the response from a pre - flight request can be cached by clients

public void set max age ( duration max age ) { this max age = max age get seconds ( ) ; }


public string get url ( ) { return this url ; }


{ @ inherit doc } the default implementation returns the result of calling { @ link # visit children } on { @ code ctx }

@ override public t visit identifier ( eql base parser identifier context ctx ) { return visit children ( ctx ) ; }


determines whether a given bloom filter is compatible with this bloom filter for two bloom filters to be compatible , they must : not be the same instance have the same number of hash functions have the same bit size have the same strategy have equal funnels

public boolean is compatible ( bloom filter < t > that ) { check not null ( that ) ; return this ! = that & & this num hash functions = = that num hash functions & & this bit size ( ) = = that bit size ( ) & & this strategy equals ( that strategy ) & & this funnel equals ( that funnel ) ; }


public builder set missing bucket ( boolean missing bucket ) { this missing bucket = missing bucket ; return this ; }


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


find and clear computed references produced as a result of the specified pointer when contained within a pointer table

private void clear computed table refs ( data d , task monitor monitor ) throws cancelled exception { program p = d get program ( ) ; listing listing = p get listing ( ) ; reference manager ref mgr = p get reference manager ( ) ; address dest addr = d get address ( 0 ) ; reference iterator ref iter = ref mgr get references to ( dest addr ) ; while ( ref iter has next ( ) ) { monitor check canceled ( ) ; reference ref = ref iter next ( ) ; ref type ref type = ref get reference type ( ) ; if ( ref type instanceof flow type ) { instruction instr = listing get instruction at ( ref get from address ( ) ) ; if ( instr = = null | | instr get flow type ( ) is computed ( ) | | ( ( flow type ) ref type ) is computed ( ) ) { ref mgr delete ( ref ) ; } } } }


{ @ inherit doc } this implementation is correct for single consumer thread use only

public t poll ( ) { / / local load of field to avoid repeated loads after volatile reads final atomic reference array < object > buffer = consumer buffer ; final long index = lp consumer index ( ) ; final int mask = consumer mask ; final int offset = calc wrapped offset ( index , mask ) ; final object e = lv element ( buffer , offset ) ; / / load load boolean is next buffer = e = = has next ; if ( null ! = e & & ! is next buffer ) { so element ( buffer , offset , null ) ; / / store store so consumer index ( index + 1 ) ; / / this ensures correctness on 3 2bit platforms return ( t ) e ; } else if ( is next buffer ) { return new buffer poll ( lv next buffer and unlink ( buffer , mask + 1 ) , index , mask ) ; } return null ; }


public final void set timeout ( final long task timeout ) { this timeout = task timeout ; }


send the { @ link recycler collection component } a request to scroll the content by the given margins , animate a scroll by the given amount of pixels along either axis

public void request smooth scroll by ( int dx , int dy ) { final recycler view recycler view = get recycler view ( ) ; if ( recycler view = = null ) { return ; } recycler view smooth scroll by ( dx , dy ) ; }


attempt to use evil reflection tricks to determine the pid of a launched process this is helpful to ops if debugging a fencing process that might have gone wrong if running on a system or jvm where this doesn ' t work , it will simply return null

private static string try get pid ( process p ) { try { class < ? extends process > clazz = p get class ( ) ; if ( clazz get name ( ) equals ( " java lang u n i x process " ) ) { field f = clazz get declared field ( " pid " ) ; f set accessible ( true ) ; return string value of ( f get int ( p ) ) ; } else { log trace ( " unable to determine pid for " + p + " since it is not a u n i x process " ) ; return null ; } } catch ( throwable t ) { log trace ( " unable to determine pid for " + p , t ) ; return null ; } }


returns a hash function implementing the < a href = " https : 131002 netsiphash " > 64 - bit sip hash - 2 - 4 algorithm using a seed value of { @ code k = 00 01 02 }

public static hash function sip hash 2 4 ( ) { return sip hash function sip hash 24 ; }


clear all state associated with running snapshots to be used on master - failover if the current node stops being master

synchronized void clear ( ) { snapshots to finalize clear ( ) ; running deletions clear ( ) ; latest known meta data = null ; }


@ override public t visit newobject ( painless parser newobject context ctx ) { return visit children ( ctx ) ; }


invoked inside the { @ link runnable } submitted to the executor after calling the target message handler regardless of the outcome ( i e exception raised or not ) thus allowing for proper resource cleanup note that this will be invoked only if before handle successfully completed and returned a message , i e it did not return { @ code null }

default void after message handled ( message < ? > message , message channel channel , message handler handler , @ nullable exception ex ) { }


removes the given window from the set of in - flight windows

public void retire window ( w window ) { w removed = this mapping remove ( window ) ; if ( removed = = null ) { throw new illegal state exception ( " window " + window + " is not in in - flight window set " ) ; } }


by default , we sleep for 2 5 0ms between polls you may override this method in order to change how it sleeps

protected long sleep for ( ) { return 250 ; }


return whether statements will return updatable result sets

public boolean is updatable results ( ) { return this updatable results ; }


within - package , it is possible to read directly from an incompletely - built test summary used to pass builders around directly

test summary peek ( ) { preconditions check not null ( summary target , " target cannot be null " ) ; preconditions check not null ( summary status , " status cannot be null " ) ; return summary ; }


find a { @ link registered service } by matching with the supplied name

default < t extends registered service > t find service by name ( final string name , final class < t > clazz ) { val service = find service by name ( name ) ; if ( service ! = null & & clazz is assignable from ( service get class ( ) ) ) { return ( t ) service ; } return null ; }


asserts that a prior call that had caused this thread to block or wait has since returned normally

public void assert prior call returns ( @ nullable decl string method name ) throws exception { assert equals ( null , get response ( method name ) get result ( ) ) ; }


this is passed the future or a wrapped future an implementation is expected to do any desired preprocessing , then call the future , then perform any desired post - processing note that this scheme allows catching exceptions from lower layers

spawn result apply ( callable < spawn result > future ) throws exec exception , interrupted exception ;


encapsulate the logic for deciding whether a change to a normalized score is " big " current logic is that a change is considered big if any of the following criteria are met : the change would result in a change of colour in the ui ( e g severity would be changed from warning to minor ) the change is at least 1 5 the change in values is greater than 67 % of the higher of the two values these values have been chosen through a process of experimentation , in particular it was desired to reduce the number of updates written to the results index due to renormalization events for performance reasons while not changing the normalized scores greatly

private static boolean is big update ( double old val , double new val ) { if ( ( int ) ( old val / 25 0 ) ! = ( int ) ( new val / 25 0 ) ) { return true ; } if ( math abs ( old val - new val ) > = 1 5 ) { return true ; } if ( old val > new val ) { if ( old val * 0 33 > new val ) { return true ; } } else { if ( new val * 0 33 > old val ) { return true ; } } return false ; }


called when icy stream metadata has been split from the stream

void on icy metadata ( parsable byte array metadata ) ;


utility method to verify that the given linked hash set is equal to and hashes identically to a set constructed with the elements in the given collection also verifies that the ordering in the set is the same as the ordering of the given contents

private static < e > void verify linked hash set contents ( linked hash set < e > set , collection < e > contents ) { assert equals ( " linked hash set should have preserved order for iteration " , new array list < e > ( set ) , new array list < e > ( contents ) ) ; verify set contents ( set , contents ) ; }


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

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


return true if this additional properties number object is equal to o

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


updates the default { @ link request options } for all loads started with this request manager with the given { @ link request options } the { @ link request options } provided here are applied on top of those provided via { @ link glide builder # set default request options ( request options ) } if there are conflicts , the options applied here will win note that this method does not mutate options provided to { @ link glide builder # set default request options ( request options ) } multiple sets of options can be applied if there are conflicts the last { @ link request options } applied will win the modified options will only be applied to loads started after this method is called

public synchronized request manager apply default request options ( @ non null request options request options ) { update request options ( request options ) ; return this ; }


turn zk sasl on < b > important : < b > this is jvm - wide

protected static void enable zookeeper client s a s l ( ) { system set property ( prop zk enable sasl client , " true " ) ; }


public string get capital camel ( ) { return capital camel ; }


gets a worker may block indefinitely if too many high - priority workers are in use and the requested worker is not high priority

public worker borrow object ( worker key key ) throws i o exception , interrupted exception { worker result ; try { result = get pool ( key ) borrow object ( key ) ; } catch ( throwable t ) { throwables propagate if possible ( t , i o exception class , interrupted exception class ) ; throw new runtime exception ( " unexpected " , t ) ; } if ( high priority worker mnemonics contains ( key get mnemonic ( ) ) ) { high priority workers in use increment and get ( ) ; } else { try { wait for high priority workers to finish ( ) ; } catch ( interrupted exception e ) { return object ( key , result ) ; throw e ; } } return result ; }


adds a field to be highlighted with a provided fragment size ( in characters ) , and a provided ( maximum ) number of fragments

public highlight builder field ( string name , int fragment size , int number of fragments ) { return field ( new field ( name ) fragment size ( fragment size ) num of fragments ( number of fragments ) ) ; }


visits a continue statement checks : control flow

public void visit continue ( s continue user continue node , semantic scope semantic scope ) { if ( semantic scope get condition ( user continue node , in loop class ) = = false ) { throw user continue node create error ( new illegal argument exception ( " invalid continue statement : not inside loop " ) ) ; } if ( semantic scope get condition ( user continue node , last loop class ) ) { throw user continue node create error ( new illegal argument exception ( " extraneous continue statement " ) ) ; } semantic scope set condition ( user continue node , all escape class ) ; semantic scope set condition ( user continue node , any continue class ) ; }


void input opt ( configuration conf , string key , string val ) { conf set ( m r job config input file option prefix + key , val ) ; }


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

default response entity < void > test endpoint parameters ( @ api param ( value = " none " , required = true ) @ valid @ request part ( value = " number " , required = true ) big decimal number , @ api param ( value = " none " , required = true ) @ valid @ request part ( value = " double " , required = true ) double double , @ api param ( value = " none " , required = true ) @ valid @ request part ( value = " pattern without delimiter " , required = true ) string pattern without delimiter , @ api param ( value = " none " , required = true ) @ valid @ request part ( value = " byte " , required = true ) byte [ ] byte , @ api param ( value = " none " ) @ valid @ request part ( value = " integer " , required = false ) integer integer , @ api param ( value = " none " ) @ valid @ request part ( value = " int 3 2 " , required = false ) integer int 3 2 , @ api param ( value = " none " ) @ valid @ request part ( value = " int 6 4 " , required = false ) long int 6 4 , @ api param ( value = " none " ) @ valid @ request part ( value = " float " , required = false ) float float , @ api param ( value = " none " ) @ valid @ request part ( value = " string " , required = false ) string string , @ api param ( value = " none " ) @ valid @ request part ( value = " binary " , required = false ) multipart file binary , @ api param ( value = " none " ) @ valid @ request part ( value = " date " , required = false ) local date date , @ api param ( value = " none " ) @ valid @ request part ( value = " date time " , required = false ) offset date time date time , @ api param ( value = " none " ) @ valid @ request part ( value = " password " , required = false ) string password , @ api param ( value = " none " ) @ valid @ request part ( value = " callback " , required = false ) string param callback ) { return new response entity < > ( http status not implemented ) ; }


calculate the node digest and tree digest after the change

private precalculated digest precalculate digest ( digest op code type , string path , byte [ ] data , stat persisted s ) throws keeper exception no node exception { if ( ! digest enabled ) { return null ; } long prev node digest ; long new node digest ; switch ( type ) { case add : prev node digest = 0 ; new node digest = digest calculator calculate digest ( path , data , s ) ; break ; case remove : prev node digest = get record for path ( path ) precalculated digest node digest ; new node digest = 0 ; break ; case update : prev node digest = get record for path ( path ) precalculated digest node digest ; new node digest = digest calculator calculate digest ( path , data , s ) ; break ; case noop : new node digest = prev node digest = 0 ; break ; default : return null ; } long tree digest = get current tree digest ( ) - prev node digest + new node digest ; return new precalculated digest ( new node digest , tree digest ) ; }


reverse the jsonml transformation , making an xml text from a j s o n array

public static string to string ( j s o n array ja ) throws j s o n exception { object e ; int i ; j s o n object jo ; string k ; iterator keys ; int length ; string builder sb = new string builder ( ) ; string tag name ; string v ; / / emit < tag name tag name = ja get string ( 0 ) ; xml no space ( tag name ) ; tag name = xml escape ( tag name ) ; sb append ( ' < ' ) ; sb append ( tag name ) ; e = ja opt ( 1 ) ; if ( e instanceof j s o n object ) { i = 2 ; jo = ( j s o n object ) e ; / / emit the attributes keys = jo keys ( ) ; while ( keys has next ( ) ) { k = keys next ( ) to string ( ) ; xml no space ( k ) ; v = jo opt string ( k ) ; if ( v ! = null ) { sb append ( ' ' ) ; sb append ( xml escape ( k ) ) ; sb append ( ' = ' ) ; sb append ( ' " ' ) ; sb append ( xml escape ( v ) ) ; sb append ( ' " ' ) ; } } } else { i = 1 ; } / / emit content in body length = ja length ( ) ; if ( i > = length ) { sb append ( ' / ' ) ; sb append ( ' > ' ) ; } else { sb append ( ' > ' ) ; do { e = ja get ( i ) ; i + = 1 ; if ( e ! = null ) { if ( e instanceof string ) { sb append ( xml escape ( e to string ( ) ) ) ; } else if ( e instanceof j s o n object ) { sb append ( to string ( ( j s o n object ) e ) ) ; } else if ( e instanceof j s o n array ) { sb append ( to string ( ( j s o n array ) e ) ) ; } } } while ( i < length ) ; sb append ( ' < ' ) ; sb append ( ' / ' ) ; sb append ( tag name ) ; sb append ( ' > ' ) ; } return sb to string ( ) ; }


get the window that contains the specified provider ' s component

public window get provider window ( component provider provider ) { component placeholder placeholder = get active placeholder ( provider ) ; if ( placeholder ! = null ) { return root get window ( placeholder ) ; } return null ; }


if the stream writes in blocks , then counters during the write may be zero until a whole block is written - or the write has finished

public boolean stream writes in blocks ( ) { return false ; }


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


sets the scope of the acl entry if this method is not called , then the builder assumes { @ link acl entry scope # access }

public builder set scope ( acl entry scope scope ) { this scope = scope ; return this ; }


public set < string > get allowed methods ( ) { set < string > result = new linked hash set < > ( ) ; for ( partial match match : this partial matches ) { for ( request method method : match get info ( ) get methods condition ( ) get methods ( ) ) { result add ( method name ( ) ) ; } } return result ; }


set the response status according to the { @ link response status } annotation

private void set response status ( servlet web request web request ) throws i o exception { http status status = get response status ( ) ; if ( status = = null ) { return ; } http servlet response response = web request get response ( ) ; if ( response ! = null ) { string reason = get response status reason ( ) ; if ( string utils has text ( reason ) ) { response send error ( status value ( ) , reason ) ; } else { response set status ( status value ( ) ) ; } } / / to be picked up by redirect view web request get request ( ) set attribute ( view response status attribute , status ) ; }


returns true if the address input field contains text the get address ( ) method will return null if text is not a valid address

public boolean has input ( ) { return text field get text ( ) length ( ) ! = 0 ; }


if the mouse is dragging a rectangle , pick the vertices contained in that rectangle clean up settings from mouse pressed

public void mouse released ( mouse event e ) { visualization viewer < v , e > vv = ( visualization viewer < v , e > ) e get source ( ) ; if ( e get modifiers ex ( ) = = this add to selection modifiers ) { if ( down ! = null ) { point 2 d out = e get point ( ) ; if ( vertex = = null & & hey thats too close ( down , out , 5 ) = = false ) { pick contained vertices ( vv , down , out , false ) ; } } } else { / / mouse released without the ' add to selection ' modifiers see if we have been dragging if ( down ! = null ) { / / check to see if we were dragging ( no vertex picked and a large enough rectangle ) point 2 d out = e get point ( ) ; if ( vertex = = null & & hey thats too close ( down , out , 5 ) = = false ) { pick contained vertices ( vv , down , out , true ) ; } } } down = null ; vertex = null ; edge = null ; rect set frame ( 0 , 0 , 0 , 0 ) ; vv remove post render paintable ( lens paintable ) ; vv repaint ( ) ; }


called when the renderer is stopped the default implementation is a no - op

protected void on stopped ( ) { / / do nothing }


void configure credential factory ( chaining rest http request credential factory factory ) ;


verify that the calling thread is the android main thread calls to this method are usually preconditions for subscription behavior which instances of this class later undo see the class documentation for an example

public static void verify main thread ( ) { if ( looper my looper ( ) ! = looper get main looper ( ) ) { throw new illegal state exception ( " expected to be called on the main thread but was " + thread current thread ( ) get name ( ) ) ; } }


protected void handle sso post profile request ( final http servlet response response , final http servlet request request , final base http servlet request x m l message decoder decoder ) throws exception { val result = get saml profile handler configuration context ( ) get saml http request extractor ( ) extract ( request , decoder , authn request class ) ; if ( result is present ( ) ) { initiate authentication request ( result get ( ) , response , request ) ; } }


sets a new location and radius for this circle

public void set ( float x , float y , float radius ) { this x = x ; this y = y ; this radius = radius ; }


note : currently the concept of minmax idle state retention has been deprecated and only idle state retention time is supported the min idle state retention is regarded as idle state retention and the max idle state retention is derived from idle state retention as 1 5 x idle state retention

public long get max idle state retention time ( ) { return get min idle state retention time ( ) * 3 / 2 ; }


public api client set temp folder path ( string temp folder path ) { this temp folder path = temp folder path ; return this ; }


lambda class maker generates lambda classes for us , but it does so by essentially simulating the call to lambda metafactory that the jvm would make when encountering an invokedynamic lambda metafactory is in the jdk and its implementation has a property to write out ( " dump " ) generated classes , which we take advantage of here this property can be set externally , and in that case the specified directory is used as a temporary dir otherwise , it will be set here , before doing anything else since the property is read in the static initializer

static path create and register lambda dump directory ( ) { string property value = system get property ( lambda metafactory dumper property ) ; if ( property value ! = null ) { path path = paths get ( property value ) ; check state ( files is directory ( path ) , " the path ' % s ' is not a directory " , path ) ; / / it is not necessary to check whether ' path ' is an empty directory it is possible that / / lambda metafactory is loaded before this class , and there are already lambda classes dumped / / into the ' path ' folder / / todo ( kmb ) : maybe we can empty the folder here return path ; } path dump directory ; try { dump directory = files create temp directory ( " lambdas " ) ; } catch ( i o exception e ) { throw new i o error ( e ) ; } system set property ( lambda metafactory dumper property , dump directory to string ( ) ) ; delete tree on exit ( dump directory ) ; return dump directory ; }


public void set before image ( table records before image ) { this before image = before image ; }


public static void start activity for result ( @ non null final bundle extras , @ non null final activity activity , @ non null final class < ? extends activity > clz , final int request code , final view shared elements ) { start activity for result ( activity , extras , activity get package name ( ) , clz get name ( ) , request code , get options bundle ( activity , shared elements ) ) ; }


get a long option not smaller than the minimum allowed value , supporting memory prefixes k , m , g , t , p

static long long bytes option ( final configuration conf , final string key , final long def val , final long min ) { long v = conf get long bytes ( key , def val ) ; preconditions check argument ( v > = min , string format ( " value of % s : % d is below the minimum value % d " , key , v , min ) ) ; log debug ( " value of { } is { } " , key , v ) ; return v ; }


creates a { @ code variables } configuration from a list of keyvalue pairs if there are multiple entries with the same key , the variable will be treated as sequence type

private cc toolchain variables create variables ( string entries ) { if ( entries length % 2 ! = 0 ) { throw new illegal argument exception ( " create variables takes an even number of arguments ( key / value pairs ) " ) ; } multimap < string , string > entry map = array list multimap create ( ) ; for ( int i = 0 ; i < entries length ; i + = 2 ) { entry map put ( entries [ i ] , entries [ i + 1 ] ) ; } cc toolchain variables builder variables = cc toolchain variables builder ( ) ; for ( string name : entry map key set ( ) ) { collection < string > value = entry map get ( name ) ; if ( value size ( ) = = 1 ) { variables add string variable ( name , value iterator ( ) next ( ) ) ; } else { variables add string sequence variable ( name , immutable list copy of ( value ) ) ; } } return variables build ( ) ; }


tests that when idle channels become active again , they need to " catch up " with the latest watermark before they are considered for min watermark computation again

public void test multiple input watermark realignment after resume active ( ) throws exception { status watermark output valve output = new status watermark output ( ) ; status watermark valve valve = new status watermark valve ( 3 ) ; valve input watermark ( new watermark ( 10 ) , 0 , valve output ) ; valve input watermark ( new watermark ( 7 ) , 1 , valve output ) ; valve input watermark ( new watermark ( 3 ) , 2 , valve output ) ; assert equals ( new watermark ( 3 ) , valve output pop last seen output ( ) ) ; assert equals ( null , valve output pop last seen output ( ) ) ; valve input stream status ( stream status idle , 2 , valve output ) ; assert equals ( new watermark ( 7 ) , valve output pop last seen output ( ) ) ; assert equals ( null , valve output pop last seen output ( ) ) ; / / let channel 2 become active again ; since the min watermark has now advanced to 7 , / / channel 2 should have been marked as non - aligned valve input stream status ( stream status active , 2 , valve output ) ; assert false ( valve get input channel status ( 2 ) is watermark aligned ) ; / / during the realignment process , watermarks should still be accepted by channel 2 ( but / / shouldn ' t yield new watermarks ) valve input watermark ( new watermark ( 5 ) , 2 , valve output ) ; assert equals ( 5 , valve get input channel status ( 2 ) watermark ) ; assert equals ( null , valve output pop last seen output ( ) ) ; / / let channel 2 catch up with the min watermark ; now should be realigned valve input watermark ( new watermark ( 9 ) , 2 , valve output ) ; assert true ( valve get input channel status ( 2 ) is watermark aligned ) ; assert equals ( null , valve output pop last seen output ( ) ) ; / / check that realigned inputs is now taken into account for watermark advancement valve input watermark ( new watermark ( 12 ) , 1 , valve output ) ; assert equals ( new watermark ( 9 ) , valve output pop last seen output ( ) ) ; assert equals ( null , valve output pop last seen output ( ) ) ; }


& lt ; max a m share & gt ; = = > yarn scheduler capacity & lt ; queue - name & gt ; maximum - am - resource - percent

private void emit max a m share ( string queue name , f s queue queue ) { float queue max am share = queue get max a m share ( ) ; / / direct floating point comparison is ok here if ( queue max am share ! = 0 0f & & queue max am share ! = queue max a m share default & & queue max am share ! = queue max am share disabled ) { capacity scheduler config set float ( prefix + queue name + " maximum - am - resource - percent " , queue max am share ) ; } if ( queue max am share = = queue max am share disabled & & queue max am share ! = queue max a m share default ) { capacity scheduler config set float ( prefix + queue name + " maximum - am - resource - percent " , 1 0f ) ; } }


returns the contents that have been written to this instance , as a byte array


returns the list of attributes that may contribute java runtime dependencies

immutable list < string > get attributes with java runtime deps ( rule context rule context ) ;


do not modify tiles here this is only for specialized configuration

default void post generate ( tiles tiles ) { }


sets the records to be returned by this iterator each record ' s { @ link record and position } will have the same offset ( for { @ link record and position # get offset ( ) } the first returned record will have a records - to - skip count of { @ code skip count of first + 1 } , following the contract that each record needs to point to the position after itself ( because a checkpoint taken after the record was emitted needs to resume from after that record )

public void set ( final e [ ] records , final int num , final long offset , final long skip count of first ) { this records = records ; this num = num ; this pos = 0 ; this record and position set ( null , offset , skip count of first ) ; }


runs the provided sql and returns a cursor over the result set you may include ? in where clause in the query , which will be replaced by the second to the last parameters , such as : cursor cursor = lite pal find by s q l ( & quot ; select from person where name = ? and age = ? & quot ; , & quot ; tom & quot ; , & quot ; 14 & quot ; ) ;

public static cursor find by s q l ( string sql ) { synchronized ( lite pal support class ) { base utility check conditions correct ( sql ) ; if ( sql = = null ) { return null ; } if ( sql length < = 0 ) { return null ; } string [ ] selection args ; if ( sql length = = 1 ) { selection args = null ; } else { selection args = new string [ sql length - 1 ] ; system arraycopy ( sql , 1 , selection args , 0 , sql length - 1 ) ; } return connector get database ( ) raw query ( sql [ 0 ] , selection args ) ; } }


protected list < string > flat user data ( user data user data ) { list < string > result = new array list < > ( ) ; map < string , list < string > > zone data = user data get zone data ( ) ; for ( map entry < string , list < string > > entry : zone data entry set ( ) ) { result add all ( entry get value ( ) ) ; } return result ; }


returns the java source file name that typically corresponds to the given class name

private string source file name ( string class name ) { int index 1 = class name last index of ( ' ' ) + 1 ; int index 2 = class name index of ( ' $ ' , index 1 ) ; return ( index 2 > 0 ? class name substring ( index 1 , index 2 ) : class name substring ( index 1 ) ) + " java " ; }


public static byte [ ] to byte array ( input stream in ) throws i o exception { byte array output stream out = new byte array output stream ( ) ; copy ( in , out ) ; return out to byte array ( ) ; }


notifies the master node that the state of a persistent task has changed persistent task implementers shouldn ' t call this method directly and use { @ link allocated persistent task # update persistent task state } instead

void send update state request ( final string task id , final long task allocation i d , final persistent task state task state , final action listener < persistent task < ? > > listener ) { update persistent task status action request request = new update persistent task status action request ( task id , task allocation i d , task state ) ; execute ( request , update persistent task status action instance , listener ) ; }


extracts the result values form the test harness and clear the output queue

private < t > list < t > extract result ( one input stream operator test harness < ? , t > test harness ) { list < stream record < ? extends t > > stream records = test harness extract output stream records ( ) ; list < t > result = new array list < > ( ) ; for ( object in : stream records ) { if ( in instanceof stream record ) { result add ( ( t ) ( ( stream record ) in ) get value ( ) ) ; } } test harness get output ( ) clear ( ) ; return result ; }


add the given filter to the end of the filter chain filter functions are typically used to invoke methods on the statement before it is executed for example : < pre class = " code " > database client client = … ; client sql ( " select book id from book " ) filter ( statement - > statement fetch size ( 100 ) )

default generic execute spec filter ( function < ? super statement , ? extends statement > filter function ) { assert not null ( filter function , " filter function must not be null " ) ; return filter ( ( statement , next ) - > next execute ( filter function apply ( statement ) ) ) ; }


public client get client ( ) { return client ; }


returns true if the dashed - line effect is enabled , false if not default : disabled

public boolean is dashed line enabled ( ) { return m dash path effect = = null ? false : true ; }


shutdown the instrumentation for the process

public void shutdown ( ) { default metrics system instance ( ) unregister source ( name ) ; }


helper method for summarizing a list of values

protected numeric column summary < short > summarize ( integer values ) { / / cast everything to short here short [ ] short values = new short [ values length ] ; for ( int i = 0 ; i < values length ; i + + ) { if ( values [ i ] ! = null ) { short values [ i ] = values [ i ] short value ( ) ; } } return new aggregate combine harness < short , numeric column summary < short > , short summary aggregator > ( ) { @ override protected void compare results ( numeric column summary < short > result 1 , numeric column summary < short > result 2 ) { assert assert equals ( result 1 get total count ( ) , result 2 get total count ( ) ) ; assert assert equals ( result 1 get null count ( ) , result 2 get null count ( ) ) ; assert assert equals ( result 1 get missing count ( ) , result 2 get missing count ( ) ) ; assert assert equals ( result 1 get non missing count ( ) , result 2 get non missing count ( ) ) ; assert assert equals ( result 1 get infinity count ( ) , result 2 get infinity count ( ) ) ; assert assert equals ( result 1 get nan count ( ) , result 2 get nan count ( ) ) ; assert assert equals ( result 1 contains null ( ) , result 2 contains null ( ) ) ; assert assert equals ( result 1 contains non null ( ) , result 2 contains non null ( ) ) ; assert assert equals ( result 1 get min ( ) short value ( ) , result 2 get min ( ) short value ( ) ) ; assert assert equals ( result 1 get max ( ) short value ( ) , result 2 get max ( ) short value ( ) ) ; assert assert equals ( result 1 get sum ( ) short value ( ) , result 2 get sum ( ) short value ( ) ) ; assert assert equals ( result 1 get mean ( ) double value ( ) , result 2 get mean ( ) double value ( ) , 1e - 1 2d ) ; assert assert equals ( result 1 get variance ( ) double value ( ) , result 2 get variance ( ) double value ( ) , 1e - 9d ) ; assert assert equals ( result 1 get standard deviation ( ) double value ( ) , result 2 get standard deviation ( ) double value ( ) , 1e - 1 2d ) ; } } summarize ( short values ) ; }


confirm that replace values ( ) returns a list implementing random access

public void test replace values random access ( ) { multimap < string , integer > multimap = create ( ) ; multimap put ( " foo " , 1 ) ; multimap put ( " foo " , 3 ) ; assert true ( multimap replace values ( " foo " , as list ( 2 , 4 ) ) instanceof random access ) ; assert true ( multimap replace values ( " bar " , as list ( 2 , 4 ) ) instanceof random access ) ; }


gets a { @ link package } from the { @ link recursive package provider } may return a { @ link package } that has errors

private package get package ( package identifier pkg identifier ) throws no such package exception , interrupted exception { return recursive package provider get package ( event handler , pkg identifier ) ; }


refer to https : www envoyproxy iodocsenvoylatestapi - v 2dataaccesslogv 2accesslog proto # data - accesslog - v 2 - responseflags

protected static string parse internal error code ( final response flags response flags ) { if ( response flags ! = null ) { if ( response flags get failed local healthcheck ( ) ) { return " failed local healthcheck " ; } else if ( response flags get no healthy upstream ( ) ) { return " no healthy upstream " ; } else if ( response flags get upstream request timeout ( ) ) { return " upstream request timeout " ; } else if ( response flags get local reset ( ) ) { return " local reset " ; } else if ( response flags get upstream connection failure ( ) ) { return " upstream connection failure " ; } else if ( response flags get upstream connection termination ( ) ) { return " upstream connection termination " ; } else if ( response flags get upstream overflow ( ) ) { return " upstream overflow " ; } else if ( response flags get no route found ( ) ) { return " no route found " ; } else if ( response flags get delay injected ( ) ) { return " delay injected " ; } else if ( response flags get fault injected ( ) ) { return " fault injected " ; } else if ( response flags get rate limited ( ) ) { return " rate limited " ; } else if ( response flags get unauthorized details ( ) ! = null ) { return " unauthorized details " ; } else if ( response flags get rate limit service error ( ) ) { return " rate limit service error " ; } else if ( response flags get downstream connection termination ( ) ) { return " downstream connection termination " ; } else if ( response flags get upstream retry limit exceeded ( ) ) { return " upstream retry limit exceeded " ; } else if ( response flags get stream idle timeout ( ) ) { return " stream idle timeout " ; } else if ( response flags get invalid envoy request headers ( ) ) { return " invalid envoy request headers " ; } else if ( response flags get downstream protocol error ( ) ) { return " downstream protocol error " ; } } return " " ; }


public void reset n m heartbeat receive flag ( ) { synchronized ( resource tracker for attributes class ) { received n m heartbeat = false ; } }


test serialization of object with outer number type < b > 200 < b > - output composite

public response entity < outer composite > fake outer composite serialize with http info ( outer composite body ) throws rest client exception { object post body = body ; string path = api client expand path ( " / fake / outer / composite " , collections < string , object > empty map ( ) ) ; final multi value map < string , string > query params = new linked multi value map < string , string > ( ) ; final http headers header params = new http headers ( ) ; final multi value map < string , string > cookie params = new linked multi value map < string , string > ( ) ; final multi value map < string , object > form params = new linked multi value map < string , object > ( ) ; final string [ ] local var accepts = { " * / * " } ; final list < media type > local var accept = api client select header accept ( local var accepts ) ; final string [ ] content types = { } ; final media type content type = api client select header content type ( content types ) ; string [ ] auth names = new string [ ] { } ; parameterized type reference < outer composite > return type = new parameterized type reference < outer composite > ( ) { } ; return api client invoke a p i ( path , http method post , query params , post body , header params , cookie params , form params , local var accept , content type , auth names , return type ) ; }


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


private byte sequence build registry key prefix ( string cluster ) { return byte sequence from ( registry key prefix + cluster , utf 8 ) ; }


the string contains a comma separated values

final enum set < e > parse ( final string str ) { final enum set < e > set = enum set none of ( enum class ) ; if ( ! str is empty ( ) ) { for ( int i , j = 0 ; j > = 0 ; ) { i = j > 0 ? j + 1 : 0 ; j = str index of ( ' , ' , i ) ; final string sub = j > = 0 ? str substring ( i , j ) : str substring ( i ) ; set add ( enum value of ( enum class , string utils to upper case ( sub trim ( ) ) ) ) ; } } return set ; }


build the { @ link rest client } used for reindexing from remote clusters

static rest client build rest client ( remote info remote info , reindex ssl config ssl config , long task id , list < thread > thread collector ) { header [ ] client headers = new header [ remote info get headers ( ) size ( ) ] ; int i = 0 ; for ( map entry < string , string > header : remote info get headers ( ) entry set ( ) ) { client headers [ i + + ] = new basic header ( header get key ( ) , header get value ( ) ) ; } final rest client builder builder = rest client builder ( new http host ( remote info get host ( ) , remote info get port ( ) , remote info get scheme ( ) ) ) set default headers ( client headers ) set request config callback ( c - > { c set connect timeout ( math to int exact ( remote info get connect timeout ( ) millis ( ) ) ) ; c set socket timeout ( math to int exact ( remote info get socket timeout ( ) millis ( ) ) ) ; return c ; } ) set http client config callback ( c - > { / / enable basic auth if it is configured if ( remote info get username ( ) ! = null ) { username password credentials creds = new username password credentials ( remote info get username ( ) , remote info get password ( ) ) ; credentials provider credentials provider = new basic credentials provider ( ) ; credentials provider set credentials ( auth scope any , creds ) ; c set default credentials provider ( credentials provider ) ; } / / stick the task id in the thread name so we can track down tasks from stack traces atomic integer threads = new atomic integer ( ) ; c set thread factory ( r - > { string name = " es - client - " + task id + " - " + threads get and increment ( ) ; thread t = new thread ( r , name ) ; thread collector add ( t ) ; return t ; } ) ; / / limit ourselves to one reactor thread because for now the search process is single threaded c set default i o reactor config ( i o reactor config custom ( ) set io thread count ( 1 ) build ( ) ) ; c set s s l strategy ( ssl config get strategy ( ) ) ; return c ; } ) ; if ( strings has length ( remote info get path prefix ( ) ) & & " / " equals ( remote info get path prefix ( ) ) = = false ) { builder set path prefix ( remote info get path prefix ( ) ) ; } return builder build ( ) ; }


if set , will enable scrolling of the search request

public scroll scroll ( ) { return scroll ; }


tests the external checkpoints properties

public void test checkpoint properties ( ) { checkpoint properties props = checkpoint properties for checkpoint ( checkpoint retention policy retain on failure ) ; assert false ( props force checkpoint ( ) ) ; assert true ( props discard on subsumed ( ) ) ; assert true ( props discard on job finished ( ) ) ; assert true ( props discard on job cancelled ( ) ) ; assert false ( props discard on job failed ( ) ) ; assert true ( props discard on job suspended ( ) ) ; props = checkpoint properties for checkpoint ( checkpoint retention policy retain on cancellation ) ; assert false ( props force checkpoint ( ) ) ; assert true ( props discard on subsumed ( ) ) ; assert true ( props discard on job finished ( ) ) ; assert false ( props discard on job cancelled ( ) ) ; assert false ( props discard on job failed ( ) ) ; assert false ( props discard on job suspended ( ) ) ; }


creates a variant for a given media playlist url

public static variant create media playlist variant url ( uri url ) { format format = new format builder ( ) set id ( " 0 " ) set container mime type ( mime types application m3u8 ) build ( ) ; return new variant ( url , format , / * video group id = * / null , / * audio group id = * / null , / * subtitle group id = * / null , / * caption group id = * / null ) ; }


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

public void test client model test ( ) { client client = null ; client response = api test client model ( client ) block ( ) ; / / todo : test validations }


exit a parse tree produced by { @ link sql base parser # boolean value }

void exit boolean value ( sql base parser boolean value context ctx ) ;


called by { @ link spatial join operator } { @ link spatial join operator } must call { @ link # probe operator finished ( ) } on completion to signal that spatial index is no longer needed

public synchronized listenable future < pages spatial index > create pages spatial index ( ) { active probe operators retain ( ) ; if ( pages spatial index ! = null ) { return immediate future ( pages spatial index get ( ) ) ; } settable future < pages spatial index > future = settable future create ( ) ; pages spatial index futures add ( future ) ; return future ; }


sends terminate signal to all the process belonging to the passed process group , allowing the group to gracefully exit

public static void terminate process group ( string pgrp id ) { maybe signal process group ( pgrp id , sigterm , sigterm str , true ) ; }


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


apply a umask to this permission and return a new one the umask is used by create , mkdir , and other hadoop filesystem operations the mode argument for these operations is modified by removing the bits which are set in the umask thus , the umask limits the permissions which newly created files and directories get

public fs permission apply u mask ( fs permission umask ) { return new fs permission ( useraction and ( umask useraction not ( ) ) , groupaction and ( umask groupaction not ( ) ) , otheraction and ( umask otheraction not ( ) ) ) ; }


finds or creates a invoke dynamic constant constant pool entry with the given bootstrap method constant pool entry index , method name , and descriptor

public int add invoke dynamic constant ( int bootstrap method index , string name , string descriptor , clazz [ ] referenced classes ) { return add invoke dynamic constant ( bootstrap method index , add name and type constant ( name , descriptor ) , referenced classes ) ; }


returns the index within this string of the first occurrence of the specified substring , starting at the specified index

public int index of ( binary string data str , int from index ) { ensure materialized ( ) ; str ensure materialized ( ) ; if ( str binary section size in bytes = = 0 ) { return 0 ; } if ( in first segment ( ) ) { / / position in byte int byte idx = 0 ; / / position is char int char idx = 0 ; while ( byte idx < binary section size in bytes & & char idx < from index ) { byte idx + = num bytes for first byte ( get byte one segment ( byte idx ) ) ; char idx + + ; } do { if ( byte idx + str binary section size in bytes > binary section size in bytes ) { return - 1 ; } if ( binary segment utils equals ( binary section segments , binary section offset + byte idx , str binary section segments , str binary section offset , str binary section size in bytes ) ) { return char idx ; } byte idx + = num bytes for first byte ( get byte one segment ( byte idx ) ) ; char idx + + ; } while ( byte idx < binary section size in bytes ) ; return - 1 ; } else { return index of multi segs ( str , from index ) ; } }


abstract void register timer ( context ctx , long cleanup time ) ;


the maximum relative size out of the whole chart view if the legend is to the rightleft of the chart , then this affects the width of the legend if the legend is to the topbottom of the chart , then this affects the height of the legend default : 0 9 5f ( 95 % )

public void set max size percent ( float max size ) { m max size percent = max size ; }


removes the items between the specified indices , inclusive

public void remove range ( int start , int end ) { int n = size ; if ( end > = n ) throw new index out of bounds exception ( " end can ' t be > = size : " + end + " > = " + size ) ; if ( start > end ) throw new index out of bounds exception ( " start can ' t be > end : " + start + " > " + end ) ; int count = end - start + 1 , last index = n - count ; if ( ordered ) system arraycopy ( items , start + count , items , start , n - ( start + count ) ) ; else { int i = math max ( last index , end + 1 ) ; system arraycopy ( items , i , items , start , n - i ) ; } size = n - count ; }


returns a copy of this request builder with all of the options put so far on this builder this method returns a " deep " copy in that all non - immutable arguments are copied such that changes to one builder will not affect the other builder however , in addition to immutable arguments , the current model is not copied copied so changes to the model will affect both builders even if this object was locked , the cloned object returned from this method will not be locked

public t clone ( ) { try { base request options < ? > result = ( base request options < ? > ) super clone ( ) ; result options = new options ( ) ; result options put all ( options ) ; result transformations = new cached hash code array map < > ( ) ; result transformations put all ( transformations ) ; result is locked = false ; result is auto clone enabled = false ; return ( t ) result ; } catch ( clone not supported exception e ) { throw new runtime exception ( e ) ; } }


used to retrieve the latest offset of a partition

public static offset spec latest ( ) { return new latest spec ( ) ; }


case 5 : destination name changed , source name and content changed

private void name contents changed ( program module source root , string source tree name , string dest tree name , string orig tree name , int conflict index ) throws cancelled exception { if ( only source structure choice = = ask user & & conflict option = = ask user & & merge manager ! = null ) { wait for user input ( source tree name , dest tree name , orig tree name , conflict index , true , false , true , true ) ; if ( conflict option = = canceled ) { throw new cancelled exception ( ) ; } / / if the " use for all " check box is selected / / then save the option chosen for this conflict type if ( merge panel get use for all ( ) ) { only source structure choice = conflict option ; } } int option to use = ( only source structure choice = = ask user ) ? conflict option : only source structure choice ; switch ( option to use ) { case keep other name : / / delete and add back in using source tree result listing remove tree ( dest tree name ) ; create tree ( result listing , dest tree name , source root ) ; break ; case keep private name : / / delete other name result listing remove tree ( dest tree name ) ; create tree ( result listing , source tree name , source root ) ; break ; case add new tree : create tree ( result listing , source tree name , source root ) ; break ; case rename private : create tree ( result listing , get unique tree name ( source tree name ) , source root ) ; break ; case original name : try { result listing rename tree ( dest tree name , get unique tree name ( orig tree name ) ) ; } catch ( duplicate name exception e ) { } break ; case canceled : throw new cancelled exception ( ) ; } conflict option = ask user ; }


the quote character used in delineated formats the default value for delimited format is { @ value # default quote char }

public character get quote character ( ) { return quote character ; }


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


the symbol status of this entry , which includes visibility information < code > optional aapt pb symbol status symbol status = 3 ; < code >


return a resolvable type for this bean definition this implementation delegates to { @ link # get bean class ( ) }

public resolvable type get resolvable type ( ) { return ( has bean class ( ) ? resolvable type for class ( get bean class ( ) ) : resolvable type none ) ; }


create the resource calculator plugin from the class name and configure it if class name is null , this method will try and return a memory calculator plugin available for this system

public static resource calculator plugin get resource calculator plugin ( class < ? extends resource calculator plugin > clazz , configuration conf ) { if ( clazz ! = null ) { return reflection utils new instance ( clazz , conf ) ; } try { return new resource calculator plugin ( ) ; } catch ( unsupported operation exception ue ) { log warn ( " failed to instantiate default resource calculator " + ue get message ( ) ) ; } catch ( throwable t ) { log warn ( t + " : failed to instantiate default resource calculator " , t ) ; } return null ; }


a set of pairs of reported source file path and the actual source file path , relative to the workspace directory , if the two values are different if the reported source file is the same as the actual source path it will not be included in this set this is useful for virtual include paths in c + + , which get reported at the include location and not the real source path for example , the reported include source file can be " bazel - outk 8 - fastbuildbinincludecommon virtual includesstrategystrategy h " , but its actual source path is " includecommonstrategy h "

public nested set < pair < string , string > > get reported to actual sources ( ) { return reported to actual sources ; }


int get round trip time ( int default value ) { int bit = 1 < < round trip time ; return ( bit & set ) ! = 0 ? values [ round trip time ] : default value ; }


public static boolean is empty ( map < ? , ? > map ) { return ! is not empty ( map ) ; }


{ @ inherit doc } the implementation for { @ link rule tag token } always returns { @ code null }

public token source get token source ( ) { return null ; }


public int find column ( string column label ) throws s q l exception { return 0 ; }


return true iff this thread has a lock on non - zero resources

public boolean thread has resources ( ) { return thread locked get ( ) ; }


returns the int denoted by a literal string in the specified base , as if by the starlark expression { @ code int ( s , base ) }

public static starlark int parse ( string s , int base ) { string string for errors = s ; if ( s is empty ( ) ) { throw new number format exception ( " empty string " ) ; } / / + / - prefix ? boolean is negative = false ; char c = s char at ( 0 ) ; if ( c = = ' + ' ) { s = s substring ( 1 ) ; } else if ( c = = ' - ' ) { s = s substring ( 1 ) ; is negative = true ; } string digits = s ; / / 0b 0o 0x prefix ? if ( s length ( ) > 1 & & s char at ( 0 ) = = ' 0 ' ) { int prefix base = 0 ; c = s char at ( 1 ) ; if ( c = = ' b ' | | c = = ' b ' ) { prefix base = 2 ; } else if ( c = = ' o ' | | c = = ' o ' ) { prefix base = 8 ; } else if ( c = = ' x ' | | c = = ' x ' ) { prefix base = 16 ; } if ( prefix base ! = 0 ) { digits = s substring ( 2 ) ; / / strip prefix if ( base = = 0 ) { base = prefix base ; } else if ( base ! = prefix base ) { throw new number format exception ( string format ( " invalid base - % d literal : % s ( % s prefix wants base % d ) " , base , starlark repr ( string for errors ) , s substring ( 0 , 2 ) , prefix base ) ) ; } } } / / no prefix , no base ? use decimal if ( digits = = s & & base = = 0 ) { / / don ' t infer base when input starts with ' 0 ' due to octal / decimal ambiguity if ( s length ( ) > 1 & & s char at ( 0 ) = = ' 0 ' ) { throw new number format exception ( " cannot infer base when string begins with a 0 : " + starlark repr ( string for errors ) ) ; } base = 10 ; } if ( base < 2 | | base > 36 ) { throw new number format exception ( string format ( " invalid base % d ( want 2 < = base < = 36 ) " , base ) ) ; } / / do not allow long parse long and new big integer to accept another + / - sign if ( digits starts with ( " + " ) | | digits starts with ( " - " ) ) { throw new number format exception ( string format ( " invalid base - % d literal : % s " , base , starlark repr ( string for errors ) ) ) ; } starlark int result ; try { result = starlark int of ( long parse long ( digits , base ) ) ; } catch ( number format exception unused 1 ) { try { result = starlark int of ( new big integer ( digits , base ) ) ; } catch ( number format exception unused 2 ) { throw new number format exception ( string format ( " invalid base - % d literal : % s " , base , starlark repr ( string for errors ) ) ) ; } } return is negative ? starlark int uminus ( result ) : result ; }


protected uri components normalize ( final string resource ) { val builder = uri components builder new instance ( ) ; val matcher = resource normalized pattern matcher ( resource ) ; if ( ! matcher matches ( ) ) { logger error ( " unable to match the resource [ { } ] against pattern [ { } ] for normalization " , resource , matcher pattern ( ) pattern ( ) ) ; return null ; } builder scheme ( matcher group ( pattern group index scheme ) ) ; builder user info ( matcher group ( pattern group index userinfo ) ) ; builder host ( matcher group ( pattern group index host ) ) ; val port = matcher group ( pattern group index port ) ; if ( ! string utils is blank ( port ) ) { builder port ( integer parse int ( port ) ) ; } builder path ( matcher group ( pattern group index path ) ) ; builder query ( matcher group ( pattern group index query ) ) ; builder fragment ( matcher group ( pattern group index fragment ) ) ; val current builder = builder build ( ) ; if ( string utils is blank ( current builder get scheme ( ) ) ) { if ( string utils is not blank ( current builder get user info ( ) ) & & string utils is blank ( current builder get path ( ) ) & & string utils is blank ( current builder get query ( ) ) & & current builder get port ( ) < 0 ) { builder scheme ( " acct " ) ; } else { builder scheme ( " https " ) ; } } builder fragment ( null ) ; return builder build ( ) ; }


apply the given customizers to the underlying bean definition

public bean definition builder apply customizers ( bean definition customizer customizers ) { for ( bean definition customizer customizer : customizers ) { customizer customize ( this bean definition ) ; } return this ; }


public void add permission ( string role , string resource , string action ) { string sql = " insert into permissions ( role , resource , action ) values ( ? , ? , ? ) " ; try { jt update ( sql , role , resource , action ) ; } catch ( cannot get jdbc connection exception e ) { log util fatal log error ( " [ db - error ] " + e to string ( ) , e ) ; throw e ; } }


asserts that filters with the given configuration accept the given record

static void should accept ( subset configuration conf , metrics record record ) { assert true ( " accepts " + record , new glob filter ( conf ) accepts ( record ) ) ; assert true ( " accepts " + record , new regex filter ( conf ) accepts ( record ) ) ; }


set user credententials for this proxy and the current thread the given username and password will be applied to all subsequent { @ code get connection ( ) } calls on this data source proxy this will override any statically specified user credentials , that is , values of the " username " and " password " bean properties

public void set credentials for current thread ( string username , string password ) { this thread bound credentials set ( new jdbc user credentials ( username , password ) ) ; }


returns { @ link string } representations of the component { @ link package specification } s of the same format accepted by { @ link # from string }

public stream < string > contained packages ( ) { return get stream ( ) map ( package specification : : to string ) ; }


public static boolean write file from bytes by channel ( final file file , final byte [ ] bytes , final boolean is force ) { return write file from bytes by channel ( file , bytes , false , is force ) ; }


uses an { @ link enum map } to map keys to value collections

public static < k0 extends enum < k0 > > multimap builder with keys < k0 > enum keys ( final class < k0 > key class ) { check not null ( key class ) ; return new multimap builder with keys < k0 > ( ) { @ suppress warnings ( " unchecked " ) @ override < k extends k0 , v > map < k , collection < v > > create map ( ) { / / k must actually be k0 , since enums are effectively final / / ( their subclasses are inaccessible ) return ( map < k , collection < v > > ) new enum map < k0 , collection < v > > ( key class ) ; } } ; }


builds an instance of the filter with a provided authenticator , an authorizer , a prefix , and a realm

public t build auth filter ( ) { require non null ( realm , " realm is not set " ) ; require non null ( prefix , " prefix is not set " ) ; require non null ( authenticator , " authenticator is not set " ) ; require non null ( authorizer , " authorizer is not set " ) ; require non null ( unauthorized handler , " unauthorized handler is not set " ) ; final t auth filter = new instance ( ) ; auth filter authorizer = authorizer ; auth filter authenticator = authenticator ; auth filter prefix = prefix ; auth filter realm = realm ; auth filter unauthorized handler = unauthorized handler ; return auth filter ; }


repair the context and re - disassemble the instruction at the specified address

protected void modify single instruction context ( address addr , register value context value , boolean merge context ) { register base reg = context value get register ( ) get base register ( ) ; if ( ! base reg is processor context ( ) ) { throw new illegal argument exception ( " invalid context register : " + base reg get name ( ) ) ; } listing listing = program get listing ( ) ; if ( merge context ) { program context program context = program get program context ( ) ; register value old register value = program context get register value ( base reg , addr ) ; if ( old register value ! = null ) { context value = old register value combine values ( context value ) ; } } listing clear code units ( addr , addr , true ) ; get disassembler ( ) disassemble ( addr , null , context value , true ) ; }


maps legacy int configs to new config objects

private static object map config ( block block , int value , int position ) { if ( block instanceof sorter | | block instanceof unloader | | block instanceof item source ) return content item ( value ) ; if ( block instanceof liquid source ) return content liquid ( value ) ; if ( block instanceof mass driver | | block instanceof item bridge ) return point 2 unpack ( value ) sub ( point 2 x ( position ) , point 2 y ( position ) ) ; if ( block instanceof light block ) return value ; return null ; }


adds the action to the graph display not all graph displays support adding custom actions , so this may have no effect

public void add action ( docking action action ) ;


gets a referenced repeatable comment as a ref repeat comment object

public ref repeat comment get referenced repeatable comments ( int index ) { return ( ref repeat comment ) display comment arrays [ ref repeatables ] [ index ] ; }


issue : add at least one assertion to this test case solution : inserted assertion to check whether the execution of the main method in { @ link app } throws an exception

void should execute application without exception ( ) { assert does not throw ( ( ) - > app main ( new string [ ] { } ) ) ; }


protected int key for code ( int key code , int location ) { switch ( key code ) { case key codes key alt : return location = = location right ? keys alt right : keys alt left ; case key codes key backspace : return keys backspace ; case key codes key ctrl : return location = = location right ? keys control right : keys control left ; case key codes key delete : return keys forward del ; case key codes key down : return keys down ; case key codes key end : return keys end ; case key codes key enter : return location = = location numpad ? keys numpad enter : keys enter ; case key codes key escape : return keys escape ; case key codes key home : return keys home ; case key codes key left : return keys left ; case key codes key pagedown : return keys page down ; case key codes key pageup : return keys page up ; case key codes key right : return keys right ; case key codes key shift : return location = = location right ? keys shift right : keys shift left ; case key codes key tab : return keys tab ; case key codes key up : return keys up ; case key pause : return keys pause ; case key caps lock : return keys caps lock ; case key space : return keys space ; case key insert : return keys insert ; case key 0 : return keys num 0 ; case key 1 : return keys num 1 ; case key 2 : return keys num 2 ; case key 3 : return keys num 3 ; case key 4 : return keys num 4 ; case key 5 : return keys num 5 ; case key 6 : return keys num 6 ; case key 7 : return keys num 7 ; case key 8 : return keys num 8 ; case key 9 : return keys num 9 ; case key a : return keys a ; case key b : return keys b ; case key c : return keys c ; case key d : return keys d ; case key e : return keys e ; case key f : return keys f ; case key g : return keys g ; case key h : return keys h ; case key i : return keys i ; case key j : return keys j ; case key k : return keys k ; case key l : return keys l ; case key m : return keys m ; case key n : return keys n ; case key o : return keys o ; case key p : return keys p ; case key q : return keys q ; case key r : return keys r ; case key s : return keys s ; case key t : return keys t ; case key u : return keys u ; case key v : return keys v ; case key w : return keys w ; case key x : return keys x ; case key y : return keys y ; case key z : return keys z ; case key left window key : return keys unknown ; / / fixme case key right window key : return keys unknown ; / / fixme / / case key select key : return keys select key ; case key numpad0 : return keys numpad 0 ; case key numpad1 : return keys numpad 1 ; case key numpad2 : return keys numpad 2 ; case key numpad3 : return keys numpad 3 ; case key numpad4 : return keys numpad 4 ; case key numpad5 : return keys numpad 5 ; case key numpad6 : return keys numpad 6 ; case key numpad7 : return keys numpad 7 ; case key numpad8 : return keys numpad 8 ; case key numpad9 : return keys numpad 9 ; case key multiply : return keys numpad multiply ; case key add : return keys numpad add ; case key subtract : return keys numpad subtract ; case key decimal point key : return keys numpad dot ; case key divide : return keys numpad divide ; case key f1 : return keys f1 ; case key f2 : return keys f2 ; case key f3 : return keys f3 ; case key f4 : return keys f4 ; case key f5 : return keys f5 ; case key f6 : return keys f6 ; case key f7 : return keys f7 ; case key f8 : return keys f8 ; case key f9 : return keys f9 ; case key f10 : return keys f10 ; case key f11 : return keys f11 ; case key f12 : return keys f12 ; case key f13 : return keys f13 ; case key f14 : return keys f14 ; case key f15 : return keys f15 ; case key f16 : return keys f16 ; case key f17 : return keys f17 ; case key f18 : return keys f18 ; case key f19 : return keys f19 ; case key f20 : return keys f20 ; case key f21 : return keys f21 ; case key f22 : return keys f22 ; case key f23 : return keys f23 ; case key f24 : return keys f24 ; case key num lock : return keys num lock ; case key scroll lock : return keys scroll lock ; case key audio volume down : case key audio volume down firefox : return keys volume down ; case key audio volume up : case key audio volume up firefox : return keys volume up ; case key media track next : return keys media next ; case key media track previous : return keys media previous ; case key media stop : return keys media stop ; case key media play pause : return keys media play pause ; case key codes key print screen : return keys print screen ; case key semicolon : return keys semicolon ; case key equals : return keys equals ; case key comma : return keys comma ; case key dash : return keys minus ; case key period : return keys period ; case key forward slash : return keys slash ; case key grave accent : return keys unknown ; / / fixme case key open bracket : return keys left bracket ; case key backslash : return keys backslash ; case key close bracket : return keys right bracket ; case key single quote : return keys apostrophe ; default : return keys unknown ; } }


set a pre - configured markup template engine to use for the groovy markup template web configuration note that this engine instance has to be manually configured , since all other bean properties of this configurer will be ignored

public void set template engine ( markup template engine template engine ) { this template engine = template engine ; }


syncs the task executor ' s view on its allocated slots with the job master ' s view slots which are no longer reported by the job master are being freed slots which the job master thinks it still owns but which are no longer allocated to it will be failed via { @ link job master gateway # fail slot }

private void sync slots with snapshot from job master ( job master gateway job master gateway , allocated slot report allocated slot report ) { fail no longer allocated slots ( allocated slot report , job master gateway ) ; free no longer used slots ( allocated slot report ) ; }