helper method to build secret volume ssl context provider , call build ssl context on it and check returned ssl context

private static void ssl context for either with both cert and trust ( boolean server , string pem file , string key file , string ca file ) throws i o exception , certificate exception , cert store exception { ssl context ssl context = null ; if ( server ) { secret volume server ssl context provider provider = secret volume server ssl context provider get provider ( common tls context tests util build downstream tls context from filenames ( key file , pem file , ca file ) ) ; ssl context = provider build ssl context from secrets ( ) ; } else { secret volume client ssl context provider provider = secret volume client ssl context provider get provider ( common tls context tests util build upstream tls context from filenames ( key file , pem file , ca file ) ) ; ssl context = provider build ssl context from secrets ( ) ; } do checks on ssl context ( server , ssl context , / * expected apn protos = * / null ) ; }


creates ( but does not start ) a new stopwatch , using the specified time source

public static stopwatch create unstarted ( ticker ticker ) { return new stopwatch ( ticker ) ; }


sets the component node containing this placeholder

void set node ( component node node ) { comp node = node ; }


gets the main thread execution context the main thread execution context can be used to execute tasks in the main thread of the underlying rpc endpoint

protected main thread executor get main thread executor ( ) { return main thread executor ; }


create input listing based on snapshot diff report

private path create input file listing with diff ( job job , dist cp sync dist cp sync ) throws i o exception { path file listing path = get file listing path ( ) ; copy listing copy listing = new simple copy listing ( job get configuration ( ) , job get credentials ( ) , dist cp sync ) ; copy listing build listing ( file listing path , context ) ; return file listing path ; }


public void set diagnostics ( string diag ) { this diagnostics = diag ; }


this test sets kafka producer so that it will automatically flush the data and and fails the broker to check whether flushed records since last checkpoint were not duplicated

protected void test exactly once ( boolean regular sink , int sinks count ) throws exception { final string topic = ( regular sink ? " exactly once topic regular sink " : " exactly topic custom operator " ) + sinks count ; final int partition = 0 ; final int num elements = 1000 ; final int fail after elements = 333 ; for ( int i = 0 ; i < sinks count ; i + + ) { create test topic ( topic + i , 1 , 1 ) ; } type information serialization schema < integer > schema = new type information serialization schema < > ( basic type info int type info , new execution config ( ) ) ; stream execution environment env = stream execution environment get execution environment ( ) ; env enable checkpointing ( 500 ) ; env set parallelism ( 1 ) ; env set restart strategy ( restart strategies fixed delay restart ( 1 , 0 ) ) ; properties properties = new properties ( ) ; properties put all ( standard props ) ; properties put all ( secure props ) ; / / process exactly fail after elements number of elements and then shutdown kafka broker and / / fail application list < integer > expected elements = get integers sequence ( num elements ) ; data stream < integer > input stream = env add source ( new integer source ( num elements ) ) map ( new failing identity mapper < integer > ( fail after elements ) ) ; for ( int i = 0 ; i < sinks count ; i + + ) { flink kafka partitioner < integer > partitioner = new flink kafka partitioner < integer > ( ) { @ override public int partition ( integer record , byte [ ] key , byte [ ] value , string target topic , int [ ] partitions ) { return partition ; } } ; if ( regular sink ) { stream sink < integer > kafka sink = kafka server get producer sink ( topic + i , schema , properties , partitioner ) ; input stream add sink ( kafka sink get user function ( ) ) ; } else { kafka server produce into kafka ( input stream , topic + i , schema , properties , partitioner ) ; } } failing identity mapper failed before = false ; test utils try execute ( env , " exactly once test " ) ; for ( int i = 0 ; i < sinks count ; i + + ) { / / assert that before failure we successfully snapshot / flushed all expected elements assert exactly once for topic ( properties , topic + i , partition , expected elements , kafka read timeout ) ; delete test topic ( topic + i ) ; } }


default void authorize device for ( final string device id , final string subject ) { }


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


the path at which this entry ' s visibility was defined ( eg public xml ) < code > optional aapt pb source source = 2 ; < code >

public com android aapt resources source get source ( ) { return source = = null ? com android aapt resources source get default instance ( ) : source ; }


public set < index feature stats > get field type stats ( ) { return field type stats ; }


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


