retrieve the default value of the { @ code value } attribute of a single - element annotation , given an annotation instance

public static object get default value ( annotation annotation ) { return get default value ( annotation , value ) ; }


get the configuration properties of the job

public job properties get job properties ( ) { return job properties ; }


tries to get a read only adapter for the database whose handle is passed to this method

static function definition d b adapter find read only adapter ( d b handle handle ) throws version exception { try { return new function definition d b adapter v 0 ( handle ) ; } catch ( version exception e ) { if ( ! e is upgradable ( ) ) { throw e ; } } return new function definition d b adapter no table ( handle ) ; }


rx version of { @ link abstract dao # save in tx ( object [ ] ) } returning an observable note that the observable will emit the given entities back to its subscribers

public observable < object [ ] > save in tx ( final t entities ) { return wrap ( new callable < object [ ] > ( ) { @ override public object [ ] call ( ) throws exception { dao save in tx ( entities ) ; return entities ; } } ) ; }


verify if the weather passes in the order of the { @ link weather type } s

public void test time passes ( ) { final var observer = mock ( weather observer class ) ; final var weather = new weather ( ) ; weather add observer ( observer ) ; final var in order = in order ( observer ) ; final var weather types = weather type values ( ) ; for ( var i = 1 ; i < 20 ; i + + ) { weather time passes ( ) ; in order verify ( observer ) update ( weather types [ i % weather types length ] ) ; } verify no more interactions ( observer ) ; }


marks the given visitor accepter as possibly being used

protected void mark as possibly used ( visitor accepter visitor accepter ) { visitor accepter set visitor info ( possibly used ) ; }


set the given object as target will create a singleton target source for the object

public void set target ( object target ) { set target source ( new singleton target source ( target ) ) ; }


sets the horizontal position of the status label

public void set status justification ( int justification ) { status label set horizontal alignment ( justification ) ; }


returns a { @ link flink resource } instance if the instance could not be instantiated ( for example , because a mandatory parameter was missing ) , then an exception should be thrown

flink resource create ( flink resource setup setup ) throws exception ;


unlike { @ link # clazz } , return the parameter type ' t ' , which determines the { @ link descriptor extension list } that this goes to in those situations where subtypes cannot provide the type parameter , this method can be overridden to provide it

public class < t > get t ( ) { type sub typing = types get base class ( get class ( ) , descriptor class ) ; if ( ! ( sub typing instanceof parameterized type ) ) { throw new illegal state exception ( get class ( ) + " doesn ' t extend descriptor with a type parameter " ) ; } return types erasure ( types get type argument ( sub typing , 0 ) ) ; }


checks and removes translog files that no longer need to be retained see { @ link org elasticsearch index translog translog deletion policy } for details

public void trim translog ( ) { verify not closed ( ) ; final engine engine = get engine ( ) ; engine trim unreferenced translog files ( ) ; }


only report metrics which match the given filter

public builder filter ( metric filter filter ) { this filter = filter ; return this ; }


convert this changelog stream to a { @ link k stream } note that this is a logical operation and only changes the " interpretation " of the stream , i e , each record of this changelog stream is no longer treated as an updated record ( cf { @ link k stream } vs { @ code k table } )

k stream < k , v > to stream ( final named named ) ;


computes a new { @ link cache file } instance using the specified cache file information ( file length , file name , parent directory and already available cache ranges ) and associates it with the specified { @ link cache key } in the cache if the key is already associated with a { @ link cache file } , the previous instance is replaced by a new one this method can only be used before the { @ link cache service } is started

void put ( final cache key cache key , final long file length , final path cache dir , final string cache file uuid , final sorted set < tuple < long , long > > cache file ranges ) throws exception { ensure lifecycle initializing ( ) ; final path path = cache dir resolve ( cache file uuid ) ; if ( files exists ( path ) = = false ) { throw new file not found exception ( " cache file [ " + path + " ] not found " ) ; } final set once < cache file > cache file = new set once < > ( ) ; cache file set ( new cache file ( cache key , file length , path , cache file ranges , ( ) - > on cache file update ( cache file get ( ) ) ) ) ; cache put ( cache key , cache file get ( ) ) ; }


two - arg method with the first param nullable

public void nullable normal ( @ nullable decl string first , integer second ) { react to null parameters ( first , second ) ; }


releases all of the partition ' s segments ( pages and overflow buckets )

public void clear all memory ( list < memory segment > target ) { / / return the overflow segments if ( this overflow segments ! = null ) { for ( int k = 0 ; k < this num overflow segments ; k + + ) { target add ( this overflow segments [ k ] ) ; } } / / return the partition buffers target add all ( this partition pages ) ; this partition pages clear ( ) ; }


creates an { @ code authentication result } that indicates that the realm attempted to handle the authentication request but was unsuccessful the reason for the failure is given in the supplied message and optional exception the { @ link # get status ( ) status } is set to { @ link status # continue } the { @ link # get user ( ) user } is not populated

public static authentication result unsuccessful ( string message , @ nullable exception cause ) { objects require non null ( message ) ; return new authentication result ( status continue , null , message , cause , null ) ; }


the tap square will no longer be used for the current touch

public void invalidate tap square ( ) { touch down x = - 1 ; touch down y = - 1 ; }


remove configuration for a given connector

public void remove connector config ( string connector ) { log debug ( " removing connector configuration for connector ' { } ' " , connector ) ; try { config log send ( connector key ( connector ) , null ) ; config log send ( target state key ( connector ) , null ) ; config log read to end ( ) get ( read to end timeout ms , time unit milliseconds ) ; } catch ( interrupted exception | execution exception | timeout exception e ) { log error ( " failed to remove connector configuration from kafka : " , e ) ; throw new connect exception ( " error removing connector configuration from kafka " , e ) ; } }


set whether to allow circular references between beans - and automatically try to resolve them note that circular reference resolution means that one of the involved beans will receive a reference to another bean that is not fully initialized yet this can lead to subtle and not - so - subtle side effects on initialization ; it does work fine for many scenarios , though default is " true " turn this off to throw an exception when encountering a circular reference , disallowing them completely < b > note : < b > it is generally recommended to not rely on circular references between your beans refactor your application logic to have the two beans involved delegate to a third bean that encapsulates their common logic

public void set allow circular references ( boolean allow circular references ) { this allow circular references = allow circular references ; }


in case of grouped bars , this method returns the space an individual group of bar needs on the x - axis

public float get group width ( float group space , float bar space ) { return m data sets size ( ) * ( m bar width + bar space ) + group space ; }


close resources associated with the remote execution client


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


return the file extensions to use for suffix pattern matching if { @ code registered suffix pattern match = true } , the extensions are obtained from the configured { @ code content negotiation manager }

public list < string > get file extensions ( ) { if ( use registered suffix pattern match ( ) & & this content negotiation manager ! = null ) { return this content negotiation manager get all file extensions ( ) ; } return null ; }


public item update build ( ) { built = true ; return new item update ( qid , added statements , deleted statements , labels , labels if new , descriptions , descriptions if new , aliases ) ; }


returns the master help set ( the one into which all other help sets are merged )

public g help set get master help set ( ) { return main h s ; }


sends the http request note that http url connection requires that an empty buffer be sent in order to set the " content - length : 0 " header , which is required by our endpoint

public void send request ( byte [ ] buffer , int offset , int length ) throws i o exception { this connection set do output ( true ) ; this connection set fixed length streaming mode ( length ) ; if ( buffer = = null ) { / / an empty buffer is sent to set the " content - length : 0 " header , which / / is required by our endpoint buffer = new byte [ ] { } ; offset = 0 ; length = 0 ; } / / send the request body long start time = 0 ; if ( this is trace enabled ) { start time = system nano time ( ) ; } try ( output stream output stream = this connection get output stream ( ) ) { / / update bytes sent before they are sent so we may observe / / attempted sends as well as successful sends via the / / accompanying status code this bytes sent = length ; output stream write ( buffer , offset , length ) ; } finally { if ( this is trace enabled ) { this send request time ms = elapsed time ms ( start time ) ; } } }


creates { @ link variable resolver } backed by { @ link # get build variables ( ) }

public final variable resolver < string > get build variable resolver ( ) { return new variable resolver by map < > ( get build variables ( ) ) ; }


returns the jvm ' s current version as a { @ link string } see https : openjdk java netjeps 2 2 3 for the expected format until java 8 included , the expected format should be starting with { @ code 1 x } starting with java 9 , cf jep - 223 linked above , the version got simplified in 9 x , 10 x , etc

public static string get current runtime java version ( ) { / / todo : leverage runtime version ( ) once on java 9 + return system get property ( " java specification version " ) ; }


order by the id of the models ( needs to be followed by { @ link # asc ( ) } or { @ link # desc ( ) } )


return the configured list of supported locales

public list < locale > get supported locales ( ) { return this supported locales ; }


resets the renderer , releasing any resources that it currently holds


basically same as { @ link # find first ( class ) } but pending to a new thread for executing

public static < t > find executor < t > find first async ( class < t > model class ) { return operator find first async ( model class ) ; }


returns an unmodifiable view of the specified { @ code list multimap } query operations on the returned multimap " read through " to the specified multimap , and attempts to modify the returned multimap , either directly or through the multimap ' s views , result in an { @ code unsupported operation exception } the returned multimap will be serializable if the specified multimap is serializable

public static < k , v > list multimap < k , v > unmodifiable list multimap ( list multimap < k , v > delegate ) { if ( delegate instanceof unmodifiable list multimap | | delegate instanceof immutable list multimap ) { return delegate ; } return new unmodifiable list multimap < > ( delegate ) ; }


sets the coordinator for the two views within this code comparison panel it coordinates their scrolling and location synchronization

public void set field panel coordinator ( t field panel coordinator ) { if ( this field panel coordinator ! = null ) { this field panel coordinator dispose ( ) ; } this field panel coordinator = field panel coordinator ; }


test for hadoop - 16138 : hadoop fs mkdir of nonexistent abfs container raises npe the command should return with 1 exit status , but there should be no npe

public void test mkdir root non existent container ( ) throws exception { final configuration raw conf = get raw configuration ( ) ; final string account = raw conf get ( fs azure abfs account name , null ) ; raw conf set boolean ( azure create remote filesystem during initialization , false ) ; string non existent container = " nonexistent - " + uuid random u u i d ( ) ; fs shell fs shell = new fs shell ( raw conf ) ; int result = fs shell run ( new string [ ] { " - mkdir " , abfs scheme + " : / / " + non existent container + " @ " + account + " / " } ) ; assert equals ( 1 , result ) ; }


public list < failed node exception > failures ( ) { return failures ; }


returns any action that is bound to the given keystroke for the tool associated with this docking window manager instance

action get action for key stroke ( key stroke key stroke ) { docking tool actions tool actions = tool get tool actions ( ) ; if ( tool actions instanceof tool actions ) { / / using a cast here ; it didn ' t make sense to include this ' get action ' on the / / docking tool actions return ( ( tool actions ) tool actions ) get action ( key stroke ) ; } return null ; }


public void send stop ( ) { stdin print stream println ( " stop " ) ; }


public just symbol enum get just symbol ( ) { return just symbol ; }


return the configured { @ link # set max frame payload length ( int ) max frame payload length }

public int get max frame payload length ( ) { return get websocket client spec ( ) max frame payload length ( ) ; }


returns a new instance of { @ code class name } that is a shadowed built - in core type ( e g { @ code javatime month day } ) of the current desugar - mirrored core type , assuming { @ code this } instance is a desugar - mirrored core type

public final class name mirrored to shadowed ( ) { immutable bi map < string , string > verbatim type mappings = shadowed to mirrored type prefix mappings inverse ( ) ; return verbatim type mappings key set ( ) stream ( ) filter ( this : : has package prefix ) map ( prefix - > replace package prefix ( prefix , verbatim type mappings get ( prefix ) ) ) find any ( ) or else ( this ) ; }


default : null an array of { @ link configuration } objects that will overlay the global mini d f s cluster configuration for the corresponding data node useful for setting specific per - data node configuration parameters

public builder data node conf overlays ( configuration [ ] dn conf overlays ) { this dn conf overlays = dn conf overlays ; return this ; }


protected address get x ref location ( object obj ) { if ( obj = = null | | ! ( obj instanceof code unit ) ) { return null ; } return ( ( code unit ) obj ) get min address ( ) ; }


returns true if the { @ link tree file artifact } s are only stored remotely

public boolean is entirely remote ( ) { return entirely remote ; }


get petfind by tags : finds pets by tags multiple tags can be provided with comma separated strings use tag 1 , tag 2 , tag 3 for testing

default response entity < set < pet > > find pets by tags ( set < string > tags ) { get request ( ) if present ( request - > { for ( media type media type : media type parse media types ( request get header ( " accept " ) ) ) { if ( media type is compatible with ( media type value of ( " application / json " ) ) ) { string example string = " { \ " photo urls \ " : [ \ " photo urls \ " , \ " photo urls \ " ] , \ " name \ " : \ " doggie \ " , \ " id \ " : 0 , \ " category \ " : { \ " name \ " : \ " default - name \ " , \ " id \ " : 6 } , \ " tags \ " : [ { \ " name \ " : \ " name \ " , \ " id \ " : 1 } , { \ " name \ " : \ " name \ " , \ " id \ " : 1 } ] , \ " status \ " : \ " available \ " } " ; api util set example response ( request , " application / json " , example string ) ; break ; } if ( media type is compatible with ( media type value of ( " application / xml " ) ) ) { string example string = " < pet > < id > 123456789 < / id > < name > doggie < / name > < photo urls > < photo urls > aeiou < / photo urls > < / photo urls > < tags > < / tags > < status > aeiou < / status > < / pet > " ; api util set example response ( request , " application / xml " , example string ) ; break ; } } } ) ; return new response entity < > ( http status not implemented ) ; }


public void test keyed process function side output ( ) throws exception { final output tag < string > side output tag = new output tag < string > ( " side " ) { } ; test list result sink < string > side output result sink = new test list result sink < > ( ) ; test list result sink < integer > result sink = new test list result sink < > ( ) ; stream execution environment see = stream execution environment get execution environment ( ) ; see set parallelism ( 3 ) ; data stream < integer > data stream = see from collection ( elements ) ; single output stream operator < integer > pass throught stream = data stream key by ( new key selector < integer , integer > ( ) { private static final long serial version u i d = 1l ; @ override public integer get key ( integer value ) throws exception { return value ; } } ) process ( new process function < integer , integer > ( ) { private static final long serial version u i d = 1l ; @ override public void process element ( integer value , context ctx , collector < integer > out ) throws exception { out collect ( value ) ; ctx output ( side output tag , " sideout - " + string value of ( value ) ) ; } } ) ; pass throught stream get side output ( side output tag ) add sink ( side output result sink ) ; pass throught stream add sink ( result sink ) ; see execute ( ) ; assert equals ( arrays as list ( " sideout - 1 " , " sideout - 2 " , " sideout - 3 " , " sideout - 4 " , " sideout - 5 " ) , side output result sink get sorted result ( ) ) ; assert equals ( arrays as list ( 1 , 2 , 3 , 4 , 5 ) , result sink get sorted result ( ) ) ; }


boolean can convert ( class < t > target type ) ;


returns true if field corresponding to field i d is set ( has been assigned a value ) and false otherwise

public boolean is set ( fields field ) { if ( field = = null ) { throw new illegal argument exception ( ) ; } switch ( field ) { case success : return is set success ( ) ; } throw new illegal state exception ( ) ; }


protected void set selected path now ( tree path path ) { tree selection model tree selection model = tree get selection model ( ) ; tree selection model set selection path ( path ) ; }


format memory usage string for reporting

private string format usage string ( long current vmem usage , long vmem limit , long current pmem usage , long pmem limit ) { return string format ( " % s b of % s b physical memory used ; " + " % s b of % s b virtual memory used " , traditional binary prefix long 2 string ( current pmem usage , " " , 1 ) , traditional binary prefix long 2 string ( pmem limit , " " , 1 ) , traditional binary prefix long 2 string ( current vmem usage , " " , 1 ) , traditional binary prefix long 2 string ( vmem limit , " " , 1 ) ) ; }


removes the specified symbol from the symbol table if removing any < b > non - function < b > symbol the behavior will be the same as invoking { @ link symbol # delete ( ) } on the symbol use of this method for non - function symbols is discouraged < b > warning ! < b > if removing a function symbol the behavior differs from directly invoking { @ link symbol # delete ( ) } on the function symbol when removing a function symbol this method has the following behavior : if the function is a default symbol ( e g , fun 12345678 ) this method has no affect and will return null otherwise if another label exists at the function entry point , that label will be removed and the function will be renamed with that labels name if no other labels exist at the function entry , the function will be renamed to the default function name any reference bound to a symbol removed will loose that symbol specific binding

public boolean remove symbol special ( symbol sym ) ; / /


this won ' t compile if superextends isn ' t done correctly on generics

public void covariance of zip ( ) { observable < horror movie > horrors = observable just ( new horror movie ( ) ) ; observable < cool rating > ratings = observable just ( new cool rating ( ) ) ; observable < movie , cool rating , result > zip ( horrors , ratings , combine ) blocking for each ( action ) ; observable < movie , cool rating , result > zip ( horrors , ratings , combine ) blocking for each ( action ) ; observable < media , rating , extended result > zip ( horrors , ratings , combine ) blocking for each ( extended action ) ; observable < media , rating , result > zip ( horrors , ratings , combine ) blocking for each ( action ) ; observable < media , rating , extended result > zip ( horrors , ratings , combine ) blocking for each ( action ) ; observable < movie , cool rating , result > zip ( horrors , ratings , combine ) ; }


spr - 6038 : detect hsql and stop illegal locks being taken todo : against quartz 2 2 , this test ' s job doesn ' t actually execute anymore

public void scheduler with hsql data source ( ) throws exception { dummy job param = 0 ; dummy job count = 0 ; try ( class path xml application context ctx = context ( " database persistence xml " ) ) { jdbc template jdbc template = new jdbc template ( ctx get bean ( data source class ) ) ; assert that ( jdbc template query for list ( " select * from qrtz triggers " ) is empty ( ) ) as ( " no triggers were persisted " ) is false ( ) ; / * thread sleep ( 3000 ) ; assert true ( " dummy job should have been executed at least once " , dummy job count > 0 ) ; * / } }


sets the source from which the attributes of this method will be copied

void set method attributes source ( final int method info offset , final int method info length ) { / / don ' t copy the attributes yet , instead store their location in the source class reader so / / they can be copied later , in { @ link # put method info } note that we skip the 6 header bytes / / of the method info jvms structure this source offset = method info offset + 6 ; this source length = method info length - 6 ; }


validate zk path with the path itself included in the exception text

public static string validate z k path ( string path ) throws invalid pathname exception { try { path utils validate path ( path ) ; } catch ( illegal argument exception e ) { throw new invalid pathname exception ( path , " invalid path \ " " + path + " \ " : " + e , e ) ; } return path ; }


create a socket address with the given host and port the hostname might be replaced with another host that was set via { @ link # add static resolution ( string , string ) } the value of hadoop security token service use ip will determine whether the standard java host resolver is used , or if the fully qualified resolver is used

public static inet socket address create socket addr for host ( string host , int port ) { string static host = get static resolution ( host ) ; string resolve host = ( static host ! = null ) ? static host : host ; inet socket address addr ; try { inet address iaddr = security util get by name ( resolve host ) ; / / if there is a static entry for the host , make the returned / / address look like the original given host if ( static host ! = null ) { iaddr = inet address get by address ( host , iaddr get address ( ) ) ; } addr = new inet socket address ( iaddr , port ) ; } catch ( unknown host exception e ) { addr = inet socket address create unresolved ( host , port ) ; } return addr ; }


set the working directory to the given directory

public void set working directory ( path new dir ) { working dir = make absolute ( new dir ) ; check path ( working dir ) ; }


test replica placement policy in case of boundary topology rack 2 has only 1 node group & can ' t be placed with two replicas the 1st replica will be placed on writer the 2nd replica should be placed on a different rack the 3rd replica should be placed on the same rack with writer , but on a different node group

public void test choose targets on boundary topology ( ) throws exception { for ( int i = 0 ; i < data nodes length ; i + + ) { cluster remove ( data nodes [ i ] ) ; } for ( int i = 0 ; i < data nodes in boundary case length ; i + + ) { cluster add ( data nodes in boundary case [ i ] ) ; } for ( int i = 0 ; i < data nodes in boundary case length ; i + + ) { update heartbeat with usage ( data nodes in boundary case [ i ] , 2 * hdfs server constants min blocks for write * block size , 0l , 2 * hdfs server constants min blocks for write * block size , 0l , 0l , 0l , 0 , 0 ) ; } datanode storage info [ ] targets ; targets = choose target ( 0 , data nodes in boundary case [ 0 ] ) ; assert equals ( targets length , 0 ) ; targets = choose target ( 1 , data nodes in boundary case [ 0 ] ) ; assert equals ( targets length , 1 ) ; targets = choose target ( 2 , data nodes in boundary case [ 0 ] ) ; assert equals ( targets length , 2 ) ; assert false ( is on same rack ( targets [ 0 ] , targets [ 1 ] ) ) ; targets = choose target ( 3 , data nodes in boundary case [ 0 ] ) ; assert equals ( targets length , 3 ) ; assert true ( check targets on different node group ( targets ) ) ; }


public ascii string name ( ) { return name ; }


simultaneously construct an action graph for all the actions in skyframe and a map from { @ link path fragment } s to their respective { @ link artifact } s we do this in a threadpool to save around 1 5 seconds on a mid - sized build versus a single - threaded operation

private static pair < action graph , sorted map < path fragment , artifact > > construct action graph and path map ( action key context action key context , iterable < action lookup value > values , concurrent map < action analysis metadata , conflict exception > bad action map ) throws interrupted exception { mutable action graph action graph = new map based action graph ( action key context ) ; concurrent navigable map < path fragment , artifact > artifact path map = new concurrent skip list map < > ( actions comparator for prefix conflicts ( ) ) ; / / action graph construction is cpu - bound int num jobs = runtime get runtime ( ) available processors ( ) ; / / no great reason for expecting 5000 action lookup values , but not worth counting size of / / values sharder < action lookup value > action shards = new sharder < > ( num jobs , 5000 ) ; for ( action lookup value value : values ) { action shards add ( value ) ; } throwable recording runnable wrapper wrapper = new throwable recording runnable wrapper ( " artifact conflict finder # construct action graph and path map " ) ; executor service executor = executors new fixed thread pool ( num jobs , new thread factory builder ( ) set name format ( " action lookup value processor % d " ) build ( ) ) ; for ( list < action lookup value > shard : action shards ) { executor execute ( wrapper wrap ( action registration ( shard , action graph , artifact path map , bad action map ) ) ) ; } boolean interrupted = executor util interruptible shutdown ( executor ) ; throwables propagate if possible ( wrapper get first thrown error ( ) ) ; if ( interrupted ) { throw new interrupted exception ( ) ; } return pair of ( action graph , artifact path map ) ; }


gets all composite editor actions that are currently added to this action manager this includes the favorites and cycle groups actions

public composite editor table action [ ] get all actions ( ) { int num actions = get action count ( ) ; composite editor table action [ ] all actions = new composite editor table action [ num actions ] ; int index = 0 ; int length ; length = editor actions size ( ) ; for ( int i = 0 ; i < length ; i + + , index + + ) { all actions [ index ] = editor actions get ( i ) ; } length = favorites actions size ( ) ; for ( int i = 0 ; i < length ; i + + , index + + ) { all actions [ index ] = favorites actions get ( i ) ; } length = cycle group actions size ( ) ; for ( int i = 0 ; i < length ; i + + , index + + ) { all actions [ index ] = cycle group actions get ( i ) ; } return all actions ; }


setup the message listener to use throws an { @ link illegal argument exception } if that message listener type is not supported

void setup message listener ( object message listener ) ;


public void execute ( file system fs ) throws i o exception { fs modify acl entries ( path , acl entries ) ; return null ; }


byte argument less than or equal to the given value see examples in javadoc for { @ link additional matchers } class

public static byte leq ( byte value ) { report matcher ( new less or equal < byte > ( value ) ) ; return 0 ; }


the brokers which this partition currently resides on

public list < integer > replicas ( ) { return replicas ; }


this older version of this method is kept around for compatibility because downstream frameworks like spark and tez have been using it downstream frameworks are expected to move off of it

public static void add to environment ( map < string , string > environment , string variable , string value ) { add to environment ( environment , variable , value , file path separator ) ; }


ensures that the default header will pass ok http 3 ' s checks for header values

static string get sanitized user agent ( ) { string default user agent = system get property ( " http agent " ) ; if ( text utils is empty ( default user agent ) ) { return default user agent ; } int length = default user agent length ( ) ; string builder sb = new string builder ( default user agent length ( ) ) ; for ( int i = 0 ; i < length ; i + + ) { char c = default user agent char at ( i ) ; if ( ( c > ' \ u 0 0 1f ' | | c = = ' \ t ' ) & & c < ' \ u 0 0 7f ' ) { sb append ( c ) ; } else { sb append ( ' ? ' ) ; } } return sb to string ( ) ; }


private o auth registered service get registered service by client id ( final string client id ) { return o auth 2 0 utils get registered o auth service by client id ( get o auth configuration context ( ) get services manager ( ) , client id ) ; }


find purchase order by id for valid response try integer i ds with value & lt ; & # x 3 d ; 5 or & gt ; 10 other values will generated exceptions

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


lifted from e s test case : s don ' t reuse this anywhere ! create a copy of an original { @ link search source builder } object by running it through a { @ link bytes stream output } and reading it in again using a { @ link writeable reader } the stream that is wrapped around the { @ link stream input } potentially need to use a { @ link named writeable registry } , so this needs to be provided too

private static search source builder copy writeable ( search source builder original , named writeable registry named writeable registry , writeable reader < search source builder > reader ) throws i o exception { writeable writer < search source builder > writer = ( out , value ) - > value write to ( out ) ; try ( bytes stream output output = new bytes stream output ( ) ) { output set version ( version current ) ; writer write ( output , original ) ; try ( stream input in = new named writeable aware stream input ( output bytes ( ) stream input ( ) , named writeable registry ) ) { in set version ( version current ) ; return reader read ( in ) ; } } }


protected table records build table records ( table meta table meta , string select s q l , array list < list < object > > param appender list ) throws s q l exception { result set rs = null ; try ( prepared statement ps = statement proxy get connection ( ) prepare statement ( select s q l ) ) { if ( collection utils is not empty ( param appender list ) ) { for ( int i = 0 , ts = param appender list size ( ) ; i < ts ; i + + ) { list < object > param appender = param appender list get ( i ) ; for ( int j = 0 , ds = param appender size ( ) ; j < ds ; j + + ) { ps set object ( i * ds + j + 1 , param appender get ( j ) ) ; } } } rs = ps execute query ( ) ; return table records build records ( table meta , rs ) ; } finally { i o util close ( rs ) ; } }


delete user this can only be done by the logged in user

public void delete user ( @ path param ( " username " ) string username ) throws api exception , processing exception ;


performs a selection operation after an aggregate operation the field expressions cannot contain table functions and aggregations example : { @ code aggregate function agg func = new my aggregate function ( ) ; table env register function ( " agg func " , agg func ) ; table group by ( $ ( " key " ) ) aggregate ( call ( " agg func " , $ ( " a " ) , $ ( " b " ) ) as ( " f 0 " , " f 1 " , " f 2 " ) ) select ( $ ( " key " ) , $ ( " f 0 " ) , $ ( " f 1 " ) ) ; } scala example : { @ code val agg func = new my aggregate function table group by ( $ " key " ) aggregate ( agg func ( $ " a " , $ " b " ) as ( " f 0 " , " f 1 " , " f 2 " ) ) select ( $ " key " , $ " f 0 " , $ " f 1 " ) }


protected abstract string get type string ( ) ;


get the flag which indicates whether to keep containers across application attempts or not

public abstract boolean get keep containers across application attempts ( ) ;


indicates whether { @ code c } is one of the twenty - six lowercase ascii alphabetic characters between { @ code ' a ' } and { @ code ' z ' } inclusive all others ( including non - ascii characters ) return { @ code false }

public static boolean is lower case ( char c ) { / / note : this was benchmarked against the alternate expression " ( char ) ( c - ' a ' ) < 26 " ( nov ' 13 ) / / and found to perform at least as well , or better return ( c > = ' a ' ) & & ( c < = ' z ' ) ; }


returns the cookie path to use for the http cookie

protected string get cookie path ( ) { return cookie path ; }


return the name of the class we were trying to load

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


public int get count ( ) { return count ; }


convert the value to the required type ( if necessary from a string ) conversions from string to any type will typically use the { @ code set as text } method of the property editor class , or a spring converter in a conversion service

< t > t convert if necessary ( @ nullable object value , @ nullable class < t > required type , @ nullable field field ) throws type mismatch exception ;


returns the section header which fully contains the specified file offset range

public elf section header get section header containing file range ( long file offset , long file range length ) { long max offset = file offset + file range length - 1 ; for ( elf section header section : section headers ) { if ( section get type ( ) = = elf section header constants shn undef ) { continue ; } long size = section get size ( ) ; if ( size = = 0 ) { continue ; } long start = section get offset ( ) ; long end = start + size - 1 ; if ( file offset > = start & & max offset < = end ) { return section ; } } return null ; }


returns an array containing all offcut xref references to the specified code unit

public final static reference [ ] get offcut x references ( code unit cu , int max x refs ) { program prog = cu get program ( ) ; if ( prog = = null ) { return empty ref array ; } list < reference > offcut list = new array list < reference > ( ) ; / / lookup the offcut xrefs / / if ( cu get length ( ) > 1 ) { reference manager ref mgr = prog get reference manager ( ) ; address set set = new address set ( cu get min address ( ) add ( 1 ) , cu get max address ( ) ) ; address iterator iter = ref mgr get reference destination iterator ( set , true ) ; while ( iter has next ( ) ) { address addr = iter next ( ) ; reference iterator ref iter = ref mgr get references to ( addr ) ; while ( ref iter has next ( ) ) { reference ref = ref iter next ( ) ; offcut list add ( ref ) ; if ( max x refs > 0 & & offcut list size ( ) = = max x refs ) { break ; } } } } reference [ ] arr = new reference [ offcut list size ( ) ] ; offcut list to array ( arr ) ; arrays sort ( arr ) ; return arr ; }


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


returns a new array of class object [ ] containing the list elements

public object [ ] to array ( ) { return size ! = 0 ? arrays copy of ( elems , size , object [ ] class ) : empty array ; }


a checker on whether the give class is eligible as an inner class by its class internal name note : the reliable source of truth is to check the inner classes attribute however , the attribute may have not been visited yet

public static boolean is eligible as inner class ( string class name ) { return class name contains ( " $ " ) ; }


public int hash code ( ) { return s s l protocol socket factory class hash code ( ) ; }


signals the completion of the main sequence and switches to post - completion replay mode don ' t modify the queue after calling this method ! post - completion backpressure handles the case when a source produces values based on requests when it is active but more values are available even after its completion in this case , the on complete ( ) can ' t just emit the contents of the queue but has to coordinate with the requested amounts this requires two distinct modes : active and completed in active mode , requests flow through and the queue is not accessed but in completed mode , requests no - longer reach the upstream but help in draining the queue the algorithm utilizes the most significant bit ( bit 63 ) of a long value ( atomic long ) since request amount only goes up to { @ link long # max value } ( bits 0 - 62 ) and negative values aren ' t allowed

public static < t > void post complete ( subscriber < ? super t > actual , queue < t > queue , atomic long state , boolean supplier is cancelled ) { if ( queue is empty ( ) ) { actual on complete ( ) ; return ; } if ( post complete drain ( state get ( ) , actual , queue , state , is cancelled ) ) { return ; } for ( ; ; ) { long r = state get ( ) ; if ( ( r & completed mask ) ! = 0l ) { return ; } long u = r | completed mask ; / / ( active , r ) - > ( complete , r ) transition if ( state compare and set ( r , u ) ) { / / if the requested amount was non - zero , drain the queue if ( r ! = 0l ) { post complete drain ( u , actual , queue , state , is cancelled ) ; } return ; } } }


match the given request against specific expectations

void match ( client http request request ) throws i o exception , assertion error ;


read an array , returning a default if the index is out of bounds

protected static int check read ( byte [ ] arr , int idx , int def ) { / / when there ' s an offset , idx can be < 0 if ( idx > = arr length | | idx < 0 ) { return 0xff & def ; } return 0xff & arr [ idx ] ; }


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


static job id new job id ( ) { random rn = new random ( ) ; final int range = 900000 ; final int randomadd = 100000 ; int random num = rn next int ( range ) + randomadd ; return new job id ( random num ) ; }


public void forecast job ( job task job task , forecast params params , consumer < exception > handler ) { string job id = job task get job id ( ) ; logger debug ( " forecasting job { } " , job id ) ; autodetect communicator communicator = get open autodetect communicator ( job task ) ; if ( communicator = = null ) { string message = string format ( locale root , " cannot forecast because job [ % s ] does not have a corresponding autodetect process " , job id ) ; logger debug ( message ) ; handler accept ( exceptions helper conflict status exception ( message ) ) ; return ; } communicator forecast job ( params , ( a void , e ) - > { if ( e = = null ) { handler accept ( null ) ; } else { string msg = string format ( locale root , " [ % s ] exception while forecasting job " , job id ) ; logger error ( msg , e ) ; handler accept ( exceptions helper server error ( msg , e ) ) ; } } ) ; }


expect a header with the given name to match the specified values

public web test client response spec value equals ( string name , string value ) { this exchange result assert with diagnostics ( ( ) - > { string message = get message ( name ) ; assertion errors assert equals ( message , value , get cookie ( name ) get value ( ) ) ; } ) ; return this response spec ; }


adds a new scrutinizer to the inspector if any necessary dependency is missing , the scrutinizer will not be added

public void register ( edit scrutinizer scrutinizer ) { scrutinizer set store ( warning store ) ; scrutinizer set fetcher ( fetcher ) ; scrutinizer set manifest ( manifest ) ; if ( scrutinizer prepare dependencies ( ) ) { string key = scrutinizer get class ( ) get name ( ) ; scrutinizers put ( key , scrutinizer ) ; } else { logger info ( " scrutinizer [ " + scrutinizer get class ( ) get simple name ( ) + " ] is skipped " + " due to missing of necessary constraint configurations in the wikibase manifest " ) ; } }


get the request object of the underlying rpc protocol , e g http servlet request

public < t > t get request ( class < t > clazz ) { return ( request ! = null & & clazz is assignable from ( request get class ( ) ) ) ? ( t ) request : null ; }


shortcut for { @ code get descriptor ( ) get reactive type ( ) }

public class < ? > get reactive type ( ) { return get descriptor ( ) get reactive type ( ) ; }


creates a new builder that is pre - populated with the content of this container

public builder to builder ( ) { return new builder ( this ) ; }


the number of buckets with no records in it used to measure general data fitness andor configuration problems ( bucket span )

public long get empty bucket count ( ) { return empty bucket count ; }


protected void list ( string [ ] args ) throws exception { log info ( " running ' list ' command " ) ; final options command options = cli frontend parser get list command options ( ) ; final command line command line = get command line ( command options , args , false ) ; list options list options = new list options ( command line ) ; / / evaluate help flag if ( list options is print help ( ) ) { cli frontend parser print help for list ( custom command lines ) ; return ; } final boolean show running ; final boolean show scheduled ; final boolean show all ; / / print running and scheduled jobs if not option supplied if ( ! list options show running ( ) & & ! list options show scheduled ( ) & & ! list options show all ( ) ) { show running = true ; show scheduled = true ; show all = false ; } else { show running = list options show running ( ) ; show scheduled = list options show scheduled ( ) ; show all = list options show all ( ) ; } final custom command line active command line = validate and get active command line ( command line ) ; run cluster action ( active command line , command line , cluster client - > list jobs ( cluster client , show running , show scheduled , show all ) ) ; }


clips the specified screen aligned rectangle , specified relative to the transform matrix of the stage ' s batch the transform matrix and the stage ' s camera must not have rotational components calling this method must be followed by a call to { @ link # clip end ( ) } if true is returned

public boolean clip begin ( float x , float y , float width , float height ) { if ( width < = 0 | | height < = 0 ) return false ; stage stage = this stage ; if ( stage = = null ) return false ; rectangle table bounds = rectangle tmp ; table bounds x = x ; table bounds y = y ; table bounds width = width ; table bounds height = height ; rectangle scissor bounds = pools obtain ( rectangle class ) ; stage calculate scissors ( table bounds , scissor bounds ) ; if ( scissor stack push scissors ( scissor bounds ) ) return true ; pools free ( scissor bounds ) ; return false ; }


disassemble an instruction , presumably the result of assembly

protected pseudo instruction disassemble ( long addr , byte [ ] ins , byte [ ] ctx ) throws insufficient bytes exception , unknown instruction exception , address overflow exception , memory access exception { address at = lang get default space ( ) get address ( addr ) ; context set context register ( ctx ) ; mem buffer buf = new byte mem buffer impl ( at , ins , lang is big endian ( ) ) ; sleigh debug logger logger = new sleigh debug logger ( buf , context , lang , sleigh debug mode verbose ) ; instruction prototype ip = lang parse ( buf , context , false ) ; if ( verbose dis ) { dbg println ( " sleigh log : \ n " + logger to string ( ) ) ; } return new pseudo instruction ( at , ip , buf , context ) ; }


builds up the buffer with the provided data and resets the buffer - index after feed - completion this needs to run fast


sets the matrix to a look at matrix with a direction and an up vector multiply with a translation matrix to get a camera model view matrix

public matrix 4 set to look at ( vector 3 direction , vector 3 up ) { l vez set ( direction ) nor ( ) ; l vex set ( direction ) nor ( ) ; l vex crs ( up ) nor ( ) ; l vey set ( l vex ) crs ( l vez ) nor ( ) ; idt ( ) ; val [ m00 ] = l vex x ; val [ m01 ] = l vex y ; val [ m02 ] = l vex z ; val [ m10 ] = l vey x ; val [ m11 ] = l vey y ; val [ m12 ] = l vey z ; val [ m20 ] = - l vez x ; val [ m21 ] = - l vez y ; val [ m22 ] = - l vez z ; return this ; }


private void put version marker item to table ( ) { final item marker = create version marker ( version marker item name , version , system current time millis ( ) ) ; put item ( marker ) ; }


checks if the provided path string contains a windows drive letter

private boolean has windows drive ( string path , boolean slashed ) { final int start = slashed ? 1 : 0 ; return path length ( ) > = start + 2 & & ( ! slashed | | path char at ( 0 ) = = ' / ' ) & & path char at ( start + 1 ) = = ' : ' & & ( ( path char at ( start ) > = ' a ' & & path char at ( start ) < = ' z ' ) | | ( path char at ( start ) > = ' a ' & & path char at ( start ) < = ' z ' ) ) ; }


int divider right margin ( int position , recycler view parent ) ;


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

public test field prop callback prop view model on visibility changed ( on model visibility changed listener < test field prop callback prop view model , test field prop callback prop view > listener ) { on mutation ( ) ; this on model visibility changed listener epoxy generated model = listener ; return this ; }


render the tag contents based on the supplied { @ link body content } the default implementation simply { @ link # flush buffered body content flushes } the { @ link body content } directly to the output subclasses may choose to override this to add additional content to the output

protected void render from body content ( body content body content , tag writer tag writer ) throws jsp exception { flush buffered body content ( body content ) ; }


returns the appropriate { @ link record category } needed while processing the type program interface } ( vs item program interface )

protected record category get category ( ) { return record category type ; }


apply { @ link bean post processor bean post processors } to the given existing bean instance , invoking their { @ code post process after initialization } methods the returned bean instance may be a wrapper around the original

object apply bean post processors after initialization ( object existing bean , string bean name ) throws beans exception ;


sets whether media sources should be initialized lazily if false , all initial preparation steps ( e g , manifest loads ) happen immediately if true , these initial preparations are triggered only when the player starts buffering the media

public builder set use lazy preparation ( boolean use lazy preparation ) { assertions check state ( ! build called ) ; this use lazy preparation = use lazy preparation ; return this ; }


return a { @ code request predicate } that tests the request path against the given path pattern

public static request predicate path ( string pattern ) { assert not null ( pattern , " ' pattern ' must not be null " ) ; if ( ! pattern is empty ( ) & & ! pattern starts with ( " / " ) ) { pattern = " / " + pattern ; } return path predicates ( path pattern parser default instance ) apply ( pattern ) ; }


specifies the delegate maps going in each direction called by the constructor and by subclasses during deserialization

void set delegates ( map < k , v > forward , map < v , k > backward ) { check state ( delegate = = null ) ; check state ( inverse = = null ) ; check argument ( forward is empty ( ) ) ; check argument ( backward is empty ( ) ) ; check argument ( forward ! = backward ) ; delegate = forward ; inverse = make inverse ( backward ) ; }


returns the { @ link format support } from the combined { @ link capabilities }

static int get format support ( @ capabilities int support flags ) { return support flags & format support mask ; }


exposes a stream of namesystem events only events occurring after the stream is created are available see { @ link org apache hadoop hdfs d f s inotify event input stream } for information on stream usage see { @ link org apache hadoop hdfs inotify event } for information on the available events inotify users may want to tune the following hdfs parameters to ensure that enough extra hdfs edits are saved to support inotify clients that fall behind the current state of the namespace while reading events the default parameter values should generally be reasonable if edits are deleted before their corresponding events can be read , clients will see a { @ link org apache hadoop hdfs inotify missing events exception } on { @ link org apache hadoop hdfs d f s inotify event input stream } method calls it should generally be sufficient to tune these parameters : dfs namenode num extra edits retained dfs namenode max extra edits segments retained parameters that affect the number of created segments and the number of edits that are considered necessary , i e do not count towards the dfs namenode num extra edits retained quota ) : dfs namenode checkpoint period dfs namenode checkpoint txns dfs namenode num checkpoints retained dfs ha log - roll period it is recommended that local journaling be configured ( dfs namenode edits dir ) for inotify ( in addition to a shared journal ) so that edit transfers from the shared journal can be avoided

public d f s inotify event input stream get inotify event stream ( ) throws i o exception { return dfs get inotify event stream ( ) ; }


this test verifies the new support for compiling mathematical expressions with different operand types

public void compiling mathematical expressions with different operand types ( ) throws exception { number holder nh = new number holder ( ) ; expression = parser parse expression ( " ( t ( integer ) value of ( payload ) double value ( ) ) / 18d " ) ; object o = expression get value ( nh ) ; assert that ( o ) is equal to ( 2d ) ; system out println ( " performance check for sp e l expression : ' ( t ( integer ) value of ( payload ) double value ( ) ) / 18d ' " ) ; long stime = system current time millis ( ) ; for ( int i = 0 ; i < 1000000 ; i + + ) { o = expression get value ( nh ) ; } system out println ( " one million iterations : " + ( system current time millis ( ) - stime ) + " ms " ) ; stime = system current time millis ( ) ; for ( int i = 0 ; i < 1000000 ; i + + ) { o = expression get value ( nh ) ; } system out println ( " one million iterations : " + ( system current time millis ( ) - stime ) + " ms " ) ; stime = system current time millis ( ) ; for ( int i = 0 ; i < 1000000 ; i + + ) { o = expression get value ( nh ) ; } system out println ( " one million iterations : " + ( system current time millis ( ) - stime ) + " ms " ) ; compile ( expression ) ; system out println ( " now compiled : " ) ; o = expression get value ( nh ) ; assert that ( o ) is equal to ( 2d ) ; stime = system current time millis ( ) ; for ( int i = 0 ; i < 1000000 ; i + + ) { o = expression get value ( nh ) ; } system out println ( " one million iterations : " + ( system current time millis ( ) - stime ) + " ms " ) ; stime = system current time millis ( ) ; for ( int i = 0 ; i < 1000000 ; i + + ) { o = expression get value ( nh ) ; } system out println ( " one million iterations : " + ( system current time millis ( ) - stime ) + " ms " ) ; stime = system current time millis ( ) ; for ( int i = 0 ; i < 1000000 ; i + + ) { o = expression get value ( nh ) ; } system out println ( " one million iterations : " + ( system current time millis ( ) - stime ) + " ms " ) ; expression = parser parse expression ( " payload / 18d " ) ; o = expression get value ( nh ) ; assert that ( o ) is equal to ( 2d ) ; system out println ( " performance check for sp e l expression : ' payload / 18d ' " ) ; stime = system current time millis ( ) ; for ( int i = 0 ; i < 1000000 ; i + + ) { o = expression get value ( nh ) ; } system out println ( " one million iterations : " + ( system current time millis ( ) - stime ) + " ms " ) ; stime = system current time millis ( ) ; for ( int i = 0 ; i < 1000000 ; i + + ) { o = expression get value ( nh ) ; } system out println ( " one million iterations : " + ( system current time millis ( ) - stime ) + " ms " ) ; stime = system current time millis ( ) ; for ( int i = 0 ; i < 1000000 ; i + + ) { o = expression get value ( nh ) ; } system out println ( " one million iterations : " + ( system current time millis ( ) - stime ) + " ms " ) ; compile ( expression ) ; system out println ( " now compiled : " ) ; o = expression get value ( nh ) ; assert that ( o ) is equal to ( 2d ) ; stime = system current time millis ( ) ; for ( int i = 0 ; i < 1000000 ; i + + ) { o = expression get value ( nh ) ; } system out println ( " one million iterations : " + ( system current time millis ( ) - stime ) + " ms " ) ; stime = system current time millis ( ) ; for ( int i = 0 ; i < 1000000 ; i + + ) { o = expression get value ( nh ) ; } system out println ( " one million iterations : " + ( system current time millis ( ) - stime ) + " ms " ) ; stime = system current time millis ( ) ; for ( int i = 0 ; i < 1000000 ; i + + ) { o = expression get value ( nh ) ; } system out println ( " one million iterations : " + ( system current time millis ( ) - stime ) + " ms " ) ; }


public d w a r f abbreviation get abbreviation ( ) { return this abbreviation ; }


public static string to xml ( collection < ? > root , string root name , class clazz , string encoding ) { try { collection wrapper wrapper = new collection wrapper ( ) ; wrapper collection = root ; j a x b element < collection wrapper > wrapper element = new j a x b element < collection wrapper > ( new q name ( root name ) , collection wrapper class , wrapper ) ; string writer writer = new string writer ( ) ; create marshaller ( clazz , encoding ) marshal ( wrapper element , writer ) ; return writer to string ( ) ; } catch ( j a x b exception e ) { throw exception util unchecked ( e ) ; } }


if you create a singleton iterator and it is an i o statistics source , then that is the statistics which can be extracted from the iterator

public void test singleton stats ( ) throws throwable { i o stats instance singleton = new i o stats instance ( ) ; remote iterator < i o stats instance > it = remote iterator from singleton ( singleton ) ; extract statistics ( it ) ; }


an index into the library ' s table of contents

public int get table of contents index ( ) { return itoc ; }


returns the target kind of the given target , for example { @ code cc library rule }

public abstract string get target kind ( t target ) ;


called from a recycler binder when a component warmer instance associated with it can be used to prepare items because the recycler binder has been measured


set the name of the servlet context attribute which should be used to retrieve the { @ link web application context } that this servlet is supposed to use

public void set context attribute ( @ nullable string context attribute ) { this context attribute = context attribute ; }


convenience method to return list of nodes corresponding to resource name passed in the { @ link resource request }

public list < n > get nodes by resource name ( final string resource name ) { preconditions check argument ( resource name ! = null & & ! resource name is empty ( ) ) ; list < n > ret nodes = new array list < > ( ) ; if ( resource request any equals ( resource name ) ) { ret nodes add all ( get all nodes ( ) ) ; } else if ( node name to node map contains key ( resource name ) ) { ret nodes add ( node name to node map get ( resource name ) ) ; } else if ( nodes per rack contains key ( resource name ) ) { ret nodes add all ( nodes per rack get ( resource name ) ) ; } else { log info ( " could not find a node matching given resource name " + resource name ) ; } return ret nodes ; }


function to retrieve a list of all the reservations this method is reachable by using { @ link r m w s consts # reservation list }

response list reservation ( string queue , string reservation id , long start time , long end time , boolean include resource allocations , http servlet request hsr ) throws exception ;


called when action schedule finished executing all its actions


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


create a new { @ code k stream } that consists all records of this stream which do not satisfy the given predicate all records that do satisfy the predicate are dropped this is a stateless record - by - record operation

k stream < k , v > filter not ( final predicate < ? super k , ? super v > predicate , final named named ) ;


adds a zip to be added to the apk and an executable that filters the zip to extract the relevant contents first

public apk actions builder set java resource zip ( artifact java resource zip , files to run provider resource extractor ) { this java resource zip = java resource zip ; this resource extractor = resource extractor ; return this ; }


return whether the quick search option is on

boolean is program database search ( ) { return database search ; }


returns the { @ code bnd addr } field of this response


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

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


gets all of the open cdt projects in the workspace

public static collection < i project > get c d t projects ( ) { list < i project > cdt projects = new array list < > ( ) ; for ( i project project : resources plugin get workspace ( ) get root ( ) get projects ( ) ) { if ( project is open ( ) & & is cdt project ( project ) ) { cdt projects add ( project ) ; } } return cdt projects ; }


test the property ' map with undeclared properties anytype 3 '

public void map with undeclared properties anytype 3 test ( ) { / / todo : test map with undeclared properties anytype 3 }


set the interval , in milliseconds , at which the " system " relay session will , in the absence of any other data being sent , send a heartbeat to the stomp broker a value of zero will prevent heartbeats from being sent to the broker the default value is 10000

public stomp broker relay registration set system heartbeat send interval ( long system heartbeat send interval ) { this system heartbeat send interval = system heartbeat send interval ; return this ; }


returns true if this value can fit in 16 bits with sign - extension

public boolean fits in 1 6 bits ( ) { if ( ! fits in int ( ) ) { return false ; } int bits = get int bits ( ) ; return ( short ) bits = = bits ; }


creates a new listenable future - style stub that supports unary calls on the service

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


returns the table model object represented by this edit part

public e r d entity get entity ( ) { return ( e r d entity ) get model ( ) ; }


starts fading up to the specified layer layers up to the specified layer inclusive will fade in , other layers will fade out

public void fade up to layer ( int index ) { m transition state = transition starting ; arrays fill ( m is layer on , 0 , index + 1 , true ) ; arrays fill ( m is layer on , index + 1 , m layers length , false ) ; invalidate self ( ) ; }


converts this { @ link decimal data } into an instance of { @ link big decimal }

public big decimal to big decimal ( ) { big decimal bd = decimal val ; if ( bd = = null ) { decimal val = bd = big decimal value of ( long val , scale ) ; } return bd ; }


decodes the settings header and returns a { @ link http 2 settings } object

private http 2 settings decode settings header ( channel handler context ctx , char sequence settings header ) throws http 2 exception { byte buf header = byte buf util encode string ( ctx alloc ( ) , char buffer wrap ( settings header ) , charset util utf 8 ) ; try { / / decode the settings payload byte buf payload = base 6 4 decode ( header , url safe ) ; / / create an http / 2 frame for the settings byte buf frame = create settings frame ( ctx , payload ) ; / / decode the settings frame and return the settings object return decode settings ( ctx , frame ) ; } finally { header release ( ) ; } }


sets new search start point in the file inclusive in forward finds , exclusive in backward ones

public void set new start ( long start point ) { if ( start point < 0l | | start point > get content length ( ) ) return ; current position = start point ; buffer position = start point ; if ( ! direction forward ) { buffer position = start point - map size ; } if ( buffer position < 0l ) buffer position = 0l ; }


returns whether checkpoints should be persisted externally

public boolean is externalized checkpoints enabled ( ) { return externalized checkpoint cleanup ! = null ; }


to test enum parameters to test enum parameters

public void test enum parameters ( list < string > enum header string array , string enum header string , list < string > enum query string array , string enum query string , integer enum query integer , double enum query double , list < string > enum form string array , string enum form string , handler < async result < void > > result handler ) { test enum parameters ( enum header string array , enum header string , enum query string array , enum query string , enum query integer , enum query double , enum form string array , enum form string , null , result handler ) ; }


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


extract the body with the given { @ code body extractor }

< t > t body ( body extractor < t , ? super client http response > extractor ) ;


returns true if the object has a field of the given name , otherwise false

public boolean hasattr ( object obj , string name , starlark thread thread ) throws eval exception { return starlark hasattr ( thread get semantics ( ) , obj , name ) ; } @ starlark method ( name = " getattr " , doc = " returns the struct ' s field of the given name if it exists if not , it either returns " + " < code > default < / code > ( if specified ) or raises an error " + " < code > getattr ( x , \ " foobar \ " ) < / code > is equivalent to < code > x foobar < / code > " + " < pre class = \ " language - python \ " > getattr ( ctx attr , \ " myattr \ " ) \ n " + " getattr ( ctx attr , \ " myattr \ " , \ " mydefault \ " ) < / pre > " , parameters = { @ param ( name = " x " , doc = " the struct whose attribute is accessed " ) , @ param ( name = " name " , doc = " the name of the struct attribute " ) , @ param ( name = " default " , default value = " unbound " , doc = " the default value to return in case the struct " + " doesn ' t have an attribute of the given name " ) }


sets the analyzer ( s ) to use at any given field

public item per field analyzer ( map < string , string > per field analyzer ) { this per field analyzer = per field analyzer ; return this ; }


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


simulates to generate different peer addresses , e g [ 84 125 113 65 : 9801 ]

private string gen peer address ( ) { final thread local random r = thread local random current ( ) ; return string format ( " [ % d % d % d % d : 9801 ] " , r next int ( 1 , 256 ) , r next int ( 1 , 256 ) , r next int ( 1 , 256 ) , r next int ( 1 , 256 ) ) ; }


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


draws the actor the batch is configured to draw in the parent ' s coordinate system { @ link batch # draw ( com badlogic gdx graphics g 2d texture region , float , float , float , float , float , float , float , float , float ) this draw method } is convenient to draw a rotated and scaled texture region { @ link batch # begin ( ) } has already been called on the batch if { @ link batch # end ( ) } is called to draw without the batch then { @ link batch # begin ( ) } must be called before the method returns the default implementation does nothing

public void draw ( batch batch , float parent alpha ) { }


request to revert to the interpreter for expression evaluation any compiled form is discarded but can be recreated by later recompiling again

public static void revert to interpreted ( expression expression ) { if ( expression instanceof spel expression ) { ( ( spel expression ) expression ) revert to interpreted ( ) ; } }


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

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


public string get task status ( ) { return task status to string ( ) ; }


returns the addresses , which is an unmodifiable list

public list < equivalent address group > get addresses ( ) { return addrs ; }


sets the < code > float item < code > property

public type holder example float item ( float float item ) { this float item = float item ; return this ; }


lists all available schemas in the root of the catalog manager it is not equivalent to listing all catalogs as it includes also different catalog parts of the temporary objects < b > note : < b > it is primarily used for interacting with calcite ' s schema

public set < string > list schemas ( ) { return stream concat ( catalogs key set ( ) stream ( ) , temporary tables key set ( ) stream ( ) map ( object identifier : : get catalog name ) ) collect ( collectors to set ( ) ) ; }


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


public static string format ( float value , boolean is grouping , int fraction digits , boolean is half up ) { return format ( value , is grouping , 1 , fraction digits , is half up ) ; }


partitions the data into key - groups and returns the result via { @ link partitioning result }

public state snapshot state key group writer partition by key group ( ) { if ( computed result = = null ) { report all element key groups ( ) ; int output number of elements = build histogram by accumulating counts ( ) ; execute partitioning ( output number of elements ) ; } return computed result ; }


sets a listener to receive video events , removing all existing listeners

public void set video listener ( @ nullable video listener listener ) { video listeners clear ( ) ; if ( listener ! = null ) { add video listener ( listener ) ; } }


draws an entry label at the specified position

protected void draw entry label ( canvas c , string label , float x , float y ) { c draw text ( label , x , y , m entry labels paint ) ; }


a random qualifier it is important that this be distinct from the name and the unresolved message for testing transform

private static string random qualifier ( ) { return random boolean ( ) ? null : random alpha of length ( 6 ) ; }


scenario s1 4 : iterating through elements given an intrusive collection has been created and the intrusive collection contains multiple elements when i iterate through the intrusive collection then i get each element in the collection , successively

public void test iterate should return all elements ( ) { intrusive collection < simple element > intrusive collection = new intrusive collection < > ( ) ; simple element elem 1 = new simple element ( ) ; simple element elem 2 = new simple element ( ) ; simple element elem 3 = new simple element ( ) ; intrusive collection add ( elem 1 ) ; intrusive collection add ( elem 2 ) ; intrusive collection add ( elem 3 ) ; iterator < simple element > iterator = intrusive collection iterator ( ) ; assert equals ( " first element returned is incorrect " , elem 1 , iterator next ( ) ) ; assert equals ( " second element returned is incorrect " , elem 2 , iterator next ( ) ) ; assert equals ( " third element returned is incorrect " , elem 3 , iterator next ( ) ) ; assert false ( " iterator should not have next element " , iterator has next ( ) ) ; }


perform a given action and continue parsing , exhausting all results after the action

protected void do action ( action a , assembly parse token tok , set < assembly parse machine > results , deque < assembly parse machine > visited ) { try ( dbg ctx dc = dbg start ( " action : " + a ) ) { if ( a instanceof shift action ) { assembly parse machine m = copy ( ) ; m stack push ( ( ( shift action ) a ) new state num ) ; m tree stack push ( tok ) ; m last tok = tok ; m pos + = tok get string ( ) length ( ) ; m exhaust ( results , visited ) ; } else if ( a instanceof reduce action ) { assembly production prod = ( ( reduce action ) a ) prod ; assembly parse branch branch = new assembly parse branch ( parser grammar , prod ) ; assembly parse machine m = copy ( ) ; m output add ( prod get index ( ) ) ; dbg println ( " prod : " + prod ) ; for ( @ suppress warnings ( " unused " ) assembly symbol sym : prod ) { m stack pop ( ) ; branch add child ( m tree stack pop ( ) ) ; } for ( action aa : m parser actions get ( m stack peek ( ) , prod get l h s ( ) ) ) { goto action ga = ( goto action ) aa ; dbg println ( " goto : " + ga ) ; assembly parse machine n = m copy ( ) ; n stack push ( ga new state num ) ; n tree stack push ( branch ) ; n exhaust ( results , visited ) ; } } else if ( a instanceof accept action ) { assembly parse machine m = copy ( ) ; m accepted = true ; results add ( m ) ; } } }


schedules the given runnable on the underlying executor directly and returns its future wrapped into a disposable

public disposable schedule direct ( final runnable run , long delay time , time unit unit ) { scheduled direct task task = new scheduled direct task ( rx java plugins on schedule ( run ) ) ; try { future < ? > f ; if ( delay time < = 0l ) { f = executor submit ( task ) ; } else { f = executor schedule ( task , delay time , unit ) ; } task set future ( f ) ; return task ; } catch ( rejected execution exception ex ) { rx java plugins on error ( ex ) ; return empty disposable instance ; } }


determine if the service has completely stopped used only by unit tests

public boolean is terminated ( ) { return get service state ( ) = = state stopped & & sched is terminated ( ) ; }


deregister the { @ link channel } from its { @ link event loop } sub - classes may override this method

protected void do deregister ( ) throws exception { / / noop }


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

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


public long count ( ) { long current second = time unit nanoseconds to seconds ( system nano time ( ) ) ; return count ( current second ) ; }


public void reset ( ) { stdout buffer reset ( ) ; stderr buffer reset ( ) ; text index = 0 ; text input clear ( ) ; secret index = 0 ; secret input clear ( ) ; }


adds the given increment to this resource counter value and returns the resulting value

public resource counter add ( map < resource profile , integer > increment ) { return internal add ( increment entry set ( ) ) ; }


returns true if this value corresponds to a special file or symlink to a special file if so , its parent directory is guaranteed to exist

public boolean is special file ( ) { return real file state value ( ) get type ( ) = = file state type special file ; }


awaits shutdown of this thread , waiting up to the timeout

public boolean await shutdown ( long timeout , time unit unit ) throws interrupted exception { return shutdown latch await ( timeout , unit ) ; }


returns the appropriate { @ code if - ne } rop for the given sources the result is a shared instance

public static rop op if ne ( type list types ) { return pick if ( types , if nez int , if nez object , if ne int , if ne object ) ; }


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


validate if the capability is present or not

private static void check capability ( string capability ) throws federation state store invalid input exception { if ( capability = = null | | capability is empty ( ) ) { string message = " invalid capability information " + " please try again by specifying valid capability information " ; log warn ( message ) ; throw new federation state store invalid input exception ( message ) ; } }


return the sessions for the user the returned set is a copy and will never be modified


is this fixture a sensor ( non - solid ) ?

public boolean is sensor ( ) { return m is sensor ; }


get the currently available resources in the cluster a valid value is available after a call to allocate has been made

public resource get available resources ( ) { return client get available resources ( ) ; }


returns the memoization strategy for this codec if set to { @ link memoization strategy # memoize before } , then { @ link deserialization context # register initial value } must be called first in the { @ link # deserialize } method , before delegating to any other codecs implementations of this method should just return a constant , since the choice of strategy is usually intrinsic to { @ link t }

default memoization strategy get strategy ( ) { return memoization strategy memoize after ; }


gets the current date and time formatted by the pattern specified

public string get current date and time ( ) { return format ( zoned date time now ( zone offset utc ) ) ; }


return the names of singleton beans registered in this registry only checks already instantiated singletons ; does not return names for singleton bean definitions which have not been instantiated yet the main purpose of this method is to check manually registered singletons ( see { @ link # register singleton } ) can also be used to check which singletons defined by a bean definition have already been created


child class implements this method to realize { @ code array ( ) }


get all property values , given a prefix ( which will be stripped ) and add the bean they define to the factory with the given name

protected void register bean definition ( string bean name , map < ? , ? > map , string prefix , string resource description ) throws beans exception { string class name = null ; string parent = null ; string scope = bean definition scope singleton ; boolean is abstract = false ; boolean lazy init = false ; constructor argument values cas = new constructor argument values ( ) ; mutable property values pvs = new mutable property values ( ) ; string prefix with sep = prefix + separator ; int begin index = prefix with sep length ( ) ; for ( map entry < ? , ? > entry : map entry set ( ) ) { string key = string utils trim whitespace ( ( string ) entry get key ( ) ) ; if ( key starts with ( prefix with sep ) ) { string property = key substring ( begin index ) ; if ( class key equals ( property ) ) { class name = string utils trim whitespace ( ( string ) entry get value ( ) ) ; } else if ( parent key equals ( property ) ) { parent = string utils trim whitespace ( ( string ) entry get value ( ) ) ; } else if ( abstract key equals ( property ) ) { string val = string utils trim whitespace ( ( string ) entry get value ( ) ) ; is abstract = true value equals ( val ) ; } else if ( scope key equals ( property ) ) { / / spring 2 0 style scope = string utils trim whitespace ( ( string ) entry get value ( ) ) ; } else if ( singleton key equals ( property ) ) { / / spring 1 2 style string val = string utils trim whitespace ( ( string ) entry get value ( ) ) ; scope = ( ! string utils has length ( val ) | | true value equals ( val ) ? bean definition scope singleton : bean definition scope prototype ) ; } else if ( lazy init key equals ( property ) ) { string val = string utils trim whitespace ( ( string ) entry get value ( ) ) ; lazy init = true value equals ( val ) ; } else if ( property starts with ( constructor arg prefix ) ) { if ( property ends with ( ref suffix ) ) { int index = integer parse int ( property substring ( 1 , property length ( ) - ref suffix length ( ) ) ) ; cas add indexed argument value ( index , new runtime bean reference ( entry get value ( ) to string ( ) ) ) ; } else { int index = integer parse int ( property substring ( 1 ) ) ; cas add indexed argument value ( index , read value ( entry ) ) ; } } else if ( property ends with ( ref suffix ) ) { / / this isn ' t a real property , but a reference to another prototype / / extract property name : property is of form dog ( ref ) property = property substring ( 0 , property length ( ) - ref suffix length ( ) ) ; string ref = string utils trim whitespace ( ( string ) entry get value ( ) ) ; / / it doesn ' t matter if the referenced bean hasn ' t yet been registered : / / this will ensure that the reference is resolved at runtime object val = new runtime bean reference ( ref ) ; pvs add ( property , val ) ; } else { / / it ' s a normal bean property pvs add ( property , read value ( entry ) ) ; } } } if ( logger is trace enabled ( ) ) { logger trace ( " registering bean definition for bean name ' " + bean name + " ' with " + pvs ) ; } / / just use default parent if we ' re not dealing with the parent itself , / / and if there ' s no class name specified the latter has to happen for / / backwards compatibility reasons if ( parent = = null & & class name = = null & & ! bean name equals ( this default parent bean ) ) { parent = this default parent bean ; } try { abstract bean definition bd = bean definition reader utils create bean definition ( parent , class name , get bean class loader ( ) ) ; bd set scope ( scope ) ; bd set abstract ( is abstract ) ; bd set lazy init ( lazy init ) ; bd set constructor argument values ( cas ) ; bd set property values ( pvs ) ; get registry ( ) register bean definition ( bean name , bd ) ; } catch ( class not found exception ex ) { throw new cannot load bean class exception ( resource description , bean name , class name , ex ) ; } catch ( linkage error err ) { throw new cannot load bean class exception ( resource description , bean name , class name , err ) ; } }


issues a cache clear and waits 30 seconds for the field data breaker to be cleared

public void clear field data ( ) throws exception { client ( ) admin ( ) indices ( ) prepare clear cache ( ) set field data cache ( true ) execute ( ) action get ( ) ; assert busy ( ( ) - > { nodes stats response resp = client ( ) admin ( ) cluster ( ) prepare nodes stats ( ) clear ( ) set breaker ( true ) get ( new time value ( 15 , time unit seconds ) ) ; for ( node stats n stats : resp get nodes ( ) ) { assert that ( " fielddata breaker never reset back to 0 " , n stats get breaker ( ) get stats ( circuit breaker fielddata ) get estimated ( ) , equal to ( 0l ) ) ; } } , 30 , time unit seconds ) ; }


the response resources wrapped in the common mcp resource message these are typed resources that match the type url in the request resources message when ` incremental ` is true , this contains an array of resources to addupdate for the specified collection this modifies the existing collection at the sink when ` incremental ` is false , this contains the full set of resources for the specified collection this replaces any previously delivered resources < code > repeated istio mcp v 1alpha 1 resource resources = 3 ; < code >

public com alibaba nacos istio model mcp resource builder add resources builder ( ) { return get resources field builder ( ) add builder ( com alibaba nacos istio model mcp resource get default instance ( ) ) ; }


if one instance is empty , the other " wins " if both instances have conditions , compare them in the order in which they were provided

public int compare to ( composite request condition other , server web exchange exchange ) { if ( is empty ( ) & & other is empty ( ) ) { return 0 ; } else if ( is empty ( ) ) { return 1 ; } else if ( other is empty ( ) ) { return - 1 ; } else { assert number of conditions ( other ) ; for ( int i = 0 ; i < get length ( ) ; i + + ) { int result = this request conditions [ i ] compare to ( other request conditions [ i ] , exchange ) ; if ( result ! = 0 ) { return result ; } } return 0 ; } }


sets the scale factor to the specified values

public matrix set zoom ( float scale x , float scale y ) { matrix save = new matrix ( ) ; set zoom ( scale x , scale y , save ) ; return save ; }


set the list of { @ link media type } objects supported by this converter

public void set supported media types ( list < media type > supported media types ) { assert not empty ( supported media types , " media type list must not be empty " ) ; this supported media types = new array list < > ( supported media types ) ; }


appends the key - val pair to the passed builder in the following format < pair - delim > key = value

static void add ( keys key , string value , string builder b ) { b append ( audit constants pair separator ) append ( key name ( ) ) append ( audit constants key val separator ) append ( value ) ; }


starts the autocompleter on the given text field first , this repeatedly attempts auto - activation when there are many suggestions , or when auto - activation is prevented ( see { @ link # get completion can default ( object ) get completion can default ( t ) } ) , a list is displayed ( usually below the caret ) containing the suggestions given the fields current contents the list remains open until either the user cancels it ( usually via esc ) or the user activates a suggestion note : the text field must already be attached

public void start completion ( j text field field ) { if ( ! attachees contains ( field ) ) { throw new illegal argument exception ( " given field is not attached " ) ; } set < string > visited = new hash set < > ( ) ; while ( true ) { string before = get prefix ( field ) ; if ( ! visited add ( before ) ) { return ; } collection < t > comp = model compute completions ( before ) ; if ( comp = = null | | comp size ( ) = = 0 ) { return ; } else if ( comp size ( ) = = 1 ) { t sel = comp iterator ( ) next ( ) ; if ( get completion can default ( sel ) ) { completion activated ( comp iterator ( ) next ( ) ) ; } else { set completion list visible ( true ) ; update display contents ( ) ; return ; } } else if ( ! is completion list visible ( ) ) { set completion list visible ( true ) ; update display contents ( ) ; return ; } } }


handle the case of an object property type

public void visit ( object value ) { throw new runtime exception ( ) ; }


public static void gemv ( double alpha , dense matrix mat a , boolean trans a , sparse vector x , double beta , dense vector y ) { gemv dimension check ( mat a , trans a , x , y ) ; final int m = mat a num rows ( ) ; final int n = mat a num cols ( ) ; if ( trans a ) { int start = 0 ; for ( int i = 0 ; i < n ; i + + ) { double s = 0 ; for ( int j = 0 ; j < x indices length ; j + + ) { s + = x values [ j ] * mat a data [ start + x indices [ j ] ] ; } y data [ i ] = beta * y data [ i ] + alpha * s ; start + = m ; } } else { scal ( beta , y ) ; for ( int i = 0 ; i < x indices length ; i + + ) { int index = x indices [ i ] ; double value = alpha * x values [ i ] ; f2j blas daxpy ( m , value , mat a data , index * m , 1 , y data , 0 , 1 ) ; } } }


the size of the expected results , including potential null values

public int length ( ) { return array length ( ) ; }


sets whether object members are serialized when their value is null this has no impact on array elements the default is false

public final void set serialize nulls ( boolean serialize nulls ) { this serialize nulls = serialize nulls ; }


returns a stream in which each element is the result of passing the corresponding element of each of { @ code stream a } and { @ code stream b } to { @ code function } for example : { @ code streams zip ( stream of ( " foo 1 " , " foo 2 " , " foo 3 " ) , stream of ( " bar 1 " , " bar 2 " ) , ( arg 1 , arg 2 ) - > arg 1 + " : " + arg 2 ) } will return { @ code stream of ( " foo 1 : bar 1 " , " foo 2 : bar 2 " ) } the resulting stream will only be as long as the shorter of the two input streams ; if one stream is longer , its extra elements will be ignored note that if you are calling { @ link stream # for each } on the resulting stream , you might want to consider using { @ link # for each pair } instead of this method < b > performance note : < b > the resulting stream is not < a href = " http : gee cs oswego edudlhtml stream parallel guidance html " > efficiently splittable this may harm parallel performance

public static < a , b , r > stream < r > zip ( stream < a > stream a , stream < b > stream b , bi function < ? super a , ? super b , r > function ) { check not null ( stream a ) ; check not null ( stream b ) ; check not null ( function ) ; boolean is parallel = stream a is parallel ( ) | | stream b is parallel ( ) ; / / same as stream concat spliterator < a > splitr a = stream a spliterator ( ) ; spliterator < b > splitr b = stream b spliterator ( ) ; int characteristics = splitr a characteristics ( ) & splitr b characteristics ( ) & ( spliterator sized | spliterator ordered ) ; iterator < a > itr a = spliterators iterator ( splitr a ) ; iterator < b > itr b = spliterators iterator ( splitr b ) ; return stream support stream ( new abstract spliterator < r > ( math min ( splitr a estimate size ( ) , splitr b estimate size ( ) ) , characteristics ) { @ override public boolean try advance ( consumer < ? super r > action ) { if ( itr a has next ( ) & & itr b has next ( ) ) { action accept ( function apply ( itr a next ( ) , itr b next ( ) ) ) ; return true ; } return false ; } } , is parallel ) on close ( stream a : : close ) on close ( stream b : : close ) ; }


called before the azure storage sdk sends a request

public void event occurred ( sending request event event ) { sending request ( event ) ; }


return the number of bytes that large input files should be optimally be split into to minimize io time

public long get default block size ( ) { return get conf ( ) get long bytes ( fs s3a block size , default blocksize ) ; }


setup the kdc for testing a secure hdfs cluster

public static void init kdc ( ) throws exception { properties kdc conf = mini kdc create conf ( ) ; kdc = new mini kdc ( kdc conf , root test dir ) ; kdc start ( ) ; file sink keytab file = new file ( root test dir , " sink keytab " ) ; sink keytab = sink keytab file get absolute path ( ) ; kdc create principal ( sink keytab file , " sink / localhost " ) ; sink principal = " sink / localhost @ " + kdc get realm ( ) ; file hdfs keytab file = new file ( root test dir , " hdfs keytab " ) ; hdfs keytab = hdfs keytab file get absolute path ( ) ; kdc create principal ( hdfs keytab file , " hdfs / localhost " , " http / localhost " ) ; hdfs principal = " hdfs / localhost @ " + kdc get realm ( ) ; spnego principal = " http / localhost @ " + kdc get realm ( ) ; }


creates the filesystem ; updates the { @ link # abfs } field

public azure blob file system create file system ( ) throws i o exception { if ( abfs = = null ) { abfs = ( azure blob file system ) file system new instance ( raw config ) ; } return abfs ; }


register a contact filter to provide specific control over collision otherwise the default filter is used ( default filter ) the listener is owned by you and must remain in scope

public void set contact filter ( contact filter filter ) { m contact manager m contact filter = filter ; }


sets the high water mark of the write buffer if the number of bytes queued in the write buffer exceeds this value , { @ link channel # is writable ( ) } will start to return { @ code false }

channel config set write buffer high water mark ( int write buffer high water mark ) ;


return a structured object with internal state and counters

public stats get stats ( ) { return this stats ; }


test sps with empty file 1 create one empty file 2 call satisfy storage policy for empty file 3 sps should skip this file and xattr should not be added for empty file

public void test s p s when file length is zero ( ) throws exception { try { hdfs cluster = start cluster ( config , all disk types , num of datanodes , storages per datanode , capacity ) ; hdfs cluster wait active ( ) ; distributed file system fs = hdfs cluster get file system ( ) ; path file path = new path ( " / zero size file " ) ; d f s test util create file ( fs , file path , 0 , ( short ) 1 , 0 ) ; f s edit log editlog = hdfs cluster get name node ( ) get namesystem ( ) get edit log ( ) ; long last written tx id = editlog get last written tx id ( ) ; fs satisfy storage policy ( file path ) ; assert assert equals ( " xattr should not be added for the file " , last written tx id , editlog get last written tx id ( ) ) ; i node inode = hdfs cluster get name node ( ) get namesystem ( ) get f s directory ( ) get i node ( file path to string ( ) ) ; assert assert true ( " x attr feature should be null for file " , inode get x attr feature ( ) = = null ) ; } finally { shutdown cluster ( ) ; } }


returns true if the array has one or more items

public boolean not empty ( ) { return size > 0 ; }


gets the { @ link @ info } for the given opcode value

public static info get ( int opcode ) { int idx = opcode - opcodes min value ; try { info result = info [ idx ] ; if ( result ! = null ) { return result ; } } catch ( array index out of bounds exception ex ) { / / fall through } throw new illegal argument exception ( " bogus opcode : " + hex u 2or 4 ( opcode ) ) ; }


returns { @ link method } instances for the tests that assume multisets support duplicates so that the test of { @ code multisets for set ( ) } can suppress them

public static list < method > get iterator duplicate initializing methods ( ) { return arrays as list ( helpers get method ( multiset iterator tester class , " test iterator known order " ) , helpers get method ( multiset iterator tester class , " test iterator unknown order " ) , helpers get method ( multiset iterator tester class , " test removing iterator known order " ) , helpers get method ( multiset iterator tester class , " test removing iterator unknown order " ) ) ; }


get userlogout : logs out current logged in user session

default mono < response entity < void > > logout user ( server web exchange exchange ) { mono < void > result = mono empty ( ) ; exchange get response ( ) set status code ( http status not implemented ) ; return result then ( mono empty ( ) ) ; }


default response entity < void > logout user ( ) { return new response entity < > ( http status not implemented ) ; }


creates a changelog row from the given row kind short string and value objects

public static row changelog row ( string row kind , object values ) { row kind kind = parse row kind ( row kind ) ; return row of kind ( kind , values ) ; }


declare a script field on an { @ link object parser }

public static < t > void declare script ( abstract object parser < t , ? > parser , bi consumer < t , script > consumer , parse field parse field ) { parser declare field ( consumer , ( p , c ) - > script parse ( p ) , parse field , value type object or string ) ; }


returns true if there is a value for the given key in the cache

public synchronized boolean contains ( @ non null t key ) { return cache contains key ( key ) ; }


tests a bug in quorum cnx manager that causes a npe when a 3 4 6 observer connects to a 3 5 0 server see https : issues apache orgjirabrowse z o o k e e p e r - 1789

public void test cnx manager n p e ( ) throws exception { / / the connecting peer ( id = 2 ) is a 3 4 6 observer peers get ( 2l ) type = learner type observer ; quorum peer peer = new quorum peer ( peers , peer tmpdir [ 1 ] , peer tmpdir [ 1 ] , peer client port [ 1 ] , 3 , 1 , 1000 , 2 , 2 , 2 ) ; quorum cnx manager cnx manager = peer create cnxn manager ( ) ; quorum cnx manager listener listener = cnx manager listener ; if ( listener ! = null ) { listener start ( ) ; } else { log error ( " null listener when initializing cnx manager " ) ; } inet socket address address = peers get ( peer get id ( ) ) election addr get reachable or one ( ) ; log info ( " election port : { } " , address get port ( ) ) ; thread sleep ( 1000 ) ; socket channel sc = socket channel open ( ) ; sc socket ( ) connect ( address , 5000 ) ; / * * write id ( 3 4 6 protocol ) this previously caused a npe in * quorum cnx manager * / byte [ ] msg bytes = new byte [ 8 ] ; byte buffer msg buffer = byte buffer wrap ( msg bytes ) ; msg buffer put long ( 2l ) ; msg buffer position ( 0 ) ; sc write ( msg buffer ) ; msg buffer = byte buffer wrap ( new byte [ 8 ] ) ; / / write length of message msg buffer put int ( 4 ) ; / / write message msg buffer put int ( 5 ) ; msg buffer position ( 0 ) ; sc write ( msg buffer ) ; message m = cnx manager poll recv queue ( 1000 , time unit milliseconds ) ; assert not null ( m ) ; peer shutdown ( ) ; cnx manager halt ( ) ; assert false ( cnx manager listener is alive ( ) ) ; }


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


returns { @ code true } if there exists a member range in this range set which { @ linkplain range # encloses encloses } the specified range

boolean encloses ( range < c > other range ) ;


adds { @ code edge } connecting { @ code node u } to { @ code node v } if the graph is directed , { @ code edge } will be directed in this graph ; otherwise , it will be undirected < b > { @ code edge } must be unique to this graph < b > , just as a { @ code map } key must be it must also be non - null if { @ code node u } and { @ code node v } are not already present in this graph , this method will silently { @ link # add node ( object ) add } { @ code node u } and { @ code node v } to the graph if { @ code edge } already connects { @ code node u } to { @ code node v } ( in the specified order if this network { @ link # is directed ( ) } , else in any order ) , then this method will have no effect

boolean add edge ( n node u , n node v , e edge ) ;


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


executes a server - streaming call returning a blocking { @ link iterator } over the response stream the { @ code call } should not be already started after calling this method , { @ code call } should no longer be used the returned iterator may throw { @ link status runtime exception } on error

public static < req t , resp t > iterator < resp t > blocking server streaming call ( channel channel , method descriptor < req t , resp t > method , call options call options , req t req ) { threadless executor executor = new threadless executor ( ) ; client call < req t , resp t > call = channel new call ( method , call options with option ( client calls stub type option , stub type blocking ) with executor ( executor ) ) ; blocking response stream < resp t > result = new blocking response stream < > ( call , executor ) ; async unary request call ( call , req , result listener ( ) ) ; return result ; }


makes sure all branch targets of the given switch instruction are valid

private void clean up switch instruction ( clazz clazz , int offset , switch instruction switch instruction ) { / / get the actual branch targets instruction offset value branch targets = partial evaluator branch targets ( offset ) ; / / get an offset that can serve as a valid default offset int default offset = branch targets instruction offset ( branch targets instruction offset count ( ) - 1 ) - offset ; instruction replacement instruction = null ; / / check the jump offsets int [ ] jump offsets = switch instruction jump offsets ; for ( int index = 0 ; index < jump offsets length ; index + + ) { if ( ! branch targets contains ( offset + jump offsets [ index ] ) ) { / / replace the unused offset jump offsets [ index ] = default offset ; / / remember to replace the instruction replacement instruction = switch instruction ; } } / / check the default offset if ( ! branch targets contains ( offset + switch instruction default offset ) ) { / / replace the unused offset switch instruction default offset = default offset ; / / remember to replace the instruction replacement instruction = switch instruction ; } if ( replacement instruction ! = null ) { replace instruction ( clazz , offset , switch instruction , replacement instruction ) ; } }


public int get first byte of data r v a ( ) { return rva to first byte of data ; }