tests that branches that are re - joined have place pipeline breakers - > ( sink ) - > ( reduce ) - + - > ( flatmap ) - > ( sink ) \ ( source ) - > ( map ) - ( join ) - + - - - - - \ \ \ \ - > ( filter ) - + \ \ ( co group ) - > ( sink ) \ \ - > ( reduce ) -

public void test re joined branches ( ) { try { / / build a test program execution environment env = execution environment get execution environment ( ) ; data set < tuple 2 < long , long > > data = env from elements ( 33l , 44l ) map ( new map function < long , tuple 2 < long , long > > ( ) { @ override public tuple 2 < long , long > map ( long value ) { return new tuple 2 < long , long > ( value , value ) ; } } ) ; data set < tuple 2 < long , long > > reduced = data group by ( 0 ) reduce ( new select one reducer < tuple 2 < long , long > > ( ) ) ; reduced output ( new discarding output format < tuple 2 < long , long > > ( ) ) ; data set < tuple 2 < long , long > > filtered = data filter ( new filter function < tuple 2 < long , long > > ( ) { @ override public boolean filter ( tuple 2 < long , long > value ) throws exception { return false ; } } ) ; data set < tuple 2 < long , long > > joined = reduced join ( filtered ) where ( 1 ) equal to ( 1 ) with ( new dummy flat join function < tuple 2 < long , long > > ( ) ) ; joined flat map ( new identity flat mapper < tuple 2 < long , long > > ( ) ) output ( new discarding output format < tuple 2 < long , long > > ( ) ) ; joined co group ( filtered group by ( 1 ) reduce group ( new top 1 group reducer < tuple 2 < long , long > > ( ) ) ) where ( 0 ) equal to ( 0 ) with ( new dummy co group function < tuple 2 < long , long > , tuple 2 < long , long > > ( ) ) output ( new discarding output format < tuple 2 < tuple 2 < long , long > , tuple 2 < long , long > > > ( ) ) ; list < data sink node > sinks = convert plan ( env create program plan ( ) ) ; / / gather the optimizer dag nodes data sink node sink after reduce = sinks get ( 0 ) ; data sink node sink after flat map = sinks get ( 1 ) ; data sink node sink after co group = sinks get ( 2 ) ; single input node reduce node = ( single input node ) sink after reduce get predecessor node ( ) ; single input node map node = ( single input node ) reduce node get predecessor node ( ) ; single input node flat map node = ( single input node ) sink after flat map get predecessor node ( ) ; two input node join node = ( two input node ) flat map node get predecessor node ( ) ; single input node filter node = ( single input node ) join node get second predecessor node ( ) ; two input node co group node = ( two input node ) sink after co group get predecessor node ( ) ; single input node other reduce node = ( single input node ) co group node get second predecessor node ( ) ; / / test sanity checks ( that we constructed the dag correctly ) assert equals ( reduce node , join node get first predecessor node ( ) ) ; assert equals ( map node , filter node get predecessor node ( ) ) ; assert equals ( join node , co group node get first predecessor node ( ) ) ; assert equals ( filter node , other reduce node get predecessor node ( ) ) ; / / verify the pipeline breaking status assert false ( sink after reduce get input connection ( ) is breaking pipeline ( ) ) ; assert false ( sink after flat map get input connection ( ) is breaking pipeline ( ) ) ; assert false ( sink after co group get input connection ( ) is breaking pipeline ( ) ) ; assert false ( map node get incoming connection ( ) is breaking pipeline ( ) ) ; assert false ( flat map node get incoming connection ( ) is breaking pipeline ( ) ) ; assert false ( join node get first incoming connection ( ) is breaking pipeline ( ) ) ; assert false ( co group node get first incoming connection ( ) is breaking pipeline ( ) ) ; assert false ( co group node get second incoming connection ( ) is breaking pipeline ( ) ) ; / / these should be pipeline breakers assert true ( reduce node get incoming connection ( ) is breaking pipeline ( ) ) ; assert true ( filter node get incoming connection ( ) is breaking pipeline ( ) ) ; assert true ( other reduce node get incoming connection ( ) is breaking pipeline ( ) ) ; assert true ( join node get second incoming connection ( ) is breaking pipeline ( ) ) ; } catch ( exception e ) { e print stack trace ( ) ; fail ( e get message ( ) ) ; } }


if logged in { @ link login context } is not available , it attempts login and returns { @ link login context }

public synchronized login context login ( ) throws privileged action exception { if ( this login context = = null ) { access controller do privileged ( ( privileged exception action < void > ) ( ) - > { final subject subject = new subject ( false , collections singleton ( new kerberos principal ( user principal name ) ) , collections empty set ( ) , collections empty set ( ) ) ; configuration conf = null ; final callback handler callback ; if ( password ! = null ) { conf = new password jaas conf ( user principal name , enable debug logs ) ; callback = new krb callback handler ( user principal name , password ) ; } else { conf = new keytab jaas conf ( user principal name , keytab path , enable debug logs ) ; callback = null ; } login context = new login context ( cred conf name , subject , callback , conf ) ; login context login ( ) ; return null ; } ) ; } return login context ; }


returns the largest queued input presentation time , in microseconds

protected final long get largest queued presentation time us ( ) { return largest queued presentation time us ; }


register a bean from the given bean class , deriving its metadata from class - declared annotations

private < t > void do register bean ( class < t > bean class , @ nullable string name , @ nullable class < ? extends annotation > [ ] qualifiers , @ nullable supplier < t > supplier , @ nullable bean definition customizer [ ] customizers ) { annotated generic bean definition abd = new annotated generic bean definition ( bean class ) ; if ( this condition evaluator should skip ( abd get metadata ( ) ) ) { return ; } abd set instance supplier ( supplier ) ; scope metadata scope metadata = this scope metadata resolver resolve scope metadata ( abd ) ; abd set scope ( scope metadata get scope name ( ) ) ; string bean name = ( name ! = null ? name : this bean name generator generate bean name ( abd , this registry ) ) ; annotation config utils process common definition annotations ( abd ) ; if ( qualifiers ! = null ) { for ( class < ? extends annotation > qualifier : qualifiers ) { if ( primary class = = qualifier ) { abd set primary ( true ) ; } else if ( lazy class = = qualifier ) { abd set lazy init ( true ) ; } else { abd add qualifier ( new autowire candidate qualifier ( qualifier ) ) ; } } } if ( customizers ! = null ) { for ( bean definition customizer customizer : customizers ) { customizer customize ( abd ) ; } } bean definition holder definition holder = new bean definition holder ( abd , bean name ) ; definition holder = annotation config utils apply scoped proxy mode ( scope metadata , definition holder , this registry ) ; bean definition reader utils register bean definition ( definition holder , this registry ) ; }