returns a list of indices of a list of globals ; {

int [ ] get indices of globals ( list < string > globals ) { int n = globals size ( ) ; int [ ] array = new int [ n ] ; for ( int i = 0 ; i < n ; i + + ) { array [ i ] = get index of global ( globals get ( i ) ) ; } return array ; }


public list < list < big decimal > > get array array number ( ) { return array array number ; }


public static secret key create secret key ( byte [ ] key ) { return secret manager create secret key ( key ) ; }


public void add ( top level item item ) throws i o exception { synchronized ( this ) { job names add ( item get relative name from ( get owner ( ) get item group ( ) ) ) ; } save ( ) ; }


gather all the semantics that can be used as state transitions currently , only semantics from { @ code : ^ instruction } constructors are taken

protected void gather semantics ( ) { assembly production rec = grammar get pure recursion ( grammar get non terminal ( grammar get start name ( ) ) ) ; if ( rec = = null ) { return ; } for ( assembly constructor semantic sem : grammar get semantics ( rec ) ) { semantics get ( grammar get start name ( ) ) add ( sem ) ; } }


set the connection to be secure , using the specified keystore and truststore this has to be called before any route mapping is done you have to supply a keystore file , truststore file is optional ( keystore will be reused ) this method is only relevant when using embedded jetty servers it should not be used if you are using servlets , where you will need to secure the connection in the servlet container

public static void secure ( string keystore file , string keystore password , string cert alias , string truststore file , string truststore password , boolean needs client cert ) { get instance ( ) secure ( keystore file , keystore password , cert alias , truststore file , truststore password , needs client cert ) ; }


compute a percentile from the underlying rolling buckets of values for performance reasons it maintains a single snapshot of the sorted values from all buckets that is re - generated each time the bucket rotates this means that if a bucket is 5 0 0 0ms , then this method will re - compute a percentile at most once every 5 0 0 0ms

public int get percentile ( double percentile ) { / * no - op if disabled * / if ( ! enabled get ( ) ) return - 1 ; / / force logic to move buckets forward in case other requests aren ' t making it happen get current bucket ( ) ; / / fetch the current snapshot return get current percentile snapshot ( ) get percentile ( percentile ) ; }


set the user - defined combiner class used to combine map - outputs before being sent to the reducers the combiner is an application - specified aggregation operation , which can help cut down the amount of data transferred between the { @ link mapper } and the { @ link reducer } , leading to better performance the framework may invoke the combiner 0 , 1 , or multiple times , in both the mapper and reducer tasks in general , the combiner is called as the sortmerge result is written to disk the combiner must : be side - effect free have the same input and output key types and the same input and output value types typically the combiner is same as the < code > reducer < code > for the job i e { @ link # set reducer class ( class ) }

public void set combiner class ( class < ? extends reducer > the class ) { set class ( " mapred combiner class " , the class , reducer class ) ; }


alternate factory method for labels from absolute strings this is a convenience method for cases when a label needs to be initialized statically , so the declared exception is inconvenient do not use this when the argument is not hard - wired

public static label parse absolute unchecked ( string abs name , boolean default to main ) { try { return parse absolute ( abs name , default to main , / * repository mapping = * / immutable map of ( ) ) ; } catch ( label syntax exception e ) { throw new illegal argument exception ( e ) ; } }


creates a new workspace rule event for a template event

public static workspace rule event new template event ( string path , string template , map < string , string > substitutions , boolean executable , string rule label , location location ) { template event e = workspace log protos template event new builder ( ) set path ( path ) set template ( template ) put all substitutions ( substitutions ) set executable ( executable ) build ( ) ; workspace log protos workspace event builder result = workspace log protos workspace event new builder ( ) ; result = result set template event ( e ) ; if ( location ! = null ) { result = result set location ( location to string ( ) ) ; } if ( rule label ! = null ) { result = result set rule ( rule label ) ; } return new workspace rule event ( result build ( ) ) ; }


set the < code > progress < code > of the request

public allocate request builder progress ( float progress ) { allocate request set progress ( progress ) ; return this ; }


gets a list from an object for the given key , and verifies all entries are strings if the key is not present , this returns null if the value is not a list or an entry is not a string , throws an exception

public static list < string > get list of strings ( map < string , ? > obj , string key ) { list < ? > list = get list ( obj , key ) ; if ( list = = null ) { return null ; } return check string list ( list ) ; }


inserts ( by copy ) the entry at its sorted position , not necessarily first

public boolean offer first ( entry < k , v > e ) { return put ( e get key ( ) , e get value ( ) ) = = null ; }


set the http methods to allow , e g { @ code " get " } , { @ code " post " } , { @ code " put " } , etc the special value { @ code " " } allows all methods if not set , only { @ code " get " } and { @ code " head " } are allowed by default this is not set note : cors checks use values from " forwarded " ( < a href = " https : tools ietf orghtmlrfc 7 2 3 9 " > rfc 7239 ) , " x - forwarded - host " , " x - forwarded - port " , and " x - forwarded - proto " headers , if present , in order to reflect the client - originated address consider using the { @ code forwarded header filter } in order to choose from a central place whether to extract and use , or to discard such headers see the spring framework reference for more on this filter

public void set allowed methods ( @ nullable list < string > allowed methods ) { this allowed methods = ( allowed methods ! = null ? new array list < > ( allowed methods ) : null ) ; if ( ! collection utils is empty ( allowed methods ) ) { this resolved methods = new array list < > ( allowed methods size ( ) ) ; for ( string method : allowed methods ) { if ( all equals ( method ) ) { this resolved methods = null ; break ; } this resolved methods add ( http method resolve ( method ) ) ; } } else { this resolved methods = default methods ; } }


loads and parses the groovy script via the groovy class loader

public object get scripted object ( script source script source , @ nullable class < ? > actual interfaces ) throws i o exception , script compilation exception { synchronized ( this script class monitor ) { try { class < ? > script class to execute ; this was modified for type check = false ; if ( this cached result ! = null ) { object result = this cached result object ; this cached result = null ; return result ; } if ( this script class = = null | | script source is modified ( ) ) { / / new script content this script class = get groovy class loader ( ) parse class ( script source get script as string ( ) , script source suggested class name ( ) ) ; if ( script class is assignable from ( this script class ) ) { / / a groovy script , probably creating an instance : let ' s execute it object result = execute script ( script source , this script class ) ; this script result class = ( result ! = null ? result get class ( ) : null ) ; return result ; } else { this script result class = this script class ; } } script class to execute = this script class ; / / process re - execution outside of the synchronized block return execute script ( script source , script class to execute ) ; } catch ( compilation failed exception ex ) { this script class = null ; this script result class = null ; throw new script compilation exception ( script source , ex ) ; } } }


clears the { @ link surface view } onto which video is being rendered if it matches the one passed else does nothing

void clear video surface view ( @ nullable surface view surface view ) ;


returns a new , immutable collection containing the names of all entities within the directory denoted by the current path follows symbolic links

public collection < path > get directory entries ( ) throws i o exception , file not found exception { collection < string > entries = file system get directory entries ( this ) ; collection < path > result = new array list < > ( entries size ( ) ) ; for ( string entry : entries ) { result add ( get child ( entry ) ) ; } return result ; }


set the ( new ) value of the { @ code access - control - max - age } response header

public void set access control max age ( long max age ) { set ( access control max age , long to string ( max age ) ) ; }


instantiate a new { @ link linked hash map } with an initial capacity that can accommodate the specified number of elements without any immediate resizerehash operations to be expected this differs from the regular { @ link linked hash map } constructor which takes an initial capacity relative to a load factor but is aligned with spring ' s own { @ link linked case insensitive map } and { @ link linked multi value map } constructor semantics as of 5 3

public static < k , v > linked hash map < k , v > new linked hash map ( int expected size ) { return new linked hash map < > ( ( int ) ( expected size / default load factor ) , default load factor ) ; }


deregister { @ link file watcher } in this directory

public static synchronized boolean deregister watcher ( final string path , final file watcher watcher ) { watch dir job job = manager get ( path ) ; if ( job ! = null ) { job watchers remove ( watcher ) ; return true ; } return false ; }


called once a node connection is closed and unregistered

default void on node disconnected ( discovery node node , transport connection connection ) { }


uses the render context to create a compact shape for the given vertex

public shape get full shape ( render context < v , e > rc , layout < v , e > layout , v vertex ) { function < ? super v , shape > vertex shaper = rc get vertex shape transformer ( ) ; shape shape = null ; if ( vertex shaper instanceof visual graph vertex shape transformer ) { @ suppress warnings ( " unchecked " ) visual graph vertex shape transformer < v > vg shaper = ( visual graph vertex shape transformer < v > ) vertex shaper ; / / use the viewable shape here , as it is visually pleasing shape = vg shaper transform to full shape ( vertex ) ; } else { shape = vertex shaper apply ( vertex ) ; } return transform from layout to view ( rc , layout , vertex , shape ) ; }


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


retrieves , but does not remove , the least element of this queue , or returns { @ code null } if the queue is empty

public e peek first ( ) { return peek ( ) ; }


returns the max inactive time of the token

public long get max inactives ( ) { return max inactives ; }


returns either the default { @ link avro utils } which throw an exception in cases where avro would be needed or loads the specific utils for avro from flink - avro

public static avro utils get avro utils ( ) { / / try and load the special avro utils from the flink - avro package try { class < ? > clazz = class for name ( avro kryo utils , false , thread current thread ( ) get context class loader ( ) ) ; return clazz as subclass ( avro utils class ) get constructor ( ) new instance ( ) ; } catch ( class not found exception e ) { / / cannot find the utils , return the default implementation return new default avro utils ( ) ; } catch ( exception e ) { throw new runtime exception ( " could not instantiate " + avro kryo utils + " " , e ) ; } }


given a configuration get the address of the lifeline rpc server if the lifeline rpc is not configured returns null

inet socket address get lifeline rpc server address ( configuration conf ) { string addr = get trimmed or null ( conf , dfs namenode lifeline rpc address key ) ; if ( addr = = null ) { return null ; } return net utils create socket addr ( addr ) ; }


put the data to occupy the next byte sequence in the byte array

public void put bytes ( byte [ ] bytes ) { output stream write bytes ( bytes ) ; }


returns a json adapter equal to this , but that throws a { @ link json data exception } when { @ linkplain json reader # set fail on unknown ( boolean ) unknown names and values } are encountered this constraint applies to both the top - level message handled by this type adapter as well as to nested messages

public final json adapter < t > fail on unknown ( ) { final json adapter < t > delegate = this ; return new json adapter < t > ( ) { @ override public @ nullable t from json ( json reader reader ) throws i o exception { boolean skip forbidden = reader fail on unknown ( ) ; reader set fail on unknown ( true ) ; try { return delegate from json ( reader ) ; } finally { reader set fail on unknown ( skip forbidden ) ; } } @ override public void to json ( json writer writer , @ nullable t value ) throws i o exception { delegate to json ( writer , value ) ; } @ override boolean is lenient ( ) { return delegate is lenient ( ) ; } @ override public string to string ( ) { return delegate + " fail on unknown ( ) " ; } } ; }


test for behavior reported in https : github comelasticelasticsearchissues 3 4 7 0 8 unmapped field can lead to match no docs querys in disjunction queries if tokens are eliminated ( e g because the tokenizer removed them as punctuation ) on regular fields , this can leave only match no docs querys in the disjunction clause instead those disjunctions should be eliminated completely

public void test unmapped field no token with and operator ( ) throws i o exception { query query = new simple query string builder ( " first & second " ) field ( text field name ) field ( " unmapped " ) field ( " another unmapped " ) default operator ( operator and ) to query ( create shard context ( ) ) ; boolean query expected = new boolean query builder ( ) add ( new term query ( new term ( text field name , " first " ) ) , boolean clause occur must ) add ( new term query ( new term ( text field name , " second " ) ) , boolean clause occur must ) build ( ) ; assert equals ( expected , query ) ; query = new simple query string builder ( " first & second " ) field ( " unmapped " ) field ( " another unmapped " ) default operator ( operator and ) to query ( create shard context ( ) ) ; expected = new boolean query builder ( ) add ( new match no docs query ( ) , boolean clause occur must ) add ( new match no docs query ( ) , boolean clause occur must ) add ( new match no docs query ( ) , boolean clause occur must ) build ( ) ; assert equals ( expected , query ) ; }


get user { username } : get user by user name

default response entity < user > get user by name ( @ api param ( value = " the name that needs to be fetched use user 1 for testing " , required = true ) @ path variable ( " username " ) string username ) { 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 = " { \ " first name \ " : \ " first name \ " , \ " last name \ " : \ " last name \ " , \ " password \ " : \ " password \ " , \ " user status \ " : 6 , \ " phone \ " : \ " phone \ " , \ " id \ " : 0 , \ " email \ " : \ " email \ " , \ " username \ " : \ " username \ " } " ; 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 = " < user > < id > 123456789 < / id > < username > aeiou < / username > < first name > aeiou < / first name > < last name > aeiou < / last name > < email > aeiou < / email > < password > aeiou < / password > < phone > aeiou < / phone > < user status > 123 < / user status > < / user > " ; api util set example response ( request , " application / xml " , example string ) ; break ; } } } ) ; return new response entity < > ( http status not implemented ) ; }


indicates whether or not this framer has been closed via a call to either { @ link # close ( ) } or { @ link # dispose ( ) }

public boolean is closed ( ) { return closed ; }


public final content summary compute and convert content summary ( int snapshot id , content summary computation context summary ) throws access control exception { compute content summary ( snapshot id , summary ) ; final content counts counts = summary get counts ( ) ; final content counts snapshot counts = summary get snapshot counts ( ) ; final quota counts q = get quota counts ( ) ; return new content summary builder ( ) length ( counts get length ( ) ) file count ( counts get file count ( ) + counts get symlink count ( ) ) directory count ( counts get directory count ( ) ) quota ( q get name space ( ) ) space consumed ( counts get storagespace ( ) ) space quota ( q get storage space ( ) ) type consumed ( counts get type spaces ( ) ) type quota ( q get type spaces ( ) as array ( ) ) snapshot length ( snapshot counts get length ( ) ) snapshot file count ( snapshot counts get file count ( ) ) snapshot directory count ( snapshot counts get directory count ( ) ) snapshot space consumed ( snapshot counts get storagespace ( ) ) erasure coding policy ( summary get erasure coding policy name ( this ) ) build ( ) ; }


static method spec builder initialize deserialize method builder ( type element encoded type , processing environment env ) { method spec builder builder = method spec method builder ( " deserialize " ) add modifiers ( modifier public ) returns ( type name get ( env get type utils ( ) erasure ( encoded type as type ( ) ) ) ) add annotation ( override class ) add exception ( serialization exception class ) add exception ( i o exception class ) add parameter ( deserialization context class , " context " ) add parameter ( coded input stream class , " coded in " ) ; return builder ; }


returns a function that cast the incoming values via a class object

public static < t , u > function < t , u > cast function ( @ non null class < u > target ) { return new cast to class < > ( target ) ; }


inserts a single line of html into a { @ link string buffer } , with the given attributes

protected void insert h t m l line ( string builder buffer , string string , simple attribute set attributes ) { if ( string = = null ) { return ; } insert h t m l string ( buffer , string , attributes ) ; / / row padding - newline space buffer append ( br ) ; }


get the sql query to be executed to test the validity of connections

public string get connection test query ( ) { return connection test query ; }


verify that the contents on disk for the given index is deleted ; if not , delete the contents this method assumes that an index is already deleted in the cluster state andor explicitly through index tombstones

index metadata verify index is deleted ( index index , cluster state cluster state ) ;


delete the record falls into [ begin key bytes , end key bytes ) of the db

private static void delete range ( rocks d b db , list < column family handle > column family handles , byte [ ] begin key bytes , byte [ ] end key bytes , @ nonnegative long write batch size ) throws rocks d b exception { for ( column family handle column family handle : column family handles ) { try ( read options read options = rocks d b operation utils create total order seek read options ( ) ; rocks iterator wrapper iterator wrapper = rocks d b operation utils get rocks iterator ( db , column family handle , read options ) ; rocks d b write batch wrapper write batch wrapper = new rocks d b write batch wrapper ( db , write batch size ) ) { iterator wrapper seek ( begin key bytes ) ; while ( iterator wrapper is valid ( ) ) { final byte [ ] current key = iterator wrapper key ( ) ; if ( before the prefix bytes ( current key , end key bytes ) ) { write batch wrapper remove ( column family handle , current key ) ; } else { break ; } iterator wrapper next ( ) ; } } } }


gets single logout service for the requested binding

public single logout service get single logout service ( final string binding ) { return get single logout services ( ) stream ( ) filter ( acs - > acs get binding ( ) equals ignore case ( binding ) ) find first ( ) or else ( null ) ; }


get average count for provided event per second

public double get avg ( metric event event ) { return get sum ( event ) / data get interval in second ( ) ; }


create the model m bean info for the given managed resource

model m bean info get m bean info ( object managed bean , string bean key ) throws j m exception ;


update gauges in zoo keeper metrics api gauges are callbacks served by internal components and the value is not held by prometheus structures

private void sample gauges ( ) { root context gauges values ( ) for each ( prometheus gauge wrapper : : sample ) ; }


builds a { @ code compilation attributes } object

public compilation attributes build ( ) { return new compilation attributes ( this hdrs build ( ) , this textual hdrs build ( ) , this includes build ( ) , this sdk includes build ( ) , this sdk frameworks build ( ) , this weak sdk frameworks build ( ) , this sdk dylibs build ( ) , this package fragment , this copts build ( ) , this linkopts build ( ) , this defines build ( ) , this module maps for direct deps build ( ) , this enable modules ) ; }


public static boolean is in tinker patch service process ( context context ) { string process = get process name ( context ) ; string service = tinker service internals get tinker patch service name ( context ) ; if ( service = = null | | service length ( ) = = 0 ) { return false ; } return process equals ( service ) ; }


create an instance of { @ code joined } with base name for all components of the join , this may include any repartition topics created to complete the join

public static < k , v , vo > joined < k , v , vo > as ( final string name ) { return new joined < > ( null , null , null , name ) ; }


model tests for additional properties integer

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


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


sets { @ link format # pcm encoding } the default value is { @ link # no value }

public builder set pcm encoding ( @ c pcm encoding int pcm encoding ) { this pcm encoding = pcm encoding ; return this ; }


if true , this actor will be sized to the parent in { @ link # validate ( ) } if the parent is the stage , the actor will be sized to the stage this method is for convenience only when the widget ' s parent does not set the size of its children ( such as the stage )

public void set fill parent ( boolean fill parent ) ;


returns a new instance with the specified ad set to the specified { @ code state } the ad specified must currently either be in { @ link # ad state unavailable } or { @ link # ad state available } this instance ' s ad count may be unknown , in which case { @ code index } must be less than the ad count specified later otherwise , { @ code index } must be less than the current ad count

public ad group with ad state ( @ ad state int state , int index ) { assertions check argument ( count = = c length unset | | index < count ) ; @ ad state int [ ] states = copy states with space for ad count ( this states , index + 1 ) ; assertions check argument ( states [ index ] = = ad state unavailable | | states [ index ] = = ad state available | | states [ index ] = = state ) ; long [ ] durations us = this durations us length = = states length ? this durations us : copy durations us with space for ad count ( this durations us , states length ) ; @ nullable type uri [ ] uris = this uris length = = states length ? this uris : arrays copy of ( this uris , states length ) ; states [ index ] = state ; return new ad group ( count , states , uris , durations us ) ; }


associates { @ code key } with { @ code value } in the built map duplicate keys are not allowed , and will cause { @ link # build } to fail

public < t extends b > builder < b > put ( type token < t > key , t value ) { map builder put ( key reject type variables ( ) , value ) ; return this ; }


sets the < code > my string < code > property

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


specifies that each entry should be automatically removed from the cache once a fixed duration has elapsed after the entry ' s creation , the most recent replacement of its value , or its last access access time is reset by all cache read and write operations ( including { @ code cache as map ( ) get ( object ) } and { @ code cache as map ( ) put ( k , v ) } ) , but not by { @ code contains key ( object ) } , nor by operations on the collection - views of { @ link cache # as map } so , for example , iterating through { @ code cache as map ( ) entry set ( ) } does not reset access time for the entries you retrieve when { @ code duration } is zero , this method hands off to { @ link # maximum size ( long ) maximum size } { @ code ( 0 ) } , ignoring any otherwise - specified maximum size or weight this can be useful in testing , or to disable caching temporarily without a code change expired entries may be counted in { @ link cache # size } , but will never be visible to read or write operations expired entries are cleaned up as part of the routine maintenance described in the class javadoc

public cache builder < k , v > expire after access ( long duration , time unit unit ) { check state ( expire after access nanos = = unset int , " expire after access was already set to % s ns " , expire after access nanos ) ; check argument ( duration > = 0 , " duration cannot be negative : % s % s " , duration , unit ) ; this expire after access nanos = unit to nanos ( duration ) ; return this ; }


appends { @ code values } , in order , to the end of the values the built { @ link immutable int array } will contain

public builder add all ( iterable < integer > values ) { if ( values instanceof collection ) { return add all ( ( collection < integer > ) values ) ; } for ( integer value : values ) { add ( value ) ; } return this ; }


callback for building the { @ link path match configurer } delegates to { @ link # configure path match }

protected path match configurer get path match configurer ( ) { if ( this path match configurer = = null ) { this path match configurer = new path match configurer ( ) ; configure path match ( this path match configurer ) ; } return this path match configurer ; }


public static void put ( @ non null final string key , final parcelable value ) { put ( key , value , get default cache double utils ( ) ) ; }


gets the contract that has been set as the next workset

public operator < wt > get next workset ( ) { return this next workset ; }


set the default schema name to be set on connections

public void set schema ( string schema ) { check if sealed ( ) ; this schema = schema ; }


specify a { @ link com fasterxml jackson databind property naming strategy } to configure the { @ link object mapper } with

public void set property naming strategy ( property naming strategy property naming strategy ) { this builder property naming strategy ( property naming strategy ) ; }


public string get name ( ) { return name ; }


returns the { @ link media format # key operating rate } value for a given renderer operating rate , current { @ link format } and set of possible stream formats the default implementation returns { @ link # codec operating rate unset }

protected float get codec operating rate v 2 3 ( float operating rate , format format , format [ ] stream formats ) { return codec operating rate unset ; }


convenience method allowing lookup of the only instance of a given type equivalent to { @ code extension list lookup ( class ) get ( class ) } if there is one instance , and throws an { @ code illegal state exception } otherwise

public static @ non null < u > u lookup singleton ( class < u > type ) { extension list < u > all = lookup ( type ) ; if ( all size ( ) ! = 1 ) { throw new illegal state exception ( " expected 1 instance of " + type get name ( ) + " but got " + all size ( ) ) ; } return all get ( 0 ) ; }


shutdown the instrumentation for the process

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


public static void put delegated authentication provider configurations ( final request context context , final set < ? extends serializable > urls ) { context get flow scope ( ) put ( " delegated authentication provider configurations " , urls ) ; }


returns a save file if available returns null if a save can not be performed this method may block for an extended period of time if the pre - save process has not already completed this method does not accept a monitor since a remote task monitor does not yet exist

public synchronized local managed buffer file get save file ( task monitor monitor ) throws i o exception , cancelled exception { if ( save file ! = null ) { throw new i o exception ( " save already in progress " ) ; } wait for pre save ( monitor ) ; save file = pre save file ; pre save file = null ; if ( save file ! = null ) { if ( get buffer count ( ) ! = save file get buffer count ( ) ) { throw new assert exception ( ) ; } file vfile = bf mgr get version file ( version ) ; if ( vfile ! = null ) { / / records changes made to pre - save file for reverse reconstruction / / if vfile already exists , modifications will be added to it save file version out file = new version file ( this , save file , vfile ) ; } file m file = bf mgr get change map file ( ) ; if ( m file ! = null ) { / / tracks buffers written since checkout / / if mfile already exists , modifications will be added to it save file change map = new change map file ( m file , this , save file ) ; } file change file = bf mgr get change data file ( version ) ; if ( change file ! = null ) { change file = new file ( change file get parent file ( ) , change file get name ( ) + temp file ext ) ; change file delete ( ) ; save change file = new local buffer file ( change file , get buffer size ( ) ) ; } } return save file ; }


sets a referer to send to the web server

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


fuzzy query configuration information fuzzy queries based only on content are not allowed , that is , both data id and group are null , but content is not null in this case , all configurations are returned

public page < config info > fuzzy search config ( @ request param ( " data id " ) string data id , @ request param ( " group " ) string group , @ request param ( value = " app name " , required = false ) string app name , @ request param ( value = " tenant " , required = false , default value = string utils empty ) string tenant , @ request param ( value = " config tags " , required = false ) string config tags , @ request param ( " page no " ) int page no , @ request param ( " page size " ) int page size ) { map < string , object > config advance info = new hash map < string , object > ( 50 ) ; if ( string utils is not blank ( app name ) ) { config advance info put ( " app name " , app name ) ; } if ( string utils is not blank ( config tags ) ) { config advance info put ( " config tags " , config tags ) ; } try { return persist service find config info like 4 page ( page no , page size , data id , group , tenant , config advance info ) ; } catch ( exception e ) { string error msg = " serialize page error , data id = " + data id + " , group = " + group ; logger error ( error msg , e ) ; throw new runtime exception ( error msg , e ) ; } }


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

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


returns the value of this { @ code unsigned integer } as a { @ code float } , analogous to a widening primitive conversion from { @ code int } to { @ code float } , and correctly rounded

public float float value ( ) { return long value ( ) ; }


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 void shutdown ( ) { shutdown ( false ) ; }


this implementation compares the underlying input stream

public boolean equals ( @ nullable object other ) { return ( this = = other | | ( other instanceof input stream resource & & ( ( input stream resource ) other ) input stream equals ( this input stream ) ) ) ; }


parses the specified string as a single - precision floating point value the ascii character { @ code ' - ' } ( < code > ' & # 92 ; u 0 0 2 d ' < code > ) is recognized as the minus sign unlike { @ link float # parse float ( string ) } , this method returns { @ code null } instead of throwing an exception if parsing fails valid inputs are exactly those accepted by { @ link float # value of ( string ) } , except that leading and trailing whitespace is not permitted this implementation is likely to be faster than { @ code float parse float } if many failures are expected

public static @ nullable float try parse ( string string ) { if ( doubles floating point pattern matcher ( string ) matches ( ) ) { / / todo ( lowasser ) : could be potentially optimized , but only with / / extensive testing try { return float parse float ( string ) ; } catch ( number format exception e ) { / / float parse float has changed specs several times , so fall through / / gracefully } } return null ; }


extracts the timstamp component from the path

public static string get timestamp part from path ( string path ) { matcher matcher = timestamp dir pattern matcher ( path ) ; if ( matcher find ( ) ) { string matched = matcher group ( ) ; string ret = matched intern ( ) ; return ret ; } else { return null ; } }


returns true if the type for the memory blocks differ

public boolean is type different ( ) { return ( diff flags & type ) ! = 0 ; }


sets the max number of threads to use for globbing internally there is a { @ link fork join pool } used for globbing if the specified { @ code globbing threads } does not match the previous value ( initial value is 100 ) , then we { @ link fork join pool # shutdown ( ) } the old { @ link fork join pool } instance and make a new one

public void set globbing threads ( int globbing threads ) { if ( executor = = null ) { executor = make fork join pool ( globbing threads ) ; return ; } if ( executor get parallelism ( ) = = globbing threads ) { return ; } / / we don ' t use fork join pool # shutdown now since it has a performance bug see / / http : / / b / 33482341 # comment 1 3 executor shutdown ( ) ; executor = make fork join pool ( globbing threads ) ; }


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


visits the default value of this annotation interface method

public annotation visitor visit annotation default ( ) { if ( mv ! = null ) { return mv visit annotation default ( ) ; } return null ; }


reads window state generated using a { @ link reduce function }

public < t , k > data set < t > reduce ( string uid , reduce function < t > function , type information < k > key type , type information < t > reduce type ) throws i o exception { return reduce ( uid , function , new pass through reader < > ( ) , key type , reduce type , reduce type ) ; }


returns the current event - time watermark

public abstract long current watermark ( ) ;


request to disconnect from the remote peer and notify the { @ link channel future } once the operation completes , either because the operation was successful or because of an error the given { @ link channel promise } will be notified this will result in having the { @ link channel outbound handler # disconnect ( channel handler context , channel promise ) } method called of the next { @ link channel outbound handler } contained in the { @ link channel pipeline } of the { @ link channel }

channel future disconnect ( channel promise promise ) ;


returns the minimal range that { @ linkplain range # contains ( comparable ) contains } all of the given values the returned range is { @ linkplain bound type # closed closed } on both ends

public static < c extends comparable < ? > > range < c > enclose all ( iterable < c > values ) { check not null ( values ) ; if ( values instanceof sorted set ) { sorted set < ? extends c > set = cast ( values ) ; comparator < ? > comparator = set comparator ( ) ; if ( ordering natural ( ) equals ( comparator ) | | comparator = = null ) { return closed ( set first ( ) , set last ( ) ) ; } } iterator < c > value iterator = values iterator ( ) ; c min = check not null ( value iterator next ( ) ) ; c max = min ; while ( value iterator has next ( ) ) { c value = check not null ( value iterator next ( ) ) ; min = ordering natural ( ) min ( min , value ) ; max = ordering natural ( ) max ( max , value ) ; } return closed ( min , max ) ; }


return whether the advisors returned by the subclass are pre - filtered to match the bean ' s target class already , allowing the class filter check to be skipped when building advisors chains for aop invocations default is { @ code false } subclasses may override this if they will always return pre - filtered advisors

protected boolean advisors pre filtered ( ) { return false ; }


return whether results processing should be skipped

public boolean is skip results processing ( ) { return this skip results processing ; }


obtain the { @ link connection factory } for actual use

private connection factory obtain connection factory ( ) { return this connection factory ; }


configures whether hikari c p self - registers the { @ link hikari config m x bean } and { @ link hikari pool m x bean } in jmx

public void set register mbeans ( boolean register ) { check if sealed ( ) ; this is register mbeans = register ; }


public auto layout model view model value ( int value ) { on mutation ( ) ; this value int = value ; return this ; }


sets the downstream format , performs drm resource management , and populates the { @ code output format holder }

private void on format result ( format new format , format holder output format holder ) { boolean is first format = downstream format = = null ; @ nullable drm init data old drm init data = is first format ? null : downstream format drm init data ; downstream format = new format ; @ nullable drm init data new drm init data = new format drm init data ; output format holder format = new format copy with exo media crypto type ( drm session manager get exo media crypto type ( new format ) ) ; output format holder drm session = current drm session ; if ( ! is first format & & util are equal ( old drm init data , new drm init data ) ) { / / nothing to do return ; } / / ensure we acquire the new session before releasing the previous one in case the same session / / is being used for both drm init data @ nullable drm session previous session = current drm session ; current drm session = drm session manager acquire session ( playback looper , drm event dispatcher , new format ) ; output format holder drm session = current drm session ; if ( previous session ! = null ) { previous session release ( drm event dispatcher ) ; } }


creates a new { @ code listenable future } whose value is a list containing the values of all its successful input futures the list of results is in the same order as the input list , and if any of the provided futures fails or is canceled , its corresponding position will contain { @ code null } ( which is indistinguishable from the future having a successful value of { @ code null } ) the list of results is in the same order as the input list this differs from { @ link # all as list ( iterable ) } in that it ' s tolerant of failed futures for any of the items , representing them as { @ code null } in the result list canceling this future will attempt to cancel all the component futures

public static < v > listenable future < list < v > > successful as list ( iterable < ? extends listenable future < ? extends v > > futures ) { return new list future < v > ( immutable list copy of ( futures ) , false ) ; }


stores an alternative method to instantiate the { @ link producer factory } this allows experimenting with overridden producers

public image pipeline config builder set producer factory method ( producer factory method producer factory method ) { m producer factory method = producer factory method ; return m config builder ; }


tests if the pipeline is created properly

public void test request interceptor chain creation ( ) throws exception { r m admin request interceptor root = super get router r m admin service ( ) create request interceptor chain ( ) ; int index = 0 ; while ( root ! = null ) { / / the current pipeline is : / / pass through r m admin request interceptor - index = 0 / / pass through r m admin request interceptor - index = 1 / / pass through r m admin request interceptor - index = 2 / / mock client request interceptor - index = 3 switch ( index ) { case 0 : / / fall to the next case case 1 : / / fall to the next case case 2 : / / if index is equal to 0 , 1 or 2 we fall in this check assert assert equals ( pass through r m admin request interceptor class get name ( ) , root get class ( ) get name ( ) ) ; break ; case 3 : assert assert equals ( mock r m admin request interceptor class get name ( ) , root get class ( ) get name ( ) ) ; break ; default : assert fail ( ) ; } root = root get next interceptor ( ) ; index + + ; } assert assert equals ( " the number of interceptors in chain does not match " , 4 , index ) ; }


makes a new basic block for this method , which is empty besides a single { @ code goto } successors and predecessors are not yet set

public ssa basic block make new goto block ( ) { int new index = blocks size ( ) ; ssa basic block new block = new ssa basic block ( new index , max label + + , this ) ; new block get insns ( ) add ( get goto ( new block ) ) ; blocks add ( new block ) ; return new block ; }


returns the predeclared environment of a build file , with optional prelude

public immutable map < string , object > get environment ( @ nullable module prelude ) { immutable map builder < string , object > b = immutable map builder ( ) ; b put all ( starlark library build ) ; / / e g rule , select , depset b put all ( starlark native module bindings for build files ) ; b put ( " package " , new package function ( package arguments ) ) ; b put all ( rule functions ) ; for ( environment extension ext : environment extensions ) { ext update ( b ) ; } immutable map < string , object > env = b build ( ) ; if ( prelude ! = null ) { / / use hash map because of possibility of duplicate keys hash map < string , object > with prelude = maps new hash map ( env ) ; with prelude put all ( prelude get globals ( ) ) ; env = immutable map copy of ( with prelude ) ; } return env ; }


returns true iff this path denotes an existing regular or special file follows symbolic links for our purposes , " file " includes special files ( socket , fifo , block or char devices ) too ; it excludes symbolic links and directories

public boolean is file ( ) { return file system is file ( this , true ) ; }


fails the whole job graph in case an in - progress synchronous savepoint is discarded if the checkpoint was cancelled at the checkpoint coordinator , i e before the synchronous savepoint barrier was sent to the tasks , then we do not cancel the job as we do not risk having a deadlock

void handle synchronous savepoint failure ( final throwable cause ) { if ( ! is pre flight failure ( cause ) ) { failure callback fail job ( cause ) ; } }


public void test rename file ( ) throws exception { byte [ ] data = " dingos " get bytes ( ) ; path file 1 = touch ( local fs , name get method name ( ) to lower case ( ) + " 1 " ) ; path file 2 = new path ( local dir , name get method name ( ) to lower case ( ) + " 2 " ) ; assert true ( sftp fs rename ( file 1 , file 2 ) ) ; assert true ( sftp fs exists ( file 2 ) ) ; assert false ( sftp fs exists ( file 1 ) ) ; assert true ( local fs exists ( file 2 ) ) ; assert false ( local fs exists ( file 1 ) ) ; assert true ( sftp fs delete ( file 2 , false ) ) ; assert that ( ( ( s f t p file system ) sftp fs ) get connection pool ( ) get live conn count ( ) , is ( 1 ) ) ; }


returns the workspace directory , which is also the working dir of the server

public path get workspace ( ) { return workspace ; }


the allocation status status of the store { @ link allocation status # primary } indicates a primary shard copy { @ link allocation status # replica } indicates a replica shard copy { @ link allocation status # unused } indicates an unused shard copy

public allocation status get allocation status ( ) { return allocation status ; }


returns the value of the array at the given index , assuming this type is an float array

public float value float array load ( integer value index value , value factory value factory ) { return value factory create float value ( ) ; }


produce a nice string representation of the input object

protected static string string value of ( object value , boolean is nested ) { / / do something nice for arrays if ( value = = null ) { return " null " ; } if ( value get class ( ) is array ( ) ) { string builder sb = new string builder ( ) ; if ( value get class ( ) get component type ( ) is primitive ( ) ) { class < ? > primitive type = value get class ( ) get component type ( ) ; if ( primitive type = = integer type ) { int [ ] l = ( int [ ] ) value ; sb append ( " int [ " ) append ( l length ) append ( " ] { " ) ; for ( int j = 0 ; j < l length ; j + + ) { if ( j > 0 ) { sb append ( " , " ) ; } sb append ( string value of ( l [ j ] ) ) ; } sb append ( " } " ) ; } else if ( primitive type = = long type ) { long [ ] l = ( long [ ] ) value ; sb append ( " long [ " ) append ( l length ) append ( " ] { " ) ; for ( int j = 0 ; j < l length ; j + + ) { if ( j > 0 ) { sb append ( " , " ) ; } sb append ( string value of ( l [ j ] ) ) ; } sb append ( " } " ) ; } else { throw new runtime exception ( " please implement support for type " + primitive type get name ( ) + " in expression test case string value of ( ) " ) ; } } else if ( value get class ( ) get component type ( ) is array ( ) ) { list < object > l = arrays as list ( ( object [ ] ) value ) ; if ( ! is nested ) { sb append ( value get class ( ) get component type ( ) get name ( ) ) ; } sb append ( " [ " ) append ( l size ( ) ) append ( " ] { " ) ; int i = 0 ; for ( object object : l ) { if ( i > 0 ) { sb append ( " , " ) ; } i + + ; sb append ( string value of ( object , true ) ) ; } sb append ( " } " ) ; } else { list < object > l = arrays as list ( ( object [ ] ) value ) ; if ( ! is nested ) { sb append ( value get class ( ) get component type ( ) get name ( ) ) ; } sb append ( " [ " ) append ( l size ( ) ) append ( " ] { " ) ; int i = 0 ; for ( object object : l ) { if ( i > 0 ) { sb append ( " , " ) ; } i + + ; sb append ( string value of ( object ) ) ; } sb append ( " } " ) ; } return sb to string ( ) ; } else { return value to string ( ) ; } }


verify that the classloader that loaded this class is the classloader from which { @ link jenkins } has been started

public static void check jenkins j v m ( ) { if ( ! is jenkins j v m ( ) ) { throw new illegal state exception ( " not running on the jenkins master jvm " ) ; } }


thread pool executor get bounded list thread pool ( ) { return bounded list thread pool ; }


returns true if the given set of tags contains one with the given name

private boolean contains tag ( collection < function tag > tags , string name ) { for ( function tag tag : tags ) { if ( tag get name ( ) equals ( name ) ) { return true ; } } return false ; }


sets the value of the indexed component in the supplied array to the supplied value

static public void set ( object array , int index , object value ) { reflection cache get type ( array get class ( ) ) set array element ( array , index , value ) ; }


test if ' b ' is silent in these contexts

boolean test silent mb 1 ( ) { / / e g " lamb " , " comb " , " limb " , " dumb " , " bomb " / / handle combining roots first if ( ( ( m current = = 3 ) & & string at ( ( m current - 3 ) , 5 , " thumb " , " " ) ) | | ( ( m current = = 2 ) & & string at ( ( m current - 2 ) , 4 , " dumb " , " bomb " , " damn " , " lamb " , " numb " , " tomb " , " " ) ) ) { return true ; } return false ; }


list a path , verify that there are no direct child entries

protected void verify no listing ( final path path ) throws exception { intercept ( file not found exception class , ( ) - > { file status [ ] statuses = get file system ( ) list status ( path ) ; return arrays deep to string ( statuses ) ; } ) ; }


uploads a ( different ) byte array for each of the given jobs and verifies that deleting one of them ( via the { @ link blob cache service } ) does not influence the other

private void test delete ( @ nullable job i d job id 1 , @ nullable job i d job id 2 ) throws i o exception { final configuration config = new configuration ( ) ; config set string ( blob server options storage directory , temporary folder new folder ( ) get absolute path ( ) ) ; try ( blob server server = new blob server ( config , new void blob store ( ) ) ; blob cache service cache = new blob cache service ( config , new void blob store ( ) , new inet socket address ( " localhost " , server get port ( ) ) ) ) { server start ( ) ; byte [ ] data = new byte [ 2000000 ] ; rnd next bytes ( data ) ; byte [ ] data 2 = arrays copy of ( data , data length ) ; data 2 [ 0 ] ^ = 1 ; / / put first blob transient blob key key 1 = ( transient blob key ) put ( server , job id 1 , data , transient blob ) ; assert not null ( key 1 ) ; / / put two more b l o bs ( same key , other key ) for another job id transient blob key key 2a = ( transient blob key ) put ( server , job id 2 , data , transient blob ) ; assert not null ( key 2a ) ; blob key test verify key different hash equals ( key 1 , key 2a ) ; transient blob key key 2b = ( transient blob key ) put ( server , job id 2 , data 2 , transient blob ) ; assert not null ( key 2b ) ; blob key test verify key different hash different ( key 1 , key 2b ) ; / / issue a delete request assert true ( delete ( cache , job id 1 , key 1 ) ) ; / / delete only works on local cache ! assert true ( server get storage location ( job id 1 , key 1 ) exists ( ) ) ; / / delete on server so that the cache cannot re - download assert true ( server delete internal ( job id 1 , key 1 ) ) ; verify deleted ( cache , job id 1 , key 1 ) ; / / deleting one blob should not affect another blob with a different key / / ( and keys are always different now ) verify contents ( server , job id 2 , key 2a , data ) ; verify contents ( server , job id 2 , key 2b , data 2 ) ; / / delete first file of second job assert true ( delete ( cache , job id 2 , key 2a ) ) ; / / delete only works on local cache assert true ( server get storage location ( job id 2 , key 2a ) exists ( ) ) ; / / delete on server so that the cache cannot re - download assert true ( server delete internal ( job id 2 , key 2a ) ) ; verify deleted ( cache , job id 2 , key 2a ) ; verify contents ( server , job id 2 , key 2b , data 2 ) ; / / delete second file of second job assert true ( delete ( cache , job id 2 , key 2b ) ) ; / / delete only works on local cache assert true ( server get storage location ( job id 2 , key 2b ) exists ( ) ) ; / / delete on server so that the cache cannot re - download assert true ( server delete internal ( job id 2 , key 2b ) ) ; verify deleted ( cache , job id 2 , key 2b ) ; } }


reads characters and puts them into the { @ code target } character buffer

public int read ( char buffer target ) throws i o exception { if ( null = = target ) { throw new null pointer exception ( ) ; } int length = target length ( ) ; char [ ] buf = new char [ length ] ; length = math min ( length , read ( buf ) ) ; if ( length > 0 ) { target put ( buf , 0 , length ) ; } return length ; }


bind all mount unmount extension functions

void mount extensions ( context context , mount content content , @ nullable object layout data ) { bind ( ( list ) m mount unmount extensions , context , content , layout data ) ; }


only select process instances which have a variable value greater than the passed value booleans , byte - arrays and { @ link serializable } objects ( which are not primitive type wrappers ) are not supported

process instance query variable value greater than ( string name , object value ) ;


returns a builder that builds the unserialized type subclasses should override this method

builder < k , v > make builder ( int size ) { return new builder < > ( size ) ; }


do one traversal of the set to get the size the traversal costs cpu time so only do it when necessary the default case ( without - - experimental nestedset as skykey threshold ) will ignore this path

private static boolean eval inputs as nested set ( nested set < artifact > inputs ) { int nested set size threshold = artifact nested set function get size threshold ( ) ; if ( nested set size threshold = = 1 ) { / / don ' t even flatten in this case return true ; } return nested set size threshold > 0 & & ( inputs memoized flatten and get size ( ) > = nested set size threshold ) ; }


disable use of kryo serializer for all p o j os

public void disable force kryo ( ) { force kryo = false ; }


public void att n a m e test ( ) { / / todo : test att name }


returns the set of targets , in sorted order by function name

public set < function > get targets ( ) { return targets ; }


returns a writer for writing to this file using the default charset parent directories will be created if necessary

public writer writer ( boolean append ) { throw new gdx runtime exception ( " stub " ) ; }


returns the { @ linkplain token # boolean boolean } value of the next token , consuming it

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


clear the list of events that were last generated

public void clear last events ( ) { event mgr clear last events ( ) ; }


returns the current leader information if available otherwise it returns an empty optional

public optional < tuple 2 < string , uuid > > get leader now ( ) throws exception { completable future < tuple 2 < string , uuid > > leader future = this atomic leader future get ( ) ; if ( leader future ! = null ) { if ( leader future is done ( ) ) { return optional of ( leader future get ( ) ) ; } else { return optional empty ( ) ; } } else { return optional empty ( ) ; } }


returns the distance configured as radius

public double distance ( ) { return distance ; }


the host on which the { @ link r m app attempt } is runningran on


get the body of the request as a utf - 8 string and compare it to the given string

public request matcher string ( string expected content ) { return request - > { mock client http request mock request = ( mock client http request ) request ; assert equals ( " request content " , expected content , mock request get body as string ( ) ) ; } ; }


instantiate a dt manager in the renewal workflow : the manager is unbound ; tokens must still be issued and cancelled

public void test renewal through manager ( ) throws throwable { / / create without going through the dt manager , which is of course unbound token < delegation token identifier > dt = create token ( 0 , fsuri , owner , new text ( renewer ) ) ; / / create a dt manager in the renewer codepath abfs delegation token manager manager = new abfs delegation token manager ( conf ) ; stub delegation token manager stub = get token manager ( manager ) ; assert null ( " stub should not bebound " + stub , stub get fs u r i ( ) ) ; stub abfs token identifier dt id = ( stub abfs token identifier ) dt decode identifier ( ) ; string id str = dt id to string ( ) ; assert equals ( " uri in " + id str , fsuri , dt id get uri ( ) ) ; assert equals ( " renewer in " + id str , renewer , dt id get renewer ( ) to string ( ) ) ; manager renew delegation token ( dt ) ; assert equals ( " renewal count in " + stub , 1 , stub get renewals ( ) ) ; manager cancel delegation token ( dt ) ; assert equals ( " cancel count in " + stub , 1 , stub get cancellations ( ) ) ; / / closing the manager will close the stub too manager close ( ) ; assert true ( " not closed : " + stub , stub is closed ( ) ) ; }


public statement add resources ( collection < string > resources ) { resource add all ( resources ) ; return this ; }


public offset date time get ship date ( ) { return ship date ; }


determine whether this listener actually supports the given event type

boolean supports event type ( resolvable type event type ) ;


merge overlapping { @ link time window } s

public void merge windows ( collection < time window > windows , merge callback < time window > c ) { time window merge windows ( windows , c ) ; }


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


write out the xml for the external entry points

void write ( xml writer writer , address set view set , task monitor monitor ) throws cancelled exception { monitor set message ( " writing comments " ) ; if ( set = = null ) { set = program get memory ( ) ; } writer start element ( " comments " ) ; code unit iterator iter = listing get code unit iterator ( code unit comment property , set , true ) ; while ( iter has next ( ) ) { if ( monitor is cancelled ( ) ) { throw new cancelled exception ( ) ; } code unit cu = iter next ( ) ; for ( int i = 0 ; i < comment types length ; i + + ) { if ( monitor is cancelled ( ) ) { return ; } string comments = cu get comment ( comment types [ i ] ) ; if ( comments ! = null ) { write comment ( writer , cu get min address ( ) , comment tags [ i ] , comments ) ; } } } writer end element ( " comments " ) ; }


return the path of storageemulated 0 documents

public static string get external documents path ( ) { if ( ! utils bridge is s d card enable by environment ( ) ) return " " ; if ( build version sdk int < build version codes kitkat ) { return get absolute path ( environment get external storage directory ( ) ) + " / documents " ; } return get absolute path ( environment get external storage public directory ( environment directory documents ) ) ; }


create a new { @ link delete forecast request } that explicitly deletes all forecasts

public static delete forecast request delete all forecasts ( string job id ) { delete forecast request request = new delete forecast request ( job id ) ; request set forecast ids ( all ) ; return request ; }


private void visit package annotation ( direct class file cf , base annotations ann ) { if ( ! args e types contains ( element type package ) ) { return ; } string package name = cf get this class ( ) get class type ( ) get class name ( ) ; int slash index = package name last index of ( ' / ' ) ; if ( slash index = = - 1 ) { package name = " " ; } else { package name = package name substring ( 0 , slash index ) ; } for ( annotation an ann : ann get annotations ( ) get annotations ( ) ) { string ann class name = an ann get type ( ) get class type ( ) get class name ( ) ; if ( args aclass equals ( ann class name ) ) { print match package ( package name ) ; } } }


cleanup resources when the process exits

void cleanup resources ( int exit status ) { synchronized ( this ) { m shell pid = - 1 ; m shell exit status = exit status ; } / / stop the reader and writer threads , and close the i / o streams m terminal to process i o queue close ( ) ; m process to terminal i o queue close ( ) ; jni close ( m terminal file descriptor ) ; }


calculates the maximum value on a given column the value is returned with the same data type of the column lite pal max ( & quot ; person & quot ; , & quot ; age & quot ; , int class ) ; you can also specify a where clause when calculating lite pal where ( & quot ; age & gt ; ? & quot ; , & quot ; 15 & quot ; ) max ( & quot ; person & quot ; , & quot ; age & quot ; , integer type ) ;

public static < t > t max ( string table name , string column name , class < t > column type ) { return operator max ( table name , column name , column type ) ; }


gets the milliseconds that a stream may spend not writing any bytes before it is closed as inactive

public long get stream inactivity timeout ( ) { return stream inactivity timeout nanos / 1 000 000 ; }


resets statistics related to this cache pool

public void reset statistics ( ) { bytes needed = 0 ; bytes cached = 0 ; files needed = 0 ; files cached = 0 ; }


builds a predicate that will accept a cluster state only if it was generated after the current has ( re - ) joined the master

public static predicate < cluster state > build ( cluster state current state ) { final long current version = current state version ( ) ; final discovery node master node = current state nodes ( ) get master node ( ) ; final string current master id = master node = = null ? null : master node get ephemeral id ( ) ; return new state - > { final discovery node new master = new state nodes ( ) get master node ( ) ; final boolean accept ; if ( new master = = null ) { accept = false ; } else if ( new master get ephemeral id ( ) equals ( current master id ) = = false ) { accept = true ; } else { accept = new state version ( ) > current version ; } return accept ; } ; }


returns the current number of stored { @ link archived execution graph }


sets whether to return the field statistics for each term in the shard or skip

public term vectors request builder set field statistics ( boolean field statistics ) { request field statistics ( field statistics ) ; return this ; }


return the integer value of this status code

public int value ( ) { return this value ; }


creates a new tuple and assigns the given values to the tuple ' s fields this is more convenient than using the constructor , because the compiler can infer the generic type arguments implicitly for example : { @ code tuple 3 of ( n , x , s ) } instead of { @ code new tuple 3 < integer , double , string > ( n , x , s ) }


removes a timer event for this entry if present

public void deschedule ( @ non null node < k , v > node ) { unlink ( node ) ; node set next in variable order ( null ) ; node set previous in variable order ( null ) ; }


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


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 ) ; / /


cancel the async checkpoint runnable with given checkpoint id if given checkpoint id is not registered , return false , otherwise return true

private boolean cancel async checkpoint runnable ( long checkpoint id ) { async checkpoint runnable async checkpoint runnable ; synchronized ( lock ) { async checkpoint runnable = checkpoints remove ( checkpoint id ) ; } close quietly ( async checkpoint runnable ) ; return async checkpoint runnable ! = null ; }


configures gson to exclude all fields from consideration for serialization or deserialization that do not have the { @ link com google gson annotations expose } annotation

public gson builder exclude fields without expose annotation ( ) { excluder = excluder exclude fields without expose annotation ( ) ; return this ; }


required the ports associated with the external service if the endpoints are unix domain socket addresses , there must be exactly one port < code > repeated istio networking v 1alpha 3 port ports = 3 ; < code >

public builder add ports ( com alibaba nacos istio model port builder builder for value ) { if ( ports builder = = null ) { ensure ports is mutable ( ) ; ports add ( builder for value build ( ) ) ; on changed ( ) ; } else { ports builder add message ( builder for value build ( ) ) ; } return this ; }


returns a list of artifacts from ' provider ' that were registered by an aspect from ' aspect classes ' all artifacts in ' provider ' are considered - both direct and transitive

private static immutable list < artifact > filter transitive extra actions ( extra action artifacts provider provider , set < aspect class > aspect classes ) { immutable list builder < artifact > artifacts = immutable list builder ( ) ; / / add to ' artifacts ' all extra - actions which were registered by aspects which ' top level ' / / might have injected for ( artifact derived artifact artifact : provider get transitive extra action artifacts ( ) to list ( ) ) { action lookup key owner = artifact get artifact owner ( ) ; if ( owner instanceof aspect key ) { if ( aspect classes contains ( ( ( aspect key ) owner ) get aspect class ( ) ) ) { artifacts add ( artifact ) ; } } } return artifacts build ( ) ; }


void pre concat value to ( @ non null matrix on to ) { if ( ! can animate ) return ; on to pre concat ( build temp ( ) ) ; }


if is hidden returns true , the m bean won ' t be registered with m bean server , and thus won ' t be available for management tools used for grouping m beans


public static date date of ( final local date time ) { return date from ( time at start of day ( zone offset utc ) to instant ( ) ) ; }


method to capture symbol type that was unexpected as a global symbol

void witness global symbol type ( abstract ms symbol symbol ) { if ( ! expected global symbols contains ( symbol get pdb id ( ) ) ) { unexpected global symbols add ( symbol get class ( ) ) ; } }


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


get the { @ link request template # url ( ) } before feign reflective feign build template by resolving args # resolve ( object [ ] , request template , map ) put it into the { @ link path var interceptor # url context }

public void before method ( enhanced instance obj inst , method method , object [ ] all arguments , class < ? > [ ] arguments types , method intercept result result ) { request template template = ( request template ) all arguments [ 1 ] ; url context set ( new feign resolved u r l ( template url ( ) ) ) ; }


returns default parameter value for this definition

public parameter value get default parameter value ( ) { return null ; }


ensure we can round trip in serialization

public void test round trip ( ) throws i o exception { script exception e = new script exception ( " message data " , new exception ( " cause data " ) , arrays as list ( " stack 1 " , " stack 2 " ) , " source data " , " lang data " ) ; byte array output stream bytes = new byte array output stream ( ) ; stream output output = new data output stream output ( new data output stream ( bytes ) ) ; e write to ( output ) ; output close ( ) ; stream input input = new input stream stream input ( new byte array input stream ( bytes to byte array ( ) ) ) ; script exception e 2 = new script exception ( input ) ; input close ( ) ; assert equals ( e get message ( ) , e 2 get message ( ) ) ; assert equals ( e get script stack ( ) , e 2 get script stack ( ) ) ; assert equals ( e get script ( ) , e 2 get script ( ) ) ; assert equals ( e get lang ( ) , e 2 get lang ( ) ) ; assert null ( e get pos ( ) ) ; / / ensure non - null position also works e = new script exception ( e get message ( ) , e get cause ( ) , e get script stack ( ) , e get script ( ) , e get lang ( ) , new script exception position ( 1 , 0 , 2 ) ) ; bytes = new byte array output stream ( ) ; output = new data output stream output ( new data output stream ( bytes ) ) ; e write to ( output ) ; output close ( ) ; input = new input stream stream input ( new byte array input stream ( bytes to byte array ( ) ) ) ; e 2 = new script exception ( input ) ; input close ( ) ; assert equals ( e get pos ( ) , e 2 get pos ( ) ) ; }


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

public pinot query generator context with limit ( long limit ) { int int limit = check for valid limit ( limit ) ; check supported ( ! has limit ( ) , " limit already exists pinot doesn ' t support limit on top of another limit " ) ; return new pinot query generator context ( selections , outputs , from , filter , aggregations , group by columns , top n column information map , optional int of ( int limit ) , variables in aggregation , hidden column set , use sql syntax ) ; }


update the version associated with the specified checkout

synchronized void update checkout ( long checkout id , int version ) throws i o exception { validate ( ) ; item checkout status co status = checkouts remove ( checkout id ) ; if ( co status ! = null ) { checkout type checkout type = co status get checkout type ( ) ; co status = new item checkout status ( checkout id , checkout type , co status get user ( ) , version , ( new date ( ) ) get time ( ) , co status get project path ( ) ) ; checkouts put ( checkout id , co status ) ; if ( checkout type ! = checkout type transient ) { try { write checkouts file ( ) ; } catch ( i o exception e ) { item log ( " error ! failed to update checkout version " , co status get user ( ) ) ; } } } }


processes query bounds into { @ code long } s and delegates the provided { @ code builder } to build a range query

public static query long range query ( object lower term , object upper term , boolean include lower , boolean include upper , bi function < long , long , query > builder ) { long l = long min value ; long u = long max value ; if ( lower term ! = null ) { l = object to long ( lower term , true ) ; / / if the lower bound is decimal : / / - if the bound is positive then we increment it : / / if lower term = 1 5 then the ( inclusive ) bound becomes 2 / / - if the bound is negative then we leave it as is : / / if lower term = - 1 5 then the ( inclusive ) bound becomes - 1 due to the call to long value boolean lower term has decimal part = has decimal part ( lower term ) ; if ( ( lower term has decimal part = = false & & include lower = = false ) | | ( lower term has decimal part & & signum ( lower term ) > 0 ) ) { if ( l = = long max value ) { return new match no docs query ( ) ; } + + l ; } } if ( upper term ! = null ) { u = object to long ( upper term , true ) ; boolean upper term has decimal part = has decimal part ( upper term ) ; if ( ( upper term has decimal part = = false & & include upper = = false ) | | ( upper term has decimal part & & signum ( upper term ) < 0 ) ) { if ( u = = long min value ) { return new match no docs query ( ) ; } - - u ; } } return builder apply ( l , u ) ; }


for the given { @ code used modules } , looks up modules discovered by their generating actions the returned value only contains a map from elements of { @ code used modules } to the { @ link # discovered modules } required to use them if dependent actions have not been executed yet ( and thus { @ link # discovered modules } aren ' t known yet , returns null

private static map < artifact , nested set < ? extends artifact > > compute transitively used modules ( sky function environment env , collection < artifact derived artifact > used modules ) throws interrupted exception { map < sky key , sky value > action execution values = env get values ( iterables transform ( used modules , artifact derived artifact : : get generating action key ) ) ; if ( env values missing ( ) ) { return null ; } immutable map builder < artifact , nested set < ? extends artifact > > transitively used modules = immutable map builder with expected size ( used modules size ( ) ) ; for ( artifact derived artifact module : used modules ) { preconditions check state ( module is file type ( cpp file types cpp module ) , " non - module ? % s " , module ) ; action execution value value = preconditions check not null ( ( action execution value ) action execution values get ( module get generating action key ( ) ) , module ) ; transitively used modules put ( module , value get discovered modules ( ) ) ; } return transitively used modules build ( ) ; }


if the base object is a map , returns the most general acceptable type for a value in this map if the base is a map , the property resolved property of the e l context object must be set to true by this resolver , before returning if this property is not true after this method is called , the caller should ignore the return value assuming the base is a map , this method will always return object class this is because maps accept any object as the value for a given key

public class < ? > get type ( e l context context , object base , object property ) { if ( context = = null ) { throw new null pointer exception ( " context is null " ) ; } class < ? > result = null ; if ( is resolvable ( base ) ) { result = object class ; context set property resolved ( true ) ; } return result ; }


public namenode bean metrics get namenode metrics ( ) throws i o exception { if ( this metrics = = null ) { throw new i o exception ( " namenode metrics is not initialized " ) ; } return this metrics get namenode metrics ( ) ; }


validates the given package name and returns a canonical { @ link package identifier } instance if it is valid otherwise it throws a syntax exception

private static package identifier validate package name ( string package identifier , string name , string repo , immutable map < repository name , repository name > repository mapping ) throws label syntax exception { string error = null ; try { return package identifier parse ( package identifier , repo , repository mapping ) ; } catch ( label syntax exception e ) { error = e get message ( ) ; error = " invalid package name ' " + package identifier + " ' : " + error ; / / this check is just for a more helpful error message / / i e valid target name , invalid package name , colon - free label form / / used = > probably they meant " / / foo : bar c " not " / / foo / bar c " if ( package identifier ends with ( " / " + name ) ) { error + = " ( perhaps you meant \ " : " + name + " \ " ? ) " ; } throw new label syntax exception ( error ) ; } }


public boolean is reference ( object bean , string bean name ) { for ( remoting parser remoting parser : all remoting parsers ) { if ( remoting parser is reference ( bean , bean name ) ) { return true ; } } return false ; }


returns an immutable multimap containing the given entries , in the " key - grouped " insertion order described in the < a href = " # iteration " > class documentation

public static < k , v > immutable multimap < k , v > of ( k k 1 , v v 1 , k k 2 , v v 2 , k k 3 , v v 3 , k k 4 , v v 4 , k k 5 , v v 5 ) { return immutable list multimap of ( k 1 , v 1 , k 2 , v 2 , k 3 , v 3 , k 4 , v 4 , k 5 , v 5 ) ; } / / looking for of ( ) with > 5 entries ? use the builder instead


parse a simple classpath with two elements on unix

public void test parse class path unix ( ) throws exception { assume true ( " test is designed for unix - like systems only " , " : " equals ( system get property ( " path separator " ) ) ) ; assume true ( " test is designed for unix - like systems only " , " / " equals ( system get property ( " file separator " ) ) ) ; path element 1 = create temp dir ( ) ; path element 2 = create temp dir ( ) ; set < url > expected = as set ( element 1 to uri ( ) to u r l ( ) , element 2 to uri ( ) to u r l ( ) ) ; assert equals ( expected , jar hell parse class path ( element 1 to string ( ) + " : " + element 2 to string ( ) ) ) ; }


public list < list < big decimal > > get array array number ( ) { return array array number ; }


public void process ( i node inode ) { if ( inode ! = null ) { inode destroy and collect blocks ( reclaim context ) ; } }


checks if the rectangle intersects the provided triangle

private boolean intersects line ( int a x , int a y , int b x , int b y ) { / / 1 query contains any triangle points if ( contains ( a x , a y ) | | contains ( b x , b y ) ) { return true ; } / / compute bounding box of triangle int t min x = strict math min ( a x , b x ) ; int t max x = strict math max ( a x , b x ) ; int t min y = strict math min ( a y , b y ) ; int t max y = strict math max ( a y , b y ) ; / / 2 check bounding boxes are disjoint if ( t max x < = min x | | t min x > max x | | t min y > max y | | t max y < = min y ) { return false ; } / / 4 last ditch effort : check crossings if ( edge intersects query ( a x , a y , b x , b y ) ) { return true ; } return false ; }


record the effects of a { @ link file system # rename ( path , path ) } in the metadata store clients provide explicit enumeration of the affected paths ( recursively ) , before and after the rename this operation is not atomic , unless specific implementations claim otherwise on the need to provide an enumeration of directory trees instead of just source and destination paths : since a metadata store does not have to track all metadata for the underlying storage system , and a new metadata store may be created on an existing underlying filesystem , this move ( ) may be the first time the metadata store sees the affected paths therefore , simply providing src and destination paths may not be enough to record the deletions ( under src path ) and creations ( at destination ) that are happening during the rename ( )

void move ( @ nullable collection < path > paths to delete , @ nullable collection < path metadata > paths to create , @ nullable bulk operation state operation state ) throws i o exception ;


boolean is running ( long allocation id ) { return running datafeeds on this node contains key ( allocation id ) ; }


disposes of all resources this vertex buffer object uses

public void dispose ( ) { gl20 gl = gdx gl 2 0 ; gl gl bind buffer ( gl20 gl array buffer , 0 ) ; gl gl delete buffer ( buffer handle ) ; buffer handle = 0 ; }


returns a { @ link file java io file } with the data from the requested fsrl simple local files will be returned directly , and files nested in containers will be located in the file cache directory and have a ' random ' name never returns nulls , throws i o exception if not found or error

public file get file ( fsrl fsrl , task monitor monitor ) throws cancelled exception , i o exception { if ( fsrl get nesting depth ( ) = = 1 ) { / / if this is a real files on the local filesystem , verify any / / md5 embedded in the fsrl before returning the live local file / / as the result file f = local f s get local file ( fsrl ) ; if ( f is file ( ) & & fsrl get m d 5 ( ) ! = null ) { if ( ! file fingerprint cache contains ( f get path ( ) , fsrl get m d 5 ( ) , f last modified ( ) , f length ( ) ) ) { string file m d 5 = f s utilities get file m d 5 ( f , monitor ) ; if ( ! fsrl get m d 5 ( ) equals ( file m d 5 ) ) { throw new i o exception ( " exact file no longer exists : " + f get path ( ) + " contents have changed , old md 5 : " + fsrl get m d 5 ( ) + " , new md 5 : " + file m d 5 ) ; } file fingerprint cache add ( f get path ( ) , file m d 5 , f last modified ( ) , f length ( ) ) ; } } return f ; } file cache entry fce = get cache file ( fsrl , monitor ) ; return fce file ; }


return { @ link http message reader http message readers } to read and decode the response body with

list < http message reader < ? > > message readers ( ) ;


lower - case label of this node in the service graph , such as " favstar " leave absent if unknown this is a primary label for trace lookup and aggregation , so it should be intuitive and consistent many use a name from service discovery

@ nullable public string service name ( ) { return service name ; }


return a { @ link runfiles supplier } encapsulating runfiles for this tool

public runfiles supplier get runfiles supplier ( ) { if ( runfiles support ! = null ) { return runfiles supplier impl create ( runfiles support ) ; } else { return empty runfiles supplier instance ; } }


sets image drawable into this image aware view < br > displays drawable in this image aware view { @ linkplain com nostra 1 3 universalimageloader core display image options builder # show image for empty uri ( android graphics drawable drawable ) for empty uri } , { @ linkplain com nostra 1 3 universalimageloader core display image options builder # show image on loading ( android graphics drawable drawable ) on loading } or { @ linkplain com nostra 1 3 universalimageloader core display image options builder # show image on fail ( android graphics drawable drawable ) on loading fail } these drawables can be specified in { @ linkplain com nostra 1 3 universalimageloader core display image options display options } < br > also can be called in { @ link com nostra 1 3 universalimageloader core display bitmap displayer bitmap displayer } < br > is called on ui thread if image loader was called on ui thread otherwise - on background thread

boolean set image drawable ( drawable drawable ) ;


add the given interceptor to the end of this chain

public void add interceptor ( handler interceptor interceptor ) { this interceptor list add ( interceptor ) ; }


each argument is formatted via { @ link single string arg formatter # format }

public builder format ( @ compile time constant string format each ) { preconditions check not null ( format each ) ; this format each = format each ; return this ; }


private void compute ( final string name , summation sigma ) throws i o exception { if ( sigma get value ( ) ! = null ) throw new i o exception ( " sigma get value ( ) ! = null , sigma = " + sigma ) ; / / setup remote directory final file system fs = file system get ( get conf ( ) ) ; final path dir = fs make qualified ( new path ( parameters remote dir , name ) ) ; if ( ! util create nonexisting directory ( fs , dir ) ) return ; / / setup a job final job job = create job ( name , sigma ) ; final path outdir = new path ( dir , " out " ) ; file output format set output path ( job , outdir ) ; / / start a map / reduce job final string startmessage = " steps / parts = " + sigma e get steps ( ) + " / " + parameters n parts + " = " + util long 2string ( sigma e get steps ( ) / parameters n parts ) ; util run job ( name , job , parameters machine , startmessage , timer ) ; final list < task result > results = util read job outputs ( fs , outdir ) ; util write results ( name , results , fs , parameters remote dir ) ; fs delete ( dir , true ) ; / / combine results final list < task result > combined = util combine ( results ) ; final print writer out = util create writer ( parameters local dir , name ) ; try { for ( task result r : combined ) { final string s = task result 2string ( name , r ) ; out println ( s ) ; out flush ( ) ; util out println ( s ) ; } } finally { out close ( ) ; } if ( combined size ( ) = = 1 ) { final summation s = combined get ( 0 ) get element ( ) ; if ( sigma contains ( s ) & & s contains ( sigma ) ) sigma set value ( s get value ( ) ) ; } }


the { @ link index privilege # values ( ) } map is sorted so that privilege names that offer the least access come before those that offer more access there is no guarantee of ordering between privileges that offer non - overlapping privileges

public void test ordering of privilege names ( ) throws exception { final set < string > names = index privilege values ( ) key set ( ) ; final int all = iterables index of ( names , " all " : : equals ) ; final int manage = iterables index of ( names , " manage " : : equals ) ; final int monitor = iterables index of ( names , " monitor " : : equals ) ; final int read = iterables index of ( names , " read " : : equals ) ; final int write = iterables index of ( names , " write " : : equals ) ; final int index = iterables index of ( names , " index " : : equals ) ; final int create doc = iterables index of ( names , " create doc " : : equals ) ; final int delete = iterables index of ( names , " delete " : : equals ) ; assert that ( read , less than ( all ) ) ; assert that ( manage , less than ( all ) ) ; assert that ( monitor , less than ( manage ) ) ; assert that ( write , less than ( all ) ) ; assert that ( index , less than ( write ) ) ; assert that ( create doc , less than ( index ) ) ; assert that ( delete , less than ( write ) ) ; }


test that program diff can correctly determine which addresses are in common between program 1 and program 2


return the the maximum number of entries in the cache ( 0 indicates no caching , always generating a new value )

public int size limit ( ) { return this size limit ; }


async observable and semaphore isolation with functioning request context use hystrix context scheduler to make the user provided scheduler capture context

public void test successful request context with thread isolated asynchronous observable and captured context scheduler ( ) { request context test results results = test request context on success ( execution isolation strategy thread , new hystrix context scheduler ( schedulers new thread ( ) ) ) ; assert true ( results is context initialized get ( ) ) ; / / the user scheduler captures context assert true ( results origin thread get ( ) get name ( ) starts with ( " rx new thread " ) ) ; / / the user provided thread / scheduler assert true ( results is context initialized observe on get ( ) ) ; / / the user scheduler captures context assert true ( results observe on thread get ( ) get name ( ) starts with ( " rx new thread " ) ) ; / / thread isolated assert true ( results command is executed in thread ( ) ) ; }


the source that caused this searcher to be acquired

public string source ( ) { return source ; }


multi value map < string , cookie > cookies ( ) ;


need to override so as to remove the verify listener

protected void unhook listeners ( ) { super unhook listeners ( ) ; text text = ( text ) get cell editor ( ) get control ( ) ; text remove verify listener ( verify listener ) ; verify listener = null ; }


returns the < a href = " http : en wikipedia orgwiki arithmetic mean " > arithmetic mean of the values the count must be non - zero if these values are a sample drawn from a population , this is also an unbiased estimator of the arithmetic mean of the population < h 3 > non - finite values < h 3 > if the dataset contains { @ link double # na n } then the result is { @ link double # na n } if it contains both { @ link double # positive infinity } and { @ link double # negative infinity } then the result is { @ link double # na n } if it contains { @ link double # positive infinity } and finite values only or { @ link double # positive infinity } only , the result is { @ link double # positive infinity } if it contains { @ link double # negative infinity } and finite values only or { @ link double # negative infinity } only , the result is { @ link double # negative infinity }

public double mean ( ) { check state ( count ! = 0 ) ; return mean ; }


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


create mount links as follows hdfs : localhost : xxx h d f s user - - > hdfs : localhost : xxx h d f s user hdfs : localhost : xxxlocal - - > file : test root d i rroot list status non mount directory should fail

public void test list status on non mounted path ( ) throws exception { final path hdfs target path = new path ( default f s u r i + hdfs user folder ) ; add mount links ( default f s u r i get authority ( ) , new string [ ] { hdfs user folder , local folder } , new string [ ] { hdfs target path to uri ( ) to string ( ) , local target dir to u r i ( ) to string ( ) } , conf ) ; try ( file system fs = file system get ( conf ) ) { fs list status ( new path ( " / non mount " ) ) ; assert fail ( " it should fail as no mount link with / non mount " ) ; } }


instantiate & amp ; start a single datanode daemon and wait for it to finish if this thread is specifically interrupted , it will stop waiting

public static data node create data node ( string args [ ] , configuration conf , secure resources resources ) throws i o exception { data node dn = instantiate data node ( args , conf , resources ) ; if ( dn ! = null ) { dn run datanode daemon ( ) ; } return dn ; }