find a single { @ link annotation } of { @ code annotation type } on the supplied { @ link class } , traversing its interfaces , annotations , and superclasses if the annotation is not directly present on the given class itself this method explicitly handles class - level annotations which are not declared as { @ link java lang annotation inherited inherited } as well as meta - annotations and annotations on interfaces the algorithm operates as follows : search for the annotation on the given class and return it if found recursively search through all annotations that the given class declares recursively search through all interfaces that the given class declares recursively search through the superclass hierarchy of the given class note : in this context , the term recursively means that the search process continues by returning to step # 1 with the current interface , annotation , or superclass as the class to look for annotations on

public static < a extends annotation > a find annotation ( class < ? > clazz , @ nullable class < a > annotation type ) { if ( annotation type = = null ) { return null ; } / / shortcut : directly present on the element , with no merging needed ? if ( annotation filter plain matches ( annotation type ) | | annotations scanner has plain java annotations only ( clazz ) ) { a annotation = clazz get declared annotation ( annotation type ) ; if ( annotation ! = null ) { return annotation ; } / / for backwards compatibility , perform a superclass search with plain annotations / / even if not marked as @ inherited : e g a find annotation search for @ deprecated class < ? > superclass = clazz get superclass ( ) ; if ( superclass = = null | | superclass = = object class ) { return null ; } return find annotation ( superclass , annotation type ) ; } / / exhaustive retrieval of merged annotations return merged annotations from ( clazz , search strategy type hierarchy , repeatable containers none ( ) ) get ( annotation type ) with non merged attributes ( ) synthesize ( merged annotation : : is present ) or else ( null ) ; }


marks the instruction at the given offset , after a branch

private void mark after branch origin ( int next offset ) { instruction marks [ next offset ] | = after branch ; / / stop marking a subroutine current subroutine start = unknown ; }


returns the minimum node version among all nodes of the cluster

protected static version minimum node version ( ) throws i o exception { final request request = new request ( " get " , " nodes " ) ; request add parameter ( " filter path " , " nodes * version " ) ; final response response = admin client ( ) perform request ( request ) ; final map < string , object > nodes = object path create from response ( response ) evaluate ( " nodes " ) ; version min version = null ; for ( map entry < string , object > node : nodes entry set ( ) ) { @ suppress warnings ( " unchecked " ) version node version = version from string ( ( string ) ( ( map < string , object > ) node get value ( ) ) get ( " version " ) ) ; if ( min version = = null | | min version after ( node version ) ) { min version = node version ; } } assert not null ( min version ) ; return min version ; }


reads the current stored history id from the iw commit data

private string load history u u i d ( map < string , string > commit data ) { final string uuid = commit data get ( history uuid key ) ; if ( uuid = = null ) { throw new illegal state exception ( " commit doesn ' t contain history uuid " ) ; } return uuid ; }


resets the renderer , releasing any resources that it currently holds


multiply another matrix by the transpose of this one ( transpose of this one on left ) djm : optimized

public final mat 2 2 mul trans ( final mat 2 2 b ) { / * * vec 2 c 1 = new vec 2 ( vec 2 dot ( this ex , b ex ) , vec 2 dot ( this ey , b ex ) ) ; vec 2 c 2 = new * vec 2 ( vec 2 dot ( this ex , b ey ) , vec 2 dot ( this ey , b ey ) ) ; mat 2 2 c = new mat 2 2 ( ) ; c set ( c 1 , c 2 ) ; * return c ; * / final mat 2 2 c = new mat 2 2 ( ) ; c ex x = vec 2 dot ( this ex , b ex ) ; c ex y = vec 2 dot ( this ey , b ex ) ; c ey x = vec 2 dot ( this ex , b ey ) ; c ey y = vec 2 dot ( this ey , b ey ) ; return c ; }


used to verify that " normal " functionality works after static files mapping

private static void test get ( ) throws exception { spark test util url response response = test util do method ( " get " , " / hello " , " " ) ; assert assert equals ( 200 , response status ) ; assert assert true ( response body contains ( fo shizzy ) ) ; }


< code > optional org apache dubbo metadata definition protobuf model phone type type = 2 [ default = home ] ; < code >


returns the context for the current selection


sets this matrix to a translation matrix , overwriting it first by an identity matrix and then setting the 4th column to the translation vector

public matrix 4 set to translation ( vector 3 vector ) { idt ( ) ; val [ m03 ] = vector x ; val [ m13 ] = vector y ; val [ m23 ] = vector z ; return this ; }


returns a reachable address or an arbitrary one , if none is reachable it throws an exception if there are no addresses registered the function is nondeterministic in the sense that the result of calling this function twice with the same set of reachable addresses might lead to different results

