returns an immutable set containing each of { @ code elements } , minus duplicates , in the order each appears first in the source iterable this method iterates over { @ code elements } only once < b > performance note : < b > this method will sometimes recognize that the actual copy operation is unnecessary ; for example , { @ code copy of ( copy of ( an array list ) ) } should copy the data only once this reduces the expense of habitually making defensive copies at api boundaries however , the precise conditions for skipping the copy operation are undefined

public static < e > immutable set < e > copy of ( iterable < ? extends e > elements ) { return ( elements instanceof collection ) ? copy of ( ( collection < ? extends e > ) elements ) : copy of ( elements iterator ( ) ) ; }


returns the ' remember me ' cookie if set , otherwise return null we don ' t care about the type , only whether it ' s null

private object get remember me cookie ( web client wc ) { return wc get cookie manager ( ) get cookie ( abstract remember me services spring security remember me cookie key ) ; }


determine the appropriate boxing instruction for a specific type ( if it needs boxing ) and insert the instruction into the supplied visitor

public static void insert box if necessary ( method visitor mv , @ nullable string descriptor ) { if ( descriptor ! = null & & descriptor length ( ) = = 1 ) { insert box if necessary ( mv , descriptor char at ( 0 ) ) ; } }


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


determines if this cie is in the debug frame section

public boolean is in debug frame ( ) { return is in debug frame ; }


return a resource bundle for the given basename and locale , fetching already generated resource bundle from the cache

protected resource bundle get resource bundle ( string basename , locale locale ) { if ( get cache millis ( ) > = 0 ) { / / fresh resource bundle get bundle call in order to let resource bundle / / do its native caching , at the expense of more extensive lookup steps return do get bundle ( basename , locale ) ; } else { / / cache forever : prefer locale cache over repeated get bundle calls map < locale , resource bundle > locale map = this cached resource bundles get ( basename ) ; if ( locale map ! = null ) { resource bundle bundle = locale map get ( locale ) ; if ( bundle ! = null ) { return bundle ; } } try { resource bundle bundle = do get bundle ( basename , locale ) ; if ( locale map = = null ) { locale map = this cached resource bundles compute if absent ( basename , bn - > new concurrent hash map < > ( ) ) ; } locale map put ( locale , bundle ) ; return bundle ; } catch ( missing resource exception ex ) { if ( logger is warn enabled ( ) ) { logger warn ( " resource bundle [ " + basename + " ] not found for message source : " + ex get message ( ) ) ; } / / assume bundle not found / / - > do not throw the exception to allow for checking parent message source return null ; } } }


build a form - encoding request body with the given form parameters

public request body build request body form encoding ( map < string , object > form params ) { okhttp 3 form body builder form builder = new okhttp 3 form body builder ( ) ; for ( entry < string , object > param : form params entry set ( ) ) { form builder add ( param get key ( ) , parameter to string ( param get value ( ) ) ) ; } return form builder build ( ) ; }


when we load a new patch , we need to rewrite the patch info file but patch info corrupted , we can ' t recover from it we can clean patch as { @ link default load reporter # on load patch info corrupted ( string , string , file ) }

void on load patch info corrupted ( string old version , string new version , file patch info file ) ;


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


