for a given application , checks for the privileges for resources and returns an instance of { @ link resource privileges map } holding a map of resource to { @ link resource privileges } where the resource is application resource and the map of application privilege to whether it is allowed or not

public resource privileges map check application resource privileges ( final string application name , set < string > check for resources , set < string > check for privilege names , collection < application privilege descriptor > stored privileges ) { return application check resource privileges ( application name , check for resources , check for privilege names , stored privileges ) ; }


returns a string containing additional documentation about the method ' s return value returns an empty string by default

public string get return type extra message ( ) { return " " ; }


public static boolean fully delete ( final file dir ) { boolean result = file util fully delete ( dir ) ; return result ; }


sets the listener for key status change events this is an optional method , and some implementations may only support it on certain android api levels

void set on key status change listener ( @ nullable on key status change listener listener ) ;


public void set icon ( image icon icon ) { root set icon ( icon ) ; }


public class < ? > node to class ( class node node ) { if ( super find loaded class ( node name replace ( " / " , " " ) ) ! = null ) return find loaded class ( node name replace ( " / " , " " ) ) ; class writer cw = new class writer ( class writer compute maxs ) ; try { node accept ( cw ) ; } catch ( exception e ) { e print stack trace ( ) ; } byte [ ] b = cw to byte array ( ) ; return define class ( node name replace all ( " / " , " " ) , b , 0 , b length , get domain ( ) ) ; }


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


protected void handle saml 2 profile s l o redirect request ( final http servlet response response , final http servlet request request ) throws exception { val decoder = get saml profile handler configuration context ( ) get saml message decoders ( ) get instance ( http method get ) ; handle slo profile request ( response , request , decoder ) ; }


register hole class public static methods in the context

public void register func ( class < ? > clz ) { method [ ] methods = clz get declared methods ( ) ; for ( method method : methods ) { int mod = method get modifiers ( ) ; if ( modifier is static ( mod ) & & modifier is public ( mod ) ) { register func ( method get name ( ) , method ) ; } } }


registers the given type with the serialization stack if the type is eventually serialized as a pojo , then the type is registered with the pojo serializer if the type ends up being serialized with kryo , then it will be registered at kryo to make sure that only tags are written

public void register type ( class < ? > type ) { if ( type = = null ) { throw new null pointer exception ( " cannot register null type class " ) ; } type information < ? > type info = type extractor create type info ( type ) ; if ( type info instanceof pojo type info ) { config register pojo type ( type ) ; } else { config register kryo type ( type ) ; } }


checks if image header bytes starts with soi ( start of image ) marker , followed by 0x f f if header size is lower than 3 false is returned description of jpeg format can be found here : < a href = " http : www w 3 org graphics j p e gitu - t 8 1 pdf " > http : www w 3 org graphics j p e gitu - t 8 1 pdf annex b deals with compressed data format

private static boolean is jpeg header ( final byte [ ] image header bytes , final int header size ) { return header size > = jpeg header length & & image format checker utils starts with pattern ( image header bytes , jpeg header ) ; }


public boolean is empty ( ) { return size = = 0 ; }


returns the active profiler , or null if inactive

static cpu profiler get ( ) { return instance ; }


get value to use when sorting by a descendant of this aggregation

public double sort value ( aggregation path path element head , iterator < aggregation path path element > tail ) { / / subclasses will override this with a real implementation if you can sort on a descendant throw new illegal argument exception ( " can ' t sort by a descendant of a [ " + get type ( ) + " ] aggregation [ " + head + " ] " ) ; }


returns the dts format given { @ code data } containing the dts frame according to etsi ts 102 114 subsections 5 35 4

public static format parse dts format ( byte [ ] frame , @ nullable string track id , @ nullable string language , @ nullable drm init data drm init data ) { parsable bit array frame bits = get normalized frame header ( frame ) ; frame bits skip bits ( 32 + 1 + 5 + 1 + 7 + 14 ) ; / / sync , ftype , short , cpf , nblks , fsize int amode = frame bits read bits ( 6 ) ; int channel count = channels by amode [ amode ] ; int sfreq = frame bits read bits ( 4 ) ; int sample rate = sample rate by sfreq [ sfreq ] ; int rate = frame bits read bits ( 5 ) ; int bitrate = rate > = twice bitrate kbps by rate length ? format no value : twice bitrate kbps by rate [ rate ] * 1000 / 2 ; frame bits skip bits ( 10 ) ; / / mix , dynf , timef , auxf , hdcd , ext audio id , ext audio , aspf channel count + = frame bits read bits ( 2 ) > 0 ? 1 : 0 ; / / lff return new format builder ( ) set id ( track id ) set sample mime type ( mime types audio dts ) set average bitrate ( bitrate ) set channel count ( channel count ) set sample rate ( sample rate ) set drm init data ( drm init data ) set language ( language ) build ( ) ; }


creates a { @ code rate limiter } with the specified stable throughput , given as " permits per second " ( commonly referred to as qps , queries per second ) the returned { @ code rate limiter } ensures that on average no more than { @ code permits per second } are issued during any given second , with sustained requests being smoothly spread over each second when the incoming request rate exceeds { @ code permits per second } the rate limiter will release one permit every { @ code ( 1 0 permits per second ) } seconds when the rate limiter is unused , bursts of up to { @ code permits per second } permits will be allowed , with subsequent requests being smoothly limited at the stable rate of { @ code permits per second }

public static rate limiter create ( double permits per second ) { / * * the default rate limiter configuration can save the unused permits of up to one second this * is to avoid unnecessary stalls in situations like this : a rate limiter of 1qps , and 4 threads , * all calling acquire ( ) at these moments : * * t0 at 0 seconds * t1 at 1 05 seconds * t2 at 2 seconds * t3 at 3 seconds * * due to the slight delay of t1 , t2 would have to sleep till 2 05 seconds , and t3 would also * have to sleep till 3 05 seconds * / return create ( permits per second , sleeping stopwatch create from system timer ( ) ) ; }


public boolean add token ( text alias , token < ? extends token identifier > token ) { synchronized ( subject ) { get credentials internal ( ) add token ( alias , token ) ; return true ; } }


returns the hostname verifier it should be used in https u r l connections

public hostname verifier get hostname verifier ( ) { if ( mode ! = mode client ) { throw new illegal state exception ( " factory is not in client mode actual mode is " + mode to string ( ) ) ; } return hostname verifier ; }


returns true iff the given settings have a data tier setting configured

public static boolean is explicit data tier ( settings settings ) { / * * this method can be called before the o e n node role settings node roles setting is * initialized we do not want to trigger initialization prematurely because that will bake * the default roles before plugins have had a chance to register them therefore , * to avoid initializing this setting prematurely , we avoid using the actual node roles * setting instance here in favor of the string * / if ( settings has value ( " node roles " ) ) { return settings get as list ( " node roles " ) stream ( ) any match ( data tier : : valid tier name ) ; } return false ; }