more verbose version of { @ link # create channel for ( context , recipient ) }

public static synchronized @ nullable string create channel for ( @ non null context context , @ non null string channel id , @ non null string display name , @ nullable uri message sound , boolean vibration enabled ) { if ( ! supported ( ) ) { return null ; } notification channel channel = new notification channel ( channel id , display name , notification manager importance high ) ; set led preference ( channel , text secure preferences get notification led color ( context ) ) ; channel set group ( category messages ) ; channel enable vibration ( vibration enabled ) ; if ( message sound ! = null ) { channel set sound ( message sound , new audio attributes builder ( ) set content type ( audio attributes content type unknown ) set usage ( audio attributes usage notification communication instant ) build ( ) ) ; } notification manager notification manager = service util get notification manager ( context ) ; notification manager create notification channel ( channel ) ; return channel id ; }


public string get property class ( ) { return property class ; }


check whether any of the configured entity type filters matches the current class descriptor contained in the metadata reader

private boolean matches entity type filter ( metadata reader reader , metadata reader factory reader factory ) throws i o exception { if ( this entity type filters ! = null ) { for ( type filter filter : this entity type filters ) { if ( filter match ( reader , reader factory ) ) { return true ; } } } return false ; }


get the status of index lifecycle management see https : www elastic coguideenelasticsearchclientjava - restcurrent java - rest - high - ilm - ilm - status html for more

public lifecycle management status response lifecycle management status ( lifecycle management status request request , request options options ) throws i o exception { return rest high level client perform request and parse entity ( request , index lifecycle request converters : : lifecycle management status , options , lifecycle management status response : : from x content , empty set ( ) ) ; }


private synchronized void decrease client count ( entry < k , v > entry ) { preconditions check not null ( entry ) ; preconditions check state ( entry client count > 0 ) ; entry client count - - ; }


talks to the http interface to create a file

private void create with http ( string filename , string perms , string unmasked perms ) throws exception { string user = hadoop users conf test helper get hadoop users ( ) [ 0 ] ; / / remove leading / from filename if ( filename char at ( 0 ) = = ' / ' ) { filename = filename substring ( 1 ) ; } string path ops ; if ( perms = = null ) { path ops = message format format ( " / webhdfs / v 1 / { 0 } ? user name = { 1 } & op = create " , filename , user ) ; } else { path ops = message format format ( " / webhdfs / v 1 / { 0 } ? user name = { 1 } & permission = { 2 } & op = create " , filename , user , perms ) ; } if ( unmasked perms ! = null ) { path ops = path ops + " & unmaskedpermission = " + unmasked perms ; } url url = new url ( test jetty helper get jetty u r l ( ) , path ops ) ; http u r l connection conn = ( http u r l connection ) url open connection ( ) ; conn add request property ( " content - type " , " application / octet - stream " ) ; conn set request method ( " put " ) ; conn connect ( ) ; assert assert equals ( http u r l connection http created , conn get response code ( ) ) ; }


this test checks that on reconfig , a new dynamic file will be created with current version appended to file name meanwhile , the dynamic file pointer in static config file should also be changed

public void test reconfig create new version file ( ) throws exception { final int server count = 3 ; final int new server count = 5 ; final int [ ] client ports = new int [ new server count ] ; final int [ ] quorum ports = new int [ new server count ] ; final int [ ] election ports = new int [ new server count ] ; final string [ ] servers = new string [ new server count ] ; string builder sb = new string builder ( ) ; array list < string > old servers = new array list < string > ( ) ; array list < string > new servers = new array list < string > ( ) ; for ( int i = 0 ; i < new server count ; i + + ) { client ports [ i ] = port assignment unique ( ) ; quorum ports [ i ] = port assignment unique ( ) ; election ports [ i ] = port assignment unique ( ) ; servers [ i ] = " server " + i + " = localhost : " + quorum ports [ i ] + " : " + election ports [ i ] + " : participant ; localhost : " + client ports [ i ] ; new servers add ( servers [ i ] ) ; if ( i > = server count ) { continue ; } old servers add ( servers [ i ] ) ; sb append ( servers [ i ] + " \ n " ) ; } string quorum cfg section = sb to string ( ) ; main thread [ ] mt = new main thread [ new server count ] ; zoo keeper [ ] zk = new zoo keeper [ new server count ] ; zoo keeper admin [ ] zk admin = new zoo keeper admin [ new server count ] ; / / start old cluster for ( int i = 0 ; i < server count ; i + + ) { mt [ i ] = new main thread ( i , client ports [ i ] , quorum cfg section , " reconfig enabled = true \ n " ) ; mt [ i ] start ( ) ; } string first version = null , second version = null ; / / test old cluster for ( int i = 0 ; i < server count ; i + + ) { assert true ( client base wait for server up ( " 127 0 0 1 : " + client ports [ i ] , connection timeout ) , " waiting for server " + i + " being up " ) ; zk [ i ] = client base create z k client ( " 127 0 0 1 : " + client ports [ i ] ) ; zk admin [ i ] = new zoo keeper admin ( " 127 0 0 1 : " + client ports [ i ] , client base connection timeout , this ) ; zk admin [ i ] add auth info ( " digest " , " super : test " get bytes ( ) ) ; properties cfg = reconfig legacy test read properties from file ( mt [ i ] conf file ) ; string filename = cfg get property ( " dynamic config file " , " " ) ; string version = quorum peer config get version from filename ( filename ) ; assert not null ( version ) ; string config str = reconfig test test server has config ( zk [ i ] , old servers , null ) ; string config version = get version from config str ( config str ) ; / / the version appended to filename should be the same as / / the one of quorum verifier assert equals ( version , config version ) ; if ( i = = 0 ) { first version = version ; } else { assert equals ( first version , version ) ; } } reconfig test reconfig ( zk admin [ 1 ] , null , null , new servers , - 1 ) ; / / start additional new servers for ( int i = server count ; i < new server count ; i + + ) { mt [ i ] = new main thread ( i , client ports [ i ] , quorum cfg section + servers [ i ] ) ; mt [ i ] start ( ) ; } / / wait for new servers to be up running for ( int i = server count ; i < new server count ; i + + ) { assert true ( client base wait for server up ( " 127 0 0 1 : " + client ports [ i ] , connection timeout ) , " waiting for server " + i + " being up " ) ; zk [ i ] = client base create z k client ( " 127 0 0 1 : " + client ports [ i ] ) ; } / / test that all servers have : / / a different , larger version dynamic file for ( int i = 0 ; i < new server count ; i + + ) { properties cfg = reconfig legacy test read properties from file ( mt [ i ] conf file ) ; string filename = cfg get property ( " dynamic config file " , " " ) ; string version = quorum peer config get version from filename ( filename ) ; assert not null ( version ) ; string config str = reconfig test test server has config ( zk [ i ] , new servers , null ) ; string quorum version = get version from config str ( config str ) ; assert equals ( version , quorum version ) ; if ( i = = 0 ) { second version = version ; assert true ( long parse long ( second version , 16 ) > long parse long ( first version , 16 ) ) ; } else { assert equals ( second version , version ) ; } } for ( int i = 0 ; i < server count ; i + + ) { mt [ i ] shutdown ( ) ; zk [ i ] close ( ) ; zk admin [ i ] close ( ) ; } }


returns an array of the relocations defined for this segment

public segment relocation [ ] get relocations ( ) { return relocations ; }


returns the return value of the specified method

protected value get method return value ( clazz clazz , invoke dynamic constant invoke dynamic constant , string type ) { / / try to figure out the class of the return type clazz [ ] referenced classes = invoke dynamic constant referenced classes ; clazz referenced class = referenced classes ! = null & & class util is internal class type ( type ) ? referenced classes [ referenced classes length - 1 ] : null ; return value factory create value ( type , referenced class , true ) ; }


get the { @ link reservation request interpreter } , representing how the list of resources should be allocated , this captures temporal ordering and other constraints

public abstract reservation request interpreter get interpreter ( ) ;


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


returns { @ link string } representations of the component { @ link package specification } s of the same format accepted by { @ link # from string }

public stream < string > contained packages ( ) { return get stream ( ) map ( package specification : : to string ) ; }


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


public string get description ( ) { return description ; }


get map property name from setting method < br > ex : put all x x x ( ) ; < br >

private string generate map field name ( string method name ) { return to camel case ( method name substring ( 6 ) ) ; }


adjusts the buffer size as the storage requirements change every time the buffer is resized , arrays are compacted

private void adjust space ( int new size ) { if ( new size < 10 ) { new size = 10 ; } long [ ] new longs = new long [ new size ] ; int pos = 1 ; for ( int i = 0 ; i < starts length ; i + + ) { if ( starts [ i ] > 0 ) { system arraycopy ( longs , starts [ i ] , new longs , pos , lengths [ i ] ) ; starts [ i ] = pos ; pos + = lengths [ i ] ; } } next free = pos ; longs = new longs ; }


flushes all mutations in the index writer and all metric mutations to the metrics table note that the metrics table is not updated until this method is explicitly called ( or implicitly via close )

public void flush ( ) { try { / / flush index writer index writer flush ( ) ; / / write out metrics mutations batch writer metrics writer = connector create batch writer ( table get metrics table name ( ) , writer config ) ; metrics writer add mutations ( get metrics mutations ( ) ) ; metrics writer close ( ) ; / / re - initialize the metrics metrics clear ( ) ; metrics put ( metrics table row count , new atomic long ( 0 ) ) ; } catch ( mutations rejected exception e ) { throw new presto exception ( unexpected accumulo error , " index mutation was rejected by server on flush " , e ) ; } catch ( table not found exception e ) { throw new presto exception ( accumulo table dne , " accumulo table does not exist " , e ) ; } }


config info wrapper query config info ( final string data id , final string group , final string tenant ) ;


public void set base dir ( file base dir ) { if ( include word reader ! = null ) { include word reader set base dir ( base dir ) ; } else { this base dir = base dir ; } }


sets the < code > float item < code > property

public type holder example float item ( float float item ) { this float item = float item ; return this ; }


decrement ref count and return true if it has reached 0

boolean release ( ) { check state ( ref count > 0 , " ref count has to be > 0 " ) ; return - - ref count = = 0 ; }


static string build trace response ( http response http response ) throws i o exception { string builder response line = new string builder ( ) ; response line append ( " # " ) append ( http response get status line ( ) ) ; for ( header header : http response get all headers ( ) ) { response line append ( " \ n # " ) append ( header get name ( ) ) append ( " : " ) append ( header get value ( ) ) ; } response line append ( " \ n # " ) ; http entity entity = http response get entity ( ) ; if ( entity ! = null ) { if ( entity is repeatable ( ) = = false ) { entity = new buffered http entity ( entity ) ; } http response set entity ( entity ) ; content type content type = content type get ( entity ) ; charset charset = standard charsets utf 8 ; if ( content type ! = null & & content type get charset ( ) ! = null ) { charset = content type get charset ( ) ; } try ( buffered reader reader = new buffered reader ( new input stream reader ( entity get content ( ) , charset ) ) ) { string line ; while ( ( line = reader read line ( ) ) ! = null ) { response line append ( " \ n # " ) append ( line ) ; } } } return response line to string ( ) ; }


return total time spent doing sync operations on f s edit log

public string get total sync times ( ) { journal set journal set = fs image edit log get journal set ( ) ; if ( journal set ! = null ) { return journal set get sync times ( ) ; } else { return " " ; } }


invokes jenkins exe with a scm management command

static int run elevated ( file jenkins exe , string command , task listener out , file pwd ) throws i o exception , interrupted exception { return new local launcher ( out ) launch ( ) cmds ( jenkins exe , command ) stdout ( out ) pwd ( pwd ) join ( ) ; }


performs initial creation of output instructions based on the original blocks

private void output instructions ( ) { basic block list blocks = method get blocks ( ) ; int [ ] order = this order ; int len = order length ; / / process the blocks in output order for ( int i = 0 ; i < len ; i + + ) { int next i = i + 1 ; int next label = ( next i = = order length ) ? - 1 : order [ next i ] ; output block ( blocks label to block ( order [ i ] ) , next label ) ; } }


disconnects a task manager specified by the given resource i d from the { @ link resource manager }

void disconnect task manager ( resource i d resource i d , exception cause ) ;


returns the previous sibling of this value

public json value prev ( ) { return prev ; }


public void set conf ( configuration conf ) { this conf = conf ; if ( this next interceptor ! = null ) { this next interceptor set conf ( conf ) ; } }


formats time in ms and appends difference ( finish time - start time ) as returned by format time diff ( ) if finish time is 0 , empty string is returned , if start time is 0 then difference is not appended to return value

public static string get formatted time with diff ( string formatted finish time , long finish time , long start time ) { string builder buf = new string builder ( ) ; if ( 0 ! = finish time ) { buf append ( formatted finish time ) ; if ( 0 ! = start time ) { buf append ( " ( " + format time diff ( finish time , start time ) + " ) " ) ; } } return buf to string ( ) ; }


public void remove service ( class < ? > interface class , object service ) { list < object > list = services by interface get ( interface class ) ; if ( list ! = null ) { list remove ( service ) ; if ( list size ( ) = = 0 ) { services by interface remove ( interface class ) ; } } for ( service listener service listener : service listeners ) { service listener service removed ( interface class , service ) ; } }


returns an unmodifiable set of all row key column key value triplets changes to the table will update the returned set the returned set ' s iterator traverses the mappings with the first row key , the mappings with the second row key , and so on the value in the returned cells may change if the table subsequently changes

public set < cell < r , c , v > > cell set ( ) { return super cell set ( ) ; }


returns the value associated with the given config option as a float if no value is mapped under any key of the option , it returns the specified default instead of the option ' s default value

public float get float ( config option < float > config option , float override default ) { return get optional ( config option ) or else ( override default ) ; }


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


crops an image inside of the bounds specified by { @ link # resize ( int , int ) } rather than distorting the aspect ratio this cropping technique scales the image so that it fills the requested bounds and then crops the extra , preferring the contents at { @ code align gravity }

public request creator center crop ( int align gravity ) { data center crop ( align gravity ) ; return this ; }


the open interface for other classes in crud package to count the records

public int on count ( string table name , string [ ] conditions ) { base utility check conditions correct ( conditions ) ; if ( conditions ! = null & & conditions length > 0 ) { conditions [ 0 ] = d b utility convert where clause to column name ( conditions [ 0 ] ) ; } return math query ( table name , new string [ ] { " count ( 1 ) " } , conditions , int class ) ; }


add a dependent deletion task if there is a task dependency between say tasks 1 , 2 , 3 such that task 2 and task 3 can be started only after task 1 then we should define task 2 and task 3 as successor tasks for task 1 note : - task dependency should be defined prior to calling delete

public synchronized void add deletion task dependency ( deletion task successor task ) { if ( successor task set add ( successor task ) ) { successor task increment and get pending predecessor tasks ( ) ; } }


akin to { @ link # get property type ( object , string ) } but never returns null

public @ non null property type get property type or die ( @ non null object instance , @ non null string field ) { property type property type = get property type ( instance , field ) ; if ( property type ! = null ) { return property type ; } else if ( instance = = this ) { throw new assertion error ( get class ( ) get name ( ) + " has no property " + field ) ; } else { throw new assertion error ( clazz get name ( ) + " has no property " + field ) ; } }


configure a limit on the number of bytes that can be buffered whenever the input stream needs to be aggregated this can be a result of decoding to a single { @ code data buffer } , { @ link java nio byte buffer byte buffer } , { @ code byte [ ] } , { @ link org springframework core io resource resource } , { @ code string } , etc it can also occur when splitting the input stream , e g delimited text , in which case the limit applies to data buffered between delimiters by default this is set to 256k

public void set max in memory size ( int byte count ) { this max in memory size = byte count ; }


returns the value of the constant pool element at the given index

public value constant value ( clazz clazz , int constant index ) { / / visit the constant pool entry to get its return value clazz constant pool entry accept ( constant index , this ) ; return value ; }


performs static checks , including resolution of identifiers in { @ code file } in the environment defined by { @ code module } the starlark file is mutated errors are appended to { @ link starlark file # errors }

public static void resolve file ( starlark file file , module module ) { resolver r = new resolver ( file errors , module , file get options ( ) ) ; immutable list < statement > stmts = file get statements ( ) ; / / check that load statements are on top if ( r options require load statements first ( ) ) { r check load after statement ( stmts ) ; } array list < binding > frame = new array list < > ( ) ; r push local block ( file , frame , / * freevars = * / null ) ; / / first pass : creating bindings for statements in this block r create bindings for block ( stmts ) ; / / second pass : visit all references r visit all ( stmts ) ; r pop local block ( ) ; / / if the final statement is an expression , synthesize a return statement int n = stmts size ( ) ; if ( n > 0 & & stmts get ( n - 1 ) instanceof expression statement ) { expression expr = ( ( expression statement ) stmts get ( n - 1 ) ) get expression ( ) ; stmts = immutable list < statement > builder ( ) add all ( stmts sub list ( 0 , n - 1 ) ) add ( return statement make ( expr ) ) build ( ) ; } / / annotate with resolved information about the toplevel function file set resolved function ( new function ( " < toplevel > " , file get start location ( ) , / * params = * / immutable list of ( ) , / * body = * / stmts , / * has varargs = * / false , / * has kwargs = * / false , / * num keyword only params = * / 0 , frame , / * freevars = * / immutable list of ( ) , r globals ) ) ; }


return the assigned { @ link channel pipeline }


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


returns false if all the cards are in their initial position i e no card is selected returns true if the { @ link card stack layout } has a card selected and all other cards are at the bottom of the screen

public boolean is card selected ( ) { return m selected card position ! = invalid card position ; }


sets the output mode for frames rendered by the decoder

public void set output mode ( @ c video output mode int output mode ) { this output mode = output mode ; }


sets the root node for this tree < p > note : if this method is not called from the swing thread , then the root node will be set later on the swing thread that is , this method will return before the work has been done

public void set root node ( g tree node root node ) { swing run if swing or run later ( ( ) - > { worker clear all jobs ( ) ; root node set parent ( root parent ) ; real model root node = root node ; real view root node = root node ; g tree node old root ; old root = swing set model root node ( root node ) ; old root dispose ( ) ; if ( filter ! = null ) { filter update manager update ( ) ; } } ) ; }


the attributes of this element < code > repeated aapt pb xml attribute attribute = 4 ; < code >

public builder set attribute ( int index , com android aapt resources xml attribute value ) { copy on write ( ) ; instance set attribute ( index , value ) ; return this ; }


set the custom { @ link com google samples apps iosched ui widget sliding tab layout tab colorizer } to be used if you only require simple custmisation then you can use { @ link # set selected indicator colors ( int ) } to achieve similar effects

public void set custom tab colorizer ( tab colorizer tab colorizer ) { m tab strip set custom tab colorizer ( tab colorizer ) ; }


public acknowledged response create data stream ( create data stream request create data stream request , request options options ) throws i o exception { return rest high level client perform request and parse entity ( create data stream request , indices request converters : : put data stream , options , acknowledged response : : from x content , empty set ( ) ) ; }


base 3 2 - encode the given byte [ ] as a string

public static string encode base 3 2 ( final byte [ ] data , final boolean chunked ) { if ( chunked ) { return base32 chunked encoder encode to string ( data ) trim ( ) ; } return base32 unchunked encoder encode to string ( data ) trim ( ) ; }


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


test block manager won ' t leave safe mode if datanode threshold is not met

public void test datanode threshod should be met ( ) throws exception { bm safe mode activate ( block total ) ; / / all datanode have not registered yet when ( dn get num live data nodes ( ) ) then return ( 1 ) ; set block safe ( block threshold ) ; bm safe mode check safe mode ( ) ; assert true ( bm safe mode is in safe mode ( ) ) ; / / the datanode number reaches threshold after all data nodes register when ( dn get num live data nodes ( ) ) then return ( datanode num ) ; bm safe mode check safe mode ( ) ; wait for extension period ( ) ; assert false ( bm safe mode is in safe mode ( ) ) ; }


asserts that a prior call that had caused this thread to block or wait has since returned normally

public void assert prior call returns ( @ nullable string method name ) throws exception { assert equals ( null , get response ( method name ) get result ( ) ) ; }


retrieves the vertex in - degree ( number of in - coming edges )

public long get in degree ( ) { return in degree ; }


parses request for use in the explain action { @ link request } is reused across { @ link put data frame analytics action } and { @ link explain data frame analytics action } but parsing differs between these two usages

public static request parse request for explain ( x content parser parser ) { data frame analytics config builder config builder = data frame analytics config strict parser apply ( parser , null ) ; data frame analytics config config = config builder build for explain ( ) ; return new put data frame analytics action request ( config ) ; }


copies this { @ code directory entry } into a writable buffer the copy is made at the buffer ' s current position , and the position is advanced , by the size of the copy

public directory entry copy ( byte buffer buffer ) { int size = get size ( ) ; directory entry view = new directory entry ( buffer slice ( ) ) ; this buffer rewind ( ) ; view buffer put ( this buffer ) flip ( ) ; buffer position ( buffer position ( ) + size ) ; this buffer rewind ( ) limit ( size ) ; return view ; }


creates an instance of skyframe executor

skyframe executor create ( package factory pkg factory , file system file system , blaze directories directories , action key context action key context , factory workspace status action factory , iterable < ? extends diff awareness factory > diff awareness factories , immutable map < sky function name , sky function > extra sky functions , iterable < sky value dirtiness checker > custom dirtiness checkers , managed directories knowledge managed directories knowledge ) throws abrupt exit exception ;


test the property ' enum form string array '

public void enum form string array test ( ) { / / todo : test enum form string array }


compares two triangles for equality triangles must have the same winding , but may begin with different vertex values are epsilon compared , with default tolerance triangles are assumed to be valid triangles - no duplicate vertices

private static boolean triangle equals ( float [ ] base , int base offset , int stride , float [ ] comp ) { assert true ( stride > = 3 ) ; assert true ( base length - base offset > = 9 ) ; assert true ( comp length = = 9 ) ; int offset = - 1 ; / / find first comp vertex in base triangle for ( int i = 0 ; i < 3 ; i + + ) { int b = base offset + i * stride ; if ( math utils is equal ( base [ b ] , comp [ 0 ] ) & & math utils is equal ( base [ b + 1 ] , comp [ 1 ] ) & & math utils is equal ( base [ b + 2 ] , comp [ 2 ] ) ) { offset = i ; break ; } } assert true ( " triangles do not have common first vertex " , offset ! = - 1 ) ; / / compare vertices for ( int i = 0 ; i < 3 ; i + + ) { int b = base offset + ( ( offset + i ) * stride ) % ( 3 * stride ) ; int c = i * stride ; if ( ! math utils is equal ( base [ b ] , comp [ c ] ) | | ! math utils is equal ( base [ b + 1 ] , comp [ c + 1 ] ) | | ! math utils is equal ( base [ b + 2 ] , comp [ c + 2 ] ) ) { return false ; } } return true ; }


return the { @ code web application context } passed in at construction time , if available otherwise , attempt to retrieve a { @ code web application context } from the { @ code servlet context } attribute with the { @ linkplain # set context attribute configured name } if set otherwise look up a { @ code web application context } under the well - known " root " application context attribute the { @ code web application context } must have already been loaded and stored in the { @ code servlet context } before this filter gets initialized ( or invoked ) subclasses may override this method to provide a different { @ code web application context } retrieval strategy

protected web application context find web application context ( ) { if ( this web application context ! = null ) { / / the user has injected a context at construction time - > use it if ( this web application context instanceof configurable application context ) { configurable application context cac = ( configurable application context ) this web application context ; if ( ! cac is active ( ) ) { / / the context has not yet been refreshed - > do so before returning it cac refresh ( ) ; } } return this web application context ; } string attr name = get context attribute ( ) ; if ( attr name ! = null ) { return web application context utils get web application context ( get servlet context ( ) , attr name ) ; } else { return web application context utils find web application context ( get servlet context ( ) ) ; } }


protected void add profile roles from attributes ( final user profile profile , final ldap attribute ldap attribute , final string prefix ) { ldap attribute get string values ( ) for each ( value - > profile add role ( prefix concat ( value to upper case ( ) ) ) ) ; }


like { @ link # call in tx ( callable ) } but does not require exception handling ( rethrows an exception as a runtime dao exception )

public < v > v call in tx no exception ( callable < v > callable ) { db begin transaction ( ) ; try { v result ; try { result = callable call ( ) ; } catch ( exception e ) { throw new dao exception ( " callable failed " , e ) ; } db set transaction successful ( ) ; return result ; } finally { db end transaction ( ) ; } }


the list of string that presents all dubbo subscribed { @ link url urls }

default sorted set < string > get subscribed u r ls ( ) { throw new unsupported operation exception ( " this operation is not supported for consumer " ) ; }


returns an empty mutable map whose keys will respect this { @ link element order }

< k extends t , v > map < k , v > create map ( int expected size ) { switch ( type ) { case unordered : return maps new hash map with expected size ( expected size ) ; case insertion : case stable : return maps new linked hash map with expected size ( expected size ) ; case sorted : return maps new tree map ( comparator ( ) ) ; default : throw new assertion error ( ) ; } }


return the path of storageemulated 0 androiddatapackagefiles notifications

public static string get external app notifications path ( ) { if ( ! utils bridge is s d card enable by environment ( ) ) return " " ; return get absolute path ( utils get app ( ) get external files dir ( environment directory notifications ) ) ; }


executes a high - level handshake using the given connection and returns the discovery node of the node the connection was established with the handshake will fail if the cluster name on the target node mismatches the local cluster name the action listener will be called on the calling thread or the generic thread pool

public void handshake ( final transport connection connection , final time value handshake timeout , final action listener < discovery node > listener ) { handshake ( connection , handshake timeout , cluster name get equality predicate ( ) , listener map ( handshake response : : get discovery node ) ) ; }


public map < string , map < string , object > > get map map anytype ( ) { return map map anytype ; }


public void test restored from file async committing ( ) throws exception { try { session holder init ( " file " ) ; global session global session = new global session ( " demo - app " , " my test tx group " , " test " , 6000 ) ; string xid = xid generate x i d ( global session get transaction id ( ) ) ; global session set xid ( xid ) ; global session add session lifecycle listener ( session holder get root session manager ( ) ) ; global session begin ( ) ; branch session branch session 1 = session helper new branch by global ( global session , branch type at , resource id , " ta : 1 " , " xxx " ) ; assertions assert true ( branch session 1 lock ( ) ) ; global session add branch ( branch session 1 ) ; lock manager lock manager = new file lock manager for test ( ) ; string other x i d = xid generate x i d ( 0l ) ; assertions assert false ( lock manager is lockable ( other x i d , resource id , " ta : 1 " ) ) ; global session change status ( global status async committing ) ; lock manager clean all locks ( ) ; assertions assert true ( lock manager is lockable ( other x i d , resource id , " ta : 1 " ) ) ; / / re - init session holder : restore sessions from file session holder init ( " file " ) ; long tid = global session get transaction id ( ) ; global session reload session = session holder find global session ( global session get xid ( ) ) ; assertions assert equals ( reload session get status ( ) , global status async committing ) ; global session session in async committing queue = session holder get async committing session manager ( ) find global session ( global session get xid ( ) ) ; assertions assert true ( reload session = = session in async committing queue ) ; / / no locking for session in async committing status assertions assert true ( lock manager is lockable ( other x i d , resource id , " ta : 1 " ) ) ; / / clear reload session add session lifecycle listener ( session holder get root session manager ( ) ) ; reload session end ( ) ; } finally { session holder destroy ( ) ; } }


returns { @ code true } if the result of this { @ link transition factory } is a split transition

default boolean is split ( ) { return false ; }


create a builder with the given http status

static body builder status ( int status ) { return new default server response builder ( status ) ; }


call this to do the actual parsing this implements { @ link bi function } for conveniently integrating with object parser

public value apply ( x content parser parser , context context ) { try { return parse ( parser , context ) ; } catch ( i o exception e ) { throw new x content parse exception ( parser get token location ( ) , " [ " + object parser get name ( ) + " ] failed to parse object " , e ) ; } }


private void remove empty fragments ( program module module ) { group [ ] groups = module get children ( ) ; for ( int i = 0 ; i < groups length ; i + + ) { if ( groups [ i ] instanceof program fragment ) { string name = groups [ i ] get name ( ) ; if ( ! fragment name list contains ( name ) ) { try { module remove child ( name ) ; } catch ( not empty exception e ) { log append msg ( " warning : extra program tree fragment ' " + name + " ' did not exist in imported xml file " ) ; } } } else { remove empty fragments ( ( program module ) groups [ i ] ) ; } } }


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

@ override public t visit expr ( painless parser expr context ctx ) { return visit children ( ctx ) ; }


return the list of acceptable { @ linkplain charset charsets } , as specified by the { @ code accept - charset } header

public list < charset > get accept charset ( ) { string value = get first ( accept charset ) ; if ( value ! = null ) { string [ ] tokens = string utils tokenize to string array ( value , " , " ) ; list < charset > result = new array list < > ( tokens length ) ; for ( string token : tokens ) { int param idx = token index of ( ' ; ' ) ; string charset name ; if ( param idx = = - 1 ) { charset name = token ; } else { charset name = token substring ( 0 , param idx ) ; } if ( ! charset name equals ( " * " ) ) { result add ( charset for name ( charset name ) ) ; } } return result ; } else { return collections empty list ( ) ; } }


analyze the associations of base obj and store the result in it the associations will be used when deleting referenced data of base obj

private collection < associations info > analyze associations ( lite pal support base obj ) { try { collection < associations info > association infos = get association info ( base obj get class name ( ) ) ; analyze associated models ( base obj , association infos ) ; return association infos ; } catch ( exception e ) { throw new lite pal support exception ( e get message ( ) , e ) ; } }


blocks until { @ link # release blocker ( ) } is called or this thread is interrupted notifies the awaiting thread that waits in the method { @ link # await blocker ( ) }

public void block ( ) throws interrupted exception { synchronized ( lock ) { blocker ready = true ; lock notify all ( ) ; while ( ! blocker released ) { lock wait ( ) ; } } }


returns an immutable sorted set containing the given elements sorted by the given { @ code comparator } when multiple elements are equivalent according to { @ code compare to ( ) } , only the first one specified is included

public static < e > immutable sorted set < e > copy of ( comparator < ? super e > comparator , iterator < ? extends e > elements ) { return new builder < e > ( comparator ) add all ( elements ) build ( ) ; }


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 ( 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 jobs ( ) remove ( job entity ) ; } } }


evaluate the specified expression and ensure the expected message comes out the message may have inserts and they will be checked if other properties is specified the first entry in other properties should always be the position

protected void evaluate and check error ( string expression , class < ? > expected return type , spel message expected message , object other properties ) { assert that exception of type ( spel evaluation exception class ) is thrown by ( ( ) - > { expression expr = parser parse expression ( expression ) ; assert that ( expr ) as ( " expression " ) is not null ( ) ; if ( expected return type ! = null ) { expr get value ( context , expected return type ) ; } else { expr get value ( context ) ; } } ) satisfies ( ex - > { assert that ( ex get message code ( ) ) is equal to ( expected message ) ; if ( ! object utils is empty ( other properties ) ) { / / first one is expected position of the error within the string int pos = ( ( integer ) other properties [ 0 ] ) int value ( ) ; assert that ( ex get position ( ) ) as ( " position " ) is equal to ( pos ) ; if ( other properties length > 1 ) { / / check inserts match object [ ] inserts = ex get inserts ( ) ; assert that ( inserts ) as ( " inserts " ) has size greater than or equal to ( other properties length - 1 ) ; object [ ] expected inserts = new object [ inserts length ] ; system arraycopy ( other properties , 1 , expected inserts , 0 , expected inserts length ) ; assert that ( inserts ) as ( " inserts " ) contains exactly ( expected inserts ) ; } } } ) ; }


we manually handle the timeout instead of using j unit ' s timeout to return failure instead of timeout error after timeout we assume that there are missing records and there is a bug , not that the test has run out of time

public void assert at least once for topic ( properties properties , string topic , int partition , set < integer > expected elements , long timeout millis ) throws exception { long start millis = system current time millis ( ) ; set < integer > actual elements = new hash set < > ( ) ; / / until we timeout while ( system current time millis ( ) < start millis + timeout millis ) { properties put ( " key deserializer " , " org apache kafka common serialization integer deserializer " ) ; properties put ( " value deserializer " , " org apache kafka common serialization integer deserializer " ) ; / / we need to set these two properties so that they are lower than request timeout ms / / this is / / required for some old kafka consumer versions properties put ( " session timeout ms " , " 2000 " ) ; properties put ( " heartbeat interval ms " , " 500 " ) ; / / query kafka for new records collection < consumer record < integer , integer > > records = kafka server get all records from topic ( properties , topic , partition , 100 ) ; for ( consumer record < integer , integer > record : records ) { actual elements add ( record value ( ) ) ; } / / succeed if we got all expected elements if ( actual elements contains all ( expected elements ) ) { return ; } } fail ( string format ( " expected to contain all of : < % s > , but was : < % s > " , expected elements , actual elements ) ) ; }


invoked before transaction commitrollback can perform resource cleanup before transaction completion this method will be invoked after { @ code before commit } , even when { @ code before commit } threw an exception this callback allows for closing resources before transaction completion , for any outcome

default mono < void > before completion ( ) { return mono empty ( ) ; }


create a new key generating the material for it the given key must not already exist this implementation generates the key material and calls the { @ link # create key ( string , byte [ ] , options ) } method

public key version create key ( string name , options options ) throws no such algorithm exception , i o exception { byte [ ] material = generate key ( options get bit length ( ) , options get cipher ( ) ) ; return create key ( name , material , options ) ; }


build a json entry from the parameters this is public for testing

public writer to json ( final writer writer , final string logger name , final long time stamp , final string level , final string thread name , final string message , final throwable information ti ) throws i o exception { json generator json = factory create generator ( writer ) ; json write start object ( ) ; json write string field ( name , logger name ) ; json write number field ( time , time stamp ) ; date date = new date ( time stamp ) ; json write string field ( date , date format format ( date ) ) ; json write string field ( level , level ) ; json write string field ( thread , thread name ) ; json write string field ( message , message ) ; if ( ti ! = null ) { / / there is some throwable info , but if the log event has been sent over the wire , / / there may not be a throwable inside it , just a summary throwable thrown = ti get throwable ( ) ; string eclass = ( thrown ! = null ) ? thrown get class ( ) get name ( ) : " " ; json write string field ( exception class , eclass ) ; string [ ] stack trace = ti get throwable str rep ( ) ; json write array field start ( stack ) ; for ( string row : stack trace ) { json write string ( row ) ; } json write end array ( ) ; } json write end object ( ) ; json flush ( ) ; json close ( ) ; return writer ; }


returns true if the edges in this graph are directed directed edges connect a { @ link endpoint pair # source ( ) source node } to a { @ link endpoint pair # target ( ) target node } , while undirected edges connect a pair of nodes to each other


serializes the exception containing the failure message sent to the { @ link org apache flink queryablestate network client } in case of protocol related errors

public static byte buf serialize request failure ( final byte buf allocator alloc , final long request id , final throwable cause ) throws i o exception { final byte buf buf = alloc io buffer ( ) ; / / frame length is set at the end buf write int ( 0 ) ; write header ( buf , message type request failure ) ; buf write long ( request id ) ; try ( byte buf output stream bbos = new byte buf output stream ( buf ) ; object output out = new object output stream ( bbos ) ) { out write object ( cause ) ; } / / set frame length int frame length = buf readable bytes ( ) - integer bytes ; buf set int ( 0 , frame length ) ; return buf ; }


tests that the current leader is notified when his leader connection information in zoo keeper are overwritten the leader must re - establish the correct leader connection information in zoo keeper

public void test leader should be corrected when overwritten ( ) throws exception { final string faulty contender url = " faulty contender " ; final string leader path = " / leader " ; configuration set string ( high availability options ha zookeeper leader path , leader path ) ; final testing leader election event handler election event handler = new testing leader election event handler ( test leader ) ; final testing leader retrieval event handler retrieval event handler = new testing leader retrieval event handler ( ) ; leader election driver leader election driver = null ; leader retrieval driver leader retrieval driver = null ; curator framework another client = null ; try { leader election driver = create and init leader election driver ( client , election event handler ) ; election event handler wait for leader ( timeout ) ; assert that ( election event handler get confirmed leader information ( ) , is ( test leader ) ) ; another client = zoo keeper utils start curator framework ( configuration ) ; byte array output stream baos = new byte array output stream ( ) ; object output stream oos = new object output stream ( baos ) ; oos write u t f ( faulty contender url ) ; oos write object ( uuid random u u i d ( ) ) ; oos close ( ) ; / / overwrite the current leader address , the leader should notice that boolean data written = false ; while ( ! data written ) { another client delete ( ) for path ( leader path ) ; try { another client create ( ) for path ( leader path , baos to byte array ( ) ) ; data written = true ; } catch ( keeper exception node exists exception e ) { / / this can happen if the leader election service was faster } } / / the faulty leader should be corrected on zoo keeper leader retrieval driver = zoo keeper utils create leader retrieval driver factory ( client , configuration ) create leader retrieval driver ( retrieval event handler , retrieval event handler : : handle error ) ; if ( retrieval event handler wait for new leader ( timeout ) equals ( faulty contender url ) ) { retrieval event handler wait for new leader ( timeout ) ; } assert that ( retrieval event handler get leader session i d ( ) , is ( test leader get leader session i d ( ) ) ) ; assert that ( retrieval event handler get address ( ) , is ( test leader get leader address ( ) ) ) ; } finally { if ( leader election driver ! = null ) { leader election driver close ( ) ; } if ( leader retrieval driver ! = null ) { leader retrieval driver close ( ) ; } if ( another client ! = null ) { another client close ( ) ; } } }


private void initialize script paths ( ) { string buffer buf = new string buffer ( " headless script paths : " ) ; for ( resource file dir : ghidra script util get script source directories ( ) ) { buf append ( " \ n " ) ; buf append ( dir get absolute path ( ) ) ; } msg info ( headless analyzer class , buf to string ( ) ) ; }


evaluate the positions of the vertices depending on policy

boolean evaluate ( quaternion [ ] vertices ) { switch ( this ) { case draw : return false ; case query : / / if we are querying and any of the vertices are behind the camera , return true / / this means a bounding box will not be considered occluded when any of its vertices / / are behind the camera frustum near plane for ( quaternion vertex : vertices ) { if ( vertex z + vertex w < = 0 ) return true ; } return false ; } return false ; }


log a message at level info according to the specified format and argument this form avoids superfluous object creation when the logger is disabled for the info level

public void info ( string format , object arg ) { if ( logger is info enabled ( ) ) { formatting tuple ft = message formatter format ( format , arg ) ; logger log ( fqcn , level info , ft get message ( ) , ft get throwable ( ) ) ; } }


create a file of the given size filled with random data

public byte [ ] write file ( path filepath , int size k b ) throws i o exception { file system fs = cluster get file system ( ) ; / / write a file with the specified amount of data data output stream os = fs create ( filepath ) ; byte data [ ] = new byte [ 1024 * size k b ] ; new random ( ) next bytes ( data ) ; os write ( data ) ; os close ( ) ; return data ; }


returns a set of source file names from the given manifest the manifest contains file names line by line each file can either be a source file ( e g java , cc ) or a coverage metadata file ( e g gcno , em ) this method only returns the c + + source files , ignoring the other files as they are not necessary when putting together the final coverage report

private static set < string > get sources from source file manifest ( string source file manifest ) { set < string > source files = new hash set < > ( ) ; try ( file input stream input stream = new file input stream ( new file ( source file manifest ) ) ; input stream reader input stream reader = new input stream reader ( input stream , utf 8 ) ; buffered reader reader = new buffered reader ( input stream reader ) ) { for ( string line = reader read line ( ) ; line ! = null ; line = reader read line ( ) ) { if ( ! is metadata file ( line ) ) { source files add ( line ) ; } } } catch ( i o exception e ) { logger log ( level severe , " error reading file " + source file manifest + " : " + e get message ( ) ) ; } return source files ; }


returns the comment string for the entry , or null if none

public string get comment ( ) { return comment ; }


enables or disables the action this affects all uses of the action note that for popups , this affects whether or not the option is " grayed out " , not whether the action is added to the popup

public synchronized void set enabled ( boolean new value ) { if ( new value ! = enabled ) { boolean old value = this enabled ; this enabled = new value ; fire property change ( " enabled " , boolean value of ( old value ) , boolean value of ( new value ) ) ; } }


hystrix concurrency strategy use default request context : false hystrix command use request cache : false use request log : false outcome : request log not set up in command , not available statically

public void test command does not require context concurrency strategy does not provide it context set up correctly ( ) { hystrix concurrency strategy strategy = new custom concurrency strategy ( false ) ; hystrix plugins get instance ( ) register concurrency strategy ( strategy ) ; / / context is set up properly hystrix request context context = hystrix request context initialize context ( ) ; hystrix command < boolean > cmd = new test command ( true , true ) ; assert true ( cmd execute ( ) ) ; print request log ( ) ; assert null ( hystrix request log get current request ( ) ) ; assert null ( hystrix request log get current request ( strategy ) ) ; assert null ( cmd current request log ) ; context shutdown ( ) ; }


range queries should generally be cacheable , at least the ones we create randomly this test makes sure we also test the non - cacheable cases regularly

public void test cacheability ( ) throws i o exception { range query builder query builder = create test query builder ( ) ; query shard context context = create shard context ( ) ; query builder rewrite query = rewrite query ( query builder , new query shard context ( context ) ) ; assert not null ( rewrite query to query ( context ) ) ; assert true ( " query should be cacheable : " + query builder to string ( ) , context is cacheable ( ) ) ; / / queries on date fields using " now " should not be cached query builder = new range query builder ( random from ( date field name , date range field name , date alias field name ) ) ; query builder to ( " now " ) ; context = create shard context ( ) ; rewrite query = rewrite query ( query builder , new query shard context ( context ) ) ; assert not null ( rewrite query to query ( context ) ) ; assert false ( " query should not be cacheable : " + query builder to string ( ) , context is cacheable ( ) ) ; }


stores the specified value in the supplied { @ link value fields }

void set value ( object value , value fields value fields ) ;


create a local map output file name on the same volume

public path get output file for write in volume ( path existing ) { path output dir = new path ( existing get parent ( ) , job output dir ) ; path attempt output dir = new path ( output dir , conf get ( job context task attempt id ) ) ; return new path ( attempt output dir , map output filename string ) ; }


test a dn waits for the volume scanners to finish before shutting down

public void test slow datanode shutdown ( ) throws exception { / / set the join time out to a value larger than the completion time of the / / volume scanner test datanode shut down ( time unit minutes to millis ( 5 ) , 1000l , false ) ; }


projects a pair of joined elements to a { @ link tuple } with the previously selected fields requires the classes of the fields of the resulting tuples

public < t0 , t1 , t2 , t3 , t4 > project join < i1 , i2 , tuple 5 < t0 , t1 , t2 , t3 , t4 > > project tuple 5 ( ) { type information < ? > [ ] f types = extract field types ( field indexes ) ; tuple type info < tuple 5 < t0 , t1 , t2 , t3 , t4 > > t type = new tuple type info < tuple 5 < t0 , t1 , t2 , t3 , t4 > > ( f types ) ; return new project join < i1 , i2 , tuple 5 < t0 , t1 , t2 , t3 , t4 > > ( this ds 1 , this ds 2 , this keys 1 , this keys 2 , this hint , this field indexes , this is field in first , t type , this ) ; }


@ test public void late cancel calls on failure ( ) throws exception { server enqueue ( new mock response ( ) set body ( " abc " ) ) ; atomic boolean closed = new atomic boolean ( ) ; client = client new builder ( ) add interceptor ( new interceptor ( ) { @ override public response intercept ( chain chain ) throws i o exception { response response = chain proceed ( chain request ( ) ) ; chain call ( ) cancel ( ) ; / / cancel after we have the response forwarding source close tracking source = new forwarding source ( response body ( ) source ( ) ) { @ override public void close ( ) throws i o exception { closed set ( true ) ; super close ( ) ; } } ; return response new builder ( ) body ( response body create ( okio buffer ( close tracking source ) , null , - 1l ) ) build ( ) ; } } ) build ( ) ; execute synchronously ( " / " ) assert failure ( " canceled " ) ; assert that ( closed get ( ) ) is true ( ) ; }


start concurrent request processing and initialize the given { @ link deferred result } with a { @ link deferred result handler } that saves the result and dispatches the request to resume processing of that result the { @ code async web request } is also updated with a completion handler that expires the { @ code deferred result } and a timeout handler assuming the { @ code deferred result } has a default timeout result

public void start deferred result processing ( final deferred result < ? > deferred result , object processing context ) throws exception { assert not null ( deferred result , " deferred result must not be null " ) ; assert state ( this async web request ! = null , " async web request must not be null " ) ; long timeout = deferred result get timeout value ( ) ; if ( timeout ! = null ) { this async web request set timeout ( timeout ) ; } list < deferred result processing interceptor > interceptors = new array list < > ( ) ; interceptors add ( deferred result get interceptor ( ) ) ; interceptors add all ( this deferred result interceptors values ( ) ) ; interceptors add ( timeout deferred result interceptor ) ; final deferred result interceptor chain interceptor chain = new deferred result interceptor chain ( interceptors ) ; this async web request add timeout handler ( ( ) - > { try { interceptor chain trigger after timeout ( this async web request , deferred result ) ; } catch ( throwable ex ) { set concurrent result and dispatch ( ex ) ; } } ) ; this async web request add error handler ( ex - > { if ( ! this error handling in progress ) { try { if ( ! interceptor chain trigger after error ( this async web request , deferred result , ex ) ) { return ; } deferred result set error result ( ex ) ; } catch ( throwable interceptor ex ) { set concurrent result and dispatch ( interceptor ex ) ; } } } ) ; this async web request add completion handler ( ( ) - > interceptor chain trigger after completion ( this async web request , deferred result ) ) ; interceptor chain apply before concurrent handling ( this async web request , deferred result ) ; start async processing ( processing context ) ; try { interceptor chain apply pre process ( this async web request , deferred result ) ; deferred result set result handler ( result - > { result = interceptor chain apply post process ( this async web request , deferred result , result ) ; set concurrent result and dispatch ( result ) ; } ) ; } catch ( throwable ex ) { set concurrent result and dispatch ( ex ) ; } }


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


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

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


return true if the connection has been established

public boolean is connected ( string id ) { node connection state state = node state get ( id ) ; return state ! = null & & state state is connected ( ) ; }


block copy lines and associated metadata from one location to another in the circular buffer , taking wraparound into account

private void block copy lines down ( int src internal , int len ) { if ( len = = 0 ) return ; int total rows = m total rows ; int start = len - 1 ; / / save away line to be overwritten : terminal row line to be over written = m lines [ ( src internal + start + 1 ) % total rows ] ; / / do the copy from bottom to top for ( int i = start ; i > = 0 ; - - i ) m lines [ ( src internal + i + 1 ) % total rows ] = m lines [ ( src internal + i ) % total rows ] ; / / put back overwritten line , now above the block : m lines [ ( src internal ) % total rows ] = line to be over written ; }


set the { @ link key field based partitioner } options used for { @ link partitioner }

public void set key field partitioner options ( job job , string key spec ) { job get configuration ( ) set ( partitioner options , key spec ) ; }


ensure that the actions artifacts created by genrule dependencies allow us to follow the chain of generated files backward

public void test dependencies via files ( ) throws exception { scratch file ( " foo / build " , " genrule ( name = ' bar ' , " , " srcs = [ ' bar in txt ' ] , " , " cmd = ' touch $ ( outs ) ' , " , " outs = [ ' bar out txt ' ] ) " , " genrule ( name = ' baz ' , " , " srcs = [ ' bar out txt ' ] , " , " cmd = ' touch $ ( outs ) ' , " , " outs = [ ' baz out txt ' ] ) " ) ; file configured target baz out target = get file configured target ( " / / foo : baz out txt " ) ; action baz action = get generating action ( baz out target get artifact ( ) ) ; artifact bar out = baz action get inputs ( ) to list ( ) get ( 0 ) ; assert that ( bar out get exec path ( ) ends with ( path fragment create ( " foo / bar out txt " ) ) ) is true ( ) ; action bar action = get generating action ( bar out ) ; artifact bar in = bar action get inputs ( ) to list ( ) get ( 0 ) ; assert that ( bar in get exec path ( ) ends with ( path fragment create ( " foo / bar in txt " ) ) ) is true ( ) ; }


most of the tests in this class run against every one of these caches

private iterable < loading cache < object , object > > caches ( ) { / / lots of different ways to configure a loading cache cache builder factory factory = cache factory ( ) ; return iterables transform ( factory build all permutations ( ) , new function < cache builder < object , object > , loading cache < object , object > > ( ) { @ override public loading cache < object , object > apply ( cache builder < object , object > builder ) { return builder build ( identity loader ( ) ) ; } } ) ; }


returns human - friendly help for the generator provide the consumer with help tips , parameters here

public string get help ( ) { return " generates a unreal engine 4 c + + module ( beta ) " ; }


adds a formatter to format fields of a specific type the field type is implied by the parameterized formatter instance

void add formatter ( formatter < ? > formatter ) ;


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


convenience method , so that we don ' t open a new connection when using this method from within another method otherwise every api invocation incurs the overhead of openingclosing a tcp connection

private boolean exists ( channel sftp channel , path file ) throws i o exception { try { get file status ( channel , file ) ; return true ; } catch ( file not found exception fnfe ) { return false ; } catch ( i o exception ioe ) { throw new i o exception ( e file status , ioe ) ; } }


attempt reconnect to the host that was attempted with { @ link # connect ( string , int ) } method before

future < mqtt connect result > reconnect ( ) ;


enables custom validation of argument counts after { @ link # get min count ( ) } and { @ link # get max count ( ) } have been validated


creates a { @ link dirty building state } for the case where this node is done and is being marked dirty

protected dirty building state create dirty building state for done node ( dirty type dirty type , grouped list < sky key > direct deps , sky value value ) { return dirty building state create ( dirty type , direct deps , value ) ; }


returns the multiple entry block model used by this model

protected mult ent sub model get model m ( ) { return model m ; }


public nodes usage request all ( ) { this rest actions = true ; this aggregations = true ; return this ; }


returns an immutable set containing the given elements , minus duplicates , in the order each was first specified that is , if multiple elements are { @ linkplain object # equals equal } , all except the first are ignored

public static < e > immutable set < e > of ( e e 1 , e e 2 , e e 3 , e e 4 ) { return construct ( 4 , e 1 , e 2 , e 3 , e 4 ) ; }


tests that server accepts connections from a client that does not provide a certificate if client authentication is requested but not required

public void test client authentication requested not provided ( args args ) throws exception { args ssl server configs put ( broker security configs ssl client auth config , " requested " ) ; cert stores keystore props for each ( args ssl client configs : : remove ) ; verify ssl configs ( args ) ; }


alias to < code > times ( 0 ) < code > , see { @ link mockito # times ( int ) } verifies that interaction did not happen e g : < pre class = " code " > < code class = " java " > verify ( mock , never ( ) ) some method ( ) ; < code > if you want to verify there were no interactions with the mock check out { @ link mockito # verify zero interactions ( object ) } or { @ link mockito # verify no more interactions ( object ) } see examples in javadoc for { @ link mockito } class

public static verification mode never ( ) { return times ( 0 ) ; }


public api response upload file ( long pet id , string additional metadata , file file ) throws timeout exception , execution exception , interrupted exception , api exception { object post body = null ; / / verify the required parameter ' pet id ' is set if ( pet id = = null ) { volley error error = new volley error ( " missing the required parameter ' pet id ' when calling upload file " , new api exception ( 400 , " missing the required parameter ' pet id ' when calling upload file " ) ) ; } / / create path and map variables string path = " / pet / { pet id } / upload image " replace all ( " \ \ { " + " pet id " + " \ \ } " , api invoker escape string ( pet id to string ( ) ) ) ; / / query params list < pair > query params = new array list < pair > ( ) ; / / header params map < string , string > header params = new hash map < string , string > ( ) ; / / form params map < string , string > form params = new hash map < string , string > ( ) ; string [ ] content types = { " multipart / form - data " } ; string content type = content types length > 0 ? content types [ 0 ] : " application / json " ; if ( content type starts with ( " multipart / form - data " ) ) { / / file uploading multipart entity builder local var builder = multipart entity builder create ( ) ; if ( additional metadata ! = null ) { local var builder add text body ( " additional metadata " , api invoker parameter to string ( additional metadata ) , api invoker text plain utf8 ) ; } if ( file ! = null ) { local var builder add binary body ( " file " , file ) ; } http entity http entity = local var builder build ( ) ; post body = http entity ; } else { / / normal form params form params put ( " additional metadata " , api invoker parameter to string ( additional metadata ) ) ; } string [ ] auth names = new string [ ] { " petstore auth " } ; try { string local var response = api invoker invoke a p i ( base path , path , " post " , query params , post body , header params , form params , content type , auth names ) ; if ( local var response ! = null ) { return ( api response ) api invoker deserialize ( local var response , " " , api response class ) ; } else { return null ; } } catch ( api exception ex ) { throw ex ; } catch ( interrupted exception ex ) { throw ex ; } catch ( execution exception ex ) { if ( ex get cause ( ) instanceof volley error ) { volley error volley error = ( volley error ) ex get cause ( ) ; if ( volley error network response ! = null ) { throw new api exception ( volley error network response status code , volley error get message ( ) ) ; } } throw ex ; } catch ( timeout exception ex ) { throw ex ; } }


configure with the provided { @ link window bytes store supplier } for this store supplier please note this method only provides the store supplier for the left side of the join if you wish to also provide a store supplier for the right ( i e , other ) side you must use the { @ link stream joined # with other store supplier ( window bytes store supplier ) } method

public stream joined < k , v1 , v2 > with this store supplier ( final window bytes store supplier this store supplier ) { return new stream joined < > ( key serde , value serde , other value serde , this store supplier , other store supplier , name , store name , logging enabled , topic config ) ; }


builder method ( http method http method ) ;


adds each element of { @ code elements } to the { @ code immutable list }

public builder < e > add ( e elements ) { super add ( elements ) ; return this ; }


return if element at specified index is a separator

boolean is separator ( int path index ) { return this path elements get ( path index ) instanceof separator ; }


creates list of users with given input array

public void create users with list input ( list < user > body ) throws api exception { create users with list input with http info ( body ) ; }


controls where the stdin of the process comes from by default , { @ code devnull }

public proc starter stdin ( @ check for null input stream in ) { this stdin = in ; return this ; }


sets a given function as the comparison source

public void set source ( function function ) { source = function ; }


parse the supplied expression and then create a string representation of the resultant ast , it should be the same as the original expression

public void parse check ( string expression ) { parse check ( expression , expression ) ; }


public cst string get value ( ) { return value ; }


returns the model index of the given item when filtered , this is the index is the larger , set of data ; when unfiltered , this index is the same as that returned by { @ link # get model index ( object ) } this operation will be o ( n ) unless the implementation is sorted , in which case the operation is o ( log n ) , as it uses a binary search

public int get model index ( row object t ) ;


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

public static fields find by thrift id ( int field id ) { switch ( field id ) { case 1 : / / name return name ; case 2 : / / uploaded jar location return uploaded jar location ; case 3 : / / json conf return json conf ; case 4 : / / topology return topology ; case 5 : / / options return options ; default : return null ; } }


query configuration information based on data id and group

config info base find config info base ( final string data id , final string group ) ;


writes an entire word into { @ code buffer }

public void get word ( byte [ ] buffer ) { if ( initialized ! = ( ( byte ) ( 0xff ) ) ) { throw new lowlevel error ( " attempted to read uninitialized word in unique space " ) ; } if ( buffer length ! = word size ) { throw new illegal argument exception ( " buffer must have length 8 " ) ; } for ( int i = 0 ; i < word size ; + + i ) { buffer [ i ] = ( byte ) ( ( word & ( 0xff l < < ( word size * i ) ) ) > > ( word size * i ) ) ; } }


initialize the following fields from the database and check the database version for an existing database : name language name language version language minor version

private version exception initialize database ( int open mode ) throws i o exception , version exception { table = dbh get table ( table name ) ; if ( table = = null ) { if ( open mode = = d b constants upgrade ) { create database ( ) ; } else { throw new version exception ( true ) ; } } int stored version = get stored version ( ) ; if ( stored version > db version ) { throw new version exception ( version exception newer version , false ) ; } if ( open mode ! = d b constants upgrade & & stored version < upgrade required before version ) { return new version exception ( true ) ; } if ( open mode = = d b constants update & & stored version < db version ) { return new version exception ( true ) ; } return null ; }


gets the hash value if this data type has one

public scalar get hash value ( ) throws invalid data type exception , undefined value exception { check validity ( ) ; if ( has v f pointer ) { throw new undefined value exception ( " no hash value is defined for this type descriptor model " ) ; } / / component 0 is either vf table pointer or hash value return e h data type utilities get scalar value ( get data type ( ) , vf table or hash ordinal , get mem buffer ( ) ) ; }


return the { @ link jms headers # reply to reply to }

public destination get reply to ( ) { return ( destination ) get header ( jms headers reply to ) ; }


convenience method to set the material , mesh , mesh part offset , mesh part size , primitive type and bones members of the specified renderable the other member of the provided { @ link renderable } remain untouched note that the material , mesh and bones members are referenced , not copied any changes made to those objects will be reflected in both the node part and renderable object

public renderable set renderable ( final renderable out ) { out material = material ; out mesh part set ( mesh part ) ; out bones = bones ; return out ; }


this is the component that you ' ll use in your spring integration { @ link org springframework integration dsl integration flow }

public static activiti inbound gateway inbound gateway ( process engine process engine , string vars to preserve ) { return new activiti inbound gateway ( process engine , vars to preserve ) ; }


a bit of a hack that triggers the text area to update its preferred height now before we render so that it doesn ' t change later

private void update text area size to force text layout ( ) { format manager format manager = get controller ( ) get minimal format manager ( ) ; int max width = format manager get max width ( ) ; if ( max width < = 0 ) { return ; } user text area set size ( max width , integer max value ) ; }


public index record get index ( int partition ) { final int pos = partition * map task map output index record length / 8 ; return new index record ( entries get ( pos ) , entries get ( pos + 1 ) , entries get ( pos + 2 ) ) ; }


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


seeks to the specified position in microseconds

public void seek to us ( long position us ) { last seek position us = position us ; if ( is pending reset ( ) ) { / / a reset is already pending we only need to update its position pending reset position us = position us ; return ; } / / detect whether the seek is to the start of a chunk that ' s at least partially buffered @ nullable base media chunk seek to media chunk = null ; for ( int i = 0 ; i < media chunks size ( ) ; i + + ) { base media chunk media chunk = media chunks get ( i ) ; long media chunk start time us = media chunk start time us ; if ( media chunk start time us = = position us & & media chunk clipped start time us = = c time unset ) { seek to media chunk = media chunk ; break ; } else if ( media chunk start time us > position us ) { / / we ' re not going to find a chunk with a matching start time break ; } } / / see if we can seek inside the primary sample queue boolean seek inside buffer ; if ( seek to media chunk ! = null ) { / / when seeking to the start of a chunk we use the index of the first sample in the chunk / / rather than the seek position this ensures we seek to the keyframe at the start of the / / chunk even if its timestamp is slightly earlier than the advertised chunk start time seek inside buffer = primary sample queue seek to ( seek to media chunk get first sample index ( 0 ) ) ; } else { seek inside buffer = primary sample queue seek to ( position us , / * allow time beyond buffer = * / position us < get next load position us ( ) ) ; } if ( seek inside buffer ) { / / we can seek inside the buffer next notify primary format media chunk index = primary sample index to media chunk index ( primary sample queue get read index ( ) , / * min chunk index = * / 0 ) ; / / seek the embedded sample queues for ( sample queue embedded sample queue : embedded sample queues ) { embedded sample queue seek to ( position us , / * allow time beyond buffer = * / true ) ; } } else { / / we can ' t seek inside the buffer , and so need to reset pending reset position us = position us ; loading finished = false ; media chunks clear ( ) ; next notify primary format media chunk index = 0 ; if ( loader is loading ( ) ) { / / discard as much as we can synchronously primary sample queue discard to end ( ) ; for ( sample queue embedded sample queue : embedded sample queues ) { embedded sample queue discard to end ( ) ; } loader cancel loading ( ) ; } else { loader clear fatal error ( ) ; reset sample queues ( ) ; } } }


attempts to execute all the listeners in { @ link # listeners } while not holding the { @ link # monitor }

private void dispatch listener events ( ) { if ( ! monitor is occupied by current thread ( ) ) { listeners dispatch ( ) ; } }


public map < string , map < string , object > > get map map anytype ( ) { return map map anytype ; }


public response entity < string > handle exception ( exception e ) { loggers srv log error ( " got exception " , exception util get all exception msg ( e ) ) ; return response entity status ( http status internal server error ) body ( exception util get all exception msg ( e ) ) ; }


io scheduler defaults to using cached thread scheduler

public final void i o scheduler ( ) { flowable < integer > f 1 = flowable just ( 1 , 2 , 3 , 4 , 5 ) ; flowable < integer > f 2 = flowable just ( 6 , 7 , 8 , 9 , 10 ) ; flowable < string > f = flowable merge ( f 1 , f 2 ) map ( new function < integer , string > ( ) { @ override public string apply ( integer t ) { assert true ( thread current thread ( ) get name ( ) starts with ( " rx cached thread scheduler " ) ) ; return " value " + t + " thread " + thread current thread ( ) get name ( ) ; } } ) ; f subscribe on ( schedulers io ( ) ) blocking for each ( new consumer < string > ( ) { @ override public void accept ( string t ) { system out println ( " t : " + t ) ; } } ) ; }


set whether to proxy the target class directly , instead of just proxying specific interfaces default is " false " set this to " true " to force proxying for the target source ' s exposed target class if that target class is an interface , a jdk proxy will be created for the given interface if that target class is any other class , a cglib proxy will be created for the given class note : depending on the configuration of the concrete proxy factory , the proxy - target - class behavior will also be applied if no interfaces have been specified ( and no interface autodetection is activated )

public void set proxy target class ( boolean proxy target class ) { this proxy target class = proxy target class ; }


creates a tumbling window tumbling windows are fixed - size , consecutive , non - overlapping windows of a specified fixed length for example , a tumbling window of 5 minutes size groups elements in 5 minutes intervals

public static tumble with size over ( string size ) { return over ( expression parser parse expression ( size ) ) ; }


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


public boolean increment usage with default quota limit ( tenant capacity tenant capacity ) { string sql = " update tenant capacity set ` usage ` = ` usage ` + 1 , gmt modified = ? where tenant id = ? and ` usage ` < " + " ? and quota = 0 " ; try { int affect row = jdbc template update ( sql , tenant capacity get gmt modified ( ) , tenant capacity get tenant ( ) , tenant capacity get quota ( ) ) ; return affect row = = 1 ; } catch ( cannot get jdbc connection exception e ) { fatal log error ( " [ db - error ] " , e ) ; throw e ; } }


this test should never pass , simply because spring does not support a hybrid approach for annotation attribute overrides with transitive implicit aliases see spr - 13554 for details furthermore , if you choose to execute this test , it can fail for either the first test class or the second one ( with different exceptions ) , depending on the order in which the jvm returns the attribute methods via reflection

void get merged annotation attributes with half convention based and half aliased composed annotation ( ) { for ( class < ? > clazz : as list ( half convention based and half aliased composed context config class v 1 class , half convention based and half aliased composed context config class v 2 class ) ) { get merged annotation attributes with half convention based and half aliased composed annotation ( clazz ) ; } }


sets the rotation of this cell , in 90 degree increments

public cell set rotation ( int rotation ) { this rotation = rotation ; return this ; }


triggers the program execution asynchronously the environment will execute all parts of the program that have resulted in a " sink " operation sink operations are for example printing results ( { @ link data set # print ( ) } , writing results ( e g { @ link data set # write as text ( string ) } , { @ link data set # write ( org apache flink api common io file output format , string ) } , or other generic data sinks created with { @ link data set # output ( org apache flink api common io output format ) } the program execution will be logged and displayed with the given job name

public job client execute async ( string job name ) throws exception { check not null ( configuration get ( deployment options target ) , " no execution target specified in your configuration file " ) ; final plan plan = create program plan ( job name ) ; final pipeline executor factory executor factory = executor service loader get executor factory ( configuration ) ; check not null ( executor factory , " cannot find compatible factory for specified execution target ( = % s ) " , configuration get ( deployment options target ) ) ; completable future < job client > job client future = executor factory get executor ( configuration ) execute ( plan , configuration , user classloader ) ; try { job client job client = job client future get ( ) ; job listeners for each ( job listener - > job listener on job submitted ( job client , null ) ) ; return job client ; } catch ( throwable t ) { job listeners for each ( job listener - > job listener on job submitted ( null , t ) ) ; exception utils rethrow ( t ) ; / / make javac happy , this code path will not be reached return null ; } }


public static long crc 3 2 ( byte [ ] bytes ) { return crc 3 2 ( bytes , 0 , bytes length ) ; }


averages the given transforms and stores the result in this matrix translations and scales are lerped while rotations are slerped does not destroy the data contained in t

public matrix 4 avg ( matrix 4 [ ] t ) { final float w = 1 0f / t length ; tmp vec set ( t [ 0 ] get scale ( tmp up ) scl ( w ) ) ; quat set ( t [ 0 ] get rotation ( quat 2 ) exp ( w ) ) ; tmp forward set ( t [ 0 ] get translation ( tmp up ) scl ( w ) ) ; for ( int i = 1 ; i < t length ; i + + ) { tmp vec add ( t [ i ] get scale ( tmp up ) scl ( w ) ) ; quat mul ( t [ i ] get rotation ( quat 2 ) exp ( w ) ) ; tmp forward add ( t [ i ] get translation ( tmp up ) scl ( w ) ) ; } quat nor ( ) ; set to scaling ( tmp vec ) ; rotate ( quat ) ; set translation ( tmp forward ) ; return this ; }


post transition hook this will be called after the transition

void post transition ( operand op , state before state , state after state , event processed event ) ;


protected table records build table records ( map < string , list < object > > pk values map ) throws s q l exception { list < string > pk column name list = get table meta ( ) get primary key only name ( ) ; string builder sql = new string builder ( ) append ( " select * from " ) append ( get from table in s q l ( ) ) append ( " where " ) ; / / build check sql string first key = pk values map key set ( ) stream ( ) find first ( ) get ( ) ; int row size = pk values map get ( first key ) size ( ) ; sql append ( sql generate utils build where condition by p ks ( pk column name list , row size , get db type ( ) ) ) ; prepared statement ps = null ; result set rs = null ; try { ps = statement proxy get connection ( ) prepare statement ( sql to string ( ) ) ; int param index = 1 ; for ( int r = 0 ; r < row size ; r + + ) { for ( int c = 0 ; c < pk column name list size ( ) ; c + + ) { list < object > pk column value list = pk values map get ( pk column name list get ( c ) ) ; int data type = table meta get column meta ( pk column name list get ( c ) ) get data type ( ) ; ps set object ( param index , pk column value list get ( r ) , data type ) ; param index + + ; } } rs = ps execute query ( ) ; return table records build records ( get table meta ( ) , rs ) ; } finally { i o util close ( rs ) ; } }


returns the set of edges connecting the origin node to { @ code node } for networks without parallel edges , this set cannot be of size greater than one


set whether to schedule as fixed - rate execution , rather than fixed - delay execution default is " false " , that is , fixed delay see scheduled executor service javadoc for details on those execution modes

public void set fixed rate ( boolean fixed rate ) { this fixed rate = fixed rate ; }


sets the boolean operator of the query parser used to parse the query string in default mode ( { @ link operator # or } ) terms without any modifiers are considered optional : for example < code > capital of hungary < code > is equal to < code > capital or of or hungary < code > in { @ link operator # and } mode terms are considered to be in conjunction : the above mentioned query is parsed as < code > capital and of and hungary < code >

public query string query builder default operator ( operator default operator ) { this default operator = default operator = = null ? default operator : default operator ; return this ; }


called when the playback speed is changed

void on playback speed changed ( float playback speed ) ;


obtain the access token that should be added to https connection ' s header will be called depending upon { @ link # get expiry time ( ) } expiry time is set , so implementations should be performant implementations are responsible for any refreshing of the token

string get access token ( ) throws i o exception ;


< code > optional aapt pb styled string styled str = 4 ; < code >

private void clear styled str ( ) { styled str = null ; bit field 0 = ( bit field 0 & ~ 0x 0 0 0 0 0 0 0 8 ) ; }


testing only ! ! ! really ! ! ! ! this is only here to test when the client disconnects from the server wo sending a session disconnect ( ie ending the session cleanly ) the server will eventually notice the client is no longer pinging and will timeout the session

public void disconnect ( ) throws i o exception { cnxn disconnect ( ) ; }


this method calculates intersections of two lines

private static point get lines intersection ( line 2 d a , line 2 d b ) { double d = ( a get x 1 ( ) - a get x 2 ( ) ) * ( b get y 2 ( ) - b get y 1 ( ) ) - ( a get y 1 ( ) - a get y 2 ( ) ) * ( b get x 2 ( ) - b get x 1 ( ) ) ; double da = ( a get x 1 ( ) - b get x 1 ( ) ) * ( b get y 2 ( ) - b get y 1 ( ) ) - ( a get y 1 ( ) - b get y 1 ( ) ) * ( b get x 2 ( ) - b get x 1 ( ) ) ; double ta = da / d ; point p = new point ( ) ; p set location ( a get x 1 ( ) + ta * ( a get x 2 ( ) - a get x 1 ( ) ) , a get y 1 ( ) + ta * ( a get y 2 ( ) - a get y 1 ( ) ) ) ; return p ; }


get a handle to an existing repository the repository adapter is initially disconnected - the connect ( ) method or another repository action method must be invoked to establish a repository connection

public repository adapter get repository ( string name ) { return new repository adapter ( this , name ) ; }


open the current version of this database for update use

public local managed buffer file open buffer file for update ( ) throws i o exception { if ( ! update allowed ) { throw new i o exception ( " update use not permitted " ) ; } synchronized ( sync object ) { return new local managed buffer file ( bf mgr , true , - 1 , - 1 ) ; } }


gets the list of { @ link target literal } s contained in the expression

public list < target literal > get words ( ) { return words ; }


switch the using database to the one specified by parameter

public static void use ( lite pal d b lite pal d b ) { operator use ( lite pal d b ) ; }


return byte length to the auxiliary data

public int get aux length ( ) { return aux length ; }


get the record with the minimum key value which is greater than or equal to the specified key

public d b record get record at or after ( field key ) throws i o exception { synchronized ( db ) { if ( root buffer id < 0 ) { return null ; } if ( key instanceof long field ) { return get record at or after ( key get long value ( ) ) ; } try { field key record node leaf = get field key node ( root buffer id ) get leaf node ( key ) ; return leaf get record at or after ( key , schema ) ; } finally { node mgr release nodes ( ) ; } } }


returns all extra actions for that target ( including transitive actions )

protected immutable list < extra action > get transitive extra action actions ( configured target target ) { immutable list builder < extra action > result = new immutable list builder < > ( ) ; for ( artifact artifact : target get provider ( extra action artifacts provider class ) get transitive extra action artifacts ( ) to list ( ) ) { action action = get generating action ( artifact ) ; if ( action instanceof extra action ) { result add ( ( extra action ) action ) ; } } return result build ( ) ; }


set a custom x stream { @ link converter registry } to use

public void set converter registry ( converter registry converter registry ) { this converter registry = converter registry ; }


given a tgzzip file , extracts it to the given target directory , if necessary this method is a convenience method designed for installing a binary package to a location that supports upgrade and downgrade specifically , if the target directory doesn ' t exist { @ linkplain # mkdirs ( ) it will be created } the timestamp of the archive is left in the installation directory upon extraction if the timestamp left in the directory does not match the timestamp of the current archive file , the directory contents will be discarded and the archive file will be re - extracted if the connection is refused but the target directory already exists , it is left alone

public boolean install if necessary from ( @ non null url archive , @ check for null task listener listener , @ non null string message ) throws i o exception , interrupted exception { if ( listener = = null ) { listener = task listener null ; } return install if necessary from ( archive , listener , message , max redirects ) ; }


update the count of each directory with quota in the namespace a directory ' s count is defined as the total number inodes in the tree rooted at the directory this is an update of existing state of the filesystem and does not throw quota exceeded exception

void update count for quota ( int init threads ) { write lock ( ) ; try { int threads = ( init threads < 1 ) ? 1 : init threads ; log info ( " initializing quota with " + threads + " thread ( s ) " ) ; long start = time monotonic now ( ) ; quota counts counts = new quota counts builder ( ) build ( ) ; fork join pool p = new fork join pool ( threads ) ; recursive action task = new init quota task ( get block storage policy suite ( ) , root dir get storage policy i d ( ) , root dir , counts ) ; p execute ( task ) ; task join ( ) ; p shutdown ( ) ; log info ( " quota initialization completed in " + ( time monotonic now ( ) - start ) + " milliseconds \ n " + counts ) ; } finally { write unlock ( ) ; } }


enabledisable debugging for this api client

public api client set debugging ( boolean debugging ) { this debugging = debugging ; / / need to rebuild the client as it depends on the value of debugging rebuild http client ( ) ; return this ; }


create a url which refers to a local ghidra project

public static url make u r l ( string dir path , string project name ) { string path = check absolute path ( dir path ) ; if ( ! path ends with ( " / " ) ) { path + = " / " ; } try { return new url ( protocol + " : " + path + project name ) ; } catch ( malformed u r l exception e ) { throw new illegal argument exception ( e ) ; } }


deregister the flink application from the resource management system by signalling the { @ link resource manager }

public completable future < void > deregister application and close ( final application status application status , final @ nullable string diagnostics ) { if ( is running compare and set ( true , false ) ) { final completable future < void > close web monitor and deregister app future = future utils compose afterwards ( web monitor endpoint close async ( ) , ( ) - > deregister application ( application status , diagnostics ) ) ; return future utils compose afterwards ( close web monitor and deregister app future , this : : close async internal ) ; } else { return termination future ; } }


convenient method to execute with a single long parameter

public list < t > execute ( long p 1 ) throws data access exception { return execute ( p 1 , null ) ; }


specifies that a given field of a given class should not be treated with laxity by { @ link robust collection converter }

public void add critical field ( class < ? > clazz , string field ) { reflection converter add critical field ( clazz , field ) ; }