prepare a response for a request matching the provided matcher if the matcher does not match , { @ link kafka client # send ( client request , long ) } will throw illegal state exception

public void prepare response ( request matcher matcher , abstract response response , boolean disconnected ) { prepare response from ( matcher , response , null , disconnected , false ) ; }


applies an aggregation that gives the minimum element of every window of the data stream by the given position if more elements have the same minimum value the operator returns the first element by default

public single output stream operator < t > min by ( int position to min by ) { return this min by ( position to min by , true ) ; }


returns true if this network allows self - loops ( edges that connect a node to itself ) attempting to add a self - loop to a network that does not allow them will throw an { @ link illegal argument exception }


get the total time in nanoseconds for all tasks

public long get total time nanos ( ) { return this total time nanos ; }


tests that bridge methods are not subscribed to events in java 8 , annotations are included on the bridge method in addition to the original method , which causes both the original and bridge methods to be subscribed ( since both are annotated @ subscribe ) without specifically checking for bridge methods

public void test registration with bridge method ( ) { final atomic integer calls = new atomic integer ( ) ; bus register ( new callback < string > ( ) { @ subscribe @ override public void call ( string s ) { calls increment and get ( ) ; } } ) ; bus post ( " hello " ) ; assert equals ( 1 , calls get ( ) ) ; }


returns the location of the start of this syntax node

public final location get start location ( ) { return locs get location ( get start offset ( ) ) ; }


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

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


public synchronized void sync ( ) throws i o exception { if ( no buffered records > 0 ) { super sync ( ) ; / / no of records writable utils write v int ( out , no buffered records ) ; / / write ' keys ' and lengths write buffer ( key len buffer ) ; write buffer ( key buffer ) ; / / write ' values ' and lengths write buffer ( val len buffer ) ; write buffer ( val buffer ) ; / / flush the file - stream out flush ( ) ; / / reset internal states key len buffer reset ( ) ; key buffer reset ( ) ; val len buffer reset ( ) ; val buffer reset ( ) ; no buffered records = 0 ; } }


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


read a file served entirely from one dn seek around and read from different offsets and verify that they all use the same socket

public void test read from one d n ( ) throws exception { hdfs configuration configuration = new hdfs configuration ( ) ; / / one of the goals of this test is to verify that we don ' t open more / / than one socket so use a different client context , so that we / / get our own socket cache , rather than sharing with the other test / / instances also use a really long socket timeout so that nothing / / gets closed before we get around to checking the cache size at the end final string context name = " test read from one d n context " ; configuration set ( hdfs client config keys dfs client context , context name ) ; configuration set long ( hdfs client config keys dfs client socket timeout key , 100000000l ) ; block reader test util util = new block reader test util ( 1 , configuration ) ; final path test file = new path ( " / test conn cache dat " ) ; byte authentic data [ ] = util write file ( test file , file size / 1024 ) ; d f s client client = new d f s client ( new inet socket address ( " localhost " , util get cluster ( ) get name node port ( ) ) , util get conf ( ) ) ; d f s input stream in = client open ( test file to string ( ) ) ; log info ( " opened " + test file to string ( ) ) ; byte [ ] data buf = new byte [ block size ] ; / / initial read pread ( in , 0 , data buf , 0 , data buf length , authentic data ) ; / / read again and verify that the socket is the same pread ( in , file size - data buf length , data buf , 0 , data buf length , authentic data ) ; pread ( in , 1024 , data buf , 0 , data buf length , authentic data ) ; / / no seek ; just read pread ( in , - 1 , data buf , 0 , data buf length , authentic data ) ; pread ( in , 64 , data buf , 0 , data buf length / 2 , authentic data ) ; in close ( ) ; client close ( ) ; assert assert equals ( 1 , client context get from conf ( configuration ) get peer cache ( ) size ( ) ) ; }


send heartbeat invoke message to the next instance

public void send heartbeat invoke message ( int current id ) { var next instance = this find next instance ( current id ) ; var heartbeat invoke message = new message ( message type heartbeat invoke , " " ) ; next instance on message ( heartbeat invoke message ) ; }


creates list of users with given input array

public void create users with array input ( @ valid list < user > body ) ;


return the number of idle objects in the pool

int get idle count ( ) throws unsupported operation exception ;


public long get number of triplets ( ) { return triplet count ; }


test adding one volume on a running mini d f s cluster with only one name node

public void test add one new volume ( ) throws i o exception , reconfiguration exception , interrupted exception , timeout exception { start d f s cluster ( 1 , 1 ) ; string bpid = cluster get namesystem ( ) get block pool id ( ) ; final int num blocks = 10 ; add volumes ( 1 ) ; path test file = new path ( " / test " ) ; create file ( test file , num blocks ) ; list < map < datanode storage , block list as longs > > block reports = cluster get all block reports ( bpid ) ; assert equals ( 1 , block reports size ( ) ) ; / / 1 data node assert equals ( 3 , block reports get ( 0 ) size ( ) ) ; / / 3 volumes / / f s volume list uses round - robin block chooser by default thus the new / / blocks should be evenly located in all volumes int min num blocks = integer max value ; int max num blocks = integer min value ; for ( block list as longs block list : block reports get ( 0 ) values ( ) ) { min num blocks = math min ( min num blocks , block list get number of blocks ( ) ) ; max num blocks = math max ( max num blocks , block list get number of blocks ( ) ) ; } assert true ( math abs ( max num blocks - min num blocks ) < = 1 ) ; verify file length ( cluster get file system ( ) , test file , num blocks ) ; }


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


creates a schematic from a world selection

public schematic create ( int x , int y , int x 2 , int y 2 ) { normalize result result = placement normalize area ( x , y , x 2 , y 2 , 0 , false , max schematic size ) ; x = result x ; y = result y ; x 2 = result x 2 ; y 2 = result y 2 ; int ox = x , oy = y , ox 2 = x 2 , oy 2 = y 2 ; seq < stile > tiles = new seq < > ( ) ; int minx = x 2 , miny = y 2 , maxx = x , maxy = y ; boolean found = false ; for ( int cx = x ; cx < = x 2 ; cx + + ) { for ( int cy = y ; cy < = y 2 ; cy + + ) { building linked = world build ( cx , cy ) ; if ( linked ! = null & & ( linked block is visible ( ) | | linked block ( ) instanceof core block ) & & ! ( linked block instanceof construct block ) ) { int top = linked block size / 2 ; int bot = linked block size % 2 = = 1 ? - linked block size / 2 : - ( linked block size - 1 ) / 2 ; minx = math min ( linked tile x ( ) + bot , minx ) ; miny = math min ( linked tile y ( ) + bot , miny ) ; maxx = math max ( linked tile x ( ) + top , maxx ) ; maxy = math max ( linked tile y ( ) + top , maxy ) ; found = true ; } } } if ( found ) { x = minx ; y = miny ; x 2 = maxx ; y 2 = maxy ; } else { return new schematic ( new seq < > ( ) , new string map ( ) , 1 , 1 ) ; } int width = x 2 - x + 1 , height = y 2 - y + 1 ; int offset x = - x , offset y = - y ; int set counted = new int set ( ) ; for ( int cx = ox ; cx < = ox 2 ; cx + + ) { for ( int cy = oy ; cy < = oy 2 ; cy + + ) { building tile = world build ( cx , cy ) ; if ( tile ! = null & & ! counted contains ( tile pos ( ) ) & & ! ( tile block instanceof construct block ) & & ( tile block is visible ( ) | | tile block instanceof core block ) ) { object config = tile config ( ) ; tiles add ( new stile ( tile block , tile tile x ( ) + offset x , tile tile y ( ) + offset y , config , ( byte ) tile rotation ) ) ; counted add ( tile pos ( ) ) ; } } } return new schematic ( tiles , new string map ( ) , width , height ) ; }


public x get current value ( ) throws i o exception , interrupted exception { return value ; }


method to prepare the service registry for testing implementing classes may override this if more is necessary

protected void initialize service registry ( ) { }


returns true if this maybe subject has been completed

public boolean has complete ( ) { return observers get ( ) = = terminated & & value = = null & & error = = null ; }


returns a callable starlark value that implements the build or workspace rule " rule class " ( e g cc library ) in the specified package context

private static starlark callable new rule function ( final rule factory rule factory , final string rule class name , final boolean allow override ) { return new starlark callable ( ) { @ override public string get name ( ) { return rule class name ; } @ override public string to string ( ) { return get name ( ) + " ( ) " ; } @ override public boolean is immutable ( ) { return true ; } @ override public void repr ( printer printer ) { printer append ( " < built - in function " + get name ( ) + " > " ) ; } @ override public object call ( starlark thread thread , tuple args , dict < string , object > kwargs ) throws eval exception , interrupted exception { if ( ! args is empty ( ) ) { throw new eval exception ( " unexpected positional arguments " ) ; } try { package builder builder = package factory get context ( thread ) pkg builder ; / / todo ( adonovan ) : this doesn ' t look safe ! string external repo name = ( string ) kwargs get ( " name " ) ; if ( ! allow override & & external repo name ! = null & & builder get target ( external repo name ) ! = null ) { throw starlark errorf ( " cannot redefine repository after any load statement in the workspace file ( for " + " repository ' % s ' ) " , external repo name ) ; } / / add an entry in every repository from @ < main repo name > to " @ " to avoid treating / / @ < main repo name > as a separate repository this will be overridden if the main / / repository has a repo mapping entry from < main repo name > to something workspace factory helper add main repo entry ( builder , external repo name , thread get semantics ( ) ) ; workspace factory helper add repo mappings ( builder , kwargs , external repo name ) ; rule class rule class = rule factory get rule class ( rule class name ) ; rule class bind rule class = rule factory get rule class ( " bind " ) ; rule rule = workspace factory helper create and add repository rule ( builder , rule class , bind rule class , workspace factory helper get final kwargs ( kwargs ) , thread get semantics ( ) , thread get call stack ( ) ) ; if ( ! workspace globals is legal workspace name ( rule get name ( ) ) ) { throw starlark errorf ( " % s ' s name field must be a legal workspace name ; workspace names may contain only " + " a - z , a - z , 0 - 9 , ' - ' , ' ' and ' ' " , rule ) ; } } catch ( rule factory invalid rule exception | package name conflict exception | label syntax exception e ) { throw new eval exception ( e ) ; } return starlark none ; } } ; }


hook to convert each encountered map value the default implementation simply returns the passed - in value as - is can be overridden to perform conversion of certain values , for example from string to integer only called if actually creating a new map ! this is by default not the case if the type of the passed - in map already matches override { @ link # always create new map ( ) } to enforce creating a new map in every case

protected object convert value ( object value ) { return value ; }


computes the allocation of a stage inside a defined time interval

map < reservation interval , resource > compute stage allocation ( plan plan , r l e sparse resource allocation plan loads , r l e sparse resource allocation plan modifications , reservation request rr , long stage arrival , long stage deadline , long period , string user , reservation id old id ) throws planning exception ;


public cc compilation helper set generate pic action ( boolean generate pic action ) { this generate pic action = generate pic action ; return this ; }


returns a new { @ code closing future } pipeline step derived from the inputs by applying a combining function to their values the function can use a { @ link deferred closer } to capture objects to be closed when the pipeline is done if this combiner was returned by { @ link # when all succeed ( closing future , closing future , closing future , closing future , closing future ) } and any of the inputs fail , so will the returned step if the function throws a { @ code cancellation exception } , the pipeline will be cancelled if the function throws an { @ code execution exception } , the cause of the thrown { @ code execution exception } will be extracted and used as the failure of the derived step

public < u extends object > closing future < u > call ( final closing function 5 < v1 , v2 , v3 , v4 , v5 , u > function , executor executor ) { return call ( new combining callable < u > ( ) { @ override @ nullable decl public u call ( deferred closer closer , peeker peeker ) throws exception { return function apply ( closer , peeker get done ( future 1 ) , peeker get done ( future 2 ) , peeker get done ( future 3 ) , peeker get done ( future 4 ) , peeker get done ( future 5 ) ) ; } @ override public string to string ( ) { return function to string ( ) ; } } , executor ) ; }


returns a list of all functions in the global namespace with the given name

public final list < function > get global functions ( string name ) { return current program get listing ( ) get global functions ( name ) ; }


move some ( not all ) of the entries from the left node into the right node

private static void move keys right ( long key interior node left node , long key interior node right node , int count ) { int left key count = left node key count ; int right key count = right node key count ; int left offset = base + ( ( left key count - count ) * entry size ) ; int len = count * entry size ; right node buffer move ( base , base + len , right key count * entry size ) ; right node buffer copy ( base , left node buffer , left offset , len ) ; left node set key count ( left key count - count ) ; right node set key count ( right key count + count ) ; }


gets the value from an entry returns null if the entry is invalid , partially - collected , loading , or expired unlike { @ link segment # get live value } this method does not attempt to cleanup stale entries as such it should only be called outside of a segment context , such as during iteration

v get live value ( reference entry < k , v > entry , long now ) { if ( entry get key ( ) = = null ) { return null ; } v value = entry get value reference ( ) get ( ) ; if ( value = = null ) { return null ; } if ( is expired ( entry , now ) ) { return null ; } return value ; }


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


route requests that match the given pattern to resources relative to the given root location for instance < pre class = " code " > resource location = new file system resource ( " public - resources " ) ; router function & lt ; server response & gt ; resources = router functions resources ( " resources " , location ) ;

builder resources ( string pattern , resource location ) ;


read a long , 64 - bits like data input stream read long except little endian

public final long read long ( ) throws i o exception { dis read fully ( work , 0 , 8 ) ; return ( long ) ( work [ 7 ] ) < < 56 | / * long cast needed or shift done modulo 32 * / ( long ) ( work [ 6 ] & 0xff ) < < 48 | ( long ) ( work [ 5 ] & 0xff ) < < 40 | ( long ) ( work [ 4 ] & 0xff ) < < 32 | ( long ) ( work [ 3 ] & 0xff ) < < 24 | ( long ) ( work [ 2 ] & 0xff ) < < 16 | ( long ) ( work [ 1 ] & 0xff ) < < 8 | work [ 0 ] & 0xff ; }


public static i attribute merger get attribute merger ( final string merging policy ) { switch ( merging policy to lower case ( ) ) { case " multivalued " : case " multi valued " : case " combine " : case " merge " : return new multivalued attribute merger ( ) ; case " add " : return new noncolliding attribute adder ( ) ; case " replace " : case " overwrite " : case " override " : return new replacing attribute adder ( ) ; case " none " : return new base additive attribute merger ( ) { @ override protected map < string , list < object > > merge person attributes ( final map < string , list < object > > to modify , final map < string , list < object > > to consider ) { return new linked hash map < > ( to modify ) ; } } ; default : throw new illegal argument exception ( " unsupported merging policy [ " + merging policy + ' ] ' ) ; } }


check that as well as skipping old appenders , logger references to them are also skipped

public void test transform skips old appender refs ( ) { list < string > input = list of ( " logger index indexing slowlog appender ref index indexing slowlog rolling old ref = index indexing slowlog rolling old " ) ; run test ( input , list of ( ) ) ; }


returns the maximum sequence number of either update or delete operations have been processed in this shard or the sequence number from { @ link # advance max seq no of updates or deletes ( long ) } an index request is considered as an update operation if it overwrites the existing documents in lucene index with the same document id the primary captures this value after executes a replication request , then transfers it to a replica before executing that replication request on a replica

public long get max seq no of updates or deletes ( ) { return get engine ( ) get max seq no of updates or deletes ( ) ; }


gets the forced refresh interval in nanoseconds

public long get refresh force interval nanos ( ) { return refresh force interval nanos ; }


generate index table schema for specified primary table and index column

private static schema get index table schema ( table primary table , int col index ) { schema primary schema = primary table get schema ( ) ; field indexed field = primary schema get field ( col index ) ; field primary key type = primary schema get key field type ( ) ; index field index key field = new index field ( indexed field , primary key type ) ; return new schema ( 0 , index key field , " index key " , fields , field names ) ; }


match current input symbol as a wildcard if the symbol type matches ( i e has a value greater than 0 ) , { @ link a n t l r error strategy # report match } and { @ link # consume } are called to complete the match process if the symbol type does not match , { @ link a n t l r error strategy # recover inline } is called on the current error strategy to attempt recovery if { @ link # get build parse tree } is { @ code true } and the token index of the symbol returned by { @ link a n t l r error strategy # recover inline } is - 1 , the symbol is added to the parse tree by calling { @ link parser # create error node ( parser rule context , token ) } then { @ link parser rule context # add error node ( error node ) }

public token match wildcard ( ) throws recognition exception { token t = get current token ( ) ; if ( t get type ( ) > 0 ) { err handler report match ( this ) ; consume ( ) ; } else { t = err handler recover inline ( this ) ; if ( build parse trees & & t get token index ( ) = = - 1 ) { / / we must have conjured up a new token during single token insertion / / if it ' s not the current symbol ctx add error node ( create error node ( ctx , t ) ) ; } } return t ; }


public void test simple writable ( ) throws exception { test writable ( new simple writable ( ) ) ; }


return the { @ link byte buf } on the specified index

public byte buf component ( int c index ) { check component index ( c index ) ; return components [ c index ] duplicate ( ) ; }


list of all products in an entity representation

public list < product > get products ( ) { return products ; }


write a byte sequences to the current entry ;

default block builder write bytes ( slice source , int source index , int length ) { throw new unsupported operation exception ( get class ( ) get name ( ) ) ; }


sets the compression algorithm to use for the call may only be called before sending any messages default g r p c servers support the " gzip " compressor it is safe to call this even if the client does not support the compression format chosen the implementation will handle negotiation with the client and may fall back to no compression

public abstract void set compression ( string compression ) ;


returns the wrapped krakatau disassembler instance

public static decompiler get krakatau disassembler ( ) { return decompiler krakatau d a ; }


returns an array containing all offcut xref addresses to the specified code unit

public final static address [ ] get offcut x ref list ( code unit cu ) { return get offcut x ref list ( cu , - 1 ) ; / / get all }


if given context is an instance of listenable activity then creates new instance of weak reference activity listener adapter and adds it to activity ' s listeners

public static void register ( activity listener activity listener , context context ) { listenable activity activity = get listenable activity ( context ) ; if ( activity ! = null ) { listener listener = new listener ( activity listener ) ; activity add activity listener ( listener ) ; } }


if we don ' t read the bytes of the source , they json reader doesn ' t lose its place

public void next source not consumed ( ) throws i o exception { / / language = json json reader reader = new reader ( " { \ " a \ " : \ " b \ " , \ " c \ " : \ " d \ " } " ) ; reader begin object ( ) ; assert that ( reader next name ( ) ) is equal to ( " a " ) ; reader next source ( ) ; / / not closed assert that ( reader next name ( ) ) is equal to ( " c " ) ; assert that ( reader next string ( ) ) is equal to ( " d " ) ; }


public long get parent pointer ( ) { return parent pointer ; }


public static string bytes 2hex ( byte [ ] bs , int off , int len ) { if ( off < 0 ) { throw new index out of bounds exception ( " bytes 2hex : offset < 0 , offset is " + off ) ; } if ( len < 0 ) { throw new index out of bounds exception ( " bytes 2hex : length < 0 , length is " + len ) ; } if ( off + len > bs length ) { throw new index out of bounds exception ( " bytes 2hex : offset + length > array length " ) ; } byte b ; int r = off , w = 0 ; char [ ] cs = new char [ len * 2 ] ; for ( int i = 0 ; i < len ; i + + ) { b = bs [ r + + ] ; cs [ w + + ] = base16 [ b > > 4 & mask4 ] ; cs [ w + + ] = base16 [ b & mask4 ] ; } return new string ( cs ) ; }


set the value for the specified { @ link field }

static < t > t set field value ( object object , string field name , t value ) { return set field value ( object , find field ( object , field name ) , value ) ; }


return the list of keys of components contributing to this internal node we have no need for this in production but it is useful information to have while debugging therefor this list will only contain the root component if running in production mode

public list < string > get component keys ( ) { return m component global keys ; }


override the default { @ link s s l socket factory } and enable tls negotiation

public ok http channel builder ssl socket factory ( s s l socket factory factory ) { preconditions check state ( ! freeze security configuration , " cannot change security when using channel credentials " ) ; this ssl socket factory = factory ; negotiation type = negotiation type tls ; return this ; }


returns the children of this value as a newly allocated float array

public float [ ] as float array ( ) { if ( type ! = value type array ) throw new illegal state exception ( " value is not an array : " + type ) ; float [ ] array = new float [ size ] ; int i = 0 ; for ( json value value = child ; value ! = null ; value = value next , i + + ) { float v ; switch ( value type ) { case string value : v = float parse float ( value string value ) ; break ; case double value : v = ( float ) value double value ; break ; case long value : v = value long value ; break ; case boolean value : v = value long value ! = 0 ? 1 : 0 ; break ; default : throw new illegal state exception ( " value cannot be converted to float : " + value type ) ; } array [ i ] = v ; } return array ; }


create a shared connection for this container the default implementation creates a standard connection and prepares it through { @ link # prepare shared connection }

protected connection create shared connection ( ) throws j m s exception { connection con = create connection ( ) ; try { prepare shared connection ( con ) ; return con ; } catch ( j m s exception ex ) { jms utils close connection ( con ) ; throw ex ; } }


public integer get integer ( ) { return integer ; }


test that unknown query names in the clauses throw an error

public void test unknown query name ( ) throws i o exception { string query = " { \ " bool \ " : { \ " must \ " : { \ " unknown query \ " : { } } } } " ; x content parse exception ex = expect throws ( x content parse exception class , ( ) - > parse query ( query ) ) ; assert equals ( " [ 1 : 41 ] [ bool ] failed to parse field [ must ] " , ex get message ( ) ) ; throwable e = ex get cause ( ) ; assert that ( e get message ( ) , contains string ( " unknown query [ unknown query ] " ) ) ; }


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


void update track selection ( track selection track selection ) ;


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


the extra takes on the stream should give enough time for all of the measured latencies to age out

public void test multiple buckets both get stored and then age out ( ) { hystrix command key key = hystrix command key factory as key ( " cmd - latency - i " ) ; stream = rolling command latency distribution stream get instance ( key , 10 , 100 ) ; stream start caching stream values if unstarted ( ) ; final count down latch latch = new count down latch ( 1 ) ; stream observe ( ) take ( 30 ) subscribe ( new subscriber < cached values histogram > ( ) { @ override public void on completed ( ) { latch count down ( ) ; } @ override public void on error ( throwable e ) { fail ( e get message ( ) ) ; } @ override public void on next ( cached values histogram distribution ) { system out println ( system current time millis ( ) + " : " + thread current thread ( ) get name ( ) + " received distribution with count : " + distribution get total count ( ) + " and mean : " + distribution get mean ( ) ) ; if ( distribution get total count ( ) = = 2 ) { assert between ( 55 , 90 , ( int ) distribution get mean ( ) ) ; } if ( distribution get total count ( ) = = 5 ) { assert equals ( 60 , 90 , ( long ) distribution get mean ( ) ) ; } } } ) ; command cmd 1 = command from ( group key , key , hystrix event type success , 10 ) ; command cmd 2 = command from ( group key , key , hystrix event type failure , 100 ) ; cmd 1 observe ( ) ; cmd 2 observe ( ) ; try { thread sleep ( 500 ) ; } catch ( interrupted exception ie ) { fail ( " interrupted ex " ) ; } command cmd 3 = command from ( group key , key , hystrix event type success , 60 ) ; command cmd 4 = command from ( group key , key , hystrix event type success , 60 ) ; command cmd 5 = command from ( group key , key , hystrix event type success , 70 ) ; cmd 3 observe ( ) ; cmd 4 observe ( ) ; cmd 5 observe ( ) ; try { assert true ( latch await ( 10000 , time unit milliseconds ) ) ; } catch ( interrupted exception ex ) { fail ( " interrupted ex " ) ; } assert equals ( 0 , stream get latest ( ) get total count ( ) ) ; }


public void close ( ) throws s q l exception { closed = true ; }


test deleting snapshots in more complicated scenarios ( snapshot diffs are distributed in the directory sub - tree )

public void test combine snapshot diff 2 ( ) throws exception { test combine snapshot diff impl ( sub , " subsub 1 / subsubsub 1 / " , 3 ) ; }


public void write ( short u 0 , short u 1 ) { write ( u 0 ) ; write ( u 1 ) ; }


returns the difference of the given particular double value and this double value

public double value subtract from ( particular double value other ) { return subtract from ( ( specific double value ) other ) ; }


converts the provided map as a json object according to the configured json mapper

public string to json ( @ nullable map < string , object > map ) { if ( map = = null | | map is empty ( ) ) { return null ; } try ( string writer writer = new string writer ( buffer size ) ) { object mapper write value ( writer , map ) ; if ( does append line separator ) { writer append ( core constants line separator ) ; } return writer to string ( ) ; } catch ( i o exception e ) { throw new illegal argument exception ( " unable to format map as a json " , e ) ; } }


convert { @ link # get response ( ) } from x content to a map for easy processing will return an empty map if the task was finished with an error , hasn ' t yet finished , or didn ' t store its result

public map < string , object > get response as map ( ) { if ( response = = null ) { return empty map ( ) ; } return convert to map ( response , false ) v 2 ( ) ; }


creates a { @ link reentrant read write lock } with the given fairness policy and rank the values returned by { @ link enum # get declaring class ( ) } and { @ link enum # name ( ) } are used to describe the lock in warning or exception output

public reentrant read write lock new reentrant read write lock ( e rank , boolean fair ) { return policy = = policies disabled ? new reentrant read write lock ( fair ) : new cycle detecting reentrant read write lock ( lock graph nodes get ( rank ) , fair ) ; }


public boolean get prefix ns boolean ( ) { return prefix ns boolean ; }


public void add contents ( dex file file ) { type = file get type ids ( ) intern ( annotation get type ( ) ) ; value encoder add contents ( file , annotation ) ; }


filter by enableddisabled status of jobs null for no filter , true for enabled - only , false for disabled - only status filter is now controlled via a job view filter , see { @ link status filter }

public boolean get status filter ( ) { return status filter ; }


returns the interval as a date time unit if and only if it was configured as a calendar interval originally returns null otherwise

public date histogram interval get calendar interval ( ) { if ( date histogram interval get interval type ( ) equals ( date interval wrapper interval type enum calendar ) ) { return date histogram interval get as calendar interval ( ) ; } return null ; }


get the instance of noop action listener cast appropriately

public static < response > task listener < response > instance ( ) { return ( task listener < response > ) instance ; }


configure the set of custom converter objects that should be added : implementing { @ link org springframework core convert converter converter } , { @ link org springframework core convert converter converter factory } , or { @ link org springframework core convert converter generic converter }

public void set converters ( set < ? > converters ) { this converters = converters ; }


check if there are any recoveries pending in - sync

public boolean pending in sync ( ) { assert assert primary mode ( ) ; return replication tracker pending in sync ( ) ; }


returns a set of all property keys that need to have their values set because a predecessor property has been changed that may affect the valid values for this property also , any property keys that don ' t have a value in the local cache will be returned

public set < t > find affected dependants ( wizard state < t > global state ) { set < t > affected dependendants = new hash set < t > ( ) ; for ( t predecessor : dependent map key set ( ) ) { object global value = global state get ( predecessor ) ; object local value = value map get ( predecessor ) ; if ( ! system utilities is equal ( global value , local value ) ) { affected dependendants add all ( dependent map get ( predecessor ) ) ; } } for ( t dependant : dependent set ) { if ( value map get ( dependant ) = = null ) { affected dependendants add ( dependant ) ; } } return affected dependendants ; }


create a test filesystem which is always unguarded this filesystem must be closed in test teardown

private s 3 a file system create unguarded f s ( ) throws exception { s 3 a file system test f s = get file system ( ) ; configuration config = new configuration ( test f s get conf ( ) ) ; uri uri = test f s get uri ( ) ; remove base and bucket overrides ( uri get host ( ) , config , s3 metadata store impl , metadatastore authoritative , authoritative path ) ; s 3 a file system fs 2 = new s 3 a file system ( ) ; fs 2 initialize ( uri , config ) ; return fs 2 ; }


returns array of dynamic library names defined by dt needed

public string [ ] get dynamic library names ( ) { return dynamic library names ; }


public void set endpoint ( endpoint endpoint ) { this sr endpoint = endpoint ; }


public static int subscribe client count ( ) { return client records size ( ) ; }


tests if the consumed inputs of the pipelined regions are computed correctly using the job graph below c x a - + - b e \ d pipelined regions : { a } , { b , c , d , e }

public void returns incident blocking partitions ( ) throws exception { final job vertex a = execution graph test utils create no op vertex ( 1 ) ; final job vertex b = execution graph test utils create no op vertex ( 1 ) ; final job vertex c = execution graph test utils create no op vertex ( 1 ) ; final job vertex d = execution graph test utils create no op vertex ( 1 ) ; final job vertex e = execution graph test utils create no op vertex ( 1 ) ; b connect new data set as input ( a , distribution pattern pointwise , result partition type blocking ) ; c connect new data set as input ( b , distribution pattern pointwise , result partition type pipelined ) ; d connect new data set as input ( b , distribution pattern pointwise , result partition type pipelined ) ; e connect new data set as input ( c , distribution pattern pointwise , result partition type blocking ) ; e connect new data set as input ( d , distribution pattern pointwise , result partition type pipelined ) ; final execution graph simple test graph = execution graph test utils create simple test graph ( a , b , c , d , e ) ; final default execution topology topology = default execution topology from execution graph ( simple test graph ) ; final default scheduling pipelined region first pipelined region = topology get pipelined region of vertex ( new execution vertex i d ( a get i d ( ) , 0 ) ) ; final default scheduling pipelined region second pipelined region = topology get pipelined region of vertex ( new execution vertex i d ( e get i d ( ) , 0 ) ) ; final default execution vertex vertex b 0 = topology get vertex ( new execution vertex i d ( b get i d ( ) , 0 ) ) ; final intermediate result partition i d b 0 consumed result partition = iterables get only element ( vertex b 0 get consumed results ( ) ) get id ( ) ; final set < intermediate result partition i d > second pipelined region consumed results = iterable utils to stream ( second pipelined region get consumed results ( ) ) map ( default result partition : : get id ) collect ( collectors to set ( ) ) ; assert that ( first pipelined region get consumed results ( ) iterator ( ) has next ( ) , is ( false ) ) ; assert that ( second pipelined region consumed results , contains ( b 0 consumed result partition ) ) ; }


this implementation returns a file reference for the underlying class path resource , provided that it refers to a file in the file system

public file get file ( ) throws i o exception { url url = get u r l ( ) ; return resource utils get file ( url , get description ( ) ) ; }


expands all the strings in the given list the attribute name is only used for error reporting

public immutable list < string > list ( string attr name , list < string > values ) { return expand and tokenize list ( attr name , values , / * should tokenize * / false ) ; }


return the { @ code target source } used by this { @ code advised } object


returns the entry of the last element in this multiset , or { @ code null } if this multiset is empty


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


assert that renaming a parent directory to be a child of itself is forbidden

public void test rename child dir forbidden ( ) throws exception { assume true ( rename supported ( ) ) ; log info ( " test rename child dir forbidden " ) ; path parentdir = path ( " test rename child dir forbidden " ) ; fs mkdirs ( parentdir ) ; path child file = new path ( parentdir , " childfile " ) ; create file ( child file ) ; / / verify one level down path childdir = new path ( parentdir , " childdir " ) ; rename ( parentdir , childdir , false , true , false ) ; / / now another level fs mkdirs ( childdir ) ; path childchilddir = new path ( childdir , " childdir " ) ; rename ( parentdir , childchilddir , false , true , false ) ; }


public void visit newarray ( int offset , int length , cst type type , array list < constant > init values ) { / / this space intentionally left blank }


public short e crlc ( ) { return e crlc ; }


adds the given class as a jersey component < p > < b > n b : < b > this class must either have a no - args constructor or use jersey ' s built - in dependency injection

public void register ( class < ? > component class ) { config register ( require non null ( component class ) ) ; }


specify jpa properties , to be passed into { @ code persistence create entity manager factory } ( if any ) can be populated with a string " value " ( parsed via properties editor ) or a " props " element in xml bean definitions

public void set jpa properties ( properties jpa properties ) { collection utils merge properties into map ( jpa properties , this jpa property map ) ; }


public order place order ( @ valid order body ) ;


static void register common beans ( bean definition registry registry ) { / / since 2 5 7 register @ reference annotation bean processor as an infrastructure bean register infrastructure bean ( registry , reference annotation bean post processor bean name , reference annotation bean post processor class ) ; / / since 2 7 4 [ feature ] https : / / github com / apache / dubbo / issues / 5093 register infrastructure bean ( registry , dubbo config alias post processor bean name , dubbo config alias post processor class ) ; / / since 2 7 9 register dubbo application listener register as an infrastructure bean / / https : / / github com / apache / dubbo / issues / 6559 / / since 2 7 5 register dubbo lifecycle component application listener as an infrastructure bean / / register infrastructure bean ( registry , dubbo lifecycle component application listener bean name , / / dubbo lifecycle component application listener class ) ; / / since 2 7 4 register dubbo bootstrap application listener as an infrastructure bean / / register infrastructure bean ( registry , dubbo bootstrap application listener bean name , / / dubbo bootstrap application listener class ) ; register infrastructure bean ( registry , dubbo application listener registrar bean name , dubbo application listener registrar class ) ; / / since 2 7 6 register dubbo config default property value bean post processor as an infrastructure bean register infrastructure bean ( registry , dubbo config default property value bean post processor bean name , dubbo config default property value bean post processor class ) ; / / since 2 7 9 register dubbo config early initialization post processor as an infrastructure bean register infrastructure bean ( registry , dubbo config early initialization post processor bean name , dubbo config early initialization post processor class ) ; }


specify the phase in which this component should be started and stopped the startup order proceeds from lowest to highest , and the shutdown order is the reverse of that by default this value is integer max value meaning that this component starts as late as possible and stops as soon as possible

public void set phase ( int phase ) { this phase = phase ; }


performs a cas operation on the { @ link # value } field

abstract boolean cas value ( abstract future < ? > future , object expect , object update ) ;


increments all of the associated counters

void regular increment ( long e ) { int hash = spread ( long hash code ( e ) ) ; int start = ( hash & 3 ) < < 2 ; / / loop unrolling improves throughput by 5m ops / s int index 0 = index of ( hash , 0 ) ; int index 1 = index of ( hash , 1 ) ; int index 2 = index of ( hash , 2 ) ; int index 3 = index of ( hash , 3 ) ; boolean added = increment at ( index 0 , start , step ) ; added | = increment at ( index 1 , start + 1 , step ) ; added | = increment at ( index 2 , start + 2 , step ) ; added | = increment at ( index 3 , start + 3 , step ) ; try reset ( added ) ; }


string create snapshot ( string snapshot root , string snapshot name , boolean log retry cache ) throws i o exception { check operation ( operation category write ) ; final string operation name = " create snapshot " ; string snapshot path = null ; final f s permission checker pc = get permission checker ( ) ; f s permission checker set operation type ( operation name ) ; try { write lock ( ) ; try { check operation ( operation category write ) ; check name node safe mode ( " cannot create snapshot for " + snapshot root ) ; snapshot path = f s dir snapshot op create snapshot ( dir , pc , snapshot manager , snapshot root , snapshot name , log retry cache ) ; } finally { write unlock ( operation name , get lock report info supplier ( snapshot root ) ) ; } } catch ( access control exception ace ) { log audit event ( false , operation name , snapshot root ) ; throw ace ; } get edit log ( ) log sync ( ) ; log audit event ( true , operation name , snapshot root , snapshot path , null ) ; return snapshot path ; }


called in response to the user activating the set equate action from the menu this will ultimately create the background tasks that will create the proper equate ( s ) for the selected addresses

private void set equate ( listing action context context ) { / / get the scalar item that was selected if this returns null , then something / / invalid was selected , so exit scalar cur scalar = get scalar ( context ) ; if ( cur scalar = = null ) { return ; } / / create the dialog that will allow the user to select options create equate dialog ( context , cur scalar ) ; / / set the state of the some buttons on the dialog ie : if the user has selected / / a range of addresses we should automatically set the " selection " radio button / / to the selected state set equate dialog set has selection ( context ) ; / / if the user has selected the cancel button , exit if ( set equate dialog show set dialog ( ) = = set equate dialog canceled ) { return ; } / / define an iterator for the task we ' re using a code unit iterator to make sure we inspect / / all data and instruction instances code unit iterator iter = null ; / / get the program listing this is what allows us to get an iterator for the / / addresses we ' re interested in listing listing = context get program ( ) get listing ( ) ; / / now we have to ' populate ' the iterator with the proper addresses once we have the / / iterator , we ' ll create a background task to process them / / selection type selection type = set equate dialog get selection type ( ) ; if ( selection type = = selection type current address ) { address set addr set = new address set ( context get address ( ) ) ; iter = listing get code units ( addr set , false ) ; } else if ( selection type = = selection type selection ) { iter = listing get code units ( context get selection ( ) , true ) ; } else if ( selection type = = selection type entire program ) { iter = listing get code units ( context get program ( ) get memory ( ) , true ) ; } background command cmd ; if ( set equate dialog get enum data type ( ) ! = null ) { / / now set up a command to run in the background , and execute the task cmd = new create equate cmd ( cur scalar , iter , set equate dialog get enum data type ( ) , set equate dialog get overwrite existing ( ) , context ) ; } else { / / now set up a command to run in the background , and execute the task cmd = new create equate cmd ( cur scalar , iter , set equate dialog get equate name ( ) , set equate dialog get overwrite existing ( ) , context ) ; } tool execute background command ( cmd , context get program ( ) ) ; / / finally , blow away the dialog dispose ( set equate dialog ) ; }


returns the logging level at which previous task still executing messages is displayed

protected level get slow logging level ( ) { return get normal logging level ( ) ; }


obtain a { @ link start and stop latch } that can be used to wait until the expected number of stops has been completed

public start and stop latch expected stops ( int expected stops ) { return expected restarts ( 0 , expected stops ) ; }


protected void fetch block byte range ( located block block , long start , long end , byte buffer buf , corrupted blocks corrupted blocks ) throws i o exception { / / refresh the striped block group located striped block block group = get block group at ( block get start offset ( ) ) ; aligned stripe [ ] stripes = striped block util divide byte range into stripes ( ec policy , cell size , block group , start , end , buf ) ; final located block [ ] blks = striped block util parse striped block group ( block group , cell size , data blk num , parity blk num ) ; final block reader info [ ] preader infos = new block reader info [ group size ] ; try { for ( aligned stripe stripe : stripes ) { / / parse group to get chosen dn location stripe reader preader = new position stripe reader ( stripe , ec policy , blks , preader infos , corrupted blocks , decoder , this ) ; try { preader read stripe ( ) ; } finally { preader close ( ) ; } } buf position ( buf position ( ) + ( int ) ( end - start + 1 ) ) ; } finally { for ( block reader info preader info : preader infos ) { close reader ( preader info ) ; } } }


returns the local state that is stored under the given checkpoint id or null if nothing was stored under the id

task state snapshot retrieve local state ( long checkpoint i d ) ;


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

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


return the path associated with this document

public string get path ( ) { return path ; }


check that list corrupt file blocks works while the namenode is still in safemode

public void test list corrupt file blocks in safe mode ( ) throws exception { mini d f s cluster cluster = null ; try { configuration conf = new hdfs configuration ( ) ; / / datanode scans directories conf set int ( d f s config keys dfs datanode directoryscan interval key , 1 ) ; / / datanode sends block reports conf set int ( d f s config keys dfs blockreport interval msec key , 3 * 1000 ) ; / / never leave safemode automatically conf set float ( d f s config keys dfs namenode safemode threshold pct key , 1 5f ) ; / / start populating repl queues immediately conf set float ( d f s config keys dfs namenode repl queue threshold pct key , 0f ) ; / / set short retry timeouts so this test runs faster conf set int ( hdfs client config keys retry window base key , 10 ) ; cluster = new mini d f s cluster builder ( conf ) wait safe mode ( false ) build ( ) ; cluster get name node rpc ( ) set safe mode ( hdfs constants safe mode action safemode leave , false ) ; file system fs = cluster get file system ( ) ; / / files are corrupted with 2 bytes before the end of the file , / / so that ' s the minimum length final int corruption length = 2 ; / / create two files with one block each d f s test util util = new d f s test util builder ( ) set name ( " test list corrupt file blocks in safe mode " ) set num files ( 2 ) set max levels ( 1 ) set min size ( corruption length ) set max size ( 512 ) build ( ) ; util create files ( fs , " / srcdat 1 0 " ) ; / / fetch bad file list from namenode there should be none collection < f s namesystem corrupt file block info > bad files = cluster get name node ( ) get namesystem ( ) list corrupt file blocks ( " / " , null ) ; assert equals ( " namenode has " + bad files size ( ) + " corrupt files expecting none " , 0 , bad files size ( ) ) ; assert corrupt files count ( cluster , bad files size ( ) ) ; / / now deliberately corrupt one block file storage dir = cluster get instance storage dir ( 0 , 0 ) ; file data dir = mini d f s cluster get finalized dir ( storage dir , cluster get namesystem ( ) get block pool id ( ) ) ; assert true ( " data directory does not exist " , data dir exists ( ) ) ; list < file > meta files = mini d f s cluster get all block files ( data dir ) ; assert true ( " data directory does not contain any blocks or there was an " + " io error " , meta files ! = null & & ! meta files is empty ( ) ) ; file meta file = meta files get ( 0 ) ; random access file file = new random access file ( meta file , " rw " ) ; file channel channel = file get channel ( ) ; long position = channel size ( ) - corruption length ; byte [ ] buffer = new byte [ corruption length ] ; new random ( 13l ) next bytes ( buffer ) ; channel write ( byte buffer wrap ( buffer ) , position ) ; file close ( ) ; log info ( " deliberately corrupting file " + meta file get name ( ) + " at offset " + position + " length " + corruption length ) ; / / read all files to trigger detection of corrupted replica try { util check files ( fs , " / srcdat 1 0 " ) ; } catch ( block missing exception e ) { system out println ( " received block missing exception as expected " ) ; } catch ( i o exception e ) { assert true ( " corrupted replicas not handled properly " + " expecting block missing exception " + " but received i o exception " + e , false ) ; } / / fetch bad file list from namenode there should be one file bad files = cluster get name node ( ) get namesystem ( ) list corrupt file blocks ( " / " , null ) ; log info ( " namenode has bad files " + bad files size ( ) ) ; assert equals ( " namenode has " + bad files size ( ) + " bad files " + " expecting 1 " , 1 , bad files size ( ) ) ; assert corrupt files count ( cluster , bad files size ( ) ) ; / / restart namenode cluster restart name node ( 0 ) ; fs = cluster get file system ( ) ; / / wait until replication queues have been initialized while ( ! cluster get name node ( ) namesystem get block manager ( ) is populating repl queues ( ) ) { try { log info ( " waiting for replication queues " ) ; thread sleep ( 1000 ) ; } catch ( interrupted exception ignore ) { } } / / read all files to trigger detection of corrupted replica try { util check files ( fs , " / srcdat 1 0 " ) ; } catch ( block missing exception e ) { system out println ( " received block missing exception as expected " ) ; } catch ( i o exception e ) { assert true ( " corrupted replicas not handled properly " + " expecting block missing exception " + " but received i o exception " + e , false ) ; } / / fetch bad file list from namenode there should be one file bad files = cluster get name node ( ) get namesystem ( ) list corrupt file blocks ( " / " , null ) ; log info ( " namenode has bad files " + bad files size ( ) ) ; assert equals ( " namenode has " + bad files size ( ) + " bad files " + " expecting 1 " , 1 , bad files size ( ) ) ; assert corrupt files count ( cluster , bad files size ( ) ) ; / / check that we are still in safe mode assert true ( " namenode is not in safe mode " , cluster get name node ( ) is in safe mode ( ) ) ; / / now leave safe mode so that we can clean up cluster get name node rpc ( ) set safe mode ( hdfs constants safe mode action safemode leave , false ) ; util cleanup ( fs , " / srcdat 1 0 " ) ; } catch ( exception e ) { log error ( string utils stringify exception ( e ) ) ; throw e ; } finally { if ( cluster ! = null ) { cluster shutdown ( ) ; } } }


builder method ( http method http method ) ;


returns the { @ link dialog component provider } with the given title this method is not preferred , but instead you should use a { @ link # wait for dialog component ( class ) } that takes a class so that you can get the correct return type this method is meant for clients that need a dialog , but that type is private of package restricted and thus cannot be referenced by a test also , code that relies on a title is more subject to breaking when code is refactored ; code that relies on class types will get refactored along side the referenced code < p > this method will fail if no dialog can be found

public static dialog component provider wait for dialog component ( string title ) { window window = wait for window ( title ) ; assert not null ( " no window found with title ' " + title + " ' " , window ) ; if ( ! ( window instanceof docking dialog ) ) { fail ( " window is not a docking dialog - ' " + title + " ' " ) ; } docking dialog dd = ( docking dialog ) window ; return dd get dialog component ( ) ; }


return a typed string value object for the given ' idref ' element

public object parse id ref element ( element ele ) { / / a generic reference to any name of any bean string ref name = ele get attribute ( bean ref attribute ) ; if ( ! string utils has length ( ref name ) ) { error ( " ' bean ' is required for < idref > element " , ele ) ; return null ; } if ( ! string utils has text ( ref name ) ) { error ( " < idref > element contains empty target attribute " , ele ) ; return null ; } runtime bean name reference ref = new runtime bean name reference ( ref name ) ; ref set source ( extract source ( ele ) ) ; return ref ; }


cleans up internal state , including calling { @ link web view # destroy ( ) } on the delegate view this method may only be called after this view has been removed from the view system no other methods may be called on this view after destroy

public void destroy ( ) { web view destroy ( ) ; }


sets the token , which together with the scheme , will be sent as the value of the authorization header

public void set bearer token ( string bearer token ) { this bearer token = bearer token ; }


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


public string get message ( ) { return message ; }


suspend pulling from the requested message queues because of the implementation of pre - pull , fetch data in { @ link # poll ( ) } will not stop immediately until the messages of the requested message queues drain note that this method does not affect message queue subscription in particular , it does not cause a group rebalance

void pause ( collection < message queue > message queues ) ;


index the map in { @ link requests # index content type } format

public index request source ( map < string , ? > source ) throws elasticsearch generation exception { return source ( source , requests index content type ) ; }


returns the current data type name ( structure or union ) as a string

protected string get type name ( ) { if ( view composite instanceof structure ) { return " structure " ; } else if ( view composite instanceof union ) { return " union " ; } return super get type name ( ) ; }


creates a container a ( i pv 4 ) record descriptor

protected void create a info ( service record record ) throws exception { a container record descriptor record info = new a container record descriptor ( get path ( ) , record ) ; register record descriptor ( type a , record info ) ; }


build a { @ link server http request } decorator with the mutated properties


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


name of the connector specified in the connector config

public string connector name ( ) { return connector name ; }


builds the response to send back through the channel

public abstract rest response build response ( response response ) throws exception ;


add non empty and non null suffix to a key

public static string add suffix ( string key , string suffix ) { if ( suffix = = null | | suffix is empty ( ) ) { return key ; } if ( suffix starts with ( " " ) ) { throw new illegal argument exception ( " suffix ' " + suffix + " ' should not " + " already have ' ' prepended " ) ; } return key + " " + suffix ; }


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

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


separated out for easy overriding in tests

protected executor service create single thread executor ( ) { return executors new single thread executor ( new thread factory builder ( ) set daemon ( true ) set name format ( " logger channel ( from single - thread executor ) to " + addr ) set uncaught exception handler ( uncaught exception handlers system exit ( ) ) build ( ) ) ; }


test serialization of outer string types

public single < string > rx fake outer string serialize ( string body , api client auth info auth info ) { return single create ( new io vertx rx java single on subscribe adapter < > ( fut - > delegate fake outer string serialize ( body , auth info , fut ) ) ) ; }


whether this reference is referencing a private resource ( & # 64 ; package : typeentry ) < code > optional bool private = 4 ; < code >


public void assert path does not exist ( string message , path path ) throws i o exception { contract test utils assert path does not exist ( file system , message , path ) ; }


output the language - specific type declaration of a given oas name

public string get type declaration ( string name ) { return name ; }


expect a request to store data to the underlying offset backing store

private void expect store ( map < string , string > key , byte [ ] key serialized , map < string , integer > value , byte [ ] value serialized , final callback < void > callback , final boolean fail , final count down latch wait for completion ) { list < object > key wrapped = arrays as list ( namespace , key ) ; easy mock expect ( key converter from connect data ( namespace , null , key wrapped ) ) and return ( key serialized ) ; easy mock expect ( value converter from connect data ( namespace , null , value ) ) and return ( value serialized ) ; final capture < callback < void > > store callback = capture new instance ( ) ; final map < byte buffer , byte buffer > offsets serialized = collections singleton map ( key serialized = = null ? null : byte buffer wrap ( key serialized ) , value serialized = = null ? null : byte buffer wrap ( value serialized ) ) ; easy mock expect ( store set ( easy mock eq ( offsets serialized ) , easy mock capture ( store callback ) ) ) and answer ( new i answer < future < void > > ( ) { @ override public future < void > answer ( ) throws throwable { return service submit ( new callable < void > ( ) { @ override public void call ( ) throws exception { if ( wait for completion ! = null ) assert true ( wait for completion await ( 10000 , time unit milliseconds ) ) ; if ( fail ) { store callback get value ( ) on completion ( exception , null ) ; } else { store callback get value ( ) on completion ( null , null ) ; } return null ; } } ) ; } } ) ; if ( callback ! = null ) { if ( fail ) { callback on completion ( easy mock eq ( exception ) , easy mock eq ( ( void ) null ) ) ; } else { callback on completion ( null , null ) ; } } power mock expect last call ( ) ; }


stops the downloads and releases resources waits until the downloads are persisted to the download index the manager must not be accessed after this method has been called

public void release ( ) { synchronized ( internal handler ) { if ( internal handler released ) { return ; } internal handler send empty message ( msg release ) ; boolean was interrupted = false ; while ( ! internal handler released ) { try { internal handler wait ( ) ; } catch ( interrupted exception e ) { was interrupted = true ; } } if ( was interrupted ) { / / restore the interrupted status thread current thread ( ) interrupt ( ) ; } application handler remove callbacks and messages ( / * token = * / null ) ; / / reset state downloads = collections empty list ( ) ; pending messages = 0 ; active task count = 0 ; initialized = false ; not met requirements = 0 ; waiting for requirements = false ; } }


requires { @ link feature # fake } to be understood for use in testing consumers of this credential

public builder require fake feature ( ) { fake feature = true ; return this ; }


sets the zonedomain name the name will be read from the configuration and the code will ensure the name is absolute

void set domain name ( configuration conf ) throws i o exception { domain name = conf get ( key dns domain ) ; if ( domain name = = null ) { throw new i o exception ( " no dns domain name specified " ) ; } if ( ! domain name ends with ( " " ) ) { domain name + = " " ; } }


set the { @ code name } to { @ code value } this will remove all previous values associated with { @ code name }


method for tests to allow mocking of the internal adapter to verify interaction with the recycler view

builder override internal adapter ( recycler view adapter override internal adapter ) { this override internal adapter = override internal adapter ; return this ; }


public void add listeners ( string data id , string group , list < ? extends listener > listeners ) { group = null 2default group ( group ) ; cache data cache = add cache data if absent ( data id , group ) ; for ( listener listener : listeners ) { cache add listener ( listener ) ; } }


since this is incapable of returning multiple connection i ds , simply return the first one in most cases , the connection id should be the same for all proxies

public connection id get connection id ( ) { return rpc get connection id for proxy ( proxies [ 0 ] ) ; }


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

public static fields find by name ( string name ) { return by name get ( name ) ; }


public class < ? > get key class ( ) { return data get key class ( ) ; }


returns whether objc library should build generated files using arc ( - fobjc - arc )

public boolean compile with a r c ( ) { return translation flags contains ( j2objc use arc flag ) ; }


kill the running job blocks until all job tasks have been killed as well if the job is no longer running , it simply returns

public void kill job ( ) throws i o exception { ensure state ( job state running ) ; try { cluster get client ( ) kill job ( get job i d ( ) ) ; } catch ( interrupted exception ie ) { throw new i o exception ( ie ) ; } }


map the given response to a single value { @ code response entity < t > }

public static < t > mono < response entity < t > > map to entity ( client response response , mono < t > body mono ) { return ( ( mono < object > ) body mono ) default if empty ( value none ) map ( body - > new response entity < > ( body ! = value none ? ( t ) body : null , response headers ( ) as http headers ( ) , response raw status code ( ) ) ) ; }


determine whether the given { @ code class } is a kotlin type ( with kotlin metadata present on it )

public static boolean is kotlin type ( class < ? > clazz ) { return ( kotlin metadata ! = null & & clazz get declared annotation ( kotlin metadata ) ! = null ) ; }


public long get sum ( ) { return sum ; }


the string pool containing source paths referenced throughout the resource table this does not end up in the final binary arsc file < code > optional aapt pb string pool source pool = 1 ; < code >

private void set source pool ( com android aapt resources string pool value ) { if ( value = = null ) { throw new null pointer exception ( ) ; } source pool = value ; bit field 0 | = 0x 0 0 0 0 0 0 0 1 ; }


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

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


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


the interface used by clients to remove an existing reservation

public abstract reservation delete response delete reservation ( reservation delete request request ) throws yarn exception , i o exception ;


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


adds the given value to the configuration object the main key of the config option will be used to map the value

public void set double ( config option < double > key , double value ) { set value internal ( key key ( ) , value ) ; }


we override the method here to remove the checked exception please check the java docs of { @ link checkpoint listener # notify checkpoint complete ( long ) } for more detail semantic of the method

void notify checkpoint complete ( long checkpoint id ) ;


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 }


specify one or more hibernate { @ link integrator } implementations to apply this will only be applied for an internally built { @ link metadata sources } instance { @ link # set metadata sources } effectively overrides such settings , with integrators to be applied to the externally built { @ link metadata sources }

public void set hibernate integrators ( integrator hibernate integrators ) { this hibernate integrators = hibernate integrators ; }


< code > optional aapt pb plural plural = 5 ; < code >

com android aapt resources plural get plural ( ) ;


converts a string - & gt ; string mapping into a " key : value " multi - line string

public static string info map to string ( map < string , string > info ) { string builder sb = new string builder ( ) ; for ( entry < string , string > entry : info entry set ( ) ) { sb append ( entry get key ( ) ) append ( " : " ) append ( entry get value ( ) ) append ( " \ n " ) ; } return sb to string ( ) ; }


returns the union of classes from both files , sorted in order such that a class is always preceded by its supertype and implemented interfaces

private sortable type [ ] get sorted types ( ) { / / size is pessimistic ; doesn ' t include arrays sortable type [ ] sortable types = new sortable type [ contents out type ids size ] ; for ( int i = 0 ; i < dexes length ; i + + ) { read dex sortable types ( sortable types , dexes [ i ] , index maps [ i ] ) ; } / * * populate the depths of each sortable type this makes d iterations * through all n types , where ' d ' is the depth of the deepest type for * example , the deepest class in libcore is xalan ' s key iterator , which * is 11 types deep * / while ( true ) { boolean all done = true ; for ( sortable type sortable type : sortable types ) { if ( sortable type ! = null & & ! sortable type is depth assigned ( ) ) { all done & = sortable type try assign depth ( sortable types ) ; } } if ( all done ) { break ; } } arrays sort ( sortable types , new comparator < sortable type > ( ) { @ override public int compare ( sortable type o 1 , sortable type o 2 ) { if ( o 1 = = o 2 ) { return 0 ; } if ( o 2 = = null ) { return - 1 ; } if ( o 1 = = null ) { return 1 ; } if ( class def list contains ( o 1 get dex ( ) type names ( ) get ( o 1 get type index ( ) ) ) & & class def list contains ( o 1 get dex ( ) type names ( ) get ( o 2 get type index ( ) ) ) ) { return class def list index of ( o 1 get dex ( ) type names ( ) get ( o 1 get type index ( ) ) ) - class def list index of ( o 1 get dex ( ) type names ( ) get ( o 2 get type index ( ) ) ) ; } else if ( class def list contains ( o 1 get dex ( ) type names ( ) get ( o 1 get type index ( ) ) ) & & ! class def list contains ( o 1 get dex ( ) type names ( ) get ( o 2 get type index ( ) ) ) ) { return - 1 ; } else if ( ! class def list contains ( o 1 get dex ( ) type names ( ) get ( o 1 get type index ( ) ) ) & & class def list contains ( o 1 get dex ( ) type names ( ) get ( o 2 get type index ( ) ) ) ) { return 1 ; } else return o 1 get type index ( ) - ( o 2 get type index ( ) ) ; } } ) ; int first null = arrays as list ( sortable types ) index of ( null ) ; return arrays copy of range ( sortable types , 0 , first null ) ; }


process an input element and output incremental joined records , retraction messages will be sent in some scenarios following is the pseudo code to describe the core logic of this method note : " + i " represents " insert " , " - d " represents " delete " , " + u " represents " update after " , " - u " represents " update before " if input record is accumulate | state add ( record ) | if there is no matched rows on the other side , skip | if there are matched rows on the other side | | if the matched num in the matched rows = = 0 | | if anti join , send - d [ other ] s | | if semi join , send + i + u [ other ] s ( using input row kind ) | | if the matched num in the matched rows > 0 , skip | | other state update ( other , old + 1 ) | endif endif if input record is retract | state retract ( record ) | if there is no matched rows on the other side , skip | if there are matched rows on the other side | | if the matched num in the matched rows = = 0 , this should never happen ! | | if the matched num in the matched rows = = 1 | | if semi join , send - d - u [ other ] ( using input row kind ) | | if anti join , send + i [ other ] | | if the matched num in the matched rows > 1 , skip | | other state update ( other , old - 1 ) | endif endif

public void process element 2 ( stream record < row data > element ) throws exception { row data input = element get value ( ) ; boolean is accumulate msg = row data util is accumulate msg ( input ) ; row kind input row kind = input get row kind ( ) ; input set row kind ( row kind insert ) ; / / erase row kind for later state updating associated records associated records = associated records of ( input , false , left record state view , join condition ) ; if ( is accumulate msg ) { / / record is accumulate right record state view add record ( input ) ; if ( ! associated records is empty ( ) ) { / / there are matched rows on the other side for ( outer record outer record : associated records get outer records ( ) ) { row data other = outer record record ; if ( outer record num of associations = = 0 ) { if ( is anti join ) { / / send - d [ other ] other set row kind ( row kind delete ) ; } else { / / send + i / + u [ other ] ( using input row kind ) other set row kind ( input row kind ) ; } collector collect ( other ) ; / / set header back to insert , because we will update the other row to state other set row kind ( row kind insert ) ; } / / ignore when number > 0 left record state view update num of associations ( other , outer record num of associations + 1 ) ; } } / / ignore when associated number = = 0 } else { / / retract input right record state view retract record ( input ) ; if ( ! associated records is empty ( ) ) { / / there are matched rows on the other side for ( outer record outer record : associated records get outer records ( ) ) { row data other = outer record record ; if ( outer record num of associations = = 1 ) { if ( ! is anti join ) { / / send - d / - u [ other ] ( using input row kind ) other set row kind ( input row kind ) ; } else { / / send + i [ other ] other set row kind ( row kind insert ) ; } collector collect ( other ) ; / / set row kind back , because we will update the other row to state other set row kind ( row kind insert ) ; } / / ignore when number > 0 left record state view update num of associations ( other , outer record num of associations - 1 ) ; } } / / ignore when associated number = = 0 } }


cancels all currently running vertex executions

public completable future < void > cancel with future ( ) { return future utils wait for all ( map execution vertices ( execution vertex : : cancel ) ) ; }


public path get list path ( ) { return list path ; }


closes the output file if this object has not been finished yet , this method will call { @ link # finish ( ) } before closing the output channel

public void close ( ) throws i o exception { if ( ! finished ) { finish ( ) ; } try { executor shutdown ( ) ; executor await termination ( 30 , time unit seconds ) ; for ( future < ? > f : futures ) { try { f get ( ) ; } catch ( execution exception ex ) { throw new i o exception ( ex get cause ( ) get message ( ) ) ; } } } catch ( interrupted exception ex ) { executor shutdown now ( ) ; thread current thread ( ) interrupt ( ) ; } file channel close ( ) ; }


handles an inbound { @ code headers } frame with priority information specified only called if { @ code end headers } encountered only one of the following methods will be called for each { @ code headers } frame sequence one will be called when the { @ code end headers } flag has been received { @ link # on headers read ( channel handler context , int , http 2 headers , int , boolean ) } { @ link # on headers read ( channel handler context , int , http 2 headers , int , short , boolean , int , boolean ) } { @ link # on push promise read ( channel handler context , int , int , http 2 headers , int ) } to say it another way ; the { @ link http 2 headers } will contain all of the headers for the current message exchange step ( additional queuing is not necessary )

void on headers read ( channel handler context ctx , int stream id , http 2 headers headers , int stream dependency , short weight , boolean exclusive , int padding , boolean end of stream ) throws http 2 exception ;


cancel the recovery with the given id ( if found ) and remove it from the recovery collection

public boolean cancel recovery ( long id , string reason ) { recovery target removed = on going recoveries remove ( id ) ; boolean cancelled = false ; if ( removed ! = null ) { logger trace ( " { } canceled recovery from { } , id [ { } ] ( reason [ { } ] ) " , removed shard id ( ) , removed source node ( ) , removed recovery id ( ) , reason ) ; removed cancel ( reason ) ; cancelled = true ; } return cancelled ; }


replace the matches of the from pattern in the base string with the value of the to string

static string replace substitution ( string base , pattern from , string to , boolean repeat ) { matcher match = from matcher ( base ) ; if ( repeat ) { return match replace all ( to ) ; } else { return match replace first ( to ) ; } }


specify a custom { @ link task decorator } to be applied to any { @ link runnable } about to be executed note that such a decorator is not necessarily being applied to the user - supplied { @ code runnable } { @ code callable } but rather to the actual execution callback ( which may be a wrapper around the user - supplied task ) the primary use case is to set some execution context around the task ' s invocation , or to provide some monitoringstatistics for task execution < b > note : < b > exception handling in { @ code task decorator } implementations is limited to plain { @ code runnable } execution via { @ code execute } calls in case of { @ code # submit } calls , the exposed { @ code runnable } will be a { @ code future task } which does not propagate any exceptions ; you might have to cast it and call { @ code future # get } to evaluate exceptions

public final void set task decorator ( task decorator task decorator ) { this task decorator = task decorator ; }


returns the currently active { @ link seek parameters } of the player

seek parameters get seek parameters ( ) ;


closes the ' { @ code button } ' block tag

public int do end tag ( ) throws jsp exception { assert state ( this tag writer ! = null , " no tag writer set " ) ; this tag writer end tag ( ) ; return eval page ; }


get the process id of the c + + process whose log messages are being read this will arrive in the first log message logged by the c + + process they all log a copyright message immediately on startup so it should not take long to arrive , but will not be available instantly after the process starts

public string get cpp copyright ( duration timeout ) throws timeout exception { if ( cpp copyright = = null ) { try { cpp copyright latch await ( timeout to millis ( ) , time unit milliseconds ) ; } catch ( interrupted exception e ) { thread current thread ( ) interrupt ( ) ; } if ( cpp copyright = = null ) { throw new timeout exception ( " timed out waiting for c + + process copyright " ) ; } } return cpp copyright ; }


short - circuit ? : no threadsemaphore : thread thread pool full ? : no thread pool queue full ? : no timeout : no execution result : synchronous hystrix bad request exception

public void test execution hook thread bad request exception ( ) { assert hooks on failure ( new func 0 < test hystrix command < integer > > ( ) { @ override public test hystrix command < integer > call ( ) { return get command ( execution isolation strategy thread , abstract test hystrix command execution result bad request ) ; } } , new action 1 < test hystrix command < integer > > ( ) { @ override public void call ( test hystrix command < integer > command ) { testable execution hook hook = command get builder ( ) execution hook ; assert true ( hook command emissions match ( 0 , 1 , 0 ) ) ; assert true ( hook execution events match ( 0 , 1 , 0 ) ) ; assert true ( hook fallback events match ( 0 , 0 , 0 ) ) ; assert equals ( hystrix bad request exception class , hook get command exception ( ) get class ( ) ) ; assert equals ( hystrix bad request exception class , hook get execution exception ( ) get class ( ) ) ; assert equals ( " on start - on thread start - ! on run start - on execution start - on execution error - ! on run error - on thread complete - on error - " , hook execution sequence to string ( ) ) ; } } ) ; }


public boolean row updated ( ) throws s q l exception { return false ; }


set the given value to the field of this instance

public void set ( object value ) { member accessor accessor = plugins get member accessor ( ) ; try { accessor set ( field , instance , value ) ; } catch ( illegal access exception e ) { throw new mockito exception ( " access to " + field + " was denied " , e ) ; } }


subclasses can add extra validation of the { @ link # props }

protected void validate props ( string prefix ) { }


initialize the bean definition reader used for loading the bean definitions of this context default implementation is empty can be overridden in subclasses

protected void init bean definition reader ( groovy bean definition reader bean definition reader ) { }


returns true if this key handler has already recorded a component with the given key

public boolean has key ( string key ) { return m known global keys contains ( key ) ; }


encode " - pph - " i don ' t know why the greek poet ' s name is transliterated this way

boolean encode pph ( ) { / / ' sappho ' if ( ( char at ( m current + 1 ) = = ' p ' ) & & ( ( m current + 2 ) < m length ) & & ( char at ( m current + 2 ) = = ' h ' ) ) { metaph add ( " f " ) ; m current + = 3 ; return true ; } return false ; }


sets the python version to { @ code version } since this is a mutation , it should only be called on a newly constructed instance

public void set python version ( python version version ) { preconditions check argument ( version is target value ( ) ) ; this python version = version ; }


gets the backend distribution for r p cs sent by a test client

public void get client stats ( io grpc testing integration messages load balancer stats request request , io grpc stub stream observer < io grpc testing integration messages load balancer stats response > response observer ) { io grpc stub server calls async unimplemented unary call ( get get client stats method ( ) , response observer ) ; }


string [ ] get names ( ) { return names ; }


recursive method to delete files in the given parent directory

private boolean delete files ( file parent ) { file [ ] f = parent list files ( ) ; for ( file element : f ) { if ( element is directory ( ) ) { if ( ! delete files ( element ) ) { return false ; } element delete ( ) ; } else if ( ! element delete ( ) ) { return false ; } } return true ; }


tests that the previous job manager needs to be completely terminated before a new job with the same { @ link job i d } is started

public void test job submission under same job id ( ) throws exception { final testing job manager runner factory job manager runner factory = start dispatcher and submit job ( 1 ) ; running jobs registry set job running ( job id ) ; final testing job manager runner testing job manager runner = job manager runner factory take created job manager runner ( ) ; testing job manager runner complete result future exceptionally ( new job not finished exception ( job id ) ) ; / / wait until termination job manager runner close async has been called / / this is necessary to avoid race conditions with completion of the 1st job and the / / submission of the 2nd job ( duplicate job submission exception ) testing job manager runner get close async called latch ( ) await ( ) ; final completable future < acknowledge > submission future = dispatcher gateway submit job ( job graph , timeout ) ; try { submission future get ( 10l , time unit milliseconds ) ; fail ( " the job submission future should not complete until the previous job manager " + " termination future has been completed " ) ; } catch ( timeout exception ignored ) { / / expected } finally { testing job manager runner complete termination future ( ) ; } assert that ( submission future get ( ) , equal to ( acknowledge get ( ) ) ) ; }


returns true if and only if the ui refresh is enabled

public static boolean is ui refresh enabled ( ) { return ui refresh ; }


{ @ inherit doc } the default implementation does nothing

@ override public void enter sys columns ( sql base parser sys columns context ctx ) { }


changes the volume of the sound instance with the given id as returned by { @ link # play ( ) } or { @ link # play ( float ) } if the sound is no longer playing , this has no effect

public void set volume ( long sound id , float volume ) ;


start analysis the litepal xml file set all the parsed value into the lite pal attr model

public void start element ( string uri , string local name , string q name , attributes attributes ) throws s a x exception { if ( lite pal parser node db name equals ignore case ( local name ) ) { for ( int i = 0 ; i < attributes get length ( ) ; i + + ) { if ( lite pal parser attr value equals ignore case ( attributes get local name ( i ) ) ) { lite pal attr set db name ( attributes get value ( i ) trim ( ) ) ; } } } else if ( lite pal parser node version equals ignore case ( local name ) ) { for ( int i = 0 ; i < attributes get length ( ) ; i + + ) { if ( lite pal parser attr value equals ignore case ( attributes get local name ( i ) ) ) { lite pal attr set version ( integer parse int ( attributes get value ( i ) trim ( ) ) ) ; } } } else if ( lite pal parser node mapping equals ignore case ( local name ) ) { for ( int i = 0 ; i < attributes get length ( ) ; i + + ) { if ( lite pal parser attr class equals ignore case ( attributes get local name ( i ) ) ) { lite pal attr add class name ( attributes get value ( i ) trim ( ) ) ; } } } else if ( lite pal parser node cases equals ignore case ( local name ) ) { for ( int i = 0 ; i < attributes get length ( ) ; i + + ) { if ( lite pal parser attr value equals ignore case ( attributes get local name ( i ) ) ) { lite pal attr set cases ( attributes get value ( i ) trim ( ) ) ; } } } else if ( lite pal parser node storage equals ignore case ( local name ) ) { for ( int i = 0 ; i < attributes get length ( ) ; i + + ) { if ( lite pal parser attr value equals ignore case ( attributes get local name ( i ) ) ) { lite pal attr set storage ( attributes get value ( i ) trim ( ) ) ; } } } }


called after { @ link # on drag started ( epoxy model , view , int ) } when the dragged view is dropped to a new position the epoxy controller will be updated automatically for you to reposition the models and notify the recycler view of the change you must use this callback to modify your data backing the models to reflect the change the next callback in the drag lifecycle will be { @ link # on drag started ( epoxy model , view , int ) }

void on model moved ( int from position , int to position , t model being moved , view item view ) ;


public just symbol enum get just symbol ( ) { return just symbol ; }


create a list of default strategy objects for the given strategy interface the default implementation uses the " dispatcher servlet properties " file ( in the same package as the dispatcher servlet class ) to determine the class names it instantiates the strategy objects through the context ' s bean factory

protected < t > list < t > get default strategies ( application context context , class < t > strategy interface ) { if ( default strategies = = null ) { try { / / load default strategy implementations from properties file / / this is currently strictly internal and not meant to be customized / / by application developers class path resource resource = new class path resource ( default strategies path , dispatcher servlet class ) ; default strategies = properties loader utils load properties ( resource ) ; } catch ( i o exception ex ) { throw new illegal state exception ( " could not load ' " + default strategies path + " ' : " + ex get message ( ) ) ; } } string key = strategy interface get name ( ) ; string value = default strategies get property ( key ) ; if ( value ! = null ) { string [ ] class names = string utils comma delimited list to string array ( value ) ; list < t > strategies = new array list < > ( class names length ) ; for ( string class name : class names ) { try { class < ? > clazz = class utils for name ( class name , dispatcher servlet class get class loader ( ) ) ; object strategy = create default strategy ( context , clazz ) ; strategies add ( ( t ) strategy ) ; } catch ( class not found exception ex ) { throw new bean initialization exception ( " could not find dispatcher servlet ' s default strategy class [ " + class name + " ] for interface [ " + key + " ] " , ex ) ; } catch ( linkage error err ) { throw new bean initialization exception ( " unresolvable class definition for dispatcher servlet ' s default strategy class [ " + class name + " ] for interface [ " + key + " ] " , err ) ; } } return strategies ; } else { return collections empty list ( ) ; } }


performs a slow search of all function records , looking for functions whose name matches the regular expression provided as an argument

public list < function record > get function records by name regex ( string regex ) throws i o exception { matcher matcher = pattern compile ( regex ) matcher ( " " ) ; d b field iterator iterator = table index key iterator ( name id col ) ; if ( ! iterator has next ( ) ) { return collections empty list ( ) ; } list < function record > list = new array list < > ( ) ; while ( iterator has next ( ) ) { field key = iterator next ( ) ; function record function record = function cache get ( key get long value ( ) ) ; if ( function record = = null ) { d b record record = table get record ( key ) ; long name i d = record get long value ( name id col ) ; string record name record = strings table lookup string ( name i d ) ; string name = name record get value ( ) ; matcher reset ( name ) ; if ( matcher matches ( ) ) { function record = new function record ( fid db , function cache , record ) ; } } else { matcher reset ( function record get name ( ) ) ; if ( ! matcher matches ( ) ) { function record = null ; } } if ( function record ! = null ) { list add ( function record ) ; } } return list ; }


creates a new { @ link time } that represents the given number of milliseconds

public static time milliseconds ( long milliseconds ) { return of ( milliseconds , time unit milliseconds ) ; }


sets the strategy to use for the combine phase of the reduce if this method is not called , then the default hint will be used ( { @ link org apache flink api common operators base reduce operator base combine hint # optimizer chooses } )

public reduce operator < in > set combine hint ( combine hint strategy ) { this hint = strategy ; return this ; }


removes the value mapped under the current key


will download an image from a url and put it in an image view it uses square ' s picasso library to download the image asynchronously and put the result into the image view picasso manages recycling of views in a list view if you need more control over the picasso settings , use { base adapter helper # set image builder }

public base adapter helper set image url ( int view id , string image url ) { image view view = retrieve view ( view id ) ; glide with ( context ) load ( image url ) into ( view ) ; return this ; }


convert an array of tags to the equivalent proto - generated enum values the proto type is duplicate in order to not burden the options parser with the proto dependency a test guarantees that the two enum types are kept in sync with matching indices

static list < option filters option metadata tag > get proto metadata tags ( option metadata tag [ ] tag array ) { array list < option filters option metadata tag > metadata tags = new array list < > ( tag array length ) ; for ( option metadata tag tag : tag array ) { metadata tags add ( option filters option metadata tag for number ( tag get value ( ) ) ) ; } return metadata tags ; }


this is a method provided by the { @ link observer } interface and must be implemented however , we will not be using it ( see { @ link instruction table observer } for details )

public void update ( observable o , object arg ) { / / do nothing }


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


public boolean has next ( ) { return idx < ints size ( ) ; }


echo the request headers from a client into response headers and trailers useful for testing end - to - end metadata propagation

private static server interceptor echo request headers interceptor ( final metadata key < ? > keys ) { final set < metadata key < ? > > key set = new hash set < > ( arrays as list ( keys ) ) ; return new server interceptor ( ) { @ override public < req t , resp t > server call listener < req t > intercept call ( server call < req t , resp t > call , final metadata request headers , server call handler < req t , resp t > next ) { return next start call ( new simple forwarding server call < req t , resp t > ( call ) { @ override public void send headers ( metadata response headers ) { response headers merge ( request headers , key set ) ; super send headers ( response headers ) ; } @ override public void close ( status status , metadata trailers ) { trailers merge ( request headers , key set ) ; super close ( status , trailers ) ; } } , request headers ) ; } } ; }


bind the socket factory to a given channel mode

private delegating s s l socket factory s s l channel mode bind socket factory ( final delegating s s l socket factory s s l channel mode channel mode ) throws i o exception { delegating s s l socket factory reset default factory ( ) ; configuration conf = new configuration ( false ) ; conf set ( ssl channel mode , channel mode name ( ) ) ; client configuration aws conf = new client configuration ( ) ; aws conf set protocol ( protocol https ) ; bind s s l channel mode ( conf , aws conf ) ; return delegating s s l socket factory get default factory ( ) get channel mode ( ) ; }


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


ensure that the terms aggregation is supported by one or more job caps there is no notion of " best " caps for terms , it is either supported or not

private static void check terms ( terms aggregation builder source , list < rollup job caps > job caps , set < rollup job caps > best caps ) { array list < rollup job caps > local caps = new array list < > ( ) ; for ( rollup job caps cap : job caps ) { rollup job caps rollup field caps field caps = cap get field caps ( ) get ( source field ( ) ) ; if ( field caps ! = null ) { for ( map < string , object > agg : field caps get aggs ( ) ) { if ( agg get ( rollup field agg ) equals ( terms aggregation builder name ) ) { local caps add ( cap ) ; break ; } } } } if ( local caps is empty ( ) ) { throw new illegal argument exception ( " there is not a rollup job that has a [ " + source get writeable name ( ) + " ] agg on field [ " + source field ( ) + " ] which also satisfies all requirements of query " ) ; } / / we are a leaf , save our best caps if ( source get sub aggregations ( ) size ( ) = = 0 ) { best caps add ( get top equal caps ( local caps ) ) ; } else { / / otherwise keep working down the tree source get sub aggregations ( ) for each ( sub - > do find best jobs ( sub , local caps , best caps ) ) ; } }


return the compressed data using quality

public static byte [ ] compress by quality ( final bitmap src , @ int range ( from = 0 , to = 100 ) final int quality ) { return compress by quality ( src , quality , false ) ; }


creates a watermark strategy that generates no watermarks at all this may be useful in scenarios that do pure processing - time based stream processing

static < t > watermark strategy < t > no watermarks ( ) { return ( ctx ) - > new no watermarks generator < > ( ) ; }


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

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


reschedule the given task object immediately to be implemented by subclasses if they ever call { @ code reschedule task if necessary } this implementation throws an unsupported operation exception

protected void do reschedule task ( object task ) { throw new unsupported operation exception ( class utils get short name ( get class ( ) ) + " does not support rescheduling of tasks " ) ; }


the method returns true if the result queue should be created when it does not exist yet

public boolean is create allowed ( ) { return allow create ; }


does the factory create simulated objects ?

public boolean is simulated ( ) { return false ; }