return a list of all valid keys for state handles

public collection < string > get all handles ( ) throws exception { return kube client get config map ( config map name ) map ( config map - > config map get data ( ) key set ( ) stream ( ) filter ( config map key filter ) collect ( collectors to list ( ) ) ) or else throw ( this : : get config map not exist exception ) ; }


adds a new item to the < code > array number < code > list

public array of number only add array number item ( big decimal array number item ) { this array number add ( array number item ) ; return this ; }


public list < integer > get prefix ns array ( ) { return prefix ns array ; }


get or create a sensor with the given unique name and zero or more parent sensors all parent sensors will receive every value recorded with this sensor

public synchronized sensor sensor ( string name , metric config config , long inactive sensor expiration time seconds , sensor recording level recording level , sensor parents ) { sensor s = get sensor ( name ) ; if ( s = = null ) { s = new sensor ( this , name , parents , config = = null ? this config : config , time , inactive sensor expiration time seconds , recording level ) ; this sensors put ( name , s ) ; if ( parents ! = null ) { for ( sensor parent : parents ) { list < sensor > children = children sensors compute if absent ( parent , k - > new array list < > ( ) ) ; children add ( s ) ; } } log trace ( " added sensor with name { } " , name ) ; } return s ; }


returns the number of sessions proposed by clients and either found in the internal or external session cache in server mode , but that were invalid due to timeout these sessions are not included in the { @ link # hits ( ) } count

public long timeouts ( ) { lock reader lock = context ctx lock read lock ( ) ; reader lock lock ( ) ; try { return s s l context session timeouts ( context ctx ) ; } finally { reader lock unlock ( ) ; } }


returns whether this integer value is greater than or equal to the given particular integer value : < code > never < code > , < code > maybe < code > , or < code > always < code >

public final int greater than or equal ( particular integer value other ) { return - less than ( other ) ; }


enumerate the partitions inside this topics spec

public map < string , partitions spec > materialize ( ) { hash map < string , partitions spec > all = new hash map < > ( ) ; for ( map entry < string , partitions spec > entry : map entry set ( ) ) { string topic name = entry get key ( ) ; partitions spec partitions = entry get value ( ) ; for ( string expanded topic name : string expander expand ( topic name ) ) all put ( expanded topic name , partitions ) ; } return all ; }


test that program merge can determine where comments differ between program 1 and program 2


get the credentials any exception raised in { @ link # create credentials ( configuration ) } is thrown here before any attempt to return the credentials is made

public a w s credentials get credentials ( ) throws sdk base exception { / / do an on - demand init then raise an aws sdk exception if / / there was a failure try { if ( ! is initialized ( ) ) { init ( ) ; } } catch ( i o exception e ) { if ( e get cause ( ) instanceof sdk base exception ) { throw ( sdk base exception ) e get cause ( ) ; } else { throw new credential initialization exception ( e get message ( ) , e ) ; } } if ( aws credentials = = null ) { throw new credential initialization exception ( " provider " + this + " has no credentials " ) ; } return aws credentials ; }


from label { @ code a } build graph { @ code o - a - > o }

public handle token ref ( terminal a s t node ) { a t n state left = new state ( node ) ; a t n state right = new state ( node ) ; int ttype = g get token type ( node get text ( ) ) ; left add transition ( new atom transition ( right , ttype ) ) ; node atn state = left ; return new handle ( left , right ) ; }


public void add body file upload ( string name , file file , string content type , boolean is text ) throws error data encoder exception { add body file upload ( name , file get name ( ) , file , content type , is text ) ; }


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


public int get holdability ( ) throws s q l exception { return 0 ; }


generate overview table for app web page

private void generate overview table ( app info app , string scheduler path , string web ui type , application report app report ) { response info overview table = info ( " application overview " ) ( " user : " , scheduler path , app get user ( ) ) ( " name : " , app get name ( ) ) ( " application type : " , app get type ( ) ) ( " application tags : " , app get application tags ( ) = = null ? " " : app get application tags ( ) ) ( " application priority : " , clarify app priority ( app get priority ( ) ) ) ( " yarn application state : " , app get app state ( ) = = null ? unavailable : clarify app state ( app get app state ( ) ) ) ( " queue : " , scheduler path , app get queue ( ) ) ( " final status reported by am : " , clairfy app final status ( app get final app status ( ) ) ) ( " started : " , times format ( app get started time ( ) ) ) ( " launched : " , times format ( app get launch time ( ) ) ) ( " finished : " , times format ( app get finished time ( ) ) ) ( " elapsed : " , string utils format time ( app get elapsed time ( ) ) ) ( " tracking url : " , app get tracking url ( ) = = null | | app get tracking url ( ) equals ( unavailable ) ? null : root url ( app get tracking url ( ) ) , app get tracking url ( ) = = null | | app get tracking url ( ) equals ( unavailable ) ? " unassigned " : apps is application final state ( app get app state ( ) ) ? " history " : " application master " ) ; if ( web ui type ! = null & & web ui type equals ( yarn web params rm web ui ) ) { log aggregation status status = get log aggregation status ( ) ; if ( status = = null ) { overview table ( " log aggregation status : " , " n / a " ) ; } else if ( status = = log aggregation status disabled | | status = = log aggregation status not start | | status = = log aggregation status succeeded ) { overview table ( " log aggregation status : " , status name ( ) ) ; } else { overview table ( " log aggregation status : " , root url ( " logaggregationstatus " , app get app id ( ) ) , status name ( ) ) ; } long timeout = app report get application timeouts ( ) get ( application timeout type lifetime ) get remaining time ( ) ; if ( timeout < 0 ) { overview table ( " application timeout ( remaining time ) : " , " unlimited " ) ; } else { overview table ( " application timeout ( remaining time ) : " , string format ( " % d seconds " , timeout ) ) ; } } overview table ( " diagnostics : " , app get diagnostics info ( ) = = null ? " " : app get diagnostics info ( ) ) ; overview table ( " unmanaged application : " , app is unmanaged app ( ) ) ; overview table ( " application node label expression : " , app get app node label expression ( ) = = null ? " < not set > " : app get app node label expression ( ) ) ; overview table ( " am container node label expression : " , app get am node label expression ( ) = = null ? " < not set > " : app get am node label expression ( ) ) ; }


returns the media types for this condition excluding negated expressions

public set < media type > get consumable media types ( ) { set < media type > result = new linked hash set < > ( ) ; for ( consume media type expression expression : this expressions ) { if ( ! expression is negated ( ) ) { result add ( expression get media type ( ) ) ; } } return result ; }


returns a single socket or else a not found code

public void get socket ( io grpc channelz v 1 get socket request request , io grpc stub stream observer < io grpc channelz v 1 get socket response > response observer ) { io grpc stub server calls async unimplemented unary call ( get get socket method ( ) , response observer ) ; }


converts a scala { @ link future } to a { @ link completable future }

public static < t , u extends t > completable future < t > to java ( future < u > scala future ) { final completable future < t > result = new completable future < > ( ) ; scala future on complete ( new on complete < u > ( ) { @ override public void on complete ( throwable failure , u success ) { if ( failure ! = null ) { result complete exceptionally ( failure ) ; } else { result complete ( success ) ; } } } , executors direct execution context ( ) ) ; return result ; }


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


public final int yystate ( ) { return zz lexical state ; }


re - authentication must fail if mechanism changes

public void test cannot reauthenticate with different mechanism ( ) throws exception { string node = " 0 " ; security protocol security protocol = security protocol sasl ssl ; configure mechanisms ( " digest - md5 " , arrays as list ( " digest - md5 " , " plain " ) ) ; configure digest md 5 server callback ( security protocol ) ; server = create echo server ( security protocol ) ; string sasl mechanism = ( string ) sasl client configs get ( sasl configs sasl mechanism ) ; map < string , ? > configs = new test security config ( sasl client configs ) values ( ) ; this channel builder = new alternate sasl channel builder ( mode client , collections singleton map ( sasl mechanism , jaas context load client context ( configs ) ) , security protocol , null , false , sasl mechanism , true , credential cache , null , time ) ; this channel builder configure ( configs ) ; / / initial authentication must succeed this selector = network test utils create selector ( channel builder , time ) ; inet socket address addr = new inet socket address ( " localhost " , server port ( ) ) ; selector connect ( node , addr , buffer size , buffer size ) ; check client connection ( node ) ; / / ensure metrics are as expected before trying to re - authenticate server verify authentication metrics ( 1 , 0 ) ; server verify reauthentication metrics ( 0 , 0 ) ; / * * now re - authenticate with a different mechanism and ensure it fails we have * to sleep long enough so that the next write will trigger a re - authentication * / delay ( ( long ) ( connections max reauth ms value * 1 1 ) ) ; assert throws ( assertion failed error class , ( ) - > check client connection ( node ) ) ; server verify authentication metrics ( 1 , 0 ) ; server verify reauthentication metrics ( 0 , 1 ) ; }


returns the number of temporary memory bytes allocated to process the records this size depends on whether the records need decompression andor conversion : non compressed , no conversion : zero non compressed , with conversion : size of the converted buffer compressed , no conversion : size of the original buffer after decompression compressed , with conversion : size of the original buffer after decompression + size of the converted buffer uncompressed

public long temporary memory bytes ( ) { return temporary memory bytes ; }


returns the difference of the given long value and this long value

public long value subtract from ( long value other ) { return other subtract ( this ) ; }


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


the yarn router will forward to the respective yarn rm in which the am is running possible failure : client : identical behavior as { @ code r m web services } router : the client will timeout and resubmit the request resource manager : the router will timeout and the call will fail state store : the router will timeout and it will retry depending on the federation facade settings - if the failure happened before the select operation

public app state get app state ( http servlet request hsr , string app id ) throws authorization exception { application id application id = null ; try { application id = application id from string ( app id ) ; } catch ( illegal argument exception e ) { return null ; } sub cluster info sub cluster info = null ; sub cluster id sub cluster id = null ; try { sub cluster id = federation facade get application home sub cluster ( application id ) ; if ( sub cluster id = = null ) { return null ; } sub cluster info = federation facade get sub cluster ( sub cluster id ) ; } catch ( yarn exception e ) { return null ; } default request interceptor r e s t interceptor = get or create interceptor for sub cluster ( sub cluster id , sub cluster info get r m web service address ( ) ) ; return interceptor get app state ( hsr , app id ) ; }


litho handles addingremoving views automatically using mountunmount calls manually adding removing views will mess up litho ' s bookkeeping of added views and cause weird crashes down the line

public void remove view at ( int index ) { throw new unsupported operation exception ( " removing views manually within litho views is not supported " ) ; }


cause the graph to be centered and scaled nicely for the view window

public void center and scale ( ) { viewer scale to layout ( ) ; satellite viewer scale to layout ( ) ; }


check if a method is supported by the server or not

public synchronized boolean is method supported ( string method name , class < ? > parameter types ) throws i o exception { if ( ! support server method check ) { return true ; } method method ; try { method = protocol get declared method ( method name , parameter types ) ; } catch ( security exception e ) { throw new i o exception ( e ) ; } catch ( no such method exception e ) { throw new i o exception ( e ) ; } if ( ! server methods fetched ) { fetch server methods ( method ) ; } if ( server methods = = null ) { / / client & server have the same protocol return true ; } return server methods contains ( integer value of ( protocol signature get fingerprint ( method ) ) ) ; }


retrieves a fully qualified table if the path is not yet fully qualified use { @ link # qualify identifier ( unresolved identifier ) } first

public optional < table lookup result > get table ( object identifier object identifier ) { preconditions check not null ( schema resolver , " schema resolver should not be null " ) ; catalog base table temporary table = temporary tables get ( object identifier ) ; if ( temporary table ! = null ) { table schema resolved schema = resolve table schema ( temporary table ) ; return optional of ( table lookup result temporary ( temporary table , resolved schema ) ) ; } else { return get permanent table ( object identifier ) ; } }


checks if { @ code gateway } is present in the request params

protected boolean is gateway present ( final request context context ) { val request parameter map = context get external context ( ) get request parameter map ( ) ; return string utils has text ( request parameter map get ( cas protocol constants parameter gateway ) ) ; }


private void render cell ( final tiled map tile layer cell cell , final float x , final float y , final float color ) { if ( cell ! = null ) { final tiled map tile tile = cell get tile ( ) ; if ( tile ! = null ) { if ( tile instanceof animated tiled map tile ) return ; final boolean flip x = cell get flip horizontally ( ) ; final boolean flip y = cell get flip vertically ( ) ; final int rotations = cell get rotation ( ) ; texture region region = tile get texture region ( ) ; float x 1 = x + tile get offset x ( ) * unit scale ; float y 1 = y + tile get offset y ( ) * unit scale ; float x 2 = x 1 + region get region width ( ) * unit scale ; float y 2 = y 1 + region get region height ( ) * unit scale ; float u 1 = region get u ( ) ; float v 1 = region get v 2 ( ) ; float u 2 = region get u 2 ( ) ; float v 2 = region get v ( ) ; vertices [ x1 ] = x 1 ; vertices [ y1 ] = y 1 ; vertices [ c1 ] = color ; vertices [ u1 ] = u 1 ; vertices [ v1 ] = v 1 ; vertices [ x2 ] = x 1 ; vertices [ y2 ] = y 2 ; vertices [ c2 ] = color ; vertices [ u2 ] = u 1 ; vertices [ v2 ] = v 2 ; vertices [ x3 ] = x 2 ; vertices [ y3 ] = y 2 ; vertices [ c3 ] = color ; vertices [ u3 ] = u 2 ; vertices [ v3 ] = v 2 ; vertices [ x4 ] = x 2 ; vertices [ y4 ] = y 1 ; vertices [ c4 ] = color ; vertices [ u4 ] = u 2 ; vertices [ v4 ] = v 1 ; if ( flip x ) { float temp = vertices [ u1 ] ; vertices [ u1 ] = vertices [ u3 ] ; vertices [ u3 ] = temp ; temp = vertices [ u2 ] ; vertices [ u2 ] = vertices [ u4 ] ; vertices [ u4 ] = temp ; } if ( flip y ) { float temp = vertices [ v1 ] ; vertices [ v1 ] = vertices [ v3 ] ; vertices [ v3 ] = temp ; temp = vertices [ v2 ] ; vertices [ v2 ] = vertices [ v4 ] ; vertices [ v4 ] = temp ; } if ( rotations = = 2 ) { float temp u = vertices [ u1 ] ; vertices [ u1 ] = vertices [ u3 ] ; vertices [ u3 ] = temp u ; temp u = vertices [ u2 ] ; vertices [ u2 ] = vertices [ u4 ] ; vertices [ u4 ] = temp u ; float temp v = vertices [ v1 ] ; vertices [ v1 ] = vertices [ v3 ] ; vertices [ v3 ] = temp v ; temp v = vertices [ v2 ] ; vertices [ v2 ] = vertices [ v4 ] ; vertices [ v4 ] = temp v ; } batch draw ( region get texture ( ) , vertices , 0 , num vertices ) ; } } }


public resource list w ( resource r ) { all add ( r ) ; write put ( r , unbox ( write get ( r ) ) + 1 ) ; return this ; }


discovery snapshot handler it is up to log processor to decide which snapshot operate should be loaded and saved by itself

public list < snapshot operation > load snapshot operate ( ) { return collections empty list ( ) ; }


public byte block get byte block ( ) { return block ; }


{ @ inherit doc } the default implementation does nothing

@ override public void enter limit clause ( sql base parser limit clause context ctx ) { }


gets the length of this policy ' s time interval

public long get size ( ) { return size ; }


return the string ranging from the start of the current partition to the current scanning position some rules (

public string get scanned partition string ( ) { try { return f document get ( f partition offset , f offset - f partition offset ) ; } catch ( exception e ) { / / do nothing } return " " ; }


sets the { @ code git host } and returns a reference to this builder so that the methods can be chained together

public builder with git host ( string git host ) { this git host = git host ; return this ; }


this method will perform a save on the given archive however , the one caveat is that if the archive has never been saved , then a filename needs to be chosen under this ' special ' condition this method logically turns into a { @ link # save as ( component , file archive ) }

public static void save ( component component , archive archive ) throws duplicate file exception , i o exception { if ( ! archive is savable ( ) ) { archive save as ( component ) ; } else { archive save ( ) ; } }


the series of types defined by the package < code > repeated aapt pb type type = 3 ; < code >

public builder add type ( com android aapt resources type value ) { copy on write ( ) ; instance add type ( value ) ; return this ; }


returns serializable object representing differences between this and previous state


regression test for bug 3071861 checks that the { @ code - - define } command line option is also applied to the host configuration

public void test host define ( ) throws exception { mock genrule support setup ( mock tools config ) ; write ( " x / build " , " vardef ( ' cmd ' , ' false ' ) ; " , " genrule ( name = ' foo ' , outs = [ ' foo out ' ] , tools = [ ' : bar ' ] , cmd = ' touch $ @ & & ' + varref ( ' cmd ' ) ) " , " genrule ( name = ' bar ' , outs = [ ' bar out ' ] , cmd = ' touch $ @ & & ' + varref ( ' cmd ' ) ) " ) ; add options ( " - - define = cmd = true " ) ; build target ( " / / x : foo " ) ; }


sets whether the fast forward button is shown

public void set show fast forward button ( boolean show fast forward button ) { control view layout manager set show button ( fast forward button , show fast forward button ) ; update navigation ( ) ; }


issue a select call , expect the specific number of rows back error text will include the sql

private list < string > expect selected ( final int expected , final configuration conf , final string header , final string sql , final object args ) throws exception { conf set ( csv input header , header ) ; return verify selection count ( expected , sql ( sql , args ) , select csv file ( conf , sql , args ) ) ; }


when set code factor alue equal or smaller than 1 , get value in sentinel config cold factor ( ) will return default cold factor see { @ link sentinel config # cold factor ( ) }

public void test cold factor equal or smaller than one ( ) { sentinel config set config ( sentinel config cold factor , " 0 5 " ) ; assert equals ( sentinel config default cold factor , sentinel config cold factor ( ) ) ; sentinel config set config ( sentinel config cold factor , " 1 " ) ; assert equals ( sentinel config default cold factor , sentinel config cold factor ( ) ) ; }


handles an inbound { @ code ping } frame

void on ping read ( channel handler context ctx , long data ) throws http 2 exception ;


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


returns the additional properties schema for the specified input schema the additional properties keyword is used to control the handling of additional , undeclared properties , that is , properties whose names are not listed in the properties keyword the additional properties keyword may be either a boolean or an object if additional properties is a boolean and set to false , no additional properties are allowed by default when the additional properties keyword is not specified in the input schema , any additional properties are allowed this is equivalent to setting additional properties to the boolean value true or setting additional properties : { }

protected schema get additional properties ( schema schema ) { return model utils get additional properties ( open a p i , schema ) ; }


optional method for plugins to pick up settings from the configuration

default void configure ( configuration config ) { }


failure recovery after data is repartitioned with time characteristic : ingestion time producer parallelism = 2 ; kafka partition # = 3 ; consumer parallelism = 3

public void test assigned to partition failure recovery ingestion time ( ) throws exception { test assigned to partition failure recovery ( 500 , ingestion time ) ; }


keys which the input stream must support

public list < string > input stream statistic keys ( ) { return arrays as list ( stream read bytes , stream read exceptions , stream read seek operations , stream read skip operations , stream read skip bytes ) ; }


determine if this { @ code merged context configuration } instance has class - based resources

public boolean has classes ( ) { return ! object utils is empty ( get classes ( ) ) ; }


returns the parent artifact containing this artifact artifacts without parents shall return null

public special artifact get parent ( ) { return null ; }


return whether buckets should be returned as a hash in case { @ code keyed } is false , buckets will be returned as an array

public boolean keyed ( ) { return keyed ; }


set the scheduling information associated to particular job queue

public void set scheduling info ( string scheduling info ) { super set scheduling info ( scheduling info ) ; }


makes the action always execute , even if none of its inputs have changed only use this when absolutely necessary , since this is a performance hit and we ' d like to get rid of this mechanism eventually you ' ll eventually be able to declare a skyframe dependency on the build id , which would accomplish the same thing

public builder execute unconditionally ( ) { / / this should really be implemented by declaring a skyframe dependency on the build id / / instead , however , we can ' t just do that yet from within actions , so we need to go through / / action execute unconditionally ( ) which in turn is called by action cache checker this execute unconditionally = true ; return this ; }


retrieves a { @ link g file } from this filesystem based on its full path and filename

public g file lookup ( string path ) throws i o exception ;


set the value of the < code > name < code > property to the name of a < code > the class < code > implementing the given interface < code > xface < code > an exception is thrown if < code > the class < code > does not implement the interface < code > xface < code >

public void set class ( string name , class < ? > the class , class < ? > xface ) { if ( ! xface is assignable from ( the class ) ) throw new runtime exception ( the class + " not " + xface get name ( ) ) ; set ( name , the class get name ( ) ) ; }


returns the end position of a string sets the error state if the column is empty

protected final int next string end pos ( byte [ ] bytes , int start pos , int limit , byte [ ] delimiter ) { int end pos = start pos ; final int delim limit = limit - delimiter length + 1 ; while ( end pos < limit ) { if ( end pos < delim limit & & delimiter next ( bytes , end pos , delimiter ) ) { break ; } end pos + + ; } if ( end pos = = start pos ) { set error state ( parse error state empty column ) ; return - 1 ; } return end pos ; }


returns a reader wrapping the given reader that only reads half of the maximum number of characters that it could read in read ( char [ ] , int , int )

private static reader new non buffer filling reader ( reader reader ) { return new filter reader ( reader ) { @ override public int read ( char [ ] cbuf , int off , int len ) throws i o exception { / / if a buffer isn ' t being cleared correctly , this method will eventually start being called / / with a len of 0 forever if ( len < = 0 ) { fail ( " read called with a len of " + len ) ; } / / read fewer than the max number of chars to read / / shouldn ' t be a problem unless the buffer is shrinking each call return in read ( cbuf , off , math max ( len - 1024 , 0 ) ) ; } } ; }


some flags expand to other flags , either in place , or with " implicit requirements " that get added on top of the flag ' s value don ' t let these flags do too many crazy things , dealing with this is enough

private void check expansion options ( variable element option field ) throws option processor exception { option annotation = option field get annotation ( option class ) ; boolean is static expansion = annotation expansion ( ) length > 0 ; boolean has implicit requirements = annotation implicit requirements ( ) length > 0 ; annotation mirror annotation mirror = processor utils get annotation ( element utils , type utils , option field , option class ) ; type element expansion function = processor utils get class type from annotation field ( element utils , annotation mirror , " expansion function " ) ; type element default expansion function = element utils get type element ( expansion function class get canonical name ( ) ) ; boolean is functional expansion = ! type utils is same type ( expansion function as type ( ) , default expansion function as type ( ) ) ; if ( is static expansion & & is functional expansion ) { throw new option processor exception ( option field , " options cannot expand using both a static expansion list and an expansion function " ) ; } boolean is expansion = is static expansion | | is functional expansion ; if ( is expansion & & has implicit requirements ) { throw new option processor exception ( option field , " can ' t set an option to be both an expansion option and have implicit requirements " ) ; } if ( is expansion | | has implicit requirements ) { if ( annotation allow multiple ( ) ) { throw new option processor exception ( option field , " can ' t set an option to accumulate multiple values and let it expand to other flags " ) ; } } }


return an iterator over the set of blocks for which there are no replicas

public iterator < block info > get corrupt replica block iterator ( ) { return needed reconstruction iterator ( low redundancy blocks queue with corrupt blocks ) ; }


returns size value of divider height for horizontal divider , width for vertical divider

int divider size ( int position , recycler view parent ) ;


static public alpha action alpha ( float a ) { return alpha ( a , 0 , null ) ; }


protected int get attribute context ( ) { return attribute factory ctx field ; }


resets the element after this call , the iterator has one element available , which is the given element

public void set ( e current ) { this current = current ; this available = true ; }


returns true if the two f s r ls are the same , excluding any md5 values

public boolean is equivalent ( string fsrl str ) { if ( fsrl str = = null ) { return false ; } string s = to string ( ) ; return s equals ( fsrl str ) | | ( get m d 5 ( ) ! = null & & s starts with ( fsrl str ) & & s substring ( fsrl str length ( ) ) starts with ( " ? md5 = " ) & & s length ( ) = = fsrl str length ( ) + 37 ) | | ( get m d 5 ( ) = = null & & fsrl str starts with ( s ) & & fsrl str substring ( s length ( ) ) starts with ( " ? md5 = " ) & & fsrl str length ( ) = = s length ( ) + 37 ) ; }


sets the alias to rollover to another index

public void set new index name ( string new index name ) { this new index name = new index name ; }


public static extension list < console annotator factory > all ( ) { return extension list lookup ( console annotator factory class ) ; }


writes the instruction at the given offset in the given code attribute

public final void write ( code attribute code attribute , int offset ) { write ( code attribute code , offset ) ; }


gets the allocation id for the shard copy , if it exists

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


create a set of tags using the supplied key and value pairs the order of the tags will be kept

public static map < string , string > get tags ( string key value ) { if ( ( key value length % 2 ) ! = 0 ) throw new illegal argument exception ( " key value needs to be specified in pairs " ) ; map < string , string > tags = new linked hash map < > ( key value length / 2 ) ; for ( int i = 0 ; i < key value length ; i + = 2 ) tags put ( key value [ i ] , key value [ i + 1 ] ) ; return tags ; }


set this node to be deleted so that it can be rendered as such

public void set is cut ( boolean is cut ) { this is cut = is cut ; fire node changed ( get parent ( ) , this ) ; }


obtain a { @ link data size } representing the specified number of terabytes

public static data size of terabytes ( long terabytes ) { return new data size ( math multiply exact ( terabytes , bytes per tb ) ) ; }


void on rollback retrying ( global transaction tx , throwable original exception ) ;


insert an input varnode at the given index of input varnodes

public final void insert input ( varnode vn , int slot ) { if ( input = = null ) { set input ( vn , slot ) ; return ; } varnode [ ] newinput = new varnode [ input length + 1 ] ; for ( int i = 0 ; i < slot ; + + i ) { newinput [ i ] = input [ i ] ; } for ( int i = slot + 1 ; i < newinput length ; + + i ) { newinput [ i ] = input [ i - 1 ] ; } newinput [ slot ] = vn ; input = newinput ; }


returns an immutable array containing the same values as { @ code this } array this is logically a no - op , and in some circumstances { @ code this } itself is returned however , if this instance is a { @ link # sub array } view of a larger array , this method will copy only the appropriate range of values , resulting in an equivalent array with a smaller memory footprint

public immutable int array trimmed ( ) { return is partial view ( ) ? new immutable int array ( to array ( ) ) : this ; }


grant a { @ link service ticket } that may be used to access the given service by authenticating the given credentials the details of the security policy around credential authentication and the definition of authentication success are dependent on the implementation , but it should be safe to assume that at least one credential must be authenticated for ticket creation to succeed the principal that is resolved from the authenticated credentials must be the same as that to which the given ticket - granting ticket was issued

service ticket grant service ticket ( string ticket granting ticket id , service service , authentication result authentication result ) throws authentication exception , abstract ticket exception ;


test generated permissions for all configured paths

public void test environment paths ( ) throws exception { path path = create temp dir ( ) ; / / make a fake es home and ensure we only grant permissions to that path es home = path resolve ( " es home " ) ; settings builder settings builder = settings builder ( ) ; settings builder put ( environment path home setting get key ( ) , es home resolve ( " home " ) to string ( ) ) ; settings builder put list ( environment path data setting get key ( ) , es home resolve ( " data 1 " ) to string ( ) , es home resolve ( " data 2 " ) to string ( ) ) ; settings builder put ( environment path shared data setting get key ( ) , es home resolve ( " custom " ) to string ( ) ) ; settings builder put ( environment path logs setting get key ( ) , es home resolve ( " logs " ) to string ( ) ) ; settings builder put ( environment node pidfile setting get key ( ) , es home resolve ( " test pid " ) to string ( ) ) ; settings settings = settings builder build ( ) ; path fake tmp dir = create temp dir ( ) ; string real tmp dir = system get property ( " java io tmpdir " ) ; permissions permissions ; environment environment ; try { system set property ( " java io tmpdir " , fake tmp dir to string ( ) ) ; environment = new environment ( settings , es home resolve ( " conf " ) ) ; permissions = security create permissions ( environment ) ; } finally { system set property ( " java io tmpdir " , real tmp dir ) ; } / / the fake es home assert no permissions ( es home , permissions ) ; / / its parent assert no permissions ( es home get parent ( ) , permissions ) ; / / some other sibling assert no permissions ( es home get parent ( ) resolve ( " other " ) , permissions ) ; / / double check we overwrote java io tmpdir correctly for the test assert no permissions ( path utils get ( real tmp dir ) , permissions ) ; / / check that all directories got permissions : / / bin file : ro assert exact permissions ( new file permission ( environment bin file ( ) to string ( ) , " read , readlink " ) , permissions ) ; / / lib file : ro assert exact permissions ( new file permission ( environment lib file ( ) to string ( ) , " read , readlink " ) , permissions ) ; / / modules file : ro assert exact permissions ( new file permission ( environment modules file ( ) to string ( ) , " read , readlink " ) , permissions ) ; / / config file : ro assert exact permissions ( new file permission ( environment config file ( ) to string ( ) , " read , readlink " ) , permissions ) ; / / plugins : ro assert exact permissions ( new file permission ( environment plugins file ( ) to string ( ) , " read , readlink " ) , permissions ) ; / / data paths : r / w for ( path data path : environment data files ( ) ) { assert exact permissions ( new file permission ( data path to string ( ) , " read , readlink , write , delete " ) , permissions ) ; } assert exact permissions ( new file permission ( environment shared data file ( ) to string ( ) , " read , readlink , write , delete " ) , permissions ) ; / / logs : r / w assert exact permissions ( new file permission ( environment logs file ( ) to string ( ) , " read , readlink , write , delete " ) , permissions ) ; / / temp dir : r / w assert exact permissions ( new file permission ( fake tmp dir to string ( ) , " read , readlink , write , delete " ) , permissions ) ; / / pid file : delete only ( for the shutdown hook ) assert exact permissions ( new file permission ( environment pid file ( ) to string ( ) , " delete " ) , permissions ) ; }


given the byte offset into a unit , get the column position

public int get column position ( byte block block , int byte offset ) { return 0 ; }


return the level of caching that this listener container is allowed to apply

public int get cache level ( ) { return this cache level ; }


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

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


adds an aggregation to the search operation

public search request builder add aggregation ( pipeline aggregation builder aggregation ) { source builder ( ) aggregation ( aggregation ) ; return this ; }


add an attribute to the model using a { @ link org springframework core conventions # get variable name generated name }


serialize the given remote invocation to the given output stream the default implementation gives { @ code decorate output stream } a chance to decorate the stream first ( for example , for custom encryption or compression ) creates an { @ code object output stream } for the final stream and calls { @ code do write remote invocation } to actually write the object can be overridden for custom serialization of the invocation

protected void write remote invocation ( remote invocation invocation , output stream os ) throws i o exception { try ( object output stream oos = new object output stream ( decorate output stream ( os ) ) ) { do write remote invocation ( invocation , oos ) ; } }


sets the query that is to be executed for every record

public cassandra sink builder < in > set query ( string query ) { this query = query ; return this ; }


create a new { @ link cogrouped k stream } from the this grouped k stream to allow cogrouping other { @ code k grouped stream } to it { @ link cogrouped k stream } is an abstraction of multiple grouped record streams of { @ link key value } pairs it is an intermediate representation after a grouping of { @ link k stream } s , before the aggregations are applied to the new partitions resulting in a { @ link k table } the specified { @ link aggregator } is applied in the actual { @ link cogrouped k stream # aggregate ( initializer ) aggregation } step for each input record and computes a new aggregate using the current aggregate ( or for the very first record per key using the initial intermediate aggregation result provided via the { @ link initializer } that is passed into { @ link cogrouped k stream # aggregate ( initializer ) } ) and the record ' s value

< v out > cogrouped k stream < k , v out > cogroup ( final aggregator < ? super k , ? super v , v out > aggregator ) ;


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

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


set the length of the body in bytes , as specified by the { @ code content - length } header

builder < t > content length ( long content length ) ;


opens a file for reading , and returns an input stream

public input stream get input stream ( string filename ) throws i o exception { return new file input stream ( filename ) ; }


returns true if the number of instructions selected is less or equal to max selection size

private boolean is selection size valid ( program selection selection ) { int num instructions in selection = get num instructions in selection ( get current program ( ) , selection ) ; return num instructions in selection < = max selection size ; }


returns true iff the t was caused by a java lang error that is unrecoverable note : not all java lang errors are unrecoverable

private boolean is unrecoverable ( throwable t ) { if ( t ! = null & & t get cause ( ) ! = null ) { throwable cause = t get cause ( ) ; if ( cause instanceof stack overflow error ) { return true ; } else if ( cause instanceof virtual machine error ) { return true ; } else if ( cause instanceof thread death ) { return true ; } else if ( cause instanceof linkage error ) { return true ; } } return false ; }


returns true to allow values to be changed

public boolean is editable ( ) { return ( true ) ; }


get the value of the ' { @ code item label } ' attribute may be a runtime expression

protected string get item label ( ) { return this item label ; }


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

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


wait for all the internal blocks of the block groups of the given file to be reported

public static void wait block groups reported ( distributed file system fs , string src , int num dead d ns ) throws exception { boolean success ; final int attempts = 40 ; int count = 0 ; final erasure coding policy ec policy = fs get erasure coding policy ( new path ( src ) ) ; do { success = true ; count + + ; located blocks lbs = fs get client ( ) get located blocks ( src , 0 ) ; for ( located block lb : lbs get located blocks ( ) ) { short expected = ( short ) ( get real total block num ( ( int ) lb get block size ( ) , ec policy ) - num dead d ns ) ; int reported = lb get locations ( ) length ; if ( reported < expected ) { success = false ; log info ( " block group " + lb get block ( ) + " of file " + src + " has reported internal blocks " + reported + " ( desired " + expected + " ) ; locations " + joiner on ( ' ' ) join ( lb get locations ( ) ) ) ; thread sleep ( 1000 ) ; break ; } } if ( success ) { log info ( " all block groups of file " + src + " verified to have all internal blocks " ) ; } } while ( ! success & & count < attempts ) ; if ( count = = attempts ) { throw new timeout exception ( " timed out waiting for " + src + " to have all the internal blocks " ) ; } }


merges a { @ link download request } into a { @ link default download index }

/ * package * / static void merge request ( download request request , default download index download index , boolean add new download as completed , long now ms ) throws i o exception { @ nullable download download = download index get download ( request id ) ; if ( download ! = null ) { download = download manager merge request ( download , request , download stop reason , now ms ) ; } else { download = new download ( request , add new download as completed ? download state completed : state queued , / * start time ms = * / now ms , / * update time ms = * / now ms , / * content length = * / c length unset , download stop reason none , download failure reason none ) ; } download index put download ( download ) ; }


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


get action cache if present or reload it from the on - disk cache

private action cache get action cache ( ) throws abrupt exit exception { try { return env get persistent action cache ( ) ; } catch ( i o exception e ) { / / todo ( bazel - team ) : ( 2010 ) ideally we should just remove all cache data and reinitialize / / caches logging util log to remote ( level warning , " failed to initialize action cache : " + e get message ( ) , e ) ; string message = string format ( " couldn ' t create action cache : % s if error persists , use ' bazel clean ' " , e get message ( ) ) ; throw new abrupt exit exception ( detailed exit code of ( failure detail new builder ( ) set message ( message ) set action cache ( failure details action cache new builder ( ) set code ( failure details action cache code initialization failure ) ) build ( ) ) , e ) ; } }


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


return a short description of this event , only involving the most important context data

public string get short description ( ) { string builder sb = new string builder ( ) ; sb append ( " session = [ " ) append ( this session id ) append ( " ] ; " ) ; sb append ( " user = [ " ) append ( this user name ) append ( " ] ; " ) ; return sb to string ( ) ; }


test changing name and source on existing symbol in only latest

public void test change symbol name source only in latest ( ) throws exception { / / 01002721 : primary global " xxx " mtf initialize ( " notepad merge listing test " , new program modifier listener ( ) { / * ( non - javadoc ) * @ see ghidra framework data program modifier listener # modify latest ( ghidra program database program d b ) * / @ override public void modify latest ( program d b program ) { int tx id = program start transaction ( " modify my program " ) ; boolean commit = false ; try { symbol symbol = get unique symbol ( program , " xxx " ) ; assert equals ( source type user defined , symbol get source ( ) ) ; symbol set name ( " new name " , source type analysis ) ; commit = true ; } catch ( exception e ) { assert fail ( e get message ( ) ) ; } finally { program end transaction ( tx id , commit ) ; } } / * ( non - javadoc ) * @ see ghidra framework data program modifier listener # modify private ( ghidra program database program d b ) * / @ override public void modify private ( program d b program ) { / / no changes for my program } } ) ; execute merge ( ask user ) ; wait for merge completion ( ) ; symbol s ; s = get unique symbol ( result program , " xxx " ) ; assert null ( s ) ; s = get unique symbol ( result program , " new name " ) ; check symbol ( s , " new name " , true ) ; assert equals ( source type analysis , s get source ( ) ) ; }


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

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


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


returns the action name for purposes of querying the crosstool

private string get action name ( ) { / / we check that this action is not lto - indexing , or when it is , it ' s either for executable / / or transitive or nodeps dynamic library preconditions check argument ( ! is lto indexing | | link type is executable ( ) | | link type is dynamic library ( ) ) ; if ( is lto indexing & & cpp configuration use standalone lto indexing command lines ( ) ) { if ( link type is executable ( ) ) { return cpp action names lto index executable ; } else if ( link type is transitive dynamic library ( ) ) { return cpp action names lto index dynamic library ; } else { return cpp action names lto index nodeps dynamic library ; } } return link type get action name ( ) ; }


registers actions to generate code from proto files this method uses information from proto lang toolchain ( ) rules new rules should use this method instead of the soup of methods above

public static void register actions ( rule context rule context , list < toolchain invocation > toolchain invocations , proto info proto info , label rule label , iterable < artifact > outputs , string flavor name , exports use exports , services allow services ) { spawn action builder actions = create actions ( rule context , toolchain invocations , proto info , rule label , outputs , flavor name , use exports , allow services ) ; if ( actions ! = null ) { rule context register action ( actions build ( rule context ) ) ; } }


public list < input split > get splits ( job context job ) throws i o exception { result set results = null ; statement statement = null ; try { statement = connection create statement ( ) ; results = statement execute query ( get count query ( ) ) ; results next ( ) ; long count = results get long ( 1 ) ; int chunks = job get configuration ( ) get int ( m r job config num maps , 1 ) ; long chunk size = ( count / chunks ) ; results close ( ) ; statement close ( ) ; list < input split > splits = new array list < input split > ( ) ; / / split the rows into n - number of chunks and adjust the last chunk / / accordingly for ( int i = 0 ; i < chunks ; i + + ) { d b input split split ; if ( ( i + 1 ) = = chunks ) split = new d b input split ( i * chunk size , count ) ; else split = new d b input split ( i * chunk size , ( i * chunk size ) + chunk size ) ; splits add ( split ) ; } connection commit ( ) ; return splits ; } catch ( s q l exception e ) { throw new i o exception ( " got s q l exception " , e ) ; } finally { try { if ( results ! = null ) { results close ( ) ; } } catch ( s q l exception e 1 ) { } try { if ( statement ! = null ) { statement close ( ) ; } } catch ( s q l exception e 1 ) { } close connection ( ) ; } }


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 group prop multiple supported attribute same name model view model on visibility changed ( on model visibility changed listener < group prop multiple supported attribute same name model view model , group prop multiple supported attribute same name model view > listener ) { on mutation ( ) ; this on model visibility changed listener epoxy generated model = listener ; return this ; }


test result new cached test result ( path exec root , test runner action action , test result data cached ) throws i o exception ;


create a connected { @ link hive metastore client } to this hive cluster

hive metastore client create metastore client ( ) throws t exception ;


see { @ link mutable configuration # remove cache entry listener configuration }

public void remove cache entry listener configuration ( cache entry listener configuration < k , v > cache entry listener configuration ) { delegate remove cache entry listener configuration ( cache entry listener configuration ) ; }


retrieves and casts the provider from the given target

public static config feature flag provider from target ( transitive info collection target ) { return target get ( starlark constructor ) ; }


public void make sure mocks unused ( ) { mockito verify no interactions ( request marshaller ) ; mockito verify no interactions ( response marshaller ) ; mockito verify no more interactions ( flow handler ) ; mockito verify no more interactions ( couple handler ) ; mockito verify no more interactions ( few handler ) ; }


the objects inserted into the cache using this method are all unique

file system get unique ( uri uri , configuration conf ) throws i o exception { key key = new key ( uri , conf , unique get and increment ( ) ) ; return get internal ( uri , conf , key ) ; }


abort all pending uploads in the list this operation is used by the magic committer as part of its rollback after a failure during task commit

protected void abort pending uploads ( job context context , list < single pending commit > pending , boolean suppress exceptions ) throws i o exception { if ( pending = = null | | pending is empty ( ) ) { log info ( " { } : no pending commits to abort " , get role ( ) ) ; } else { try ( duration info d = new duration info ( log , " aborting % s uploads " , pending size ( ) ) ; commit operations commit context commit context = initiate commit operation ( ) ) { tasks foreach ( pending ) execute with ( build submitter ( context ) ) suppress exceptions ( suppress exceptions ) run ( commit context : : abort single commit ) ; } } }


public object get actual instance ( ) { return instance ; }


find the fields constant that matches field id , or null if its not found

public static fields find by thrift id ( int field id ) { switch ( field id ) { case 0 : / / success return success ; default : return null ; } }


create a new role defined by given role and the limited role

public static limited role create limited role ( role from role , role limited by role ) { objects require non null ( limited by role , " limited by role is required to create limited role " ) ; return new limited role ( from role cluster ( ) , from role indices ( ) , from role application ( ) , from role run as ( ) , limited by role ) ; }


private static string unary rpc ( string request message , simple service grpc simple service blocking stub blocking stub ) { simple request request = simple request new builder ( ) set request message ( request message ) build ( ) ; simple response response = blocking stub unary rpc ( request ) ; return response get response message ( ) ; }


tests that the circuit - breaker reports itself as " closed " if set as forced - closed

public void test circuit breaker reports closed if forced closed ( ) { hystrix command < boolean > cmd = new hystrix command < boolean > ( hystrix command setter with group key ( hystrix command group key factory as key ( " group " ) ) and command properties defaults ( new hystrix command properties setter ( ) with circuit breaker force open ( false ) with circuit breaker force closed ( true ) ) ) { @ override protected boolean run ( ) throws exception { return true ; } @ override protected boolean get fallback ( ) { return false ; } } ; assert true ( cmd execute ( ) ) ; system out println ( " result : " + cmd get execution events ( ) ) ; assert false ( cmd is circuit breaker open ( ) ) ; }


public void remove listener ( metric registry listener listener ) { / / nop }


public static profiled basic info parse form file ( file file ) throws i o exception { try ( file input stream file input stream = new file input stream ( file ) ) { return new yaml ( ) load as ( file input stream , profiled basic info class ) ; } }


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


transform http2 - compliant headers to the raw serialized format which can be deserialized by metadata marshallers it decodes the base 6 4 - encoded binary headers warning : this function may partially modify the headers in place by modifying the input array ( but not modifying any single byte ) , so the input reference { @ code http 2 headers } can not be used again

public static byte [ ] [ ] to raw serialized headers ( byte [ ] [ ] http 2 headers ) { for ( int i = 0 ; i < http 2 headers length ; i + = 2 ) { byte [ ] key = http 2 headers [ i ] ; byte [ ] value = http 2 headers [ i + 1 ] ; if ( ends with ( key , binary header suffix bytes ) ) { / / binary header for ( int idx = 0 ; idx < value length ; idx + + ) { if ( value [ idx ] = = ( byte ) ' , ' ) { return serialize headers with commas in bin ( http 2 headers , i ) ; } } byte [ ] decoded val = base encoding base 6 4 ( ) decode ( new string ( value , us ascii ) ) ; http 2 headers [ i + 1 ] = decoded val ; } else { / / non - binary header / / nothing to do , the value is already in the right place } } return http 2 headers ; }


get all methods in the supplied { @ link class class } and its superclasses which are annotated with the supplied { @ code annotation type } but which are not shadowed by methods overridden in subclasses default methods on interfaces are also detected

private list < method > get annotated methods ( class < ? > clazz , class < ? extends annotation > annotation type ) { method filter method filter = reflection utils user declared methods and ( method - > annotated element utils has annotation ( method , annotation type ) ) ; return arrays as list ( reflection utils get unique declared methods ( clazz , method filter ) ) ; }


initialize the connection with the socket in the server

public void open ( configuration parameters ) throws exception { try { client = new socket ( host ip , port ) ; output stream = client get output stream ( ) ; stream writer = new data output view stream wrapper ( output stream ) ; } catch ( i o exception e ) { throw new i o exception ( " cannot connect to the client to send back the stream " , e ) ; } }


equivalent to calling < code > assert that ( value get ( ) ) is equal to ( value ) < code >

public state value assert < t > value equal to ( t value ) { java 6 assertions assert that ( actual get ( ) ) overriding error message ( " expected state value to equal to < % s > , but was < % s > " , value , actual get ( ) ) is equal to ( value ) ; return this ; }


aggregates the results of visiting multiple children of a node after either all children are visited or { @ link # should visit next child } returns { @ code false } , the aggregate value is returned as the result of { @ link # visit children } the default implementation returns { @ code next result } , meaning { @ link # visit children } will return the result of the last child visited ( or return the initial value if the node has no children )

protected t aggregate result ( t aggregate , t next result ) { return next result ; }


creates a crash caused by the given { @ link throwable } the exit code is generated by { @ link crash failure details # detailed exit code for throwable }

public static crash from ( throwable throwable ) { return new crash ( throwable , crash failure details detailed exit code for throwable ( throwable ) ) ; }


public void assert path not found ( string path ) throws i o exception { try { operations stat ( path ) ; fail ( " path unexpectedly found : " + path ) ; } catch ( path not found exception e ) { } }


returns the number of edges in the graph

public int num edges ( ) { return this edges ( ) size ( ) ; }


helper method for creating a static provider

static input format provider of ( input format < row data , ? > input format ) { return new input format provider ( ) { @ override public input format < row data , ? > create input format ( ) { return input format ; } @ override public boolean is bounded ( ) { return true ; } } ; }


public void data type added ( long data type i d , int type , object old value , object new value ) { if ( record changes ) { ( ( program d b change set ) change set ) data type added ( data type i d ) ; } changed = true ; fire event ( new program change record ( type , null , null , null , old value , new value ) ) ; }


match input parameter values with the parameters declared to be used in the call

public map < string , object > match in parameter values with call parameters ( sql parameter source parameter source ) { / / for parameter source lookups we need to provide case - insensitive lookup support / / since the database meta - data is not necessarily providing case sensitive parameter names map < string , string > case insensitive parameter names = sql parameter source utils extract case insensitive parameter names ( parameter source ) ; map < string , string > call parameter names = collection utils new hash map ( this call parameters size ( ) ) ; map < string , object > matched parameters = collection utils new hash map ( this call parameters size ( ) ) ; for ( sql parameter parameter : this call parameters ) { if ( parameter is input value provided ( ) ) { string parameter name = parameter get name ( ) ; string parameter name to match = obtain meta data provider ( ) parameter name to use ( parameter name ) ; if ( parameter name to match ! = null ) { call parameter names put ( parameter name to match to lower case ( ) , parameter name ) ; } if ( parameter name ! = null ) { if ( parameter source has value ( parameter name ) ) { matched parameters put ( parameter name , sql parameter source utils get typed value ( parameter source , parameter name ) ) ; } else { string lower case name = parameter name to lower case ( ) ; if ( parameter source has value ( lower case name ) ) { matched parameters put ( parameter name , sql parameter source utils get typed value ( parameter source , lower case name ) ) ; } else { string english lower case name = parameter name to lower case ( locale english ) ; if ( parameter source has value ( english lower case name ) ) { matched parameters put ( parameter name , sql parameter source utils get typed value ( parameter source , english lower case name ) ) ; } else { string property name = jdbc utils convert underscore name to property name ( parameter name ) ; if ( parameter source has value ( property name ) ) { matched parameters put ( parameter name , sql parameter source utils get typed value ( parameter source , property name ) ) ; } else { if ( case insensitive parameter names contains key ( lower case name ) ) { string source name = case insensitive parameter names get ( lower case name ) ; matched parameters put ( parameter name , sql parameter source utils get typed value ( parameter source , source name ) ) ; } else if ( logger is info enabled ( ) ) { logger info ( " unable to locate the corresponding parameter value for ' " + parameter name + " ' within the parameter values provided : " + case insensitive parameter names values ( ) ) ; } } } } } } } } if ( logger is debug enabled ( ) ) { logger debug ( " matching " + case insensitive parameter names values ( ) + " with " + call parameter names values ( ) ) ; logger debug ( " found match for " + matched parameters key set ( ) ) ; } return matched parameters ; }


reads the next byte as an unsigned value

public int read unsigned byte ( ) { return ( data [ position + + ] & 0x f f ) ; }


public string name ( ) { return name ; }


if decset 2004 is set , prefix paste with " \ 033 [ 200 ~ " and suffix with " \ 033 [ 201 ~ "

public void paste ( string text ) { / / first : always remove escape key and c1 control characters [ 0x 8 0 , 0x 9 f ] : text = text replace all ( " ( \ u 0 0 1 b | [ \ u 0 0 8 0 - \ u 0 0 9 f ] ) " , " " ) ; / / second : replace all newlines ( \ n ) or crlf ( \ r \ n ) with carriage returns ( \ r ) text = text replace all ( " \ r ? \ n " , " \ r " ) ; / / then : implement bracketed paste mode if enabled : boolean bracketed = is decset internal bit set ( decset bit bracketed paste mode ) ; if ( bracketed ) m session write ( " \ 033 [ 200 ~ " ) ; m session write ( text ) ; if ( bracketed ) m session write ( " \ 033 [ 201 ~ " ) ; }


converts the given value to bytes see { @ link # put int ( byte [ ] , int ) }

default void get bytes ( int value , byte [ ] b , int offset ) { put int ( b , offset , value ) ; }


developer tester is able to choose whether the application should use mongo d b as its underlying data storage or a simple java data structure to ( temporarily ) store the dataobjects during runtime

public static void init db ( boolean use mongo db ) { if ( use mongo db ) { try { db manager connect ( ) ; } catch ( parse exception e ) { e print stack trace ( ) ; } } else { db manager create virtual db ( ) ; } }


returns the currently selected row objects or an empty list if there is no selection

public list < row object > get selected items ( ) { int [ ] rows = table get selected rows ( ) ; if ( rows length = = 0 ) { return collections empty list ( ) ; } list < row object > list = new array list < > ( rows length ) ; for ( int row : rows ) { list add ( text filter model get row object ( row ) ) ; } return list ; }


visit a provider instance binding the provider ' s { @ code get } method is invoked to resolve injections this target is found in both module and injector bindings

v visit ( provider instance binding < ? extends t > binding ) ;


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


check that this query is generally not cacheable

public void test cacheability ( ) throws i o exception { script query builder query builder = create test query builder ( ) ; query shard context context = create shard context ( ) ; query builder rewrite query = rewrite query ( query builder , new query shard context ( context ) ) ; assert not null ( rewrite query to query ( context ) ) ; assert false ( " query should not be cacheable : " + query builder to string ( ) , context is cacheable ( ) ) ; }


updates the flow control window for this stream if it is appropriate

boolean write window update if needed ( ) throws http 2 exception ;


increases the result vector component at the specified position by the specified delta

private void update result vector ( int position , int delta ) { / / inflate the vector to contain the given position while ( this result vector size ( ) < = position ) { this result vector add ( 0 ) ; } / / increment the component value final int component = this result vector get ( position ) ; this result vector set ( position , component + delta ) ; }


returns the { @ link channel group } which is associated with this future


outputs the final result to the wrapped collector

public void output result ( t result ) { this collector collect ( result ) ; }


same to { @ link # request ( message , request callback , long ) } with target message selector specified

public void request ( final message msg , final message queue selector selector , final object arg , final request callback request callback , final long timeout ) throws m q client exception , remoting exception , interrupted exception , m q broker exception { msg set topic ( with namespace ( msg get topic ( ) ) ) ; this default m q producer impl request ( msg , selector , arg , request callback , timeout ) ; }


creates a successful result , with optional metadata

public static authentication result success ( user user , @ nullable map < string , object > metadata ) { return new authentication result ( status success , user , null , null , metadata ) ; }


returns the sum of { @ code a } and { @ code b } unless it would overflow or underflow in which case { @ code long max value } or { @ code long min value } is returned , respectively

public static long saturated add ( long a , long b ) { long naive sum = a + b ; if ( ( a ^ b ) < 0 | ( a ^ naive sum ) > = 0 ) { / / if a and b have different signs or a has the same sign as the result then there was no / / overflow , return return naive sum ; } / / we did over / under flow , if the sign is negative we should return max otherwise min return long max value + ( ( naive sum > > > ( long size - 1 ) ) ^ 1 ) ; }


constructs a { @ link get privileges request } to request all the privileges defined for the specified { @ code application name }

public static get privileges request get application privileges ( string application name ) { if ( strings is null or empty ( application name ) ) { throw new illegal argument exception ( " application name is required " ) ; } return new get privileges request ( application name ) ; }


the { @ link task id } of the async execution in the task manager

public task id get task id ( ) { return task id ; }


helper to create a project from a csv encoded as a file not much control is given on the import options , because this method is intended to be a quick way to create a project for a test for more control over the import , just call the importer directly the projects created via this method and their importing jobs will be disposed of at the end of each test

protected project create c s v project ( string project name , string input ) { project project = new project ( ) ; project metadata metadata = new project metadata ( ) ; metadata set name ( project name ) ; object node options = mock ( object node class ) ; prepare import options ( options , " , " , - 1 , 0 , 0 , 1 , false , false ) ; importing job job = importing manager create job ( ) ; separator based importer importer = new separator based importer ( ) ; list < exception > exceptions = new array list < exception > ( ) ; importer parse one file ( project , metadata , job , " filesource " , new string reader ( input ) , - 1 , options , exceptions ) ; project update ( ) ; project manager singleton register project ( project , metadata ) ; projects add ( project ) ; importing jobs add ( job ) ; return project ; }


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

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


the buffer size that will be retained in the free list after use

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


unsets the referenced value subsequent calls to { @ link # get } will return { @ code null }


generate the cumulative distribution in [ 0 , 1 ] where each value will have the same frequency and interval size

public void generate uniform ( ) { float freq = 1f / values size ; for ( int i = 0 ; i < values size ; + + i ) { / / reset the interval to the normalized frequency values items [ i ] interval = freq ; values items [ i ] frequency = ( i + 1 ) * freq ; } }


gets the { @ link fetch source context } which defines how the source should be fetched

public fetch source context fetch source ( ) { return fetch source context ; }


returns the { @ code long } value whose byte representation is the given 8 bytes , in big - endian order ; equivalent to { @ code longs from byte array ( new byte [ ] { b 1 , b 2 , b 3 , b 4 , b 5 , b 6 , b 7 , b 8 } ) }

public static long from bytes ( byte b 1 , byte b 2 , byte b 3 , byte b 4 , byte b 5 , byte b 6 , byte b 7 , byte b 8 ) { return ( b 1 & 0x f f l ) < < 56 | ( b 2 & 0x f f l ) < < 48 | ( b 3 & 0x f f l ) < < 40 | ( b 4 & 0x f f l ) < < 32 | ( b 5 & 0x f f l ) < < 24 | ( b 6 & 0x f f l ) < < 16 | ( b 7 & 0x f f l ) < < 8 | ( b 8 & 0x f f l ) ; }


reads all bytes from a url into a byte array

public static byte [ ] to byte array ( url url ) throws i o exception { return as byte source ( url ) read ( ) ; }


return a single bean of the given type or subtypes , also picking up beans defined in ancestor bean factories if the current bean factory is a hierarchical bean factory useful convenience method when we expect a single bean and don ' t care about the bean name does consider objects created by factory beans if the " allow eager init " flag is set , which means that factory beans will get initialized if the object created by the factory bean doesn ' t match , the raw factory bean itself will be matched against the type if " allow eager init " is not set , only raw factory beans will be checked ( which doesn ' t require initialization of each factory bean ) < b > note : beans of the same name will take precedence at the ' lowest ' factory level , i e such beans will be returned from the lowest factory that they are being found in , hiding corresponding beans in ancestor factories < b > this feature allows for ' replacing ' beans by explicitly choosing the same bean name in a child factory ; the bean in the ancestor factory won ' t be visible then , not even for by - type lookups

public static < t > t bean of type including ancestors ( listable bean factory lbf , class < t > type , boolean include non singletons , boolean allow eager init ) throws beans exception { map < string , t > beans of type = beans of type including ancestors ( lbf , type , include non singletons , allow eager init ) ; return unique bean ( type , beans of type ) ; }


return the quota path associated with this prefix

public static string quota path ( string path ) { return quota zookeeper + path + " / " + limit node ; }


returns the number of sequences in the projected database

public int get support ( ) { return support ; }


returns the index of the last appearance of the value { @ code target } in { @ code array }

public static int last index of ( char [ ] array , char target ) { return last index of ( array , target , 0 , array length ) ; }


returns a fixed - size list backed by the specified array , similar to { @ link arrays # as list ( object [ ] ) } the list supports { @ link list # set ( int , object ) } , but any attempt to set a value to { @ code null } will result in a { @ link null pointer exception } the returned list maintains the values , but not the identities , of { @ code integer } objects written to or read from it for example , whether { @ code list get ( 0 ) = = list get ( 0 ) } is true for the returned list is unspecified < b > note : < b > when possible , you should represent your data as an { @ link immutable int array } instead , which has an { @ link immutable int array # as list as list } view

public static list < integer > as list ( int backing array ) { if ( backing array length = = 0 ) { return collections empty list ( ) ; } return new int array as list ( backing array ) ; }


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

public void delete user test ( test context context ) { async async = context async ( ) ; string username = null ; api delete user ( username , result - > { / / todo : test validations async complete ( ) ; } ) ; }


ensures this big array is at least the specified length if the array is smaller , segments are added until the array is larger then the specified length

public void ensure capacity ( long length ) { if ( capacity > length ) { return ; } grow ( length ) ; }


reads the given file , translating { @ link i o exception } to a { @ link runtime exception } of some sort

public static byte [ ] read file ( file file ) throws i o exception { if ( ! file exists ( ) ) { throw new runtime exception ( file + " : file not found " ) ; } if ( ! file is file ( ) ) { throw new runtime exception ( file + " : not a file " ) ; } if ( ! file can read ( ) ) { throw new runtime exception ( file + " : file not readable " ) ; } long long length = file length ( ) ; int length = ( int ) long length ; if ( length ! = long length ) { throw new runtime exception ( file + " : file too long " ) ; } byte array output stream baos = new byte array output stream ( length ) ; input stream in = null ; try { in = new buffered input stream ( new file input stream ( file ) ) ; byte [ ] buffer = new byte [ 8192 ] ; int bytes read = 0 ; while ( ( bytes read = in read ( buffer ) ) > 0 ) { baos write ( buffer , 0 , bytes read ) ; } } finally { if ( in ! = null ) { try { in close ( ) ; } catch ( exception e ) { / / ignored } } } return baos to byte array ( ) ; }


public boolean is compatible ( dalv insn insn ) { register spec list regs = insn get registers ( ) ; if ( ! ( ( insn instanceof cst insn ) & & ( regs size ( ) = = 1 ) & & unsigned fits in nibble ( regs get ( 0 ) get reg ( ) ) ) ) { return false ; } cst insn ci = ( cst insn ) insn ; constant cst = ci get constant ( ) ; if ( ! ( cst instanceof cst literal bits ) ) { return false ; } cst literal bits cb = ( cst literal bits ) cst ; return cb fits in int ( ) & & signed fits in nibble ( cb get int bits ( ) ) ; }


private boolean update memory reservation ( ) { / / operator / driver will be blocked on memory after we call local user memory context set bytes ( ) / / if memory is not available , once we return , this operator will be blocked until memory is available long memory size in bytes = group by hash map ( group by hash : : get estimated size ) or else ( 0l ) + partition row count size of ( ) ; local user memory context set bytes ( memory size in bytes ) ; / / if memory is not available , inform the caller that we cannot proceed for allocation return operator context is waiting for memory ( ) is done ( ) ; }


sets this manager ' s begin range to be the start range of the given manager this method will return the range that exists before the begin range is adjusted

public address range sever my head range ( address range manager manager ) { if ( range get max address ( ) compare to ( manager range get min address ( ) ) < 0 ) { return get next range ( ) ; } address range severed range = new address range impl ( range get min address ( ) , manager range get min address ( ) previous ( ) ) ; range = new address range impl ( manager range get min address ( ) , range get max address ( ) ) ; return severed range ; }


append a property with its attributes to a given { # link document } if the property is found in configuration

private synchronized void append x m l property ( document doc , element conf , string property name ) { / / skip writing if given property name is empty or null if ( ! strings is null or empty ( property name ) ) { string value = properties get property ( property name ) ; if ( value ! = null ) { element prop node = doc create element ( " property " ) ; conf append child ( prop node ) ; element name node = doc create element ( " name " ) ; name node append child ( doc create text node ( property name ) ) ; prop node append child ( name node ) ; element value node = doc create element ( " value " ) ; value node append child ( doc create text node ( properties get property ( property name ) ) ) ; prop node append child ( value node ) ; element final node = doc create element ( " final " ) ; final node append child ( doc create text node ( string value of ( final parameters contains ( property name ) ) ) ) ; prop node append child ( final node ) ; if ( updating resource ! = null ) { string [ ] sources = updating resource get ( property name ) ; if ( sources ! = null ) { for ( string s : sources ) { element source node = doc create element ( " source " ) ; source node append child ( doc create text node ( s ) ) ; prop node append child ( source node ) ; } } } } } }


sometimes a client has identified precisely which snapshot is to be restored via a separate mechanism and wishes to guarantee that this is the snapshot that this request restores if the client can only identify a snapshot by its name then there is a risk that the desired snapshot may be deleted and replaced by a new snapshot with the same name which is inconsistent with the original one this method lets us fail the restore if the precise snapshot we want is not available this is for internal use only and is not exposed in the rest layer

public restore snapshot request snapshot uuid ( string snapshot uuid ) { this snapshot uuid = snapshot uuid ; return this ; }


writes chars from the given char array , starting from the specified offset , to the current position and increases the position by the number of chars written

public char buffer put ( char [ ] src , int off , int len ) { int length = src length ; if ( ( off < 0 ) | | ( len < 0 ) | | ( long ) off + ( long ) len > length ) { throw new index out of bounds exception ( ) ; } if ( len > remaining ( ) ) { throw new buffer overflow exception ( ) ; } for ( int i = off ; i < off + len ; i + + ) { put ( src [ i ] ) ; } return this ; }


supports the input stream for serialization ?

default boolean supports ( final file file ) { return true ; }


make sure we tolerate when delegate get extra map ( ) returns ' null '

public void get extra map tolerates delegate null map ( ) { priority network fetcher < fetch state > fetcher = new priority network fetcher < > ( delegate , false , 2 , 1 , true , false ) ; priority fetch state < fetch state > one = fetch ( fetcher , " 1 " , callback , true ) ; / / explicitly return a null when ( delegate get extra map ( eq ( one delegated state ) , any int ( ) ) ) then return ( null ) ; fetcher get extra map ( one , 123 ) ; / / implicitly assert we don ' t crash }


required : a list of server specifications < code > repeated istio networking v 1alpha 3 server servers = 1 ; < code >

public com alibaba nacos istio model server or builder get servers or builder ( int index ) { if ( servers builder = = null ) { return servers get ( index ) ; } else { return servers builder get message or builder ( index ) ; } }


public void set title ( string title ) { this title = title ; if ( is in tool ( ) ) { docking tool update title ( this ) ; } }


for testing purposes , set the file system to use here instead of relying on getting it from the file system class based on the uri

public void set mock file system for testing ( file system file system ) { this mock file system for testing = file system ; }


returns an instance which creates asynchronous observables

public static rx java 2 call adapter factory create async ( ) { return new rx java 2 call adapter factory ( null , true ) ; }


returns the ' float ' value at the specified address in memory

public final float get float ( address address ) throws memory access exception { int bits = current program get memory ( ) get int ( address ) ; return float int bits to float ( bits ) ; }


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


graph exploration can be set to timeout after the given period search operations involved in each hop are limited to the remaining time available but can still overrun due to the nature of their " best efforts " timeout support when a timeout occurs partial results are returned

public graph explore request timeout ( time value timeout ) { if ( timeout = = null ) { throw new illegal argument exception ( " timeout must not be null " ) ; } this timeout = timeout ; return this ; }


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


test whether this callback method is called with correct args

protected map < string , object > query properties ( map < string , object > model ) { assert that ( this expected model equals ( model ) ) as ( " map and model must be equal " ) is true ( ) ; this query properties called = true ; return super query properties ( model ) ; }


reads a bit of the mapping matrix accounting for boundary wrapping

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


returns the amount of buffered data available for reading

private int available ( final context context ) { / / package protected for access from i / o streams return context buffer ! = null ? context pos - context read pos : 0 ; }


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

public boolean is set execute ms avg ( ) { return this execute ms avg ! = null ; }


creates a bitmap of the specified width and height the bitmap will be created with the default argb 8888 configuration

public closeable reference < bitmap > create bitmap ( int width , int height ) { return create bitmap ( width , height , bitmap config argb 8888 ) ; }


updates the gui when the user has made a new selection

protected void revalidate ( ) { remove work panel ( ) ; add work panel ( create work panel ( ) ) ; generate yara ( ) ; }


repositions this stream to the position at the time the { @ code mark } method was last called on this chaining input stream , or at the beginning if the { @ code mark } method was never called subsequent read calls will return the same bytes in the same order since the point of the { @ code mark } call naturally , { @ code mark } can be invoked at any moment , even after a { @ code reset } the previously stored reference to the current component during the { @ code mark } invocation is made the new current component and then the { @ code reset } call is forwarded to it the next internal call to { @ link # next component ( input stream ) } will use this component , so the { @ link # next component ( input stream ) } must not assume monotonous arguments

public void reset ( ) throws i o exception { ensure open ( ) ; if ( false = = mark supported ( ) ) { throw new i o exception ( " mark / reset not supported " ) ; } if ( current in ! = null & & current in ! = exhausted marker & & current in ! = mark in ) { try { current in close ( ) ; } catch ( i o exception e ) { / / an i o exception on a component input stream close is not important logger info ( " i o exception while closing the current component input stream during a reset " , e ) ; } } current in = mark in ; if ( current in ! = null & & current in ! = exhausted marker ) { current in reset ( ) ; } }


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

public java util list < com alibaba nacos istio model port > get ports list ( ) { if ( ports builder = = null ) { return java util collections unmodifiable list ( ports ) ; } else { return ports builder get message list ( ) ; } }


sets the minimum and preferred resources for the iteration this overrides the default resources the lower and upper resource limits will be considered in dynamic resource resize feature for future plan

private delta iteration < st , wt > set resources ( resource spec min resources , resource spec preferred resources ) { operator validation utils validate min and preferred resources ( min resources , preferred resources ) ; this min resources = min resources ; this preferred resources = preferred resources ; return this ; }


sets { @ link annotation # timestamp ( ) }

public long timestamp ( ) { return timestamp ; }


check if the request is a same - origin one , based on { @ code origin } , and { @ code host } headers note : as of 5 1 this method ignores { @ code " forwarded " } and { @ code " x - forwarded - " } headers that specify the client - originated address consider using the { @ code forwarded header filter } to extract and use , or to discard such headers

public static boolean is same origin ( server http request request ) { string origin = request get headers ( ) get origin ( ) ; if ( origin = = null ) { return true ; } uri uri = request get u r i ( ) ; string actual scheme = uri get scheme ( ) ; string actual host = uri get host ( ) ; int actual port = get port ( uri get scheme ( ) , uri get port ( ) ) ; assert not null ( actual scheme , " actual request scheme must not be null " ) ; assert not null ( actual host , " actual request host must not be null " ) ; assert is true ( actual port ! = - 1 , " actual request port must not be undefined " ) ; uri components origin url = uri components builder from origin header ( origin ) build ( ) ; return ( actual scheme equals ( origin url get scheme ( ) ) & & actual host equals ( origin url get host ( ) ) & & actual port = = get port ( origin url get scheme ( ) , origin url get port ( ) ) ) ; }


returns all the keys in the state in a { @ link collections # unmodifiable set ( set ) }

public iterable < k > keys ( ) { return collections unmodifiable set ( state key set ( ) ) ; }


return the intent of shutdown requires root permission or hold { @ code android : shared user id = " android uid system " } , { @ code < uses - permission android : name = " android permission shutdown " > } in manifest

public static intent get shutdown intent ( ) { intent intent ; if ( build version sdk int > = build version codes o ) { intent = new intent ( intent action shutdown ) ; } else { intent = new intent ( " com android internal intent action request shutdown " ) ; } intent put extra ( " android intent extra key confirm " , false ) ; return intent add flags ( intent flag activity new task ) ; }


test what happens with the following sequence : thread a writes edit thread b calls log sync all calls close ( ) on stream thread a calls log sync this sequence is legal and can occur if enter safe mode ( ) is closely followed by save namespace

public void test batched sync with closed logs ( ) throws exception { / / start a cluster configuration conf = get conf ( ) ; mini d f s cluster cluster = null ; file system file sys = null ; executor service thread a = executors new single thread executor ( ) ; executor service thread b = executors new single thread executor ( ) ; try { cluster = new mini d f s cluster builder ( conf ) num data nodes ( num data nodes ) build ( ) ; cluster wait active ( ) ; file sys = cluster get file system ( ) ; final f s namesystem namesystem = cluster get namesystem ( ) ; f s image fsimage = namesystem get f s image ( ) ; final f s edit log edit log = fsimage get edit log ( ) ; / / log an edit from thread a do log edit ( thread a , edit log , " thread - a 1 " ) ; / / async log is doing batched syncs in background log sync just ensures / / the edit is durable , so the txid may increase prior to sync if ( ! use async edit log ) { assert equals ( " logging edit without syncing should do not affect txid " , 1 , edit log get sync tx id ( ) ) ; } / / log sync all in thread b do call log sync all ( thread b , edit log ) ; assert equals ( " log sync all should sync thread a ' s transaction " , 2 , edit log get sync tx id ( ) ) ; / / close edit log edit log close ( ) ; / / ask thread a to finish sync ( which should be a no - op ) do call log sync ( thread a , edit log ) ; } finally { thread a shutdown ( ) ; thread b shutdown ( ) ; if ( file sys ! = null ) file sys close ( ) ; if ( cluster ! = null ) cluster shutdown ( ) ; } }


get pet { pet id } : find pet by id returns a single pet

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


public void find global session test ( global session global session ) throws exception { for ( session manager session manager : session manager list ) { session manager add global session ( global session ) ; global session expected = session manager find global session ( global session get xid ( ) ) ; assertions assert not null ( expected ) ; assertions assert equals ( expected get transaction id ( ) , global session get transaction id ( ) ) ; assertions assert equals ( expected get application id ( ) , global session get application id ( ) ) ; assertions assert equals ( expected get transaction service group ( ) , global session get transaction service group ( ) ) ; assertions assert equals ( expected get transaction name ( ) , global session get transaction name ( ) ) ; assertions assert equals ( expected get transaction id ( ) , global session get transaction id ( ) ) ; assertions assert equals ( expected get status ( ) , global session get status ( ) ) ; session manager remove global session ( global session ) ; } }


fallback if none of the other { @ code decorrelate rel } methods match

public frame decorrelate rel ( rel node rel ) { rel node new rel = rel copy ( rel get trait set ( ) , rel get inputs ( ) ) ; if ( rel get inputs ( ) size ( ) > 0 ) { list < rel node > old inputs = rel get inputs ( ) ; list < rel node > new inputs = new array list < > ( ) ; for ( int i = 0 ; i < old inputs size ( ) ; + + i ) { final frame frame = get invoke ( old inputs get ( i ) , rel ) ; if ( frame = = null | | ! frame cor def outputs is empty ( ) ) { / / if input is not rewritten , or if it produces correlated / / variables , terminate rewrite return null ; } new inputs add ( frame r ) ; new rel replace input ( i , frame r ) ; } if ( ! util equal shallow ( old inputs , new inputs ) ) { new rel = rel copy ( rel get trait set ( ) , new inputs ) ; } } / / the output position should not change since there are no cor vars / / coming from below return register ( rel , new rel , identity map ( rel get row type ( ) get field count ( ) ) , immutable sorted map of ( ) ) ; }


called by the drag gesture adapter and the drag source adapter to know what actions this component allows

public int get drag action ( ) { return dn d constants action copy or move ; }


public void remove ( listener listener ) { listeners remove ( listener ) ; }


return the resource loader that this pattern resolver works with

public resource loader get resource loader ( ) { return this resource loader ; }


returns the host this response was received from , or null if it was not set

public string get target host ( ) { return ( string ) get attribute ( http target host ) ; }


returns the number of occurrences of obj in coll

public static < e > int cardinality ( e obj , final collection < e > coll ) { if ( coll = = null ) return 0 ; if ( coll instanceof set ) { return ( coll contains ( obj ) ? 1 : 0 ) ; } int count = 0 ; if ( obj = = null ) { for ( e e : coll ) { if ( e = = null ) { count + + ; } } } else { for ( e e : coll ) { if ( obj equals ( e ) ) { count + + ; } } } return count ; }


returns true if the current user has the given permission

public static boolean has permission ( permission permission ) throws i o exception , servlet exception { return has permission ( jenkins get ( ) , permission ) ; }


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

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


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


handle the { @ link throwable } by logging and closing the { @ link channel } sub - classes may override this

public void exception caught ( channel handler context ctx , throwable cause ) throws exception { if ( logger is warn enabled ( ) ) { logger warn ( " failed to initialize a channel closing : " + ctx channel ( ) , cause ) ; } ctx close ( ) ; }


invoked once immediately after construction

public void prepare ( map storm conf , configuration login conf ) { this login conf = login conf ; }


the set of values defined for this entry , each corresponding to a different configurationvariant < code > repeated aapt pb config value config value = 4 ; < code >

public java util list < com android aapt resources config value > get config value list ( ) { return config value ; }


returns the number of keyvalue pairs in the object

public int size ( ) { return members size ( ) ; }


sets the content of the output buffer , consisting of a { @ link subtitle } and associated metadata

public void set content ( long time us , subtitle subtitle , long subsample offset us ) { this time us = time us ; this subtitle = subtitle ; this subsample offset us = subsample offset us = = format offset sample relative ? this time us : subsample offset us ; }