wraps a given listener and returns a new listener which makes sure { @ link # on response ( object ) } and { @ link # on failure ( exception ) } of the provided listener will be called at most once

static < response > action listener < response > notify once ( action listener < response > delegate ) { return new notify once listener < response > ( ) { @ override protected void inner on response ( response response ) { delegate on response ( response ) ; } @ override protected void inner on failure ( exception e ) { delegate on failure ( e ) ; } } ; }


public float get float item ( ) { return float item ; }


public static recursive descent solver get solver ( ) { return solver ; }


return whether this is an optional value , that is , to be ignored when no corresponding property exists on the target class

public boolean is optional ( ) { return this optional ; }


writes the authentication to the { @ link thread context } and then calls the listener if successful

void write auth to context ( authentication authentication ) { runnable action = ( ) - > { logger trace ( " established authentication [ { } ] for request [ { } ] " , authentication , request ) ; listener on response ( authentication ) ; } ; try { authentication serializer write to context ( authentication , thread context ) ; request authentication success ( authentication ) ; / / header for operator privileges will only be written if authentication actually happens , / / i e not read from either header or transient header operator privileges service maybe mark operator user ( authentication , thread context ) ; } catch ( exception e ) { action = ( ) - > { logger debug ( new parameterized message ( " failed to store authentication [ { } ] for request [ { } ] " , authentication , request ) , e ) ; listener on failure ( request exception processing request ( e , authentication token ) ) ; } ; } / / we assign the listener call to an action to avoid calling the listener within a try block and auditing the wrong thing / / when an exception bubbles up even after successful authentication action run ( ) ; }


return whether the quick search option is on

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


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


void remove tree listener ( ) { tree remove tree listener ( ) ; }


called when the captured view ' s position changes as the result of a drag or settle

public void on view position changed ( view changed view , int left , int top , int dx , int dy ) { }


the period of time for how frequently the control group from { @ link cgroup # cpu control group } has its access to cpu resources reallocated

public long get cpu cfs period micros ( ) { return cpu cfs period micros ; }


creates a new { @ link silence media source }

public silence media source create media source ( ) { assertions check state ( duration us > 0 ) ; return new silence media source ( duration us , media item build upon ( ) set tag ( tag ) build ( ) ) ; }


enqueue a qjm for closing during shutdown this makes the code a little easier to follow , with fewer try finally clauses necessary

private quorum journal manager close later ( quorum journal manager qjm ) { to close add ( qjm ) ; return qjm ; }


sets symbol conflicts to always be overwritten

public void set overwrite symbol conflicts ( boolean b ) { overwrite symbol conflicts = b ; }


public void add scheduler ( ) { if ( is set ( " scheduler " ) ) { configuration set scheduler factory ( factory creator factory of ( merged get string ( " scheduler " ) ) ) ; } }


public void set capacity ( long capacity ) { this capacity = capacity ; }


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


public string get name ( ) { return get contents name ( ) + " " + stream index ; }


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

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


append an additional keyvalue pair to an existing { @ link object name } with the key being the static value { @ code identity } and the value being the identity hash code of the managed resource being exposed on the supplied { @ link object name } this can be used to provide a unique { @ link object name } for each distinct instance of a particular bean or class useful when generating { @ link object name object names } at runtime for a set of managed resources based on the template value supplied by a { @ link org springframework jmx export naming object naming strategy }

public static object name append identity to object name ( object name object name , object managed resource ) throws malformed object name exception { hashtable < string , string > key properties = object name get key property list ( ) ; key properties put ( identity object name key , object utils get identity hex string ( managed resource ) ) ; return object name manager get instance ( object name get domain ( ) , key properties ) ; }


return the path of storageemulated 0 androiddatapackagefiles alarms

public static string get external app alarms path ( ) { if ( ! utils bridge is s d card enable by environment ( ) ) return " " ; return get absolute path ( utils get app ( ) get external files dir ( environment directory alarms ) ) ; }


your model must override this method if the model can ' t always determine the exact composition of the exception handling data structure and its size

protected void check data type ( ) throws invalid data type exception { / / override this method if the model can ' t create the data type or doesn ' t know its size }


runs the given operation within the event loop thread of the given { @ link channel }

static void run in channel ( channel channel , final http 2 runnable runnable ) { channel event loop ( ) execute ( new runnable ( ) { @ override public void run ( ) { try { runnable run ( ) ; } catch ( http 2 exception e ) { throw new runtime exception ( e ) ; } } } ) ; }


returns the escaped form of a given literal string , starting at the given index this method is called by the { @ link # escape ( string ) } method when it discovers that escaping is required it is protected to allow subclasses to override the fastpath escaping function to inline their escaping test see { @ link char escaper builder } for an example usage

protected final string escape slow ( string s , int index ) { int slen = s length ( ) ; / / get a destination buffer and setup some loop variables char [ ] dest = platform char buffer from thread local ( ) ; int dest size = dest length ; int dest index = 0 ; int last escape = 0 ; / / loop through the rest of the string , replacing when needed into the / / destination buffer , which gets grown as needed as well for ( ; index < slen ; index + + ) { / / get a replacement for the current character char [ ] r = escape ( s char at ( index ) ) ; / / if no replacement is needed , just continue if ( r = = null ) { continue ; } int rlen = r length ; int chars skipped = index - last escape ; / / this is the size needed to add the replacement , not the full size / / needed by the string we only regrow when we absolutely must , and / / when we do grow , grow enough to avoid excessive growing grow int size needed = dest index + chars skipped + rlen ; if ( dest size < size needed ) { dest size = size needed + dest pad multiplier * ( slen - index ) ; dest = grow buffer ( dest , dest index , dest size ) ; } / / if we have skipped any characters , we need to copy them now if ( chars skipped > 0 ) { s get chars ( last escape , index , dest , dest index ) ; dest index + = chars skipped ; } / / copy the replacement string into the dest buffer as needed if ( rlen > 0 ) { system arraycopy ( r , 0 , dest , dest index , rlen ) ; dest index + = rlen ; } last escape = index + 1 ; } / / copy leftover characters if there are any int chars left = slen - last escape ; if ( chars left > 0 ) { int size needed = dest index + chars left ; if ( dest size < size needed ) { / / regrow and copy , expensive ! no padding as this is the final copy dest = grow buffer ( dest , dest index , size needed ) ; } s get chars ( last escape , slen , dest , dest index ) ; dest index = size needed ; } return new string ( dest , 0 , dest index ) ; }


increment the value by one this method is thread safe , the metrics provider will take care of synchronization


return the configured { @ link path matcher }

public path matcher get path matcher ( ) { return this path matcher ; }


returns a file whose name matches { @ code filename } , or null if no file was found

public static byte [ ] get file ( file apk file , string filename ) throws i o exception { map < string , byte [ ] > files = get files ( apk file , pattern quote ( filename ) ) ; return files get ( filename ) ; }


returns the validation errors accumulated

public final list < string > validation errors ( ) { return validation errors ; }


called in response to { @ link job # do do delete ( stapler request , stapler response ) }

public void on deleted ( top level item item ) throws i o exception { item listener fire on deleted ( item ) ; items remove ( item get name ( ) ) ; / / for compatibility with old views : for ( view v : views ) v on job renamed ( item , item get name ( ) , null ) ; }


public maven artifact repository get repository ( ) { return repository ; }


returns the color drawing borders around the bars

public int get bar border color ( ) { return m bar border color ; }


converts an i o excpetion ( not subclasses ) to socket exception this is typically done to indicate to upper layers that the error was a socket error rather than often more serious exceptions like disk errors

private static i o exception ioe to socket exception ( i o exception ioe ) { if ( ioe get class ( ) equals ( i o exception class ) ) { / / " se " could be a new class in stead of socket exception i o exception se = new socket exception ( " original exception : " + ioe ) ; se init cause ( ioe ) ; / * change the stacktrace so that original trace is not truncated * when printed * / se set stack trace ( ioe get stack trace ( ) ) ; return se ; } / / otherwise just return the same exception return ioe ; }


< code > optional string foo = 1 ; < code >


returns the entirety of the specified input stream and returns it as a char array , decoding characters using iso - 8859 - 1 ( latin 1 )

public static char [ ] read content as latin 1 ( input stream in ) throws i o exception { return convert from latin 1 ( byte streams to byte array ( in ) ) ; }


public void set n clob ( int parameter index , reader reader ) throws s q l exception { }


returns the type of the next token without consuming it

public abstract token peek ( ) throws i o exception ;


print strings as is ( no newline , a la php echo )

public void echo without escape html ( object args ) { print writer out = writer ( ) ; for ( object s : args ) { out print ( s ) ; } }


private void adjust array ( int size ) { if ( size < min size ) { size = min size ; } long [ ] newlongs = new long [ size ] ; int len = math min ( size , longs length ) ; system arraycopy ( longs , 0 , newlongs , 0 , len ) ; longs = newlongs ; }


create a file artifact value using the { @ link path } and size file artifact value # create will handle getting the digest using the path and size values

public static file artifact value create for normal file using path ( path path , long size ) throws i o exception { return create ( path , true , size , null , null , true ) ; }


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


creates a new { @ link org springframework beans factory support properties bean definition reader }

protected bean definition reader create bean definition reader ( final generic application context context ) { return new org springframework beans factory support properties bean definition reader ( context ) ; }


simulate eventual consistency of delete for this list operation : any recently - deleted keys will be added

private object listing restore list objects ( list objects request request , object listing raw listing ) { list < s 3 object summary > output list = raw listing get object summaries ( ) ; list < string > output prefixes = raw listing get common prefixes ( ) ; / / recursive list has no delimiter , returns everything that matches a / / prefix boolean recursive object list = ! ( " / " equals ( request get delimiter ( ) ) ) ; string prefix = request get prefix ( ) ; restore deleted ( output list , output prefixes , recursive object list , prefix ) ; return new custom object listing ( raw listing , output list , output prefixes ) ; }


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 sorted map < integer , run t > get builds as map ( ) { return collections unmodifiable sorted map ( get runs ( ) ) ; }


adds the given values to the dataset the stream will be completely consumed by this method

public void add all ( long stream values ) { add all ( values collect ( stats accumulator : : new , stats accumulator : : add , stats accumulator : : add all ) ) ; }


where the attribute was defined within the & lt ; declare - styleable & gt ; block < code > optional aapt pb source source = 1 ; < code >

private void set source ( com android aapt resources source builder builder for value ) { source = builder for value build ( ) ; bit field 0 | = 0x 0 0 0 0 0 0 0 1 ; }


returns the name of the correlating algorithm


tests that if channel was unhealthy it is was offered back to the pool because it was requested not to validate channel health on release

public void test unhealthy channel is offered when no health check requested ( ) throws exception { event loop group group = new default event loop group ( ) ; local address addr = new local address ( get local addr id ( ) ) ; bootstrap cb = new bootstrap ( ) ; cb remote address ( addr ) ; cb group ( group ) channel ( local channel class ) ; server bootstrap sb = new server bootstrap ( ) ; sb group ( group ) channel ( local server channel class ) child handler ( new channel initializer < local channel > ( ) { @ override public void init channel ( local channel ch ) throws exception { ch pipeline ( ) add last ( new channel inbound handler adapter ( ) ) ; } } ) ; / / start server channel sc = sb bind ( addr ) sync uninterruptibly ( ) channel ( ) ; channel pool handler handler = new counting channel pool handler ( ) ; channel pool pool = new simple channel pool ( cb , handler , channel health checker active , false ) ; channel channel 1 = pool acquire ( ) sync uninterruptibly ( ) get now ( ) ; channel 1 close ( ) sync uninterruptibly ( ) ; future < void > release future = pool release ( channel 1 , channel 1 event loop ( ) < void > new promise ( ) ) sync uninterruptibly ( ) ; assert that ( release future is success ( ) , core matchers is ( true ) ) ; channel channel 2 = pool acquire ( ) sync uninterruptibly ( ) get now ( ) ; / / verifying that in fact the channel 2 is different that means is not pulled from the pool assert not same ( channel 1 , channel 2 ) ; sc close ( ) sync uninterruptibly ( ) ; channel 2 close ( ) sync uninterruptibly ( ) ; pool close ( ) ; group shutdown gracefully ( ) ; }


registers a kv state instance for the given key group index

void unregister kv state ( key group range key group range ) { if ( key group range get start key group ( ) < 0 | | key group range get end key group ( ) > = num key groups ) { throw new index out of bounds exception ( " key group index " ) ; } for ( int kg idx = key group range get start key group ( ) ; kg idx < = key group range get end key group ( ) ; + + kg idx ) { if ( kv state ids [ kg idx ] = = null | | kv state addresses [ kg idx ] = = null ) { throw new illegal argument exception ( " not registered probably registration / unregistration race " ) ; } num registered key groups - - ; kv state ids [ kg idx ] = null ; kv state addresses [ kg idx ] = null ; } }


gets the api package name for generated sources

public string get api package ( ) { return api package ; }


return the { @ link statistics } instance used by this filesystem

statistics get scheme statistics ( ) { return statistics ; }


set the view class that should be used to create views

public url based view resolver registration view class ( class < ? > view class ) { this view resolver set view class ( view class ) ; return this ; }


sets the specified 16 - bit short integer at the specified absolute { @ code index } in this buffer the 16 high - order bits of the specified value are ignored this method does not modify { @ code reader index } or { @ code writer index } of this buffer

public abstract byte buf set short ( int index , int value ) ;


if the value is a compound value , this is set < code > optional aapt pb compound value compound value = 5 ; < code >

public builder clear compound value ( ) { copy on write ( ) ; instance clear compound value ( ) ; return this ; }


public handle range ( grammar a s t a , grammar a s t b ) { g tool err mgr grammar error ( error type token range in parser , g file name , a get token ( ) , a get token ( ) get text ( ) , b get token ( ) get text ( ) ) ; / / from a b , yield atn for just a return token ref ( ( terminal a s t ) a ) ; }


public void 1 2 3number test ( ) { / / todo : test 1 2 3number }


parses the specified http status line into a { @ link http response status } the expected formats of the line are : { @ code status code } ( e g 200 ) { @ code status code } { @ code reason phrase } ( e g 404 not found )

public static http response status parse line ( string line ) { try { int space = line index of ( ' ' ) ; return space = = - 1 ? value of ( parse int ( line ) ) : value of ( parse int ( line substring ( 0 , space ) ) , line substring ( space + 1 ) ) ; } catch ( exception e ) { throw new illegal argument exception ( " malformed status line : " + line , e ) ; } }


return whether the reply destination uses publish subscribe domain ( { @ link javax jms topic topics } ) otherwise , the point - to - point domain ( { @ link javax jms queue queues } ) is used by default , the value is identical to { @ link # is pub sub domain ( ) }


returns the percentage of the desired amount of time spent for io in the event loop

public int get io ratio ( ) { return io ratio ; }


public float get particle radius ( ) { return m particle system get particle radius ( ) ; }


returns the configuration option for < code > key < code > from this context if login module name is specified , return option value only from that module

public static string config entry option ( list < app configuration entry > configuration entries , string key , string login module name ) { for ( app configuration entry entry : configuration entries ) { if ( login module name ! = null & & ! login module name equals ( entry get login module name ( ) ) ) continue ; object val = entry get options ( ) get ( key ) ; if ( val ! = null ) return ( string ) val ; } return null ; }


get a { @ code reactive adapter } for the top - level return value type

protected reactive adapter get adapter ( handler result result ) { return get adapter registry ( ) get adapter ( result get return type ( ) resolve ( ) , result get return value ( ) ) ; }


creates a { @ code hash code } from a byte array the array is defensively copied to preserve the immutability contract of { @ code hash code } the array cannot be empty

public static hash code from bytes ( byte [ ] bytes ) { check argument ( bytes length > = 1 , " a hash code must contain at least 1 byte " ) ; return from bytes no copy ( bytes clone ( ) ) ; }


invoked after the handshake is done the response status and headers indicate the results of the handshake , i e whether it was successful or not

void after handshake ( server http request request , server http response response , web socket handler ws handler , @ nullable exception exception ) ;


protected string get block output buffer name ( ) { return constants fast upload buffer disk ; }


returns all { @ link job entity } instances related to on { @ link process definition entity }

list < job entity > find jobs by process definition id ( string process definition id ) ;


called on the generated model immediately after the main model on bind method has been called this let ' s the generated model handle binding of its own and dispatch calls to its on bind listener we don ' t want to rely on the main on bind method to dispatch the on bind listener call because there are two on bind methods ( one for payloads and one for no payloads ) , and one can call into the other we don ' t want to dispatch two on bind listener calls in that case

void handle post bind ( t object to bind , int position ) ;


get original buffer associated with the specified storage index in the original file

data buffer get old buffer ( data buffer buf , int index ) throws i o exception { try { int vf index = buffer map get ( index ) ; return get version file ( vf index ) get old buffer ( buf , index ) ; } catch ( no value exception e ) { } if ( arrays binary search ( free indexes , index ) > = 0 ) { buf set id ( - 1 ) ; buf set empty ( true ) ; buf set dirty ( false ) ; return buf ; } return null ; }


process compressed image data contained within the specified memory buffer

private bitmap decompress result decompress ( mem buffer buf , int offset , boolean return decompressed data , int max compressed data length ) throws memory access exception { / / private byte [ ] decompress ( byte [ ] image data , int width 1 , int height 1 ) { int raw data size = 0 ; int decompressed data size = 0 ; byte [ ] decompressed data = null ; int h = get height ( ) ; int w = get width ( ) ; int max buffer offset = offset + max compressed data length ; if ( compression = = bi rgb ) { raw data size = get image data size ( ) ; decompressed data size = raw data size ; if ( return decompressed data ) { decompressed data = new byte [ raw data size ] ; buf get bytes ( decompressed data , offset ) ; } } / / real size of image else if ( compression = = bi rle4 ) { int x = 0 ; int y = 0 ; int byte width = ( w + 1 ) / 2 ; decompressed data size = byte width * h ; if ( return decompressed data ) { decompressed data = new byte [ decompressed data size ] ; } int read offset = offset ; try { while ( true ) { if ( read offset > = max buffer offset ) { throw new memory access exception ( " bitmap resource decompression exceeded memory constraint at " + buf get address ( ) ) ; } int val = buf get byte ( read offset + + ) ; if ( val = = 0 ) { / / escape val = buf get byte ( read offset + + ) ; if ( val = = 1 ) { break ; / / end of bitmap - break from loop } switch ( val ) { case 0 : / / eol x = 0 ; y + + ; break ; case 1 : / / end of bitmap throw new assert exception ( ) ; / / already handled case 2 : / / delta int xdelta = buf get byte ( read offset + + ) & 0xff ; int ydelta = buf get byte ( read offset + + ) & 0xff ; x + = xdelta ; y + = ydelta ; break ; default : / / absolute int num follow = val & 0xff ; if ( decompressed data ! = null ) { byte [ ] bytes = new byte [ num follow / 2 ] ; buf get bytes ( bytes , read offset ) ; system arraycopy ( bytes , 0 , decompressed data , y * byte width + x / 2 , bytes length ) ; x + = num follow ; } read offset + = ( num follow + 1 ) / 2 ; read offset + = ( read offset % 2 ) ; break ; } continue ; } int run = val ; val = buf get byte ( read offset + + ) ; if ( decompressed data ! = null ) { for ( int j = 0 ; j < run ; j + + ) { if ( x > = w | | y > = h ) { break ; } int cval = decompressed data [ y * byte width + x / 2 ] ; int cmask = 0xf 0 > > ( ( ( x + 1 ) % 2 ) * 4 ) ; int mask = 0xf 0 > > ( ( j % 2 ) * 4 ) ; int nibble = ( val & mask ) > > ( ( ( j + 1 ) % 2 ) * 4 ) ; decompressed data [ y * byte width + x / 2 ] = ( byte ) ( ( cval & cmask ) | ( nibble < < ( ( ( x + 1 ) % 2 ) * 4 ) ) ) ; x + + ; } } } } catch ( array index out of bounds exception e ) { msg error ( this , " unexpected exception : " + e get message ( ) , e ) ; } raw data size = read offset - offset ; } else if ( compression = = bi rle8 ) { int x = 0 ; int y = 0 ; int byte width = w ; decompressed data size = byte width * h ; if ( return decompressed data ) { decompressed data = new byte [ decompressed data size ] ; } int read offset = offset ; try { while ( true ) { if ( read offset > = max buffer offset ) { throw new memory access exception ( " bitmap resource decompression exceeded memory constraint at " + buf get address ( ) ) ; } int val = buf get byte ( read offset + + ) ; if ( val = = 0 ) { / / escape val = buf get byte ( read offset + + ) ; if ( val = = 1 ) { break ; / / end of bitmap - break from loop } switch ( val ) { case 0 : / / eol x = 0 ; y + + ; break ; case 1 : / / end of bitmap throw new assert exception ( ) ; / / already handled case 2 : / / delta int xdelta = buf get byte ( read offset + + ) & 0xff ; int ydelta = buf get byte ( read offset + + ) & 0xff ; x + = xdelta ; y + = ydelta ; break ; default : / / absolute int num follow = val & 0xff ; if ( decompressed data ! = null ) { byte [ ] bytes = new byte [ num follow ] ; buf get bytes ( bytes , read offset ) ; system arraycopy ( bytes , 0 , decompressed data , y * byte width + x , bytes length ) ; x + = num follow ; } read offset + = num follow ; read offset + = ( read offset % 2 ) ; break ; } continue ; } int run = val ; val = buf get byte ( read offset + + ) ; if ( decompressed data ! = null ) { for ( int j = 0 ; j < run ; j + + ) { if ( x > = w | | y > = h ) { break ; } decompressed data [ y * byte width + x ] = ( byte ) val ; x + + ; } } } } catch ( array index out of bounds exception e ) { msg error ( this , " unexpected exception : " + e get message ( ) , e ) ; } raw data size = read offset - offset ; } else { msg error ( this , " unsupported bitmap resource compression type " + compression + " at " + buf get address ( ) ) ; } return new bitmap decompress result ( raw data size , decompressed data size , decompressed data ) ; } }


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


returns true if the current runtime is jdk 9 or newer

static boolean is at least 9 ( ) { return major > = 9 ; }


private void markup headers ( ) throws exception { monitor set message ( " marking up dyld headers " ) ; monitor initialize ( 1 ) ; dyld cache header parse from memory ( program , space , log , monitor ) ; dyld cache header markup ( program , space , monitor , log ) ; monitor increment progress ( 1 ) ; }


public static < t > hystrix property < t > as property ( final hystrix properties chained archaius property chain link < t > chained property ) { return new hystrix property < t > ( ) { @ override public t get ( ) { return chained property get ( ) ; } } ; }


set the ( new ) value of the { @ code if - match } header

public void set if match ( list < string > if match list ) { set ( if match , to comma delimited string ( if match list ) ) ; }


prepare the context link to the agent core in app class loader

private static void prepare ( ) { if ( interceptor = = null ) { class loader loader = bootstrap inter runtime assist get agent class loader ( ) ; if ( loader ! = null ) { i bootstrap log logger = bootstrap inter runtime assist get logger ( loader , target interceptor ) ; if ( logger ! = null ) { logger = logger ; interceptor = bootstrap inter runtime assist create interceptor ( loader , target interceptor , logger ) ; } } else { logger error ( " runtime class loader not found when create { } " + target interceptor ) ; } } }


returns { @ link proxy async configuration } or { @ code aspect j async configuration } for { @ code proxy } and { @ code aspectj } values of { @ link enable async # mode ( ) } , respectively

public string [ ] select imports ( advice mode advice mode ) { switch ( advice mode ) { case proxy : return new string [ ] { proxy async configuration class get name ( ) } ; case aspectj : return new string [ ] { async execution aspect configuration class name } ; default : return null ; } }


delete and release all underlying data buffers

public synchronized void delete ( ) throws i o exception { if ( read only ) { throw new unsupported operation exception ( " read - only buffer " ) ; } if ( first buffer id < 0 ) { throw new assert exception ( " invalid buffer " ) ; } / / remove all data buffers for ( int element : data buffer id table ) { if ( element > = 0 ) { buffer mgr delete buffer ( element ) ; } } data buffer id table = null ; / / remove all , except the first , index buffers if ( index buffer id table ! = null ) { for ( int element : index buffer id table ) { buffer mgr delete buffer ( element ) ; } } index buffer id table = null ; size = 0 ; first buffer id = - 1 ; }


calls { @ link # copy stream to string ( input stream , int , string ) } using the platform ' s default charset

public static string copy stream to string ( input stream input , int estimated size ) throws i o exception { return copy stream to string ( input , estimated size , null ) ; }


when a dead node is put to maintenance , it transitions directly to admin states in maintenance

public void test put dead node to maintenance ( ) throws exception { log info ( " starting test put dead node to maintenance " ) ; final int replicas = 1 ; final path file = new path ( " / test put dead node to maintenance dat " ) ; start cluster ( 1 , 1 ) ; final file system file sys = get cluster ( ) get file system ( 0 ) ; final f s namesystem ns = get cluster ( ) get namesystem ( 0 ) ; write file ( file sys , file , replicas , 1 ) ; final mini d f s cluster data node properties dn prop = get cluster ( ) stop data node ( 0 ) ; d f s test util wait for datanode state ( get cluster ( ) , dn prop datanode get datanode uuid ( ) , false , 20000 ) ; int dead in maintenance = ns get num in maintenance dead data nodes ( ) ; int live in maintenance = ns get num in maintenance live data nodes ( ) ; take node outof service ( 0 , dn prop datanode get datanode uuid ( ) , long max value , null , admin states in maintenance ) ; assert equals ( dead in maintenance + 1 , ns get num in maintenance dead data nodes ( ) ) ; assert equals ( live in maintenance , ns get num in maintenance live data nodes ( ) ) ; cleanup file ( file sys , file ) ; }


specify the extended persistence contexts for entity manager lookups , as a map from persistence unit name to persistence context jndi name ( which needs to resolve to an entity manager instance ) jndi names specified here should refer to { @ code persistence - context - ref } entries in the java ee deployment descriptors , matching the target persistence unit and being set up with persistence context type { @ code extended } in case of no unit name specified in the annotation , the specified value for the { @ link # set default persistence unit name default persistence unit } will be taken ( by default , the value mapped to the empty string ) , or simply the single persistence unit if there is only one this is mainly intended for use in a java ee environment , with all lookup driven by the standard jpa annotations , and all entity manager references obtained from jndi no separate entity manager factory bean definitions are necessary in such a scenario , and all entity manager handling is done by the java ee server itself

public void set extended persistence contexts ( map < string , string > extended persistence contexts ) { this extended persistence contexts = extended persistence contexts ; }


create the keytabl for the given principal , includes raw principal and $ principallocalhost

public static file create keytab ( string principal , string filename ) throws exception { assert not empty ( " empty principal " , principal ) ; assert not empty ( " empty host " , filename ) ; assert not null ( " null kdc " , kdc ) ; file keytab = new file ( kdc work dir , filename ) ; kdc create principal ( keytab , principal , principal + " / localhost " , principal + " / 127 0 0 1 " ) ; return keytab ; }


public builder add transitive tools ( nested set < artifact > artifacts ) { tools builder add transitive ( artifacts ) ; return this ; }


starts the cpu profiler with the specified sampling period , writing a pprof profile to { @ code out } all running starlark threads are profiled may be called concurrent with starlark execution

public static void start cpu profile ( output stream out , duration period ) { cpu profiler start ( out , period ) ; }


router quota update service get quota cache update service ( ) { return this quota update service ; }


return true if session waiting target connection ( on breakpoint , after step or continue ) in debug thread

public boolean is done ( ) { switch ( attach kind ) { case global : return worker job = = null | | worker job is finished ( ) ; case local : return session id > 0 ; default : return false ; } }


given an index , return a string to use as the filename

public static string filename of index ( final int i ) { return string format ( " % s % 0 3d " , prefix , i ) ; }


syntactic sugar for disabling allocation for < code > indices < code >

protected final void disable allocation ( string indices ) { client ( ) admin ( ) indices ( ) prepare update settings ( indices ) set settings ( settings builder ( ) put ( enable allocation decider index routing allocation enable setting get key ( ) , " none " ) ) get ( ) ; }


public string get catalog name ( ) { return this call meta data context get catalog name ( ) ; }


extracts the subscription from the notification object

public static subscription get subscription ( object o ) { return ( ( subscription notification ) o ) upstream ; }


public void set column family as variable ( boolean column family as variable ) { this column family as variable = column family as variable ; }


returns a set of i ds corresponding to the set of vertices that should be restarted


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


uses max advance , ascender and descender of font to calculate real height that makes any n glyphs to fit in given pixel width and height

public int scale to fit square ( int width , int height , int num chars ) { return math min ( scale for pixel height ( height ) , scale for pixel width ( width , num chars ) ) ; }


returns the class of the mismatched argument

public string get argument signature ( ) { return signature ; }


ensures that the result of multiplying individual numbers can fit into the size limit of an integer

private static boolean is safe to multiply ( int a , int b ) { return a > = 0 & & b > = 0 & & ! ( b > 0 & & a > = integer max value / b ) ; }


use api key in query use api key in query

public void key in query test ( ) throws api exception { / / object response = api key in query ( ) ; / / todo : test validations }


public int read ( byte [ ] b ) throws i o exception { throttle ( ) ; int read len = raw stream read ( b ) ; if ( read len ! = - 1 ) { bytes read + = read len ; } return read len ; }


public float [ ] get vertices ( ) { return vertices ; }


returns an iterator of the objects stored in the { @ code path trie } , using all possible { @ code trie matching mode } modes the { @ code param supplier } is called between each invocation of { @ code next ( ) } to supply a new map of parameters

public iterator < t > retrieve all ( string path , supplier < map < string , string > > param supplier ) { return new iterator < > ( ) { private int mode ; @ override public boolean has next ( ) { return mode < trie matching mode values ( ) length ; } @ override public t next ( ) { if ( has next ( ) = = false ) { throw new no such element exception ( " called next ( ) without validating has next ( ) ! no more modes available " ) ; } return retrieve ( path , param supplier get ( ) , trie matching mode values ( ) [ mode + + ] ) ; } } ; }


public void set buffer factory ( data buffer factory buffer factory ) { this buffer factory = buffer factory ; }


join records of this { @ code k table } with another { @ code k table } ' s records using non - windowed inner equi join , with default serializers , deserializers , and state store the join is a primary key join with join attribute { @ code this k table key = = other k table key } the result is an ever updating { @ code k table } that represents the current ( i e , processing time ) result of the join the join is computed by ( 1 ) updating the internal state of one { @ code k table } and ( 2 ) performing a lookup for a matching record in the current ( i e , processing time ) internal state of the other { @ code k table } this happens in a symmetric way , i e , for each update of either { @ code this } or the { @ code other } input { @ code k table } the result gets updated for each { @ code k table } record that finds a corresponding record in the other { @ code k table } the provided { @ link value joiner } will be called to compute a value ( with arbitrary type ) for the result record the key of the result record is the same as for both joining input records note that { @ link key value records } with { @ code null } values ( so - called tombstone records ) have delete semantics thus , for input tombstones the provided value - joiner is not called but a tombstone record is forwarded directly to delete a record in the result { @ code k table } if required ( i e , if there is anything to be deleted ) input records with { @ code null } key will be dropped and no join computation is performed example : < table border = ' 1 ' > < tr > < th > this k table < th > < th > this state < th > < th > other k table < th > < th > other state < th > < th > result updated record < th > < tr > < tr > < td > & lt ; k1 : a & gt ; < td > < td > & lt ; k1 : a & gt ; < td > < td > < td > < td > < td > < td > < td > < tr > < tr > < td > < td > < td > & lt ; k1 : a & gt ; < td > < td > & lt ; k1 : b & gt ; < td > < td > & lt ; k1 : b & gt ; < td > < td > & lt ; k1 : value joiner ( a , b ) & gt ; < td > < tr > < tr > < td > & lt ; k1 : c & gt ; < td > < td > & lt ; k1 : c & gt ; < td > < td > < td > < td > & lt ; k1 : b & gt ; < td > < td > & lt ; k1 : value joiner ( c , b ) & gt ; < td > < tr > < tr > < td > < td > < td > & lt ; k1 : c & gt ; < td > < td > & lt ; k1 : null & gt ; < td > < td > < td > < td > & lt ; k1 : null & gt ; < td > < tr > < table > both input streams ( or to be more precise , their underlying source topics ) need to have the same number of partitions

< vo , vr > k table < k , vr > join ( final k table < k , vo > other , final value joiner < ? super v , ? super vo , ? extends vr > joiner , final named named ) ;


public float get float ( ) { return float ; }


release the map ' s record and bucket area ' s memory segments

public void free ( ) { free ( false ) ; }


public table debug cell ( ) { super set debug ( true ) ; if ( debug ! = debug cell ) { this debug = debug cell ; invalidate ( ) ; } return this ; }


constructor with array is of same size and has all elements

public void test constructor 2 ( ) { atomic double array aa = new atomic double array ( values ) ; assert equals ( values length , aa length ( ) ) ; for ( int i = 0 ; i < values length ; i + + ) { assert bit equals ( values [ i ] , aa get ( i ) ) ; } }


public string get property class ( ) { return property class ; }


return the value of meta - data in service

public static string get meta data in service ( @ non null final service service , @ non null final string key ) { return get meta data in service ( service get class ( ) , key ) ; }


private int process children ( data input stream in , image visitor v , boolean skip blocks , string parent name ) throws i o exception { int num children = in read int ( ) ; for ( int i = 0 ; i < num children ; i + + ) { process i node ( in , v , skip blocks , parent name , false ) ; } return num children ; }


returns true if this actor is a listener actor for touch focus

public boolean is touch focus listener ( ) { stage stage = get stage ( ) ; if ( stage = = null ) return false ; for ( int i = 0 , n = stage touch focuses size ; i < n ; i + + ) if ( stage touch focuses get ( i ) listener actor = = this ) return true ; return false ; }


does this database support returning result sets that should be retrieved with the jdbc call : { @ link java sql statement # get result set ( ) } ?

boolean is return result set supported ( ) ;


delivers a coordination request to the { @ link operator coordinator } with the given { @ link operator i d } and returns the coordinator ' s response

completable future < coordination response > deliver coordination request to coordinator ( operator i d operator , coordination request request ) throws flink exception ;


the source root of the current library for bazel , this is always a ( logical ) prefix of all direct sources for blaze , this is currently a lie for { @ code proto library } targets with generated sources

public string get direct proto source root ( ) { return direct proto source root get safe path string ( ) ; }


public snapshot get snapshot ( ) { return empty snapshot instance ; }


returns the name of the test method invoked by this test instance

public final string get test method name ( ) { return super get name ( ) ; }


closes the local side of the { @ code stream } depending on the { @ code stream } state this may result in { @ code stream } being closed see { @ link # close stream ( http 2 stream , channel future ) }

void close stream local ( http 2 stream stream , channel future future ) ;


return a future which succeeds only if all the topic descriptions succeed

public kafka future < map < string , topic description > > all ( ) { return kafka future all of ( futures values ( ) to array ( new kafka future [ 0 ] ) ) then apply ( v - > { map < string , topic description > descriptions = new hash map < > ( futures size ( ) ) ; for ( map entry < string , kafka future < topic description > > entry : futures entry set ( ) ) { try { descriptions put ( entry get key ( ) , entry get value ( ) get ( ) ) ; } catch ( interrupted exception | execution exception e ) { / / this should be unreachable , because all of ensured that all the futures / / completed successfully throw new runtime exception ( e ) ; } } return descriptions ; } ) ; }


indicates whether the receiving node should operate based on local index information or forward requests , where needed , to other nodes if running locally , request will not raise errors if local index information is missing

public get mappings request local ( boolean local ) { this local = local ; return this ; }


invoked when a named value is required , but { @ link # resolve name ( string , method parameter , native web request ) } returned { @ code null } and there is no default value subclasses typically throw an exception in this case

protected void handle missing value ( string name , method parameter parameter ) throws servlet exception { throw new servlet request binding exception ( " missing argument ' " + name + " ' for method parameter of type " + parameter get nested parameter type ( ) get simple name ( ) ) ; }


only select process instances which had a global variable with the given name , but with a different value than the passed value when they ended only select process instances which have a variable value greater than the passed value byte - arrays and { @ link serializable } objects ( which are not primitive type wrappers ) are not supported

historic process instance query variable value not equals ( string name , object value ) ;


gets the global modification version of the execution graph when this execution was created this version is bumped in the execution graph whenever a global failover happens it is used to resolve conflicts between concurrent modification by global and local failover actions

public long get global mod version ( ) { return global mod version ; }


private void check census ( metrics record record , boolean is server , collection < ? extends message lite > requests , collection < ? extends message lite > responses ) { int uncompressed requests size = 0 ; for ( message lite request : requests ) { uncompressed requests size + = request get serialized size ( ) ; } int uncompressed responses size = 0 ; for ( message lite response : responses ) { uncompressed responses size + = response get serialized size ( ) ; } if ( is server ) { assert equals ( requests size ( ) , record get metric as long or fail ( deprecated census constants rpc server request count ) ) ; assert equals ( responses size ( ) , record get metric as long or fail ( deprecated census constants rpc server response count ) ) ; assert equals ( uncompressed requests size , record get metric as long or fail ( deprecated census constants rpc server uncompressed request bytes ) ) ; assert equals ( uncompressed responses size , record get metric as long or fail ( deprecated census constants rpc server uncompressed response bytes ) ) ; assert not null ( record get metric ( deprecated census constants rpc server server latency ) ) ; / / it ' s impossible to get the expected wire sizes because it may be compressed , so we just / / check if they are recorded assert not null ( record get metric ( deprecated census constants rpc server request bytes ) ) ; assert not null ( record get metric ( deprecated census constants rpc server response bytes ) ) ; } else { assert equals ( requests size ( ) , record get metric as long or fail ( deprecated census constants rpc client request count ) ) ; assert equals ( responses size ( ) , record get metric as long or fail ( deprecated census constants rpc client response count ) ) ; assert equals ( uncompressed requests size , record get metric as long or fail ( deprecated census constants rpc client uncompressed request bytes ) ) ; assert equals ( uncompressed responses size , record get metric as long or fail ( deprecated census constants rpc client uncompressed response bytes ) ) ; assert not null ( record get metric ( deprecated census constants rpc client roundtrip latency ) ) ; / / it ' s impossible to get the expected wire sizes because it may be compressed , so we just / / check if they are recorded assert not null ( record get metric ( deprecated census constants rpc client request bytes ) ) ; assert not null ( record get metric ( deprecated census constants rpc client response bytes ) ) ; } }


public test query parameter collection format oper resp spec ( consumer < response spec builder > resp spec customizer ) { resp spec customizer accept ( resp spec ) ; return this ; }


public dependency graphs create level 4 dependency graph ( @ non null variant scope variant scope , boolean with full dependency , boolean download sources , @ non null consumer < sync issue > failure consumer ) { / / fixme change the way we compare dependencies b / 64387392 try { / / get the compile artifact first set < atlas dependency graph hashable resolved artifact result > compile artifacts = get all artifacts ( variant scope , atlas android artifacts consumed config type compile classpath , dependency failure handler ) ; compile artifacts add all ( get all artifacts ( variant scope , atlas android artifacts consumed config type bundlecompile classpath , dependency failure handler ) ) ; / / force download the javadoc / source artifacts of compile scope only , since the / / the runtime - only is never used from the ide if ( download sources ) { set < component identifier > ids = sets new hash set with expected size ( compile artifacts size ( ) ) ; for ( hashable resolved artifact result artifact : compile artifacts ) { ids add ( artifact get id ( ) get component identifier ( ) ) ; } handle sources ( variant scope get global scope ( ) get project ( ) , ids , failure consumer ) ; } / / in this simpler model , faster computation of the runtime dependencies to get the / / provided bit if ( ! with full dependency ) { / / get the runtime artifacts we only care about the component identifier so we don ' t / / need to call get all artifacts ( ) which computes a lot more many things , and takes / / longer on large projects / / instead just get all the jars to get all the dependencies artifact collection runtime artifact collection = compute artifact list ( variant scope , atlas android artifacts consumed config type runtime classpath , android artifacts artifact scope all , atlas android artifacts atlas artifact type jar ) ; / / build a list of the runtime component identifiers final set < resolved artifact result > runtime artifacts = runtime artifact collection get artifacts ( ) ; final set < component identifier > runtime identifiers = sets new hash set with expected size ( runtime artifacts size ( ) ) ; for ( resolved artifact result result : runtime artifacts ) { runtime identifiers add ( result get id ( ) get component identifier ( ) ) ; } list < string > provided addresses = lists new array list ( ) ; list < graph item > compile items = lists new array list with capacity ( compile artifacts size ( ) ) ; for ( atlas dependency graph hashable resolved artifact result artifact : compile artifacts ) { final graph item impl graph item = new graph item impl ( compute address ( artifact ) , immutable list of ( ) ) ; compile items add ( graph item ) ; s library cache get ( artifact ) ; s library map put ( compute address ( artifact ) , artifact ) ; if ( ! runtime identifiers contains ( artifact get id ( ) get component identifier ( ) ) ) { provided addresses add ( graph item get artifact address ( ) ) ; } } return new simple dependency graphs impl ( compile items , provided addresses ) ; } / / now build the list of compile items list < graph item > compile items = lists new array list with capacity ( compile artifacts size ( ) ) ; for ( atlas dependency graph hashable resolved artifact result artifact : compile artifacts ) { compile items add ( new graph item impl ( compute address ( artifact ) , immutable list of ( ) ) ) ; s library cache get ( artifact ) ; s library map put ( compute address ( artifact ) , artifact ) ; } / / in this mode , compute graph item for the runtime configuration / / get the runtime artifacts set < atlas dependency graph hashable resolved artifact result > runtime artifacts = get all artifacts ( variant scope , atlas android artifacts consumed config type runtime classpath , dependency failure handler ) ; runtime artifacts add all ( get all artifacts ( variant scope , atlas android artifacts consumed config type bundlecompile classpath , dependency failure handler ) ) ; list < graph item > runtime items = lists new array list with capacity ( runtime artifacts size ( ) ) ; for ( atlas dependency graph hashable resolved artifact result artifact : runtime artifacts ) { runtime items add ( new graph item impl ( compute address ( artifact ) , immutable list of ( ) ) ) ; s library cache get ( artifact ) ; s library map put ( compute address ( artifact ) , artifact ) ; } / / compute the provided dependency list , by comparing the compile and runtime items list < graph item > provided items = lists new array list ( compile items ) ; provided items remove all ( runtime items ) ; final immutable list < string > provided addresses = provided items stream ( ) map ( graph item : : get artifact address ) collect ( immutable collectors to immutable list ( ) ) ; / / fixme : when full dependency is enabled , this should return a full graph instead of a / / flat list return new full dependency graphs impl ( compile items , runtime items , provided addresses , immutable list of ( ) ) ; / / fixme : actually get skip list } finally { dependency failure handler collect issues ( ) for each ( failure consumer ) ; } }


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


tests that the max parallelism is properly set for connected streams

public void test max parallelism with connected keyed stream ( ) { int max parallelism = 42 ; stream execution environment env = stream execution environment get execution environment ( ) ; data stream < integer > input 1 = env from elements ( 1 , 2 , 3 , 4 ) set max parallelism ( 128 ) ; data stream < integer > input 2 = env from elements ( 1 , 2 , 3 , 4 ) set max parallelism ( 129 ) ; env get config ( ) set max parallelism ( max parallelism ) ; data stream < integer > keyed result = input 1 connect ( input 2 ) key by ( value - > value , value - > value ) map ( new no op int co map ( ) ) ; keyed result add sink ( new discarding sink < > ( ) ) ; stream graph graph = env get stream graph ( ) ; stream node keyed result node = graph get stream node ( keyed result get id ( ) ) ; stream partitioner < ? > stream partitioner 1 = keyed result node get in edges ( ) get ( 0 ) get partitioner ( ) ; stream partitioner < ? > stream partitioner 2 = keyed result node get in edges ( ) get ( 1 ) get partitioner ( ) ; }


public boolean is name boolean ( ) { return name boolean ; }


protected dist cp context get context ( ) { return context ; }


the set of attribute declarations < code > repeated aapt pb styleable entry entry = 1 ; < code >

private void add all entry ( java lang iterable < ? extends com android aapt resources styleable entry > values ) { ensure entry is mutable ( ) ; com google protobuf abstract message lite add all ( values , entry ) ; }


freezes the snapshot by flushing all pending writes and marking it as immutable

public void freeze ( ) throws i o exception { append batches ( accumulator drain ( ) ) ; snapshot freeze ( ) ; accumulator close ( ) ; }


adds term frequencies found by tokenizing text from reader into the map words

private void add term frequencies ( reader r , map < string , int > term freq map , string field name ) throws i o exception { if ( analyzer = = null ) { throw new unsupported operation exception ( " to use more like this without " + " term vectors , you must provide an analyzer " ) ; } try ( token stream ts = analyzer token stream ( field name , r ) ) { int token count = 0 ; / / for every token char term attribute term att = ts add attribute ( char term attribute class ) ; ts reset ( ) ; while ( ts increment token ( ) ) { string word = term att to string ( ) ; token count + + ; if ( token count > max num tokens parsed ) { break ; } if ( is noise word ( word ) ) { continue ; } if ( is skip term ( field name , word ) ) { continue ; } / / increment frequency int cnt = term freq map get ( word ) ; if ( cnt = = null ) { term freq map put ( word , new int ( ) ) ; } else { cnt x + + ; } } ts end ( ) ; } }


adds block to list of blocks which will be invalidated on specified datanode and log the operation

void add to invalidates ( final block block , final datanode info datanode ) { if ( ! is populating repl queues ( ) ) { return ; } invalidate blocks add ( block , datanode , true ) ; }


updates the addresses used for connections in the { @ code channel } that was created by { @ link # create oob channel ( equivalent address group , string ) } this is superior to { @ link # create oob channel ( equivalent address group , string ) } when the old and new addresses overlap , since the channel can continue using an existing connection

public void update oob channel addresses ( managed channel channel , equivalent address group eag ) { throw new unsupported operation exception ( ) ; }


returns a composite data iterator limited to the addresses in the specified address set

public data iterator get composite data ( address set view addr set , boolean forward ) { try { return new data key iterator ( this , addr map , composite mgr get address key iterator ( addr set , forward ) ) ; } catch ( i o exception e ) { program db error ( e ) ; } return null ; }


apply the attributes of the given bean element to the given bean definition

public abstract bean definition parse bean definition attributes ( element ele , string bean name , @ nullable bean definition containing bean , abstract bean definition bd ) { if ( ele has attribute ( singleton attribute ) ) { error ( " old 1 x ' singleton ' attribute in use - upgrade to ' scope ' declaration " , ele ) ; } else if ( ele has attribute ( scope attribute ) ) { bd set scope ( ele get attribute ( scope attribute ) ) ; } else if ( containing bean ! = null ) { / / take default from containing bean in case of an inner bean definition bd set scope ( containing bean get scope ( ) ) ; } if ( ele has attribute ( abstract attribute ) ) { bd set abstract ( true value equals ( ele get attribute ( abstract attribute ) ) ) ; } string lazy init = ele get attribute ( lazy init attribute ) ; if ( is default value ( lazy init ) ) { lazy init = this defaults get lazy init ( ) ; } bd set lazy init ( true value equals ( lazy init ) ) ; string autowire = ele get attribute ( autowire attribute ) ; bd set autowire mode ( get autowire mode ( autowire ) ) ; if ( ele has attribute ( depends on attribute ) ) { string depends on = ele get attribute ( depends on attribute ) ; bd set depends on ( string utils tokenize to string array ( depends on , multi value attribute delimiters ) ) ; } string autowire candidate = ele get attribute ( autowire candidate attribute ) ; if ( is default value ( autowire candidate ) ) { string candidate pattern = this defaults get autowire candidates ( ) ; if ( candidate pattern ! = null ) { string [ ] patterns = string utils comma delimited list to string array ( candidate pattern ) ; bd set autowire candidate ( pattern match utils simple match ( patterns , bean name ) ) ; } } else { bd set autowire candidate ( true value equals ( autowire candidate ) ) ; } if ( ele has attribute ( primary attribute ) ) { bd set primary ( true value equals ( ele get attribute ( primary attribute ) ) ) ; } if ( ele has attribute ( init method attribute ) ) { string init method name = ele get attribute ( init method attribute ) ; bd set init method name ( init method name ) ; } else if ( this defaults get init method ( ) ! = null ) { bd set init method name ( this defaults get init method ( ) ) ; bd set enforce init method ( false ) ; } if ( ele has attribute ( destroy method attribute ) ) { string destroy method name = ele get attribute ( destroy method attribute ) ; bd set destroy method name ( destroy method name ) ; } else if ( this defaults get destroy method ( ) ! = null ) { bd set destroy method name ( this defaults get destroy method ( ) ) ; bd set enforce destroy method ( false ) ; } if ( ele has attribute ( factory method attribute ) ) { bd set factory method name ( ele get attribute ( factory method attribute ) ) ; } if ( ele has attribute ( factory bean attribute ) ) { bd set factory bean name ( ele get attribute ( factory bean attribute ) ) ; } return bd ; }


add or update cnxn in our cnxn expiry queue

public void touch cnxn ( n i o server cnxn cnxn ) { cnxn expiry queue update ( cnxn , cnxn get session timeout ( ) ) ; }


dispatch on exit range if the status of the component is in the range this method should only be called when releasing a component tree , thus no status update needed

void dispatch on exited range if needed ( layout state context layout state context , working range status handler status handler ) { if ( m working ranges = = null ) { return ; } for ( string key : m working ranges key set ( ) ) { final range tuple range tuple = m working ranges get ( key ) ; for ( int i = 0 , size = range tuple m components size ( ) ; i < size ; i + + ) { component component = range tuple m components get ( i ) ; string global key = range tuple m component keys get ( i ) ; if ( status handler is in range ( range tuple m name , component , global key ) ) { component dispatch on exited range ( component get scoped context ( layout state context , global key ) , range tuple m name ) ; } } } }


public void pet id test ( ) { / / todo : test pet id }


returns the maximum scroll value in the y direction

public float get max y ( ) { return max y ; }


public int get exit code ( ) { return exit code ; }


determine whether to trigger a commit after no message has been received this is a good idea on any modern - day jms provider

protected boolean should commit after no message received ( session session ) { return true ; }


set page context attribute name under which to expose a variable that contains the result of the transformation

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


handle event received the first time any container is scheduled by a given application

private void handle init application resources ( application app ) { / / 0 ) create application tracking structs string user name = app get user ( ) ; private rsrc put if absent ( user name , new local resources tracker impl ( user name , null , dispatcher , true , super get config ( ) , state store , dirs handler ) ) ; string app id str = app get app id ( ) to string ( ) ; app rsrc put if absent ( app id str , new local resources tracker impl ( app get user ( ) , app get app id ( ) , dispatcher , false , super get config ( ) , state store , dirs handler ) ) ; / / 1 ) signal container init / / / / this is handled by the application impl state machine and allows / / containers to proceed with launching dispatcher get event handler ( ) handle ( new application inited event ( app get app id ( ) ) ) ; }


the sink node making the request < code > istio mcp v 1alpha 1 sink node sink node = 2 ; < code >

public com alibaba nacos istio model mcp sink node or builder get sink node or builder ( ) { return get sink node ( ) ; }


visit a parse tree produced by { @ link painless parser # empty }

t visit empty ( painless parser empty context ctx ) ;


create an located status iterator that wraps another to filter out a set of recently deleted items

remote iterator < s 3 a located file status > create tombstone reconciling iterator ( remote iterator < s 3 a located file status > iterator , @ nullable set < path > tombstones ) { if ( tombstones = = null | | tombstones is empty ( ) ) { / / no need to filter return iterator ; } else { return filtering remote iterator ( iterator , candidate - > ! tombstones contains ( candidate get path ( ) ) ) ; } }


return whether the rom is made by oneplus

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


creates an instance of a aggregating function ( either a system or user - defined function )

public static bridging sql agg function of ( data type factory data type factory , flink type factory type factory , sql kind kind , function identifier identifier , function definition definition , type inference type inference ) { check state ( definition get kind ( ) = = function kind aggregate | | definition get kind ( ) = = function kind table aggregate , " aggregating function kind expected " ) ; return new bridging sql agg function ( data type factory , type factory , kind , identifier , definition , type inference ) ; }


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

public model with final field on visibility changed ( on model visibility changed listener < model with final field , object > listener ) { on mutation ( ) ; this on model visibility changed listener epoxy generated model = listener ; return this ; }


specify whether to continue the execution of a scheduled task after it threw an exception default is " false " , matching the native behavior of a { @ link java util concurrent scheduled executor service } switch this flag to " true " for exception - proof execution of each task , continuing scheduled execution as in the case of successful execution

public void set continue scheduled execution after exception ( boolean continue scheduled execution after exception ) { this continue scheduled execution after exception = continue scheduled execution after exception ; }


int get list parallel factor ( ) { return list parallel factor ; }


set a custom port number for the target service

public api client set port ( int port ) { this port = port ; return this ; }


map from file names of the fingerprinted file to its fingerprint record

public synchronized map < string , fingerprint > get fingerprints ( ) { if ( ref ! = null ) { map < string , fingerprint > m = ref get ( ) ; if ( m ! = null ) return m ; } jenkins h = jenkins get ( ) ; map < string , fingerprint > m = new tree map < > ( ) ; for ( entry < string , string > r : record entry set ( ) ) { try { fingerprint fp = h get fingerprint ( r get value ( ) ) ; if ( fp ! = null ) m put ( r get key ( ) , fp ) ; } catch ( i o exception e ) { logger log ( level warning , e get message ( ) , e ) ; } } m = immutable map copy of ( m ) ; ref = new weak reference < > ( m ) ; return m ; }


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

public java util list < ? extends com alibaba nacos istio model mcp resource or builder > get resources or builder list ( ) { return resources ; }


public string name ( ) { return name ; }


return the patterns for the { @ link # get active patterns condition ( ) active } patterns condition as strings

public set < string > get pattern values ( ) { request condition < ? > condition = get active patterns condition ( ) ; return ( condition instanceof path patterns request condition ? ( ( path patterns request condition ) condition ) get pattern values ( ) : ( ( patterns request condition ) condition ) get patterns ( ) ) ; }


assert the { @ link http method } of the request

public static request matcher method ( http method method ) { assert not null ( method , " ' method ' must not be null " ) ; return request - > assert equals ( " unexpected http method " , method , request get method ( ) ) ; }


public long get client version ( ) { return client version ; }


re - create the given mime types as media types

public static list < media type > as media types ( list < mime type > mime types ) { list < media type > media types = new array list < > ( mime types size ( ) ) ; for ( mime type mime type : mime types ) { media types add ( media type as media type ( mime type ) ) ; } return media types ; }


for caching to work correctly , implementations must implement this method and { @ link # hash code ( ) }


returns the node with the highest number of bytes cached for the shard or { @ code null } if no node with any bytes matched exists

public discovery node get node with highest match ( ) { return this node with highest match ; }


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 closeable image decode gif ( final encoded image encoded image , final int length , final quality info quality info , final image decode options options ) { if ( encoded image get width ( ) = = encoded image unknown width | | encoded image get height ( ) = = encoded image unknown height ) { throw new decode exception ( " image width or height is incorrect " , encoded image ) ; } if ( ! options force static image & & m animated gif decoder ! = null ) { return m animated gif decoder decode ( encoded image , length , quality info , options ) ; } return decode static image ( encoded image , options ) ; }


creates a list of titles from the given component providers and placeholders the utility of this method is that it will group like component providers into one title value instead of having one value for each placeholder

private list < string > generate titles ( list < component placeholder > placeholders ) { / / / / decompose the given placeholders into a mapping of provider names to placeholders / / that share that name this lets us group placeholders that are multiple instances of / / the same provider / / map < string , list < component placeholder > > provider name to placholders map = new hash map < > ( ) ; for ( component placeholder placeholder : placeholders ) { string provider name = placeholder get provider ( ) get name ( ) ; list < component placeholder > list = provider name to placholders map get ( provider name ) ; if ( list = = null ) { list = new array list < > ( ) ; provider name to placholders map put ( provider name , list ) ; } list add ( placeholder ) ; } / / / / turn the created mapping into a mapping of providers names to sub - titles / / map < string , list < string > > provider name to titles map = new hash map < > ( ) ; set < entry < string , list < component placeholder > > > entry set = provider name to placholders map entry set ( ) ; for ( entry < string , list < component placeholder > > entry : entry set ) { string provider name = entry get key ( ) ; list < component placeholder > placeholders list = entry get value ( ) ; list < string > titles = new array list < > ( ) ; if ( placeholders list size ( ) = = 1 ) { titles add ( placeholders list get ( 0 ) get title ( ) ) ; } else { for ( component placeholder placeholder : placeholders list ) { titles add ( placeholder get tab text ( ) ) ; } } provider name to titles map put ( provider name , titles ) ; } / / / / use the created mapping to create an individual title based on a single provider / / or a group of providers / / list < string > final titles = new array list < > ( ) ; set < entry < string , list < string > > > providers entry set = provider name to titles map entry set ( ) ; for ( entry < string , list < string > > entry : providers entry set ) { string provider name = entry get key ( ) ; list < string > titles = entry get value ( ) ; if ( titles size ( ) = = 1 ) { final titles add ( titles get ( 0 ) ) ; } else { string buffer buffy = new string buffer ( provider name ) ; buffy append ( " [ " ) ; boolean first item = true ; for ( string title : titles ) { if ( ! first item ) { buffy append ( " , " ) ; } first item = false ; buffy append ( title ) ; } buffy append ( " ] " ) ; final titles add ( buffy to string ( ) ) ; } } collections sort ( final titles ) ; return final titles ; }


constructs a class visitor to efficiently travel to the specified class members

private static class visitor create class visitor ( class specification class specification , member visitor member visitor ) { multi class visitor multi class visitor = new multi class visitor ( ) ; add member visitors ( class specification field specifications , true , multi class visitor , member visitor ) ; add member visitors ( class specification method specifications , false , multi class visitor , member visitor ) ; / / mark the class member in this class and in super classes return new class hierarchy traveler ( true , true , false , false , multi class visitor ) ; }


returns the major part of the given class version number

public static int internal major class version ( int class version ) { return class version > > > 16 ; }


public void set original exception ( throwable original exception ) { this original exception = original exception ; }


g tree get g tree ( ) { return g tree ; }


returns a newly - created { @ code immutable set } based on the contents of the { @ code builder }

public immutable set < e > build ( ) { switch ( size ) { case 0 : return of ( ) ; case 1 : return ( immutable set < e > ) of ( contents [ 0 ] ) ; default : immutable set < e > result ; if ( hash table ! = null & & choose table size ( size ) = = hash table length ) { object [ ] unique elements = should trim ( size , contents length ) ? arrays copy of ( contents , size ) : contents ; result = new regular immutable set < e > ( unique elements , hash code , hash table , hash table length - 1 , size ) ; } else { result = construct ( size , contents ) ; / / construct has the side effect of deduping contents , so we update size / / accordingly size = result size ( ) ; } force copy = true ; hash table = null ; return result ; } }


public static configuration new h a configuration ( final string logical name ) { configuration conf = new configuration ( ) ; add h a configuration ( conf , logical name ) ; return conf ; }


public fid hash quad hash function ( function function ) throws memory access exception { list < code unit > code units = generator calculate extent ( function ) ; if ( code units size ( ) < get short hash code unit length ( ) ) { return null ; } fid hasher fid hasher = get hasher ( function get program ( ) ) ; fid hash quad hash triple = fid hasher hash ( function ) ; return hash triple ; }


returns the executable artifact , if the rule is marked as executable and there is only one artifact

private static artifact get executable ( rule context rule context , nested set < artifact > files to build ) { if ( ! rule context attributes ( ) get ( " executable " , type boolean ) ) { return null ; } return files to build is singleton ( ) ? files to build get singleton ( ) : null ; }


void write ( data output out ) throws i o exception { out write int ( id ) ; / / write root f s image serialization write i node directory ( root , out ) ; }


set the values to compute percentiles from

public percentiles aggregation builder percentiles ( double percents ) { this values = validate percentiles ( percents , name ) ; return this ; }


check if we need to do deduplication and coalescing , and if so , do it

private void maintenance ( ) { if ( length = = elements length ) { dedup and coalesce ( true ) ; } else if ( force copy elements ) { this elements = arrays copy of ( elements , elements length ) ; / / we don ' t currently need to copy the counts array , because we don ' t use it directly / / in built i s ms } force copy elements = false ; }


run the given spawn asynchronously the default implementation is synchronous for migration

default future spawn exec async ( spawn spawn , spawn execution context context ) throws interrupted exception , i o exception , exec exception { / / todo ( ulfjack ) : remove this default implementation [ exec - async ] return future spawn immediate ( exec ( spawn , context ) ) ; }


save target consistency protocol metadata

public void load ( final map < string , map < string , object > > map map ) { map map for each ( ( s , map ) - > { meta data map compute if absent ( s , meta data : : new ) ; final meta data data = meta data map get ( s ) ; map for each ( data : : put ) ; } ) ; }


return the phase that this lifecycle object is supposed to run in the default implementation returns { @ link # default phase } in order to let { @ code stop ( ) } callbacks execute after regular { @ code lifecycle } implementations

default int get phase ( ) { return default phase ; }


returns the value associated with the given config option as an integer if no value is mapped under any key of the option , it returns the specified default instead of the option ' s default value

public int get integer ( config option < integer > config option , int override default ) { return get optional ( config option ) or else ( override default ) ; }


public string get resource id ( ) { return resource id ; }


gets the most up - to - date data point value

public float get latest ( time scale time scale ) { return pick ( time scale ) get latest ( ) ; }


a sensible definition of { @ link # remove all } in terms of the { @ code remove all } method of { @ link # element set } if you override { @ link # element set } , you may wish to override { @ link # remove all } to forward to this implementation

protected boolean standard remove all ( collection < ? > elements to remove ) { return multisets remove all impl ( this , elements to remove ) ; }


check that messages are rate - limited by their x - opaque - id value

public void test messages are rate limited by x opaque id ( ) { / / fill up the cache for ( int i = 0 ; i < 128 ; i + + ) { message message = deprecated message of ( " " , " id " + i , " msg " + i ) ; assert that ( " expected key " + i + " to be accepted " , filter filter ( message ) , equal to ( result accept ) ) ; } / / should be rate - limited because it ' s still in the cache message message = deprecated message of ( " " , " id 0 " , " msg 0 " ) ; assert that ( filter filter ( message ) , equal to ( result deny ) ) ; / / filter a message with a previously unseen key , in order to evict key 0 as it ' s the oldest message = deprecated message of ( " " , " id 129 " , " msg 129 " ) ; assert that ( filter filter ( message ) , equal to ( result accept ) ) ; / / should be allowed because key 0 was evicted from the cache message = deprecated message of ( " " , " id 0 " , " msg 0 " ) ; assert that ( filter filter ( message ) , equal to ( result accept ) ) ; }


public user get user or null ( ) { return user get ( user , false , collections empty map ( ) ) ; }


get the annotation attributes of all annotations of the specified { @ code annotation name } in the annotation hierarchy above the supplied { @ link annotated element } and store the results in a { @ link multi value map } note : in contrast to { @ link # get merged annotation attributes ( annotated element , string ) } , this method does not support attribute overrides this method follows get semantics as described in the { @ linkplain annotated element utils class - level javadoc }

public static multi value map < string , object > get all annotation attributes ( annotated element element , string annotation name , final boolean class values as string , final boolean nested annotations as map ) { adapt [ ] adaptations = adapt values ( class values as string , nested annotations as map ) ; return get annotations ( element ) stream ( annotation name ) filter ( merged annotation predicates unique ( merged annotation : : get meta types ) ) map ( merged annotation : : with non merged attributes ) collect ( merged annotation collectors to multi value map ( annotated element utils : : null if empty , adaptations ) ) ; }


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


exit a parse tree produced by { @ link sql base parser # pattern escape }

void exit pattern escape ( sql base parser pattern escape context ctx ) ;


returns some statistics about the watches loaded in the trigger service

public counters stats ( ) { counters counters = new counters ( ) ; / / for bwc reasons , active / total contain the same values int watch count = per watch stats size ( ) ; counters inc ( " count active " , watch count ) ; counters inc ( " count total " , watch count ) ; counters inc ( " watch trigger all active " , watch count ) ; counters inc ( " watch trigger all total " , watch count ) ; counters inc ( " watch input all total " , watch count ) ; counters inc ( " watch input all active " , watch count ) ; per watch stats values ( ) for each ( stats - > { if ( stats metadata ) { counters inc ( " watch metadata active " ) ; counters inc ( " watch metadata total " ) ; } counters inc ( " watch trigger " + stats trigger type + " total " ) ; counters inc ( " watch trigger " + stats trigger type + " active " ) ; if ( strings is null or empty ( stats schedule type ) = = false ) { counters inc ( " watch trigger schedule " + stats schedule type + " total " ) ; counters inc ( " watch trigger schedule " + stats schedule type + " active " ) ; counters inc ( " watch trigger schedule all total " ) ; counters inc ( " watch trigger schedule all active " ) ; } counters inc ( " watch input " + stats input type + " active " ) ; counters inc ( " watch input " + stats input type + " total " ) ; counters inc ( " watch condition " + stats condition type + " active " ) ; counters inc ( " watch condition " + stats condition type + " total " ) ; counters inc ( " watch condition all total " ) ; counters inc ( " watch condition all active " ) ; if ( strings is null or empty ( stats transform type ) = = false ) { counters inc ( " watch transform " + stats transform type + " active " ) ; counters inc ( " watch transform " + stats transform type + " total " ) ; counters inc ( " watch transform all active " ) ; counters inc ( " watch transform all total " ) ; } for ( trigger watch stats action stats action : stats actions ) { counters inc ( " watch action " + action action type + " active " ) ; counters inc ( " watch action " + action action type + " total " ) ; counters inc ( " watch action all active " ) ; counters inc ( " watch action all total " ) ; if ( strings is null or empty ( action condition type ) = = false ) { counters inc ( " watch action condition " + action condition type + " active " ) ; counters inc ( " watch action condition " + action condition type + " total " ) ; counters inc ( " watch action condition all active " ) ; counters inc ( " watch action condition all total " ) ; } if ( strings is null or empty ( action transform type ) = = false ) { counters inc ( " watch action transform " + action transform type + " active " ) ; counters inc ( " watch action transform " + action transform type + " total " ) ; counters inc ( " watch action transform all active " ) ; counters inc ( " watch action transform all total " ) ; } } } ) ; return counters ; }


private datanode storage info [ ] choose target ( int num of replicas , node writer , list < datanode storage info > chosen storage , boolean return chosen nodes , set < node > excluded nodes , long blocksize , final block storage policy storage policy , enum set < add block flag > add block flags , enum map < storage type , integer > s types ) { if ( num of replicas = = 0 | | cluster map get num of leaves ( ) = = 0 ) { return datanode storage info empty array ; } if ( excluded nodes = = null ) { excluded nodes = new hash set < > ( ) ; } int [ ] result = get max nodes per rack ( chosen storage size ( ) , num of replicas ) ; num of replicas = result [ 0 ] ; int max nodes per rack = result [ 1 ] ; for ( datanode storage info storage : chosen storage ) { / / add local machine and related nodes to excluded nodes add to excluded nodes ( storage get datanode descriptor ( ) , excluded nodes ) ; } list < datanode storage info > results = null ; node local node = null ; boolean avoid stale nodes = ( stats ! = null & & stats is avoiding stale data nodes for write ( ) ) ; boolean avoid local rack = ( add block flags ! = null & & add block flags contains ( add block flag no local rack ) & & writer ! = null & & cluster map get num of racks ( ) > 2 ) ; boolean avoid local node = ( add block flags ! = null & & add block flags contains ( add block flag no local write ) & & writer ! = null & & ! excluded nodes contains ( writer ) ) ; / / attempt to exclude local rack if the client suggests so if no enough / / nodes can be obtained or number of racks are less than three , it falls / / back to the default block placement / / policy if ( avoid local rack ) { results = new array list < > ( chosen storage ) ; set < node > excluded node copy = new hash set < > ( excluded nodes ) ; excluded node copy add all ( cluster map get leaves ( writer get network location ( ) ) ) ; local node = choose target ( num of replicas , writer , excluded node copy , blocksize , max nodes per rack , results , avoid stale nodes , storage policy , enum set none of ( storage type class ) , results is empty ( ) , s types ) ; if ( results size ( ) < num of replicas ) { / / not enough nodes ; discard results and fall back results = null ; } } / / attempt to exclude local node if the client suggests so if no enough / / nodes can be obtained , it falls back to the default block placement / / policy if ( avoid local node & & results = = null ) { results = new array list < > ( chosen storage ) ; set < node > excluded node copy = new hash set < > ( excluded nodes ) ; if ( writer ! = null ) { excluded node copy add ( writer ) ; } local node = choose target ( num of replicas , writer , excluded node copy , blocksize , max nodes per rack , results , avoid stale nodes , storage policy , enum set none of ( storage type class ) , results is empty ( ) , s types ) ; if ( results size ( ) < num of replicas ) { / / not enough nodes ; discard results and fall back results = null ; } } if ( results = = null ) { results = new array list < > ( chosen storage ) ; local node = choose target ( num of replicas , writer , excluded nodes , blocksize , max nodes per rack , results , avoid stale nodes , storage policy , enum set none of ( storage type class ) , results is empty ( ) , s types ) ; } if ( ! return chosen nodes ) { results remove all ( chosen storage ) ; } / / sorting nodes to form a pipeline return get pipeline ( ( writer ! = null & & writer instanceof datanode descriptor ) ? writer : local node , results to array ( new datanode storage info [ results size ( ) ] ) ) ; }


create a { @ code list objects request } request against this bucket

static list objects request create list objects request ( final o b s file system owner , final string key , final string delimiter ) { return create list objects request ( owner , key , delimiter , - 1 ) ; }


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

public generate default layout method next parent layout $ with layout on unbind ( on model unbound listener < generate default layout method next parent layout $ with layout , object > listener ) { on mutation ( ) ; this on model unbound listener epoxy generated model = listener ; return this ; }


public string to json ( ) { return mapper write value as string ( this ) ; }


gets all partitions ( with partition state ) that this fetcher is subscribed to

protected final list < kafka topic partition state < t , kph > > subscribed partition states ( ) { return subscribed partition states ; }


emits a tuple to the specified task on the default output stream this output stream must have been declared as a direct stream , and the specified task must use a direct grouping on this stream to receive the message

public void emit direct ( int task id , list < object > tuple ) { emit direct ( task id , utils default stream id , tuple ) ; }


set the active animation , replacing any current animation

public animation desc set animation ( final string id , int loop count , float speed , final animation listener listener ) { return set animation ( id , 0f , - 1f , loop count , speed , listener ) ; }


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

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


find the fields constant that matches field id , throwing an exception if it is not found

public static fields find by thrift id or throw ( int field id ) { fields fields = find by thrift id ( field id ) ; if ( fields = = null ) throw new illegal argument exception ( " field " + field id + " doesn ' t exist ! " ) ; return fields ; }


create a parallel builder with a database dependency checker using the specified action cache

protected builder with result create builder ( action cache action cache , final int thread count , final boolean keep going ) throws exception { return create builder ( action cache , thread count , keep going , / * evaluation progress receiver = * / null , graph inconsistency receiver throwing ) ; }


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 byte get type ( ) { return type ; }


invokes a remote method against the specified extended block re - throws exceptions generated by the remote rpc call as either remote exception or i o exception

public < t > t invoke single ( final extended block extended block , remote method method , class < t > clazz ) throws i o exception { string ns id = get nameservice for block pool id ( extended block get block pool id ( ) ) ; @ suppress warnings ( " unchecked " ) t ret = ( t ) invoke single ( ns id , method ) ; return ret ; }


return the delay before starting the job for the first time

public long get delay ( ) { return this delay ; }


returns the current restrictions on pdb applicator processing

public pdb applicator restrictions get restrictions ( ) { return restrictions ; }


copy the given collection into a string array the collection must contain string elements only

public static string [ ] to string array ( collection < string > collection ) { if ( collection = = null ) { return null ; } return collection to array ( new string [ collection size ( ) ] ) ; }


maximum original size , the unit is mb only useful when { link @ original enable } set true

public selection creator max original size ( int size ) { m selection spec original max size = size ; return this ; }


delegates calls to the { @ link # flat map ( object ) } method

public final void flat map ( in value , collector < out > out ) throws exception { for ( iterator < out > iter = flat map ( value ) ; iter has next ( ) ; ) { out collect ( iter next ( ) ) ; } }


invoked second before the request body is read and converted

http input message before body read ( http input message input message , method parameter parameter , type target type , class < ? extends http message converter < ? > > converter type ) throws i o exception ;