renders the specified frame only should be called on the rendering thread

public void render frame ( int frame number , bitmap bitmap ) { canvas canvas = new canvas ( bitmap ) ; canvas draw color ( color transparent , porter duff mode src ) ; / / if blending is required , prepare the canvas with the nearest cached frame int next index ; if ( ! is key frame ( frame number ) ) { / / blending is required next index points to the next index to render onto the canvas next index = prepare canvas with closest cached frame ( frame number - 1 , canvas ) ; } else { / / blending isn ' t required start at the frame we ' re trying to render next index = frame number ; } / / iterate from next index to the frame number just preceding the one we ' re trying to render / / and composite them in order according to the disposal method for ( int index = next index ; index < frame number ; index + + ) { animated drawable frame info frame info = m animated drawable backend get frame info ( index ) ; disposal method disposal method = frame info disposal method ; if ( disposal method = = disposal method dispose to previous ) { continue ; } if ( frame info blend operation = = blend operation no blend ) { dispose to background ( canvas , frame info ) ; } m animated drawable backend render frame ( index , canvas ) ; m callback on intermediate result ( index , bitmap ) ; if ( disposal method = = disposal method dispose to background ) { dispose to background ( canvas , frame info ) ; } } animated drawable frame info frame info = m animated drawable backend get frame info ( frame number ) ; if ( frame info blend operation = = blend operation no blend ) { dispose to background ( canvas , frame info ) ; } / / finally , we render the current frame we don ' t dispose it m animated drawable backend render frame ( frame number , canvas ) ; maybe apply transformation ( bitmap ) ; }


parses a { @ code local variable table } attribute

private attribute local variable table ( direct class file cf , int offset , int length , parse observer observer ) { if ( length < 2 ) { return throw severely truncated ( ) ; } byte array bytes = cf get bytes ( ) ; int count = bytes get unsigned short ( offset ) ; if ( observer ! = null ) { observer parsed ( bytes , offset , 2 , " local variable table length : " + hex u 2 ( count ) ) ; } local variable list list = parse local variables ( bytes slice ( offset + 2 , offset + length ) , cf get constant pool ( ) , observer , count , false ) ; return new att local variable table ( list ) ; }


