void add ( long timestamp , boolean accelerating ) { purge ( timestamp - max window size ) ; sample added = pool acquire ( ) ; added timestamp = timestamp ; added accelerating = accelerating ; added next = null ; if ( newest ! = null ) { newest next = added ; } newest = added ; if ( oldest = = null ) { oldest = added ; } sample count + + ; if ( accelerating ) { accelerating count + + ; } }


public short get target segment ( ) { return target segment ; }


this test is intentionally brittle it should break if we add new methods on { @ link storage component } !

@ test public void declares all methods to forward ( ) { assert that ( forwarding storage component class get declared methods ( ) ) extracting ( method : : get name ) contains all ( stream concat ( stream of ( component class get declared methods ( ) ) map ( method : : get name ) , stream of ( storage component class get declared methods ( ) ) map ( method : : get name ) ) collect ( collectors to list ( ) ) ) ; }


returns dummy factory arguments that are equal to { @ code args } but may be different instances , to be used to construct a second instance of the same equality group

private list < object > generate equal factory arguments ( invokable < ? , ? > factory , list < parameter > params , list < object > args ) throws parameter not instantiable exception , factory method returns null exception , invocation target exception , illegal access exception { list < object > equal args = lists new array list ( args ) ; for ( int i = 0 ; i < args size ( ) ; i + + ) { parameter param = params get ( i ) ; object arg = args get ( i ) ; / / use new fresh value generator because ' args ' were populated with new fresh generator each / / two new fresh value generator ( ) instances should normally generate equal value sequence object should be equal arg = generate dummy arg ( param , new fresh value generator ( ) ) ; if ( arg ! = should be equal arg & & objects equal ( arg , should be equal arg ) & & hash code insensitive to arg reference ( factory , args , i , should be equal arg ) & & hash code insensitive to arg reference ( factory , args , i , generate dummy arg ( param , new fresh value generator ( ) ) ) ) { / / if the implementation uses identity hash code ( ) , referential equality is / / probably intended so no point in using an equal - but - different factory argument / / we check twice to avoid confusion caused by accidental hash collision equal args set ( i , should be equal arg ) ; } } return equal args ; }


public void cancel ( ) throws s q l exception { check closed ( ) ; }


removes the node from the table and adds the index to the free list

private void remove from table ( node [ ] table , node node ) { int last = table length - 1 ; table [ node index ] = table [ last ] ; table [ node index ] index = node index ; table [ last ] = null ; }


saves changes made by clicking the save button

public album page save changes ( ) { var save button = ( html submit input ) page get element by id ( " save button " ) ; try { save button click ( ) ; } catch ( i o exception e ) { e print stack trace ( ) ; } return this ; }


creates a datetime from the millis since epoch ( thus the time - zone is utc )

public static zoned date time as date time ( long millis ) { return zoned date time of instant ( instant of epoch milli ( millis ) , utc ) ; }


public < t extends comparable < ? super t > > list < t > sort ( list < t > data ) { list < t > dup = new array list < t > ( ) ; dup add all ( data ) ; collections sort ( dup ) ; return dup ; }


add the unique id to the given string builder

protected string builder append to ( string builder builder ) { return job id append to ( builder ) append ( separator ) append ( is map ? ' m ' : ' r ' ) append ( separator ) append ( id format format ( jvm id ) ) ; }


returns true if this class has a highlight for the given token

public boolean contains ( clang token t ) { return highlights by token contains key ( get key ( t ) ) ; }


return the path of datadatapackagedatabases

public static string get internal app dbs path ( ) { return utils get app ( ) get application info ( ) data dir + " / databases " ; }


unescapes any java literals found in the < code > string < code > for example , it will turn a sequence of < code > ' \ ' < code > and < code > ' n ' < code > into a newline character , unless the < code > ' \ ' < code > is preceded by another < code > ' \ ' < code >

public static string unescape string ( string str ) { return string escape utils unescape java ( str ) ; }


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


public static boolean is flag ( int operand type ) { return ( operand type & flag ) ! = 0 ; }


