formats the specified collection path parameter to a string value

public string collection path parameter to string ( string collection format , collection value ) { / / create the value based on the collection format if ( " multi " equals ( collection format ) ) { / / not valid for path params return parameter to string ( value ) ; } / / collection format is assumed to be " csv " by default string delimiter = " , " ; if ( " ssv " equals ( collection format ) ) { delimiter = " " ; } else if ( " tsv " equals ( collection format ) ) { delimiter = " \ t " ; } else if ( " pipes " equals ( collection format ) ) { delimiter = " | " ; } string builder sb = new string builder ( ) ; for ( object item : value ) { sb append ( delimiter ) ; sb append ( parameter to string ( item ) ) ; } return sb substring ( delimiter length ( ) ) ; }


protected void create state display passwordless ( final flow flow ) { val view state display = create view state ( flow , state id passwordless display , " cas passwordless display view " ) ; view state display get entry action list ( ) add ( create evaluate action ( " display before passwordless authentication action " ) ) ; create transition for state ( view state display , cas webflow constants transition id submit , state id accept passwordless authentication ) ; }


tests that when there is a node to allocate the shard to , it will be allocated to it

public void test found allocation and allocating ( ) { final routing allocation allocation = routing allocation with one primary no replicas ( yes allocation deciders ( ) , random from ( cluster recovered , index reopened ) , " alloc id 1 " ) ; test allocator add data ( node 1 , " alloc id 1 " , random boolean ( ) ) ; allocate all unassigned ( allocation ) ; assert that ( allocation routing nodes changed ( ) , equal to ( true ) ) ; assert that ( allocation routing nodes ( ) unassigned ( ) ignored ( ) is empty ( ) , equal to ( true ) ) ; assert that ( allocation routing nodes ( ) shards with state ( shard routing state initializing ) size ( ) , equal to ( 1 ) ) ; assert that ( allocation routing nodes ( ) shards with state ( shard routing state initializing ) get ( 0 ) current node id ( ) , equal to ( node 1 get id ( ) ) ) ; / / check that allocation id is reused assert that ( allocation routing nodes ( ) shards with state ( shard routing state initializing ) get ( 0 ) allocation id ( ) get id ( ) , equal to ( " alloc id 1 " ) ) ; assert cluster health status ( allocation , cluster health status yellow ) ; }


public void test inline object ( ) { / / todo : test inline object }


specifying a custom username and password doesn ' t make sense with a single connection returns the single connection if given the same username and password ; throws an s q l exception else

public connection get connection ( string username , string password ) throws s q l exception { if ( object utils null safe equals ( username , get username ( ) ) & & object utils null safe equals ( password , get password ( ) ) ) { return get connection ( ) ; } else { throw new s q l exception ( " single connection data source does not support custom username and password " ) ; } }


copied the content of this string to a character array

public void copy ( int src idx , char [ ] dst , int dst idx , int length ) { object util check not null ( dst , " dst " ) ; if ( is out of bounds ( src idx , length , length ( ) ) ) { throw new index out of bounds exception ( " expected : " + " 0 < = src idx ( " + src idx + " ) < = src idx + length ( " + length + " ) < = src len ( " + length ( ) + ' ) ' ) ; } final int dst end = dst idx + length ; for ( int i = dst idx , j = src idx + array offset ( ) ; i < dst end ; i + + , j + + ) { dst [ i ] = b 2c ( value [ j ] ) ; } }


returns the object that originated this event ( not the object that originated the wrapped event ) this is generally an { @ link event bus }

public object get source ( ) { return source ; }


check the blocks of dst file are cleaned after rename with overwrite restart nn to check the rename successfully

public void test rename with overwrite ( ) throws exception { final short repl factor = 2 ; final long block size = 512 ; configuration conf = new configuration ( ) ; mini d f s cluster cluster = new mini d f s cluster builder ( conf ) num data nodes ( repl factor ) build ( ) ; distributed file system dfs = cluster get file system ( ) ; try { long file len = block size * 3 ; string src = " / foo / src " ; string dst = " / foo / dst " ; path src path = new path ( src ) ; path dst path = new path ( dst ) ; d f s test util create file ( dfs , src path , file len , repl factor , 1 ) ; d f s test util create file ( dfs , dst path , file len , repl factor , 1 ) ; located blocks lbs = name node adapter get block locations ( cluster get name node ( ) , dst , 0 , file len ) ; block manager bm = name node adapter get namesystem ( cluster get name node ( ) ) get block manager ( ) ; assert true ( bm get stored block ( lbs get located blocks ( ) get ( 0 ) get block ( ) get local block ( ) ) ! = null ) ; dfs rename ( src path , dst path , rename overwrite ) ; assert true ( bm get stored block ( lbs get located blocks ( ) get ( 0 ) get block ( ) get local block ( ) ) = = null ) ; / / restart nn and check the rename successfully cluster restart name nodes ( ) ; assert false ( dfs exists ( src path ) ) ; assert true ( dfs exists ( dst path ) ) ; } finally { if ( dfs ! = null ) { dfs close ( ) ; } if ( cluster ! = null ) { cluster shutdown ( ) ; } } }


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


public void photo urls test ( ) { / / todo : test photo urls }