returns the { @ linkplain token # number double } value of the next token , consuming it if the next token is a string , this method will attempt to parse it as a double using { @ link double # parse double ( string ) }

public abstract double next double ( ) throws i o exception ;


returns elements that satisfy the given predicate warning : this method mutates the original list and then returns it

public run list < r > filter ( predicate < r > predicate ) { size = null ; first = null ; base = iterables filter ( base , predicate ) ; return this ; }


returns the name of the current constraint for this or filter condition

public string get selected constraint name ( ) { return constraint name ; }


set current context register value keep in mind that any non - flowing context values will be stripped

public void set context register ( register ctx reg , big integer value ) { emulator set context register value ( new register value ( ctx reg , value ) ) ; }


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


merges two environments the properties of the first environment might be overwritten by the second one

public static environment merge ( environment env 1 , environment env 2 ) { final environment merged env = new environment ( ) ; / / merge modules final map < string , module entry > modules = new linked hash map < > ( env 1 get modules ( ) ) ; modules put all ( env 2 get modules ( ) ) ; merged env modules = modules ; / / merge catalogs final map < string , catalog entry > catalogs = new hash map < > ( env 1 get catalogs ( ) ) ; catalogs put all ( env 2 get catalogs ( ) ) ; merged env catalogs = catalogs ; / / merge tables final map < string , table entry > tables = new linked hash map < > ( env 1 get tables ( ) ) ; tables put all ( env 2 get tables ( ) ) ; merged env tables = tables ; / / merge functions final map < string , function entry > functions = new hash map < > ( env 1 get functions ( ) ) ; functions put all ( env 2 get functions ( ) ) ; merged env functions = functions ; / / merge execution properties merged env execution = execution entry merge ( env 1 get execution ( ) , env 2 get execution ( ) ) ; / / merge configuration properties merged env configuration = configuration entry merge ( env 1 get configuration ( ) , env 2 get configuration ( ) ) ; / / merge deployment properties merged env deployment = deployment entry merge ( env 1 get deployment ( ) , env 2 get deployment ( ) ) ; return merged env ; }


output all files ' attributes to a file , each line of the output file contains a file name and its length

private void output files ( file out file ) throws file not found exception { system out println ( " printing to " + out file to string ( ) ) ; print stream out = new print stream ( out file ) ; root output files ( out , null ) ; out close ( ) ; }


called from arbitrary non - { @ link event executor } threads prior to scheduled task submission returns { @ code true } if the { @ link event executor } thread should be woken immediately to process the scheduled task ( if not already awake ) if { @ code false } is returned , { @ link # after scheduled task submitted ( long ) } will be called with the same value after the scheduled task is enqueued , providing another opportunity to wake the { @ link event executor } thread if required

protected boolean before scheduled task submitted ( long deadline nanos ) { return true ; }


set the timeout in milliseconds for this operation or { @ code null } if the default api timeout for the admin client should be used

public describe configs options timeout ms ( integer timeout ms ) { this timeout ms = timeout ms ; return this ; }


since checkpoint is triggered asynchronously , we need to figure out when checkpoint is really triggered note that this should be invoked before scheduler initialized

private count down latch get checkpoint triggered latch ( ) { final count down latch checkpoint triggered latch = new count down latch ( 1 ) ; final simple acking task manager gateway task manager gateway = new simple acking task manager gateway ( ) ; test execution slot allocator get logical slot builder ( ) set task manager gateway ( task manager gateway ) ; task manager gateway set checkpoint consumer ( ( execution attempt i d , job id , checkpoint id , timestamp , checkpoint options , advance to end of event time ) - > { checkpoint triggered latch count down ( ) ; } ) ; return checkpoint triggered latch ; }


sets the required configurations for performing failover

public static void set failover configurations ( mini d f s cluster cluster , configuration conf , string logical name , int ns index ) { set failover configurations ( cluster , conf , logical name , ns index , configured failover proxy provider class ) ; }


set the uri port passing { @ code - 1 } will clear the port of this builder


finds the result type of a decimal rounding operation

public static decimal type find round decimal type ( int precision , int scale , int round ) { if ( round > = scale ) { return new decimal type ( false , precision , scale ) ; } if ( round < 0 ) { return new decimal type ( false , math min ( decimal type max precision , 1 + precision - scale ) , 0 ) ; } / / 0 < = r < s / / note : rounding may increase the digits by 1 , therefore we need + 1 on precisions return new decimal type ( false , 1 + precision - scale + round , round ) ; }


returns the general purpose register mask

public int get gpr mask ( ) { return gprmask ; }


this is a hack editors should listen txn commitrollback and update their dirty flag ( active transaction makes sql editor dirty ) making each editor qm listener is too expensive

private static void update editors dirty flag ( ) { i editor reference [ ] editors = u i utils get active workbench window ( ) get active page ( ) get editor references ( ) ; for ( i editor reference ref : editors ) { final i editor part editor = ref get editor ( false ) ; if ( editor instanceof s q l editor ) { u i utils async exec ( ( ( s q l editor ) editor ) : : update dirty flag ) ; } } }


receives a object array , generates a row data based on the array

public static row data row ( object fields ) { object [ ] objects = new object [ fields length ] ; for ( int i = 0 ; i < fields length ; i + + ) { object field = fields [ i ] ; if ( field instanceof string ) { objects [ i ] = from string ( ( string ) field ) ; } else { objects [ i ] = field ; } } return generic row data of ( objects ) ; }


applies this function to the given arguments


get the { @ link i node } with the given id from the map

public i node get ( long id ) { i node inode = new i node with additional fields ( id , null , new permission status ( " " , " " , new fs permission ( ( short ) 0 ) ) , 0 , 0 ) { @ override void record modification ( int latest snapshot id ) { } @ override public void destroy and collect blocks ( reclaim context reclaim context ) { / / nothing to do } @ override public quota counts compute quota usage ( block storage policy suite bsps , byte block storage policy id , boolean use cache , int last snapshot id ) { return null ; } @ override public content summary computation context compute content summary ( int snapshot id , content summary computation context summary ) { return null ; } @ override public void clean subtree ( reclaim context reclaim context , int snapshot id , int prior snapshot id ) { } @ override public byte get storage policy i d ( ) { return hdfs constants block storage policy id unspecified ; } @ override public byte get local storage policy i d ( ) { return hdfs constants block storage policy id unspecified ; } } ; return map get ( inode ) ; }


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


compares the elements of the two given arrays

public static int compare ( int [ ] array 1 , int size 1 , int [ ] array 2 , int size 2 ) { int min size = math min ( size 1 , size 2 ) ; for ( int index = 0 ; index < min size ; index + + ) { if ( array 1 [ index ] < array 2 [ index ] ) { return - 1 ; } else if ( array 1 [ index ] > array 2 [ index ] ) { return 1 ; } } return size 1 < size 2 ? - 1 : size 1 = = size 2 ? 0 : 1 ; }


put a keyvalue pair in the j s o n object , where the value will be a j s o n object which is produced from a map

public j s o n object put ( string key , map value ) throws j s o n exception { put ( key , new j s o n object ( value ) ) ; return this ; }


verifies that the iterator points to a valid element

protected final void check in bounds ( ) { if ( current index < from index | | current index > to index ) { throw new no such element exception ( ) ; } }


file system [ create symlink , get file link status ] api call should succeed without failure

public void test symbolic link ( ) throws i o exception { path p = new path ( " / sl test " ) ; fs mkdirs ( p ) ; path f = new path ( " / sl test / file " ) ; try ( data output stream dos = fs create ( f ) ) { dos write bytes ( " write something " ) ; } path sl = new path ( " / sl test 1 / sl " ) ; fs create symlink ( f , sl , true ) ; assert equals ( fs get link target ( sl ) , f ) ; file status link status = fs get file link status ( sl ) ; assert true ( link status is symlink ( ) ) ; }


test of contains method , of class tree set

public void test contains ( ) { folded tree set < string > instance = new folded tree set < > ( ) ; string entry = " apa " ; assert equals ( false , instance contains ( entry ) ) ; instance add ( entry ) ; assert equals ( true , instance contains ( entry ) ) ; assert equals ( false , instance contains ( entry + entry ) ) ; }


this test validates that vertices with too many input streams do not have a location preference any more

public void test no locality input large all to all ( ) throws exception { final int parallelism = 100 ; final execution graph graph = create test graph ( parallelism , true ) ; / / set the location for all sources to a distinct location for ( int i = 0 ; i < parallelism ; i + + ) { execution vertex source = graph get all vertices ( ) get ( source vertex id ) get task vertices ( ) [ i ] ; task manager location location = new task manager location ( resource i d generate ( ) , inet address get loopback address ( ) , 10000 + i ) ; initialize location ( source , location ) ; } / / validate that the target vertices have no location preference for ( int i = 0 ; i < parallelism ; i + + ) { execution vertex target = graph get all vertices ( ) get ( target vertex id ) get task vertices ( ) [ i ] ; iterator < completable future < task manager location > > preference = target get preferred locations ( ) iterator ( ) ; assert false ( preference has next ( ) ) ; } }


invert a logical right shift of { @ code n } positions , that is shift left this is different from a normal shift left , in that it inserts unknowns at the right the normal left shift inserts zeros additionally , if any ones would fall off the left , the inversion is undefined

public masked long inv shift right logical ( masked long n ) throws solver exception { if ( ! n is fully defined ( ) ) { throw new unsupported operation exception ( " cannot left shift by an unknown amount " ) ; } return inv shift right logical ( n long value ( ) ) ; }


the user configures - default , which will delete all the default parameters

public void test merge values delete ( ) { list < string > merged = config utils merge values ( thread pool class , " - fixed , aaa " , as list ( " fixed " , " default limited " , " cached " ) ) ; assert equals ( as list ( " cached " , " aaa " ) , merged ) ; }


check for errors in " chronological " order ( acknowledge that loading and analysis are interleaved , but sequential on the single target scale )

public static failure detail create failure detail ( target pattern phase value loading result , @ nullable skyframe analysis result skyframe analysis result , @ nullable top level targets and configs result top level targets and configs ) { if ( loading result has error ( ) ) { return failure detail new builder ( ) set message ( " command succeeded , but there were errors parsing the target pattern " ) set target patterns ( target patterns new builder ( ) set code ( code target pattern parse failure ) ) build ( ) ; } if ( loading result has post expansion error ( ) | | ( skyframe analysis result ! = null & & skyframe analysis result has loading error ( ) ) ) { return failure detail new builder ( ) set message ( " command succeeded , but there were loading phase errors " ) set analysis ( analysis new builder ( ) set code ( analysis code generic loading phase failure ) ) build ( ) ; } if ( top level targets and configs ! = null & & top level targets and configs has error ( ) ) { return failure detail new builder ( ) set message ( " command succeeded , but top level configurations could not be created " ) set build configuration ( failure details build configuration new builder ( ) set code ( failure details build configuration code top level configuration creation failure ) ) build ( ) ; } if ( skyframe analysis result ! = null & & skyframe analysis result has analysis error ( ) ) { return failure detail new builder ( ) set message ( " command succeeded , but not all targets were analyzed " ) set analysis ( analysis new builder ( ) set code ( analysis code not all targets analyzed ) ) build ( ) ; } return null ; }


public reflect utils field ( string name , object value ) { try { field field = get field ( name ) ; field set ( object , unwrap ( value ) ) ; return this ; } catch ( exception e ) { throw new reflect exception ( e ) ; } }


public string section name str ( ) { return prefix + " debug str " ; }


perform static checking whether the given method matches if this returns { @ code false } or if the { @ link # is runtime ( ) } method returns { @ code false } , no runtime check ( i e no { @ link # matches ( java lang reflect method , class , object [ ] ) } call ) will be made

boolean matches ( method method , class < ? > target class ) ;


public collection < action > get ( int from state , assembly symbol next ) { return map get ( new table entry key ( from state , next ) ) ; }


we need to hold the returning name at this level for argument binding calculations , this method allows the after returning advice subclass to set the name

protected void set returning name no check ( string name ) { / / name could be a variable or a type if ( is variable name ( name ) ) { this returning name = name ; } else { / / assume a type try { this discovered returning type = class utils for name ( name , get aspect class loader ( ) ) ; } catch ( throwable ex ) { throw new illegal argument exception ( " returning name ' " + name + " ' is neither a valid argument name nor the fully - qualified " + " name of a java type on the classpath root cause : " + ex ) ; } } }


gets the minimum offset ( padding ) around the chart , defaults to 0 f

public float get min offset ( ) { return m min offset ; }


required if mode is ` simple ` or ` mutual ` the path to the file holding the server - side tls certificate to use < code > string server certificate = 3 ; < code >

public builder set server certificate ( java lang string value ) { if ( value = = null ) { throw new null pointer exception ( ) ; } server certificate = value ; on changed ( ) ; return this ; }


does nothing , as the threadpool is already initialized and waiting for work from the upstream factory


return the progress within the input split

public float get progress ( ) throws i o exception { if ( end = = start ) { return 0 0f ; } else { return math min ( 1 0f , ( float ) ( ( in get position ( ) - start ) / ( double ) ( end - start ) ) ) ; } }


return the sock j s frame content as a byte array

public byte [ ] get content bytes ( ) { return this content get bytes ( charset ) ; }


manipulate this response ' s cookies with the given consumer the cookies provided to the consumer are " live " , so that the consumer can be used to { @ linkplain multi value map # set ( object , object ) overwrite } existing cookies , { @ linkplain multi value map # remove ( object ) remove } cookies , or use any of the other { @ link multi value map } methods

builder < t > cookies ( consumer < multi value map < string , response cookie > > cookies consumer ) ;


returns true if this is an external symbol a symbol is considered external if it ' s binding is global and it ' s size is zero

public boolean is external ( ) { return ( is global ( ) | | is weak ( ) ) & & get value ( ) = = 0 & & get size ( ) = = 0 & & get type ( ) = = stt notype & & get section header index ( ) = = elf section header constants sht null ; }


gets the total number of shards from all indices , including replicas and closed indices

public int get total number of shards ( ) { return this total number of shards ; }


create an action to extract a file ( specified by the parameter filename ) from an aar file note that the parameter jdeps output artifact is not necessary for this action conversely , the action of checking dependencies for aar import needs this action instead therefore we add the output artifact of import deps checker to this extraction action as input therefore , the dependency checking will run each time

private static action [ ] create single file extractor actions ( rule context rule context , artifact aar , string filename , @ nullable artifact jdeps output artifact , artifact output artifact ) { spawn action builder builder = new spawn action builder ( ) use default shell environment ( ) set executable ( rule context get executable prerequisite ( aar import base rule zipper ) ) set mnemonic ( " aar file extractor " ) set progress message ( " extracting % s from % s " , filename , aar get filename ( ) ) add input ( aar ) add output ( output artifact ) add command line ( custom command line builder ( ) add exec path ( " x " , aar ) add path ( " - d " , output artifact get exec path ( ) get parent directory ( ) ) add dynamic string ( filename ) build ( ) ) ; if ( jdeps output artifact ! = null ) { builder add input ( jdeps output artifact ) ; } return builder build ( rule context ) ; }


get the cache use specified name and { @ link key generator } create cache if not existed yet

public static reference config cache get cache ( string name ) { return get cache ( name , default key generator ) ; }


return the position to which this buffer will write


retrieve the theme message for the given code note that theme messages are never html - escaped , as they typically denote theme - specific resource paths and not client - visible messages

public string get theme message ( string code , string default message ) { string msg = get theme ( ) get message source ( ) get message ( code , null , default message , get locale ( ) ) ; return ( msg ! = null ? msg : " " ) ; }


inverse of { @ link # has visible drawable ( int ) }

public component assert does not have visible drawable ( @ drawable res int drawable res ) { assert that litho view ( ) does not have visible drawable ( drawable res ) ; return this ; }


public void any type prop test ( ) { / / todo : test any type prop }


determine whether the given bean property is excluded from dependency checks this implementation excludes properties defined by cglib

public static boolean is excluded from dependency check ( property descriptor pd ) { method wm = pd get write method ( ) ; if ( wm = = null ) { return false ; } if ( ! wm get declaring class ( ) get name ( ) contains ( " $ $ " ) ) { / / not a cglib method so it ' s ok return false ; } / / it was declared by cglib , but we might still want to autowire it / / if it was actually declared by the superclass class < ? > superclass = wm get declaring class ( ) get superclass ( ) ; return ! class utils has method ( superclass , wm ) ; }


called whenever the program location changes

void program location changed ( program location loc , event trigger trigger ) ;


processing occurs by replacing $ { } placeholders in bean definitions by resolving each against this configurer ' s set of { @ link property sources } , which includes : all { @ linkplain org springframework core env configurable environment # get property sources environment property sources } , if an { @ code environment } { @ linkplain # set environment is present } { @ linkplain # merge properties merged local properties } , if { @ linkplain # set location any } { @ linkplain # set locations have } { @ linkplain # set properties been } { @ linkplain # set properties array specified } any property sources set by calling { @ link # set property sources } if { @ link # set property sources } is called , environment and local properties will be ignored this method is designed to give the user fine - grained control over property sources , and once set , the configurer makes no assumptions about adding additional sources

public void post process bean factory ( configurable listable bean factory bean factory ) throws beans exception { if ( this property sources = = null ) { this property sources = new mutable property sources ( ) ; if ( this environment ! = null ) { this property sources add last ( new property source < environment > ( environment properties property source name , this environment ) { @ override @ nullable public string get property ( string key ) { return this source get property ( key ) ; } } ) ; } try { property source < ? > local property source = new properties property source ( local properties property source name , merge properties ( ) ) ; if ( this local override ) { this property sources add first ( local property source ) ; } else { this property sources add last ( local property source ) ; } } catch ( i o exception ex ) { throw new bean initialization exception ( " could not load properties " , ex ) ; } } process properties ( bean factory , new property sources property resolver ( this property sources ) ) ; this applied property sources = this property sources ; }


this test runs all benchmarks defined in { @ link n n throughput benchmark } , with explicit local - fs option

public void test n n throughput with fs option ( ) throws exception { configuration conf = new hdfs configuration ( ) ; conf set int ( d f s config keys dfs block size key , 16 ) ; file name dir = new file ( mini d f s cluster get base directory ( ) , " name " ) ; conf set ( d f s config keys dfs namenode name dir key , name dir get absolute path ( ) ) ; d f s test util format name node ( conf ) ; n n throughput benchmark run benchmark ( conf , new string [ ] { " - fs " , " file : / / / " , " - op " , " all " } ) ; }


if { @ link # flag override caption descriptors } is set , returns a { @ link user data reader } for { @ link # closed caption formats } if unset , parses the pmt descriptor information and returns a { @ link user data reader } for the declared formats , or { @ link # closed caption formats } if the descriptor is not present

private user data reader build user data reader ( es info es info ) { return new user data reader ( get closed caption formats ( es info ) ) ; }


set view type of current { @ link render info } if it was created through { @ link view render info # create ( ) } and a custom view type was not set , or otherwise it will throw { @ link unsupported operation exception }

public void set view type ( int view type ) { throw new unsupported operation exception ( ) ; }


list the metadata for all objects that the object key has the specified prefix

private partial listing list ( string prefix , string delimiter , int max listing length , string prior last key ) throws i o exception { log debug ( " list objects prefix : [ { } ] , delimiter : [ { } ] , " + " max list length : [ { } ] , prior last key : [ { } ] " , prefix , delimiter , max listing length , prior last key ) ; if ( ! prefix starts with ( cos n file system path delimiter ) ) { prefix + = cos n file system path delimiter ; } list objects request list objects request = new list objects request ( ) ; list objects request set bucket name ( bucket name ) ; list objects request set prefix ( prefix ) ; list objects request set delimiter ( delimiter ) ; list objects request set marker ( prior last key ) ; list objects request set max keys ( max listing length ) ; object listing object listing = null ; try { object listing = ( object listing ) call c o s client with retry ( list objects request ) ; } catch ( exception e ) { string err msg = string format ( " prefix : [ % s ] , delimiter : [ % s ] , " + " max listing length : [ % d ] , prior last key : [ % s ] " + " list objects occur an exception : [ % s ] " , prefix , ( delimiter = = null ) ? " " : delimiter , max listing length , prior last key , e to string ( ) ) ; log error ( err msg ) ; handle exception ( new exception ( err msg ) , prefix ) ; } array list < file metadata > file metadata array = new array list < > ( ) ; array list < file metadata > common prefix array = new array list < > ( ) ; if ( null = = object listing ) { string err msg = string format ( " list the prefix : [ % s ] failed " + " delimiter : [ % s ] , max listing length : " + " [ % s ] , prior last key : [ % s ] " , prefix , delimiter , max listing length , prior last key ) ; handle exception ( new exception ( err msg ) , prefix ) ; } list < c o s object summary > summaries = object listing get object summaries ( ) ; for ( c o s object summary cos object summary : summaries ) { string file path = cos object summary get key ( ) ; if ( ! file path starts with ( cos n file system path delimiter ) ) { file path = cos n file system path delimiter + file path ; } if ( file path equals ( prefix ) ) { continue ; } long mtime = 0 ; if ( cos object summary get last modified ( ) ! = null ) { mtime = cos object summary get last modified ( ) get time ( ) ; } long file len = cos object summary get size ( ) ; file metadata array add ( new file metadata ( file path , file len , mtime , true ) ) ; } list < string > common prefixes = object listing get common prefixes ( ) ; for ( string common prefix : common prefixes ) { if ( ! common prefix starts with ( cos n file system path delimiter ) ) { common prefix = cos n file system path delimiter + common prefix ; } common prefix array add ( new file metadata ( common prefix , 0 , 0 , false ) ) ; } file metadata [ ] file metadata = new file metadata [ file metadata array size ( ) ] ; for ( int i = 0 ; i < file metadata array size ( ) ; + + i ) { file metadata [ i ] = file metadata array get ( i ) ; } file metadata [ ] common prefix meta data = new file metadata [ common prefix array size ( ) ] ; for ( int i = 0 ; i < common prefix array size ( ) ; + + i ) { common prefix meta data [ i ] = common prefix array get ( i ) ; } / / when truncated is false , it means that listing is finished if ( ! object listing is truncated ( ) ) { return new partial listing ( null , file metadata , common prefix meta data ) ; } else { return new partial listing ( object listing get next marker ( ) , file metadata , common prefix meta data ) ; } }


static string [ ] break into path components ( final string path ) { return path = = null ? null : path split ( path separator ) ; }


convert an { @ link optional } to a guava { @ link com google common base optional }

public static < t > com google common base optional < t > to guava optional ( final optional < t > optional ) { return com google common base optional from nullable ( optional or else ( null ) ) ; }


this verifies that aws session credentials can be picked up and returned in a dt with a session binding , this holds ; for role binding it will fail

protected abstract s 3 a token identifier verify credential propagation ( final s 3 a file system fs , final marshalled credentials session , final configuration conf ) throws exception { describe ( " verify token propagation " ) ; / / clear any credential paths to ensure they don ' t get picked up and used / / for authentication unset hadoop credential providers ( conf ) ; conf set ( delegation token credentials provider , temporary a w s credentials provider name ) ; session set secrets in configuration ( conf ) ; try ( s 3 a delegation tokens delegation tokens 2 = new s 3 a delegation tokens ( ) ) { delegation tokens 2 bind to file system ( fs get canonical uri ( ) , fs create store context ( ) , fs create delegation operations ( ) ) ; delegation tokens 2 init ( conf ) ; delegation tokens 2 start ( ) ; final token < abstract s 3 a token identifier > new d t = delegation tokens 2 get bound or new d t ( new encryption secrets ( ) , null ) ; delegation tokens 2 reset token binding to d t ( new d t ) ; final abstract s 3 a token identifier bound id = delegation tokens 2 get decoded identifier ( ) get ( ) ; log info ( " regenerated dt is { } " , new d t ) ; final marshalled credentials creds 2 = from a w s credentials ( verify session credentials ( delegation tokens 2 get credential providers ( ) get credentials ( ) ) ) ; assert equals ( " credentials " , session , creds 2 ) ; assert true ( " origin in " + bound id , bound id get origin ( ) contains ( credentials converted to delegation token ) ) ; return bound id ; } }


public static string init endpoint ( final properties properties ) { if ( properties = = null ) { return " " ; } / / whether to enable domain name resolution rules string is use endpoint rule parsing = properties get property ( property key const is use endpoint parsing rule , system get property ( system property key const is use endpoint parsing rule , string value of ( param util use endpoint parsing rule default value ) ) ) ; boolean is use endpoint parsing rule = boolean parse boolean ( is use endpoint rule parsing ) ; string endpoint url ; if ( is use endpoint parsing rule ) { / / get the set domain name information endpoint url = param util parsing endpoint rule ( properties get property ( property key const endpoint ) ) ; if ( string utils is blank ( endpoint url ) ) { return " " ; } } else { endpoint url = properties get property ( property key const endpoint ) ; } if ( string utils is blank ( endpoint url ) ) { return " " ; } string endpoint port = template utils string empty and then execute ( system getenv ( property key const system env alibaba aliware endpoint port ) , new callable < string > ( ) { @ override public string call ( ) { return properties get property ( property key const endpoint port ) ; } } ) ; endpoint port = template utils string empty and then execute ( endpoint port , new callable < string > ( ) { @ override public string call ( ) { return " 8080 " ; } } ) ; return endpoint url + " : " + endpoint port ; }


sets flags for { @ link amr extractor } instances created by the factory

public synchronized default extractors factory set amr extractor flags ( @ amr extractor flags int flags ) { this amr flags = flags ; return this ; }


option to control tagging data types and functions with their dwarf die record number

public boolean is output d i e info ( ) { return output d w a r f d i e info ; }


returns a new array containing the remaining keys

public int array to array ( ) { int array array = new int array ( true , map size ) ; while ( has next ) array add ( next ( ) ) ; return array ; }


this ensures we don ' t mistake i pv 6 localhost for a mapped i pv 4 0 0 0 1

@ test public void ipv 6 localhost ( ) { string ipv 6 = " : : 1 " ; endpoint endpoint = endpoint new builder ( ) ip ( ipv 6 ) build ( ) ; assert that ( endpoint ipv 4 ( ) ) is null ( ) ; assert that ( endpoint ipv 4 bytes ( ) ) is null ( ) ; assert that ( endpoint ipv 6 ( ) ) is equal to ( ipv 6 ) ; assert that ( endpoint ipv 6 bytes ( ) ) contains exactly ( 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 ) ; }


get a list of the current top window statistics , one top window per tracked time interval

public list < top window > get top windows ( ) { long mono time = time monotonic now ( ) ; list < top window > windows = lists new array list with capacity ( rolling window managers size ( ) ) ; for ( entry < integer , rolling window manager > entry : rolling window managers entry set ( ) ) { top window window = entry get value ( ) snapshot ( mono time ) ; windows add ( window ) ; } return windows ; }


resolve $ { } placeholders in the given text , replacing them with corresponding servlet context init parameter or system property values

public static string resolve placeholders ( string text , servlet context servlet context ) { return resolve placeholders ( text , servlet context , false ) ; }


creates an empty { @ code tree based table } that is ordered by the specified comparators

public static < r , c , v > tree based table < r , c , v > create ( comparator < ? super r > row comparator , comparator < ? super c > column comparator ) { check not null ( row comparator ) ; check not null ( column comparator ) ; return new tree based table < > ( row comparator , column comparator ) ; }


{ @ code opens index } must be a valid index into the constant pool the entry at this index must be a { @ link constant pool package info } structure representing a package opened by the current module

public int get opens index ( ) { return opens index & 0xffff ; }


returns the void property map associated with the given name

public void property map get void property map ( string property name ) { lock acquire ( ) ; try { property map pm = property map cache get ( property name ) ; if ( pm = = null | | pm instanceof void property map ) { return ( void property map ) pm ; } throw new type mismatch exception ( " property " + property name + " is not void type " ) ; } finally { lock release ( ) ; } }


adds the given constraint value to the constraints that define this { @ link platform info }

public builder add constraint ( constraint value info constraint ) { this constraints add constraints ( constraint ) ; return this ; }


returns the maximum time duration a part file can stay open before rolling

public long get rollover interval ( ) { return rollover interval ; }


notify router chain of the initial addresses from registry at the first time notify whenever addresses in registry change

public void set invokers ( list < invoker < t > > invokers ) { this invokers = ( invokers = = null ? collections empty list ( ) : invokers ) ; routers for each ( router - > router notify ( this invokers ) ) ; }


specifies the time attribute on which rows are ordered for streaming tables , reference a rowtime or proctime time attribute here to specify the time mode for batch tables , refer to a timestamp or long attribute

public over window partitioned ordered order by ( expression order by ) { return new over window partitioned ordered ( partition by , order by ) ; }


return a { @ link bind markers factory } for a { @ link connection factory }

bind markers factory get bind markers ( connection factory connection factory ) ;


creates a new trigger that fires once system time passes the end of the window

public static processing time trigger create ( ) { return new processing time trigger ( ) ; }


gets the domain files from the provider and then undoes the hijack on any that are hijacked

private void undo hijacked files ( list < domain file > domain files ) { if ( ! check repository connected ( ) ) { return ; } list < domain file > hijack list = new array list < domain file > ( ) ; for ( domain file domain file : domain files ) { if ( domain file ! = null & & domain file is hijacked ( ) ) { hijack list add ( domain file ) ; } } undo hijack ( hijack list ) ; }


default function < cas configuration properties , integer > get proxy granting ticket storage timeout ( ) { return p - > p get ticket ( ) get tgt ( ) get max time to live in seconds ( ) ; }


returns the value of the given { @ code int } as a { @ code long } , when treated as unsigned < b > java 8 users : < b > use { @ link integer # to unsigned long ( int ) } instead

public static long to long ( int value ) { return value & int mask ; }


gets the total number of open shards from all indices includes replicas , but does not include shards that are part of closed indices

public int get total open index shards ( ) { return this total open index shards ; }


execute a handshake request to the given url and handle the resulting web socket session with the given handler

mono < void > execute ( uri url , web socket handler handler ) ;


executes a bidirectional - streaming call the { @ code call } should not be already started after calling this method , { @ code call } should no longer be used if the provided { @ code response observer } is an instance of { @ link client response observer } , { @ code before start ( ) } will be called

public static < req t , resp t > stream observer < req t > async bidi streaming call ( client call < req t , resp t > call , stream observer < resp t > response observer ) { return async streaming request call ( call , response observer , true ) ; }


public void test non interrupting signal with sub process ( ) { process instance pi = runtime service start process instance by key ( " non interrupting signal with sub process " ) ; list < task > tasks = task service create task query ( ) process instance id ( pi get process instance id ( ) ) list ( ) ; assert that ( tasks ) has size ( 1 ) ; task current task = tasks get ( 0 ) ; assert that ( current task get name ( ) ) is equal to ( " approve " ) ; runtime service signal event received ( " alert " ) ; tasks = task service create task query ( ) process instance id ( pi get process instance id ( ) ) list ( ) ; assert that ( tasks ) has size ( 2 ) ; for ( task task : tasks ) { assert that ( task get name ( ) ) is in ( " approve " , " review " ) ; } task service complete ( task service create task query ( ) task name ( " approve " ) single result ( ) get id ( ) ) ; tasks = task service create task query ( ) process instance id ( pi get process instance id ( ) ) list ( ) ; assert that ( tasks ) has size ( 1 ) ; current task = tasks get ( 0 ) ; assert that ( current task get name ( ) ) is equal to ( " review " ) ; task service complete ( task service create task query ( ) task name ( " review " ) single result ( ) get id ( ) ) ; tasks = task service create task query ( ) process instance id ( pi get process instance id ( ) ) list ( ) ; assert that ( tasks ) has size ( 1 ) ; }


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

public double population variance ( ) { check state ( count > 0 ) ; if ( is na n ( sum of squares of deltas ) ) { return na n ; } if ( count = = 1 ) { return 0 0 ; } return ensure non negative ( sum of squares of deltas ) / count ( ) ; }


returns a new empty dict with the specified mutability

public static < k , v > dict < k , v > of ( @ nullable mutability mu ) { return new dict < > ( mu ) ; }


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


tests that a one - byte file is displayed correctly

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


handle deserialization of the ' null ' value

public shape get null value ( deserialization context ctxt ) throws json mapping exception { throw new json mapping exception ( ctxt get parser ( ) , " shape cannot be null " ) ; }


query tag configuration information based on data id and group

config info 4 tag find config info 4 tag ( final string data id , final string group , final string tenant , final string tag ) ;


public okhttp 3 call build call ( final api callback callback ) throws api exception { return test group parameters call ( required string group , required boolean group , required int 6 4 group , string group , boolean group , int 6 4 group , callback ) ; }


reads bytes at the address of < code > buf < code > into < code > buffer < code > up to the length of < code > buffer < code >

protected static int read bytes ( mem buffer buf , byte [ ] buffer ) throws memory access exception { return buf get bytes ( buffer , 0 ) ; }


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

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


this implementation creates a smart mime message , holding the specified default encoding and default file type map this special defaults - carrying message will be autodetected by { @ link mime message helper } , which will use the carried encoding and file type map unless explicitly overridden

public mime message create mime message ( ) { return new smart mime message ( get session ( ) , get default encoding ( ) , get default file type map ( ) ) ; }


get the docking window manager instance which corresponds to the specified window

private static docking window manager get instance for window ( window win ) { if ( win = = null ) { return null ; } iterator < docking window manager > iter = instances iterator ( ) ; while ( iter has next ( ) ) { docking window manager win mgr = iter next ( ) ; if ( win mgr root get frame ( ) = = win ) { return win mgr ; } list < detached window node > detached windows = win mgr root get detached windows ( ) ; list < detached window node > safe access copy = new linked list < > ( detached windows ) ; iterator < detached window node > window iterator = safe access copy iterator ( ) ; while ( window iterator has next ( ) ) { detached window node dw = window iterator next ( ) ; if ( dw get window ( ) = = win ) { return win mgr ; } } } return null ; }


when next frame throws i o exception , the transport should be aborted

public void next frame throw io exception ( ) throws exception { init transport ( ) ; mock stream listener listener 1 = new mock stream listener ( ) ; mock stream listener listener 2 = new mock stream listener ( ) ; ok http client stream stream 1 = client transport new stream ( method , new metadata ( ) , call options default ) ; stream 1 start ( listener 1 ) ; stream 1 request ( 1 ) ; ok http client stream stream 2 = client transport new stream ( method , new metadata ( ) , call options default ) ; stream 2 start ( listener 2 ) ; stream 2 request ( 1 ) ; assert equals ( 2 , active stream count ( ) ) ; assert contain stream ( 3 ) ; assert contain stream ( 5 ) ; frame reader throw io exception for next frame ( ) ; listener 1 wait until stream closed ( ) ; listener 2 wait until stream closed ( ) ; assert equals ( 0 , active stream count ( ) ) ; assert equals ( status internal get code ( ) , listener 1 status get code ( ) ) ; assert equals ( network issue message , listener 1 status get cause ( ) get message ( ) ) ; assert equals ( status internal get code ( ) , listener 2 status get code ( ) ) ; assert equals ( network issue message , listener 2 status get cause ( ) get message ( ) ) ; verify ( transport listener , timeout ( time out ms ) ) transport shutdown ( is a ( status class ) ) ; verify ( transport listener , timeout ( time out ms ) ) transport terminated ( ) ; shutdown and verify ( ) ; }


iterates over all units in a circle around this position

public static void nearby ( team team , float x , float y , float radius , cons < unit > cons ) { nearby ( team , x - radius , y - radius , radius * 2f , radius * 2f , unit - > { if ( unit within ( x , y , radius ) ) { cons get ( unit ) ; } } ) ; }


test of get r m principal ( configuration ) method , of class yarn client utils when ha is enabled

public void test get r m principal h a string ( ) throws i o exception { configuration conf = new configuration ( ) ; conf set ( yarn configuration rm address + " rm 0 " , " myhost " ) ; conf set boolean ( yarn configuration rm ha enabled , true ) ; conf set ( yarn configuration rm ha ids , " rm 0 " ) ; string result = yarn client utils get rm principal ( " test / host @ realm " , conf ) ; assert equals ( " the hostname translation did not produce the expected " + " results : " + result , " test / myhost @ realm " , result ) ; try { result = yarn client utils get rm principal ( null , conf ) ; fail ( " the hostname translation succeeded even though the rm principal " + " was null : " + result ) ; } catch ( illegal argument exception ex ) { / / expected } conf = new configuration ( ) ; conf set ( yarn configuration rm address + " rm 0 " , " myhost " ) ; conf set boolean ( yarn configuration rm ha enabled , true ) ; try { yarn client utils get rm principal ( " test / host @ realm " , conf ) ; fail ( " the hostname translation succeeded even though no rm ids were set " ) ; } catch ( i o exception ex ) { / / expected } conf = new configuration ( ) ; conf set ( yarn configuration rm address + " rm 0 " , " myhost " ) ; conf set boolean ( yarn configuration rm ha enabled , true ) ; conf set ( yarn configuration rm ha id , " rm 0 " ) ; result = yarn client utils get rm principal ( " test / host @ realm " , conf ) ; assert equals ( " the hostname translation did not produce the expected " + " results : " + result , " test / myhost @ realm " , result ) ; result = yarn client utils get rm principal ( " test / yourhost @ realm " , conf ) ; assert equals ( " the hostname translation did not produce the expected " + " results : " + result , " test / yourhost @ realm " , result ) ; }


generates all test cases appropriate for the given method

private static void add tests ( test suite suite , method method ) { if ( is guarded ( method ) ) { for ( boolean fair 1 : new boolean [ ] { true , false } ) { for ( boolean fair 2 : new boolean [ ] { true , false } ) { suite add test ( generate guard with wrong monitor test case ( method , fair 1 , fair 2 ) ) ; } } } if ( is any enter ( method ) ) { add tests ( suite , method , scenario satisfied and unoccupied before entering , timeouts to use any , outcome success ) ; add tests ( suite , method , scenario unsatisfied and unoccupied before entering , timeouts to use finite , is guarded ( method ) ? ( is boolean ( method ) ? outcome failure : outcome hang ) : outcome success ) ; add tests ( suite , method , scenario unsatisfied and unoccupied before entering , timeouts to use infinite , is guarded ( method ) ? ( is try enter ( method ) | | is enter if ( method ) ? outcome failure : outcome hang ) : outcome success ) ; add tests ( suite , method , scenario satisfied and occupied before entering , timeouts to use finite , is boolean ( method ) ? outcome failure : outcome hang ) ; add tests ( suite , method , scenario satisfied and occupied before entering , timeouts to use infinite , is guarded ( method ) ? outcome hang : ( is try enter ( method ) ? outcome failure : outcome hang ) ) ; add tests ( suite , method , scenario satisfied unoccupied and interrupted before entering , timeouts to use any , is interruptible ( method ) ? outcome interrupt : outcome success ) ; } else { / / any wait for xxx method suite add test ( generate wait for when not occupying test case ( method , true ) ) ; suite add test ( generate wait for when not occupying test case ( method , false ) ) ; add tests ( suite , method , scenario satisfied before waiting , timeouts to use any , outcome success ) ; add tests ( suite , method , scenario satisfied while waiting , timeouts to use infinite , outcome success ) ; add tests ( suite , method , scenario satisfied while waiting , timeouts to use past , outcome failure ) ; add tests ( suite , method , scenario satisfied and interrupted before waiting , timeouts to use any , outcome success ) ; add tests ( suite , method , scenario unsatisfied before and while waiting , timeouts to use finite , outcome failure ) ; add tests ( suite , method , scenario unsatisfied before and while waiting , timeouts to use infinite , outcome hang ) ; add tests ( suite , method , scenario unsatisfied and interrupted before waiting , timeouts to use past , / / prefer responding to interrupt over timing out is interruptible ( method ) ? outcome interrupt : outcome failure ) ; add tests ( suite , method , scenario unsatisfied and interrupted before waiting , timeouts to use small , is interruptible ( method ) ? outcome interrupt : outcome failure ) ; add tests ( suite , method , scenario unsatisfied and interrupted before waiting , timeouts to use infinite , is interruptible ( method ) ? outcome interrupt : outcome hang ) ; } }


this tests whether timestamps are properly extracted in the timestamp extractor and whether watermarks are also correctly forwarded from this with the auto watermark interval

public void test timestamp extractor with auto interval ( ) throws exception { final int num elements = 10 ; stream execution environment env = stream execution environment get execution environment ( ) ; env get config ( ) set auto watermark interval ( 10 ) ; env set parallelism ( 1 ) ; data stream < integer > source 1 = env add source ( new source function < integer > ( ) { @ override public void run ( source context < integer > ctx ) throws exception { int index = 1 ; while ( index < = num elements ) { ctx collect ( index ) ; latch await ( ) ; index + + ; } } @ override public void cancel ( ) { } } ) ; data stream < integer > extract op = source 1 assign timestamps and watermarks ( new ascending timestamp extractor < integer > ( ) { @ override public long extract ascending timestamp ( integer element ) { return element ; } } ) ; extract op transform ( " watermark check " , basic type info int type info , new custom operator ( true ) ) transform ( " timestamp check " , basic type info int type info , new timestamp checking operator ( ) ) ; / / verify that extractor picks up source parallelism assert assert equals ( extract op get transformation ( ) get parallelism ( ) , source 1 get transformation ( ) get parallelism ( ) ) ; env execute ( ) ; / / verify that we get num elements watermarks for ( int j = 0 ; j < num elements ; j + + ) { if ( ! custom operator final watermarks [ 0 ] get ( j ) equals ( new watermark ( j ) ) ) { long wm = custom operator final watermarks [ 0 ] get ( j ) get timestamp ( ) ; assert fail ( " wrong watermark expected : " + j + " found : " + wm + " all : " + custom operator final watermarks [ 0 ] ) ; } } / / the input is finite , so it should have a max watermark assert equals ( watermark max watermark , custom operator final watermarks [ 0 ] get ( custom operator final watermarks [ 0 ] size ( ) - 1 ) ) ; }


replace the indicated component with a new component containing the specified data type

private data type component replace ( data type component orig dtc , data type data type , int length , string new name , string comment ) { int ordinal = orig dtc get ordinal ( ) ; int new offset = orig dtc get offset ( ) ; int dtc length = orig dtc get length ( ) ; int bytes needed = length - dtc length ; int delta ordinal = - bytes needed ; if ( bytes needed > 0 ) { int bytes available = get num undefined bytes ( ordinal + 1 ) ; if ( bytes available < bytes needed ) { / / throw new illegal argument exception ( " not enough undefined bytes " ) ; delta ordinal = - bytes available ; length - = ( bytes needed - bytes available ) ; } } orig dtc get data type ( ) remove parent ( this ) ; data type component impl new dtc = new data type component impl ( data type , this , length , ordinal , new offset , new name , comment ) ; data type add parent ( this ) ; int index = collections binary search ( components , new integer ( ordinal ) , ordinal comparator ) ; if ( index < 0 ) { index = - index - 1 ; } else { components remove ( index ) ; } if ( delta ordinal ! = 0 ) { adjust offsets ( index , new offset , delta ordinal , 0 ) ; } components add ( index , new dtc ) ; if ( delta ordinal ! = 0 ) { num components + = delta ordinal ; } return new dtc ; }


renames existing columns similar to a field alias statement the field expressions should be alias expressions , and only the existing fields can be renamed example : { @ code tab rename columns ( $ ( " a " ) as ( " a 1 " ) , $ ( " b " ) as ( " b 1 " ) ) ; } scala example : { @ code tab rename columns ( $ " a " as " a 1 " , $ " b " as " b 1 " ) }

table rename columns ( expression fields ) ;


send the information of a domain to the timeline server it is a blocking api the method will not return until it gets the response from the timeline server this api is only for timeline service v 1 5

public abstract void put domain ( application attempt id app attempt id , timeline domain domain ) throws i o exception , yarn exception ;


public lottery numbers get numbers ( ) { return lottery numbers ; }


apply order by to current context and return the updated context throws error for invalid operations

public pinot query generator context with top n ( linked hash map < variable reference expression , sort order > order by column ordering map , long limit ) { check supported ( ! has limit ( ) , " limit already exists pinot doesn ' t support order by limit on top of another limit " ) ; if ( ! use sql syntax ) { check supported ( ! has aggregation ( ) , " pinot doesn ' t support ordering on top of the aggregated data " ) ; } int int limit = check for valid limit ( limit ) ; linked hash map < variable reference expression , ordering column information > order by column information = new linked hash map < > ( ) ; order by column ordering map entry set ( ) stream ( ) for each ( entry - > order by column information put ( entry get key ( ) , new ordering column information ( entry get value ( ) , selections get ( entry get key ( ) ) ) ) ) ; return new pinot query generator context ( selections , outputs , from , filter , aggregations , group by columns , order by column information , optional int of ( int limit ) , variables in aggregation , hidden column set , use sql syntax ) ; }


return maximum number of entries in one multi - object delete call

int get max entries to delete ( ) { return max entries to delete ; }


parses the given pattern , and throws an exception if the pattern is invalid

public target pattern parse ( string pattern ) throws target parsing exception { / / the structure of this method is by cases , according to the usage string / / constant ( see lib / blaze / commands / target - syntax txt ) string original pattern = pattern ; final boolean includes repo = pattern starts with ( " @ " ) ; repository name repository = null ; if ( includes repo ) { int pkg start = pattern index of ( " / / " ) ; if ( pkg start < 0 ) { throw new target parsing exception ( " couldn ' t find package in target " + pattern , target patterns code package not found ) ; } try { repository = repository name create ( pattern substring ( 0 , pkg start ) ) ; } catch ( label syntax exception e ) { throw new target parsing exception ( e get message ( ) , target patterns code label syntax error ) ; } pattern = pattern substring ( pkg start ) ; } if ( ! valid slash prefix matcher ( pattern ) looking at ( ) ) { throw new target parsing exception ( " not a valid absolute pattern ( absolute target patterns " + " must start with exactly two slashes ) : ' " + pattern + " ' " , target patterns code absolute target pattern invalid ) ; } final boolean was originally absolute = pattern starts with ( " / / " ) ; / / we now ensure the relative directory is applied to relative patterns pattern = absolutize ( pattern ) substring ( 2 ) ; if ( pattern is empty ( ) ) { throw new target parsing exception ( " the empty string is not a valid target " , target patterns code target cannot be empty string ) ; } int colon index = pattern last index of ( ' : ' ) ; string package part = colon index < 0 ? pattern : pattern substring ( 0 , colon index ) ; string target part = colon index < 0 ? " " : pattern substring ( colon index + 1 ) ; if ( package part equals ( " " ) ) { package part = " / " ; / / special case this for easier parsing } if ( package part ends with ( " / " ) ) { throw new target parsing exception ( " the package part of ' " + original pattern + " ' should not end in a slash " , target patterns code package part cannot end in slash ) ; } if ( repository = = null ) { repository = repository name main ; } if ( package part ends with ( " / " ) ) { string real package part = remove suffix ( package part , " / " ) ; package identifier package identifier ; try { package identifier = package identifier parse ( repository get name ( ) + " / / " + real package part ) ; } catch ( label syntax exception e ) { throw new target parsing exception ( " invalid package name ' " + real package part + " ' : " + e get message ( ) , target patterns code label syntax error ) ; } if ( target part is empty ( ) | | all rules in suffixes contains ( target part ) ) { return new targets below directory ( original pattern , relative directory , package identifier , true ) ; } else if ( all targets in suffixes contains ( target part ) ) { return new targets below directory ( original pattern , relative directory , package identifier , false ) ; } } if ( all rules in suffixes contains ( target part ) ) { package identifier package identifier ; try { package identifier = package identifier parse ( repository get name ( ) + " / / " + package part ) ; } catch ( label syntax exception e ) { throw new target parsing exception ( " invalid package name ' " + package part + " ' : " + e get message ( ) , target patterns code label syntax error ) ; } return new targets in package ( original pattern , relative directory , package identifier , target part , was originally absolute , true , true ) ; } if ( all targets in suffixes contains ( target part ) ) { package identifier package identifier ; try { package identifier = package identifier parse ( repository get name ( ) + " / / " + package part ) ; } catch ( label syntax exception e ) { throw new target parsing exception ( " invalid package name ' " + package part + " ' : " + e get message ( ) , target patterns code label syntax error ) ; } return new targets in package ( original pattern , relative directory , package identifier , target part , was originally absolute , false , true ) ; } if ( includes repo | | was originally absolute | | pattern contains ( " : " ) ) { package identifier package identifier ; string full label = repository get name ( ) + " / / " + pattern ; try { package and target package and target = label validator validate absolute label ( full label ) ; package identifier = package identifier create ( repository , path fragment create ( package and target get package name ( ) ) ) ; } catch ( bad label exception e ) { string error = " invalid target format ' " + original pattern + " ' : " + e get message ( ) ; throw new target parsing exception ( error , target patterns code target format invalid ) ; } return new single target ( full label , package identifier , original pattern , relative directory ) ; } / / this is a stripped - down version of interpret path as target that does no i / o we have a basic / / relative path e g " foo / bar / wiz java " the strictest correct check we can do here ( without / / i / o ) is just to ensure that there is * some * prefix that is a valid package - name it ' s / / sufficient to test the first segment this is really a rather weak check ; perhaps we should / / just eliminate it int slash index = pattern index of ( ' / ' ) ; string package name = pattern ; if ( slash index > 0 ) { package name = pattern substring ( 0 , slash index ) ; } try { package identifier parse ( " / / " + package name ) ; } catch ( label syntax exception e ) { throw new target parsing exception ( " bad target pattern ' " + original pattern + " ' : " + e get message ( ) , target patterns code label syntax error ) ; } return new interpret path as target ( pattern , original pattern , relative directory ) ; }


returns a new { @ link s web hdfs file system } , with the given configuration

private static s web hdfs file system create s web hdfs file system ( configuration conf ) { s web hdfs file system fs = new s web hdfs file system ( ) ; fs set conf ( conf ) ; return fs ; }


public static void main ( string [ ] args ) { / / db seeding logger info ( " db seeding : " + " 1 user : { \ " ignite 1 7 7 1 \ " , amount = 1000 0 } , " + " 2 products : { \ " computer \ " : price = 800 0 , \ " car \ " : price = 20000 0 } " ) ; db get instance ( ) seed user ( " ignite 1 7 7 1 " , 1000 0 ) ; db get instance ( ) seed item ( " computer " , 800 0 ) ; db get instance ( ) seed item ( " car " , 20000 0 ) ; final var application services = new application services impl ( ) ; receipt view model receipt ; logger info ( " [ request ] user : " + " abc 1 2 3 " + " buy product : " + " tv " ) ; receipt = application services logged in user purchase ( " abc 1 2 3 " , " tv " ) ; receipt show ( ) ; maintenance lock get instance ( ) set lock ( false ) ; logger info ( " [ request ] user : " + " abc 1 2 3 " + " buy product : " + " tv " ) ; receipt = application services logged in user purchase ( " abc 1 2 3 " , " tv " ) ; receipt show ( ) ; logger info ( " [ request ] user : " + " ignite 1 7 7 1 " + " buy product : " + " tv " ) ; receipt = application services logged in user purchase ( " ignite 1 7 7 1 " , " tv " ) ; receipt show ( ) ; logger info ( " [ request ] user : " + " ignite 1 7 7 1 " + " buy product : " + " car " ) ; receipt = application services logged in user purchase ( " ignite 1 7 7 1 " , " car " ) ; receipt show ( ) ; logger info ( " [ request ] user : " + " ignite 1 7 7 1 " + " buy product : " + " computer " ) ; receipt = application services logged in user purchase ( " ignite 1 7 7 1 " , " computer " ) ; receipt show ( ) ; }


sets the item at the given index < b > note : < b > at least one of { @ code descriptor } or { @ code signature } must be passed as non - null

public void set ( int n , int start pc , int length , cst string name , cst string descriptor , cst string signature , int index ) { set 0 ( n , new item ( start pc , length , name , descriptor , signature , index ) ) ; }


get the configuration for a connector the configuration will have been transformed by { @ link org apache kafka common config config transformer } by having all variable references replaced with the current values from external instances of { @ link config provider } , and may include secrets

public map < string , string > connector config ( string connector ) { map < string , string > configs = connector configs get ( connector ) ; if ( config transformer ! = null ) { configs = config transformer transform ( connector , configs ) ; } return configs ; }


adds all dex archives from the given providers , which is useful to aggregate providers from dependencies

public builder add transitive providers ( iterable < dex archive provider > providers ) { for ( dex archive provider provider : providers ) { transitive dex archives add transitive ( provider dex archives ) ; } return this ; }


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


runs the command line interface given some arguments

public optional < throwable > run ( string arguments ) { try { if ( is flag ( help , arguments ) ) { parser print help ( std out ) ; } else if ( is flag ( version , arguments ) ) { parser print version ( std out ) ; } else { final namespace namespace = parser parse args ( arguments ) ; final command command = require non null ( commands get ( namespace get string ( command name attr ) ) , " command is not found " ) ; try { command run ( bootstrap , namespace ) ; } catch ( throwable e ) { / / the command failed to run , and the command knows / / best how to cleanup / debug exception command on error ( this , namespace , e ) ; return optional of ( e ) ; } } return optional empty ( ) ; } catch ( help screen exception ignored ) { / / this exception is triggered when the user passes in a help flag / / return true to signal that the process executed normally return optional empty ( ) ; } catch ( argument parser exception e ) { std err println ( e get message ( ) ) ; e get parser ( ) print help ( std err ) ; return optional of ( e ) ; } }


{ @ inherit doc } since { @ link submitter user resolver } returns the user name who is running gridmix , it doesn ' t need a target list of users

public boolean needs target users list ( ) { return false ; }


insert an entity into the table associated with a concrete dao < b > without < b > setting key property warning : this may be faster , but the entity should not be used anymore the entity also won ' t be attached to identity scope

public long insert without setting pk ( t entity ) { return execute insert ( entity , statements get insert or replace statement ( ) , false ) ; }


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


attempts to get the text value for the cell so that the data will match what the user sees

private static string get table cell value ( j table table , table model model , int row , int column ) { table cell renderer renderer = table get cell renderer ( row , column ) ; table column model column model = table get column model ( ) ; table column table column = column model get column ( column ) ; int model index = table column get model index ( ) ; object value = model get value at ( row , model index ) ; component component = renderer get table cell renderer component ( table , value , false , false , row , column ) ; if ( component instanceof j label ) { j label label = ( j label ) component ; return get text for label ( label ) ; } string text = look for text inside of component ( component ) ; if ( text ! = null ) { return text ; } return value = = null ? " " : value to string ( ) ; }


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

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


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


ensure that only the specified names are registered note that these are components of the name , and in particular order matters - you want the more specific name ( leafs ) specified before their parent ( s ) ( since names are hierarchical )

public static set < object name > ensure only ( string expected names ) throws i o exception , interrupted exception { log info ( " ensure only : { } " , arrays to string ( expected names ) ) ; set < object name > beans = ensure all ( expected names ) ; for ( object name bean : beans ) { log info ( " unexpected : { } " , bean to string ( ) ) ; } assert equals ( 0 , beans size ( ) ) ; return beans ; }


public static mapping rule result create reject result ( ) { return result reject ; }


connects to the upstream { @ code connectable flowable } if the number of subscribed subscriber reaches the specified count and disconnect after the specified timeout if all subscribers have unsubscribed < dl > < dt > < b > backpressure : < b > < dt > < dd > the operator itself doesn ' t interfere with backpressure which is determined by the upstream { @ code connectable flowable } ' s backpressure behavior < dd > < dt > < b > scheduler : < b > < dt > < dd > this { @ code ref count } overload operates on the specified { @ link scheduler } < dd > < dl > history : 2 1 14 - experimental

public final flowable < t > ref count ( int subscriber count , long timeout , @ non null time unit unit , @ non null scheduler scheduler ) { object helper verify positive ( subscriber count , " subscriber count " ) ; objects require non null ( unit , " unit is null " ) ; objects require non null ( scheduler , " scheduler is null " ) ; return rx java plugins on assembly ( new flowable ref count < > ( this , subscriber count , timeout , unit , scheduler ) ) ; }


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


remove a block from the low redundancy queues the pri level parameter is a hint of which queue to query first : if negative or & gt ; = { @ link # level } this shortcutting is not attmpted if the block is not found in the nominated queue , an attempt is made to remove it from all queues warning : this is not a synchronized method

boolean remove ( block info block , int pri level ) { return remove ( block , pri level , block get replication ( ) ) ; }


attempt to complete validation with the end offset returned from the offset for leader epoch request

public synchronized optional < log truncation > maybe complete validation ( topic partition tp , fetch position request position , epoch end offset epoch end offset ) { topic partition state state = assigned state or null ( tp ) ; if ( state = = null ) { log debug ( " skipping completed validation for partition { } which is not currently assigned " , tp ) ; } else if ( ! state awaiting validation ( ) ) { log debug ( " skipping completed validation for partition { } which is no longer expecting validation " , tp ) ; } else { subscription state fetch position current position = state position ; if ( ! current position equals ( request position ) ) { log debug ( " skipping completed validation for partition { } since the current position { } " + " no longer matches the position { } when the request was sent " , tp , current position , request position ) ; } else if ( epoch end offset end offset ( ) = = undefined epoch offset | | epoch end offset leader epoch ( ) = = undefined epoch ) { if ( has default offset reset policy ( ) ) { log info ( " truncation detected for partition { } at offset { } , resetting offset " , tp , current position ) ; request offset reset ( tp ) ; } else { log warn ( " truncation detected for partition { } at offset { } , but no reset policy is set " , tp , current position ) ; return optional of ( new log truncation ( tp , request position , optional empty ( ) ) ) ; } } else if ( epoch end offset end offset ( ) < current position offset ) { if ( has default offset reset policy ( ) ) { subscription state fetch position new position = new subscription state fetch position ( epoch end offset end offset ( ) , optional of ( epoch end offset leader epoch ( ) ) , current position current leader ) ; log info ( " truncation detected for partition { } at offset { } , resetting offset to " + " the first offset known to diverge { } " , tp , current position , new position ) ; state seek validated ( new position ) ; } else { offset and metadata divergent offset = new offset and metadata ( epoch end offset end offset ( ) , optional of ( epoch end offset leader epoch ( ) ) , null ) ; log warn ( " truncation detected for partition { } at offset { } ( the end offset from the " + " broker is { } ) , but no reset policy is set " , tp , current position , divergent offset ) ; return optional of ( new log truncation ( tp , request position , optional of ( divergent offset ) ) ) ; } } else { state complete validation ( ) ; } } return optional empty ( ) ; }


protected void reset sample ( double hit rate ) { previous hit rate = hit rate ; misses in sample = 0 ; hits in sample = 0 ; hits in window = 0 ; hits in main = 0 ; }


public static intent get share text intent ( final string content ) { intent intent = new intent ( intent action send ) ; intent set type ( " text / plain " ) ; intent put extra ( intent extra text , content ) ; intent = intent create chooser ( intent , " " ) ; return get intent ( intent , true ) ; }


if { @ code after returning } advice binds the return value , the returning variable name must be specified

public void set returning name ( @ nullable string returning name ) { this returning name = returning name ; }


set the instance that matches the one of child schema , check the instance parameter is valid against the one of child schemas : quadrilateral , triangle it could be an instance of the ' one of ' schemas the one of child schemas may themselves be a composed schema ( all of , any of , one of )

public void set actual instance ( object instance ) { if ( json is instance of ( quadrilateral class , instance , new hash set < class < ? > > ( ) ) ) { super set actual instance ( instance ) ; return ; } if ( json is instance of ( triangle class , instance , new hash set < class < ? > > ( ) ) ) { super set actual instance ( instance ) ; return ; } throw new runtime exception ( " invalid instance type must be quadrilateral , triangle " ) ; }


return the parameter headroom alpha , used by policies that balance weight - based and load - based considerations in their decisions for policies that use this parameter , values close to 1 indicate that most of the decision should be based on currently observed headroom from various sub - clusters , values close to zero , indicate that the decision should be mostly based on weights and practically ignore current load

public float get headroom alpha ( ) { return headroom alpha ; }


assert that a long counter metric is greater than a value

public static void assert counter gt ( string name , long greater , metrics record builder rb ) { assert assert true ( " bad value for metric " + name , get long counter ( name , rb ) > greater ) ; }


public string get inline string ( ) { return cst to human ( ) ; }


decrypt a received { @ link signal service envelope }

public signal service content decrypt ( signal service envelope envelope ) throws invalid metadata message exception , invalid metadata version exception , protocol invalid key id exception , protocol legacy message exception , protocol untrusted identity exception , protocol no session exception , protocol invalid version exception , protocol invalid message exception , protocol invalid key exception , protocol duplicate message exception , self send exception , unsupported data message exception { try { if ( envelope has legacy message ( ) ) { plaintext plaintext = decrypt ( envelope , envelope get legacy message ( ) ) ; signal service protos data message data message = signal service protos data message parse from ( plaintext get data ( ) ) ; signal service content proto content proto = signal service content proto new builder ( ) set local address ( signal service address protobuf serializer to protobuf ( local address ) ) set metadata ( signal service metadata protobuf serializer to protobuf ( plaintext metadata ) ) set legacy data message ( data message ) build ( ) ; return signal service content create from proto ( content proto ) ; } else if ( envelope has content ( ) ) { plaintext plaintext = decrypt ( envelope , envelope get content ( ) ) ; signal service protos content content = signal service protos content parse from ( plaintext get data ( ) ) ; signal service content proto content proto = signal service content proto new builder ( ) set local address ( signal service address protobuf serializer to protobuf ( local address ) ) set metadata ( signal service metadata protobuf serializer to protobuf ( plaintext metadata ) ) set content ( content ) build ( ) ; return signal service content create from proto ( content proto ) ; } return null ; } catch ( invalid protocol buffer exception e ) { throw new invalid metadata message exception ( e ) ; } }


public void test non interrupting signal ( ) { process instance pi = runtime service start process instance by key ( " non interrupting signal event " ) ; list < task > tasks = task service create task query ( ) process instance id ( pi get process instance id ( ) ) list ( ) ; assert that ( tasks ) has size ( 1 ) ; task current task = tasks get ( 0 ) ; assert that ( current task get name ( ) ) is equal to ( " my user task " ) ; runtime service signal event received ( " alert " ) ; tasks = task service create task query ( ) process instance id ( pi get process instance id ( ) ) list ( ) ; assert that ( tasks ) has size ( 2 ) ; for ( task task : tasks ) { assert that ( task get name ( ) ) is in ( " my user task " , " my second user task " ) ; } task service complete ( task service create task query ( ) task name ( " my user task " ) single result ( ) get id ( ) ) ; tasks = task service create task query ( ) process instance id ( pi get process instance id ( ) ) list ( ) ; assert that ( tasks ) has size ( 1 ) ; current task = tasks get ( 0 ) ; assert that ( current task get name ( ) ) is equal to ( " my second user task " ) ; }


implementations must implement this cleanup method


surrounds the specified text with the html begin and end tags for underlined text

public static string underline ( string text ) { return " < u > " + text + " < / u > " ; }


update the context path , servlet path , and path info of the request

private void update path request properties ( mock http servlet request request , string request uri ) { if ( ! request uri starts with ( this context path ) ) { throw new illegal argument exception ( " request uri [ " + request uri + " ] does not start with context path [ " + this context path + " ] " ) ; } request set context path ( this context path ) ; request set servlet path ( this servlet path ) ; if ( " " equals ( this path info ) ) { if ( ! request uri starts with ( this context path + this servlet path ) ) { throw new illegal argument exception ( " invalid servlet path [ " + this servlet path + " ] for request uri [ " + request uri + " ] " ) ; } string extra path = request uri substring ( this context path length ( ) + this servlet path length ( ) ) ; this path info = ( string utils has text ( extra path ) ? url path helper default instance decode request string ( request , extra path ) : null ) ; } request set path info ( this path info ) ; }


the implicit output function that generates files based on a set of template substitutions using rule attribute values this is not , actually , safe , and any use of configurable attributes will cause a hard failure

public static safe implicit outputs function from templates ( final iterable < string > templates ) { return new template implicit outputs function ( templates ) ; }


called when the player starts or stops loading the source

default void on is loading changed ( boolean is loading ) { on loading changed ( is loading ) ; }


return the maximum number of messages to process in one task

public final int get max messages per task ( ) { synchronized ( this lifecycle monitor ) { return this max messages per task ; } }


removes the record with the given function and tag i ds there should be at most one of these

abstract boolean remove function tag record ( long function i d , long tag i d ) throws i o exception ;


creates a { @ link field initializers } copying the contents from a { @ link map }

public static field initializers copy of ( map < resource type , collection < field initializer > > initializers ) { map < resource type , collection < field initializer > > deeply immutable initializers = initializers entry set ( ) stream ( ) collect ( immutable list multimap flattening to immutable list multimap ( map entry : : get key , entry - > entry get value ( ) stream ( ) ) ) as map ( ) ; return new field initializers ( deeply immutable initializers ) ; }


{ @ inherit doc } because a { @ code set multimap } has unique values for a given key , this method returns a { @ link set } , instead of the { @ link collection } specified in the { @ link multimap } interface any duplicates in { @ code values } will be stored in the multimap once

public set < v > replace values ( @ nullable k key , iterable < ? extends v > values ) { return ( set < v > ) super replace values ( key , values ) ; }


private string decode string ( string text ) { if ( text = = null ) { return " " ; } string buffer buf = new string buffer ( ) ; boolean control char = false ; for ( int i = 0 ; i < text length ( ) ; i + + ) { char next = text char at ( i ) ; if ( next = = ' \ \ ' ) { control char = true ; } else if ( control char ) { switch ( next ) { case ' n ' : buf append ( ' \ n ' ) ; break ; case ' r ' : buf append ( ' \ r ' ) ; break ; case ' s ' : buf append ( ' ; ' ) ; break ; default : buf append ( next ) ; } control char = false ; } else { buf append ( next ) ; } } return buf to string ( ) ; }


get the current record leaf if the current record can not be found , attempt to recover the record position

private long key record node get record leaf ( boolean recover prev ) throws i o exception { if ( root buffer id < 0 | | record = = null ) { return null ; } long key record node leaf = null ; is next = false ; is prev = false ; if ( expected mod count = = mod count ) { leaf = ( long key record node ) node mgr get long key node ( buffer id ) ; if ( record index > = leaf key count | | leaf get key ( record index ) ! = cur key ) { leaf = null ; / / something changed - key search required } } if ( leaf = = null ) { / / something changed - try to relocate record using key long key node root node = node mgr get long key node ( root buffer id ) ; leaf = root node get leaf node ( cur key ) ; int index = leaf get key index ( cur key ) ; if ( index < 0 ) { / / record was deleted - position on next key index = - index - 1 ; if ( recover prev ) { - - index ; if ( index < 0 ) { leaf = leaf get previous leaf ( ) ; index = leaf ! = null ? ( leaf key count - 1 ) : 0 ; } is prev = true ; } else { if ( index = = leaf key count ) { leaf = leaf get next leaf ( ) ; index = 0 ; } is next = true ; } } if ( leaf ! = null ) { buffer id = leaf get buffer id ( ) ; record index = index ; } expected mod count = mod count ; } return leaf ; }


test on the deny engine and allow engine pair the deny engine has unknown policies , so the g r p c authorization returns unknown

public void test engine pair with unknown deny engine ( ) throws interpreter exception { setup engine rbac pair ( ) ; / / policy 4 - unmatched ; policy 5 - unknown ; policy 6 - unknown / / policy 1 - matched ; policy 2 - matched ; policy 3 - matched do return ( true ) when ( spy engine ) matches ( eq ( condition 1 ) , any ( activation class ) ) ; do return ( true ) when ( spy engine ) matches ( eq ( condition 2 ) , any ( activation class ) ) ; do return ( true ) when ( spy engine ) matches ( eq ( condition 3 ) , any ( activation class ) ) ; do return ( false ) when ( spy engine ) matches ( eq ( condition 4 ) , any ( activation class ) ) ; do throw ( new interpreter exception builder ( " unknown result " ) build ( ) ) when ( spy engine ) matches ( eq ( condition 5 ) , any ( activation class ) ) ; do throw ( new interpreter exception builder ( " unknown result " ) build ( ) ) when ( spy engine ) matches ( eq ( condition 6 ) , any ( activation class ) ) ; evaluate result = spy engine evaluate ( args ) ; assert that ( evaluate result get decision ( ) ) is equal to ( authorization decision output unknown ) ; assert that ( evaluate result get policy names ( ) ) has size ( 2 ) ; assert that ( evaluate result get policy names ( ) ) contains ( " policy 5 " ) ; assert that ( evaluate result get policy names ( ) ) contains ( " policy 6 " ) ; }


returns an { @ link annotation } object reflecting the annotation provided , or null of this field doesn ' t have such an annotation this is a convenience function if the caller knows already which annotation type he ' s looking for

public annotation get declared annotation ( class < ? extends java lang annotation annotation > annotation type ) { java lang annotation annotation [ ] annotations = field get declared annotations ( ) ; if ( annotations = = null ) { return null ; } for ( java lang annotation annotation annotation : annotations ) { if ( annotation annotation type ( ) equals ( annotation type ) ) { return new annotation ( annotation ) ; } } return null ; }


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


return a sorted enumeration of the keys in this { @ link properties } object

public synchronized enumeration < object > keys ( ) { return collections enumeration ( key set ( ) ) ; }


@ t c description : , ， @ test step : @ expect result :

public void multiple tenant group get services of server ( ) throws exception { string service name = random domain name ( ) ; naming 1 register instance ( service name , test group 1 , " 11 11 11 11 " , test port , " c 1 " ) ; naming 1 register instance ( service name , test group 2 , " 22 22 22 22 " , test port , " c 1 " ) ; time unit seconds sleep ( 5l ) ; / / ， list view < string > list view = naming 1 get services of server ( 1 , 20 , test group 1 ) ; naming 2 register instance ( service name , " 33 33 33 33 " , test port , " c 1 " ) ; time unit seconds sleep ( 5l ) ; list view < string > list view 1 = naming 1 get services of server ( 1 , 20 , test group 1 ) ; assert assert equals ( list view get count ( ) , list view 1 get count ( ) ) ; assert assert not equals ( 0 , list view 1 get count ( ) ) ; }


public long get start time ( ) { return start time ; }


tests that channels cannot be created if keystore cannot be loaded

public void test invalid keystore password ( args args ) { try ( ssl channel builder channel builder = new client channel builder ( ) ) { args ssl client configs put ( ssl configs ssl keystore password config , " invalid " ) ; assert throws ( kafka exception class , ( ) - > channel builder configure ( args ssl client configs ) ) ; } }


for flick scroll , sets the amount of time in seconds that a fling will continue to scroll default is 1

public void set fling time ( float fling time ) { this fling time = fling time ; }


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


returns the appropriate member visitor , depending on whether the given method is an initializer or not

private member visitor applicable member visitor ( clazz clazz , member method ) { return class util is initializer ( method get name ( clazz ) ) ? initializer member visitor : other member visitor ; }


sets whether or not { @ link text delegate } will cache ( memoize ) the results of get text if this isn ' t necessary then set it to false

public void set cache text ( boolean cache text ) { this cache text = cache text ; }


this covers a bug where listener healthy would get called when a single service failed during startup ( it occurred in more complicated cases also )

public void test fail start single service calls healthy ( ) { service a = new fail start service ( ) ; service manager manager = new service manager ( as list ( a ) ) ; recording listener listener = new recording listener ( ) ; manager add listener ( listener , direct executor ( ) ) ; try { manager start async ( ) await healthy ( ) ; fail ( ) ; } catch ( illegal state exception expected ) { } assert false ( listener healthy called ) ; }


expect a kafka exception if target size is bigger than the size of the file records

public void test truncate not called if size is bigger than target size ( ) throws i o exception { file channel channel mock = mock ( file channel class ) ; when ( channel mock size ( ) ) then return ( 42l ) ; file records file records = new file records ( temp file ( ) , channel mock , 0 , integer max value , false ) ; try { file records truncate to ( 43 ) ; fail ( " should throw kafka exception " ) ; } catch ( kafka exception e ) { / / expected } verify ( channel mock , at least once ( ) ) size ( ) ; }


returns true if first rpc protocol version is greater than or equal to the second one returns false otherwise

static boolean is greater than or equal to ( version first , version second ) { if ( ( first get major ( ) > second get major ( ) ) | | ( first get major ( ) = = second get major ( ) & & first get minor ( ) > = second get minor ( ) ) ) { return true ; } return false ; }


public void set friction ( float friction ) { fixture set friction ( friction ) ; }


t handle ( server request request ) throws exception ;


delete fake : fake endpoint to test group parameters ( optional ) fake endpoint to test group parameters ( optional )

default completable future < response entity < void > > test group parameters ( @ not null @ api param ( value = " required string in group parameters " , required = true ) @ valid @ request param ( value = " required string group " , required = true ) integer required string group , @ api param ( value = " required boolean in group parameters " , required = true ) @ request header ( value = " required boolean group " , required = true ) boolean required boolean group , @ not null @ api param ( value = " required integer in group parameters " , required = true ) @ valid @ request param ( value = " required int 6 4 group " , required = true ) long required int 6 4 group , @ api param ( value = " string in group parameters " ) @ valid @ request param ( value = " string group " , required = false ) integer string group , @ api param ( value = " boolean in group parameters " ) @ request header ( value = " boolean group " , required = false ) boolean boolean group , @ api param ( value = " integer in group parameters " ) @ valid @ request param ( value = " int 6 4 group " , required = false ) long int 6 4 group ) { return completable future completed future ( new response entity < > ( http status not implemented ) ) ; }


the name of the type this corresponds to the ' type ' part of a full resource name of the form package : typeentry the set of legal type names is listed in resource cpp < code > optional string name = 2 ; < code >

public com google protobuf byte string get name bytes ( ) { return com google protobuf byte string copy from utf 8 ( name ) ; }


public static long mod ( long x , long m ) { return long math mod ( x , m ) ; }


public void set view bounds ( rect f view bounds ) { m view bounds set ( view bounds ) ; }


load bean definitions from the specified xml file

public int load bean definitions ( input source input source ) throws bean definition store exception { return load bean definitions ( input source , " resource loaded through sax input source " ) ; }


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


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


gets the remote suffixed log dir for the user

public static path get remote log suffixed dir ( path remote root log dir , string user , string suffix ) { suffix = get bucket suffix ( ) + suffix ; return new path ( get remote log user dir ( remote root log dir , user ) , suffix ) ; }


public int get int ( @ non null final string key ) { return get int ( key , - 1 ) ; }


a raw - style query where you can pass any where clause and arguments

public list < t > query raw ( string where , string selection arg ) { cursor cursor = db raw query ( statements get select all ( ) + where , selection arg ) ; return load all and close cursor ( cursor ) ; }


set the ( new ) value of the { @ code upgrade } header

public void set upgrade ( @ nullable string upgrade ) { set or remove ( upgrade , upgrade ) ; }


returns the encoding for a given aac audio object type

public static int get encoding for audio object type ( @ aac audio object type int audio object type ) { switch ( audio object type ) { case audio object type aac lc : return c encoding aac lc ; case audio object type aac sbr : return c encoding aac he v1 ; case audio object type aac ps : return c encoding aac he v2 ; case audio object type aac xhe : return c encoding aac xhe ; case audio object type aac eld : return c encoding aac eld ; case audio object type aac er bsac : return c encoding aac er bsac ; default : return c encoding invalid ; } }


public int size ( ) { return buffer length ; }


display any bep transports that are still open after the build most likely , because uploading build events takes longer than the build itself

private void maybe report bep transports ( position aware ansi terminal writer terminal writer ) throws i o exception { if ( ! build complete | | bep open transports is empty ( ) ) { return ; } long since seconds = milliseconds to seconds ( clock current time millis ( ) - bep transport closing start time millis ) ; if ( since seconds = = 0 ) { / / special case for when bazel was interrupted , in which case we don ' t want to have / / a bep upload message return ; } int count = bep open transports size ( ) ; / / can just use target width , because we always write to a new line int max width = target width ; string wait message = " waiting for build events upload : " ; string name = bep open transports iterator ( ) next ( ) name ( ) ; string line = wait message + name + " " + since seconds + " s " ; if ( count = = 1 & & line length ( ) < = max width ) { terminal writer newline ( ) append ( line ) ; } else if ( count = = 1 ) { wait message = " waiting for : " ; string wait secs = " " + since seconds + " s " ; int max name width = max width - wait message length ( ) - wait secs length ( ) ; terminal writer newline ( ) append ( wait message + shortened string ( name , max name width ) + wait secs ) ; } else { terminal writer newline ( ) append ( wait message + since seconds + " s " ) ; for ( build event transport transport : bep open transports ) { name = " " + transport name ( ) ; terminal writer newline ( ) append ( shortened string ( name , max width ) ) ; } } }


allows the loaded resource to skip the memory cache note - this is not a guarantee if a request is already pending for this resource and that request is not also skipping the memory cache , the resource will be cached in memory

public t skip memory cache ( boolean skip ) { if ( is auto clone enabled ) { return clone ( ) skip memory cache ( true ) ; } this is cacheable = ! skip ; fields | = is cacheable ; return self or throw if locked ( ) ; }


performs occlusion culling using the bullet method { @ link bt dbvt # collide o c l } finds all collision objects which are visible to the camera , where vision is not blocked ( occluded ) by another object if a collision object from the broadphase is visible to the camera , a callback is made to { @ link # on object visible ( bt collision object ) } only collision objects for which { @ link # is occluder ( bt collision object ) } returns true can occlude others these collision objects must have a { @ link bt box shape } collision shape however , box occluders can block vision of any type of shape

public void perform occlusion culling ( bt dbvt broadphase broadphase , occlusion buffer ocl buffer , camera camera ) { this ocl buffer = ocl buffer ; ocl buffer set projection matrix ( camera combined ) ; set frustum planes ( camera frustum ) ; bt dbvt collide o c l ( broadphase get set 1 ( ) get root ( ) , frustum normals , frustum offsets , camera direction , num planes , collider ) ; bt dbvt collide o c l ( broadphase get set 0 ( ) get root ( ) , frustum normals , frustum offsets , camera direction , num planes , collider ) ; }