exit a parse tree produced by { @ link sql base parser # builtin date time function }

void exit builtin date time function ( sql base parser builtin date time function context ctx ) ;


returns the whether there is a boundary of an exception block between the given offsets ( including both )

private boolean exception boundary ( code attribute code attribute , int offset 1 , int offset 2 ) { / / swap the offsets if the second one is smaller than the first one if ( offset 2 < offset 1 ) { int offset = offset 1 ; offset 1 = offset 2 ; offset 2 = offset ; } / / check if there is a boundary of an exception block for ( int offset = offset 1 ; offset < = offset 2 ; offset + + ) { if ( branch target finder is exception start ( offset ) | | branch target finder is exception end ( offset ) ) { return true ; } } return false ; }


determines if the indicated property maps are for the same type of property

private boolean same property types ( property map latest map , property map my map ) { if ( latest map ! = null & & my map ! = null ) { return latest map get class ( ) equals ( my map get class ( ) ) ; } return true ; }


return the time step ( ms ) at which the { @ link plan follower } is invoked


checks that the monitoring ingest pipelines have been created by the local exporter

private void check monitoring pipelines ( ) { final set < string > expected pipelines = arrays stream ( pipeline ids ) map ( monitoring template utils : : pipeline name ) collect ( collectors to set ( ) ) ; final get pipeline response response = client ( ) admin ( ) cluster ( ) prepare get pipeline ( " xpack monitoring * " ) get ( ) ; / / actual pipelines final set < string > pipelines = response pipelines ( ) stream ( ) map ( pipeline configuration : : get id ) collect ( collectors to set ( ) ) ; assert equals ( " missing expected pipelines " , expected pipelines , pipelines ) ; assert true ( " monitoring ingest pipeline not found " , response is found ( ) ) ; }


added this method for cache testing no blocks were needed , just needed another function to have enough to test a function being removed from the cache


adds the specified data element to the end of the skip list , if the element is not already present

public boolean add last ( directory diff diff ) { final int node level = directory diff list factory random level ( ) ; final skip list node [ ] node path = find previous nodes ( null , node level ) ; final skip list node new node = new skip list node ( diff , node level ) ; for ( int level = 0 ; level < = node level ; level + + ) { if ( level > 0 & & node path [ level ] ! = head ) { / / suppose the list is like : / / level 2 : head - > s 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > null / / level 1 : head - > s 1 - - - - > s 3 ' - - - - - - > s 5 - - - - - - - - - - - - - > null / / level 0 : head - > s 1 - > s 2 - > s 3 - > s 4 - > s 5 - > s 6 - > s 7 - > s 8 - > s 9 / / case : s 1 0 is added at the end the let the level for this node = 4 / / in this case , / / level 2 : head - > s 1 ' ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > s 1 0 / / level 1 : head - > s 1 ' - - - - > s 3 ' - - - - - - > s 5 ' - - - - - - - - - - - - - - - - - - - - > s 1 0 / / level 0 : head - > s 1 - > s 2 - > s 3 - > s 4 - > s 5 - > s 6 - > s 7 - > s 8 - > s 9 - - - - > s 1 0 / / at level 1 , we combine s 5 , s 6 , s 7 , s 8 , s 9 and store as s 5 ' / / at level 2 , we combine s 1 ' , s 3 ' , s 5 ' and form s 1 ' ' and store at s 1 / / note : the last element ( element being added ) diff is not added while / / combining the diffs children diff combined = combine diff ( node path [ level ] , new node , level ) ; if ( combined ! = null ) { node path [ level ] set skip diff ( combined , level ) ; } } node path [ level ] set skip to ( new node , level ) ; new node set skip to ( null , level ) ; } return skip node list add ( new node ) ; }


public list < r m container > get reserved containers ( ) { list < r m container > list = new array list < > ( ) ; read lock lock ( ) ; try { for ( entry < scheduler request key , map < node id , r m container > > e : this reserved containers entry set ( ) ) { list add all ( e get value ( ) values ( ) ) ; } return list ; } finally { read lock unlock ( ) ; } }


clears the store , removes all queue references

public void clear ( ) { try { modification lock write lock ( ) lock ( ) ; full name queues clear ( ) ; short name to long names clear ( ) ; get map clear ( ) ; } finally { modification lock write lock ( ) unlock ( ) ; } }


overloaded variant of { @ link # send ( object ) } that also accepts a media type hint for how to serialize the given object

public synchronized void send ( object object , @ nullable media type media type ) throws i o exception { assert state ( ! this complete , " response body emitter has already completed " + ( this failure ! = null ? " with error : " + this failure : " " ) ) ; send internal ( object , media type ) ; }


adds the satellite viewer functionality to this provider

protected void add satellite feature ( ) { vg satellite featurette < v , e , g > satellite feature = new vg satellite featurette < > ( ) ; satellite feature init ( this ) ; sub features add ( satellite feature ) ; }


sets the maximum frame that the animation will end at when playing or looping the value will be clamped to the composition bounds for example , setting integer max value would result in the same thing as composition end frame

public void set max frame ( int end frame ) { lottie drawable set max frame ( end frame ) ; }


public void test entry set ( ) { concurrent map map = map 5 ( ) ; set s = map entry set ( ) ; assert equals ( 5 , s size ( ) ) ; iterator it = s iterator ( ) ; while ( it has next ( ) ) { map entry e = ( map entry ) it next ( ) ; assert true ( ( e get key ( ) equals ( one ) & & e get value ( ) equals ( " a " ) ) | | ( e get key ( ) equals ( two ) & & e get value ( ) equals ( " b " ) ) | | ( e get key ( ) equals ( three ) & & e get value ( ) equals ( " c " ) ) | | ( e get key ( ) equals ( four ) & & e get value ( ) equals ( " d " ) ) | | ( e get key ( ) equals ( five ) & & e get value ( ) equals ( " e " ) ) ) ; } }


test that lines on stdout get passed as info level messages

public void test stdout logging ( ) { assert true ( fencer try fence ( test target , " echo hello " ) ) ; mockito verify ( shell command fencer log ) info ( mockito ends with ( " echo hello : hello " ) ) ; }


returns the set of types that can be assigned to { @ code type index }

private set < integer > find assignable types ( dex dex , int type index ) { set < integer > assignable types = new hash set < integer > ( ) ; assignable types add ( type index ) ; for ( class def class def : dex class defs ( ) ) { if ( assignable types contains ( class def get supertype index ( ) ) ) { assignable types add ( class def get type index ( ) ) ; continue ; } for ( int implemented : class def get interfaces ( ) ) { if ( assignable types contains ( implemented ) ) { assignable types add ( class def get type index ( ) ) ; break ; } } } return assignable types ; }


closes the underlying { @ code object pool } when destroying this object

public void destroy ( ) throws exception { if ( this pool ! = null ) { logger debug ( " closing commons object pool " ) ; this pool close ( ) ; } }


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


true if this analyzer should < b > not < b > attempt to demangle the given symbol

protected boolean skip symbol ( symbol symbol ) { if ( symbol get source ( ) = = source type default ) { return true ; } / / only demangle global or external symbols when directly parented to a library namespace namespace parent namespace = symbol get parent namespace ( ) ; if ( symbol is external ( ) ) { if ( ! ( parent namespace instanceof library ) ) { return true ; } } else if ( ! parent namespace is global ( ) ) { return true ; } / / someone has already added arguments or return to the function signature if ( symbol get symbol type ( ) = = symbol type function ) { function function = ( function ) symbol get object ( ) ; if ( function get signature source ( ) is higher priority than ( source type analysis ) ) { return true ; } } return false ; }


simple performance test for the " common case " checksum usage in hdfs : computing and verifying crc32c with 512 byte chunking on native buffers

public void common usage perf test ( ) throws exception { final int num runs = 5 ; final data checksum checksum = data checksum new data checksum ( data checksum type crc32c , 512 ) ; final int data length = 512 * 1024 * 1024 ; harness h = new harness ( checksum , data length , true ) ; for ( int i = 0 ; i < num runs ; i + + ) { stop watch s = new stop watch ( ) start ( ) ; / / calculate real checksum , make sure it passes checksum calculate chunked sums ( h data buf , h checksum buf ) ; s stop ( ) ; system err println ( " calculate run # " + i + " : " + s now ( time unit microseconds ) + " us " ) ; s = new stop watch ( ) start ( ) ; / / calculate real checksum , make sure it passes checksum verify chunked sums ( h data buf , h checksum buf , " fake file " , 0 ) ; s stop ( ) ; system err println ( " verify run # " + i + " : " + s now ( time unit microseconds ) + " us " ) ; } }


creates a new blocking - style stub that supports unary and streaming output calls on the service

public static endpoint discovery service blocking stub new blocking stub ( io grpc channel channel ) { io grpc stub abstract stub stub factory < endpoint discovery service blocking stub > factory = new io grpc stub abstract stub stub factory < endpoint discovery service blocking stub > ( ) { @ java lang override public endpoint discovery service blocking stub new stub ( io grpc channel channel , io grpc call options call options ) { return new endpoint discovery service blocking stub ( channel , call options ) ; } } ; return endpoint discovery service blocking stub new stub ( factory , channel ) ; }


public static boolean load tinker resources ( tinker application application , string directory , intent intent result ) { if ( res patch info = = null | | res patch info res arsc md 5 = = null ) { return true ; } string resource string = directory + " / " + resource path + " / " + resource file ; file resource file = new file ( resource string ) ; long start = system current time millis ( ) ; if ( application is tinker load verify flag ( ) ) { if ( ! share patch file util check resource arsc md 5 ( resource file , res patch info res arsc md 5 ) ) { share tinker log e ( tag , " failed to load resource file , path : " + resource file get path ( ) + " , expect md 5 : " + res patch info res arsc md 5 ) ; share intent util set intent return code ( intent result , share constants error load patch version resource md5 mismatch ) ; return false ; } share tinker log i ( tag , " verify resource file : " + resource file get path ( ) + " md 5 , use time : " + ( system current time millis ( ) - start ) ) ; } try { tinker resource patcher monkey patch existing resources ( application , resource string ) ; share tinker log i ( tag , " monkey patch existing resources resource file : " + resource string + " , use time : " + ( system current time millis ( ) - start ) ) ; } catch ( throwable e ) { share tinker log e ( tag , " install resources failed " ) ; / / remove patch dex if resource is installed failed try { system class loader adder uninstall patch dex ( application get class loader ( ) ) ; } catch ( throwable throwable ) { share tinker log e ( tag , " uninstall patch dex failed " , e ) ; } intent result put extra ( share intent util intent patch exception , e ) ; share intent util set intent return code ( intent result , share constants error load patch version resource load exception ) ; return false ; } return true ; }


moves a { @ link timer job entity } to become an async { @ link job entity } this happens for example when the due date of a timer is reached , the timer entity then becomes a ' regular ' async job that can be picked up by the { @ link async executor }

job entity move timer job to executable job ( timer job entity timer job ) ;


returns unmodifiable set of properties names defined in this { @ linkplain config def }

public set < string > names ( ) { return collections unmodifiable set ( config keys key set ( ) ) ; }


public void test gm fruit ( ) { / / todo : test gm fruit }


this method determines the sock j s path and handles sock j s static u r ls session u r ls and raw web socket requests are delegated to abstract methods

public final void handle request ( server http request request , server http response response , @ nullable string sock js path , web socket handler ws handler ) throws sock js exception { if ( sock js path = = null ) { if ( logger is warn enabled ( ) ) { logger warn ( " expected sock j s path failing request : " + request get u r i ( ) ) ; } response set status code ( http status not found ) ; return ; } try { request get headers ( ) ; } catch ( invalid media type exception ex ) { / / as per sock j s protocol content - type can be ignored ( it ' s always json ) } string request info = ( logger is debug enabled ( ) ? request get method ( ) + " " + request get u r i ( ) : null ) ; try { if ( sock js path is empty ( ) | | sock js path equals ( " / " ) ) { if ( request info ! = null ) { logger debug ( " processing transport request : " + request info ) ; } response get headers ( ) set content type ( new media type ( " text " , " plain " , standard charsets utf 8 ) ) ; response get body ( ) write ( " welcome to sock j s ! \ n " get bytes ( standard charsets utf 8 ) ) ; } else if ( sock js path equals ( " / info " ) ) { if ( request info ! = null ) { logger debug ( " processing transport request : " + request info ) ; } this info handler handle ( request , response ) ; } else if ( sock js path matches ( " / iframe [ 0 - 9 - a - z ] * html " ) ) { if ( ! get allowed origins ( ) is empty ( ) & & ! get allowed origins ( ) contains ( " * " ) | | ! get allowed origin patterns ( ) is empty ( ) ) { if ( request info ! = null ) { logger debug ( " iframe support is disabled when an origin check is required " + " ignoring transport request : " + request info ) ; } response set status code ( http status not found ) ; return ; } if ( get allowed origins ( ) is empty ( ) ) { response get headers ( ) add ( xframe options header , " sameorigin " ) ; } if ( request info ! = null ) { logger debug ( " processing transport request : " + request info ) ; } this iframe handler handle ( request , response ) ; } else if ( sock js path equals ( " / websocket " ) ) { if ( is web socket enabled ( ) ) { if ( request info ! = null ) { logger debug ( " processing transport request : " + request info ) ; } handle raw web socket request ( request , response , ws handler ) ; } else if ( request info ! = null ) { logger debug ( " web socket disabled ignoring transport request : " + request info ) ; } } else { string [ ] path segments = string utils tokenize to string array ( sock js path substring ( 1 ) , " / " ) ; if ( path segments length ! = 3 ) { if ( logger is warn enabled ( ) ) { logger warn ( " invalid sock j s path ' " + sock js path + " ' - required to have 3 path segments " ) ; } if ( request info ! = null ) { logger debug ( " ignoring transport request : " + request info ) ; } response set status code ( http status not found ) ; return ; } string server id = path segments [ 0 ] ; string session id = path segments [ 1 ] ; string transport = path segments [ 2 ] ; if ( ! is web socket enabled ( ) & & transport equals ( " websocket " ) ) { if ( request info ! = null ) { logger debug ( " web socket disabled ignoring transport request : " + request info ) ; } response set status code ( http status not found ) ; return ; } else if ( ! validate request ( server id , session id , transport ) | | ! validate path ( request ) ) { if ( request info ! = null ) { logger debug ( " ignoring transport request : " + request info ) ; } response set status code ( http status not found ) ; return ; } if ( request info ! = null ) { logger debug ( " processing transport request : " + request info ) ; } handle transport request ( request , response , ws handler , session id , transport ) ; } response close ( ) ; } catch ( i o exception ex ) { throw new sock js exception ( " failed to write to the response " , null , ex ) ; } }


returns true if this ssa register is a " version 0 " register all version 0 registers are assigned the first n register numbers , where n is the count of original rop registers

private boolean is version zero register ( int ssa reg ) { return ssa reg < rop reg count ; }


determines the long value of the system property with the specified name this behaves just like { @ link long # get long ( java lang string ) } , except that it also consults the { @ link servlet context } ' s " init " parameters

public static long get long ( string name ) { return get long ( name , null ) ; }


returns the maximum of the two values if the values compare as 0 , the first is returned the recommended solution for finding the { @ code maximum } of some values depends on the type of your data and the number of elements you have read more in the guava user guide article on < a href = " https : github comgoogleguavawiki collection utilities explained # comparators " > { @ code comparators }

public static < t extends comparable < ? super t > > t max ( t a , t b ) { return ( a compare to ( b ) > = 0 ) ? a : b ; }


deletes the component data type at the given index in this composite and removes the deleted component from the selection if necessary < br > note : this method does not fix the selection based on lock mode and does not perform any edit notification

void delete ( int component ordinal ) { do delete ( component ordinal ) ; selection remove range ( component ordinal , component ordinal + 1 ) ; adjust selection ( component ordinal + 1 , - 1 ) ; notify composite changed ( ) ; }


returns the " other " instance if it has any expressions ; returns " this " instance otherwise practically that means a method - level " produces " overrides a type - level " produces " condition

public produces request condition combine ( produces request condition other ) { return ( ! other expressions is empty ( ) ? other : this ) ; }


creates an unicast subject with the given internal buffer capacity hint

public static < t > unicast subject < t > create ( int capacity hint ) { object helper verify positive ( capacity hint , " capacity hint " ) ; return new unicast subject < > ( capacity hint , null , true ) ; }


put fakebody - with - file - schema for this test , the body for this request much reference a schema named & # x 6 0 ; file & # x 6 0 ;

default response entity < void > test body with file schema ( @ api param ( value = " " , required = true ) @ valid @ request body file schema test class body ) { return new response entity < > ( http status not implemented ) ; }


public okhttp 3 call test client model call ( client body , final api callback callback ) throws api exception { object local var post body = body ; / / create path and map variables api operation api operation = local var api client get operation lookup map ( ) get ( " test client model " ) ; if ( api operation = = null ) { throw new api exception ( " operation not found in oas " ) ; } operation operation = api operation get operation ( ) ; string local var path = api operation get path ( ) ; map < string , object > param map = new hash map < > ( ) ; list < pair > local var query params = new array list < pair > ( ) ; list < pair > local var collection query params = new array list < pair > ( ) ; map < string , string > local var header params = new hash map < string , string > ( ) ; map < string , string > local var cookie params = new hash map < string , string > ( ) ; map < string , object > local var form params = new hash map < string , object > ( ) ; local var path = local var api client fill parameters from operation ( operation , param map , local var path , local var query params , local var collection query params , local var header params , local var cookie params ) ; final string [ ] local var accepts = { " application / json " } ; final string local var accept = local var api client select header accept ( local var accepts ) ; if ( local var accept ! = null ) { local var header params put ( " accept " , local var accept ) ; } final string [ ] local var content types = { " application / json " } ; final string local var content type = local var api client select header content type ( local var content types ) ; local var header params put ( " content - type " , local var content type ) ; string [ ] local var auth names = new string [ ] { } ; return local var api client build call ( local var path , api operation get method ( ) , local var query params , local var collection query params , local var post body , local var header params , local var cookie params , local var form params , local var auth names , callback ) ; }


any comment associated with the value < code > optional string comment = 2 ; < code >

public java lang string get comment ( ) { return comment ; }


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


checks the format of an internal index and returns true if the index is up to date or false if upgrade is required

public static boolean check internal index format ( index metadata index metadata ) { return index metadata get settings ( ) get as int ( index metadata index format setting get key ( ) , 0 ) = = expected index format version ; }


handle deserialization of the ' null ' value

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


public datanode descriptor get datanode ( datanode i d node i d ) throws unregistered node exception { final datanode descriptor node = get datanode ( node i d get datanode uuid ( ) ) ; if ( node = = null ) return null ; if ( ! node get xfer addr ( ) equals ( node i d get xfer addr ( ) ) ) { final unregistered node exception e = new unregistered node exception ( node i d , node ) ; name node state change log error ( " block * name system get datanode : " + e get localized message ( ) ) ; throw e ; } return node ; }


recycle the given byte array , which must have the same length as the array length managed by this object the byte array may or may not be allocated by the { @ link fixed length manager # allocate ( ) } method

synchronized int recycle ( byte [ ] array ) { preconditions check not null ( array ) ; preconditions check argument ( array length = = byte array length ) ; if ( log is debug enabled ( ) ) { debug message get ( ) append ( " , " ) append ( this ) ; } notify ( ) ; num allocated - - ; if ( num allocated < 0 ) { / / it is possible to drop below 0 since / / some byte arrays may not be created by the allocate ( ) method num allocated = 0 ; } if ( free queue size ( ) < max allocated - num allocated ) { if ( log is debug enabled ( ) ) { debug message get ( ) append ( " , free queue offer " ) ; } free queue offer ( array ) ; } return free queue size ( ) ; }


public void test model api response ( ) { / / todo : test model api response }


public script script ( ) { return script ; }


helper method to determine a { @ link org apache calcite rel core table scan } ' s collation

public static list < rel collation > table ( rel opt table table ) { / / behavior change since calcite - 4215 : the default collations is null / / in flink , the default is an empty list list < rel collation > collations = table get collation list ( ) ; return collations = = null ? collections empty list ( ) : collations ; }


whether the key is printed when " blaze info " is invoked without arguments this is usually true for info keys that take multiple lines , thus , cannot really be included in the output of argumentless " blaze info "

public boolean is hidden ( ) { return hidden ; }


public result set execute query ( ) throws s q l exception { return new stub result set ( ) ; }


issue a single sql execute , typically a ddl statement

void execute ( string sql ) throws data access exception ;


guaranteed to throw an exception and leave the map unmodified

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


indicate whether external xml entities are processed when unmarshalling default is { @ code false } , meaning that external entities are not resolved note that processing of external entities will only be enableddisabled when the { @ code source } passed to { @ link # unmarshal ( source ) } is a { @ link s a x source } or { @ link stream source } it has no effect for { @ link d o m source } or { @ link st a x source } instances note : setting this option to { @ code true } also automatically sets { @ link # set support dtd } to { @ code true }

public void set process external entities ( boolean process external entities ) { this process external entities = process external entities ; if ( process external entities ) { this support dtd = true ; } }


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

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


visit a parse tree produced by the { @ code arithmetic unary } labeled alternative in { @ link sql base parser # value expression }

t visit arithmetic unary ( sql base parser arithmetic unary context ctx ) ;


gets extra spacing for ` axis minimum ` to be added to automatically calculated ` axis minimum `

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


create a { @ link jms response } targeting the queue with the specified name

public static < t > jms response < t > for queue ( t result , string queue name ) { assert not null ( queue name , " queue name must not be null " ) ; return new jms response < > ( result , new destination name holder ( queue name , false ) ) ; }


given a byte ' s offset in an internal block , calculate the offset in the block group

public static long offset in blk to offset in b g ( int cell size , int data blk num , long offset in blk , int idx in block group ) { int cell idx in blk = ( int ) ( offset in blk / cell size ) ; return cell idx in blk * cell size * data blk num / / n full stripes before offset + idx in block group * cell size / / m full cells before offset + offset in blk % cell size ; / / partial cell }


public delete pet oper req spec ( consumer < request spec builder > req spec customizer ) { req spec customizer accept ( req spec ) ; return this ; }


used to retrieve the earliest offset of a partition

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


public okhttp 3 call delete user call ( string username , final api callback callback ) throws api exception { object local var post body = null ; / / create path and map variables string local var path = " / user / { username } " replace all ( " \ \ { " + " username " + " \ \ } " , local var api client escape string ( username to string ( ) ) ) ; list < pair > local var query params = new array list < pair > ( ) ; list < pair > local var collection query params = new array list < pair > ( ) ; map < string , string > local var header params = new hash map < string , string > ( ) ; map < string , string > local var cookie params = new hash map < string , string > ( ) ; map < string , object > local var form params = new hash map < string , object > ( ) ; final string [ ] local var accepts = { } ; final string local var accept = local var api client select header accept ( local var accepts ) ; if ( local var accept ! = null ) { local var header params put ( " accept " , local var accept ) ; } final string [ ] local var content types = { } ; final string local var content type = local var api client select header content type ( local var content types ) ; local var header params put ( " content - type " , local var content type ) ; string [ ] local var auth names = new string [ ] { } ; return local var api client build call ( local var path , " delete " , local var query params , local var collection query params , local var post body , local var header params , local var cookie params , local var form params , local var auth names , callback ) ; }


look up the jta transaction manager in jndi via the configured name called by { @ code after properties set } if no direct transaction manager reference was set can be overridden in subclasses to provide a different transaction manager object

protected transaction manager lookup transaction manager ( string transaction manager name ) throws transaction system exception { try { if ( logger is debug enabled ( ) ) { logger debug ( " retrieving jta transaction manager from jndi location [ " + transaction manager name + " ] " ) ; } return get jndi template ( ) lookup ( transaction manager name , transaction manager class ) ; } catch ( naming exception ex ) { throw new transaction system exception ( " jta transaction manager is not available at jndi location [ " + transaction manager name + " ] " , ex ) ; } }


customize the { @ link configurable web application context } created by this context loader after config locations have been supplied to the context but before the context is refreshed the default implementation { @ linkplain # determine context initializer classes ( servlet context ) determines } what ( if any ) context initializer classes have been specified through { @ linkplain # context initializer classes param context init parameters } and { @ linkplain application context initializer # initialize invokes each } with the given web application context any { @ code application context initializers } implementing { @ link org springframework core ordered ordered } or marked with @ { @ link org springframework core annotation order order } will be sorted appropriately

protected void customize context ( servlet context sc , configurable web application context wac ) { list < class < application context initializer < configurable application context > > > initializer classes = determine context initializer classes ( sc ) ; for ( class < application context initializer < configurable application context > > initializer class : initializer classes ) { class < ? > initializer context class = generic type resolver resolve type argument ( initializer class , application context initializer class ) ; if ( initializer context class ! = null & & ! initializer context class is instance ( wac ) ) { throw new application context exception ( string format ( " could not apply context initializer [ % s ] since its generic parameter [ % s ] " + " is not assignable from the type of application context used by this " + " context loader : [ % s ] " , initializer class get name ( ) , initializer context class get name ( ) , wac get class ( ) get name ( ) ) ) ; } this context initializers add ( bean utils instantiate class ( initializer class ) ) ; } annotation aware order comparator sort ( this context initializers ) ; for ( application context initializer < configurable application context > initializer : this context initializers ) { initializer initialize ( wac ) ; } }


invoked when the mock mvc instance is about to be created with the mock mvc builder and the spring web application context that will be passed to the { @ code dispatcher servlet }

default request post processor before mock mvc created ( configurable mock mvc builder < ? > builder , web application context context ) { return null ; }


return the { @ link x m l event reader } for the given st a x source

public static x m l event reader get x m l event reader ( source source ) { if ( source instanceof st a x source ) { return ( ( st a x source ) source ) get x m l event reader ( ) ; } else if ( source instanceof stax source ) { return ( ( stax source ) source ) get x m l event reader ( ) ; } else { throw new illegal argument exception ( " source ' " + source + " ' is neither stax source nor st a x source " ) ; } }


returns the toolbar icon assigned to this toolbar data

public icon get icon ( ) { return icon ; }


returns the float value of this float constant

public float get value ( ) { return f 4value ; }


private boolean load tree items ( d b r progress monitor monitor , d b x tree item meta , final d b n database node [ ] old list , final list < d b n database node > to list , object source , boolean show system , boolean hide folders , boolean reflect ) throws d b exception { if ( this is disposed ( ) ) { / / property reading can take really long time so this node can be disposed at this moment - / / check it return false ; } / / read property using reflection final object value object = get value object ( ) ; if ( value object = = null ) { return false ; } final property value reader value reader = new property value reader ( monitor , meta , value object ) ; d b exec utils try execute recover ( monitor , get data source ( ) , value reader ) ; final object property value = value reader property value ; if ( property value = = null ) { return false ; } if ( ! ( property value instanceof collection < ? > ) ) { log warn ( " bad property ' " + meta get property name ( ) + " ' value : " + property value get class ( ) get name ( ) ) ; / / $ non - nls - 1 $ / / $ non - nls - 2 $ return false ; } final d b s object filter filter = get node filter ( meta , false ) ; this filtered = filter ! = null & & ! filter is not applicable ( ) ; final collection < ? > item list = ( collection < ? > ) property value ; if ( item list is empty ( ) ) { return false ; } if ( this is disposed ( ) ) { / / property reading can take really long time so this node can be disposed at this moment - / / check it return false ; } for ( object child item : item list ) { if ( child item = = null ) { continue ; } if ( ! ( child item instanceof d b s object ) ) { log warn ( " bad item type : " + child item get class ( ) get name ( ) ) ; / / $ non - nls - 1 $ continue ; } if ( d b utils is hidden object ( child item ) ) { / / skip hidden objects continue ; } if ( ! show system & & d b utils is system object ( child item ) ) { / / skip system objects continue ; } if ( hide folders & & ( child item instanceof d b a object | | child item instanceof d b p system info object ) ) { / / skip all dba objects continue ; } if ( filter ! = null & & ! filter matches ( ( ( d b s object ) child item ) get name ( ) ) ) { / / doesn ' t match filter continue ; } d b s object object = ( d b s object ) child item ; boolean added = false ; if ( old list ! = null ) { / / check that new object is a replacement of old one for ( d b n database node old child : old list ) { if ( old child get meta ( ) = = meta & & equal objects ( old child get object ( ) , object ) ) { old child reload object ( monitor , object ) ; if ( old child has children ( false ) & & ! old child needs initialization ( ) ) { / / refresh children recursive old child reload children ( monitor , source , reflect ) ; } if ( reflect ) { get model ( ) fire node update ( source , old child , d b n event node change refresh ) ; } to list add ( old child ) ; added = true ; break ; } } } if ( ! added ) { / / simply add new item d b n database item tree item = new d b n database item ( this , meta , object , old list ! = null ) ; to list add ( tree item ) ; } } if ( old list ! = null ) { / / now remove all non - existing items for ( d b n database node old child : old list ) { if ( old child get meta ( ) ! = meta ) { / / wrong type continue ; } boolean found = false ; for ( object child item : item list ) { if ( child item instanceof d b s object & & equal objects ( old child get object ( ) , ( d b s object ) child item ) ) { found = true ; break ; } } if ( ! found ) { / / remove old child object old child dispose ( true ) ; } } } return true ; }


advances through { @ code input } looking for the start of the next ogg page equivalent to { @ link # skip to next page ( extractor input , long ) skip to next page ( input , limit = \ c position unset ) }

public boolean skip to next page ( extractor input input ) throws i o exception { return skip to next page ( input , / * limit = * / c position unset ) ; }


verify a returned status array matches a single named file

private void verify status array matches file ( path f , file status [ ] status ) { assert equals ( 1 , status length ) ; file status file status = status [ 0 ] ; assert is named file ( f , file status ) ; }


returns the raw type of t , if t is either a raw or parameterized type otherwise , this method throws an { @ link assertion error }

static class < ? > get raw type ( type t ) { if ( t instanceof class < ? > ) { return ( class < ? > ) t ; } else if ( t instanceof parameterized type ) { return ( class < ? > ) ( ( parameterized type ) t ) get raw type ( ) ; } else { throw new assertion error ( " a known concrete type is not concrete " ) ; } }


the entries defined for this type < code > repeated aapt pb entry entry = 3 ; < code >

private void set entry ( int index , com android aapt resources entry value ) { if ( value = = null ) { throw new null pointer exception ( ) ; } ensure entry is mutable ( ) ; entry set ( index , value ) ; }


returns a new inet address that is one more than the passed in address this method works for both i pv 4 and i pv 6 addresses

public static inet address increment ( inet address address ) { byte [ ] addr = address get address ( ) ; int i = addr length - 1 ; while ( i > = 0 & & addr [ i ] = = ( byte ) 0xff ) { addr [ i ] = 0 ; i - - ; } check argument ( i > = 0 , " incrementing % s would wrap " , address ) ; addr [ i ] + + ; return bytes to inet address ( addr ) ; }


the name that was provided by the user this might contain a date math expression

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


utility function to ensure that the configured base znode exists this recursively creates the znode as well as all of its parents

public void create root dir recursively ( string path , list < acl > zk acl ) throws exception { string [ ] path parts = path split ( " / " ) ; preconditions check argument ( path parts length > = 1 & & path parts [ 0 ] is empty ( ) , " invalid path : % s " , path ) ; string builder sb = new string builder ( ) ; for ( int i = 1 ; i < path parts length ; i + + ) { sb append ( " / " ) append ( path parts [ i ] ) ; create ( sb to string ( ) , zk acl ) ; } }


is the middle of piece on the upperleft side of the board with a given offset and size of the piece ? this only checks in one dimension

private static boolean is side ( int offset , int shape size , int board ) { return 2 * offset + shape size < = board ; }


increment the per - policy snapshot taken count for the given policy id

public void snapshot taken ( string slm policy ) { this policy stats compute if absent ( slm policy , snapshot policy stats : : new ) snapshot taken ( ) ; }


turn onoff the caching of the xslt { @ link templates } instance the default value is " true " only set this to " false " in development , where caching does not seriously impact performance

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


specifies mock name naming mocks can be helpful for debugging - the name is used in all verification errors beware that naming mocks is not a solution for complex code which uses too many mocks or collaborators < b > if you have too many mocks then refactor the code < b > so that it ' s easy to testdebug without necessity of naming mocks < b > if you use < code > & # 064 ; mock < code > annotation then you ' ve got naming mocks for free ! < b > < code > & # 064 ; mock < code > uses field name as mock name { @ link mock read more } see examples in javadoc for { @ link mockito } class

public static < t > t mock ( class < t > class to mock , string name ) { return mock ( class to mock , with settings ( ) name ( name ) default answer ( returns defaults ) ) ; }


this method is executed once per superstep after the gather function has been invoked for each vertex

public void post superstep ( ) throws exception { }


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


dumps this class this package - protected method is for debugging only


checks whether the number of user runnable apps exceeds the limitation

public boolean exceed user max apps ( string user ) { allocation configuration alloc conf = scheduler get allocation configuration ( ) ; integer user num runnable = users num runnable apps get ( user ) ; if ( user num runnable = = null ) { user num runnable = 0 ; } if ( user num runnable > = alloc conf get user max apps ( user ) ) { return true ; } return false ; }


applies the given { @ link # get revision id ( object metadata , string ) revision id } as a server - side qualification on the { @ code copy object request }

public abstract void apply revision constraint ( copy object request request , string revision id ) ;


build a new apache ' s { @ link org apache http client methods http uri request } from jersey ' s { @ link org glassfish jersey client client request } convert a method , uri , body , headers and override a user - agent if necessary

private http uri request build apache request ( client request jersey request ) { final request builder builder = request builder create ( jersey request get method ( ) ) set uri ( jersey request get uri ( ) ) set entity ( get http entity ( jersey request ) ) ; for ( string header name : jersey request get headers ( ) key set ( ) ) { builder add header ( header name , jersey request get header string ( header name ) ) ; } final optional < request config > request config = add jersey request config ( jersey request ) ; request config if present ( builder : : set config ) ; return builder build ( ) ; }


sets the encoded image meta data if needed

private void parse metadata if needed ( ) { if ( m width < 0 | | m height < 0 ) { parse meta data ( ) ; } }


remove an encryption zone called while holding the f s directory lock

void remove encryption zone ( long inode id ) { assert dir has write lock ( ) ; if ( has created encryption zone ( ) ) { if ( encryption zones remove ( inode id ) = = null | | ! get reencryption status ( ) has running zone ( inode id ) ) { return ; } if ( reencryption handler ! = null ) { reencryption handler remove zone ( inode id ) ; } } }


< code > repeated io netty example worldclock local time local time = 1 ; < code >

public io netty example worldclock world clock protocol local time builder add local time builder ( ) { return get local time field builder ( ) add builder ( io netty example worldclock world clock protocol local time get default instance ( ) ) ; }


gets the locked line value for the indicated panel

protected big integer get locked line for panel ( field panel fp ) { for ( int i = 0 ; i < locked line numbers length ; i + + ) { if ( panels [ i ] = = fp ) { return locked line numbers [ i ] ; } } return null ; }


get the ending address for this code unit

public address get max address ( ) { return max address ; }


add data - type information about a specific field

public void add data type ( long offset , data type dt ) { if ( dt = = null | | dt instanceof void data type ) { compute max ( offset , 1 ) ; return ; } if ( dt instanceof pointer & & ( ( pointer ) dt ) get data type ( ) equals ( struct d t ) ) { / / be careful of taking a pointer to the structure when the structure / / is not fully defined data type manager manager = dt get data type manager ( ) ; dt = manager get pointer ( data type default , dt get length ( ) ) ; } compute max ( offset , dt get length ( ) ) ; entry < long , data type > first entry = check for overlap ( offset , dt get length ( ) ) ; if ( first entry ! = null ) { if ( first entry get key ( ) long value ( ) = = offset & & first entry get value ( ) get length ( ) = = dt get length ( ) ) { / / matching field , compare the data - types if ( dt ! = meta data type get most specific data type ( first entry get value ( ) , dt ) ) { return ; } } else if ( first entry get key ( ) long value ( ) < = offset & & offset + dt get length ( ) < first entry get key ( ) long value ( ) + first entry get value ( ) get length ( ) ) { / / completely contained within preexisting entry if ( ! ( first entry get value ( ) instanceof undefined ) ) { / / don ' t override preexisting entry with a smaller one return ; } / / unless the preexising entry is undefined } else if ( dt instanceof undefined ) { / / the new field either fully or partially contains preexisting fields return ; } offset to data type map sub map ( first entry get key ( ) , offset + dt get length ( ) ) clear ( ) ; / / clear overlapping entries } offset to data type map put ( long value of ( offset ) , dt ) ; }


sets the name for the tool for this test integration

public builder set name ( string name ) { this name = name ; return this ; }


copies one resource directory tree into another ; skipping some files , replacing the contents of some , and passing everything else through unmodified

private static void filtered copy ( file source , path destination , set < file > skip , map < file , string > replace ) throws i o exception { file destination file = destination to file ( ) ; if ( source is directory ( ) ) { file [ ] children = source list files ( ) ; if ( children ! = null ) { if ( ! destination file exists ( ) ) { boolean success = destination file mkdirs ( ) ; if ( ! success ) { throw new i o exception ( " could not create " + destination ) ; } } for ( file child : children ) { filtered copy ( child , destination resolve ( child get name ( ) ) , skip , replace ) ; } } } else if ( ! skip contains ( source ) & & source is file ( ) ) { string contents = replace get ( source ) ; if ( contents ! = null ) { files write ( contents , destination file , utf 8 ) ; } else { files copy ( source , destination file ) ; } } }


removes the entry at the specified index , given the hash of its key

void remove entry key hash known ( int entry , int key hash ) { remove entry ( entry , key hash , hashing smeared hash ( values [ entry ] ) ) ; }


public boolean is contrast mode ( ) { return is contrast mode ; }


returns the number of nanoseconds since this source ' s epoch


returns whether any of the variants in the master playlist have the specified playlist url

private boolean is variant url ( uri playlist url ) { list < variant > variants = master playlist variants ; for ( int i = 0 ; i < variants size ( ) ; i + + ) { if ( playlist url equals ( variants get ( i ) url ) ) { return true ; } } return false ; }


private void delete iterated records ( int record cnt , int test col ix , long key increment , int var data size ) throws i o exception { d b record [ ] recs = null ; if ( key increment = = 0 ) { recs = create random table records ( d b test utils all types , record cnt , var data size ) ; } else { recs = create ordered table records ( d b test utils all types , record cnt , key increment , var data size ) ; } table table = dbh get table ( table 1 name ) ; arrays sort ( recs , new rec column comparator ( test col ix ) ) ; / / forward - delete all records long tx id = dbh start transaction ( ) ; record iterator iter = table index iterator ( test col ix ) ; int rec ix = 0 ; while ( iter has next ( ) ) { assert equals ( recs [ rec ix + + ] , iter next ( ) ) ; assert true ( iter delete ( ) ) ; } assert equals ( rec ix , recs length ) ; dbh delete table ( table 1 name ) ; dbh end transaction ( tx id , true ) ; if ( key increment = = 0 ) { recs = create random table records ( d b test utils all types , record cnt , var data size ) ; } else { recs = create ordered table records ( d b test utils all types , record cnt , key increment , var data size ) ; } table = dbh get table ( table 1 name ) ; arrays sort ( recs , new rec column comparator ( test col ix ) ) ; / / reverse - delete all records tx id = dbh start transaction ( ) ; rec ix = recs length - 1 ; iter = table index iterator ( test col ix , recs [ 0 ] get field ( test col ix ) , recs [ rec ix ] get field ( test col ix ) , false ) ; while ( iter has previous ( ) ) { assert equals ( recs [ rec ix - - ] , iter previous ( ) ) ; assert true ( iter delete ( ) ) ; } assert equals ( rec ix , - 1 ) ; dbh delete table ( table 1 name ) ; dbh end transaction ( tx id , true ) ; }


sets an id for this operator the specified id is used to assign the same operator id across job submissions ( for example when starting a job from a savepoint ) important : this id needs to be unique per transformation and job otherwise , job submission will fail

public cassandra sink < in > uid ( string uid ) { if ( use data stream sink ) { get sink transformation ( ) set uid ( uid ) ; } else { get transformation ( ) set uid ( uid ) ; } return this ; }


returns whether the source has zero bytes the default implementation first checks { @ link # size if known } , returning true if it ' s known to be zero and false if it ' s known to be non - zero if the size is not known , it falls back to opening a stream and checking for eof note that , in cases where { @ code size if known } returns zero , it is possible that bytes are actually available for reading ( for example , some special files may return a size of 0 despite actually having content when read ) this means that a source may return { @ code true } from { @ code is empty ( ) } despite having readable content

public boolean is empty ( ) throws i o exception { optional < long > size if known = size if known ( ) ; if ( size if known is present ( ) ) { return size if known get ( ) = = 0l ; } closer closer = closer create ( ) ; try { input stream in = closer register ( open stream ( ) ) ; return in read ( ) = = - 1 ; } catch ( throwable e ) { throw closer rethrow ( e ) ; } finally { closer close ( ) ; } }


service locator should not trigger metadata lookups when requested entity i d does not match pattern for service in question this test first verifies that , in the case of one service entry that does not match the requested entity i d , no metadata lookups are performed it then verifies that , in the case of two service entries , one matching the requested entity i d , exactly one metadata lookup is performed

public void verify entity i d filter ( ) { try ( val mock facade = mock static ( saml registered service service provider metadata facade class ) ) { val service 1 = get saml registered service for ( false , false , false , " urn : abc : def + " ) ; service 1 set evaluation order ( 9 ) ; services manager save ( service 1 ) ; mock facade when ( ( ) - > saml registered service service provider metadata facade get ( any ( ) , any ( ) , any string ( ) ) ) then call real method ( ) ; val entity i d = " https : / / sp testshib org / shibboleth - sp " ; val service = web application service factory create service ( entity i d ) ; service set attributes ( map of ( saml protocol constants parameter saml request , list of ( " saml request " ) ) ) ; val res 1 = services manager find service by ( service ) ; assert null ( res 1 ) ; mock facade verify ( never ( ) , ( ) - > saml registered service service provider metadata facade get ( any ( ) , eq ( service 1 ) , any string ( ) ) ) ; val service 2 = get saml registered service for ( false , false , false , " + " ) ; service 2 set evaluation order ( 10 ) ; services manager save ( service 2 ) ; val res 2 = services manager find service by ( service ) ; assert not null ( res 2 ) ; mock facade verify ( ( ) - > saml registered service service provider metadata facade get ( any ( ) , eq ( service 2 ) , eq ( entity i d ) ) ) ; } }


public void test dog all of ( ) { / / todo : test dog all of }


public metric name name ( ) { return this name ; }


simple ' debug ' logging of stats warning : the caller is responsible for synchronization

private void log stats ( ) { if ( f log is loggable ( f log verbose ) ) { f log v ( tag , " used = ( % d , % d ) ; free = ( % d , % d ) " , m used m count , m used m num bytes , m free m count , m free m num bytes ) ; } }


base class definition for whether the ip should be checked or not ; overridable

protected boolean ip pattern can be checked ( final string remote ip ) { return this ips to check pattern ! = null & & string utils is not blank ( remote ip ) ; }


converts { @ code value } to a json document unlike gson ' s similar { @ link gson # to json ( object ) to json } method , this write is strict create a { @ link json writer # set lenient ( boolean ) lenient } { @ code json writer } and call { @ link # write ( com google gson stream json writer , object ) } for lenient writing

public final string to json ( t value ) { string writer string writer = new string writer ( ) ; try { to json ( string writer , value ) ; } catch ( i o exception e ) { throw new assertion error ( e ) ; / / no i / o writing to a string writer } return string writer to string ( ) ; }


keys which the output stream must support

public list < string > output stream statistic keys ( ) { return arrays as list ( stream write bytes , stream write exceptions ) ; }


find all currently running { @ code kafka streams } instances ( potentially remotely ) that use the same { @ link streams config # application id config application id } as this instance ( i e , all instances that belong to the same kafka streams application ) and return { @ link streams metadata } for each discovered instance note : this is a point in time view and it may change due to partition reassignment

public collection < streams metadata > all metadata ( ) { validate is running or rebalancing ( ) ; return streams metadata state get all metadata ( ) ; }


the exception to be used when a failure is triggered

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


returns true if this iterator is currently at a parent path as opposed to the initial path given to the constructor

public boolean at parent path ( ) { return level > 0 ; }


generates a javadoc block for generated methods that delegate to other methods the generated block looks something like this : < code > { @ literal

code block generate see method javadoc ( type name name of class containing method , string method simple name , list < ? extends variable element > method parameters ) { return generate see method javadoc internal ( name of class containing method , method simple name , lists transform ( method parameters , new function < variable element , object > ( ) { @ override public object apply ( variable element input ) { return get javadoc safe name ( input ) ; } } ) ) ; }


return a new context that has the provided document as the current document

public final parse context switch doc ( final document document ) { return new filter parse context ( this ) { @ override public document doc ( ) { return document ; } } ; }


test that blocks which are in the wrong location are ignored

public void test ignore misplaced block ( ) throws exception { configuration conf = new configuration ( ) ; / / set a really long scan period conf set long ( dfs datanode scan period hours key , 100l ) ; conf set ( internal volume scanner scan result handler , test scan result handler class get name ( ) ) ; conf set long ( internal dfs block scanner cursor save interval ms , 0l ) ; final test context ctx = new test context ( conf , 1 ) ; final int num files = 4 ; ctx create files ( 0 , num files , 5 ) ; materialized replica unreachable replica = ctx get materialized replica ( 0 , 1 ) ; extended block unreachable block = ctx get file block ( 0 , 1 ) ; unreachable replica make unreachable ( ) ; final test scan result handler info info = test scan result handler get info ( ctx volumes get ( 0 ) ) ; string storage i d = ctx volumes get ( 0 ) get storage i d ( ) ; synchronized ( info ) { info sem = new semaphore ( num files ) ; info should run = true ; info notify ( ) ; } / / scan the first 4 blocks log info ( " waiting for the blocks to be scanned " ) ; generic test utils wait for ( new supplier < boolean > ( ) { @ override public boolean get ( ) { synchronized ( info ) { if ( info blocks scanned > = num files - 1 ) { log info ( " info = { } block scanned has now reached " + info blocks scanned , info ) ; return true ; } else { log info ( " info = { } waiting for block scanned to reach " + ( num files - 1 ) , info ) ; return false ; } } } } , 50 , 30000 ) ; / / we should have scanned 4 blocks synchronized ( info ) { assert false ( info good blocks contains ( unreachable block ) ) ; assert false ( info bad blocks contains ( unreachable block ) ) ; assert equals ( " expected 3 good blocks " , 3 , info good blocks size ( ) ) ; info good blocks clear ( ) ; assert equals ( " expected 3 blocks scanned " , 3 , info blocks scanned ) ; assert equals ( " did not expect bad blocks " , 0 , info bad blocks size ( ) ) ; info blocks scanned = 0 ; } info sem release ( 1 ) ; ctx close ( ) ; }


returns the closure over the input files of a set of artifacts

public set < artifact > artifact closure of ( nested set < artifact > artifacts ) { return artifact closure of ( artifacts to list ( ) ) ; }


public file download file from response ( response response ) throws api exception { try { file file = prepare download file ( response ) ; buffered sink sink = okio buffer ( okio sink ( file ) ) ; sink write all ( response body ( ) source ( ) ) ; sink close ( ) ; return file ; } catch ( i o exception e ) { throw new api exception ( e ) ; } }


atomically try adding a new inner disposable to this observer or return false if this observer was terminated

boolean add ( inner disposable < t > producer ) { / / the state can change so we do a cas loop to achieve atomicity for ( ; ; ) { / / get the current producer array inner disposable [ ] c = observers get ( ) ; / / if this subscriber - to - source reached a terminal state by receiving / / an on error or on complete , just refuse to add the new producer if ( c = = terminated ) { return false ; } / / we perform a copy - on - write logic int len = c length ; inner disposable [ ] u = new inner disposable [ len + 1 ] ; system arraycopy ( c , 0 , u , 0 , len ) ; u [ len ] = producer ; / / try setting the observers array if ( observers compare and set ( c , u ) ) { return true ; } / / if failed , some other operation succeeded ( another add , remove or termination ) / / so retry } }


gets client channel max idle time seconds

public int get channel max write idle seconds ( ) { return max write idle seconds ; }


public list result entry schema with name ( string name ) { this name = name ; return this ; }


returns the appropriate { @ code move } rop for the given type the result is a shared instance

public static rop op move ( type bearer type ) { switch ( type get basic frame type ( ) ) { case type bt int : return move int ; case type bt long : return move long ; case type bt float : return move float ; case type bt double : return move double ; case type bt object : return move object ; case type bt addr : return move return address ; } return throw bad type ( type ) ; }


convenience method for reading a token from a data input stream

public void read token storage stream ( data input stream in ) throws i o exception { byte [ ] magic = new byte [ token storage magic length ] ; in read fully ( magic ) ; if ( ! arrays equals ( magic , token storage magic ) ) { throw new i o exception ( " bad header found in token storage " ) ; } serialized format format ; try { format = serialized format value of ( in read byte ( ) ) ; } catch ( illegal argument exception e ) { throw new i o exception ( e ) ; } switch ( format ) { case writable : read fields ( in ) ; break ; case protobuf : read proto ( in ) ; break ; default : throw new i o exception ( " unsupported format " + format ) ; } }


public acl entry scope get scope ( ) { return scope ; }


tests that an explicit request makes block until refresh return it doesn ' t check that block until refresh doesn ' t return until the explicit refresh if the interval is - 1 because we don ' t have that kind of control over refresh it can happen all on its own

public void test no refresh interval ( ) throws interrupted exception , execution exception { client ( ) admin ( ) indices ( ) prepare update settings ( " test " ) set settings ( singleton map ( " index refresh interval " , - 1 ) ) get ( ) ; action future < index response > index = client ( ) prepare index ( " test " ) set id ( " 1 " ) set source ( " foo " , " bar " ) set refresh policy ( refresh policy wait until ) execute ( ) ; while ( false = = index is done ( ) ) { client ( ) admin ( ) indices ( ) prepare refresh ( " test " ) get ( ) ; } assert equals ( rest status created , index get ( ) status ( ) ) ; assert false ( " request shouldn ' t have forced a refresh " , index get ( ) forced refresh ( ) ) ; assert search hits ( client ( ) prepare search ( " test " ) set query ( match query ( " foo " , " bar " ) ) get ( ) , " 1 " ) ; }


protected internal resolution result do resolve ( boolean force txt ) { internal resolution result result = new internal resolution result ( ) ; try { result addresses = resolve addresses ( ) ; } catch ( exception e ) { if ( ! force txt ) { result error = status unavailable with description ( " unable to resolve host " + host ) with cause ( e ) ; return result ; } } if ( enable txt ) { result config = resolve service config ( ) ; } return result ; }


set whether to preserve the filename as sent by the client , not stripping off path information in { @ link commons multipart file # get original filename ( ) } default is " false " , stripping off path information that may prefix the actual filename e g from opera switch this to " true " for preserving the client - specified filename as - is , including potential path separators

public void set preserve filename ( boolean preserve filename ) { this preserve filename = preserve filename ; }


register the given list of transaction synchronizations with the existing transaction invoked when the control of the spring transaction manager and thus all spring transaction synchronizations end , without the transaction being completed yet this is for example the case when participating in an existing jta or ejb cmt transaction the default implementation simply invokes the { @ code after completion } methods immediately , passing in " status unknown " this is the best we can do if there ' s no chance to determine the actual outcome of the outer transaction

protected void register after completion with existing transaction ( object transaction , list < transaction synchronization > synchronizations ) throws transaction exception { logger debug ( " cannot register spring after - completion synchronization with existing transaction - " + " processing spring after - completion callbacks immediately , with outcome status ' unknown ' " ) ; invoke after completion ( synchronizations , transaction synchronization status unknown ) ; }


publish a fake metric under the " hadoop : " domain and ensure it is logged by the metrics logger

public void test metrics log output ( ) throws i o exception , interrupted exception , timeout exception { test fake metric metrics provider = new test fake metric ( ) ; m beans register ( this get class ( ) get simple name ( ) , " dummy metrics " , metrics provider ) ; start d n for test ( true ) ; assert not null ( dn ) ; final pattern matching appender appender = new pattern matching appender ( " ^ * fake metric * $ " ) ; add appender ( data node metrics log , appender ) ; / / ensure that the supplied pattern was matched generic test utils wait for ( new supplier < boolean > ( ) { @ override public boolean get ( ) { return appender is matched ( ) ; } } , 1000 , 60000 ) ; dn shutdown ( ) ; }


get the last committed offsets for the given partitions ( whether the commit happened by this process or another ) the returned offsets will be used as the position for the consumer in the event of a failure if any of the partitions requested do not exist , an exception would be thrown this call will block to do a remote call to get the latest committed offsets from the server

public map < topic partition , offset and metadata > committed ( final set < topic partition > partitions , final duration timeout ) { acquire and ensure open ( ) ; try { maybe throw invalid group id exception ( ) ; map < topic partition , offset and metadata > offsets = coordinator fetch committed offsets ( partitions , time timer ( timeout ) ) ; if ( offsets = = null ) { throw new timeout exception ( " timeout of " + timeout to millis ( ) + " ms expired before the last " + " committed offset for partitions " + partitions + " could be determined try tuning default api timeout ms " + " larger to relax the threshold " ) ; } else { offsets for each ( this : : update last seen epoch if newer ) ; return offsets ; } } finally { release ( ) ; } }


public class < ? > get column class ( int column index ) { if ( column index = = read | | column index = = write | | column index = = execute | | column index = = volatile | | column index = = overlay | | column index = = init ) { return boolean class ; } return string class ; }


customize the response for http message not readable exception this method delegates to { @ link # handle exception internal }

protected response entity < object > handle http message not readable ( http message not readable exception ex , http headers headers , http status status , web request request ) { return handle exception internal ( ex , null , headers , status , request ) ; }


public void stop writing ( ) { done = true ; }


retrieves the { @ link identity link } s associated with the given process definition such an { @ link identity link } informs how a certain identity ( eg group or user ) is authorized for a certain process definition

list < identity link > get identity links for process definition ( string process definition id ) ;


the { @ link snapshot commit supplier } mappings for this plugin when an index is created the store type setting { @ link org elasticsearch index index module # index store type setting } on the index will determine whether the snapshot commit supplier should be overridden and , if so , which override to use

default map < string , snapshot commit supplier > get snapshot commit suppliers ( ) { return collections empty map ( ) ; }


public static boolean get boolean ( string property name , string env name , boolean default value ) { check env name ( env name ) ; boolean property value = boolean util to boolean object ( system get property ( property name ) , null ) ; if ( property value ! = null ) { return property value ; } else { property value = boolean util to boolean object ( system getenv ( env name ) , null ) ; return property value ! = null ? property value : default value ; } }


find all applicable application contexts for the current application called if no specific application context has been set for this live beans view

protected set < configurable application context > find application contexts ( ) { synchronized ( application contexts ) { return new linked hash set < > ( application contexts ) ; } }


get the file entries in classpath as an array of path

public path [ ] get file class paths ( ) { return distributed cache get file class paths ( conf ) ; }


creates common rule documentation attribute such as deps or data these attribute docs have no definition class or html documentation ( it ' s in the be header )

static rule documentation attribute create ( string attribute name , string common type , string html documentation ) { rule documentation attribute doc attribute = new rule documentation attribute ( null , attribute name , html documentation , 0 , " " , immutable set < string > of ( ) , common type ) ; return doc attribute ; }


inflates bytes copied and returns true or false this allows us to stop copying if we have reached close enough

private boolean is close enough ( disk balancer work item item ) { long temp = item get bytes copied ( ) + ( ( item get bytes copied ( ) * get block tolerance percentage ( item ) ) / 100 ) ; return ( item get bytes to copy ( ) > = temp ) ? false : true ; }


returns an array containing all the key objects

public t [ ] get keys ( t [ ] key array ) { return indexer get keys ( key array ) ; }


visit a parse tree produced by the { @ code null literal } labeled alternative in { @ link sql base parser # constant }

t visit null literal ( sql base parser null literal context ctx ) ;


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


find out whether it ' s a health check metric

default boolean is health checker metrics ( string name ) { preconditions check argument ( ! strings is null or empty ( name ) , " require non - null or empty metric name " ) ; return name starts with ( health metric prefix ) ; }


get all default formats supported by fresco does not include { @ link image format # unknown }

public static list < image format > get default formats ( ) { if ( s all default formats = = null ) { list < image format > m default formats = new array list < > ( 9 ) ; m default formats add ( jpeg ) ; m default formats add ( png ) ; m default formats add ( gif ) ; m default formats add ( bmp ) ; m default formats add ( ico ) ; m default formats add ( webp simple ) ; m default formats add ( webp lossless ) ; m default formats add ( webp extended ) ; m default formats add ( webp extended with alpha ) ; m default formats add ( webp animated ) ; m default formats add ( heif ) ; s all default formats = immutable list copy of ( m default formats ) ; } return s all default formats ; }


checks if the given filedirectory can be read on posix , this corresponds to the ' r ' permission of the filedirectory itself

public boolean read ( file f ) throws security exception { return false ; }


notify the component tree that it needs to asynchronously perform a state update

public void update state async ( state update state update , string attribution ) { check if no state updates method ( ) ; if ( m component tree = = null ) { return ; } m component tree update state async ( get global key ( ) , state update , attribution , is create layout in progress ( ) ) ; }


filtering of flag and positional arguments with flags only

public void flags only ( ) throws exception { command lines command lines = command lines builder ( ) add command line ( command line of ( immutable list of ( " - - a " , " 1 " , " - - b = c " , " 2 " ) ) , param file info builder ( parameter file type unquoted ) set use always ( true ) set flags only ( true ) build ( ) ) build ( ) ; expanded command lines expanded = command lines expand ( artifact expander , exec path , new command line limits ( 4 ) , 0 ) ; assert that ( command lines all arguments ( ) ) contains exactly ( " - - a " , " 1 " , " - - b = c " , " 2 " ) ; assert that ( expanded arguments ( ) ) contains exactly ( " 1 " , " 2 " , " @ output txt - 0 params " ) ; assert that ( expanded get param files ( ) ) has size ( 1 ) ; assert that ( expanded get param files ( ) get ( 0 ) arguments ) contains exactly ( " - - a " , " - - b = c " ) ; }


public int get flags ( ) { return flags ; }


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

public basic model with final attribute on unbind ( on model unbound listener < basic model with final attribute , object > listener ) { on mutation ( ) ; this on model unbound listener epoxy generated model = listener ; return this ; }


sets the zoo keeper root node to use for this service for instance , a root node of { @ code mycompanymyservice } would be the parent of all leader offers for this service obviously all processes that wish to contend for leader status need to use the same root node note : we assume this node already exists

public void set root node name ( string root node name ) { this root node name = root node name ; }


if the values are not null or empty , efficiently adds a flag with them to the command line the values will be joined in execution and separated by commas

public busy box action builder maybe add vectored flag ( @ compile time constant string arg , @ nullable list < string > values ) { if ( values ! = null & & ! values is empty ( ) ) { add vectored flag ( arg , values ) ; } return this ; }


is login form username input disabled boolean

public boolean is login form username input disabled ( final web engine context vars ) { val context = request context holder get request context ( ) ; return context = = null | | ! web utils is cas login form viewable ( context ) | | web utils is graphical user authentication enabled ( context ) | | web utils get passwordless authentication account ( context , serializable class ) ! = null ; }


splits the given string on the given delimiter it supports quoting parts of the string with either single ( ' ) or double quotes ( " ) quotes can be escaped by doubling the quotes examples : ' a ; b ' ; c = > [ a ; b ] , [ c ] " ab ' d " ; b ; c = > [ ab ' d ] , [ b ] , [ c ] " ab ' " " d ; b " ; c = > [ ab ' \ " d ; b ] , [ c ] for more examples check the tests

static list < string > split escaped ( string string , char delimiter ) { list < token > tokens = tokenize ( check not null ( string ) , delimiter ) ; return process tokens ( tokens ) ; }


calls { @ link # cone ( float , float , float , float , float , int ) } by estimating the number of segments needed for a smooth circular base

public void cone ( float x , float y , float z , float radius , float height ) { cone ( x , y , z , radius , height , math max ( 1 , ( int ) ( 4 * ( float ) math sqrt ( radius ) ) ) ) ; }


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


converts a constant string binding to the required type

private < t > binding impl < t > convert constant string binding ( key < t > key , errors errors ) throws errors exception { / / find a constant string binding key < string > string key = key of type ( string class ) ; binding impl < string > string binding = state get explicit binding ( string key ) ; if ( string binding = = null | | ! string binding is constant ( ) ) { return null ; } string string value = string binding get provider ( ) get ( ) ; object source = string binding get source ( ) ; / / find a matching type converter type literal < t > type = key get type literal ( ) ; matcher and converter matching converter = state get converter ( string value , type , errors , source ) ; if ( matching converter = = null ) { / / no converter can handle the given type return null ; } / / try to convert the string a failed conversion results in an error try { @ suppress warnings ( " unchecked " ) / / this cast is safe because we double check below t converted = ( t ) matching converter get type converter ( ) convert ( string value , type ) ; if ( converted = = null ) { throw errors converter returned null ( string value , source , type , matching converter ) to exception ( ) ; } if ( ! type get raw type ( ) is instance ( converted ) ) { throw errors conversion type error ( string value , source , type , matching converter , converted ) to exception ( ) ; } return new converted constant binding impl < > ( this , key , converted , string binding ) ; } catch ( errors exception e ) { throw e ; } catch ( runtime exception e ) { throw errors conversion error ( string value , source , type , matching converter , e ) to exception ( ) ; } }


public void set null bit ( final int index ) { null bitmap [ get byte position ( index ) ] | = 1 < < get bit position ( index ) ; }


public void test gzip ( ) throws i o exception , interrupted exception { configuration conf = new configuration ( default conf ) ; compression codec gzip = new gzip codec ( ) ; reflection utils set conf ( gzip , conf ) ; local fs delete ( work dir , true ) ; write file ( local fs , new path ( work dir , " part 1 txt gz " ) , gzip , " line - 1 \ tthe quick \ nline - 2 \ tbrown \ nline - 3 \ t " + " fox jumped \ nline - 4 \ tover \ nline - 5 \ t the lazy \ nline - 6 \ t dog \ n " ) ; write file ( local fs , new path ( work dir , " part 2 txt gz " ) , gzip , " line - 1 \ tthis is a test \ nline - 1 \ tof gzip \ n " ) ; job job = job get instance ( conf ) ; file input format set input paths ( job , work dir ) ; key value text input format format = new key value text input format ( ) ; list < input split > splits = format get splits ( job ) ; assert equals ( " compressed splits = = 2 " , 2 , splits size ( ) ) ; file split tmp = ( file split ) splits get ( 0 ) ; if ( tmp get path ( ) get name ( ) equals ( " part 2 txt gz " ) ) { splits set ( 0 , splits get ( 1 ) ) ; splits set ( 1 , tmp ) ; } list < text > results = read split ( format , splits get ( 0 ) , job ) ; assert equals ( " splits [ 0 ] length " , 6 , results size ( ) ) ; assert equals ( " splits [ 0 ] [ 0 ] " , " the quick " , results get ( 0 ) to string ( ) ) ; assert equals ( " splits [ 0 ] [ 1 ] " , " brown " , results get ( 1 ) to string ( ) ) ; assert equals ( " splits [ 0 ] [ 2 ] " , " fox jumped " , results get ( 2 ) to string ( ) ) ; assert equals ( " splits [ 0 ] [ 3 ] " , " over " , results get ( 3 ) to string ( ) ) ; assert equals ( " splits [ 0 ] [ 4 ] " , " the lazy " , results get ( 4 ) to string ( ) ) ; assert equals ( " splits [ 0 ] [ 5 ] " , " dog " , results get ( 5 ) to string ( ) ) ; results = read split ( format , splits get ( 1 ) , job ) ; assert equals ( " splits [ 1 ] length " , 2 , results size ( ) ) ; assert equals ( " splits [ 1 ] [ 0 ] " , " this is a test " , results get ( 0 ) to string ( ) ) ; assert equals ( " splits [ 1 ] [ 1 ] " , " of gzip " , results get ( 1 ) to string ( ) ) ; }


create a new { @ link compressor } for use by this { @ link compression codec }

public compressor create compressor ( ) { int buffer size = conf get int ( common configuration keys io compression codec snappy buffersize key , common configuration keys io compression codec snappy buffersize default ) ; return new snappy compressor ( buffer size ) ; }


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

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


reads a bit of the mapping matrix accounting for boundary wrapping

private boolean read module ( int row , int column , int num rows , int num columns ) { / / adjust the row and column indices based on boundary wrapping if ( row < 0 ) { row + = num rows ; column + = 4 - ( ( num rows + 4 ) & 0x 0 7 ) ; } if ( column < 0 ) { column + = num columns ; row + = 4 - ( ( num columns + 4 ) & 0x 0 7 ) ; } read mapping matrix set ( column , row ) ; return mapping bit matrix get ( column , row ) ; }


test : 1 hash arrays are the same size 2 hash arrays contain the same elements 3 elements are not in the same order 4 elements contain the same values note : entry 1 and entry 2 in this test contain the same values this test is meant to verify that ordering does not matter in checking equality of the arrays , so the contents of the hash entry elements is kept the same to remove that as a variable expected result : equal

public void test equality 5 ( ) { hash entry [ ] hash entries 1 = new hash entry [ ] { entry 1 , entry 2 } ; hash entry [ ] hash entries 2 = new hash entry [ ] { entry 2 , entry 1 } ; vec 1 set hash entries ( hash entries 1 ) ; vec 2 set hash entries ( hash entries 2 ) ; assert assert true ( " failed to equate vectors with identical elements in different order " , vec 1 equals ( vec 2 ) ) ; }


sets the c + + runtime library inputs for the action

public cpp link action builder set runtime inputs ( artifact category runtime type , artifact middleman , nested set < artifact > inputs ) { this toolchain libraries type = runtime type ; this runtime middleman = middleman ; this toolchain libraries inputs = inputs ; return this ; }


one request followed by one response response has cache control headers set such that a caching http proxy ( such as gfe ) can satisfy subsequent requests

public void cacheable unary call ( io grpc testing integration messages simple request request , io grpc stub stream observer < io grpc testing integration messages simple response > response observer ) { io grpc stub server calls async unimplemented unary call ( get cacheable unary call method ( ) , response observer ) ; }


api to store value against a key in the calling thread scope

public void put ( object key , object value ) { store put ( key , value ) ; }


makes a user choice as indicated by option this is equivalent to the user clicking a mouse on a radio button indicating which program version to choose it can also be used to press the cancel button on the merge

protected void choose equate ( final string addr , final int op index , final int option , final boolean use for all ) throws exception { choose option ( " equate " , addr , option , use for all ) ; }


checks that the ip converts to the big integer and the big integer converts to the ip

private static void check big integer conversion ( string ip , big integer big integer ip ) { inet address address = inet addresses for string ( ip ) ; boolean is ipv 6 = address instanceof inet 6 address ; assert equals ( big integer ip , inet addresses to big integer ( address ) ) ; assert equals ( address , is ipv 6 ? inet addresses from i pv 6 big integer ( big integer ip ) : inet addresses from i pv 4 big integer ( big integer ip ) ) ; }


public int get num processors ( ) { return get conf ( ) get int ( num processors , - 1 ) ; }


builds a map : label - > list of files from the given labels

private static immutable map < label , immutable collection < artifact > > make label map ( iterable < transitive info collection > known labels ) { immutable map builder < label , immutable collection < artifact > > builder = immutable map builder ( ) ; for ( transitive info collection current : known labels ) { builder put ( alias provider get dependency label ( current ) , current get provider ( file provider class ) get files to build ( ) to list ( ) ) ; } return builder build ( ) ; }


replaces the long pushing instruction at the given offset by a simpler push instruction , if possible

private void replace long push instruction ( clazz clazz , int offset , instruction instruction ) { replace long push instruction ( clazz , offset , instruction , partial evaluator get variables before ( offset ) size ( ) ) ; }


generates a tree with topology selected uniformly at random from the topologies of binary trees of the specified size

optional < binary node > create tree ( int size , random rng ) { int [ ] keys = new int [ size ] ; for ( int i = 0 ; i < size ; i + + ) { keys [ i ] = rng next int ( ) ; } return create treap ( ints as list ( keys ) ) ; }


public < t > t execute ( function < response , t > handler ) { return handler apply ( rest assured given ( ) spec ( req spec build ( ) ) expect ( ) spec ( resp spec build ( ) ) when ( ) request ( req method , req uri ) ) ; }


abstract template method for unmarshalling from a given dom { @ code node }

protected abstract object unmarshal dom node ( node node ) throws xml mapping exception ;


return whether the rom is made by lenovo

public static boolean is lenovo ( ) { return rom lenovo [ 0 ] equals ( get rom info ( ) name ) ; }


set the configuration and extract the configuration parameters of interest

public void set conf ( configuration conf ) { super set conf ( conf ) ; if ( conf ! = null ) { dependency script name = conf get ( dependency script filename key ) ; } else { dependency script name = null ; } }


public int get listing count ( ) { return listing count ; }


this method will possibly be removed from this class when we determine how to only use it in m d array reference it is used to set the array string

public void set array string ( string array string ) { this array string = objects require non null ( array string ) ; }


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

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


returns a multimap containing the mappings in { @ code unfiltered } whose keys satisfy a predicate the returned multimap is a live view of { @ code unfiltered } ; changes to one affect the other the resulting multimap ' s views have iterators that don ' t support { @ code remove ( ) } , but all other methods are supported by the multimap and its views when adding a key that doesn ' t satisfy the predicate , the multimap ' s { @ code put ( ) } , { @ code put all ( ) } , and { @ code replace values ( ) } methods throw an { @ link illegal argument exception } when methods such as { @ code remove all ( ) } and { @ code clear ( ) } are called on the filtered multimap or its views , only mappings whose keys satisfy the filter will be removed from the underlying multimap the returned multimap isn ' t threadsafe or serializable , even if { @ code unfiltered } is many of the filtered multimap ' s methods , such as { @ code size ( ) } , iterate across every keyvalue mapping in the underlying multimap and determine which satisfy the filter when a live view is not needed , it may be faster to copy the filtered multimap and use the copy < b > warning : < b > { @ code key predicate } must be consistent with equals , as documented at { @ link predicate # apply } do not provide a predicate such as { @ code predicates instance of ( array list class ) } , which is inconsistent with equals

public static < k , v > set multimap < k , v > filter keys ( set multimap < k , v > unfiltered , final predicate < ? super k > key predicate ) { if ( unfiltered instanceof filtered key set multimap ) { filtered key set multimap < k , v > prev = ( filtered key set multimap < k , v > ) unfiltered ; return new filtered key set multimap < > ( prev unfiltered ( ) , predicates < k > and ( prev key predicate , key predicate ) ) ; } else if ( unfiltered instanceof filtered set multimap ) { filtered set multimap < k , v > prev = ( filtered set multimap < k , v > ) unfiltered ; return filter filtered ( prev , maps < k > key predicate on entries ( key predicate ) ) ; } else { return new filtered key set multimap < > ( unfiltered , key predicate ) ; } }


public column stats copy ( ) { if ( max value ! = null | | min value ! = null ) { return new column stats ( this ndv , this null count , this avg len , this max len , this max value , this min value ) ; } else { return new column stats ( this ndv , this null count , this avg len , this max len , this max , this min ) ; } }


open the test file with the read buffer specified in the setting { @ link # key read buffer size } ; use the { @ code normal } policy

f s data input stream open test file ( ) throws i o exception { return open test file ( s 3 a input policy normal , 0 ) ; }


clear bookmark marker at specified address

public void clear ( address addr ) { marker set clear ( addr ) ; }


return a { @ link sorted binary doc values } that doesn ' t contain any value

public static sorted binary doc values empty sorted binary ( ) { return singleton ( doc values empty binary ( ) ) ; }


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


success is a static factory method builds successful result

public static result success ( sample family sf ) { return new result ( true , false , null , sf ) ; }


returns the bin directory for this build configuration todo ( kchodorow ) : this ( and the other get directory functions ) won ' t work with external repositories without changes to how artifact factory resolves derived roots this is not an issue right now because it only effects blaze ' s include scanning ( internal ) and bazel ' s repositories ( external ) but will need to be fixed

public artifact root get bin directory ( repository name repository name ) { return output directories get bin directory ( repository name ) ; }


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


sets the extras buffer on the message { @ link byte buf # release ( ) } ownership of { @ code extras } is transferred to this { @ link binary memcache message }

binary memcache message set extras ( byte buf extras ) ;


creates an empty { @ code concurrent linked queue }

public static < e > concurrent linked queue < e > new concurrent linked queue ( ) { return new concurrent linked queue < e > ( ) ; }


gets a legitimate address for the specified program as indicated by the string

public static address evaluate ( program p , string s ) { return evaluate ( p , null , s ) ; }


returns the directory that the nodes are stored in

private file get nodes dir ( ) throws i o exception { final file nodes dir = new file ( jenkins get root dir ( ) , " nodes " ) ; if ( ! nodes dir is directory ( ) & & ! nodes dir mkdirs ( ) ) { throw new i o exception ( string format ( " could not mkdirs % s " , nodes dir ) ) ; } return nodes dir ; }


creating a pseudo local file is nothing but validating the file path actual data of the file is generated on the fly when client tries to open the file for reading

public f s data output stream create ( path path ) throws i o exception { try { validate file name format ( path ) ; } catch ( file not found exception e ) { throw new i o exception ( " file creation failed for " + path ) ; } return null ; }


public cpp link action builder add linkopts ( collection < string > linkopts ) { this linkopts add all ( linkopts ) ; return this ; }


allows the scheduler instance to start threads and accept tasks on them implementations should make sure the call is idempotent , thread - safe and should not throw any { @ code runtime exception } if it doesn ' t support this functionality


protected string get final response event id ( final web application service service , final response response , final request context request context ) { val event id = response get response type ( ) name ( ) to lower case ( ) ; logger debug ( " signaling flow to redirect to service [ { } ] via event [ { } ] " , service , event id ) ; return event id ; }


adjust gnu read - only segments following relocations ( pt gnu relro )

private void process g n u read only ( task monitor monitor ) { / / set read - only segments if ( elf e shentsize ( ) ! = 0 ) { return ; } monitor set message ( " processing gnu definitions " ) ; for ( elf program header ro segment : elf get program headers ( elf program header constants pt gnu relro ) ) { elf program header loaded segment = elf get program load header containing ( ro segment get virtual address ( ) ) ; if ( loaded segment ! = null ) { for ( address range block range : get resolved load addresses ( loaded segment ) ) { memory block block = memory get block ( block range get min address ( ) ) ; if ( block ! = null ) { log ( " setting block " + block get name ( ) + " to read - only based upon pt gnu relro data " ) ; block set write ( false ) ; } } } } }


public void after properties set ( ) throws beans exception { if ( this locales to initialize ! = null ) { for ( locale locale : this locales to initialize ) { init factory ( locale ) ; } } }


build the { @ code r socket strategies } instance


the hash of the path p inside the filesystem

public static int get har hash ( path p ) { return ( p to string ( ) hash code ( ) & 0x 7fffffff ) ; }


looks for the first boundary in the given buffer if found , changes state to { @ link headers state } , and passes on the remainder of the buffer

public void on next ( data buffer buf ) { int end idx = this first boundary match ( buf ) ; if ( end idx ! = - 1 ) { if ( logger is trace enabled ( ) ) { logger trace ( " first boundary found @ " + end idx + " in " + buf ) ; } data buffer headers buf = multipart utils slice from ( buf , end idx ) ; data buffer utils release ( buf ) ; change state ( this , new headers state ( ) , headers buf ) ; } else { data buffer utils release ( buf ) ; request buffer ( ) ; } }


gets encryption key registered service property

protected registered service properties get encryption key registered service property ( ) { return registered service properties token as service ticket encryption key ; }


randomly selects digital signature algorithm uri for given private key algorithm ( { @ link private key # get algorithm ( ) } )

protected string get signature algorithm u r i ( private key key ) { string algo uri = null ; switch ( key get algorithm ( ) ) { case " rsa " : algo uri = random from ( " http : / / www w 3 org / 2001 / 04 / xmldsig - more # rsa - sha 2 5 6 " , " http : / / www w 3 org / 2001 / 04 / xmldsig - more # rsa - sha 5 1 2 " ) ; break ; case " dsa " : algo uri = " http : / / www w 3 org / 2009 / xmldsig 1 1 # dsa - sha 2 5 6 " ; break ; case " ec " : algo uri = random from ( " http : / / www w 3 org / 2001 / 04 / xmldsig - more # ecdsa - sha 2 5 6 " , " http : / / www w 3 org / 2001 / 04 / xmldsig - more # ecdsa - sha 5 1 2 " ) ; break ; default : throw new illegal argument exception ( " unsupported algorithm : " + key get algorithm ( ) + " for signature , allowed values for private key algorithm are [ rsa , dsa , ec ] " ) ; } return algo uri ; }


return the total number of buffer indexes which have been allocated

int get index count ( ) { return next index ; }


tests that a put operation fails if the queue is full

public void test put on full ( ) throws exception { final stream element queue < integer > queue = create stream element queue ( 1 ) ; / / fill up queue result future < integer > result future = put successfully ( queue , new stream record < > ( 42 , 0l ) ) ; assert equals ( 1 , queue size ( ) ) ; / / cannot add more put unsuccessfully ( queue , new stream record < > ( 43 , 1l ) ) ; / / popping the completed element frees the queue again result future complete ( collections singleton ( 42 * 42 ) ) ; assert equals ( arrays as list ( new stream record < integer > ( 42 * 42 , 0l ) ) , pop completed ( queue ) ) ; / / now the put operation should complete put successfully ( queue , new stream record < > ( 43 , 1l ) ) ; }


builder < t > cookie ( cookie cookie ) ;


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