public inet socket address get reachable or one ( ) { inet socket address address ; / / if there is only a single address provided then we don ' t do any reachability check if ( addresses size ( ) = = 1 ) { return get one ( ) ; } try { address = get reachable address ( ) ; } catch ( no route to host exception e ) { address = get one ( ) ; } return address ; }


when the request resources is an ack or nack message in response to a previous request resources , the response nonce must be the nonce in the request resources otherwise response nonce must be omitted < code > string response nonce = 4 ; < code >

public java lang string get response nonce ( ) { java lang object ref = response nonce ; if ( ! ( ref instanceof java lang string ) ) { com google protobuf byte string bs = ( com google protobuf byte string ) ref ; java lang string s = bs to string utf 8 ( ) ; response nonce = s ; return s ; } else { return ( java lang string ) ref ; } }


helper to be used by subclasses to emit simple warnings

protected void warning ( string type ) { add issue ( type , null , q a warning severity warning , 1 ) ; }


returns the { @ code type information } for the elements of the input

public type information < in > get input type ( ) { return input get output type ( ) ; }


syntactic sugar for : client ( ) prepare index ( index ) set source ( source ) execute ( ) action get ( ) ;

protected final index response index ( string index , x content builder source ) { return client ( ) prepare index ( index ) set source ( source ) execute ( ) action get ( ) ; }


read the next k , v pair into the head of this object ; return true iff the rr and this are exhausted

public boolean next key value ( ) throws i o exception , interrupted exception { if ( has next ( ) ) { next ( ) ; return true ; } return false ; }


closing the block will release the buffer

protected void inner close ( ) { if ( block buffer ! = null ) { byte buffer block factory release buffer ( block buffer ) ; block buffer = null ; } if ( input stream ! = null ) { input stream close ( ) ; input stream = null ; } }


remove a { @ link byte buf } from the queue with the specified number of bytes any added buffer who ' s bytes are fully consumed during removal will have it ' s promise completed when the passed aggregate { @ link channel promise } completes

public final byte buf remove ( byte buf allocator alloc , int bytes , channel promise aggregate promise ) { check positive or zero ( bytes , " bytes " ) ; check not null ( aggregate promise , " aggregate promise " ) ; / / use is empty rather than readable bytes = = 0 as we may have a promise associated with an empty buffer if ( buf and listener pairs is empty ( ) ) { assert readable bytes = = 0 ; return remove empty value ( ) ; } bytes = math min ( bytes , readable bytes ) ; byte buf to return = null ; byte buf entry buffer = null ; int original bytes = bytes ; try { for ( ; ; ) { object entry = buf and listener pairs poll ( ) ; if ( entry = = null ) { break ; } if ( entry instanceof channel future listener ) { aggregate promise add listener ( ( channel future listener ) entry ) ; continue ; } entry buffer = ( byte buf ) entry ; if ( entry buffer readable bytes ( ) > bytes ) { / / add the buffer back to the queue as we can ' t consume all of it buf and listener pairs add first ( entry buffer ) ; if ( bytes > 0 ) { / / take a slice of what we can consume and retain it entry buffer = entry buffer read retained slice ( bytes ) ; to return = to return = = null ? compose first ( alloc , entry buffer ) : compose ( alloc , to return , entry buffer ) ; bytes = 0 ; } break ; } else { bytes - = entry buffer readable bytes ( ) ; to return = to return = = null ? compose first ( alloc , entry buffer ) : compose ( alloc , to return , entry buffer ) ; } entry buffer = null ; } } catch ( throwable cause ) { safe release ( entry buffer ) ; safe release ( to return ) ; aggregate promise set failure ( cause ) ; throw exception ( cause ) ; } decrement readable bytes ( original bytes - bytes ) ; return to return ; }


the { @ link artifact path resolver } to use when directly writing output files

default artifact path resolver get path resolver ( ) { return artifact path resolver identity ; }


public void start ( ) throws throwable { if ( ! started compare and set ( false , true ) ) { return ; } boss = new nio event loop group ( 1 , new default thread factory ( " qos - boss " , true ) ) ; worker = new nio event loop group ( 0 , new default thread factory ( " qos - worker " , true ) ) ; server bootstrap server bootstrap = new server bootstrap ( ) ; server bootstrap group ( boss , worker ) ; server bootstrap channel ( nio server socket channel class ) ; server bootstrap option ( channel option so reuseaddr , true ) ; server bootstrap child option ( channel option tcp nodelay , true ) ; server bootstrap child handler ( new channel initializer < channel > ( ) { @ override protected void init channel ( channel ch ) throws exception { ch pipeline ( ) add last ( new qos process handler ( welcome , accept foreign ip ) ) ; } } ) ; try { if ( string utils is blank ( host ) ) { server bootstrap bind ( port ) sync ( ) ; } else { server bootstrap bind ( host , port ) sync ( ) ; } logger info ( " qos - server bind localhost : " + port ) ; } catch ( throwable throwable ) { logger error ( " qos - server can not bind localhost : " + port , throwable ) ; throw throwable ; } }


return the contained request header expressions

public set < name value expression < string > > get expressions ( ) { return new linked hash set < > ( this expressions ) ; }


public void add plugins ( string [ ] class names ) throws plugin exception { try { plugin mgr add plugins ( class names ) ; } finally { set config changed ( true ) ; } }


sets the { @ link com google android exoplayer 2 control dispatcher }

public void set control dispatcher ( control dispatcher control dispatcher ) { if ( this control dispatcher ! = control dispatcher ) { this control dispatcher = control dispatcher ; update navigation ( ) ; } }


checks whether the given time is the same or after the scheduled time of this schedule if so , the scheduled time is returned a new scheduled time is computed and set otherwise ( the given time is before the scheduled time ) , { @ code - 1 } is returned

public long check ( long time ) { if ( time < scheduled time ) { return - 1 ; } long prev scheduled time = scheduled time = = 0 ? time : scheduled time ; scheduled time = schedule next scheduled time after ( start time , time ) ; return prev scheduled time ; }


returns the one code block contained by addr ( only for a model that has shared subroutines would this method return more than one code block )

public code block [ ] get code blocks containing ( address addr , task monitor monitor ) throws cancelled exception { code block sub = get first code block containing ( addr , monitor ) ; if ( sub = = null ) { return empty block array ; } code block [ ] blocks = new code block [ 1 ] ; blocks [ 0 ] = sub ; return blocks ; }


sets the viewport to the given position , and fires off an event to notify any subscribers

private void set position ( point position ) { / / do some object checking up front and exit if these aren ' t set if ( ! is state valid ( ) ) { return ; } if ( position y < 0 ) { position = new point ( 0 , 0 ) ; } viewport set view position ( position ) ; f v event update viewport evt = new f v event ( event type viewport update , null ) ; event listener send ( update viewport evt ) ; }


short argument that matches both given argument matchers see examples in javadoc for { @ link additional matchers } class

public static short and ( short first , short second ) { mocking progress ( ) get argument matcher storage ( ) report and ( ) ; return 0 ; }


encode the { @ link permission status } to a long

static long to long ( permission status ps ) { long permission = 0l ; final int user = serial number manager user get serial number ( ps get user name ( ) ) ; assert user ! = 0 ; permission = user bits combine ( user , permission ) ; / / ideally should assert on group but inodes are created with null / / group and then updated only when added to a directory final int group = serial number manager group get serial number ( ps get group name ( ) ) ; permission = group bits combine ( group , permission ) ; final int mode = ps get permission ( ) to short ( ) ; permission = mode bits combine ( mode , permission ) ; return permission ; }


marks the message as processed should only be called by a { @ link sender } and may be called multiple times

public synchronized void mark as processed ( boolean is delivered ) { this is delivered | = is delivered ; is processed = true ; notify all ( ) ; }


public set < string > get photo urls ( ) { return photo urls ; }


create a new { @ code m bean server } instance and register it with the { @ code m bean server factory } , if desired

protected m bean server create m bean server ( @ nullable string default domain , boolean register with factory ) { if ( register with factory ) { return m bean server factory create m bean server ( default domain ) ; } else { return m bean server factory new m bean server ( default domain ) ; } }


helper function used to work around the fact that if you use an s3 bucket with an ' ' that java net uri behaves differently and sets the host value to null whereas s3 buckets without ' ' have a properly set host field ' ' is only allowed in s3 bucket names in us - east - 1

public static string get bucket name ( uri uri ) { if ( uri get host ( ) ! = null ) { return uri get host ( ) ; } if ( uri get user info ( ) = = null ) { return uri get authority ( ) ; } throw new illegal argument exception ( " unable to determine s3 bucket from uri " ) ; }


get shard list of multiple kinesis streams , ignoring the shards of each stream before a specified last seen shard id

get shard list result get shard list ( map < string , string > stream names with last seen shard ids ) throws interrupted exception ;


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


notepad pdb does not exist notepad pdb xml is here : < tepdb xml repo location set to the default location on windows , no file should be found on non - windows , no file should be found

public void test find pdb 2 5 ( ) throws exception { created files = create files ( pdb location none , pdb xml location own dir ) ; file pdb = pdb parser find p d b ( test program , false , no such symbols repo dir ) ; assert null ( pdb ) ; }


returns the cookie persistence to use for the http cookie

protected boolean is cookie persistent ( ) { return is cookie persistent ; }


set the jca connection manager that should be used to create the desired connection factory a connection manager implementation for local usage is often included with a jca connector such an included connection manager might be set as default , with no need to explicitly specify one

public void set connection manager ( connection manager connection manager ) { this connection manager = connection manager ; }


protected int key for code ( int key code , int location ) { switch ( key code ) { case key codes key alt : return location = = location right ? keys alt right : keys alt left ; case key codes key backspace : return keys backspace ; case key codes key ctrl : return location = = location right ? keys control right : keys control left ; case key codes key delete : return keys forward del ; case key codes key down : return keys down ; case key codes key end : return keys end ; case key codes key enter : return location = = location numpad ? keys numpad enter : keys enter ; case key codes key escape : return keys escape ; case key codes key home : return keys home ; case key codes key left : return keys left ; case key codes key pagedown : return keys page down ; case key codes key pageup : return keys page up ; case key codes key right : return keys right ; case key codes key shift : return location = = location right ? keys shift right : keys shift left ; case key codes key tab : return keys tab ; case key codes key up : return keys up ; case key pause : return keys pause ; case key caps lock : return keys caps lock ; case key space : return keys space ; case key insert : return keys insert ; case key 0 : return keys num 0 ; case key 1 : return keys num 1 ; case key 2 : return keys num 2 ; case key 3 : return keys num 3 ; case key 4 : return keys num 4 ; case key 5 : return keys num 5 ; case key 6 : return keys num 6 ; case key 7 : return keys num 7 ; case key 8 : return keys num 8 ; case key 9 : return keys num 9 ; case key a : return keys a ; case key b : return keys b ; case key c : return keys c ; case key d : return keys d ; case key e : return keys e ; case key f : return keys f ; case key g : return keys g ; case key h : return keys h ; case key i : return keys i ; case key j : return keys j ; case key k : return keys k ; case key l : return keys l ; case key m : return keys m ; case key n : return keys n ; case key o : return keys o ; case key p : return keys p ; case key q : return keys q ; case key r : return keys r ; case key s : return keys s ; case key t : return keys t ; case key u : return keys u ; case key v : return keys v ; case key w : return keys w ; case key x : return keys x ; case key y : return keys y ; case key z : return keys z ; case key left window key : return keys unknown ; / / fixme case key right window key : return keys unknown ; / / fixme / / case key select key : return keys select key ; case key numpad0 : return keys numpad 0 ; case key numpad1 : return keys numpad 1 ; case key numpad2 : return keys numpad 2 ; case key numpad3 : return keys numpad 3 ; case key numpad4 : return keys numpad 4 ; case key numpad5 : return keys numpad 5 ; case key numpad6 : return keys numpad 6 ; case key numpad7 : return keys numpad 7 ; case key numpad8 : return keys numpad 8 ; case key numpad9 : return keys numpad 9 ; case key multiply : return keys numpad multiply ; case key add : return keys numpad add ; case key subtract : return keys numpad subtract ; case key decimal point key : return keys numpad dot ; case key divide : return keys numpad divide ; case key f1 : return keys f1 ; case key f2 : return keys f2 ; case key f3 : return keys f3 ; case key f4 : return keys f4 ; case key f5 : return keys f5 ; case key f6 : return keys f6 ; case key f7 : return keys f7 ; case key f8 : return keys f8 ; case key f9 : return keys f9 ; case key f10 : return keys f10 ; case key f11 : return keys f11 ; case key f12 : return keys f12 ; case key f13 : return keys f13 ; case key f14 : return keys f14 ; case key f15 : return keys f15 ; case key f16 : return keys f16 ; case key f17 : return keys f17 ; case key f18 : return keys f18 ; case key f19 : return keys f19 ; case key f20 : return keys f20 ; case key f21 : return keys f21 ; case key f22 : return keys f22 ; case key f23 : return keys f23 ; case key f24 : return keys f24 ; case key num lock : return keys num lock ; case key scroll lock : return keys scroll lock ; case key audio volume down : case key audio volume down firefox : return keys volume down ; case key audio volume up : case key audio volume up firefox : return keys volume up ; case key media track next : return keys media next ; case key media track previous : return keys media previous ; case key media stop : return keys media stop ; case key media play pause : return keys media play pause ; case key codes key print screen : return keys print screen ; case key semicolon : return keys semicolon ; case key equals : return keys equals ; case key comma : return keys comma ; case key dash : return keys minus ; case key period : return keys period ; case key forward slash : return keys slash ; case key grave accent : return keys unknown ; / / fixme case key open bracket : return keys left bracket ; case key backslash : return keys backslash ; case key close bracket : return keys right bracket ; case key single quote : return keys apostrophe ; default : return keys unknown ; } }


creates a specification of classes and class members , based on the given parameters

private class specification create class specification ( map class specification args , closure class members closure ) throws parse exception { / / extract the arguments string access = ( string ) class specification args get ( " access " ) ; string annotation = ( string ) class specification args get ( " annotation " ) ; string type = ( string ) class specification args get ( " type " ) ; string name = ( string ) class specification args get ( " name " ) ; string extends annotation = ( string ) class specification args get ( " extendsannotation " ) ; string extends = ( string ) class specification args get ( " extends " ) ; if ( extends = = null ) { extends = ( string ) class specification args get ( " implements " ) ; } / / create the class specification class specification class specification = new class specification ( null , required class access flags ( true , access , type ) , required class access flags ( false , access , type ) , annotation ! = null ? class util internal type ( annotation ) : null , name ! = null ? class util internal class name ( name ) : null , extends annotation ! = null ? class util internal type ( extends annotation ) : null , extends ! = null ? class util internal class name ( extends ) : null ) ; / / initialize the class specification with its closure if ( class members closure ! = null ) { / / temporarily remember the class specification , so we can add / / class member specifications this class specification = class specification ; class members closure call ( class specification ) ; this class specification = null ; } return class specification ; }


checks if the c groups resource calculator is available on this system this assumes that linux container executor is already initialized

public static boolean is available ( ) { try { if ( ! shell linux ) { log info ( " c groups resource calculator currently is supported only on " + " linux " ) ; return false ; } if ( resource handler module get c groups handler ( ) = = null | | resource handler module get cpu resource handler ( ) = = null | | resource handler module get memory resource handler ( ) = = null ) { log info ( " c groups resource calculator requires enabling c groups " + " cpu and memory " ) ; return false ; } } catch ( security exception se ) { log warn ( " failed to get operating system name " + se ) ; return false ; } return true ; }


reset the { @ link mock filter chain } allowing it to be invoked again

public void reset ( ) { this request = null ; this response = null ; this iterator = null ; }


get fakejson form data : test json serialization of form data

default response entity < void > test json form data ( string param , string param 2 ) { return new response entity < > ( http status not implemented ) ; }


private static signature trust engine build signature trust engine ( final ws federation configuration ws federation configuration ) { val signing wallet = ws federation configuration get signing wallet ( ) ; logger debug ( " building signature trust engine based on the following signing certificates : " ) ; signing wallet for each ( c - > logger debug ( " credential entity id [ { } ] with public key [ { } ] " , c get entity id ( ) , c get public key ( ) ) ) ; val resolver = new static credential resolver ( signing wallet ) ; val key resolver = new static key info credential resolver ( signing wallet ) ; return new explicit key signature trust engine ( resolver , key resolver ) ; }


verifies that a task executor hosting partitions of a data set receives a release call if a partition of the data set is lost on another task executor

public void test report processing with partition loss on other task executor ( ) { test cluster partition releaser partition releaser = new test cluster partition releaser ( ) ; final resource manager partition tracker tracker = new resource manager partition tracker impl ( partition releaser ) ; report ( tracker , task executor id 1 , data set id , 2 , partition id 1 ) ; report ( tracker , task executor id 2 , data set id , 2 , partition id 2 ) ; report empty ( tracker , task executor id 1 ) ; assert that ( partition releaser release calls , contains ( tuple 2 of ( task executor id 2 , collections singleton ( data set id ) ) ) ) ; }


sets the player to be passed to { @ link # handle message ( simple exo player , int , object ) }

/ * package * / void set player ( simple exo player player ) { this player = player ; }


clone this bitfield to a new datatype manager this may change the effective bit size and storage size of the resulting datatype based upon the data organization of the specified dtm

public bit field data type clone ( data type manager dtm ) { if ( dtm = = data mgr ) { return this ; } try { return new bit field data type ( base data type clone ( dtm ) , bit size , bit offset ) ; } catch ( invalid data type exception e ) { throw new assert exception ( " unexpected " , e ) ; } }


assert that a counter has an expected value

public static long verify statistic counter value ( final i o statistics stats , final string key , final long value ) { return verify statistic value ( counter , key , verify statistics not null ( stats ) counters ( ) , value ) ; }


executes the given task in a fixed thread pool after the given delay

public static < t > void execute by fixed with delay ( @ int range ( from = 1 ) final int size , final task < t > task , final long delay , final time unit unit , @ int range ( from = 1 , to = 10 ) final int priority ) { execute with delay ( get pool by type and priority ( size , priority ) , task , delay , unit ) ; }


patch fake : to test \ & quot ; client \ & quot ; model to test \ & quot ; client \ & quot ; model

public response entity < client > test client model ( @ api param ( value = " client model " , required = true ) @ valid @ request body client body ) { return delegate test client model ( body ) ; }


public glyph layout add text ( char sequence str , float x , float y , int start , int end , float target width , int halign , boolean wrap , string truncate ) { glyph layout layout = pools obtain ( glyph layout class ) ; pooled layouts add ( layout ) ; layout set text ( font , str , start , end , color , target width , halign , wrap , truncate ) ; add text ( layout , x , y ) ; return layout ; }


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

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


applies when sorting , and controls if scores will be tracked as well defaults to { @ code false }

public top hits aggregation builder track scores ( boolean track scores ) { this track scores = track scores ; return this ; }


add a listener for the final stage info this notification is guaranteed to be fired only once listener is always notified asynchronously using a dedicated notification thread pool so , care should be taken to avoid leaking { @ code this } when adding a listener in a constructor additionally , it is possible notifications are observed out of order due to the asynchronous execution

public void add final stage info listener ( state change listener < stage execution info > state change listener ) { state machine add final stage info listener ( state change listener ) ; }


register a callback to be executed on destruction of the specified object in the scope ( or at destruction of the entire scope , if the scope does not destroy individual objects but rather only terminates in its entirety ) < b > note : this is an optional operation < b > this method will only be called for scoped beans with actual destruction configuration ( disposable bean , destroy - method , destruction aware bean post processor ) implementations should do their best to execute a given callback at the appropriate time if such a callback is not supported by the underlying runtime environment at all , the callback must be ignored and a corresponding warning should be logged note that ' destruction ' refers to automatic destruction of the object as part of the scope ' s own lifecycle , not to the individual scoped object having been explicitly removed by the application if a scoped object gets removed via this facade ' s { @ link # remove ( string ) } method , any registered destruction callback should be removed as well , assuming that the removed object will be reused or manually destroyed

void register destruction callback ( string name , runnable callback ) ;


shuts down all subchannels in the pool immediately


uploads two different b l o bs to the { @ link blob server } via a { @ link blob client } and verifies we can access the files from a { @ link blob cache service }

private void upload file get test ( final configuration config , @ nullable job i d job id , boolean shutdown server after upload , boolean cache has access to fs , blob key blob type blob type ) throws i o exception { final configuration cache config = new configuration ( config ) ; cache config set string ( blob server options storage directory , temporary folder new folder ( ) get absolute path ( ) ) ; if ( ! cache has access to fs ) { / / make sure the cache cannot access the ha store directly cache config set string ( blob server options storage directory , temporary folder new folder ( ) get absolute path ( ) ) ; cache config set string ( high availability options ha storage path , temporary folder new folder ( ) get path ( ) + " / does - not - exist " ) ; } / / first create two b l o bs and upload them to blob server final byte [ ] data = new byte [ 128 ] ; byte [ ] data 2 = arrays copy of ( data , data length ) ; data 2 [ 0 ] ^ = 1 ; blob store service blob store service = null ; try { blob store service = blob utils create blob store from config ( cache config ) ; try ( blob server server = new blob server ( config , blob store service ) ; blob cache service cache = new blob cache service ( cache config , blob store service , new inet socket address ( " localhost " , server get port ( ) ) ) ) { server start ( ) ; / / upload b l o bs blob key key 1 = put ( server , job id , data , blob type ) ; blob key key 2 = put ( server , job id , data 2 , blob type ) ; if ( shutdown server after upload ) { / / now , shut down the blob server , the b l o bs must still be accessible through / / the cache server close ( ) ; } verify contents ( cache , job id , key 1 , data ) ; verify contents ( cache , job id , key 2 , data 2 ) ; if ( shutdown server after upload ) { / / now , shut down the blob server , the b l o bs must still be accessible through / / the cache server close ( ) ; verify contents ( cache , job id , key 1 , data ) ; verify contents ( cache , job id , key 2 , data 2 ) ; } } } finally { if ( blob store service ! = null ) { blob store service close and cleanup all data ( ) ; } } }


get the current maximum offset on the store partition ' s changelog topic , that has been successfully written into the store partition ' s state store

public long current offset position ( ) { return this current offset position ; }


test for bug described in https : issues apache orgjirabrowse z o o k e e p e r - 3320 test create peer with address which contains unresolvable dns name , leader election listener thread should stop after n errors

public void test cnx manager listener thread configurable retry ( ) throws exception { final map < long , quorum server > unresolvable peers = new hash map < > ( ) ; final long myid = 1l ; unresolvable peers put ( myid , new quorum server ( myid , " unresolvable - domain org : 2182 : 2183 ; 2181 " ) ) ; final quorum peer peer = new quorum peer ( unresolvable peers , client base create tmp dir ( ) , client base create tmp dir ( ) , 2181 , 3 , myid , 1000 , 2 , 2 , 2 ) ; final quorum cnx manager cnx manager = peer create cnxn manager ( ) ; final quorum cnx manager listener listener = cnx manager listener ; final atomic boolean error happend = new atomic boolean ( false ) ; listener set socket bind error handler ( ( ) - > error happend set ( true ) ) ; listener start ( ) ; / / listener thread should stop and throws error which notify quorum peer about error / / quorum peer should start shutdown process listener join ( 15000 ) ; / / set wait time , if listener contains bug and thread not stops assert false ( listener is alive ( ) ) ; assert true ( error happend get ( ) ) ; assert false ( listener is alive ( ) , quorum peer class get simple name ( ) + " not stopped after " + " listener thread death " ) ; }


reset the various state - keeping maps of artifact nested set function

void reset artifact nested set function maps ( ) { artifact sky key to sky value = maps new concurrent map ( ) ; }


the filesystem path to where the source file originated mainly used to display helpful error messages < code > optional string source path = 3 ; < code >

public string get source path ( ) { return instance get source path ( ) ; }


returns the number of block input operations during the { @ link spawn } ' s execution

optional < long > get num block input operations ( ) ;


skips checks for existing keys , doesn ' t increment size

private void put resize ( k key , float value ) { k [ ] key table = this key table ; for ( int i = place ( key ) ; ; i = ( i + 1 ) & mask ) { if ( key table [ i ] = = null ) { key table [ i ] = key ; value table [ i ] = value ; return ; } } }


returns the class of all the elements of the underlying enum set wriable it may return null

public class < e > get element type ( ) { return element type ; }


for which { @ link item } are we polling ?

public s c m trigger item get target ( ) { return job ( ) ; }


static < t extends create opts > create opts [ ] set opt ( final t new value , final create opts opts ) { final class < ? > clazz = new value get class ( ) ; boolean already in opts = false ; if ( opts ! = null ) { for ( int i = 0 ; i < opts length ; + + i ) { if ( opts [ i ] get class ( ) = = clazz ) { if ( already in opts ) { throw new illegal argument exception ( " multiple opts varargs : " + clazz ) ; } already in opts = true ; opts [ i ] = new value ; } } } create opts [ ] result opt = opts ; if ( ! already in opts ) { / / no new value in opt final int old length = opts = = null ? 0 : opts length ; create opts [ ] new opts = new create opts [ old length + 1 ] ; if ( old length > 0 ) { system arraycopy ( opts , 0 , new opts , 0 , old length ) ; } new opts [ old length ] = new value ; result opt = new opts ; } return result opt ; }


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


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


creates an ntfs junction point if supported similar to symbolic links , ntfs provides junction points which provide different features than symbolic links

public static @ non null file create junction ( @ non null file junction , @ non null file target ) throws i o exception , interrupted exception { if ( ! functions is windows ( ) ) { throw new unsupported operation exception ( " can only be called on windows platform " ) ; } process mklink = exec cmd ( " mklink " , " / j " , junction get absolute path ( ) , target get absolute path ( ) ) ; int result = mklink wait for ( ) ; if ( result ! = 0 ) { string stderr = i o utils to string ( mklink get error stream ( ) ) ; string stdout = i o utils to string ( mklink get input stream ( ) ) ; throw new i o exception ( " process exited with " + result + " \ n standard output : \ n " + stdout + " \ n error output : \ n " + stderr ) ; } return junction ; }


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

public builder merge sink node ( com alibaba nacos istio model mcp sink node value ) { if ( sink node builder = = null ) { if ( sink node ! = null ) { sink node = com alibaba nacos istio model mcp sink node new builder ( sink node ) merge from ( value ) build partial ( ) ; } else { sink node = value ; } on changed ( ) ; } else { sink node builder merge from ( value ) ; } return this ; }


loads the map data , given the xml root element and an { @ link image resolver } used to return the tileset textures

private tiled map load map ( element root , file handle tmx file , image resolver image resolver ) { tiled map map = new tiled map ( ) ; element properties = root get child by name ( " properties " ) ; if ( properties ! = null ) { load properties ( map get properties ( ) , properties ) ; } element tilesheets = root get child by name ( " tile sheets " ) ; for ( element tilesheet : tilesheets get children by name ( " tile sheet " ) ) { load tile sheet ( map , tilesheet , tmx file , image resolver ) ; } element layers = root get child by name ( " layers " ) ; for ( element layer : layers get children by name ( " layer " ) ) { load layer ( map , layer ) ; } return map ; }


public boolean succeeded ( ) { return is done ( ) & & ! failed ( ) ; }


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


private boolean remove variable ( list < ? > list , variable d b var ) { int cnt = list size ( ) ; for ( int i = 0 ; i < cnt ; i + + ) { if ( var = = list get ( i ) ) { list remove ( i ) ; return true ; } } return false ; }


shutdown connection by default subclass can override this method to do more interaction with the server

public void message received ( channel handler context ctx , message event e ) { e get channel ( ) close ( ) ; }


public api response < order > place order with http info ( order body ) throws api exception { okhttp 3 call local var call = place order validate before call ( body , null ) ; type local var return type = new type token < order > ( ) { } get type ( ) ; return local var api client execute ( local var call , local var return type ) ; }


public byte get target type ( ) { return u 1target type ; }


public list < string > get photo urls ( ) { return photo urls ; }


naively traverse a view and collect all elements reachable

private static immutable set < string > contents ( nested set < string > set ) { immutable set builder < string > builder = new immutable set builder < string > ( ) ; builder add all ( set get leaves ( ) ) ; for ( nested set < string > nonleaf : set get non leaves ( ) ) { builder add all ( contents ( nonleaf ) ) ; } return builder build ( ) ; }


tries to coordinate async counting but it is flaky due to the low 1 0s of milliseconds

void ref count async actual ( ) { final atomic integer subscribe count = new atomic integer ( ) ; final atomic integer next count = new atomic integer ( ) ; flowable < long > r = flowable interval ( 0 , 20 , time unit milliseconds ) do on subscribe ( new consumer < subscription > ( ) { @ override public void accept ( subscription s ) { subscribe count increment and get ( ) ; } } ) do on next ( new consumer < long > ( ) { @ override public void accept ( long l ) { next count increment and get ( ) ; } } ) publish ( ) ref count ( ) ; final atomic integer received count = new atomic integer ( ) ; disposable d 1 = r subscribe ( new consumer < long > ( ) { @ override public void accept ( long l ) { received count increment and get ( ) ; } } ) ; disposable d 2 = r subscribe ( ) ; try { thread sleep ( 10 ) ; } catch ( interrupted exception e ) { } for ( ; ; ) { int a = next count get ( ) ; int b = received count get ( ) ; if ( a > 10 & & a < 20 & & a = = b ) { break ; } if ( a > = 20 ) { break ; } try { thread sleep ( 20 ) ; } catch ( interrupted exception e ) { } } / / give time to emit / / now unsubscribe d 2 dispose ( ) ; / / unsubscribe s 2 first as we ' re counting in 1 and there can be a race between unsubscribe and one subscriber getting a value but not the other d 1 dispose ( ) ; system out println ( " on next : " + next count get ( ) ) ; / / should emit once for both subscribers assert equals ( next count get ( ) , received count get ( ) ) ; / / only 1 subscribe assert equals ( 1 , subscribe count get ( ) ) ; }


returns the common prefix of variables for enum naming if two or more variables are present

public string find common prefix of vars ( list < object > vars ) { if ( vars size ( ) > 1 ) { try { string [ ] list str = vars to array ( new string [ vars size ( ) ] ) ; string prefix = string utils get common prefix ( list str ) ; / / exclude trailing characters that should be part of a valid variable / / e g [ " status - on " , " status - off " ] = > " status - " ( not " status - o " ) return prefix replace all ( " [ a - z a - z0 - 9 ] + \ \ z " , " " ) ; } catch ( array store exception e ) { / / do nothing , just return default value } } return " " ; }


determine the target type for the generic return type of the given generic factory method , where formal type variables are declared on the given method itself for example , given a factory method with the following signature , if { @ code resolve return type for factory method ( ) } is invoked with the reflected method for { @ code create proxy ( ) } and an { @ code object [ ] } array containing { @ code my service class } , { @ code resolve return type for factory method ( ) } will infer that the target return type is { @ code my service } < pre class = " code " > { @ code public static < t > t create proxy ( class < t > clazz ) } < h 4 > possible return values < h 4 > the target return type , if it can be inferred the { @ linkplain method # get return type ( ) standard return type } , if the given { @ code method } does not declare any { @ linkplain method # get type parameters ( ) formal type variables } the { @ linkplain method # get return type ( ) standard return type } , if the target return type cannot be inferred ( e g , due to type erasure ) { @ code null } , if the length of the given arguments array is shorter than the length of the { @ linkplain method # get generic parameter types ( ) formal argument list } for the given method

public static class < ? > resolve return type for factory method ( method method , object [ ] args , @ nullable class loader class loader ) { assert not null ( method , " method must not be null " ) ; assert not null ( args , " argument array must not be null " ) ; type variable < method > [ ] declared type variables = method get type parameters ( ) ; type generic return type = method get generic return type ( ) ; type [ ] method parameter types = method get generic parameter types ( ) ; assert is true ( args length = = method parameter types length , " argument array does not match parameter count " ) ; / / ensure that the type variable ( e g , t ) is declared directly on the method / / itself ( e g , via < t > ) , not on the enclosing class or interface boolean locally declared type variable matches return type = false ; for ( type variable < method > current type variable : declared type variables ) { if ( current type variable equals ( generic return type ) ) { locally declared type variable matches return type = true ; break ; } } if ( locally declared type variable matches return type ) { for ( int i = 0 ; i < method parameter types length ; i + + ) { type method parameter type = method parameter types [ i ] ; object arg = args [ i ] ; if ( method parameter type equals ( generic return type ) ) { if ( arg instanceof typed string value ) { typed string value typed value = ( ( typed string value ) arg ) ; if ( typed value has target type ( ) ) { return typed value get target type ( ) ; } try { class < ? > resolved type = typed value resolve target type ( class loader ) ; if ( resolved type ! = null ) { return resolved type ; } } catch ( class not found exception ex ) { throw new illegal state exception ( " failed to resolve value type [ " + typed value get target type name ( ) + " ] for factory method argument " , ex ) ; } } else if ( arg ! = null & & ! ( arg instanceof bean metadata element ) ) { / / only consider argument type if it is a simple value return arg get class ( ) ; } return method get return type ( ) ; } else if ( method parameter type instanceof parameterized type ) { parameterized type parameterized type = ( parameterized type ) method parameter type ; type [ ] actual type arguments = parameterized type get actual type arguments ( ) ; for ( type type arg : actual type arguments ) { if ( type arg equals ( generic return type ) ) { if ( arg instanceof class ) { return ( class < ? > ) arg ; } else { string class name = null ; if ( arg instanceof string ) { class name = ( string ) arg ; } else if ( arg instanceof typed string value ) { typed string value typed value = ( ( typed string value ) arg ) ; string target type name = typed value get target type name ( ) ; if ( target type name = = null | | class class get name ( ) equals ( target type name ) ) { class name = typed value get value ( ) ; } } if ( class name ! = null ) { try { return class utils for name ( class name , class loader ) ; } catch ( class not found exception ex ) { throw new illegal state exception ( " could not resolve class name [ " + arg + " ] for factory method argument " , ex ) ; } } / / consider adding logic to determine the class of the type arg , if possible / / for now , just fall back return method get return type ( ) ; } } } } } } / / fall back return method get return type ( ) ; }


returns targets queried in { @ link # get move target }

public set < string > used runtime helpers ( ) { return unmodifiable set ( used runtime helpers ) ; }


returns the type of this input channel ' s consumed result partition

public result partition type get consumed partition type ( ) { return consumed partition type ; }


obtain the named value for the given method parameter

private named value info get named value info ( method parameter parameter ) { named value info named value info = this named value info cache get ( parameter ) ; if ( named value info = = null ) { named value info = create named value info ( parameter ) ; named value info = update named value info ( parameter , named value info ) ; this named value info cache put ( parameter , named value info ) ; } return named value info ; }


utility to dispatch an unhandled exception to a component to be used by the framework

static void dispatch error event ( component context c , exception e ) { final error event event = new error event ( ) ; event exception = e ; dispatch error event ( c , event ) ; }


returns true if the { @ link index shard state } allows reading

public boolean is read allowed ( ) { return read allowed states contains ( state ) ; }


returns a mutable map of the environment variables for a specific test this is intended to be the final , complete environment - callers should avoid relying on the mutability of the return value , and instead change the policy itself

public map < string , string > compute test environment ( test runner action test action , map < string , string > client env , duration timeout , path fragment relative runfiles dir , path fragment tmp dir ) { map < string , string > env = new hash map < > ( ) ; / / add all env variables , allow some string replacements and inheritance string user prop = user utils get user name ( ) ; string tmp dir path = tmp dir get path string ( ) ; string runfiles dir path = relative runfiles dir get path string ( ) ; for ( map entry < string , string > entry : env variables entry set ( ) ) { string val = entry get value ( ) ; if ( val contains ( " $ { " ) ) { if ( val equals ( inherited ) ) { if ( ! client env contains key ( entry get key ( ) ) ) { continue ; } val = client env get ( entry get key ( ) ) ; } else { val = val replace ( system user name , user prop ) ; val = val replace ( test tmp dir , tmp dir path ) ; val = val replace ( runfiles dir , runfiles dir path ) ; } } env put ( entry get key ( ) , val ) ; } / / rule - specified test env test action get extra test env ( ) resolve ( env , client env ) ; / / overwrite with the environment common to all actions , see - - action env test action get configuration ( ) get action environment ( ) resolve ( env , client env ) ; / / overwrite with the environment common to all tests , see - - test env test action get configuration ( ) get test action environment ( ) resolve ( env , client env ) ; / / setup any test - specific env variables ; note that this does not overwrite existing values for / / test random seed or test size if they ' re already set test action setup env variables ( env , timeout ) ; return env ; } }


access every property of the entity under test and record execution time with { @ link # start clock ( string ) } and { @ link # stop clock ( ) }

protected abstract void access all ( list < t > list , string trace name ) ;


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

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


returns an array of strings containing only application - specific arguments

public string [ ] get remaining args ( ) { return ( command line = = null ) ? new string [ ] { } : command line get args ( ) ; }


appends instructions to pop the parameters for the given method , storing them in new local variables

private void store parameters ( clazz clazz , method method ) { string descriptor = method get descriptor ( clazz ) ; boolean is static = ( method get access flags ( ) & class constants acc static ) ! = 0 ; / / count the number of parameters , taking into account their categories int parameter count = class util internal method parameter count ( descriptor ) ; int parameter size = class util internal method parameter size ( descriptor ) ; int parameter offset = is static ? 0 : 1 ; / / store the parameter types string [ ] parameter types = new string [ parameter size ] ; internal type enumeration internal type enumeration = new internal type enumeration ( descriptor ) ; for ( int parameter index = 0 ; parameter index < parameter size ; parameter index + + ) { string parameter type = internal type enumeration next type ( ) ; parameter types [ parameter index ] = parameter type ; if ( class util internal type size ( parameter type ) = = 2 ) { parameter index + + ; } } code attribute composer begin code fragment ( parameter size + 1 ) ; / / go over the parameter types backward , storing the stack entries / / in their corresponding variables for ( int parameter index = parameter size - 1 ; parameter index > = 0 ; parameter index - - ) { string parameter type = parameter types [ parameter index ] ; if ( parameter type ! = null ) { byte opcode ; switch ( parameter type char at ( 0 ) ) { case class constants type boolean : case class constants type byte : case class constants type char : case class constants type short : case class constants type int : opcode = instruction constants op istore ; break ; case class constants type long : opcode = instruction constants op lstore ; break ; case class constants type float : opcode = instruction constants op fstore ; break ; case class constants type double : opcode = instruction constants op dstore ; break ; default : opcode = instruction constants op astore ; break ; } code attribute composer append instruction ( parameter size - parameter index - 1 , new variable instruction ( opcode , variable offset + parameter offset + parameter index ) ) ; } } / / put the ' this ' reference in variable 0 ( plus offset ) if ( ! is static ) { code attribute composer append instruction ( parameter size , new variable instruction ( instruction constants op astore , variable offset ) ) ; } code attribute composer end code fragment ( ) ; }


map settings for cache seconds to specific url paths via patterns overrides the default cache seconds setting of this interceptor can specify " - 1 " to exclude a url path from default caching for pattern syntax see { @ link ant path matcher } and { @ link path pattern } as well as the class - level javadoc for details for when each is used the syntax is largely the same with { @ link path pattern } more tailored for web usage < b > note : < b > path patterns are not supposed to overlap if a request matches several mappings , it is effectively undefined which one will apply ( due to the lack of key ordering in { @ code java util properties } )

public void set cache mappings ( properties cache mappings ) { this cache mappings clear ( ) ; enumeration < ? > prop names = cache mappings property names ( ) ; while ( prop names has more elements ( ) ) { string path = ( string ) prop names next element ( ) ; int cache seconds = integer parse int ( cache mappings get property ( path ) ) ; this cache mappings put ( this pattern parser parse ( path ) , cache seconds ) ; } }


releases an instance of the given server - side { @ link ssl context provider } the instance must have been obtained from { @ link # find or create server ssl context provider } otherwise will throw illegal argument exception caller must not release a reference more than once it ' s advised that you clear the reference to the instance with the null returned by this method

ssl context provider release server ssl context provider ( ssl context provider ssl context provider ) ;


add the given stream element to the operator ' s stream element queue this operation blocks until the element has been added between two insertion attempts , this method yields the execution to the mailbox , such that events as well as asynchronous results can be processed

private result future < out > add to work queue ( stream element stream element ) throws interrupted exception { optional < result future < out > > queue entry ; while ( ! ( queue entry = queue try put ( stream element ) ) is present ( ) ) { mailbox executor yield ( ) ; } return queue entry get ( ) ; }


returns a layered d b buffer object for the given database buffer id

d b buffer get buffer ( int buffer i d , d b buffer shadow buffer ) throws i o exception { if ( buffer i d > = 0 ) { return handle get buffer ( buffer i d , shadow buffer ) ; } return null ; }


returns the architecture for this container either power p c cfm or c fm - 6 8k

public string get architecture ( ) { return architecture ; }


returns the priority at which the task was run within its group

public int get priority ( ) { return priority ; }


static factory method to create a new { @ code data class row mapper }

public static < t > data class row mapper < t > new instance ( class < t > mapped class , @ nullable conversion service conversion service ) { data class row mapper < t > row mapper = new instance ( mapped class ) ; row mapper set conversion service ( conversion service ) ; return row mapper ; }


private static byte buf from text ( string text ) { if ( text = = null | | text is empty ( ) ) { return unpooled empty buffer ; } else { return unpooled copied buffer ( text , charset util utf 8 ) ; } }


public void join ( ) throws interrupted exception { server join ( ) ; }


public integer get integer ( ) { return integer ; }


splits the given line into multiple lines based upon the given max length < p > once the maximum provided length is passed , the algorithm attempts to split on a word boundary by first looking backwards in the given line ( since the last split value ) to find a space if no space is found in that direction , then the the algorithm will keep walking forward until either a space is found or { @ link # max word length } is passed , at which point the line will be ended , splitting any word that surrounds that index

private static list < string > wrap ( string text , int max line length , whitespace handler whitespacer ) { list < string > lines = new array list < > ( ) ; int start = 0 ; int size = 0 ; boolean break needed = false ; boolean has forced break = false ; int length = text length ( ) ; for ( int i = 0 ; i < length ; i + + ) { char c = text char at ( i ) ; size + = ( c = = ' \ t ' ) ? 4 : 1 ; boolean hit max length = size > = max line length ; boolean is whitespace = character is whitespace ( c ) ; if ( break needed ) { if ( is whitespace ) { / / we found a whitespace - - break ! string line = text substring ( start , i ) ; lines add ( line ) ; / / left - justify by moving past spaces i + = whitespacer count spaces ( text , i ) ; start = i ; size = 0 ; break needed = false ; } / / looking for a break ; no whitespace - - are we past the hard limit ? else if ( size - max line length > = max word length ) { / / past hard limit ; just chop at the original desired length has forced break = true ; break needed = false ; int end = start + max line length ; lines add ( text substring ( start , end ) ) ; start = end ; size = i - start ; } } else if ( hit max length ) { break needed = false ; string line = text substring ( start , i ) ; if ( ! is whitespace ) { / / not on a whitespace ; look for whitespace to split on int end = string utils last index of any ( line , " " , " \ t " ) ; if ( end < 0 ) { / / delay breaking for whitespace break needed = true ; continue ; } / / + 1 to include the space ; it will get trimmed below as needed line = line substring ( 0 , end + 1 ) ; } lines add ( whitespacer trim ( line ) ) ; start = start + line length ( ) ; / / left - justify by moving past spaces start + = whitespacer count spaces ( text , start ) ; i = math max ( i , start ) ; / / adjust for removed spaces / / i ! = start when we chopped the line on a space before ' i ' size = i - start ; } } / / handle any trailing text ; don ' t split if no breaks were forced ( this keeps the text / / consistent - - either break all text or break none ) string line = whitespacer trim ( text substring ( start , length ) ) ; int split on = has forced break ? max line length : - 1 ; list < string > remainder = force split on ( line , split on ) ; lines add all ( remainder ) ; return lines ; }


public static void start activity for result ( @ non null final bundle extras , @ non null final activity activity , @ non null final class < ? extends activity > clz , final int request code , final view shared elements ) { start activity for result ( activity , extras , activity get package name ( ) , clz get name ( ) , request code , get options bundle ( activity , shared elements ) ) ; }


deprecated call { @ link sub task # get owner task } directly

public static @ non null task get owner task of ( @ non null sub task t ) { return t get owner task ( ) ; }


gets the view data for views that match the specified table prefix

default map < schema table name , connector view definition > get views ( connector session session , schema table prefix prefix ) { return empty map ( ) ; }


tests the second given in isoiec 15438 : 2015 ( e ) - annex h 4

public void test standard sample 2 ( ) throws format exception { p d f 4 1 7 result metadata result metadata = new p d f 4 1 7 result metadata ( ) ; int [ ] sample codes = { 11 , 928 , 111 , 103 , 17 , 53 , 923 , 1 , 111 , 104 , 922 , / / we should never reach these 1000 , 1000 , 1000 } ; decoded bit stream parser decode macro block ( sample codes , 2 , result metadata ) ; assert equals ( 3 , result metadata get segment index ( ) ) ; assert equals ( " arbx " , result metadata get file id ( ) ) ; assert true ( result metadata is last segment ( ) ) ; assert equals ( 4 , result metadata get segment count ( ) ) ; assert null ( result metadata get addressee ( ) ) ; assert null ( result metadata get sender ( ) ) ; @ suppress warnings ( " deprecation " ) int [ ] optional data = result metadata get optional data ( ) ; assert equals ( " first element of optional array should be the first field identifier " , 1 , optional data [ 0 ] ) ; assert equals ( " last element of optional array should be the last codeword of the last field " , 104 , optional data [ optional data length - 1 ] ) ; }


mark already registered by arouter - auto - register plugin

private static void mark registered by plugin ( ) { if ( ! register by plugin ) { register by plugin = true ; } }


return a string representation of this joinpoint ( usually a method call ) for use in logging

public string get joinpoint identification ( ) { return this joinpoint identification ; }


returns a list of scheduled tasks for the currently running group

public list < g scheduled task > get scheduled tasks ( ) { lock lock ( ) ; try { return new array list < g scheduled task > ( priority q ) ; } finally { lock unlock ( ) ; } }


removes the given { @ code runnable } from the ui threads queue if it is still queued

public static void remove callbacks on ui thread ( runnable runnable ) { get ui thread handler ( ) remove callbacks ( runnable ) ; }


get the number of decommissioned trackers in the cluster

public int get decommissioned task tracker count ( ) { return num decommissioned trackers ; }


parse a { @ link distance } from a given string

private static distance parse distance ( string distance , distance unit default unit ) { for ( distance unit unit : values ( ) ) { for ( string name : unit names ) { if ( distance ends with ( name ) ) { return new distance ( double parse double ( distance substring ( 0 , distance length ( ) - name length ( ) ) ) , unit ) ; } } } return new distance ( double parse double ( distance ) , default unit ) ; }


removes the job ' s execution ' s reference to this job , if the job has an associated execution subclasses may override to provide custom implementations

protected void remove execution link ( timer job entity job entity ) { if ( job entity get execution id ( ) ! = null ) { execution entity execution = get execution entity manager ( ) find by id ( job entity get execution id ( ) ) ; if ( execution ! = null ) { execution get timer jobs ( ) remove ( job entity ) ; } } }


the reason that the request was canceled or null if it hasn ' t been

public string get reason cancelled ( ) { return reason cancelled ; }


removes from this array all of elements contained in the specified array

public boolean remove all ( int array array ) { int size = this size ; int start size = size ; int [ ] items = this items ; for ( int i = 0 , n = array size ; i < n ; i + + ) { int item = array get ( i ) ; for ( int ii = 0 ; ii < size ; ii + + ) { if ( item = = items [ ii ] ) { remove index ( ii ) ; size - - ; break ; } } } return size ! = start size ; }


like { @ link # assert one compat rest exact ( string , string ) } , except the address is given

protected void assert one compat rest exact ( string assembly , string instr , long addr ) { run test ( assembly , instr , collections singleton ( assembly ) , addr , null , true , true , false , false ) ; }


void move to trash ( ) throws i o exception { path src = context get src ( ) ; if ( src fs exists ( src ) ) { trash option trash option = context get trash opt ( ) ; switch ( trash option ) { case trash : conf set float ( fs trash interval key , 60 ) ; if ( ! trash move to appropriate trash ( src fs , src , conf ) ) { throw new i o exception ( " failed move " + src + " to trash " ) ; } break ; case delete : if ( ! src fs delete ( src , true ) ) { throw new i o exception ( " failed delete " + src ) ; } log info ( " { } is deleted " , src ) ; break ; case skip : break ; default : throw new i o exception ( " unexpected trash option = " + trash option ) ; } } }


call routines to encode " - le - " , in proper order

void encode le cases ( int save current ) { if ( encode vowel le transposition ( save current ) ) { return ; } else { if ( encode vowel preserve vowel after l ( save current ) ) { return ; } else { metaph add ( " l " ) ; } } }


< code > required uint 3 2 year = 1 ; < code >

public int get year ( ) { return year ; }


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


public static list < string > get main activities ( ) { return get main activities ( utils get app ( ) get package name ( ) ) ; }


please do work on this id the custom object is true

protected category ini custom parent holder ( view parentview ) { return new category ( parentview ) ; }


public float [ ] get values ( ) { return val ; }


copies the bytes to one program from another for the specified address range

public static void copy bytes in ranges ( program to program , program from program , address min addr , address max addr ) throws memory access exception { memory to mem = to program get memory ( ) ; memory from mem = from program get memory ( ) ; address range range = new address range impl ( min addr , max addr ) ; copy byte range ( to mem , from mem , range ) ; }


public synchronized t from json ( string json ) throws i o exception , json parse exception , json mapping exception { if ( json is empty ( ) ) { throw new e o f exception ( " no data " ) ; } try { return mapper read value ( json , class type ) ; } catch ( i o exception e ) { log error ( " exception while parsing json : { } \ n { } " , e , json , e ) ; throw e ; } }


restore the current state from the stack , must match a call to { @ link # save ( ) }

public void restore ( ) { canvas matrix restore ( ) ; }


sets image bitmap into this image aware view < br > displays loaded and decoded image { @ link android graphics bitmap } in this image view aware actually it ' s used only in { @ link com nostra 1 3 universalimageloader core display bitmap displayer bitmap displayer } < br > is called on ui thread if image loader was called on ui thread otherwise - on background thread

boolean set image bitmap ( bitmap bitmap ) ;


sets the { @ link rest client failure listener } to be notified for each request failure

public rest client builder set failure listener ( rest client failure listener failure listener ) { objects require non null ( failure listener , " failure listener must not be null " ) ; this failure listener = failure listener ; return this ; }


test the property ' array array of integer '

public void array array of integer test ( ) { / / todo : test array array of integer }


return the http url of the target service


returns the < a href = " http : en wikipedia orgwiki arithmetic mean " > arithmetic mean of the values the count must be non - zero if these values are a sample drawn from a population , this is also an unbiased estimator of the arithmetic mean of the population < h 3 > non - finite values < h 3 > if the dataset contains { @ link double # na n } then the result is { @ link double # na n } if it contains both { @ link double # positive infinity } and { @ link double # negative infinity } then the result is { @ link double # na n } if it contains { @ link double # positive infinity } and finite values only or { @ link double # positive infinity } only , the result is { @ link double # positive infinity } if it contains { @ link double # negative infinity } and finite values only or { @ link double # negative infinity } only , the result is { @ link double # negative infinity } if you only want to calculate the mean , use { @ link # mean of } instead of creating a { @ link stats } instance

public double mean ( ) { check state ( count ! = 0 ) ; return mean ; }


supports the input stream for serialization ?

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


returns the data encapsulated in this { @ link transferable object } if the { @ link fetcher } constructor was used , then this is when the { @ link fetcher # get object get object ( ) } method will be called if the requested data flavor is not supported , then the { @ link fetcher # get object get object ( ) } method will not be called

public object get transfer data ( final java awt datatransfer data flavor flavor ) throws java awt datatransfer unsupported flavor exception , java io i o exception { / / native object if ( flavor equals ( data flavor ) ) return fetcher = = null ? data : fetcher get object ( ) ; / / string if ( flavor equals ( java awt datatransfer data flavor string flavor ) ) return fetcher = = null ? data to string ( ) : fetcher get object ( ) to string ( ) ; / / we can ' t do anything else throw new java awt datatransfer unsupported flavor exception ( flavor ) ; }


return the number of milliseconds that elapsed while re - authenticating this session from the perspective of this instance , if applicable , otherwise null the server - side perspective will yield a lower value than the client - side perspective of the same re - authentication because the client - side observes an additional network round - trip

public long reauthentication latency ms ( ) { return authenticator reauthentication latency ms ( ) ; }


the asynchronous version of remove all watches

public void remove all watches ( string path , watcher type watcher type , boolean local , void callback cb , object ctx ) { remove watches ( zoo defs op code remove watches , path , null , watcher type , local , cb , ctx ) ; }


populates a multiset by reading an input stream , as part of deserialization see { @ link # write multiset } for the data format the number of distinct elements is determined by a prior call to { @ link # read count }

static < e > void populate multiset ( multiset < e > multiset , object input stream stream , int distinct elements ) throws i o exception , class not found exception { for ( int i = 0 ; i < distinct elements ; i + + ) { @ suppress warnings ( " unchecked " ) / / reading data stored by write multiset e element = ( e ) stream read object ( ) ; int count = stream read int ( ) ; multiset add ( element , count ) ; } }


generate the default classpath resource locations array based on the supplied class for example , if the supplied class is { @ code com example my test } , the generated locations will contain a single string with a value of { @ code " classpath : comexample my test < suffix > " } , where { @ code < suffix > } is the value of the first configured { @ linkplain # get resource suffixes ( ) resource suffix } for which the generated location actually exists in the classpath as of spring 3 1 , the implementation of this method adheres to the contract defined in the { @ link smart context loader } spi specifically , this method will preemptively verify that the generated default location actually exists if it does not exist , this method will log a warning and return an empty array subclasses can override this method to implement a different default location generation strategy

protected string [ ] generate default locations ( class < ? > clazz ) { assert not null ( clazz , " class must not be null " ) ; string [ ] suffixes = get resource suffixes ( ) ; for ( string suffix : suffixes ) { assert has text ( suffix , " resource suffix must not be empty " ) ; string resource path = class utils convert class name to resource path ( clazz get name ( ) ) + suffix ; class path resource class path resource = new class path resource ( resource path ) ; if ( class path resource exists ( ) ) { string prefixed resource path = resource utils classpath url prefix + resource path ; if ( logger is info enabled ( ) ) { logger info ( string format ( " detected default resource location \ " % s \ " for test class [ % s ] " , prefixed resource path , clazz get name ( ) ) ) ; } return new string [ ] { prefixed resource path } ; } else if ( logger is debug enabled ( ) ) { logger debug ( string format ( " did not detect default resource location for test class [ % s ] : " + " % s does not exist " , clazz get name ( ) , class path resource ) ) ; } } if ( logger is info enabled ( ) ) { logger info ( string format ( " could not detect default resource locations for test class [ % s ] : " + " no resource found for suffixes % s " , clazz get name ( ) , object utils null safe to string ( suffixes ) ) ) ; } return empty string array ; }


momentarily highlights a mention at the requested position

void pulse at position ( int position ) { if ( position > = 0 & & position < get item count ( ) ) { int corrected position = is header position ( position ) ? position + 1 : position ; record to pulse = get item ( corrected position ) ; notify item changed ( corrected position ) ; } }


returns whether the given opcode represents a pop instruction that must get a consistent type ( pop , pop 2 , arraylength )

private boolean is pop ( byte opcode ) { return opcode = = instruction constants op pop | | opcode = = instruction constants op pop2 | | opcode = = instruction constants op arraylength ; }


specify the default persistence unit name , to be used in case of no unit name specified in an { @ code @ persistence unit } { @ code @ persistence context } annotation this is mainly intended for lookups in the application context , indicating the target persistence unit name ( typically matching the bean name ) , but also applies to lookups in the { @ link # set persistence units " persistence units " } { @ link # set persistence contexts " persistence contexts " } { @ link # set extended persistence contexts " extended persistence contexts " } map , avoiding the need for duplicated mappings for the empty string there default is to check for a single entity manager factory bean in the spring application context , if any if there are multiple such factories , either specify this default persistence unit name or explicitly refer to named persistence units in your annotations

public void set default persistence unit name ( @ nullable string unit name ) { this default persistence unit name = ( unit name ! = null ? unit name : " " ) ; }


public static void w ( string tag , string msg ) { if ( s is log enabled ) { log w ( tag , get content ( get current stack trace element ( ) ) + " > " + msg ) ; } }


returns true if any of the filters managed by this dialog are not in their default state

public boolean is filtered ( ) { if ( is filtered ! = null ) { return is filtered ; } is filtered = boolean false ; for ( filter < t > filter : ancillary filters ) { filter shortcut state state = filter get filter shortcut state ( ) ; if ( state ! = filter shortcut state always passes ) { is filtered = boolean true ; } } return is filtered ; }


static method spec builder initialize serialize method builder ( type element encoded type , auto codec annotation , processing environment env ) { method spec builder builder = method spec method builder ( " serialize " ) add modifiers ( modifier public ) returns ( void class ) add annotation ( override class ) add annotation ( annotation spec builder ( class name get ( suppress warnings class ) ) add member ( " value " , " $ s " , " unchecked " ) build ( ) ) add exception ( serialization exception class ) add exception ( i o exception class ) add parameter ( serialization context class , " context " ) add parameter ( type name get ( env get type utils ( ) erasure ( encoded type as type ( ) ) ) , " input " ) add parameter ( coded output stream class , " coded out " ) ; if ( annotation check class explicitly allowed ( ) ) { builder add statement ( " context check class explicitly allowed ( get encoded class ( ) , input ) " ) ; } list < ? extends type mirror > explicitly allowed classes ; try { explicitly allowed classes = arrays stream ( annotation explicitly allow class ( ) ) map ( ( clazz ) - > get type ( clazz , env ) ) collect ( collectors to list ( ) ) ; } catch ( mirrored types exception e ) { explicitly allowed classes = e get type mirrors ( ) ; } for ( type mirror explicitly allowed class : explicitly allowed classes ) { builder add statement ( " context add explicitly allowed class ( $ t class ) " , explicitly allowed class ) ; } return builder ; }


specify fixed - rate tasks as a list of { @ link interval task } objects primarily used by { @ code < task : > } namespace parsing

public void set fixed rate tasks list ( list < interval task > fixed rate tasks ) { this fixed rate tasks = fixed rate tasks ; }


validate the name - restricting it to the set defined in

public void validate ( string name ) { if ( ! matches ( name ) ) { throw new illegal argument exception ( string format ( e invalid name , name , pattern ) ) ; } }


public static byte [ ] byte array and ( byte [ ] mask , byte [ ] bytes ) { byte [ ] result = new byte [ bytes length ] ; if ( mask length ! = bytes length ) { throw new illegal argument exception ( " inappropriate mask " ) ; } for ( int i = 0 ; i < bytes length ; i + + ) { result [ i ] = ( byte ) ( mask [ i ] & bytes [ i ] ) ; } return result ; }


public synchronized void add sample ( long value ) { samples + + ; sum + = value ; }


convenience method to create a model with a single node containing a sphere shape the resources the material might contain are not managed , use { @ link model # manage disposable ( disposable ) } to add those to the model

public model create sphere ( float width , float height , float depth , int divisions u , int divisions v , final material material , final long attributes ) { return create sphere ( width , height , depth , divisions u , divisions v , gl20 gl triangles , material , attributes ) ; }


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


public static void put request surrogate authentication ( final request context context , final boolean value ) { context get flow scope ( ) put ( " request surrogate account " , value ) ; }


option to turn onoff the import of funcs

public boolean is import funcs ( ) { return import funcs ; }


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 static void main ( string [ ] args ) { final var inventory = new inventory ( 1000 ) ; var executor service = executors new fixed thread pool ( 3 ) ; int stream range ( 0 , 3 ) < runnable > map to obj ( i - > ( ) - > { while ( inventory add item ( new item ( ) ) ) { logger info ( " adding another item " ) ; } } ) for each ( executor service : : execute ) ; executor service shutdown ( ) ; try { executor service await termination ( 5 , time unit seconds ) ; } catch ( interrupted exception e ) { logger error ( " error waiting for executor service shutdown " ) ; } }


public remoting desc parser remoting service info ( object bean , string bean name , remoting parser remoting parser ) { remoting desc remoting bean desc = remoting parser get service desc ( bean , bean name ) ; if ( remoting bean desc = = null ) { return null ; } remoting service map put ( bean name , remoting bean desc ) ; class < ? > interface class = remoting bean desc get interface class ( ) ; method [ ] methods = interface class get methods ( ) ; if ( remoting parser is service ( bean , bean name ) ) { try { / / service bean , registry resource object target bean = remoting bean desc get target bean ( ) ; for ( method m : methods ) { two phase business action two phase business action = m get annotation ( two phase business action class ) ; if ( two phase business action ! = null ) { t c c resource tcc resource = new t c c resource ( ) ; tcc resource set action name ( two phase business action name ( ) ) ; tcc resource set target bean ( target bean ) ; tcc resource set prepare method ( m ) ; tcc resource set commit method name ( two phase business action commit method ( ) ) ; tcc resource set commit method ( reflection util get method ( interface class , two phase business action commit method ( ) , new class [ ] { business action context class } ) ) ; tcc resource set rollback method name ( two phase business action rollback method ( ) ) ; tcc resource set rollback method ( reflection util get method ( interface class , two phase business action rollback method ( ) , new class [ ] { business action context class } ) ) ; / / registry tcc resource default resource manager get ( ) register resource ( tcc resource ) ; } } } catch ( throwable t ) { throw new framework exception ( t , " parser remoting service error " ) ; } } if ( remoting parser is reference ( bean , bean name ) ) { / / reference bean , tcc proxy remoting bean desc set reference ( true ) ; } return remoting bean desc ; }


flattens properties of inline object schemas that belong to a composed schema into a single flat list of properties this is useful to generate a single or multiple inheritance model in the example below , codegen may generate a ' dog ' class that extends from the generated ' animal ' class ' dog ' has additional properties ' name ' , ' age ' and ' breed ' that are flattened as a single list of properties dog : all of : - $ ref : ' # componentsschemas animal ' - type : object properties : name : type : string age : type : string - type : object properties : breed : type : string

private void flatten composed children ( open a p i open a p i , string key , list < schema > children ) { if ( children = = null | | children is empty ( ) ) { return ; } list iterator < schema > list iterator = children list iterator ( ) ; while ( list iterator has next ( ) ) { schema component = list iterator next ( ) ; if ( component instanceof object schema | | / / for inline schema with type : object ( component ! = null & & component get properties ( ) ! = null & & ! component get properties ( ) is empty ( ) ) ) { / / for inline schema without type : object schema op = component ; if ( op get $ ref ( ) = = null & & op get properties ( ) ! = null & & op get properties ( ) size ( ) > 0 ) { / / if a ` title ` attribute is defined in the inline schema , codegen uses it to name the / / inline schema otherwise , we ' ll use the default naming such as inline object 1 , etc / / we know that this is not the best way to name the model / / / / such naming strategy may result in issues if the value of the ' title ' attribute / / happens to match a schema defined elsewhere in the specification , ' inner model name ' / / will be the same as that other schema / / / / to have complete control of the model naming , one can define the model separately / / instead of inline string inner model name = resolve model name ( op get title ( ) , key ) ; schema inner model = model from property ( open a p i , op , inner model name ) ; string existing = match generated ( inner model ) ; if ( existing = = null ) { open a p i get components ( ) add schemas ( inner model name , inner model ) ; add generated ( inner model name , inner model ) ; schema schema = new schema ( ) $ ref ( inner model name ) ; schema set required ( op get required ( ) ) ; list iterator set ( schema ) ; } else { schema schema = new schema ( ) $ ref ( existing ) ; schema set required ( op get required ( ) ) ; list iterator set ( schema ) ; } } } else { / / likely a reference to schema ( not inline schema ) } } }


public void set source ( bytes reference source , x content type x content type ) { this source = source ; this x content type = x content type ; }


compute an id that has the format : { state uuid } : { node id | | ' na ' } : { index } : { shard } : { ' p ' | | ' r ' }

public static string id ( string state u u i d , shard routing shard routing ) { string builder builder = new string builder ( ) ; builder append ( state u u i d ) ; builder append ( ' : ' ) ; if ( shard routing assigned to node ( ) ) { builder append ( shard routing current node id ( ) ) ; } else { builder append ( " na " ) ; } builder append ( ' : ' ) ; builder append ( shard routing get index name ( ) ) ; builder append ( ' : ' ) ; builder append ( integer value of ( shard routing id ( ) ) ) ; builder append ( ' : ' ) ; if ( shard routing primary ( ) ) { builder append ( " p " ) ; } else { builder append ( " r " ) ; } return builder to string ( ) ; }


returns the struct representing the legacy " py " provider , from the given target info

public static struct impl get legacy provider ( transitive info collection target ) throws eval exception { object info = target get ( py struct utils provider name ) ; if ( info instanceof struct impl ) { return ( struct impl ) info ; } if ( info = = null ) { throw starlark errorf ( " target does not have ' % s ' provider " , py struct utils provider name ) ; } throw starlark errorf ( " ' % s ' provider should be a struct ( got % s ) " , py struct utils provider name , starlark type ( info ) ) ; }


returns whether the controller is currently visible

public boolean is controller visible ( ) { return controller ! = null & & controller is visible ( ) ; }


returns a read - only buffer that shares its content with this buffer the returned buffer is guaranteed to be a new instance , even if this buffer is read - only itself the new buffer ' s position , limit , capacity and mark are the same as this buffer ' s the new buffer shares its content with this buffer , which means that this buffer ' s change of content will be visible to the new buffer the two buffer ' s position , limit and mark are independent

public abstract double buffer as read only buffer ( ) ;


the version of the response data < code > string version info = 1 ; < code >

public com google protobuf byte string get version info bytes ( ) { java lang object ref = version info ; if ( ref instanceof string ) { com google protobuf byte string b = com google protobuf byte string copy from utf 8 ( ( java lang string ) ref ) ; version info = b ; return b ; } else { return ( com google protobuf byte string ) ref ; } }


specify the jdbc data source that the jpa persistence provider is supposed to use for accessing the database if none has been specified in { @ code persistence xml } this variant indicates no special transaction setup , i e typical resource - local in jpa speak , a data source passed in here will be uses as " non jta data source " on the persistence unit info passed to the persistence provider , provided that none has been registered before

public void set default data source ( @ nullable data source default data source ) { this default data source = default data source ; }


add the given { @ link handler method return value handler handler method return value handlers }

public handler method return value handler composite add handlers ( @ nullable list < ? extends handler method return value handler > handlers ) { if ( handlers ! = null ) { this return value handlers add all ( handlers ) ; } return this ; }


verify that the fs ( real or restricted ) meets the requirement of the test s 3 guard tests are skipped if the ( default ) store is not a ddb store consistent across all fs instances the raw tests fail if somehow the fs does still have a s 3 guard metastore

protected void verify s 3 guard settings ( final s 3 a file system fs , final string store type ) { if ( s 3guard ) { assumptions assume that ( fs get metadata store ( ) ) described as ( " metadata store in " + store type + " fs : % s " , fs get metadata store ( ) ) is instance of ( dynamo d b metadata store class ) ; } else { assertions assert that ( fs has metadata store ( ) ) described as ( " metadata store in " + store type + " fs : % s " , fs get metadata store ( ) ) is false ( ) ; } }


waits for a given persistent task to comply with a given predicate , then call back the listener accordingly

public void wait for persistent task ( final predicate < persistent tasks custom metadata persistent task < ? > > predicate , final @ nullable time value timeout , final persistent tasks service wait for persistent task listener < ? > listener ) { persistent tasks service wait for persistent task condition ( persistent task id , predicate , timeout , listener ) ; }


public static void post ( string path , template view route route , template engine engine ) { get instance ( ) post ( path , route , engine ) ; }


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


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

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


public static string op name ( int opcode ) { switch ( opcode ) { case nop : return " nop " ; case move : return " move " ; case move param : return " move - param " ; case move exception : return " move - exception " ; case const : return " const " ; case goto : return " goto " ; case if eq : return " if - eq " ; case if ne : return " if - ne " ; case if lt : return " if - lt " ; case if ge : return " if - ge " ; case if le : return " if - le " ; case if gt : return " if - gt " ; case switch : return " switch " ; case add : return " add " ; case sub : return " sub " ; case mul : return " mul " ; case div : return " div " ; case rem : return " rem " ; case neg : return " neg " ; case and : return " and " ; case or : return " or " ; case xor : return " xor " ; case shl : return " shl " ; case shr : return " shr " ; case ushr : return " ushr " ; case not : return " not " ; case cmpl : return " cmpl " ; case cmpg : return " cmpg " ; case conv : return " conv " ; case to byte : return " to - byte " ; case to char : return " to - char " ; case to short : return " to - short " ; case return : return " return " ; case array length : return " array - length " ; case throw : return " throw " ; case monitor enter : return " monitor - enter " ; case monitor exit : return " monitor - exit " ; case aget : return " aget " ; case aput : return " aput " ; case new instance : return " new - instance " ; case new array : return " new - array " ; case filled new array : return " filled - new - array " ; case check cast : return " check - cast " ; case instance of : return " instance - of " ; case get field : return " get - field " ; case get static : return " get - static " ; case put field : return " put - field " ; case put static : return " put - static " ; case invoke static : return " invoke - static " ; case invoke virtual : return " invoke - virtual " ; case invoke super : return " invoke - super " ; case invoke direct : return " invoke - direct " ; case invoke interface : return " invoke - interface " ; case move result : return " move - result " ; case move result pseudo : return " move - result - pseudo " ; case fill array data : return " fill - array - data " ; } return " unknown - " + hex u 1 ( opcode ) ; }


returns a string representation of the { @ code unsigned long } value , in base { @ code radix } if { @ code radix < character min radix } or { @ code radix > character max radix } , the radix { @ code 10 } is used

public string to string ( int radix ) { return unsigned longs to string ( value , radix ) ; }


delete a path from the name space update the count at each ancestor directory with quota

private static boolean unprotected delete ( f s directory fsd , i nodes in path iip , reclaim context reclaim context , long mtime ) { assert fsd has write lock ( ) ; / / check if target node exists i node target node = iip get last i node ( ) ; if ( target node = = null ) { return false ; } / / record modification final int latest snapshot = iip get latest snapshot id ( ) ; target node record modification ( latest snapshot ) ; / / remove the node from the namespace long removed = fsd remove last i node ( iip ) ; if ( removed = = - 1 ) { return false ; } / / set the parent ' s modification time final i node directory parent = target node get parent ( ) ; parent update modification time ( mtime , latest snapshot ) ; / / collect block and update quota if ( ! target node is in latest snapshot ( latest snapshot ) ) { target node destroy and collect blocks ( reclaim context ) ; } else { target node clean subtree ( reclaim context , current state id , latest snapshot ) ; } if ( name node state change log is debug enabled ( ) ) { name node state change log debug ( " dir * f s directory unprotected delete : " + iip get path ( ) + " is removed " ) ; } return true ; }


converts a dynamo d b item to a { @ link d d b path metadata }

static d d b path metadata item to path metadata ( item item , string username ) { if ( item = = null ) { return null ; } string parent str = item get string ( parent ) ; preconditions check not null ( parent str , " no parent entry in item % s " , item ) ; string child str = item get string ( child ) ; preconditions check not null ( child str , " no child entry in item % s " , item ) ; / / skip table version markers , which are only non - absolute paths stored path raw path = new path ( parent str , child str ) ; if ( ! raw path is absolute and scheme authority null ( ) ) { return null ; } path parent = new path ( constants fs s3a + " : / " + parent str + " / " ) ; path path = new path ( parent , child str ) ; boolean is dir = item has attribute ( is dir ) & & item get boolean ( is dir ) ; boolean is authoritative dir = false ; final s 3 a file status file status ; long last updated = 0 ; if ( is dir ) { is authoritative dir = ! ignored fields contains ( is authoritative ) & & item has attribute ( is authoritative ) & & item get boolean ( is authoritative ) ; file status = dynamo d b metadata store make dir status ( path , username ) ; } else { long len = item has attribute ( file length ) ? item get long ( file length ) : 0 ; long mod time = item has attribute ( mod time ) ? item get long ( mod time ) : 0 ; long block = item has attribute ( block size ) ? item get long ( block size ) : 0 ; string e tag = item get string ( etag ) ; string version id = item get string ( version id ) ; file status = new s 3 a file status ( len , mod time , path , block , username , e tag , version id ) ; } last updated = ! ignored fields contains ( last updated ) & & item has attribute ( last updated ) ? item get long ( last updated ) : 0 ; boolean is deleted = item has attribute ( is deleted ) & & item get boolean ( is deleted ) ; return new d d b path metadata ( file status , tristate unknown , is deleted , is authoritative dir , last updated ) ; }


returns whether analysis for the current program has timed out analysis will time out only in the case where : the users has set an analysis timeout period using the < code > - analysis timeout per file < code > parameter analysis is enabled and has completed the current script is being run as a post script ( since post scripts run after analysis )

public boolean analysis timeout occurred ( ) throws improper use exception { check headless status ( ) ; return headless check analysis timed out ( ) ; }


convert a value from its logical format ( date ) to it ' s encoded format

public static int from logical ( schema schema , java util date value ) { if ( ! ( logical name equals ( schema name ( ) ) ) ) throw new data exception ( " requested conversion of date object but the schema does not match " ) ; calendar calendar = calendar get instance ( utc ) ; calendar set time ( value ) ; if ( calendar get ( calendar hour of day ) ! = 0 | | calendar get ( calendar minute ) ! = 0 | | calendar get ( calendar second ) ! = 0 | | calendar get ( calendar millisecond ) ! = 0 ) { throw new data exception ( " kafka connect date type should not have any time fields set to non - zero values " ) ; } long unix millis = calendar get time in millis ( ) ; return ( int ) ( unix millis / millis per day ) ; }


sets the main text of this error message

public builder message ( string message ) { preconditions check not null ( message ) ; this message = message is empty ( ) ? " unknown error " : message trim ( ) ; return this ; }


override point : the test timeout in milliseconds

protected int get test timeout millis ( ) { return test timeout ; }


post fakecreate xml item : creates an xml item this route creates an xml item

default response entity < void > create xml item ( @ api param ( value = " xml item body " , required = true ) @ valid @ request body xml item xml item ) { return new response entity < > ( http status not implemented ) ; }


this function hashes an integer value it is adapted from bob jenkins ' website < a href = " http : www burtleburtle netbobhashinteger html " > http : www burtleburtle netbobhashinteger html the hash function has the full avalanche property , meaning that every bit of the value to be hashed affects every bit of the hash value it is crucial to use different hash functions to partition data across machines and the internal partitioning of data structures this hash function is intended for partitioning internally in data structures

public static int jenkins hash ( int code ) { code = ( code + 0x 7ed 5 5d 1 6 ) + ( code < < 12 ) ; code = ( code ^ 0xc 7 6 1c 2 3c ) ^ ( code > > > 19 ) ; code = ( code + 0x 1 6 5 6 6 7b 1 ) + ( code < < 5 ) ; code = ( code + 0xd 3a 2 6 4 6c ) ^ ( code < < 9 ) ; code = ( code + 0xfd 7 0 4 6c 5 ) + ( code < < 3 ) ; code = ( code ^ 0xb 5 5a 4f 0 9 ) ^ ( code > > > 16 ) ; return code > = 0 ? code : - ( code + 1 ) ; }


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


put the value of field into content values if current action is saving check the value of field is default value or not if current action is updating if it ' s not default value , put it into content values otherwise ignore it

private void put fields value depends on save or update ( lite pal support base obj , field field , content values values ) throws security exception , illegal argument exception , illegal access exception , invocation target exception { if ( is updating ( ) ) { if ( ! is field with default value ( base obj , field ) ) { put content values for update ( base obj , field , values ) ; } } else if ( is saving ( ) ) { put content values for save ( base obj , field , values ) ; } }


returns a batch of rows for the given split

listenable future < presto thrift page result > get rows ( @ thrift field ( name = " split id " ) presto thrift id split id , @ thrift field ( name = " columns " ) list < string > columns , @ thrift field ( name = " max bytes " ) long max bytes , @ thrift field ( name = " next token " ) presto thrift nullable token next token ) ;


alternative to { @ link # close ( ) } that just resets the changelogs without closing any of the underlying state or unregistering the stores themselves

void recycle ( ) { log debug ( " recycling state for { } task { } " , task type , task id ) ; final list < topic partition > all changelogs = get all changelog topic partitions ( ) ; changelog reader unregister ( all changelogs ) ; }


load a collection of specified objects from the stream

default collection < t > load ( final input stream stream ) { val result = from ( stream ) ; return make collection of ( result ) ; }