called before reading a range from the file to ensure that this range is present unlike { @ link sparse file tracker # wait for range ( tuple , tuple , action listener ) } this method does not expect the caller to fill in any gaps

public boolean wait for range if pending ( final tuple < long , long > range , final action listener < void > listener ) { final long start = range v 1 ( ) ; final long end = range v 2 ( ) ; if ( end < start | | start < 0l | | length < end ) { throw new illegal argument exception ( " invalid range [ start = " + start + " , end = " + end + " , length = " + length + " ] " ) ; } final action listener < void > wrapped listener = wrap with assertions ( listener ) ; final list < range > pending ranges = new array list < > ( ) ; synchronized ( mutex ) { assert invariant ( ) ; final range target range = new range ( start , end , null ) ; final sorted set < range > earlier ranges = ranges head set ( target range , false ) ; / / ranges with strictly earlier starts if ( earlier ranges is empty ( ) = = false ) { final range last earlier range = earlier ranges last ( ) ; if ( start < last earlier range end ) { if ( last earlier range is pending ( ) ) { pending ranges add ( last earlier range ) ; } target range start = math min ( end , last earlier range end ) ; } } while ( target range start < end ) { assert 0 < = target range start : target range ; assert invariant ( ) ; final sorted set < range > existing ranges = ranges tail set ( target range ) ; if ( existing ranges is empty ( ) ) { return false ; } else { final range first existing range = existing ranges first ( ) ; assert target range start < = first existing range start : target range + " vs " + first existing range ; if ( target range start = = first existing range start ) { if ( first existing range is pending ( ) ) { pending ranges add ( first existing range ) ; } target range start = math min ( end , first existing range end ) ; } else { return false ; } } } assert target range start = = target range end : target range ; assert target range start = = end : target range ; assert invariant ( ) ; } / / nb we work with ranges outside the mutex here , but only to interact with their completion listeners which are ` final ` so / / there is no risk of concurrent modification switch ( pending ranges size ( ) ) { case 0 : wrapped listener on response ( null ) ; break ; case 1 : final range pending range = pending ranges get ( 0 ) ; pending range completion listener add listener ( wrapped listener map ( progress - > null ) , math min ( pending range completion listener end , end ) ) ; return true ; default : final grouped action listener < long > grouped action listener = new grouped action listener < > ( wrapped listener map ( progress - > null ) , pending ranges size ( ) ) ; pending ranges for each ( r - > r completion listener add listener ( grouped action listener , math min ( r completion listener end , end ) ) ) ; return true ; } return true ; }


public abstract internal aggregation [ ] build aggregations ( long [ ] ords to collect ) throws i o exception ;


returns a { @ link doc value bits } representing all documents from < code > doc values < code > that have a value

public static doc value bits docs with value ( final sorted set doc values doc values ) { return new doc value bits ( ) { @ override public boolean advance exact ( int doc ) throws i o exception { return doc values advance exact ( doc ) ; } } ; }


sets the { @ link load control } that will be used by the player

public builder set load control ( load control load control ) { assertions check state ( ! build called ) ; this load control = load control ; return this ; }


convert the received jdom element to an element

private static element to dom ( final org jdom 2 element element ) { return objects require non null ( to dom ( element get document ( ) ) ) get document element ( ) ; }


returns an immutable set of the valid row keys , including those that are associated with null values only

public immutable set < r > row key set ( ) { return row key to index key set ( ) ; }


process any dynamic name conflict and determine if there is any direct name conflict note : this method eliminates any conflict between a defined function name and a dynamic , fun , function name

private boolean has unresolved function name conflict ( function [ ] functions , task monitor monitor ) { string original name = ( functions [ original ] ! = null ) ? functions [ original ] get name ( ) : " " ; string latest name = ( functions [ latest ] ! = null ) ? functions [ latest ] get name ( ) : " " ; string my name = ( functions [ my ] ! = null ) ? functions [ my ] get name ( ) : " " ; boolean original is default = is default name ( functions [ original ] ) ; boolean latest is default = is default name ( functions [ latest ] ) ; boolean my is default = is default name ( functions [ my ] ) ; boolean latest and my are same = latest name equals ( my name ) | | ( latest is default & & my is default ) ; boolean original and latest are same = original name equals ( latest name ) | | ( original is default & & latest is default ) ; boolean original and my are same = original name equals ( my name ) | | ( original is default & & my is default ) ; if ( latest and my are same ) { return false ; / / latest & my are same result is already latest so leave alone } if ( original and my are same ) { return false ; / / want latest result is already latest so leave alone } if ( original and latest are same ) { / / want my address my entry point = functions [ my ] get entry point ( ) ; merge function detail ( func name , my entry point , get merge my ( ) , monitor ) ; return false ; } / / otherwise both changed the name if latest or my is a default then keep the other name if ( latest is default ) { / / keep my address my entry point = functions [ my ] get entry point ( ) ; merge function detail ( func name , my entry point , get merge my ( ) , monitor ) ; return false ; } if ( my is default ) { / / keep latest return false ; } return true ; / / latest & my aren ' t defaults and were changed , so they conflict }


returns { @ code buffer } or a copy of it , such that there is enough space in the returned buffer to store { @ code new frame count } additional frames

private short [ ] ensure space for additional frames ( short [ ] buffer , int frame count , int additional frame count ) { int current capacity frames = buffer length / channel count ; if ( frame count + additional frame count < = current capacity frames ) { return buffer ; } else { int new capacity frames = 3 * current capacity frames / 2 + additional frame count ; return arrays copy of ( buffer , new capacity frames * channel count ) ; } }


gets the type to assign to a token created by the lexer

public int get type ( ) { return type ; }


determine the default encoding to use for marshalling or unmarshalling from a byte stream , or { @ code null } if none the default implementation returns { @ code null }

protected string get default encoding ( ) { return null ; } / / marshalling


creates a new { @ link top level item } for the specified parent

public abstract top level item new instance ( item group parent , string name ) ;


get a collection of the replicas for given block pool this method is < b > not synchronized < b > it needs to be synchronized externally using the lock , both for getting the replicas values from the map and iterating over it mutex can be accessed using { @ link # get lock ( ) } method

collection < replica info > replicas ( string bpid ) { return map get ( bpid ) ; }


returns a new { @ code cache stats } representing the sum of this { @ code cache stats } and { @ code other } < b > note : < b > the values of the metrics are undefined in case of overflow ( though it is guaranteed not to throw an exception ) if you require specific handling , we recommend implementing your own stats collector

public cache stats plus ( cache stats other ) { return new cache stats ( saturated add ( hit count , other hit count ) , saturated add ( miss count , other miss count ) , saturated add ( load success count , other load success count ) , saturated add ( load exception count , other load exception count ) , saturated add ( total load time , other total load time ) , saturated add ( eviction count , other eviction count ) ) ; }


public netty pool key set transaction role ( transaction role transaction role ) { this transaction role = transaction role ; return this ; }


returns the upper case tabs of this m t config object

public boolean is upper case tabs ( ) { return upper case tabs ; }


returns true if the argument position corresponds to a footer

public boolean is section footer position ( int position ) { if ( is footer = = null ) { setup indices ( ) ; } return is footer [ position ] ; }


finds the start of the first statement boundary that is on or before { @ code offset } if one is not found , { @ code - 1 } is returned

default int get previous statement ( int offset ) { return get statements ( ) previous set bit ( offset ) ; }


like j unit ' s assert assert equals , but handles " regexp : " strings like html selenese

public static void assert equals ( string s 1 , string s 2 ) { selenese test base assert equals ( s 1 , s 2 ) ; }


removes metadata this method may be slow and shouldn ' t normally be called on the main thread

public void remove all ( set < string > names ) throws database i o exception { assertions check not null ( table name ) ; try { s q lite database writable database = database provider get writable database ( ) ; writable database begin transaction non exclusive ( ) ; try { for ( string name : names ) { writable database delete ( table name , where name equals , new string [ ] { name } ) ; } writable database set transaction successful ( ) ; } finally { writable database end transaction ( ) ; } } catch ( s q l exception e ) { throw new database i o exception ( e ) ; } }


create a raw content print style , which only print the result content as raw form column delimiter is " , " , row delimiter is " \ n "

static print style raw content ( ) { return new raw content style ( ) ; }


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


allows you to modify or clear a bitmap that was loaded for an image either automatically through { @ link # set images assets folder ( string ) } or with an { @ link image asset delegate }

public bitmap update bitmap ( string id , @ nullable bitmap bitmap ) { image asset manager bm = get image asset manager ( ) ; if ( bm = = null ) { logger warning ( " cannot update bitmap most likely the drawable is not added to a view " + " which prevents lottie from getting a context " ) ; return null ; } bitmap ret = bm update bitmap ( id , bitmap ) ; invalidate self ( ) ; return ret ; }


returns the { @ link executor } that will be used to run this service subclasses may override this method to use a custom { @ link executor } , which may configure its worker thread with a specific name , thread group or priority the returned executor ' s { @ link executor # execute ( runnable ) execute ( ) } method is called when this service is started , and should return promptly the default implementation returns a new { @ link executor } that sets the name of its threads to the string returned by { @ link # service name }

protected executor executor ( ) { return new executor ( ) { @ override public void execute ( runnable command ) { more executors new thread ( service name ( ) , command ) start ( ) ; } } ; }


wrap a { @ link callable } so that it executes with this context as the { @ link # current } context

public < c > callable < c > wrap ( final callable < c > c ) { return new callable < c > ( ) { @ override public c call ( ) throws exception { context previous = attach ( ) ; try { return c call ( ) ; } finally { detach ( previous ) ; } } } ; }


installs default converters for primitives , enums , and class literals

public void prepare built in converters ( injector impl injector ) { this injector = injector ; try { / / configure type converters convert to primitive type ( int class , integer class ) ; convert to primitive type ( long class , long class ) ; convert to primitive type ( boolean class , boolean class ) ; convert to primitive type ( byte class , byte class ) ; convert to primitive type ( short class , short class ) ; convert to primitive type ( float class , float class ) ; convert to primitive type ( double class , double class ) ; convert to class ( character class , new type converter ( ) { @ override public object convert ( string value , type literal < ? > to type ) { value = value trim ( ) ; if ( value length ( ) ! = 1 ) { throw new runtime exception ( " length ! = 1 " ) ; } return value char at ( 0 ) ; } @ override public string to string ( ) { return " type converter < character > " ; } } ) ; convert to classes ( matchers subclasses of ( enum class ) , new type converter ( ) { @ override @ suppress warnings ( " unchecked " ) public object convert ( string value , type literal < ? > to type ) { return enum value of ( ( class ) to type get raw type ( ) , value ) ; } @ override public string to string ( ) { return " type converter < e extends enum < e > > " ; } } ) ; internal convert to types ( new abstract matcher < type literal < ? > > ( ) { @ override public boolean matches ( type literal < ? > type literal ) { return type literal get raw type ( ) = = class class ; } @ override public string to string ( ) { return " class < ? > " ; } } , new type converter ( ) { @ override public object convert ( string value , type literal < ? > to type ) { try { return class for name ( value ) ; } catch ( class not found exception e ) { throw new runtime exception ( e ) ; } } @ override public string to string ( ) { return " type converter < class < ? > > " ; } } ) ; } finally { this injector = null ; } }


public boolean get bool item ( ) { return bool item ; }


public int action start ( string app name ) throws i o exception , yarn exception { int result = exit success ; try { service service = new service ( ) ; service set name ( app name ) ; service set state ( service state started ) ; string buffer = json ser deser to json ( service ) ; client response response = get api client ( get service path ( app name ) ) put ( client response class , buffer ) ; result = process response ( response ) ; } catch ( exception e ) { log error ( " fail to start application : " , e ) ; result = exit exception thrown ; } return result ; }


public boolean is router state ( router service state router state ) { return router state equals ( this state ) ; }


gets an unsigned 32 - bit integer at the current { @ code reader index } and increases the { @ code reader index } by { @ code 4 } in this buffer

public abstract long read unsigned int ( ) ;


public void save ( t instance , file file ) throws i o exception { write json as bytes ( instance , new file output stream ( file get absolute file ( ) ) ) ; }


{ @ inherit doc } the default implementation returns the result of calling { @ link # visit children } on { @ code ctx }

@ override public t visit string query ( sql base parser string query context ctx ) { return visit children ( ctx ) ; }


public boolean is category 2 ( ) { return false ; }


get a plugin bundle using the supplied locale and class loader

private static @ check for null resource bundle get bundle ( @ non null string base name , @ non null locale locale , @ non null class loader class loader ) { try { return resource bundle get bundle ( base name , locale , class loader ) ; } catch ( missing resource exception e ) { / / fall through and return null logger finer ( e get message ( ) ) ; } return null ; }


sets this vector to the cross product between it and the other vector

public vector 3 crs ( final vector 3 vector ) { return this set ( y * vector z - z * vector y , z * vector x - x * vector z , x * vector y - y * vector x ) ; }


returns the canonical file path for this file

public string get canonical path ( ) throws i o exception { return resource get canonical path ( ) ; }


returns the value of the attribute of the processing instruction for example , < code > & lt ; ? program dtd version = " 1 " ? & gt ; < code >

public string get processing instruction ( string pi name , string attribute ) { has next ( ) ; / / make sure we have read up to the first element map < string , string > map = processing instructions get ( pi name to upper case ( ) ) ; if ( map = = null ) { return null ; } return map get ( attribute to upper case ( ) ) ; }


returns an { @ link index range iterator } over all ranges that have associated objects

public index range iterator get index range iterator ( ) { return new simple index range iterator ( ) ; }


adds { @ code elem } as a candidate for the top { @ code k } elements this operation takes amortized o ( 1 ) time

public void offer ( @ nullable decl t elem ) { if ( k = = 0 ) { return ; } else if ( buffer size = = 0 ) { buffer [ 0 ] = elem ; threshold = elem ; buffer size = 1 ; } else if ( buffer size < k ) { buffer [ buffer size + + ] = elem ; if ( comparator compare ( elem , threshold ) > 0 ) { threshold = elem ; } } else if ( comparator compare ( elem , threshold ) < 0 ) { / / otherwise , we can ignore elem ; we ' ve seen k better elements buffer [ buffer size + + ] = elem ; if ( buffer size = = 2 * k ) { trim ( ) ; } } }


public deserialization schema < row > get deserialization schema ( ) { return deserialization schema ; }


process the result of the asynchronous call on success , rc is { @ link keeper exception code # ok } on failure , rc is set to the corresponding failure code in { @ link keeper exception } { @ link keeper exception code # nonode } - the node on given path doesn ' t exist for some api calls

void process result ( int rc , string path , object ctx , list < acl > acl , stat stat ) ;


public delete user oper resp spec ( consumer < response spec builder > resp spec customizer ) { resp spec customizer accept ( resp spec ) ; return this ; }


return the name of the request context attribute for all views , if any

protected string get request context attribute ( ) { return this request context attribute ; }


copy vertices this assumes the vertices define a convex polygon it is assumed that the exterior is the the right of each edge

public void set ( vector 2 [ ] vertices ) { vec 2 [ ] v = new org jbox 2d common vec 2 [ vertices length ] ; for ( int i = 0 ; i < v length ; i + + ) { v [ i ] = new vec 2 ( vertices [ i ] x , vertices [ i ] y ) ; } shape set ( v , v length ) ; }


returns true if the class or interface represented by the supplied class is a member class

static public boolean is member class ( class c ) { return reflection cache get type ( c ) is member class ( ) ; }


the partition from which this record is received

public int partition ( ) { return this partition ; }


generate the hash smash for a superior idinferior full hash

public static long generate superior full hash smash ( function record superior function , function record inferior function ) { long hash value = superior function get key ( ) * f n v 1a 6 4 message digest fnv 64 prime ; / / improve bit diversity on key return hash value ^ inferior function get full hash ( ) ; }


returns the next available http response a call to this method blocks until a response becomes available

public simple http response get next response ( ) throws interrupted exception { return responses take ( ) ; }


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


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


public string get name ( ) { return field get name ( ) ; }


converts this descriptor into a set of catalog properties

protected abstract map < string , string > to catalog properties ( ) ;


get the { @ link class loader } for this job

public class loader get class loader ( ) { return class loader ; }


process a manifest for a library or a binary and return the merged android data

public merged android data process manifest ( variant type variant type , string custom package for r , string application id , int version code , string version name , merged android data primary data , path processed manifest , boolean log warnings ) { manifest merger 2 merge type merge type = variant type = = variant type default ? manifest merger 2 merge type application : manifest merger 2 merge type library ; string new manifest package = variant type = = variant type default ? application id : custom package for r ; if ( version code ! = - 1 | | version name ! = null | | new manifest package ! = null ) { process manifest ( version code , version name , primary data get manifest ( ) , processed manifest , merge type , new manifest package , log warnings ) ; return new merged android data ( primary data get resource dir ( ) , primary data get asset dir ( ) , processed manifest ) ; } return primary data ; }


a shortcut for { @ link # set wait for active shards ( active shard count ) } where the numerical shard count is passed in , instead of having to first call { @ link active shard count # from ( int ) } to get the active shard count

public create index request builder set wait for active shards ( final int wait for active shards ) { return set wait for active shards ( active shard count from ( wait for active shards ) ) ; }


public string to human ( ) { return integer to string ( get int bits ( ) ) ; }


public void remove server socket ( internal instrumented < server stats > server , internal instrumented < socket stats > socket ) { server socket map sockets of server = per server sockets get ( id ( server ) ) ; assert sockets of server ! = null ; remove ( sockets of server , socket ) ; }


public final cancellable update by query async ( update by query request update by query request , request options options , action listener < bulk by scroll response > listener ) { return perform request async and parse entity ( update by query request , request converters : : update by query , options , bulk by scroll response : : from x content , listener , singleton ( 409 ) ) ; }


estimate the resources consumed when this action is run locally

public resource set estimate resource consumption local ( ) { / / it ' s ok if this behaves differently even if the key is identical resource set min link resources = get link command line ( ) get linking mode ( ) = = linking mode dynamic ? min dynamic link resources : min static link resources ; int input size = get link command line ( ) get linker input artifacts ( ) memoized flatten and get size ( ) ; return resource set create with ram cpu ( math max ( input size * link resources per input get memory mb ( ) , min link resources get memory mb ( ) ) , math max ( input size * link resources per input get cpu usage ( ) , min link resources get cpu usage ( ) ) ) ; }


defines that the value of the option should be of { @ link duration } type

public typed config option builder < duration > duration type ( ) { return new typed config option builder < > ( key , duration class ) ; }


called when the { @ link item touch helper } has completed the move or swipe , and the active item state should be cleared


returns true if any of the user source files had containers that were not recursed into because of the { @ link # max depth } limit

public boolean was recurse terminated early ( ) { for ( user added source info uasi : user added sources ) { if ( uasi was recurse terminated early ( ) ) { return true ; } } return false ; }


draws a pixel data sub - block , as defined by etsi en 300 743 7 2 5 1 , into a canvas

private static void paint pixel data sub blocks ( object data object data , clut definition clut definition , int region depth , int horizontal address , int vertical address , @ nullable paint paint , canvas canvas ) { int [ ] clut entries ; if ( region depth = = region depth 8 bit ) { clut entries = clut definition clut entries 8 bit ; } else if ( region depth = = region depth 4 bit ) { clut entries = clut definition clut entries 4 bit ; } else { clut entries = clut definition clut entries 2 bit ; } paint pixel data sub block ( object data top field data , clut entries , region depth , horizontal address , vertical address , paint , canvas ) ; paint pixel data sub block ( object data bottom field data , clut entries , region depth , horizontal address , vertical address + 1 , paint , canvas ) ; }


public void do get ( http servlet request request , http servlet response response ) throws i o exception { final map < string , string [ ] > pmap = request get parameter map ( ) ; final print writer out = response get writer ( ) ; final inet address remote address = inet address get by name ( request get remote addr ( ) ) ; final servlet context context = get servlet context ( ) ; final configuration conf = router http server get conf from context ( context ) ; final user group information ugi = get u g i ( request , conf ) ; try { ugi do as ( ( privileged exception action < object > ) ( ) - > { router router = router http server get router from context ( context ) ; new router fsck ( router , pmap , out , remote address ) fsck ( ) ; return null ; } ) ; } catch ( interrupted exception e ) { response send error ( http u r l connection http bad request , e get message ( ) ) ; } }


to test \ & quot ; client \ & quot ; model to test \ & quot ; client \ & quot ; model

public void test client model test ( ) { client client = null ; client response = api test client model ( client ) block ( ) ; / / todo : test validations }


any comments associated with the element < code > optional string comment = 2 ; < code >

public com google protobuf byte string get comment bytes ( ) { return instance get comment bytes ( ) ; }


public list < scrollable hit source search failure > get search failures ( ) { return search failures ; }


public string get triangle type ( ) { return triangle type ; }


sets one or more locations to find properties files associated with ghidra scripts typically , properties files should be located in the same directory as their corresponding scripts however , this method may need to be used when circumstances make it impossible to have both files in the same directory ( i e , if the scripts are included in ghidra jar )

public void set properties file directories ( list < string > new paths ) { properties file str paths = new paths ; }


public postcard set timeout ( int timeout ) { this timeout = timeout ; return this ; }


inject a fake ' received ' block into the b p service actor state

private void inject block received ( ) { received deleted block info rdbi = new received deleted block info ( get dummy block ( ) , block status received block , null ) ; datanode storage s = singleton dn get f s dataset ( ) get storage ( storage uuid ) ; actor get ibr manager ( ) notify namenode block ( rdbi , s , false ) ; }


get storeinventory : returns pet inventories by status returns a map of status codes to quantities

default mono < response entity < map < string , integer > > > get inventory ( @ api ignore final server web exchange exchange ) { return get delegate ( ) get inventory ( exchange ) ; }


public integer get integer ( ) { return integer ; }


thread run method invoke when the jvm shutdown 1 count the invocation times 2 execute the { @ link shutdown hook thread # callback } , and time it

public void run ( ) { synchronized ( this ) { log info ( " shutdown hook was invoked , " + this shutdown times increment and get ( ) + " times " ) ; if ( ! this has shutdown ) { this has shutdown = true ; long begin time = system current time millis ( ) ; try { this callback call ( ) ; } catch ( exception e ) { log error ( " shutdown hook callback invoked failure " , e ) ; } long consuming time total = system current time millis ( ) - begin time ; log info ( " shutdown hook done , consuming time total ( ms ) : " + consuming time total ) ; } } }


calculate a linearly weighted moving average , such that older values are linearly less important " time " is determined by position in collection only finite values are averaged na n or null are ignored if all values are missingnull na n , the return value will be na n the average is based on the count of non - null , non - na n values

public static double linear weighted avg ( double [ ] values ) { double avg = 0 ; long total weight = 1 ; long current = 1 ; for ( double v : values ) { if ( double is na n ( v ) = = false ) { avg + = v * current ; total weight + = current ; current + = 1 ; } } return total weight = = 1 ? double na n : avg / total weight ; }


get base backoff millis for the describe stream operation

public long get describe stream base backoff millis ( ) { return describe stream base backoff millis ; }


approximate height of geohash tile for a specific precision in degrees

public static double lat height in degrees ( int precision ) { return precision to lat height [ precision ] ; }


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


sends a dns query with the specified question

public future < addressed envelope < dns response , inet socket address > > query ( dns question question , promise < addressed envelope < ? extends dns response , inet socket address > > promise ) { return query ( next name server address ( ) , question , collections < dns record > empty list ( ) , promise ) ; }


creates a { @ link name resolver } for the given target uri , or { @ code null } if the given uri cannot be resolved by this factory the decision should be solely based on the scheme of the uri

public name resolver new name resolver ( uri target uri , final attributes params ) { args args = args new builder ( ) set default port ( params get ( params default port ) ) set proxy detector ( params get ( params proxy detector ) ) set synchronization context ( params get ( params sync context ) ) set service config parser ( params get ( params parser ) ) build ( ) ; return new name resolver ( target uri , args ) ; }


return the " human " string form of this instance this is generally less " debuggy " than { @ code to string ( ) }


private void scan base dex file ( ) throws i o exception { for ( file base dex file : base dex files ) { string s = base dex file get name ( ) substring ( 7 ) ; string dex num = s starts with ( " " ) ? " 0 " : s substring ( 0 , s index of ( " " ) ) ; dex backed dex file base backed dex file = dex file factory load dex file ( base dex file , opcodes get default ( ) ) ; final set < ? extends dex backed class def > base class defs = base backed dex file get classes ( ) ; base class defs for each ( new consumer < dex backed class def > ( ) { @ override public void accept ( dex backed class def dex backed class def ) { if ( dex backed class def get type ( ) equals ( " lcom / ali / mobisecenhance / reflect map ; " ) ) { no patch dex num = dex num ; } } } ) ; dex diff info set old classes ( dex num , base class defs ) ; for ( dex backed class def base class def : base class defs ) { string class name = get dalvik class name ( base class def get type ( ) ) ; base class def map put ( class name , base class def ) ; } } }


< code > repeated org apache dubbo common serialize protobuf model phone number phone = 8 ; < code >

public int get phone count ( ) { return phone size ( ) ; }


called when ever an s s l engine is not wrapped by a { @ link ssl handler } and inserted into a pipeline

protected void cleanup server ssl engine ( s s l engine engine ) { }


creates the same random sequence of indexes to be used to select strings by { @ link # create fixed random strings ( int ) }

public static int [ ] get fixed random indices ( int count , int max index ) { int [ ] indices = new int [ count ] ; random random = new random ( ) ; random set seed ( string generator seed ) ; for ( int i = 0 ; i < count ; i + + ) { indices [ i ] = random next int ( max index + 1 ) ; } return indices ; }


returns the executor on which this resolver should execute long - running or io bound work null if no executor was set

public executor get offload executor ( ) { return executor ; }


returns a timestamp to use in { @ link monitoring doc }

protected static long timestamp ( ) { return system current time millis ( ) ; }


creates a sequence of { @ link transition } s that will run one after another

public static < t extends transition > transition set sequence ( t transitions ) { return new sequence transition set ( transitions ) ; }


returns the x - position of the knob relative to the center of the widget the positive direction is right

public float get knob x ( ) { return knob position x ; }


invoked by spring to inject the servlet context

public void set servlet context ( servlet context servlet context ) { this servlet context = servlet context ; }


create a shallow copy of this builder with a new slice configuration

public search source builder shallow copy ( ) { return shallow copy ( query builder , post query builder , aggregations , slice builder , sorts , rescore builders , highlight builder ) ; }


returns a { @ code collector } accumulating entries into an { @ code immutable list multimap } each input element is mapped to a key and a stream of values , each of which are put into the resulting { @ code multimap } , in the encounter order of the stream and the encounter order of the streams of values example : { @ code static final immutable list multimap < character , character > first letter multimap = stream of ( " banana " , " apple " , " carrot " , " asparagus " , " cherry " ) collect ( flattening to immutable list multimap ( str - > str char at ( 0 ) , str - > str substring ( 1 ) chars ( ) map to obj ( c - > ( char ) c ) ) ; is equivalent to static final immutable list multimap < character , character > first letter multimap = immutable list multimap < character , character > builder ( ) put all ( ' b ' , arrays as list ( ' a ' , ' n ' , ' a ' , ' n ' , ' a ' ) ) put all ( ' a ' , arrays as list ( ' p ' , ' p ' , ' l ' , ' e ' ) ) put all ( ' c ' , arrays as list ( ' a ' , ' r ' , ' r ' , ' o ' , ' t ' ) ) put all ( ' a ' , arrays as list ( ' s ' , ' p ' , ' a ' , ' r ' , ' a ' , ' g ' , ' u ' , ' s ' ) ) put all ( ' c ' , arrays as list ( ' h ' , ' e ' , ' r ' , ' r ' , ' y ' ) ) build ( ) ; } }

public static < t , k , v > collector < t , ? , immutable list multimap < k , v > > flattening to immutable list multimap ( function < ? super t , ? extends k > key function , function < ? super t , ? extends stream < ? extends v > > values function ) { return collect collectors flattening to immutable list multimap ( key function , values function ) ; }


return the { @ link http message writer http message writers } to be used for response body conversion

list < http message writer < ? > > message writers ( ) ;


returns the approximate number of entries in this cache


return an array of bytes read from the given file

public final static byte [ ] get bytes from file ( file source file ) throws i o exception { return get bytes from file ( new resource file ( source file ) ) ; }


returns an exception don ' t forget to throw it

private query syntax exception syntax error ( lexer token token ) { string message = " premature end of input " ; if ( token kind ! = token kind eof ) { string builder buf = new string builder ( " syntax error at ' " ) ; string sep = " " ; for ( int index = tokens index of ( token ) , max = math min ( tokens size ( ) - 1 , index + 3 ) ; / / 3 tokens of context index < max ; + + index ) { buf append ( sep ) append ( tokens get ( index ) ) ; sep = " " ; } buf append ( " ' " ) ; message = buf to string ( ) ; } return new query syntax exception ( message ) ; }


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

public generate default layout method on bind ( on model bound listener < generate default layout method , object > listener ) { on mutation ( ) ; this on model bound listener epoxy generated model = listener ; return this ; }


steps : 1 create a directory with default permissions : 777 with umask 022 2 check the directory has good permissions : 755 3 set the umask to 062 4 create a new directory with default permissions 5 for this directory we expect 715 as permission not 755

public void test set umask in real time ( ) throws exception { assume not windows ( ) ; local file system localfs = file system get local ( new configuration ( ) ) ; configuration conf = localfs get conf ( ) ; conf set ( common configuration keys fs permissions umask key , " 022 " ) ; logger info ( " current umask is { } " , conf get ( common configuration keys fs permissions umask key ) ) ; path dir = new path ( test path prefix + " dir " ) ; path dir 2 = new path ( test path prefix + " dir 2 " ) ; try { assert true ( localfs mkdirs ( dir ) ) ; fs permission initial permission = get permission ( localfs , dir ) ; assert equals ( " with umask 022 permission should be 755 since the default " + " permission is 777 " , new fs permission ( " 755 " ) , initial permission ) ; / / modify umask and create a new directory / / and check if new umask is applied conf set ( common configuration keys fs permissions umask key , " 062 " ) ; assert true ( localfs mkdirs ( dir 2 ) ) ; fs permission final permission = localfs get file status ( dir 2 ) get permission ( ) ; assert that ( " with umask 062 permission should not be 755 since the " + " default permission is 777 " , new fs permission ( " 755 " ) , is ( not ( final permission ) ) ) ; assert equals ( " with umask 062 we expect 715 since the default permission is 777 " , new fs permission ( " 715 " ) , final permission ) ; } finally { conf set ( common configuration keys fs permissions umask key , " 022 " ) ; cleanup ( localfs , dir ) ; cleanup ( localfs , dir 2 ) ; } }


registers an { @ link accept header locale resolver } under a well - known name unless already registered

private static void register locale resolver ( parser context context , @ nullable object source ) { if ( ! contains bean in hierarchy ( context , dispatcher servlet locale resolver bean name ) ) { root bean definition bean def = new root bean definition ( accept header locale resolver class ) ; bean def set source ( source ) ; bean def set role ( bean definition role infrastructure ) ; context get registry ( ) register bean definition ( dispatcher servlet locale resolver bean name , bean def ) ; context register component ( new bean component definition ( bean def , dispatcher servlet locale resolver bean name ) ) ; } }


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


performs subroutine inlining of the given program class pool

public void execute ( class pool program class pool ) { / / clean up any old visitor info program class pool classes accept ( new class cleaner ( ) ) ; / / inline all subroutines class visitor inliner = new all method visitor ( new all attribute visitor ( new code subroutine inliner ( ) ) ) ; / / in java standard edition , only class files from java 6 or higher / / should be preverified if ( ! configuration micro edition ) { inliner = new class version filter ( class constants class version 1 6 , inliner ) ; } program class pool classes accept ( inliner ) ; }


{ @ inherit doc } < br > implementation notes : < br > offer is allowed from multiple threads < br > offer allocates a new node and : swaps it atomically with current producer node ( only one producer ' wins ' ) sets the new node as the node following from the swapped producer node this works because each producer is guaranteed to ' plant ' a new node and link the old node no 2 producers can get the same producer node as part of xchg guarantee

public boolean offer ( final t e ) { if ( null = = e ) { throw new null pointer exception ( " null is not a valid element " ) ; } final linked queue node < t > next node = new linked queue node < > ( e ) ; final linked queue node < t > prev producer node = xchg producer node ( next node ) ; / / should a producer thread get interrupted here the chain will be broken until that thread is resumed / / and completes the store in prev next prev producer node so next ( next node ) ; / / store store return true ; }


shuts { @ link simple drawee view } down

public static void shut down ( ) { s draweecontrollerbuildersupplier = null ; }


returns the function ' s parameters , in " run - time order " : non - keyword - only parameters , keyword - only parameters , { @ code args } , and finally { @ code kwargs } a bare { @ code } parameter is dropped

public immutable list < parameter > get parameters ( ) { return params ; }


ensures the truth of an expression involving the state of the calling instance , but not involving any parameters to the calling method see { @ link # check state ( boolean , string , object ) } for details

public static void check state ( boolean b , @ nullable decl string error message template , @ nullable decl object p 1 , int p 2 ) { if ( ! b ) { throw new illegal state exception ( lenient format ( error message template , p 1 , p 2 ) ) ; } }


public void set active ( boolean active ) { this active = active ; }


returns a synchronized ( thread - safe ) queue backed by the specified queue in order to guarantee serial access , it is critical that < b > all < b > access to the backing queue is accomplished through the returned queue it is imperative that the user manually synchronize on the returned queue when accessing the queue ' s iterator : { @ code queue < e > queue = queues synchronized queue ( min max priority queue < e > create ( ) ) ; queue add ( element ) ; needn ' t be in synchronized block synchronized ( queue ) { must synchronize on queue ! iterator < e > i = queue iterator ( ) ; must be in synchronized block while ( i has next ( ) ) { foo ( i next ( ) ) ; } } } failure to follow this advice may result in non - deterministic behavior the returned queue will be serializable if the specified queue is serializable

public static < e > queue < e > synchronized queue ( queue < e > queue ) { return synchronized queue ( queue , null ) ; }


sets new values to all fields of the tuple


exit a parse tree produced by the { @ code select expression } labeled alternative in { @ link sql base parser # select item }

void exit select expression ( sql base parser select expression context ctx ) ;


visits a member of the nest a nest is a set of classes of the same package that share access to their private members one of these classes , called the host , lists the other members of the nest , which in turn should link to the host of their nest this method must be called only if the visited class is the host of a nest a nest host is implicitly a member of its own nest , so it ' s invalid to call this method with the visited class name as argument

public void visit nest member ( final string nest member ) { if ( api < opcodes asm7 ) { throw new unsupported operation exception ( " nest member requires asm7 " ) ; } if ( cv ! = null ) { cv visit nest member ( nest member ) ; } }


returns the state descriptor for the queryable state instance

public state descriptor < ? , v > get state descriptor ( ) { return state descriptor ; }


start an allocated container the < code > application master < code > or other applications that use the client must provide the details of the allocated container , including the id , the assigned node ' s id and the token via { @ link container } in addition , the am needs to provide the { @ link container launch context } as well

public abstract map < string , byte buffer > start container ( container container , container launch context container launch context ) throws yarn exception , i o exception ;


search through bytes of a memory block using the finite state machine - root - apply any additional rules for matching patterns

private void search block ( sequence search state root state , program program , memory block block , address set view restrict set , task monitor monitor ) throws i o exception , cancelled exception { / / if no restricted set , make restrict set the full block address set done set ; if ( restrict set = = null | | restrict set is empty ( ) ) { done set = new address set ( block get start ( ) , block get end ( ) ) ; } else { done set = restrict set intersect range ( block get start ( ) , block get end ( ) ) ; } long num in done set = done set get num addresses ( ) ; long num in block = block get size ( ) ; address block start addr = block get start ( ) ; / / pull each range off the restricted set long progress = monitor get progress ( ) ; address range iterator address ranges = done set get address ranges ( ) ; long num done = 0 ; while ( address ranges has next ( ) ) { monitor check canceled ( ) ; monitor set message ( search name + " search " ) ; monitor set progress ( progress + ( long ) ( num in block * ( ( float ) num done / num in done set ) ) ) ; address range address range = address ranges next ( ) ; long num addresses in range = address range get length ( ) ; array list < match > mymatches = new array list < > ( ) ; long streamoffset = block start addr get offset ( ) ; / / give block a starting / ending point before this address to search / / patterns might start before , since they have a pre - pattern / / todo : this is dangerous , since pattern might be very big , but the set should be restricted / / normally only when we are searching for more matching patterns that had a postrule that didn ' t satisfy / / normally the whole memory blocks will get searched long block offset = address range get min address ( ) subtract ( block start addr ) ; block offset = block offset - restricted pattern byte range ; if ( block offset < = 0 ) { / / don ' t go before the block start block offset = 0 ; } / / compute number of bytes in the range + 1 , and don ' t search more than that long max block search length = address range get max address ( ) subtract ( block start addr ) - block offset + 1 ; input stream data = block get data ( ) ; data skip ( block offset ) ; root state apply ( data , max block search length , mymatches , monitor ) ; monitor check canceled ( ) ; monitor set message ( search name + " ( examine matches ) " ) ; / / todo : danger there is much offset < - - > address calculation here / / should be ok , since they are all relative to the block long match progress = progress + ( long ) ( num in block * ( ( float ) num done / num in done set ) ) ; for ( int i = 0 ; i < mymatches size ( ) ; + + i ) { monitor check canceled ( ) ; monitor set progress ( match progress + ( long ) ( num addresses in range * ( ( float ) i / mymatches size ( ) ) ) ) ; match match = mymatches get ( i ) ; address addr = block start addr add ( match get mark offset ( ) + block offset ) ; if ( ! match check post rules ( streamoffset + block offset ) ) { continue ; } match action [ ] matchactions = match get match actions ( ) ; pre match apply ( matchactions , addr ) ; for ( match action matchaction : matchactions ) { matchaction apply ( program , addr , match ) ; } post match apply ( matchactions , addr ) ; } num done + = num addresses in range ; } }


returns whether this table contains a mapping for the composite of active key and given namespace

public boolean contains key ( n namespace ) { return contains key ( key context get current key ( ) , key context get current key group index ( ) , namespace ) ; }


allows to set the settings using a json builder

public create index request builder set settings ( x content builder builder ) { request settings ( builder ) ; return this ; }


we test that a closed index makes no - op replica allocationrecovery only

public void test closed index noop recovery ( ) throws exception { final string index name = " closed index replica allocation " ; if ( cluster type = = cluster type old ) { create index ( index name , settings builder ( ) put ( index metadata index number of shards setting get key ( ) , 1 ) put ( index metadata index number of replicas setting get key ( ) , 1 ) put ( enable allocation decider index routing rebalance enable setting get key ( ) , " none " ) put ( index delayed node left timeout setting get key ( ) , " 1 2 0s " ) put ( " index routing allocation include name " , cluster name + " - 0 " ) build ( ) ) ; index docs ( index name , 0 , random int ( 10 ) ) ; / / allocate replica to node - 2 update index settings ( index name , settings builder ( ) put ( " index routing allocation include name " , cluster name + " - 0 , " + cluster name + " - 2 , " + cluster name + " - * " ) ) ; ensure green ( index name ) ; close index ( index name ) ; } final version index version created = index version created ( index name ) ; if ( index version created on or after ( version v 7 2 0 ) ) { / / index was created on a version that supports the replication of closed indices , / / so we expect the index to be closed and replicated ensure green ( index name ) ; assert closed index ( index name , true ) ; if ( minimum node version ( ) on or after ( version v 7 2 0 ) ) { switch ( cluster type ) { case old : break ; case mixed : assert noop recoveries ( index name , s - > s starts with ( cluster name + " - 0 " ) ) ; break ; case upgraded : assert noop recoveries ( index name , s - > s starts with ( cluster name ) ) ; break ; } } } else { assert closed index ( index name , false ) ; } }


private void delete project ( ) { if ( file chooser = = null ) { file chooser = plugin create file chooser ( last selected project directory ) ; } project locator project locator = plugin choose project ( file chooser , " delete " , last selected project directory ) ; if ( project locator = = null ) { return ; / / user canceled } project manager pm = plugin get project manager ( ) ; if ( ! pm project exists ( project locator ) ) { msg show info ( get class ( ) , tool get tool frame ( ) , " project does not exist " , " project " + project locator get name ( ) + " was not found " ) ; return ; } / / confirm delete before continuing project active project = plugin get active project ( ) ; / / give a special confirm message if user is about to / / remove the active project string buffer confirm msg = new string buffer ( " project : " ) ; confirm msg append ( project locator to string ( ) ) ; confirm msg append ( " ? \ n " ) ; boolean is active project = ( active project ! = null & & active project get project locator ( ) equals ( project locator ) ) ; / / also give special warning if we open this project as read - only voew boolean is open project view = is open project view ( project locator ) ; if ( ! allow delete ( is active project ? active project : null ) ) { return ; } confirm msg append ( " \ n " ) ; confirm msg append ( " warning : delete cannot be undone ! " ) ; if ( ! plugin confirm delete ( confirm msg to string ( ) ) ) { return ; } string project name = project locator get name ( ) ; try { if ( ! pm delete project ( project locator ) ) { msg show info ( get class ( ) , tool get tool frame ( ) , " error deleting project " , " all files from project " + project name + " were not deleted " ) ; } } catch ( exception e ) { msg error ( this , " error deleting project : " + project name + " , " + e get message ( ) , e ) ; return ; } if ( is active project ) { active project close ( ) ; fire project closed ( active project ) ; tool set active project ( null ) ; } else if ( is open project view ) { / / update the read - only project views if affected plugin get project action manager ( ) close view ( project locator get u r l ( ) ) ; } / / update our list of recent projects plugin rebuild recent menus ( ) ; msg info ( this , " deleted project : " + project name ) ; }


returns the next chunk index or { @ link c # index unset } if it is not known

public long get next chunk index ( ) { return chunk index ! = c index unset ? chunk index + 1 : c index unset ; }


returns the number of bytes from the original source file that are stored in the database

public long get size ( ) { return size ; }


gets attributes that are supported by all filesystems

public static basic file attributes get basic file attributes ( path path ) { try { return files read attributes ( path , basic file attributes class ) ; } catch ( i o exception e ) { throw new runtime exception ( e ) ; } }


set ( ) - s this tile , except it ' s synced across the network

public void set net ( block block , team team , int rotation ) { call set tile ( this , block , team , rotation ) ; }


public map < string , cookie > cookies ( ) { return context ( ) request context ( ) cookies ( ) ; }


returns an output stream if the file can be opened for writing

public output stream get output stream ( ) throws file not found exception { return resource get output stream ( ) ; }


returns all the registered { @ link builder } descriptors

public static descriptor extension list < builder , descriptor < builder > > all ( ) { return jenkins get ( ) get descriptor list ( builder class ) ; }


gets a filters list of { @ link invalid } states with the level of { @ link severity # error }

public list < invalid > get errors ( ) { return validations stream ( ) filter ( it - > ! it is valid ( ) ) map ( it - > ( invalid ) it ) filter ( it - > it get severity ( ) equals ( severity error ) ) collect ( collectors to list ( ) ) ; }


acquires a lock on the translog files and lucene soft - deleted documents to prevent them from being trimmed

public abstract closeable acquire history retention lock ( ) ;


retrieve the test timeout from the system property { @ link # property test default timeout } , falling back to the value in { @ link # test default timeout value } if the property is not defined

protected timeout retrieve test timeout ( ) { string propval = system get property ( property test default timeout , integer to string ( test default timeout value ) ) ; int millis ; try { millis = integer parse int ( propval ) ; } catch ( number format exception e ) { / / fall back to the default value , as the property cannot be parsed millis = test default timeout value ; } return new timeout ( millis , time unit milliseconds ) ; }


return the current theme ( never { @ code null } ) resolved lazily for more efficiency when theme support is not being used

public theme get theme ( ) { if ( this theme = = null ) { / / lazily determine theme to use for this request context this theme = request context utils get theme ( this request ) ; if ( this theme = = null ) { / / no theme resolver and theme source available - > try fallback this theme = get fallback theme ( ) ; } } return this theme ; }


values from the last time { @ link # run for doc ( int ) } was called this array is mutable and will change with the next call of { @ link # run for doc ( int ) } it is also oversized and will contain garbage at all indices at and above { @ link # count ( ) }

public final double [ ] values ( ) { return values ; }


returns a class specification or keep specification , based on the given template and the class name to be filled in

private class specification class specification ( class specification class specification template , string class name ) { / / create a copy of the template class specification class specification = ( class specification ) class specification template clone ( ) ; / / set the class name in the copy class specification class name = class name equals ( " " ) | | class name equals ( " * " ) ? null : class util internal class name ( class name ) ; / / return the modified copy return class specification ; }


public string get host ( ) { return this host ; }


does the database support the use of catalog name in procedure calls ?

public boolean is supports catalogs in procedure calls ( ) { return this supports catalogs in procedure calls ; }


human - readable description of this node

public abstract string get node description ( ) ;


obtains a fresh workspace of the module ( s ) into the specified directory of the specified machine the " update " operation can be performed instead of a fresh checkout if feasible this operation should also capture the information necessary to tag the workspace later

public void checkout ( @ non null run < ? , ? > build , @ non null launcher launcher , @ non null file path workspace , @ non null task listener listener , @ check for null file changelog file , @ check for null s c m revision state baseline ) throws i o exception , interrupted exception { if ( build instanceof abstract build & & listener instanceof build listener & & util is overridden ( scm class , get class ( ) , " checkout " , abstract build class , launcher class , file path class , build listener class , file class ) ) { if ( changelog file = = null ) { changelog file = file create temp file ( " changelog " , " xml " ) ; try { if ( ! checkout ( ( abstract build ) build , launcher , workspace , ( build listener ) listener , changelog file ) ) { throw new abort exception ( ) ; } } finally { util delete file ( changelog file ) ; } } else { if ( ! checkout ( ( abstract build ) build , launcher , workspace , ( build listener ) listener , changelog file ) ) { throw new abort exception ( ) ; } } } else { throw new abstract method error ( " you must override the new overload of checkout " ) ; } }


sets the { @ code trigger } that should be used to trigger window emission

public windowed operator transformation < t , k , w > trigger ( trigger < ? super t , ? super w > trigger ) { builder trigger ( trigger ) ; return this ; }


check that non existing class throws exception

public void test get non exist rule text ( ) throws class not found exception { final string non exist = " my placement rule " ; placement factory get placement rule ( non exist , null ) ; }


wait until no watcher has been fired in the last second to ensure that all watches that are waiting to be fired have been fired

private void wait for all watchers ( ) throws exception { time of last watcher invocation = system current time millis ( ) ; while ( system current time millis ( ) - time of last watcher invocation < 1000 ) { thread sleep ( 1000 ) ; } }


returns an immutable array containing the given values , in order

public static immutable long array of ( long e 0 , long e 1 , long e 2 , long e 3 ) { return new immutable long array ( new long [ ] { e 0 , e 1 , e 2 , e 3 } ) ; }


manually configure resource handler mappings note : by default resource mappings are auto - detected from the spring { @ code application context } if this property is used , auto - detection is turned off

public void register handlers ( map < string , resource web handler > handler map ) { this handler map clear ( ) ; handler map for each ( ( raw pattern , resource web handler ) - > { raw pattern = prepend leading slash ( raw pattern ) ; path pattern pattern = path pattern parser default instance parse ( raw pattern ) ; this handler map put ( pattern , resource web handler ) ; } ) ; }


creates a mutable { @ code compact hash set } instance containing the elements of the given collection in unspecified order

public static < e > compact hash set < e > create ( collection < ? extends e > collection ) { compact hash set < e > set = create with expected size ( collection size ( ) ) ; set add all ( collection ) ; return set ; }


logs user into the system < b > 200 < b > - successful operation < b > 400 < b > - invalid usernamepassword supplied

public string login user ( string username , string password ) throws rest client exception { return login user with http info ( username , password ) get body ( ) ; }


creates a new group based upon this one , but with the given vertices ( and incident edges ) removed

public grouped function graph vertex remove all ( set < f g vertex > vertices to remove ) { set < f g edge > new edges = new hash set < > ( ungrouped edges ) ; for ( f g vertex vertex : vertices to remove ) { remove incident edges ( vertex , new edges ) ; } set < f g vertex > new vertices = new hash set < > ( vertices ) ; new vertices remove all ( vertices to remove ) ; if ( new vertices is empty ( ) ) { return null ; } grouped function graph vertex new vertex = new grouped function graph vertex ( get controller ( ) , get user text ( ) , new vertices , new edges ) ; return new vertex ; }


sets the working directory to use , if any

public command line builder set working directory ( path working directory ) { this working directory = working directory ; return this ; }


identifies all wait for xxx methods , which must be called while occupying the monitor

private static boolean is wait for ( method method ) { return method get name ( ) starts with ( " wait for " ) ; }


protected type information [ ] get field types ( ) { return field types ; }


clear all bindings in this context builder , while keeping it active

public void clear ( ) { this bound objects clear ( ) ; }


exercises dex file merger with two input archives

public void test merge dex archive multiple inputs ( ) throws exception { path dex archive = build dex archive ( ) ; path dex archive 2 = build dex archive ( input jar2 , " libtestdata jar dex zip " ) ; path output archive = run dex file merger ( 256 * 256 , / * force jumbo = * / false , " multiple inputs dex zip " , multidex strategy minimal , / * main dex list = * / null , / * minimal main dex = * / false , dex prefix , dex archive , dex archive 2 ) ; int expected class count = matching file count ( dex archive , " * \ \ class dex $ " ) ; expected class count + = matching file count ( dex archive 2 , " * \ \ class dex $ " ) ; assert single dex output ( expected class count , output archive , " classes dex " ) ; }


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


invoked from a container thread when an error occurred while processing the async request before the { @ code callable } task completes implementations may return a value , including an { @ link exception } , to use instead of the value the { @ link callable } did not return in time the default implementation always returns { @ link # result none }

default < t > object handle error ( native web request request , callable < t > task , throwable t ) throws exception { return result none ; }


protected void post saml logout response ( final single logout service slo service , final logout response logout response , final request context request context ) { val payload = serialize support node to string ( x m l object support marshall ( logout response ) ) ; logger trace ( " logout request payload is [ { } ] " , payload ) ; val message = encoding utils encode base 6 4 ( payload ) ; logger trace ( " logout message encoded in base 6 4 is [ { } ] " , message ) ; val location = string utils is blank ( slo service get response location ( ) ) ? slo service get location ( ) : slo service get response location ( ) ; logger debug ( " sending logout response using [ { } ] binding to [ { } ] " , slo service get binding ( ) , location ) ; http utils execute post ( location , collection utils wrap ( saml protocol constants parameter saml response , message ) , collection utils wrap ( " content - type " , media type application xml value ) ) ; }


get the { @ link connect metrics } that uses kafka metrics and manages the jmx reporter

public connect metrics metrics ( ) { return metrics ; }


gets the { @ link context register filter } associated with this pattern

public context register filter get context register filter ( ) { return c reg filter ; }


source line and column info < code > optional aapt pb source position source = 4 ; < code >

public boolean has source ( ) { return instance has source ( ) ; }


called before initial collection and between successive collection runs a chance to initialize or re - initialize state


returns an unmodifiable view of the specified collection of entries the { @ link entry # set value } operation throws an { @ link unsupported operation exception } if the specified collection is a { @ code set } , the returned collection is also a { @ code set }

private static < k , v > collection < entry < k , v > > unmodifiable entries ( collection < entry < k , v > > entries ) { if ( entries instanceof set ) { return maps unmodifiable entry set ( ( set < entry < k , v > > ) entries ) ; } return new maps unmodifiable entries < > ( collections unmodifiable collection ( entries ) ) ; }


generate a bean name for the given bean definition

string generate bean name ( bean definition definition , bean definition registry registry ) ;


uses subchannel connected to default target

private pick result use fallback ( pick subchannel args args ) { / / todo ( creamsoup ) wait until lb is ready start fallback child policy ( ) ; subchannel picker picker = fallback child policy wrapper get picker ( ) ; if ( picker = = null ) { return pick result with no result ( ) ; } return picker pick subchannel ( args ) ; }


public static object mapper get object mapper ( ) { return mapper ; }


waits until { @ link one shot latch # trigger ( ) } is called once { @ code trigger ( ) } has been called this call will always return immediately

public void await ( ) throws interrupted exception { synchronized ( lock ) { while ( ! triggered ) { thread thread = thread current thread ( ) ; try { waiters set add ( thread ) ; lock wait ( ) ; } finally { waiters set remove ( thread ) ; } } } }


returns the constraints boolean value for matching

public boolean get value ( ) { return match value ; }


return the limit for the number of idle consumers

public final int get idle consumer limit ( ) { synchronized ( this lifecycle monitor ) { return this idle consumer limit ; } }


model tests for mixed properties and additional properties class

public void test mixed properties and additional properties class ( ) { / / todo : test mixed properties and additional properties class }


remove a shutdown hook previously registered hooks with a higher priority value will run first

public static synchronized void remove shutdown hook ( shutdown hook hook ) { hooks remove ( hook ) ; }


returns the estimated in memory data size for stats of position do not use it for other purpose

long get estimated data size for stats ( int position ) ;


sink writer < input t , comm t , writer state t > create writer ( init context context , list < writer state t > states ) throws i o exception ;


reset the current progress count to the specified value

public void set progress ( int count ) { this count = count ; }


check if network topology is aware of node group

public boolean is node group aware ( ) { return true ; }


assert the values of the response header with the given hamcrest iterable { @ link matcher }

public result matcher string values ( string name , matcher < ? super iterable < string > > matcher ) { return result - > { list < string > values = result get response ( ) get headers ( name ) ; assert that ( " response header ' " + name + " ' " , values , matcher ) ; } ; }


tests if the currently received samples for a given track are already a ' chunk ' as we want to have it the next sample will not be part of the chunk will be added to the fragment buffer later

private boolean is chunk ready ( streaming track streaming track , streaming sample next ) { final long ts = objects require non null ( next sample start time get ( streaming track ) ) ; final long cfst = objects require non null ( next chunk create start time get ( streaming track ) ) ; return ( ts > = cfst + 2 * streaming track get timescale ( ) ) ; / / chunk interleave of 2 seconds }


public string [ ] get location ( int i ) throws i o exception , interrupted exception { return splits [ i ] get locations ( ) ; }


deactivate transaction synchronization for the current context called by the transaction manager on transaction cleanup


create a new { @ code k stream } by transforming the value of each record in this stream into zero or more values with the same key in the new stream transform the value of each input record into zero or more records with the same ( unmodified ) key in the output stream ( value type can be altered arbitrarily ) the provided { @ link value mapper } is applied to each input record and computes zero or more output values thus , an input record { @ code < k , v > } can be transformed into output records { @ code < k : v ' > , < k : v ' ' > , } this is a stateless record - by - record operation ( cf { @ link # transform values ( value transformer supplier , string ) } for stateful value transformation ) the example below splits input records { @ code < null : string > } containing sentences as values into their words { @ code k stream < byte [ ] , string > input stream = builder stream ( " topic " ) ; k stream < byte [ ] , string > output stream = input stream flat map values ( new value mapper < string , iterable < string > > { iterable < string > apply ( string value ) { return arrays as list ( value split ( " " ) ) ; } } ) ; } the provided { @ link value mapper } must return an { @ link iterable } ( e g , any { @ link java util collection } type ) and the return value must not be { @ code null } splitting a record into multiple records with the same key preserves data co - location with respect to the key thus , no internal data redistribution is required if a key based operator ( like an aggregation or join ) is applied to the result { @ code k stream } ( cf { @ link # flat map ( key value mapper ) } )

< vr > k stream < k , vr > flat map values ( final value mapper < ? super v , ? extends iterable < ? extends vr > > mapper , final named named ) ;


verifies that no interactions happened on given mocks < pre class = " code " > < code class = " java " > verify no interactions ( mock one , mock two ) ; < code > this method will also detect invocations that occurred before the test method , for example : in < code > set up ( ) < code > , < code > & # 064 ; before < code > method or in constructor consider writing nice code that makes interactions only in test methods see also { @ link mockito # never ( ) } - it is more explicit and communicates the intent well see examples in javadoc for { @ link mockito } class

public static void verify no interactions ( object mocks ) { mockito core verify no interactions ( mocks ) ; }


asserts that all 5 different ways to convert an object to a string of { @ code expression } ( { @ code str } , { @ code repr } , { @ code ' % s ' } , { @ code ' % r ' } , { @ code ' { } ' format } return the correct { @ code representation } not applicable for objects that have different { @ code str } and { @ code repr } representations

private void assert string representation in build file ( string expression , string representation ) throws exception { assert that ( starlark loading eval in build file ( string format ( " str ( % s ) " , expression ) ) ) is equal to ( representation ) ; assert that ( starlark loading eval in build file ( string format ( " repr ( % s ) " , expression ) ) ) is equal to ( representation ) ; assert that ( starlark loading eval in build file ( string format ( " ' % % s ' % % ( % s , ) " , expression ) ) ) is equal to ( representation ) ; assert that ( starlark loading eval in build file ( string format ( " ' % % r ' % % ( % s , ) " , expression ) ) ) is equal to ( representation ) ; assert that ( starlark loading eval in build file ( string format ( " ' { } ' format ( % s ) " , expression ) ) ) is equal to ( representation ) ; }


file { @ code version } contains the following fields : node type layout version namespace i d fs state creation time other fields specific for this node type the version file is always written last during storage directory updates the existence of the version file indicates that all other files have been successfully written in the storage directory , the storage is valid and does not need to be recovered

public file get version file ( ) { if ( root = = null ) { return null ; } return new file ( new file ( root , storage dir current ) , storage file version ) ; }


return a newly constructed { @ link processor } instance the supplier should always generate a new instance each time { @ link processor supplier # get ( ) } gets called creating a single { @ link processor } object and returning the same object reference in { @ link processor supplier # get ( ) } is a violation of the supplier pattern and leads to runtime exceptions

processor < k in , v in , k out , v out > get ( ) ;


hooks a new listener to the given operation context that will update the error metrics for the wasb file system appropriately in response to response received events

public static void hook ( operation context operation context , azure file system instrumentation instrumentation ) { error metric updater listener = new error metric updater ( operation context , instrumentation ) ; operation context get response received event handler ( ) add listener ( listener ) ; }


map entries that , when this diff is applied to a map , should be incrementally updated the incremental update is represented using the { @ link diff } interface

public map < k , diff < t > > get diffs ( ) { return diffs ; }


initialize egl for a given configuration spec

public void start ( ) { if ( log egl ) { log w ( " egl helper " , " start ( ) tid = " + thread current thread ( ) get id ( ) ) ; } / * * get an egl instance * / egl = ( egl10 ) e g l context get e g l ( ) ; / * * get to the default display * / egl display = egl egl get display ( egl10 egl default display ) ; if ( egl display = = egl10 egl no display ) { throw new runtime exception ( " egl get display failed " ) ; } / * * we can now initialize egl for that display * / int [ ] version = new int [ 2 ] ; if ( ! egl egl initialize ( egl display , version ) ) { throw new runtime exception ( " egl initialize failed " ) ; } g l texture view view = gl texture view weak ref get ( ) ; if ( view = = null ) { egl config = null ; egl context = null ; } else { egl config = view egl config chooser choose config ( egl , egl display ) ; / * * create an egl context we want to do this as rarely as we can , because an * egl context is a somewhat heavy object * / egl context = view egl context factory create context ( egl , egl display , egl config ) ; } if ( egl context = = null | | egl context = = egl10 egl no context ) { egl context = null ; throw egl exception ( " create context " ) ; } if ( log egl ) { log w ( " egl helper " , " create context " + egl context + " tid = " + thread current thread ( ) get id ( ) ) ; } egl surface = null ; }


adds a namevalue pair to the formatted output in { @ code name = value } format if { @ code value } is { @ code null } , the string { @ code " null " } is used , unless { @ link # omit null values ( ) } is called , in which case this namevalue pair will not be added

public to string helper add ( string name , @ nullable decl object value ) { return add holder ( name , value ) ; }


find unique original external symbol with the given name

private symbol find original external symbol ( string name ) throws not found exception { / / must examine each external since secondary / original name / / is not indexed within symbol table symbol candidate symbol = null ; symbol table symbol table = program get symbol table ( ) ; external manager external manager = program get external manager ( ) ; for ( symbol s : symbol table get external symbols ( ) ) { symbol type type = s get symbol type ( ) ; if ( type = = symbol type function | | type = = symbol type label ) { external location external location = external manager get external location ( s ) ; string original name = external location get original imported name ( ) ; if ( name equals ( original name ) ) { if ( candidate symbol ! = null ) { return null ; } candidate symbol = s ; } } } if ( candidate symbol = = null ) { throw new not found exception ( ) ; } return candidate symbol ; }


public long get content length ( ) { return buffer length ; }


set whether to use prepared statements capable of returning updatable result sets

public void set updatable results ( boolean updatable results ) { this updatable results = updatable results ; }


public void abort ( ) { if ( ! closed get ( ) ) { log debug ( " aborting " ) ; wrapped stream abort ( ) ; } }


create a key provider based on a provided uri

public static key provider get ( uri uri , configuration conf ) throws i o exception { key provider kp = null ; for ( key provider factory factory : service loader ) { kp = factory create provider ( uri , conf ) ; if ( kp ! = null ) { break ; } } return kp ; }


adds a placeholder tree artifact exec path when the command line is used in an action template , the placeholder will be replaced by the exec path of a { @ link tree file artifact } inside the tree artifact at execution time for each expanded action

public builder add placeholder tree artifact exec path ( @ nullable artifact tree artifact ) { if ( tree artifact ! = null ) { preconditions check state ( ! tree artifacts requested ) ; tree artifact inputs add ( tree artifact ) ; arguments add ( new tree file artifact exec path arg ( tree artifact ) ) ; } return this ; }


public builder set auto play animations ( boolean enabled ) { m auto play animations = enabled ; return get this ( ) ; }


sets the name of the directory where the cache will be located

public builder set base directory name ( string base directory name ) { m base directory name = base directory name ; return this ; }


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

public void update user ( string username , user body ) { / / todo : implement }


returns system nano time ( ) unless the timeout has already elapsed returns 0l if and only if the timeout has already elapsed

private static long init nano time ( long timeout nanos ) { if ( timeout nanos < = 0l ) { return 0l ; } else { long start time = system nano time ( ) ; return ( start time = = 0l ) ? 1l : start time ; } }


iterate all of the buckets implementations take into account the { @ link bucket count thresholds } in particular , if the { @ link bucket count thresholds # get min doc count ( ) } is 0 then they ' ll make sure to iterate a bucket even if it was never { { @ link # collect global ord collected } if { @ link bucket count thresholds # get min doc count ( ) } is not 0 then they ' ll skip all global ords that weren ' t collected

abstract void for each ( long owning bucket ord , bucket info consumer consumer ) throws i o exception ;


returns whether the given string is an audio mime type

public static boolean is audio ( @ nullable string mime type ) { return base type audio equals ( get top level type ( mime type ) ) ; }


tests that servers supporting multiple sasl mechanisms work with clients using any of the enabled mechanisms also tests successful re - authentication over multiple mechanisms

public void test multiple server mechanisms ( ) throws exception { security protocol security protocol = security protocol sasl ssl ; configure mechanisms ( " digest - md5 " , arrays as list ( " digest - md5 " , " plain " , " scram - sha - 256 " ) ) ; configure digest md 5 server callback ( security protocol ) ; server = create echo server ( security protocol ) ; update scram credential cache ( test jaas config username , test jaas config password ) ; string node 1 = " 1 " ; sasl client configs put ( sasl configs sasl mechanism , " plain " ) ; create and check client connection ( security protocol , node 1 ) ; server verify authentication metrics ( 1 , 0 ) ; selector selector 2 = null ; selector selector 3 = null ; try { string node 2 = " 2 " ; sasl client configs put ( sasl configs sasl mechanism , " digest - md5 " ) ; create selector ( security protocol , sasl client configs ) ; selector 2 = selector ; inet socket address addr = new inet socket address ( " 127 0 0 1 " , server port ( ) ) ; selector connect ( node 2 , addr , buffer size , buffer size ) ; network test utils check client connection ( selector , node 2 , 100 , 10 ) ; selector = null ; / / keeps it from being closed when next one is created server verify authentication metrics ( 2 , 0 ) ; string node 3 = " 3 " ; sasl client configs put ( sasl configs sasl mechanism , " scram - sha - 256 " ) ; create selector ( security protocol , sasl client configs ) ; selector 3 = selector ; selector connect ( node 3 , new inet socket address ( " 127 0 0 1 " , server port ( ) ) , buffer size , buffer size ) ; network test utils check client connection ( selector , node 3 , 100 , 10 ) ; server verify authentication metrics ( 3 , 0 ) ; / * * now re - authenticate the connections first we have to sleep long enough so * that the next write will cause re - authentication , which we expect to succeed * / delay ( ( long ) ( connections max reauth ms value * 1 1 ) ) ; server verify reauthentication metrics ( 0 , 0 ) ; network test utils check client connection ( selector 2 , node 2 , 100 , 10 ) ; server verify reauthentication metrics ( 1 , 0 ) ; network test utils check client connection ( selector 3 , node 3 , 100 , 10 ) ; server verify reauthentication metrics ( 2 , 0 ) ; } finally { if ( selector 2 ! = null ) selector 2 close ( ) ; if ( selector 3 ! = null ) selector 3 close ( ) ; } }


returns whether the underlying library is available , loading it if necessary

public static boolean is available ( ) { return loader is available ( ) ; }


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


public static void main ( string [ ] args ) throws exception { configuration conf = new configuration ( ) ; compression codec factory factory = new compression codec factory ( conf ) ; boolean encode = false ; for ( int i = 0 ; i < args length ; + + i ) { if ( " - in " equals ( args [ i ] ) ) { encode = true ; } else if ( " - out " equals ( args [ i ] ) ) { encode = false ; } else { compression codec codec = factory get codec ( new path ( args [ i ] ) ) ; if ( codec = = null ) { system out println ( " codec for " + args [ i ] + " not found " ) ; } else { if ( encode ) { compression output stream out = null ; java io input stream in = null ; try { out = codec create output stream ( new java io file output stream ( args [ i ] ) ) ; byte [ ] buffer = new byte [ 100 ] ; string in filename = remove suffix ( args [ i ] , codec get default extension ( ) ) ; in = new java io file input stream ( in filename ) ; int len = in read ( buffer ) ; while ( len > 0 ) { out write ( buffer , 0 , len ) ; len = in read ( buffer ) ; } } finally { if ( out ! = null ) { out close ( ) ; } if ( in ! = null ) { in close ( ) ; } } } else { compression input stream in = null ; try { in = codec create input stream ( new java io file input stream ( args [ i ] ) ) ; byte [ ] buffer = new byte [ 100 ] ; int len = in read ( buffer ) ; while ( len > 0 ) { system out write ( buffer , 0 , len ) ; len = in read ( buffer ) ; } } finally { if ( in ! = null ) { in close ( ) ; } } } } } } }


sets the streaming context environment to a test stream environment that runs its programs on the given cluster with the given default parallelism and the specified jar files and class paths

public static void set as context ( final mini cluster mini cluster , final int parallelism , final collection < path > jar files , final collection < url > classpaths ) { stream execution environment factory factory = conf - > { test stream environment env = new test stream environment ( mini cluster , parallelism , jar files , classpaths ) ; env configure ( conf , env get user classloader ( ) ) ; return env ; } ; initialize context environment ( factory ) ; }


private boolean is mount entry ( string path ) { return router get quota manager ( ) is mount entry ( path ) ; }


explicitly set the analyzer to use defaults to use explicit mapping config for the field , or , if not set , the default search analyzer

public match phrase prefix query builder analyzer ( string analyzer ) { this analyzer = analyzer ; return this ; }


whether the current node with the given cluster state is locked into the cluster with the uuid returned by { @ link # cluster u u i d ( ) } , meaning that it will not accept any cluster state with a different cluster u u i d

public boolean cluster u u i d committed ( ) { return this cluster u u i d committed ; }


set the ( new ) value of the { @ code access - control - request - method } request header

public void set access control request method ( @ nullable http method request method ) { set or remove ( access control request method , ( request method ! = null ? request method name ( ) : null ) ) ; }


< code > map & lt ; string , org apache dubbo common serialize protobuf model phone number & gt ; double map = 9 ; < code >

public builder put all double map ( java util map < string , phone number > values ) { internal get mutable double map ( ) get mutable map ( ) put all ( values ) ; return this ; }


public void shutdown ( ) throws nacos exception { server list clear ( ) ; member address infos clear ( ) ; info report task shutdown ( ) ; lookup factory destroy ( ) ; }


workaround for android bug : https : code google compandroidissuesdetail ? id = 53313

public void on task removed ( intent root intent ) { intent intent = new intent ( this , dummy activity class ) ; intent add flags ( intent flag activity new task ) ; start activity ( intent ) ; }


gets the b register number , as a code unit this will throw if the value is out of the range of an unsigned code unit

public final short get b unit ( ) { int b = get b ( ) ; if ( ( b & ~ 0xffff ) ! = 0 ) { throw new dex exception ( " register b out of range : " + hex u 8 ( b ) ) ; } return ( short ) b ; }


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

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


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

public static < t > find executor < t > find first async ( final class < t > model class , final boolean is eager ) { return operator find first async ( model class , is eager ) ; }


factory method of { @ link headless method key }

static headless method key create ( string method name , string descriptor ) { return new auto value headless method key ( method name , descriptor ) ; }


closes the high availability services ( releasing all resources ) and deletes all data stored by these services in external stores after this method was called , the any job or session that was managed by these high availability services will be unrecoverable if an exception occurs during cleanup , this method will attempt to continue the cleanup and report exceptions only after all cleanup steps have been attempted

void close and cleanup all data ( ) throws exception ;


dump all the bytes in the given data buffer , and returns them as a byte array note that this method reads the entire buffer into the heap , which might consume a lot of memory

public static byte [ ] dump bytes ( data buffer buffer ) { assert not null ( buffer , " ' buffer ' must not be null " ) ; byte [ ] bytes = new byte [ buffer readable byte count ( ) ] ; buffer read ( bytes ) ; return bytes ; }


registers the given { @ code closeable } to be closed when this { @ code closer } is { @ linkplain # close closed }

public < c extends closeable > c register ( @ nullable c closeable ) { if ( closeable ! = null ) { stack add first ( closeable ) ; } return closeable ; }


in case we have 10 internal blocks on 5 racks , where 9 of blocks are live and 1 decommissioning , make sure the reconstruction happens correctly

public void test reconstruction with decommission ( ) throws exception { final string [ ] rack names = get racks ( data blocks + parity blocks + 2 , data blocks ) ; final string [ ] host names = get hosts ( data blocks + parity blocks + 2 ) ; / / we now have 11 hosts on 6 racks with distribution : 2 - 2 - 2 - 2 - 2 - 1 cluster = new mini d f s cluster builder ( conf ) racks ( rack names ) hosts ( host names ) num data nodes ( host names length ) build ( ) ; cluster wait active ( ) ; fs = cluster get file system ( ) ; fs enable erasure coding policy ( striped file test util get default e c policy ( ) get name ( ) ) ; fs set erasure coding policy ( new path ( " / " ) , striped file test util get default e c policy ( ) get name ( ) ) ; final block manager bm = cluster get namesystem ( ) get block manager ( ) ; final datanode manager dm = bm get datanode manager ( ) ; / / stop h 9 and h 1 0 and create a file with 6 + 3 internal blocks mini d f s cluster data node properties h 9 = stop data node ( host names [ host names length - 3 ] ) ; mini d f s cluster data node properties h 1 0 = stop data node ( host names [ host names length - 2 ] ) ; final path file = new path ( " / foo " ) ; d f s test util create file ( fs , file , cell size * data blocks * 2 , ( short ) 1 , 0l ) ; final block info block info = cluster get namesystem ( ) get f s directory ( ) get i node ( file to string ( ) ) as file ( ) get last block ( ) ; / / bring h 9 back cluster restart data node ( h 9 ) ; cluster wait active ( ) ; / / stop h 1 1 so that the reconstruction happens mini d f s cluster data node properties h 1 1 = stop data node ( host names [ host names length - 1 ] ) ; boolean recovered = bm count nodes ( block info ) live replicas ( ) > = data blocks + parity blocks ; for ( int i = 0 ; i < 10 & ! recovered ; i + + ) { thread sleep ( 1000 ) ; recovered = bm count nodes ( block info ) live replicas ( ) > = data blocks + parity blocks ; } assert assert true ( recovered ) ; / / mark h 9 as decommissioning data node datanode 9 = get data node ( host names [ host names length - 3 ] ) ; assert assert not null ( datanode 9 ) ; final datanode descriptor dn 9 = dm get datanode ( datanode 9 get datanode id ( ) ) ; dn 9 start decommission ( ) ; / / restart h 1 0 and h 1 1 cluster restart data node ( h 1 0 ) ; cluster restart data node ( h 1 1 ) ; cluster wait active ( ) ; data node test utils trigger block report ( get data node ( host names [ host names length - 1 ] ) ) ; / / start decommissioning h 9 boolean satisfied = bm is placement policy satisfied ( block info ) ; assert assert false ( satisfied ) ; final datanode admin manager decom manager = ( datanode admin manager ) whitebox get internal state ( dm , " datanode admin manager " ) ; cluster get namesystem ( ) write lock ( ) ; try { dn 9 stop decommission ( ) ; decom manager start decommission ( dn 9 ) ; } finally { cluster get namesystem ( ) write unlock ( ) ; } / / make sure the decommission finishes and the block in on 6 racks boolean decommissioned = dn 9 is decommissioned ( ) ; for ( int i = 0 ; i < 10 & & ! decommissioned ; i + + ) { thread sleep ( 1000 ) ; decommissioned = dn 9 is decommissioned ( ) ; } assert assert true ( decommissioned ) ; assert assert true ( bm is placement policy satisfied ( block info ) ) ; }


repository change event [ ] get events ( ) throws interrupted i o exception { repository handle handle ; synchronized ( server adapter ) { / / be careful with synchronization since get events will block / / until an event occurs if ( repository = = null ) { throw new interrupted i o exception ( ) ; } handle = repository ; } try { return handle get events ( ) ; } catch ( not connected exception | remote exception e ) { / / initiate recover - dispatcher will be restarted recover connection ( e ) ; throw new interrupted i o exception ( ) ; } catch ( i o exception e ) { synchronized ( server adapter ) { if ( ! thread current thread ( ) is interrupted ( ) ) { server adapter verify connection ( ) ; disconnect ( true , true ) ; } } throw new interrupted i o exception ( ) ; } }


the symbol status of this entry , which includes visibility information < code > optional aapt pb symbol status symbol status = 3 ; < code >


sock js service registration with sock j s ( ) ;


create a close - suppressing proxy for the given hibernate session the proxy also prepares returned query and criteria objects

protected session create session proxy ( session session ) { return ( session ) proxy new proxy instance ( session get class ( ) get class loader ( ) , new class < ? > [ ] { session class } , new close suppressing invocation handler ( session ) ) ; }


gets the string with the specified key from this bundle or one of its parent after replacing the given arguments if they occur

public string format ( string key , object args ) { return formatter format ( get ( key ) , args ) ; }


get the cluster info otherwise provided when sending an http request to ' '

public final main response info ( request options options ) throws i o exception { return perform request and parse entity ( new main request ( ) , ( request ) - > request converters info ( ) , options , main response : : from x content , empty set ( ) ) ; }


string value includes statistics as well as stream state < b > important : there are no guarantees as to the stability of this value < b >

public string to string ( ) { string s = stream statistics to string ( ) ; synchronized ( this ) { final string builder sb = new string builder ( " select input stream { " ) ; sb append ( uri ) ; sb append ( " ; state " ) append ( ! closed get ( ) ? " open " : " closed " ) ; sb append ( " ; pos = " ) append ( get pos ( ) ) ; sb append ( " ; readahead = " ) append ( readahead ) ; sb append ( ' \ n ' ) append ( s ) ; sb append ( ' } ' ) ; return sb to string ( ) ; } }


extract the invocation result from the response message the default implementation expects a jms { @ link javax jms object message } carrying a { @ link remote invocation result } object if an invalid response message is encountered , the { @ code on invalid response } callback gets invoked

protected remote invocation result extract invocation result ( message response message ) throws j m s exception { object content = this message converter from message ( response message ) ; if ( content instanceof remote invocation result ) { return ( remote invocation result ) content ; } return on invalid response ( response message ) ; }


the total number of lookups in the cache

public long get total count ( ) { return hit count + miss count ; }


protected void put cas response attributes into model ( final map < string , object > model , final map < string , object > attributes , final registered service registered service , final cas protocol attributes renderer attributes renderer ) { logger trace ( " beginning to encode attributes for the response " ) ; val web application service = get service from ( model ) ; val encoded attributes = protocol attribute encoder encode attributes ( attributes , registered service , web application service ) ; logger debug ( " encoded attributes for the response are [ { } ] " , encoded attributes ) ; put into model ( model , cas protocol constants validation cas model attribute name attributes , encoded attributes ) ; val formatted attributes = attributes renderer render ( encoded attributes ) ; put into model ( model , cas protocol constants validation cas model attribute name formatted attributes , formatted attributes ) ; }


public big decimal get number prop ( ) { return number prop or else ( null ) ; }


protected path get create file ( ) { path fn = get finder ( ) get file ( ) ; return fn ; }


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

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


adds book to collection actually we are putting copy of book ( saving a book by value , not by reference ) ;

public void add ( book book ) throws book duplicate exception { if ( collection contains key ( book get id ( ) ) ) { throw new book duplicate exception ( " duplicated book with id : " + book get id ( ) ) ; } / / add copy of the book collection put ( book get id ( ) , new book ( book ) ) ; }


void set class loader ( class loader class loader ) { try { class < ? > recognizer factory impl class = class loader load class ( " io seata sqlparser druid druid s q l recognizer factory impl " ) ; constructor < ? > impl constructor = recognizer factory impl class get declared constructor ( ) ; impl constructor set accessible ( true ) ; try { recognizer factory impl = ( s q l recognizer factory ) impl constructor new instance ( ) ; } finally { impl constructor set accessible ( false ) ; } } catch ( exception e ) { throw new s q l parsing exception ( e ) ; } }


yui internally partially relies on set timeoutset interval when we add a new chunk of html to the page so wait for the completion of it to see where such asynchronous activity is happening , set a breakpoint to { @ link java script job manager impl # add job ( java script job , page ) } and look at the call stack also see { @ link # js debugger } at that time to see the java script callstack

private void wait for java script ( html page p ) { p get enclosing window ( ) get job manager ( ) wait for jobs starting before ( 500 ) ; }


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

public com alibaba nacos istio model mcp sink node get sink node ( ) { if ( sink node builder = = null ) { return sink node = = null ? com alibaba nacos istio model mcp sink node get default instance ( ) : sink node ; } else { return sink node builder get message ( ) ; } }


{ @ inherit doc } this implementation is empty

public void configure handler exception resolvers ( list < handler exception resolver > exception resolvers ) { }


get a client handle to the dfs cluster for the namenode at given index

public distributed file system get file system ( int nn index ) throws i o exception { return ( distributed file system ) add file system ( file system get ( get u r i ( nn index ) , get n n ( nn index ) conf ) ) ; }


returns an ordering that compares objects according to the order in which they appear in the given list only objects present in the list ( according to { @ link object # equals } ) may be compared this comparator imposes a " partial ordering " over the type { @ code t } subsequent changes to the { @ code values in order } list will have no effect on the returned comparator null values in the list are not supported the returned comparator throws a { @ link class cast exception } when it receives an input parameter that isn ' t among the provided values the generated comparator is serializable if all the provided values are serializable

public static < t > ordering < t > explicit ( list < t > values in order ) { return new explicit ordering < t > ( values in order ) ; }


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