load patch occur unknown exception that we have wrap try catch for you ! you may need to report this exception and contact me welcome to report a new issues for us ! you can disable patch as { @ link default load reporter # on load exception ( throwable , int ) }

void on load exception ( throwable e , int error code ) ;


check if the given aggregate has been executed and has computed values or not ( the bucket is null )

private static boolean contains values ( internal aggregation agg ) { / / stats & extended stats if ( agg instanceof internal stats ) { return has value ( ( internal stats ) agg ) ; } if ( agg instanceof internal matrix stats ) { return has value ( ( internal matrix stats ) agg ) ; } if ( agg instanceof internal max ) { return has value ( ( internal max ) agg ) ; } if ( agg instanceof internal min ) { return has value ( ( internal min ) agg ) ; } if ( agg instanceof internal avg ) { return has value ( ( internal avg ) agg ) ; } if ( agg instanceof internal sum ) { return has value ( ( internal sum ) agg ) ; } if ( agg instanceof internal t digest percentile ranks ) { return has value ( ( internal t digest percentile ranks ) agg ) ; } if ( agg instanceof internal t digest percentiles ) { return has value ( ( internal t digest percentiles ) agg ) ; } return true ; }


takes some amount of range resources ( e g ports )

public list < protos resource > take ranges ( string resource name , int amount , set < string > roles ) { if ( log is debug enabled ( ) ) { log debug ( " allocating { } { } " , amount , resource name ) ; } list < protos resource > result = new array list < > ( 1 ) ; for ( list iterator < protos resource > i = resources list iterator ( ) ; i has next ( ) ; ) { if ( amount < = 0 ) { break ; } / / take from next available range resource that is unreserved or reserved for an / / applicable role protos resource available = i next ( ) ; if ( ! resource name equals ( available get name ( ) ) | | ! available has ranges ( ) ) { continue ; } if ( ! unreserved role equals ( available get role ( ) ) & & ! roles contains ( available get role ( ) ) ) { continue ; } list < protos value range > taken ranges = new array list < > ( ) ; list < protos value range > remaining ranges = new array list < > ( available get ranges ( ) get range list ( ) ) ; for ( list iterator < protos value range > j = remaining ranges list iterator ( ) ; j has next ( ) ; ) { if ( amount < = 0 ) { break ; } / / take from next available range ( note : ranges are inclusive ) protos value range available range = j next ( ) ; long amount to take = math min ( available range get end ( ) - available range get begin ( ) + 1 , amount ) ; protos value range taken range = available range to builder ( ) set end ( available range get begin ( ) + amount to take - 1 ) build ( ) ; amount - = amount to take ; taken ranges add ( taken range ) ; / / keep remaining range ( if any ) long remaining = available range get end ( ) - taken range get end ( ) ; if ( remaining > 0 ) { j set ( available range to builder ( ) set begin ( taken range get end ( ) + 1 ) build ( ) ) ; } else { j remove ( ) ; } } protos resource taken = available to builder ( ) set ranges ( protos value ranges new builder ( ) add all range ( taken ranges ) ) build ( ) ; if ( log is debug enabled ( ) ) { log debug ( " taking { } from { } " , utils to string ( taken get ranges ( ) ) , utils to string ( available ) ) ; } result add ( taken ) ; / / keep remaining ranges ( if any ) if ( remaining ranges size ( ) > 0 ) { i set ( available to builder ( ) set ranges ( protos value ranges new builder ( ) add all range ( remaining ranges ) ) build ( ) ) ; } else { i remove ( ) ; } } if ( log is debug enabled ( ) ) { log debug ( " allocated : { } , unsatisfied : { } " , utils to string ( result ) , amount ) ; } return result ; }


public static drawable get drawable ( @ non null final string key , final drawable default value ) { return get drawable ( key , default value , get default cache disk utils ( ) ) ; }


public int pop ( ) { return items [ - - size ] ; }


method for testing rolling upgrade do not call this method from production

static void set current layout version for testing ( int lv ) { current layout version = lv ; }


remove entries for dispatchers that are no longer present in the tree

public synchronized void clear unused event handlers ( ) { final iterator iterator = m event handlers key set ( ) iterator ( ) ; while ( iterator has next ( ) ) { final event handlers wrapper event handlers wrapper = m event handlers get ( iterator next ( ) ) ; if ( event handlers wrapper = = null | | ! event handlers wrapper m used in current tree ) { iterator remove ( ) ; } else { event handlers wrapper m used in current tree = false ; } } }


public void clear ( ) { free objects clear ( ) ; }


returns list of all players which are banned

public seq < player info > get banned ( ) { seq < player info > result = new seq < > ( ) ; for ( player info info : player info values ( ) ) { if ( info banned ) { result add ( info ) ; } } return result ; }


creates a new dummy edge to be used in the graph

private edge new dummy edge ( node source node , node target node ) { / / boolean added edge ; dummy edge part edge part = new dummy edge part ( ) ; edge edge = new edge ( edge part , source node , target node ) ; edge weight = 2 ; / / add the new edge to the edge list edge list add ( edge ) ; / / target node = source node ; / / added edge = true ; return edge ; }


sets the setting with the provided setting key and the boolean value

public builder put ( string setting , boolean value ) { put ( setting , string value of ( value ) ) ; return this ; }


perform the group assignment given the member subscriptions and current cluster metadata

group assignment assign ( cluster metadata , group subscription group subscription ) ;


calls ' git init ' and ' git config ' for specifying test user and email

void init ( ) throws exception { run git ( " init " ) ; run git ( " config " , " user email " , " me @ example com " ) ; run git ( " config " , " user name " , " e x ample " ) ; }


extra the { @ link context carrier # get extension context ( ) } into this context

void extract ( context carrier carrier ) { this skip analysis = carrier get extension context ( ) skip analysis ; }


gets if the source of the { @ link search source builder } initially used on this request

public search source builder get search source ( ) { return this search request source ( ) ; }


milliseconds to the formatted time string

public static string millis 2 string ( long millis , @ non null final string pattern ) { return millis 2 string ( millis , get safe date format ( pattern ) ) ; }


creates a delete request to be added to a { @ link request indexer } note : the type field has been deprecated since elasticsearch 7 x and it would not take any effort

delete request create delete request ( string index , string doc type , string key ) ;


server side implementation only receives state alignment info it does not build rpc requests therefore this does nothing

public void update request state ( rpc request header proto builder header ) { / / do nothing }


creates a decal using the region for texturing and the specified blending parameters for blending

public static decal new decal ( float width , float height , texture region texture region , int src blend factor , int dst blend factor , decal material material ) { decal decal = new decal ( material ) ; decal set texture region ( texture region ) ; decal set blending ( src blend factor , dst blend factor ) ; decal dimensions x = width ; decal dimensions y = height ; decal set color ( 1 , 1 , 1 , 1 ) ; return decal ; }


specify whether the parameter meta - data for the call should be used the default is { @ code true }

public void set access table column meta data ( boolean access table column meta data ) { this table meta data context set access table column meta data ( access table column meta data ) ; }


returns path to the optional zip file of undeclared test outputs

public path fragment get undeclared outputs zip path ( ) { return undeclared outputs zip path ; }


public void parsing proc disks file ( ) throws i o exception { long num sectors readsda = 1790549l ; long num sectors writtensda = 1839071l ; long num sectors readsdc = 20541402l ; long num sectors writtensdc = 32617658l ; long num sectors readsde = 19439751l ; long num sectors writtensde = 31838072l ; long num sectors readsdf = 20334546l ; long num sectors writtensdf = 33168970l ; file temp file = new file ( fake disksfile ) ; temp file delete on exit ( ) ; file writer f writer = new file writer ( fake disksfile ) ; f writer write ( string format ( disksinfo format , num sectors readsda , num sectors writtensda , num sectors readsdc , num sectors writtensdc , num sectors readsde , num sectors writtensde , num sectors readsdf , num sectors writtensdf ) ) ; f writer close ( ) ; long expected num sectors read = num sectors readsda + num sectors readsdc + num sectors readsde + num sectors readsdf ; long expected num sectors written = num sectors writtensda + num sectors writtensdc + num sectors writtensde + num sectors writtensdf ; / / use non - default sector size int disk sector size = fake linux resource calculator plugin sectorsize ; assert equals ( expected num sectors read * disk sector size , plugin get storage bytes read ( ) ) ; assert equals ( expected num sectors written * disk sector size , plugin get storage bytes written ( ) ) ; }


populates the holder with data parsed from id3 { @ link metadata }

public boolean set from metadata ( metadata metadata ) { for ( int i = 0 ; i < metadata length ( ) ; i + + ) { metadata entry entry = metadata get ( i ) ; if ( entry instanceof comment frame ) { comment frame comment frame = ( comment frame ) entry ; if ( gapless description equals ( comment frame description ) & & set from comment ( comment frame text ) ) { return true ; } } else if ( entry instanceof internal frame ) { internal frame internal frame = ( internal frame ) entry ; if ( gapless domain equals ( internal frame domain ) & & gapless description equals ( internal frame description ) & & set from comment ( internal frame text ) ) { return true ; } } } return false ; }


public long get debug start offset ( ) { return internals get debug start offset ( ) ; }


sets the indices the operation needs to be executed on

public t indices ( index [ ] indices ) { this indices = indices ; return ( t ) this ; }


helper method to build internal downstream tls context for multiple test classes

static envoy server proto data downstream tls context build internal downstream tls context ( common tls context common tls context , boolean require client cert ) { return envoy server proto data downstream tls context from envoy proto downstream tls context ( build downstream tls context ( common tls context , require client cert ) ) ; }


test local job submission with an archive option

public void test local job archives option ( ) throws i o exception { path jar path = make jar ( new path ( test root dir , " test jar " ) ) ; configuration conf = new configuration ( ) ; conf set ( file system fs default name key , " hdfs : / / localhost : 9000 " ) ; conf set ( m r config framework name , " local " ) ; final string [ ] args = { " - jt " , " local " , " - archives " , jar path to string ( ) , " - m " , " 1 " , " - r " , " 1 " , " - mt " , " 1 " , " - rt " , " 1 " } ; int res = - 1 ; try { res = tool runner run ( conf , new sleep job ( ) , args ) ; } catch ( exception e ) { system out println ( " job failed with " + e get localized message ( ) ) ; e print stack trace ( system out ) ; fail ( " job failed " ) ; } assert equals ( " dist job res is not 0 : " , 0 , res ) ; }


returns the x position of the actor ' s left edge


checks if the given function has been implemented using a java 8 lambda if yes , a lambda executable is returned describing the methodconstructor otherwise null

public static lambda executable check and extract lambda ( function function ) throws type extraction exception { try { / / get serialized lambda serialized lambda serialized lambda = null ; for ( class < ? > clazz = function get class ( ) ; clazz ! = null ; clazz = clazz get superclass ( ) ) { try { method replace method = clazz get declared method ( " write replace " ) ; replace method set accessible ( true ) ; object serial version = replace method invoke ( function ) ; / / check if class is a lambda function if ( serial version ! = null & & serial version get class ( ) = = serialized lambda class ) { serialized lambda = ( serialized lambda ) serial version ; break ; } } catch ( no such method exception e ) { / / thrown if the method is not there fall through the loop } } / / not a lambda method - > return null if ( serialized lambda = = null ) { return null ; } / / find lambda method string class name = serialized lambda get impl class ( ) ; string method name = serialized lambda get impl method name ( ) ; string method sig = serialized lambda get impl method signature ( ) ; class < ? > impl class = class for name ( class name replace ( ' / ' , ' ' ) , true , thread current thread ( ) get context class loader ( ) ) ; / / find constructor if ( method name equals ( " < init > " ) ) { constructor < ? > [ ] constructors = impl class get declared constructors ( ) ; for ( constructor < ? > constructor : constructors ) { if ( get constructor descriptor ( constructor ) equals ( method sig ) ) { return new lambda executable ( constructor ) ; } } } / / find method else { list < method > methods = get all declared methods ( impl class ) ; for ( method method : methods ) { if ( method get name ( ) equals ( method name ) & & get method descriptor ( method ) equals ( method sig ) ) { return new lambda executable ( method ) ; } } } throw new type extraction exception ( " no lambda method found " ) ; } catch ( exception e ) { throw new type extraction exception ( " could not extract lambda method out of function : " + e get class ( ) get simple name ( ) + " - " + e get message ( ) , e ) ; } }


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


provisions new { @ link node } s from this cloud { @ link node provisioner } performs a trend analysis on the load , and when it determines that it < b > really < b > needs to bring up additional nodes , this method is invoked the implementation of this method asynchronously starts node provisioning

public collection < planned node > provision ( label label , int excess workload ) { return util if overridden ( ( ) - > provision ( new cloud state ( label , 0 ) , excess workload ) , cloud class , get class ( ) , " provision " , cloud state class , int class ) ; }


many get port operations return - 1 by default leniently coerse to null

@ test public void new builder with port negative coerces to null ( ) { assert that ( endpoint new builder ( ) port ( - 1 ) build ( ) port ( ) ) is null ( ) ; }


return the web socket protocol extensions supported by the underlying web socket server

list < web socket extension > get supported extensions ( server http request request ) ;


generate json web key public json web key

protected public json web key generate json web key ( ) { val jwks = oidc properties get jwks ( ) ; return oidc json web key store utils generate json web key ( jwks get jwks type ( ) , jwks get jwks key size ( ) ) ; }


public static stop datafeed request stop all datafeeds request ( ) { return new stop datafeed request ( all datafeeds ) ; }


initialization method ; override to add initialization for this plugin this is where a plugin should acquire its services when this method is called , all plugins have been instantiated in the tool

protected void init ( ) { / / do nothing by default ; subclasses should override as needed }


stores a collection of values with the same key , replacing any existing values for that key because a { @ code sorted set multimap } has unique sorted values for a given key , this method returns a { @ link sorted set } , instead of the { @ link java util collection } specified in the { @ link multimap } interface any duplicates in { @ code values } will be stored in the multimap once

sorted set < v > replace values ( k key , iterable < ? extends v > values ) ;


peeks at the next byte without incrementing the current index

public byte peek next byte ( ) throws i o exception { return read byte ( current index ) ; }


associates the given object with the given range of addresses

public void add object ( object obj , address start addr , address end addr ) { long start = addr map get key ( start addr ) ; long end = addr map get key ( end addr ) ; add range ( obj , start , end ) ; coalesce range ( start , end ) ; }


returns the values of all the gauges that are currently being maintained by the service

public void get all gauges ( io grpc testing integration metrics empty message request , io grpc stub stream observer < io grpc testing integration metrics gauge response > response observer ) { io grpc stub server calls async unimplemented unary call ( get get all gauges method ( ) , response observer ) ; }


reduce ( ) does not support rich reduce function , since the reduce function is used internally in a { @ code reducing state }

public void test reduce with rich reducer fails ( ) throws exception { stream execution environment env = stream execution environment get execution environment ( ) ; data stream < tuple 2 < string , integer > > source = env from elements ( tuple 2 of ( " hello " , 1 ) , tuple 2 of ( " hello " , 2 ) ) ; source key by ( 0 ) window ( sliding event time windows of ( time of ( 1 , time unit seconds ) , time of ( 100 , time unit milliseconds ) ) ) reduce ( new rich reduce function < tuple 2 < string , integer > > ( ) { @ override public tuple 2 < string , integer > reduce ( tuple 2 < string , integer > value 1 , tuple 2 < string , integer > value 2 ) throws exception { return null ; } } ) ; fail ( " exception was not thrown " ) ; }


return { @ code true } if the provided method is a set method otherwise , return { @ code false }

public static boolean is setter ( method method ) { return method get name ( ) starts with ( " set " ) & & ! " set " equals ( method get name ( ) ) & & modifier is public ( method get modifiers ( ) ) & & method get parameter count ( ) = = 1 & & class utils is primitive ( method get parameter types ( ) [ 0 ] ) ; }


writes a { @ link type serializer snapshot } to the provided data output view it is written with a format that can be later read again using { @ link # read serializer snapshot ( data input view , class loader , type serializer ) }

public static < t > void write serializer snapshot ( data output view out , type serializer snapshot < t > serializer snapshot , type serializer < t > serializer ) throws i o exception { new type serializer snapshot serialization proxy < > ( serializer snapshot , serializer ) write ( out ) ; }


share data structure with other builds , mainly those of the same job

private packed map < string , string > compact ( map < string , string > record ) { map < string , string > b = new hash map < > ( ) ; for ( entry < string , string > e : record entry set ( ) ) { b put ( e get key ( ) intern ( ) , e get value ( ) intern ( ) ) ; } return packed map of ( b ) ; }


creates a scaled image based upon the given image note : avoid invocation by a static initializer

public static image create scaled image ( image image , int width , int height , int hints ) { buffered image scaled image = new buffered image ( width , height , buffered image type int argb ) ; graphics graphics = scaled image get graphics ( ) ; graphics 2 d g 2 = ( graphics 2 d ) graphics ; g 2 set rendering hint ( rendering hints key interpolation , rendering hints value interpolation bilinear ) ; graphics draw image ( image , 0 , 0 , width , height , null ) ; graphics dispose ( ) ; return scaled image ; }


returns true if the connection was cancelled by the user

public boolean is cancelled ( ) { return connect cancelled ; }


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


gets the mem buffer for the indicated data type in the array when the model has a count that is greater than 1

protected mem buffer get specific mem buffer ( int ordinal , data type dt ) { int size = dt get length ( ) ; mem buffer base mem buffer = get mem buffer ( ) ; long offset = size * ordinal ; address specific address = base mem buffer get address ( ) add ( offset ) ; mem buffer specific mem buffer = new dumb mem buffer impl ( get program ( ) get memory ( ) , specific address ) ; return specific mem buffer ; }


public boolean delete group capacity ( final string group ) { try { prepared statement creator prepared statement creator = new prepared statement creator ( ) { @ override public prepared statement create prepared statement ( connection connection ) throws s q l exception { prepared statement ps = connection prepare statement ( " delete from group capacity where group id = ? ; " ) ; ps set string ( 1 , group ) ; return ps ; } } ; return jdbc template update ( prepared statement creator ) = = 1 ; } catch ( cannot get jdbc connection exception e ) { fatal log error ( " [ db - error ] " , e ) ; throw e ; } }


gets the mask value set by the user for the given mnemonic , and stores it in the { @ link instruction search data } object

private void store mnemonic mask ( instruction table table , int row ) { / / note : magic number 0 is used since the mnemonic column is always the first one if ( table get cell data ( row , 0 ) = = null ) { return ; } operand state mnemonic mask state = table get cell data ( row , 0 ) get state ( ) ; instructions get ( row ) set masked ( mnemonic mask state equals ( operand state masked ) ) ; }


check whether or not this execution has a local variable set with the given name

boolean has variable local ( string execution id , string variable name ) ;


add decl to struct ctx for rule or alt if labeled

public void add context decl ( string alt label , decl d ) { code block for outer most alt alt = d get outer most alt code block ( ) ; / / if we found code blk and might be alt label , try to add to that label ctx if ( alt ! = null & & alt label ctxs ! = null ) { / / system out println ( d name + " lives in alt " + alt alt alt num ) ; alt label struct decl alt ctx = alt label ctxs get ( alt label ) ; if ( alt ctx ! = null ) { / / we have an alt ctx / / system out println ( " ctx is " + alt ctx name ) ; alt ctx add decl ( d ) ; return ; } } rule ctx add decl ( d ) ; / / stick in overall rule ' s ctx }


returns whether the given partition is being tracked

boolean is partition tracked ( result partition i d result partition i d ) ;


fake endpoint for testing various parameters 가짜 엔드 포인트 fake endpoint for testing various parameters 가짜 엔드 포인트

public void test endpoint parameters ( @ multipart ( value = " number " ) big decimal number , @ multipart ( value = " double " ) double double , @ multipart ( value = " pattern without delimiter " ) string pattern without delimiter , @ multipart ( value = " byte " ) byte [ ] byte , @ multipart ( value = " integer " , required = false ) integer integer , @ multipart ( value = " int 3 2 " , required = false ) integer int 3 2 , @ multipart ( value = " int 6 4 " , required = false ) long int 6 4 , @ multipart ( value = " float " , required = false ) float float , @ multipart ( value = " string " , required = false ) string string , @ multipart ( value = " binary " , required = false ) attachment binary detail , @ multipart ( value = " date " , required = false ) local date date , @ multipart ( value = " date time " , required = false ) date date time , @ multipart ( value = " password " , required = false ) string password , @ multipart ( value = " callback " , required = false ) string param callback ) ;


creates a new server - side { @ link ssl context }

public static ssl context new server context ( ssl provider provider , file cert chain file , file key file ) throws s s l exception { return new server context ( provider , cert chain file , key file , null ) ; }


get the non - truncated index field value

field get non truncated index field ( ) { return non truncated indexed field ; }


test changing symbol name and source in both pick latest version

public void test change latest and my name same ( ) 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 latest program " ) ; boolean commit = false ; try { symbol symbol = get unique symbol ( program , " xxx " ) ; assert equals ( source type user defined , symbol get source ( ) ) ; symbol set name ( " apple " , 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 ) { 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 ( " apple " , source type analysis ) ; commit = true ; } catch ( exception e ) { assert fail ( e get message ( ) ) ; } finally { program end transaction ( tx id , commit ) ; } } } ) ; 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 , " apple " ) ; check symbol ( s , " apple " , true ) ; assert equals ( source type analysis , s get source ( ) ) ; }


returns the second input { @ code transformation } of this { @ code two input transformation }

public transformation < in2 > get input 2 ( ) { return input 2 ; }


return local information , do not retrieve the state from master node ( default : false )

public final boolean local ( ) { return local ; }


returns the version of the ghidra being run

public string get ghidra version ( ) { return application get application version ( ) ; }


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


override the default kotlin serialization json { @ code decoder }

void kotlin serialization json decoder ( decoder < ? > decoder ) ;


public void prefix integer test ( ) { / / todo : test prefix integer }


set the ranges of maps or reduces to profile set profile enabled ( true ) must also be called

public void set profile task range ( boolean is map , string new value ) { ensure state ( job state define ) ; conf set profile task range ( is map , new value ) ; }


gives the passed in parameter an initialized value if the parameter is basic data type or the corresponding object data type , return the default data or return null

private object get init param value ( class < ? > model class , class < ? > param type ) { string param type name = param type get name ( ) ; if ( " boolean " equals ( param type name ) | | " java lang boolean " equals ( param type name ) ) { return false ; } if ( " float " equals ( param type name ) | | " java lang float " equals ( param type name ) ) { return 0f ; } if ( " double " equals ( param type name ) | | " java lang double " equals ( param type name ) ) { return 0 0 ; } if ( " int " equals ( param type name ) | | " java lang integer " equals ( param type name ) ) { return 0 ; } if ( " long " equals ( param type name ) | | " java lang long " equals ( param type name ) ) { return 0l ; } if ( " short " equals ( param type name ) | | " java lang short " equals ( param type name ) ) { return 0 ; } if ( " char " equals ( param type name ) | | " java lang character " equals ( param type name ) ) { return ' ' ; } if ( " [ b " equals ( param type name ) | | " [ ljava lang byte ; " equals ( param type name ) ) { return new byte [ 0 ] ; } if ( " java lang string " equals ( param type name ) ) { return " " ; } if ( model class = = param type ) { return null ; } return create instance from class ( param type ) ; }


restart the cluster , optionally saving a new checkpoint

protected static void restart ( boolean checkpoint ) throws exception { name node name node = dfs cluster get name node ( ) ; if ( checkpoint ) { name node adapter enter safe mode ( name node , false ) ; name node adapter save namespace ( name node ) ; } shutdown ( ) ; init cluster ( false ) ; }


remove an output artifact if the path refers to a directory , recursively removes the contents of the directory

protected static void delete output ( artifact output , artifact path resolver path resolver ) throws i o exception { delete output ( path resolver to path ( output ) , path resolver transform root ( output get root ( ) get root ( ) ) ) ; }


performs one pass of generating more equivalences by rewriting sub - expressions in terms of known equivalences

private void generate more equivalences ( ) { collection < set < row expression > > equivalent classes = equalities get equivalent classes ( ) ; / / map every expression to the set of equivalent expressions immutable map builder < row expression , set < row expression > > map builder = immutable map builder ( ) ; for ( set < row expression > expressions : equivalent classes ) { expressions for each ( expression - > map builder put ( expression , expressions ) ) ; } / / for every non - derived expression , extract the sub - expressions and see if they can be rewritten as other expressions if so , / / use this new information to update the known equalities map < row expression , set < row expression > > map = map builder build ( ) ; for ( row expression expression : map key set ( ) ) { if ( ! derived expressions contains ( expression ) ) { for ( row expression sub expression : filter ( unique sub expressions ( expression ) , not ( equal to ( expression ) ) ) ) { set < row expression > equivalent sub expressions = map get ( sub expression ) ; if ( equivalent sub expressions ! = null ) { for ( row expression equivalent sub expression : filter ( equivalent sub expressions , not ( equal to ( sub expression ) ) ) ) { row expression rewritten = row expression tree rewriter rewrite with ( new row expression node inliner ( immutable map of ( sub expression , equivalent sub expression ) ) , expression ) ; equalities find and union ( expression , rewritten ) ; derived expressions add ( rewritten ) ; } } } } } }


normalize the given windows path string this does the following : 1 adds " file : " scheme for absolute paths 2 ensures the scheme - specific part starts with ' ' per rfc2396 3 replaces backslash path separators with forward slashes

private static string normalize windows path ( string path string ) throws i o exception { if ( ! path windows ) { return path string ; } boolean slashed = ( ( path string length ( ) > = 1 ) & & ( path string char at ( 0 ) = = ' / ' ) ) ; / / is it a backslash - separated absolute path ? if ( windows non uri absolute path 1 matcher ( path string ) find ( ) ) { / / forward slashes disallowed in a backslash - separated path if ( path string index of ( ' / ' ) ! = - 1 ) { throw new i o exception ( " invalid path string " + path string ) ; } path string = path string replace ( ' \ \ ' , ' / ' ) ; return " file : " + ( slashed ? " " : " / " ) + path string ; } / / is it a forward slash - separated absolute path ? if ( windows non uri absolute path 2 matcher ( path string ) find ( ) ) { return " file : " + ( slashed ? " " : " / " ) + path string ; } / / is it a backslash - separated relative file path ( no scheme and / / no drive - letter specifier ) ? if ( ( path string index of ( ' : ' ) = = - 1 ) & & ( path string index of ( ' \ \ ' ) ! = - 1 ) ) { path string = path string replace ( ' \ \ ' , ' / ' ) ; } return path string ; }


set the green component of { @ code color } to be { @ code green }

public static int set green component ( @ color int int color , @ int range ( from = 0x 0 , to = 0x f f ) int green ) { return ( color & 0xffff 0 0ff ) | ( green < < 8 ) ; }


public float get scale y ( ) { if ( m view port handler = = null ) return 1f ; else return m view port handler get scale y ( ) ; }


short - circuit ? : no threadsemaphore : semaphore semaphore permit reached ? : no execution result : synchronous hystrix runtime exception fallback : unsupported operation exception

public void test execution hook semaphore exception no fallback ( ) { assert hooks on failure ( new func 0 < c > ( ) { @ override public c call ( ) { return get command ( execution isolation strategy semaphore , execution result failure , fallback result unimplemented ) ; } } , new action 1 < c > ( ) { @ override public void call ( c command ) { testable execution hook hook = command get builder ( ) execution hook ; assert true ( hook command emissions match ( 0 , 1 , 0 ) ) ; assert true ( hook execution events match ( 0 , 1 , 0 ) ) ; assert true ( hook fallback events match ( 0 , 0 , 0 ) ) ; assert equals ( runtime exception class , hook get command exception ( ) get class ( ) ) ; assert equals ( runtime exception class , hook get execution exception ( ) get class ( ) ) ; assert null ( hook get fallback exception ( ) ) ; assert equals ( " on start - ! on run start - on execution start - on execution error - ! on run error - on error - " , hook execution sequence to string ( ) ) ; } } ) ; }


return true if the path was successfully deleted false if it failed with access control exception any other exceptions are propagated to the caller

private boolean delete path ( file system fs , path path ) throws i o exception { try { fs delete ( path , true ) ; return true ; } catch ( access control exception ace ) { return false ; } }


returns all of the queue ' s current elements in a list , if the queue is non - empty otherwise , this method returns null the method throws an { @ code illegal state exception } if the queue is closed checking whether the queue is open and removing the elements is one atomic operation this method never blocks

public list < e > poll batch ( ) { lock lock ( ) ; try { if ( open ) { if ( elements size ( ) > 0 ) { array list < e > result = new array list < > ( elements ) ; elements clear ( ) ; return result ; } else { return null ; } } else { throw new illegal state exception ( " queue is closed " ) ; } } finally { lock unlock ( ) ; } }


tests that round - trip acks in a datanode write pipeline are correctly measured

public void test round trip ack metric ( ) throws exception { final int datanode count = 2 ; final int interval = 1 ; configuration conf = new hdfs configuration ( ) ; conf set ( d f s config keys dfs metrics percentiles intervals key , " " + interval ) ; mini d f s cluster cluster = new mini d f s cluster builder ( conf ) num data nodes ( datanode count ) build ( ) ; try { cluster wait active ( ) ; file system fs = cluster get file system ( ) ; / / open a file and get the head of the pipeline path test file = new path ( " / test round trip ack metric txt " ) ; f s data output stream fsout = fs create ( test file , ( short ) datanode count ) ; d f s output stream dout = ( d f s output stream ) fsout get wrapped stream ( ) ; / / slow down the writes to catch the write pipeline dout set chunks per packet ( 5 ) ; dout set artificial slowdown ( 3000 ) ; fsout write ( new byte [ 10000 ] ) ; datanode info [ ] pipeline = null ; int count = 0 ; while ( pipeline = = null & & count < 5 ) { pipeline = dout get pipeline ( ) ; system out println ( " waiting for pipeline to be created " ) ; thread sleep ( 1000 ) ; count + + ; } / / get the head node that should be receiving downstream acks datanode info head info = pipeline [ 0 ] ; data node head node = null ; for ( data node datanode : cluster get data nodes ( ) ) { if ( datanode get datanode id ( ) equals ( head info ) ) { head node = datanode ; break ; } } assert not null ( " could not find the head of the datanode write pipeline " , head node ) ; / / close the file and wait for the metrics to rollover thread sleep ( ( interval + 1 ) * 1000 ) ; / / check the ack was received metrics record builder dn metrics = get metrics ( head node get metrics ( ) name ( ) ) ; assert true ( " expected non - zero number of acks " , get long counter ( " packet ack round trip time nanos num ops " , dn metrics ) > 0 ) ; assert quantile gauges ( " packet ack round trip time nanos " + interval + " s " , dn metrics ) ; } finally { if ( cluster ! = null ) { cluster shutdown ( ) ; } } }


create the builder ready for any final configuration options picks up connection settings from the hadoop configuration , including proxy secrets

public static a w s security token service client builder builder ( final configuration conf , final string bucket , final a w s credentials provider credentials , final string sts endpoint , final string sts region ) throws i o exception { final client configuration aws conf = s 3 a utils create aws conf ( conf , bucket , constants aws service identifier sts ) ; return builder ( credentials , aws conf , sts endpoint , sts region ) ; }


set the { @ link recv byte buf allocator } which is used for the channel to allocate receive buffers

private void set recv byte buf allocator ( recv byte buf allocator allocator , channel metadata metadata ) { if ( allocator instanceof max messages recv byte buf allocator ) { ( ( max messages recv byte buf allocator ) allocator ) max messages per read ( metadata default max messages per read ( ) ) ; } else if ( allocator = = null ) { throw new null pointer exception ( " allocator " ) ; } set recv byte buf allocator ( allocator ) ; }


called when configuration of the node was changed , a node is addedremoved , etc this callback is to signal when there ' s any change to the list of agents registered to the system , including addition , removal , changing of the setting , and so on

public void on configuration change ( ) { }


public static void assert container killed ( final container id container id , final container status status ) { assert equals ( container id , status get container id ( ) ) ; assert equals ( container state complete , status get state ( ) ) ; assert equals ( container exit status preempted , status get exit status ( ) ) ; assert equals ( scheduler utils preempted container , status get diagnostics ( ) ) ; }


returns the given specific long value , shifted left by this integer value

public long value shift left of ( specific long value other ) { return shift left of ( ( long value ) other ) ; }


look up interface types indices from a return type index from a method index cheaper than : { @ code get class def ( class def index ) get interfaces ( ) ; }

public short [ ] interface type indices from class def index ( int class def index ) { check bounds ( class def index , table of contents class defs size ) ; int position = table of contents class defs off + ( size of class def item * class def index ) ; position + = size of uint ; / / type position + = size of uint ; / / access flags position + = size of uint ; / / super type int interfaces offset = data get int ( position ) ; if ( interfaces offset = = 0 ) { return empty short array ; } position = interfaces offset ; int size = data get int ( position ) ; if ( size < = 0 ) { throw new assertion error ( " unexpected interfaces list size : " + size ) ; } position + = size of uint ; short [ ] types = new short [ size ] ; for ( int i = 0 ; i < size ; i + + ) { types [ i ] = data get short ( position ) ; position + = size of ushort ; } return types ; }


public final void aux switch arg ( switch list cases ) { if ( cases = = null ) { throw new null pointer exception ( " cases = = null " ) ; } aux cases = cases ; }


whether to allow local sessions to upgrade to global sessions

public void enable local sessions upgrading ( boolean flag ) { log info ( " local session upgrading { } " , ( flag ? " enabled " : " disabled " ) ) ; local sessions upgrading enabled = flag ; }


where the plural was defined < code > optional aapt pb source source = 1 ; < code >

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


prepares for a check that the subject is deadline within the given tolerance of an expected value that will be provided in the next call in the fluent chain

public tolerant deadline comparison is within ( final long delta , final time unit time unit ) { return new tolerant deadline comparison ( ) { @ override public void of ( deadline expected ) { deadline actual = deadline subject this actual ; check not null ( actual , " actual value cannot be null expected = % s " , expected ) ; / / this is probably overkill , but easier than thinking about overflow big integer actual time remaining = big integer value of ( actual time remaining ( nanoseconds ) ) ; big integer expected time remaining = big integer value of ( expected time remaining ( nanoseconds ) ) ; big integer delta nanos = big integer value of ( time unit to nanos ( delta ) ) ; if ( actual time remaining subtract ( expected time remaining ) abs ( ) compare to ( delta nanos ) > 0 ) { fail without actual ( fact ( " expected " , expected ) , fact ( " but was " , actual ) , fact ( " outside tolerance in ns " , delta nanos ) ) ; } } } ; } / / todo ( carl - mastrangelo ) : add a is not within method once there is need for one currently there / / is no such method since there is no code that uses it , and would lower our coverage numbers


public indices aliases request builder add alias ( string indices [ ] , string alias , query builder filter builder ) { request add alias action ( alias actions add ( ) indices ( indices ) alias ( alias ) filter ( filter builder ) ) ; return this ; }


this method looks at the { @ link datafeed delayed data detector # datafeed indices } from { @ code latest finalized bucket - window } to { @ code latest finalized bucket } and compares the document counts with the { @ link datafeed delayed data detector # job id } ' s finalized buckets ' event counts it is done synchronously , and can block for a considerable amount of time , it should only be executed within the appropriate thread pool

public list < bucket with missing data > detect missing data ( long latest finalized bucket ms ) { final long end = intervals align to floor ( latest finalized bucket ms , bucket span ) ; final long start = intervals align to floor ( latest finalized bucket ms - window , bucket span ) ; if ( end < = start ) { return collections empty list ( ) ; } list < bucket > finalized buckets = check bucket events ( start , end ) ; map < long , long > indexed data = check current bucket event count ( start , end ) ; return finalized buckets stream ( ) / / we only care about the situation when data is added to the indices / / older data could have been removed from the indices , and should not be considered " missing data " filter ( bucket - > calculate missing ( indexed data , bucket ) > 0 ) map ( bucket - > bucket with missing data from missing and bucket ( calculate missing ( indexed data , bucket ) , bucket ) ) collect ( collectors to list ( ) ) ; }


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

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


delete a list of model snapshots and their corresponding state documents

public void delete model snapshots ( list < model snapshot > model snapshots , action listener < bulk by scroll response > listener ) { if ( model snapshots is empty ( ) ) { listener on response ( new bulk by scroll response ( time value zero , new bulk by scroll task status ( collections empty list ( ) , null ) , collections empty list ( ) , collections empty list ( ) , false ) ) ; return ; } string state index name = anomaly detectors index job state index pattern ( ) ; list < string > ids to delete = new array list < > ( ) ; set < string > indices = new hash set < > ( ) ; indices add ( state index name ) ; indices add ( annotation index read alias name ) ; for ( model snapshot model snapshot : model snapshots ) { ids to delete add all ( model snapshot state document ids ( ) ) ; ids to delete add ( model snapshot document id ( model snapshot ) ) ; ids to delete add ( model snapshot annotation document id ( model snapshot ) ) ; indices add ( anomaly detectors index job results aliased name ( model snapshot get job id ( ) ) ) ; } delete by query request delete by query request = new delete by query request ( indices to array ( new string [ 0 ] ) ) set refresh ( true ) set indices options ( indices options lenient expand open ( ) ) set query ( query builders ids query ( ) add ids ( ids to delete to array ( new string [ 0 ] ) ) ) ; / / doc is the most efficient sort order and will also disable scoring delete by query request get search request ( ) source ( ) sort ( elasticsearch mappings es doc ) ; execute async with origin ( client , ml origin , delete by query action instance , delete by query request , listener ) ; }


public string get git user id ( ) { return git user id ; }


get the number of characters separating units

public int get unit delimiter size ( ) { return 0 ; / / no space between units }


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


gets the local state associated with this instance

public register spec set get locals ( ) { return locals ; }


remove the object with the given { @ code name } from the underlying scope returns { @ code null } if no object was found ; otherwise returns the removed { @ code object } note that an implementation should also remove a registered destruction callback for the specified object , if any it does , however , not need to execute a registered destruction callback in this case , since the object will be destroyed by the caller ( if appropriate ) < b > note : this is an optional operation < b > implementations may throw { @ link unsupported operation exception } if they do not support explicitly removing an object


create the lock file using the default timeout lock is guaranteed for max lock lease period seconds

public boolean create lock ( ) { return create lock ( lock timeout , false ) ; }


creates a new file system for the given file system uri the uri describes the type of file system ( via its scheme ) and optionally the authority ( for example the host ) of the file system

file system create ( uri fs uri ) throws i o exception ;


appends a char subsequence to the printer ' s buffer

public final printer append ( char sequence s , int start , int end ) { buffer append ( s , start , end ) ; return this ; }


begin to specify a new request with the given metadata value , which can be a concrete value or any producer of a single value that can be adapted to a { @ link publisher } via { @ link reactive adapter registry }

request spec metadata ( object metadata , @ nullable mime type mime type ) ;


create a { @ link hdfs data output stream builder } to append a file on dfs

public hdfs data output stream builder append file ( path path ) { return new hdfs data output stream builder ( this , path ) append ( ) ; }


returns an immutable sorted set containing the given elements sorted by their natural ordering when multiple elements are equivalent according to { @ link comparable # compare to } , only the first one specified is included

public static < e extends comparable < ? super e > > immutable sorted set < e > of ( e e 1 , e e 2 , e e 3 , e e 4 ) { return construct ( ordering natural ( ) , 4 , e 1 , e 2 , e 3 , e 4 ) ; }


public string [ ] snapshots ( ) { return this snapshots ; }


returns true if the version of this plugin is older than the given version

public boolean is older than ( version number v ) { try { return get version number ( ) compare to ( v ) < 0 ; } catch ( illegal argument exception e ) { / / if we can ' t figure out our current version , it probably means it ' s very old , / / since the version information is missing only from the very old plugins return true ; } }


returns an admittor that admits every candidate

static admittor always ( ) { return always admit instance ; }


return the configured argument resolvers , or possibly { @ code null } if not initialized yet via { @ link # after properties set ( ) }

public list < handler method argument resolver > get argument resolvers ( ) { return ( this argument resolvers ! = null ? this argument resolvers get resolvers ( ) : null ) ; }


this is an expanded example for the documentation also helps catch out unplanned changes to the configuration strings

public void test select file example ( ) throws throwable { describe ( " select the entire file , expect all rows but the header " ) ; int len = ( int ) get file system ( ) get file status ( csv path ) get len ( ) ; future data input stream builder builder = get file system ( ) open file ( csv path ) must ( " fs s 3a select sql " , select odd entries ) must ( " fs s 3a select input format " , " csv " ) must ( " fs s 3a select input compression " , " none " ) must ( " fs s 3a select input csv header " , " use " ) must ( " fs s 3a select output format " , " csv " ) ; completable future < f s data input stream > future = builder build ( ) ; try ( f s data input stream select = future get ( ) ) { / / process the output byte [ ] bytes = new byte [ len ] ; int actual = select read ( bytes ) ; log info ( " file length is { } ; length of selected data is { } " , len , actual ) ; } }


remove all references that have the " to " address as the given address note : this method relies on the use of the to refs list ! beyond version - 12 of program d b , stack and register addresses are no longer stored in the to refs list

private int remove all to ( address to addr ) throws i o exception { ref list to refs = get to refs ( to addr ) ; if ( to refs = = null ) { return 0 ; } int cnt = to refs get num refs ( ) ; reference [ ] refs = to refs get all refs ( ) ; for ( reference ref : refs ) { ref list from refs = get from refs ( ref get from address ( ) ) ; from refs remove ref ( to addr , ref get operand index ( ) ) ; if ( from refs is empty ( ) ) { from cache delete ( from refs get key ( ) ) ; } reference removed ( ref ) ; } to refs remove all ( ) ; to cache delete ( to refs get key ( ) ) ; return cnt ; }


returns all { @ link request method request methods } contained in this condition

public set < request method > get methods ( ) { return this methods ; }


display the list of blacklisted trackers

private void list blacklisted trackers ( cluster cluster ) throws i o exception , interrupted exception { task tracker info [ ] trackers = cluster get black listed task trackers ( ) ; if ( trackers length > 0 ) { system out println ( " black listed node \ t reason " ) ; } for ( task tracker info tracker : trackers ) { system out println ( tracker get task tracker name ( ) + " \ t " + tracker get reason for blacklist ( ) ) ; } }


try the dynamic load , remove existing to attempt to dynamic load disabled plugins

public void dynamic load ( file arc , boolean remove existing , @ check for null list < plugin wrapper > batch ) throws i o exception , interrupted exception , restart required exception { try ( a c l context context = acl as 2 ( acl system2 ) ) { logger log ( fine , " attempting to dynamic load { 0 } " , arc ) ; plugin wrapper p = null ; string sn ; try { sn = strategy get short name ( arc ) ; } catch ( abstract method error x ) { logger log ( warning , " jenkins - 12753 fix not active : { 0 } " , x get message ( ) ) ; p = strategy create plugin wrapper ( arc ) ; sn = p get short name ( ) ; } plugin wrapper pw = get plugin ( sn ) ; if ( pw ! = null ) { if ( remove existing ) { / / try to load disabled plugins for ( iterator < plugin wrapper > i = plugins iterator ( ) ; i has next ( ) ; ) { pw = i next ( ) ; if ( sn equals ( pw get short name ( ) ) ) { i remove ( ) ; break ; } } } else { throw new restart required exception ( messages plugin manager plugin is already installed restart required ( sn ) ) ; } } if ( p = = null ) { p = strategy create plugin wrapper ( arc ) ; } if ( p supports dynamic load ( ) = = yes no maybe no ) throw new restart required exception ( messages plugin manager plugin doesnt support dynamic load restart required ( sn ) ) ; / / there ' s no need to do cyclic dependency check , because we are deploying one at a time , / / so existing plugins can ' t be depending on this newly deployed one plugins add ( p ) ; if ( p is active ( ) ) active plugins add ( p ) ; synchronized ( ( ( uber class loader ) uber class loader ) loaded ) { ( ( uber class loader ) uber class loader ) loaded clear ( ) ; } / / todo antimodular ; perhaps should have a plugin listener to complement extension list listener ? custom class filter contributed load ( ) ; try { p resolve plugin dependencies ( ) ; strategy load ( p ) ; if ( batch ! = null ) { batch add ( p ) ; } else { start ( collections singleton list ( p ) ) ; } } catch ( exception e ) { failed plugins add ( new failed plugin ( sn , e ) ) ; active plugins remove ( p ) ; plugins remove ( p ) ; throw new i o exception ( " failed to install " + sn + " plugin " , e ) ; } logger log ( fine , " plugin { 0 } : { 1 } dynamically { 2 } " , new object [ ] { p get short name ( ) , p get version ( ) , batch ! = null ? " loaded but not yet started " : " installed " } ) ; } }


the list of array elements < code > repeated aapt pb array element element = 1 ; < code >

public java util list < ? extends com android aapt resources array element or builder > get element or builder list ( ) { return element ; }


tests range resource exhaustion ( i e insufficient resources )

public void test range resource exhaustion ( ) { mesos resource allocation allocation = new mesos resource allocation ( resources ( ports ( range ( 80 , 80 ) ) ) ) ; assert assert equals ( resources ( ports ( range ( 80 , 80 ) ) ) , allocation take ranges ( " ports " , 2 , as no role ) ) ; assert assert equals ( resources ( ) , allocation get remaining ( ) ) ; }


provides a list of filters in conjunctive form for filtering on a best - effort basis

default void apply filters ( list < resolved expression > filters ) { }


handles gss context establishment received token is passed to the g s s context on acceptor side and returns with out token that needs to be sent to peer for further gss context establishment

private static byte [ ] accept sec context ( final byte [ ] base 6 4decoded ticket , final g s s context gss context , subject subject ) throws privileged action exception { / / process token with gss context return do as wrapper ( subject , ( privileged exception action < byte [ ] > ) ( ) - > gss context accept sec context ( base 6 4decoded ticket , 0 , base 6 4decoded ticket length ) ) ; }


see { @ link socket # is input shutdown ( ) } calling this method does not trigger mode detection

public boolean is input shutdown ( ) { return get socket allow unknown mode ( ) is input shutdown ( ) ; }


returns the underlying g r p c { @ link server } for this service

public final server get server ( ) { return server ; }


asserts the value of the fs permission bits on the inode of a specific path

public static void assert permission ( file system fs , path path to check , short perm ) throws i o exception { assert equals ( perm , fs get file status ( path to check ) get permission ( ) to short ( ) ) ; }


public long get $ special property name ( ) { return $ special property name ; }


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

void test body with file schema ( file schema test class body ) ;


reads a compressed reference offset and length from the supplied input buffer , seeks back to the appropriate place in the input buffer and writes the found data to the supplied output stream

private static int decode copy with 4 byte offset ( byte tag , byte buf in , byte buf out , int written so far ) { if ( in readable bytes ( ) < 4 ) { return not enough input ; } int initial index = out writer index ( ) ; int length = 1 + ( tag > > 2 & 0x 0 3 f ) ; int offset = in read int l e ( ) ; validate offset ( offset , written so far ) ; out mark reader index ( ) ; if ( offset < length ) { int copies = length / offset ; for ( ; copies > 0 ; copies - - ) { out reader index ( initial index - offset ) ; out read bytes ( out , offset ) ; } if ( length % offset ! = 0 ) { out reader index ( initial index - offset ) ; out read bytes ( out , length % offset ) ; } } else { out reader index ( initial index - offset ) ; out read bytes ( out , length ) ; } out reset reader index ( ) ; return length ; }


main function of the dist cp program parses the input arguments ( via options parser ) , and invokes the dist cp : : run ( ) method , via the tool runner

public static void main ( string argv [ ] ) { int exit code ; try { dist cp dist cp = new dist cp ( ) ; cleanup cleanup = new cleanup ( dist cp ) ; shutdown hook manager get ( ) add shutdown hook ( cleanup , shutdown hook priority ) ; exit code = tool runner run ( get default conf ( ) , dist cp , argv ) ; } catch ( exception e ) { log error ( " couldn ' t complete dist cp operation : " , e ) ; exit code = dist cp constants unknown error ; } system exit ( exit code ) ; }


public static void put credential ( final request context context , final credential c ) { if ( c = = null ) { context get request scope ( ) remove ( parameter credential ) ; context get flow scope ( ) remove ( parameter credential ) ; context get conversation scope ( ) remove ( parameter credential ) ; } else { context get request scope ( ) put ( parameter credential , c ) ; context get flow scope ( ) put ( parameter credential , c ) ; context get conversation scope ( ) put ( parameter credential , c ) ; } }


build the context for the root of the aggregation tree

public static validation context for tree root ( collection < aggregation builder > sibling aggregations , collection < pipeline aggregation builder > sibling pipeline aggregations , action request validation exception validation failures so far ) { return new for tree root ( sibling aggregations , sibling pipeline aggregations , validation failures so far ) ; }


public string get reduce debug script ( ) { return get ( job context reduce debug script ) ; }


shutdown sync http client holder and remove template

public static void shutdown nacost sync rest ( string class name ) throws exception { final nacos rest template nacos rest template = singleton rest get ( class name ) ; if ( nacos rest template ! = null ) { nacos rest template close ( ) ; singleton rest remove ( class name ) ; } }


public void ship date test ( ) { / / todo : test ship date }


returns true if this dex doesn ' t contain any class defs

public boolean is empty ( ) { return class defs items ( ) is empty ( ) ; }


public int get parts submitted ( ) { return parts submitted ; }


triggers a single non - periodically scheduled task

public void trigger non periodic scheduled task ( ) { exec service trigger non periodic scheduled task ( ) ; }


update the child key associated with the specified key index other entries are shifted as necessary to accommodate the new key length for the updated entry

private void update key ( int index , field update key ) throws i o exception { / / adjust key data space int offset = move keys ( index + 1 , get key length ( index ) - update key length ( ) ) ; / / update key data update key write ( buffer , offset ) ; put key offset ( index , offset ) ; }


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

public builder clear foo ( ) { bit field 0 = ( bit field 0 & ~ 0x 0 0 0 0 0 0 0 1 ) ; foo = get default instance ( ) get foo ( ) ; on changed ( ) ; return this ; }


private void grow if needed ( ) { if ( size = = values length ) { / / resize int [ ] newv = new int [ size * 3 / 2 + 10 ] ; system arraycopy ( values , 0 , newv , 0 , size ) ; values = newv ; } }


get the { @ link histogram value } associated with the current document the returned { @ link histogram value } might be reused across calls

public abstract histogram value histogram ( ) throws i o exception ;


match the given request against specific expectations

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


find all tenant widgets bundles ( including system ) by tenant id and page link

page data < widgets bundle > find all tenant widgets bundles by tenant id ( uuid tenant id , page link page link ) ;


public void test read only first ( ) { / / todo : test read only first }


public void test collide space station iss ( ) { test collision ( new space station iss ( 1 , 1 , 3 , 4 ) , true , false , false , false ) ; }


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


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


public execution config get execution config ( ) { if ( execution config = = null ) { throw new runtime exception ( " execution config has not been set properly for this plan " ) ; } return execution config ; }


tests the independence of the writer index via { @ link read only sliced network buffer # set size ( int ) } , { @ link read only sliced network buffer # get size ( ) }

public void test get set size 1 ( ) { test get set size ( buffer read only slice ( ) , data size ) ; }


provide a string representation of this test context ' s state

public string to string ( ) { return new to string creator ( this ) append ( " test class " , this test class ) append ( " test instance " , this test instance ) append ( " test method " , this test method ) append ( " test exception " , this test exception ) append ( " merged context configuration " , this merged context configuration ) append ( " attributes " , this attributes ) to string ( ) ; }


public j spinner get spinner ( ) { return spinner ; }


sets the { @ code settings max concurrent streams } value

public http 2 settings max concurrent streams ( long value ) { put ( settings max concurrent streams , long value of ( value ) ) ; return this ; }


set the joint limits , usually in meters

public void set limits ( float lower , float upper ) { assert ( lower < = upper ) ; if ( lower ! = m lower translation | | upper ! = m upper translation ) { m body a set awake ( true ) ; m body b set awake ( true ) ; m lower translation = lower ; m upper translation = upper ; m impulse z = 0 0f ; } }


returns a file for the given name inside the log directory

private static file get log file ( string name ) { return new file ( system get property ( " hadoop log dir " ) , name ) ; }


check that it is possible to write logs to disk

public void test 1 2 1 can use stack logging config ( ) throws exception { run container ( distribution ( ) , builder ( ) env vars ( map of ( " es log style " , " file " ) ) ) ; wait for elasticsearch ( installation ) ; final result container logs = get container logs ( ) ; final list < string > stdout = container logs stdout lines ( ) collect ( collectors to list ( ) ) ; assert that ( " container logs should be formatted using the stack config " , stdout get ( stdout size ( ) - 1 ) , matches pattern ( " ^ \ \ [ \ \ d \ \ d \ \ d \ \ d - * " ) ) ; assert that ( " [ logs / docker - cluster log ] should exist but it doesn ' t " , exists in container ( " logs / docker - cluster log " ) , is ( true ) ) ; }


links node as first element , or returns false if full

private boolean link first ( node < e > node ) { / / assert lock is held by current thread ( ) ; if ( count > = capacity ) return false ; node < e > f = first ; node next = f ; first = node ; if ( last = = null ) last = node ; else f prev = node ; + + count ; not empty signal ( ) ; return true ; }


transforms this fluent iterable into a new one containing objects of the type t

public < t > fluent iterable < t > map ( function < ? super e , t > function ) { return new lazy fluent iterable < > ( ) { @ override public iterator < t > iterator ( ) { return new decorating iterator < > ( null ) { final iterator < e > old type iterator = iterable iterator ( ) ; @ override public t compute next ( ) { if ( old type iterator has next ( ) ) { e candidate = old type iterator next ( ) ; return function apply ( candidate ) ; } else { return null ; } } } ; } } ; }


appends the string representation of each entry in { @ code entries } , using the previously configured separator and key - value separator , to { @ code builder } identical to { @ link # append to ( appendable , iterable ) } , except that it does not throw { @ link i o exception }

public string builder append to ( string builder builder , iterator < ? extends entry < ? , ? > > entries ) { try { append to ( ( appendable ) builder , entries ) ; } catch ( i o exception impossible ) { throw new assertion error ( impossible ) ; } return builder ; }


creates a new big - endian java heap buffer with the specified { @ code capacity } , which expands its capacity boundlessly on demand the new buffer ' s { @ code reader index } and { @ code writer index } are { @ code 0 }

public static byte buf buffer ( int initial capacity ) { return alloc heap buffer ( initial capacity ) ; }


read and publish data one at a time until there is no more data , no more demand , or perhaps we completed in the mean time

private boolean read and publish ( ) throws i o exception { long r ; while ( ( r = this demand ) > 0 & & ! this state get ( ) equals ( state completed ) ) { t data = read ( ) ; if ( data ! = null ) { if ( r ! = long max value ) { demand field updater add and get ( this , - 1l ) ; } subscriber < ? super t > subscriber = this subscriber ; assert state ( subscriber ! = null , " no subscriber " ) ; if ( rs read logger is trace enabled ( ) ) { rs read logger trace ( get log prefix ( ) + " publishing data read " ) ; } subscriber on next ( data ) ; } else { if ( rs read logger is trace enabled ( ) ) { rs read logger trace ( get log prefix ( ) + " no more data to read " ) ; } return true ; } } return false ; }


returns the set of { @ link constraint setting info settings } where this { @ link constraint collection } and { @ code other } have different { @ link constraint value info values }

public immutable set < constraint setting info > diff ( constraint collection other ) { immutable set < constraint setting info > constraints to check = new immutable set builder < constraint setting info > ( ) add all ( this constraint settings ( ) ) add all ( other constraint settings ( ) ) build ( ) ; immutable set builder < constraint setting info > mismatch settings = new immutable set builder < > ( ) ; for ( constraint setting info constraint setting : constraints to check ) { constraint value info this constraint = this get ( constraint setting ) ; constraint value info other constraint = other get ( constraint setting ) ; if ( this constraint ! = null & & ! this constraint equals ( other constraint ) ) { mismatch settings add ( constraint setting ) ; } } return mismatch settings build ( ) ; }


returns a descending view of this multiset modifications made to either map will be reflected in the other

sorted multiset < e > descending multiset ( ) ;


adds a variable with value to the context or overrides an already existing one if the variable is already set and immutable an illegal state exception is thrown

public variable context put ( string name , string value ) { if ( variables contains key ( name ) & & is immutable ( name ) ) { throw new illegal state exception ( " variable ' " + name + " ' is immutable , cannot update it ' s value ! " ) ; } variables put ( name , value ) ; return this ; }


find a cache seconds value for the given parsed { @ link path container path } this is used when the { @ code handler mapping } uses parsed { @ code path patterns }

protected integer lookup cache seconds ( path container path ) { for ( map entry < path pattern , integer > entry : this cache mappings entry set ( ) ) { if ( entry get key ( ) matches ( path ) ) { return entry get value ( ) ; } } return null ; }


compares two volumes and decides if it is the same volume

public boolean equals ( object o ) { if ( this = = o ) { return true ; } if ( o = = null | | get class ( ) ! = o get class ( ) ) { return false ; } disk balancer volume that = ( disk balancer volume ) o ; return uuid equals ( that uuid ) ; }


returns the appropriate < code > class visitor < code >

private class visitor class file visitor ( clazz clazz ) { return class pool get class ( clazz get name ( ) ) ! = null ? present class visitor : missing class visitor ; }


returns an exception if a datafeed with the same id is defined in the cluster state or the job is in the cluster state and already has a datafeed

private elasticsearch exception check configs are not defined in cluster state ( string datafeed id , string job id ) { cluster state cluster state = cluster service state ( ) ; ml metadata ml metadata = ml metadata get ml metadata ( cluster state ) ; if ( ml metadata get datafeed ( datafeed id ) ! = null ) { return exceptions helper datafeed already exists ( datafeed id ) ; } if ( ml metadata get datafeed by job id ( job id ) is present ( ) ) { return exceptions helper conflict status exception ( " cannot create datafeed [ " + datafeed id + " ] as a " + " job [ " + job id + " ] defined in the cluster state references a datafeed with the same id " ) ; } return null ; }


similar to { @ code org apache maven artifact artifact utils is snapshot }

static boolean is snapshot ( @ non null string version ) { return version contains ( " - snapshot " ) | | version matches ( " + - [ 0 - 9 ] { 8 } [ 0 - 9 ] { 6 } - [ 0 - 9 ] + " ) ; }


public void add ( http method http method , route impl route ) { add ( http method , route get path ( ) , route get accept type ( ) , route ) ; }


this method is only used by { @ link # split ( int ) } when splitting a large batch to smaller ones

private boolean try append for split ( long timestamp , byte buffer key , byte buffer value , header [ ] headers , thunk thunk ) { if ( ! records builder has room for ( timestamp , key , value , headers ) ) { return false ; } else { / / no need to get the crc this records builder append ( timestamp , key , value , headers ) ; this max record size = math max ( this max record size , abstract records estimate size in bytes upper bound ( magic ( ) , records builder compression type ( ) , key , value , headers ) ) ; future record metadata future = new future record metadata ( this produce future , this record count , timestamp , thunk future checksum or null ( ) , key = = null ? - 1 : key remaining ( ) , value = = null ? - 1 : value remaining ( ) , time system ) ; / / chain the future to the original thunk thunk future chain ( future ) ; this thunks add ( thunk ) ; this record count + + ; return true ; } }


returns the number of pre - pattern hits when only pre - patterns are being evaluated

public int get num pre pattern hit ( ) { return pre pattern hit ; }


a list of decommissioned component instances

public component decommissioned instances ( list < string > decommissioned instances ) { this decommissioned instances = decommissioned instances ; return this ; }


retrieve the current locale from the given request , using the locale resolver bound to the request by the dispatcher servlet ( if available ) , falling back to the request ' s accept - header locale this method serves as a straightforward alternative to the standard servlet { @ link javax servlet http http servlet request # get locale ( ) } method , falling back to the latter if no more specific locale has been found consider using { @ link org springframework context i 1 8n locale context holder # get locale ( ) } which will normally be populated with the same locale

public static locale get locale ( http servlet request request ) { locale resolver locale resolver = get locale resolver ( request ) ; return ( locale resolver ! = null ? locale resolver resolve locale ( request ) : request get locale ( ) ) ; }


called for all actions in the visitation hook for subclasses

protected void visit action ( action analysis metadata action ) throws interrupted exception { }


deselect all options that display text matching the argument that is , when given " bar " this would deselect an option like : & lt ; option value = " foo " & gt ; bar & lt ; option & gt ;

void deselect by visible text ( string text ) ;


public v put ( r row key , c column key , @ nullable v value ) { check not null ( row key ) ; check not null ( column key ) ; integer row index = row key to index get ( row key ) ; check argument ( row index ! = null , " row % s not in % s " , row key , row list ) ; integer column index = column key to index get ( column key ) ; check argument ( column index ! = null , " column % s not in % s " , column key , column list ) ; return set ( row index , column index , value ) ; } / * * todo ( jlevy ) : consider creating a merge ( ) method , similar to put all ( ) but * copying non - null values only * /


public string get phone number ( ) { return phone number ; }


output directory structure to a file , each line of the file contains the directory name only empty directory names are printed

private void output ( file out file ) throws file not found exception { system out println ( " printing to " + out file to string ( ) ) ; print stream out = new print stream ( out file ) ; root output ( out , null ) ; out close ( ) ; }


adds a file with the specified name to the combined zip file

public void add file ( string filename , input stream in ) throws i o exception { add file ( filename , null , in ) ; }


checks whether the given annotation type is a recognized qualifier type

protected boolean is qualifier ( class < ? extends annotation > annotation type ) { for ( class < ? extends annotation > qualifier type : this qualifier types ) { if ( annotation type equals ( qualifier type ) | | annotation type is annotation present ( qualifier type ) ) { return true ; } } return false ; }


assign a tag to this request tags are an easy way to logically associate related requests that can be managed together e g paused , resumed , or canceled you can either use simple { @ link string } tags or objects that naturally define the scope of your requests within your app such as a { @ link android content context } , an { @ link android app activity } , or a { @ link android app fragment } warning : : picasso will keep a reference to the tag for as long as this tag is paused andor has active requests look out for potential leaks

public request creator tag ( @ non null object tag ) { data tag ( tag ) ; return this ; }


set the clock to use for scheduling purposes the default clock is the system clock for the default time zone

public void set clock ( clock clock ) { this clock = clock ; }


in the following test , we add a write request followed by several read requests of the same session , and we verify several things - 1 the write is not processed until commit arrives 2 once the write is processed , all the read requests are processed as well 3 all read requests are executed after the write , before any other write , along with new reads

public void process all following uncommitted after first commit test ( ) throws exception { final string path = " / test uncommitted following commited " ; set < request > should be in pending = new hash set < request > ( ) ; set < request > should be processed after pending = new hash set < request > ( ) ; request write req = new request ( new create request ( path , new byte [ 0 ] , ids open acl unsafe , create mode persistent sequential to flag ( ) ) , op code create , 0x 1 , 1 ) ; processor queued requests add ( write req ) ; processor queued write requests add ( write req ) ; should be in pending add ( write req ) ; for ( int read req id = 2 ; read req id < = 5 ; + + read req id ) { request read req = new request ( new get data request ( path , false ) , op code get data , 0x 1 , read req id ) ; processor queued requests add ( read req ) ; should be in pending add ( read req ) ; should be processed after pending add ( read req ) ; } processor init threads ( default size of thread pool ) ; processor stopped main loop = true ; processor run ( ) ; assert true ( processed requests is empty ( ) , " processed without waiting for commit " ) ; assert true ( processor queued requests is empty ( ) , " did not handled all of queued requests ' requests " ) ; assert true ( ! processor queued write requests is empty ( ) , " removed from blocked queued requests before commit " ) ; should be in pending remove all ( processor pending requests get ( write req session id ) ) ; for ( request r : should be in pending ) { log error ( " should be in pending { } " , r ) ; } assert true ( should be in pending is empty ( ) , " not all requests moved to pending from queued requests " ) ; processor committed requests add ( write req ) ; processor stopped main loop = true ; processor run ( ) ; processor init threads ( default size of thread pool ) ; thread sleep ( 500 ) ; assert true ( processed requests peek ( ) = = write req , " did not process committed request " ) ; assert true ( processed requests contains all ( should be processed after pending ) , " did not process following read request " ) ; assert true ( processor committed requests is empty ( ) , " did not process committed request " ) ; assert true ( processor pending requests is empty ( ) , " did not process committed request " ) ; assert true ( processor queued write requests is empty ( ) , " did not remove from blocked queued requests " ) ; }


returns the array in which the data is held this method should be used for recycling the holder only , and not for reading the data

public byte [ ] get data holder ( ) { return data ; }


replaces all non - word characters in a string by a given character the only characters not replaced are the characters that qualify as word characters or digit characters with respect to { @ link character # is letter ( char ) } or { @ link character # is digit ( char ) } , as well as the underscore character this operation is intended to simplify strings for counting distinct words

public static void replace non word chars ( string value string , char replacement ) { final char [ ] chars = string get char array ( ) ; final int len = string length ( ) ; for ( int i = 0 ; i < len ; i + + ) { final char c = chars [ i ] ; if ( ! ( character is letter ( c ) | | character is digit ( c ) | | c = = ' ' ) ) { chars [ i ] = replacement ; } } }


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

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


get the warning and the number of occurrences for each of the warnings for the time cutoffs provided note that the counts provided by this function may differ from the ones provided by get warning counts since the message store is purged at regular intervals to prevent it from growing without bounds , while the store for the counts is purged less frequently

public list < map < string , element > > get warning messages and counts ( list < long > cutoffs ) { return this get elements and counts ( warnings , cutoffs , warnings purge information ) ; }


get the page size to use with a specific address space the page containers ( memory bank ) assume page size is always power of 2 any address space is assigned at least 8 - bits of addressable locations , so at the very least , the size is divisible by 256 starting with this minimum , this method finds the power of 2 that is closest to the preferred page size ( page size ) but that still divides the size of the space

private int get valid page size ( address space space ) { int ps = 256 ; / / minimum page size supported long space size = space get max address ( ) get offset ( ) + 1 ; / / number of bytes in the space ( 0 if 2 ^ 64 bytes ) if ( ( space size & 0xff ) ! = 0 ) { msg warn ( this , " emulator using page size of 256 bytes for " + space get name ( ) + " which is not a multiple of 256 " ) ; return ps ; } space size > > > = 8 ; / / divide required size by 256 ( evenly ) while ( ps < page size ) { / / if current page size is smaller than preferred page size if ( ( space size & 1 ) ! = 0 ) { break ; / / a bigger page size does not divide the space size evenly , so use current size } ps < < = 1 ; / / bump up current page size to next power of 2 space size > > > = 1 ; / / divide ( evenly ) by 2 } return ps ; }


depending on the { @ link time characteristic } , this method will return the adequate { @ link org apache flink streaming api functions source source function source context } that is : { @ link time characteristic # ingestion time } = { @ code automatic watermark context } { @ link time characteristic # processing time } = { @ code non timestamp context } { @ link time characteristic # event time } = { @ code manual watermark context }

public static < out > source function source context < out > get source context ( time characteristic time characteristic , processing time service processing time service , object checkpoint lock , stream status maintainer stream status maintainer , output < stream record < out > > output , long watermark interval , long idle timeout ) { final source function source context < out > ctx ; switch ( time characteristic ) { case event time : ctx = new manual watermark context < > ( output , processing time service , checkpoint lock , stream status maintainer , idle timeout ) ; break ; case ingestion time : ctx = new automatic watermark context < > ( output , watermark interval , processing time service , checkpoint lock , stream status maintainer , idle timeout ) ; break ; case processing time : ctx = new non timestamp context < > ( checkpoint lock , output ) ; break ; default : throw new illegal argument exception ( string value of ( time characteristic ) ) ; } return ctx ; }


fully qualified hostname of a running container , e g ctr - e 3 7 5 1 - 1458061340047 - 0008 - 01 - 000002 examplestg site the ip address and hostname attribute values are dependent on the clusterdocker network setup as per yarn - 4007

public container hostname ( string hostname ) { this hostname = hostname ; return this ; }


public static void verify histogram ( string name , list < label > labels , list < double > buckets , list < long > bucket values , meter data builder validate ) { assert assert not null ( validate ) ; assert assert equals ( validate get metric case ( ) get number ( ) , meter data histogram field number ) ; meter histogram histogram = validate get histogram ( ) ; assert assert not null ( histogram ) ; assert assert equals ( histogram get name ( ) , name ) ; assert assert equals ( histogram get labels list ( ) , labels ) ; assert assert not null ( histogram get values list ( ) ) ; assert assert equals ( histogram get values count ( ) , bucket values size ( ) ) ; for ( int i = 0 ; i < bucket values size ( ) ; i + + ) { assert assert not null ( histogram get values ( i ) ) ; assert assert equals ( histogram get values ( i ) get bucket ( ) , buckets get ( i ) double value ( ) , 0 0 ) ; assert assert equals ( histogram get values ( i ) get count ( ) , bucket values get ( i ) long value ( ) ) ; } }


returns the currently in - flight delete operations

public long get delete current ( ) { return delete current ; }


public cancellable get buckets async ( get buckets request request , request options options , action listener < get buckets response > listener ) { return rest high level client perform request async and parse entity ( request , m l request converters : : get buckets , options , get buckets response : : from x content , listener , collections empty set ( ) ) ; }


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

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


returns true if { @ code o } is another { @ code type token } that represents the same { @ link type }

public boolean equals ( @ nullable decl object o ) { if ( o instanceof type token ) { type token < ? > that = ( type token < ? > ) o ; return runtime type equals ( that runtime type ) ; } return false ; }


returns an existing configured target value , or { @ code null } if there is not an appropriate configured target value key in the graph this helper is provided so legacy tests don ' t need to know about details of skyframe keys

public static configured target value get existing configured target value ( skyframe executor skyframe executor , label label , build configuration config ) throws interrupted exception { sky key key = configured target key builder ( ) set label ( label ) set configuration ( config ) build ( ) ; return ( configured target value ) get existing value ( skyframe executor , key ) ; }


sets the search direction the default search direction is always forward

public void set direction forward ( boolean go forward ) { direction forward = go forward ; }


returns the name of a cascading sub - menu name to use when when showing this provider in the " window " menu if the group name is null , the item will appear in the top - level menu

public string get window sub menu name ( ) { return window menu group ; }


private void test kill job ( configuration conf ) throws exception { job job = run job in back ground ( conf ) ; string job id = job get job i d ( ) to string ( ) ; cli jc = create job client ( ) ; byte array output stream out = new byte array output stream ( ) ; / / without job id int exit code = run tool ( conf , jc , new string [ ] { " - kill " } , out ) ; assert equals ( " exit code " , - 1 , exit code ) ; / / good parameters exit code = run tool ( conf , jc , new string [ ] { " - kill " , job id } , out ) ; assert equals ( " exit code " , 0 , exit code ) ; string answer = new string ( out to byte array ( ) , " utf - 8 " ) ; assert true ( answer contains ( " killed job " + job id ) ) ; }


gets called when the user clicks on the cancel action for the dialog

protected void cancel callback ( ) { set status text ( " " ) ; close ( ) ; }


get an index range iterator for a specified value

public index range iterator get value range iterator ( long value ) { synchronized ( db handle ) { try { return new range iterator ( value ) ; } catch ( i o exception e ) { err handler db error ( e ) ; } return null ; } }


public int get value ( ) { return this value ; }


fix issue # 171 : java lang assertion error : register too many broadcast receivers at android app loaded apk check recevier registered leak locked ( loaded apk java : 772 ) at android app loaded apk get receiver dispatcher ( loaded apk java : 800 ) at android app context impl register receiver internal ( context impl java : 1329 ) at android app context impl register receiver ( context impl java : 1309 ) at com lody virtual server am broadcast system start app ( broadcast system java : 54 ) at com lody virtual server pm v app manager service install ( v app manager service java : 193 ) at com lody virtual server pm v app manager service preload all apps ( v app manager service java : 98 ) at com lody virtual server pm v app manager service system ready ( v app manager service java : 70 ) at com lody virtual server binder provider on create ( binder provider java : 42 )

private void fuck hua wei verifier ( ) { if ( loaded apk hua wei m receiver resource ! = null ) { object package info = context impl m package info get ( m context ) ; if ( package info ! = null ) { object receiver resource = loaded apk hua wei m receiver resource get ( package info ) ; if ( receiver resource ! = null ) { if ( build version sdk int > = 26 ) { map < integer , list < string > > white list map = reflect on ( receiver resource ) get ( " m white list map " ) ; list < string > white list = white list map get ( 0 ) ; if ( white list = = null ) { white list = new array list < > ( ) ; white list map put ( 0 , white list ) ; } white list add ( m context get package name ( ) ) ; } else if ( build version sdk int > = build version codes n ) { if ( receiver resource n m white list ! = null ) { list < string > white list = receiver resource n m white list get ( receiver resource ) ; list < string > new white list = new array list < > ( ) ; / / add our package name to the white list new white list add ( m context get package name ( ) ) ; if ( white list ! = null ) { new white list add all ( white list ) ; } receiver resource n m white list set ( receiver resource , new white list ) ; } } else { if ( receiver resource m m white list ! = null ) { string [ ] white list = receiver resource m m white list get ( receiver resource ) ; list < string > new white list = new linked list < > ( ) ; collections add all ( new white list , white list ) ; / / add our package name to the white list new white list add ( m context get package name ( ) ) ; receiver resource m m white list set ( receiver resource , new white list to array ( new string [ new white list size ( ) ] ) ) ; } else if ( receiver resource l p m resource config ! = null ) { / / just clear the resource config receiver resource l p m resource config set ( receiver resource , null ) ; } } } } } }


sets the number of entries actually in the zip file if the value is larger than 0xffff , the file is set to zip 6 4 mode

private void set num entries ( long num entries ) { this num entries = num entries ; if ( num entries > 0xffff ) { set zip 6 4 ( true ) ; } }


the { @ link static web application context } class does not support this method

public void set config location ( string config location ) { throw new unsupported operation exception ( " static web application context does not support config locations " ) ; }


transaction mode get transaction mode ( ) { return this transaction mode ; }


public void builder defaults ( ) throws exception { / / transitive sources is mandatory , so create a dummy value but no need to assert on it nested set < artifact > sources = nested set builder create ( order compile order , dummy artifact ) ; struct impl info = py struct utils builder ( ) set transitive sources ( sources ) build ( ) ; / / assert using struct operations , not py struct utils accessors , which aren ' t necessarily trusted / / to be correct assert that ( ( boolean ) info get value ( py struct utils uses shared libraries ) ) is false ( ) ; assert has order and contains exactly ( ( ( depset ) info get value ( py struct utils imports ) ) get set ( string class ) , order compile order ) ; assert that ( ( boolean ) info get value ( py struct utils has py2 only sources ) ) is false ( ) ; assert that ( ( boolean ) info get value ( py struct utils has py3 only sources ) ) is false ( ) ; }


public static void remove ( @ non null final string key , final boolean is commit ) { remove ( key , is commit , get default s p utils ( ) ) ; }


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

dead letter job query order by job id ( ) ;


public void register all ( metric set metrics ) throws illegal argument exception { register all ( null , metrics ) ; }