converts a collection of artifacts into execution - time path strings , and returns those as an immutable list middleman artifacts are ignored by this method

public static list < string > as exec paths ( iterable < artifact > artifacts ) { return immutable list copy of ( to exec paths ( artifacts ) ) ; }


get the variable associated with this variable location

public variable get variable ( ) { function function = program get function manager ( ) get function at ( function addr ) ; if ( function = = null ) { return null ; } if ( is parameter ) { / / return or parameter return function get parameter ( ordinal orfirst use offset ) ; } if ( variable address = = null | | ! variable address is variable address ( ) ) { return null ; } for ( variable var : function get local variables ( ) ) { if ( var get first use offset ( ) = = ordinal orfirst use offset & & var get symbol ( ) get address ( ) equals ( variable address ) ) { return var ; } } return null ; }


reverse operation of { @ link # store ( confidential key , byte [ ] ) }

protected byte [ ] load ( confidential key key ) throws i o exception { try { file f = get file for ( key ) ; if ( ! f exists ( ) ) return null ; cipher sym = secret get cipher ( " aes " ) ; sym init ( cipher decrypt mode , master key ) ; try ( input stream fis = files new input stream ( f to path ( ) ) ; cipher input stream cis = new cipher input stream ( fis , sym ) ) { byte [ ] bytes = i o utils to byte array ( cis ) ; return verify magic ( bytes ) ; } } catch ( general security exception e ) { throw new i o exception ( " failed to load the key : " + key get id ( ) , e ) ; } catch ( invalid path exception e ) { throw new i o exception ( e ) ; } catch ( i o exception x ) { if ( x get cause ( ) instanceof bad padding exception ) { return null ; / / broken somehow } else { throw x ; } } }


test race between delete operation and commit block synchronization method see hdfs - 6825

private void test delete and commit block synchronization race ( boolean has snapshot ) throws exception { log info ( " start testing , has snapshot : " + has snapshot ) ; array list < abstract map simple immutable entry < string , boolean > > test list = new array list < abstract map simple immutable entry < string , boolean > > ( ) ; test list add ( new abstract map simple immutable entry < string , boolean > ( " / test - file " , false ) ) ; test list add ( new abstract map simple immutable entry < string , boolean > ( " / test - file 1 " , true ) ) ; test list add ( new abstract map simple immutable entry < string , boolean > ( " / testdir / testdir 1 / test - file " , false ) ) ; test list add ( new abstract map simple immutable entry < string , boolean > ( " / testdir / testdir 1 / test - file 1 " , true ) ) ; final path root path = new path ( " / " ) ; final configuration conf = new configuration ( ) ; / / disable permissions so that another user can recover the lease conf set boolean ( d f s config keys dfs permissions enabled key , false ) ; conf set int ( d f s config keys dfs block size key , block size ) ; f s data output stream stm = null ; map < data node , datanode protocol client side translator p b > dn map = new hash map < data node , datanode protocol client side translator p b > ( ) ; try { cluster = new mini d f s cluster builder ( conf ) num data nodes ( 3 ) build ( ) ; cluster wait active ( ) ; distributed file system fs = cluster get file system ( ) ; int st id = 0 ; for ( abstract map simple immutable entry < string , boolean > stest : test list ) { string test path = stest get key ( ) ; boolean mk same dir = stest get value ( ) ; log info ( " test on " + test path + " mk same dir : " + mk same dir + " snapshot : " + has snapshot ) ; path f path = new path ( test path ) ; / / find grandest non - root parent path grandest non root parent = f path ; while ( ! grandest non root parent get parent ( ) equals ( root path ) ) { grandest non root parent = grandest non root parent get parent ( ) ; } stm = fs create ( f path ) ; log info ( " test on " + test path + " created " + f path ) ; / / write a half block append test util write ( stm , 0 , block size / 2 ) ; stm hflush ( ) ; if ( has snapshot ) { snapshot test helper create snapshot ( fs , root path , " st " + string value of ( st id ) ) ; + + st id ; } / / look into the block manager on the active node for the block / / under construction name node nn = cluster get name node ( ) ; extended block blk = d f s test util get first block ( fs , f path ) ; datanode descriptor expected primary = d f s test util get expected primary node ( nn , blk ) ; log info ( " expecting block recovery to be triggered on dn " + expected primary ) ; / / find the corresponding dn daemon , and spy on its connection to the / / active data node primary d n = cluster get data node ( expected primary get ipc port ( ) ) ; datanode protocol client side translator p b nn spy = dn map get ( primary d n ) ; if ( nn spy = = null ) { nn spy = internal data node test utils spy on bpos to n n ( primary d n , nn ) ; dn map put ( primary d n , nn spy ) ; } / / delay the commit block synchronization call delay answer delayer = new delay answer ( log ) ; mockito do answer ( delayer ) when ( nn spy ) commit block synchronization ( mockito eq ( blk ) , mockito any long ( ) , / / new genstamp mockito any long ( ) , / / new length mockito eq ( true ) , / / close file mockito eq ( false ) , / / delete block mockito any ( ) , / / new targets mockito any ( ) ) ; / / new target storages fs recover lease ( f path ) ; log info ( " waiting for commit block synchronization call from primary " ) ; delayer wait for call ( ) ; log info ( " deleting recursively " + grandest non root parent ) ; fs delete ( grandest non root parent , true ) ; if ( mk same dir & & ! grandest non root parent to string ( ) equals ( test path ) ) { log info ( " recreate dir " + grandest non root parent + " testpath : " + test path ) ; fs mkdirs ( grandest non root parent ) ; } delayer proceed ( ) ; log info ( " now wait for result " ) ; delayer wait for result ( ) ; throwable t = delayer get thrown ( ) ; if ( t ! = null ) { log info ( " result exception ( snapshot : " + has snapshot + " ) : " + t ) ; } } / / end of loop each f path log info ( " now check we can restart " ) ; cluster restart name nodes ( ) ; log info ( " restart finished " ) ; } finally { if ( stm ! = null ) { i o utils close stream ( stm ) ; } if ( cluster ! = null ) { cluster shutdown ( ) ; } } }


public numeric get value ( ) { return value ; }


creates a new execution properties process definition , process instance and activity will be initialized

public execution entity create child execution ( execution entity parent execution entity ) { execution entity child execution = execution data manager create ( ) ; inherit common properties ( parent execution entity , child execution ) ; child execution set parent ( parent execution entity ) ; child execution set process definition id ( parent execution entity get process definition id ( ) ) ; child execution set process definition key ( parent execution entity get process definition key ( ) ) ; child execution set process instance id ( parent execution entity get process instance id ( ) ! = null ? parent execution entity get process instance id ( ) : parent execution entity get id ( ) ) ; child execution set parent process instance id ( parent execution entity get parent process instance id ( ) ) ; child execution set app version ( parent execution entity get app version ( ) ) ; child execution set scope ( false ) ; / / manage the bidirectional parent - child relation parent execution entity add child execution ( child execution ) ; / / insert the child execution insert ( child execution , false ) ; if ( logger is debug enabled ( ) ) { logger debug ( " child execution { } created with parent { } " , child execution , parent execution entity get id ( ) ) ; } if ( get event dispatcher ( ) is enabled ( ) ) { get event dispatcher ( ) dispatch event ( activiti event builder create entity event ( activiti event type entity created , child execution ) ) ; get event dispatcher ( ) dispatch event ( activiti event builder create entity event ( activiti event type entity initialized , child execution ) ) ; } return child execution ; }


determine whether to suppress { @ link system # getenv ( ) } { @ link system # getenv ( string ) } access for the purposes of { @ link # get system environment ( ) } if this method returns { @ code true } , an empty dummy map will be used instead of the regular system environment map , never even trying to call { @ code getenv } and therefore avoiding security manager warnings ( if any ) the default implementation checks for the " spring getenv ignore " system property , returning { @ code true } if its value equals " true " in any case

protected boolean suppress getenv access ( ) { return spring properties get flag ( ignore getenv property name ) ; }


processes given aggregations as a step towards computing result


convert a string to an arithmetic progression

static arithmetic progression value of ( final string s ) { int i = 2 ; int j = s index of ( " , delta = " ) ; final long value = util parse long variable ( " value " , s substring ( 2 , j ) ) ; i = j + 1 ; j = s index of ( " , limit = " ) ; final long delta = util parse long variable ( " delta " , s substring ( i , j ) ) ; i = j + 1 ; final long limit = util parse long variable ( " limit " , s substring ( i ) ) ; return new arithmetic progression ( s char at ( 0 ) , value , delta , limit ) ; }


overridden to translate the internal value to a hex representation

public string value to string ( object value ) throws parse exception { string value string = super value to string ( value ) ; if ( " " equals ( value string ) ) { return value string ; } return long to hex string ( long value of ( value string ) ) ; }


this implementation of commit handles participating in existing transactions and programmatic rollback requests delegates to { @ code is rollback only } , { @ code do commit } and { @ code rollback }

public final mono < void > commit ( reactive transaction transaction ) throws transaction exception { if ( transaction is completed ( ) ) { return mono error ( new illegal transaction state exception ( " transaction is already completed - do not call commit or rollback more than once per transaction " ) ) ; } return transaction synchronization manager for current transaction ( ) flat map ( synchronization manager - > { generic reactive transaction reactive tx = ( generic reactive transaction ) transaction ; if ( reactive tx is rollback only ( ) ) { if ( reactive tx is debug ( ) ) { logger debug ( " transactional code has requested rollback " ) ; } return process rollback ( synchronization manager , reactive tx ) ; } return process commit ( synchronization manager , reactive tx ) ; } ) ; }


create an inet socket address from the given target string and default port if the string cannot be parsed correctly , the < code > config name < code > parameter is used as part of the exception message , allowing the user to better diagnose the misconfiguration

public static inet socket address create socket addr ( string target , int default port , string config name , boolean use cache if present ) { string help text = " " ; if ( config name ! = null ) { help text = " ( configuration property ' " + config name + " ' ) " ; } if ( target = = null ) { throw new illegal argument exception ( " target address cannot be null " + help text ) ; } target = target trim ( ) ; boolean has scheme = target contains ( " : / / " ) ; uri uri = create u r i ( target , has scheme , help text , use cache if present ) ; string host = uri get host ( ) ; int port = uri get port ( ) ; if ( port = = - 1 ) { port = default port ; } string path = uri get path ( ) ; if ( ( host = = null ) | | ( port < 0 ) | | ( ! has scheme & & path ! = null & & ! path is empty ( ) ) ) { throw new illegal argument exception ( " does not contain a valid host : port authority : " + target + help text ) ; } return create socket addr for host ( host , port ) ; }


public static long get seed ( string stream id , long master seed ) { message digest md 5 = md 5 holder get ( ) ; md 5 reset ( ) ; / / ' / ' : make sure that we don ' t get the same str from ( ' 11 ' , 0 ) and ( ' 1 ' , 10 ) / / we could have fed the bytes of master seed one by one to md 5 update ( ) / / instead string str = stream id + ' / ' + master seed ; byte [ ] digest = md 5 digest ( str get bytes ( utf 8 ) ) ; / / create a long from the first 8 bytes of the digest / / this is fine as md5 has the avalanche property / / paranoids could have xor folded the other 8 bytes in too long seed = 0 ; for ( int i = 0 ; i < 8 ; i + + ) { seed = ( seed < < 8 ) + ( ( int ) digest [ i ] + 128 ) ; } return seed ; }


return an optional message code to use when this is unsatisfied

default optional < string > get code ( ) { return optional empty ( ) ; }


returns a list of the application root directories an application root directory is a directory containing one or more modules applications support multiple application root directories so that it can contain modules that don ' t have a common file system root this is useful if the application contains modules from more than one source code repository application roots are returned in the order they appear in the classpath

public static collection < resource file > get application root directories ( ) { check app initialized ( ) ; return app layout get application root dirs ( ) ; }


set user credententials for this proxy and the current thread the given username and password will be applied to all subsequent { @ code get connection ( ) } calls on this data source proxy this will override any statically specified user credentials , that is , values of the " username " and " password " bean properties

public void set credentials for current thread ( string username , string password ) { this thread bound credentials set ( new jdbc user credentials ( username , password ) ) ; }


hash segments to int , num bytes must be aligned to 4 bytes

public static int hash by words ( memory segment [ ] segments , int offset , int num bytes ) { if ( in first segment ( segments , offset , num bytes ) ) { return murmur hash util hash bytes by words ( segments [ 0 ] , offset , num bytes ) ; } else { return hash multi seg by words ( segments , offset , num bytes ) ; } }


returns the { @ link factory } for the { @ link weigher } to be used for the cache

public optional < factory < weigher < k , v > > > get weigher factory ( ) { return optional of nullable ( weigher factory ) ; }


the raw response body of an { @ linkplain # is successful ( ) unsuccessful } response

public @ nullable response body error body ( ) { return error body ; }


returns the { @ code char } value of a header with the specified name if there is more than one value for the specified name , the first value in insertion order is returned


test that the converter and option default values are only computed once and then are obtained from the stored values , in the case where a default converter is used

public void option definition memoizes default converter value ( ) throws exception { option definition option definition = option definition extract option definition ( valid option using default converter for mocking class get field ( " foo " ) ) ; option definition mock option def = mockito spy ( option definition ) ; / / do a bunch of potentially repeat operations on this option that need to know information / / about the converter and default value also verify that the values are as expected boolean is boolean = mock option def uses boolean value syntax ( ) ; assert that ( is boolean ) is false ( ) ; converter < ? > converter = mock option def get converter ( ) ; assert that ( converter ) is instance of ( integer converter class ) ; int value = ( int ) mock option def get default value ( ) ; assert that ( value ) is equal to ( 42 ) ; / / expect reference equality , since we didn ' t recompute the value converter < ? > second converter = mock option def get converter ( ) ; assert that ( second converter ) is same instance as ( converter ) ; mock option def get default value ( ) ; / / verify that we didn ' t re - calculate the converter from the provided class object verify ( mock option def , times ( 1 ) ) get provided converter ( ) ; / / the first call to get default value checks is special null default , which called / / get unparsed value default as well , but expect no more calls to it after the initial call verify ( mock option def , times ( 1 ) ) is special null default ( ) ; verify ( mock option def , times ( 2 ) ) get unparsed default value ( ) ; }


returns whether all of a collection of { @ link cor ref } s are satisfied by at least one of a collection of { @ link cor def } s

private boolean has all ( collection < cor ref > cor refs , collection < cor def > cor defs ) { for ( cor ref cor ref : cor refs ) { if ( ! has ( cor defs , cor ref ) ) { return false ; } } return true ; }


returns all framework names to pass to the linker using { @ code - framework } flags for a framework in the directory foobar framework , the name is " bar " each framework is found without using the full path by means of the framework search paths search paths are added by { @ link # common link and compile flags for clang ( objc provider , objc configuration , apple configuration ) } ) it ' s awful that we can ' t pass the full path to the framework and avoid framework search paths , but this is imposed on us by clang clang does not support passing the full path to the framework , so bazel cannot do it either

private set < string > framework names ( objc provider provider ) { set < string > names = new linked hash set < > ( ) ; names add all ( sdk framework names ( provider get ( sdk framework ) ) ) ; names add all ( provider static framework names ( ) to list ( ) ) ; names add all ( provider dynamic framework names ( ) to list ( ) ) ; return names ; }


public static < t > boolean contains ( collection < t > coll , t target ) { if ( is empty ( coll ) ) { return false ; } return coll contains ( target ) ; }


determine if the specified directory corresponds to an indexed filesystem

public static boolean is indexed ( string root path ) { file root file = new file ( root path ) ; if ( ! root file is directory ( ) ) { return false ; } file index file = new file ( root path , index file ) ; return index file exists ( ) ; }


returns a new authorization result that is granted and auditable

public static authorization result granted ( ) { return new authorization result ( true ) ; }


the interface used by clients to get a report of an container from the < code > resource manager < code > or < code > application history server < code > the client , via { @ link get container report request } provides the { @ link container id } of the container in secure mode , the < code > resource manager < code > or < code > application history server < code > verifies access to the method before accepting the request the < code > resource manager < code > or < code > application history server < code > responds with a { @ link get container report response } which includes the { @ link container report } for the container

public get container report response get container report ( get container report request request ) throws yarn exception , i o exception ;


private void cut ( ) { / / revert the " cut " if something is in the temporary clipboard check clipboard ( false ) ; if ( tree get selection count ( ) = = 1 ) { / / cut to clipboard tree path [ ] paths = new tree path [ ] { tree get selection path ( ) } ; set clipboard contents ( g clipboard get system clipboard ( ) , paths ) ; / / put on the temporary clipboard set clipboard contents ( temp clipboard , paths ) ; set nodes deleted ( paths ) ; } else { cut range ( ) ; } }


public class locate properties class for type ( final class or interface type type ) { if ( cached properties classes contains key ( type get name as string ( ) ) ) { return cached properties classes get ( type get name as string ( ) ) ; } val package name = configuration metadata generator class get package ( ) get name ( ) ; val reflections = new reflections ( new configuration builder ( ) filter inputs by ( s - > s ! = null & & s contains ( type get name as string ( ) ) ) set urls ( classpath helper for package ( package name ) ) set scanners ( new type elements scanner ( ) include fields ( false ) include methods ( false ) include annotations ( false ) filter results by ( s - > s ! = null & & s ends with ( type get name as string ( ) ) ) , new sub types scanner ( false ) ) ) ; val clz = reflections get sub types of ( serializable class ) stream ( ) filter ( c - > c get simple name ( ) equals ignore case ( type get name as string ( ) ) ) find first ( ) or else throw ( ( ) - > new illegal argument exception ( " cant locate class for " + type get name as string ( ) ) ) ; cached properties classes put ( type get name as string ( ) , clz ) ; return clz ; }


returns the negotiated protocol , or null if no protocol was negotiated

public string get selected protocol ( s s l socket socket ) { return null ; }


this method is deprecated and will be removed in the future releases handle async db operation in your own logic instead

public < t > find executor < t > sum async ( final class < ? > model class , final string column name , final class < t > column type ) { return sum async ( base utility change case ( d b utility get table name by class name ( model class get name ( ) ) ) , column name , column type ) ; }


notifies the given callback that the ping operation failed

public static void notify failed ( ping callback callback , executor executor , throwable cause ) { do execute ( executor , as runnable ( callback , cause ) ) ; }


sets the deflate compression level default is { @ link deflater # default compression }

public void set compression ( int level ) { deflater set level ( level ) ; }


ensures the truth of an expression involving the state of the calling instance , but not involving any parameters to the calling method

public static void check state ( boolean expression , @ nullable decl object error message ) { if ( ! expression ) { throw new illegal state exception ( string value of ( error message ) ) ; } }


the interface used by clients to get a report of applications matching the filters defined by { @ link get applications request } in the cluster from the < code > resource manager < code > or < code > application history server < code > the < code > resource manager < code > or < code > application history server < code > responds with a { @ link get applications response } which includes the { @ link application report } for the applications if the user does not have < code > view app < code > access for an application then the corresponding report will be filtered as described in { @ link # get application report ( get application report request ) }

public get applications response get applications ( get applications request request ) throws yarn exception , i o exception ;


find a maximum reasonable execution wallclock time includes the time already elapsed find a maximum reasonable execution time includes the time already elapsed if the projected total execution time for this task ever exceeds its reasonable execution time , we may speculate it

public long threshold runtime ( task id id ) ;


returns true if the argument is a top - level drawable in this holder

public boolean verify drawable ( drawable who ) { for ( int i = 0 ; i < m holders size ( ) ; + + i ) { if ( who = = get ( i ) get top level drawable ( ) ) { return true ; } } return false ; }


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


returns the minimum seqno that is retained in the lucene index operations whose seq # are at least this value should exist in the lucene index

public final long get min retained seq no ( ) { return soft deletes policy get min retained seq no ( ) ; }


decrement number of markers , resetting buffer if we hit 0

public void release ( int marker ) { int expected mark = - num markers ; if ( marker ! = expected mark ) { throw new illegal state exception ( " release ( ) called with an invalid marker " ) ; } num markers - - ; if ( num markers = = 0 & & p > 0 ) { / / release buffer when we can , but don ' t do unnecessary work / / copy data [ p ] data [ n - 1 ] to data [ 0 ] data [ ( n - 1 ) - p ] , reset ptrs / / p is last valid char ; move nothing if p = = n as we have no valid char system arraycopy ( data , p , data , 0 , n - p ) ; / / shift n - p char from p to 0 n = n - p ; p = 0 ; last char buffer start = last char ; } }


get the capacity of the hash map that stores blocks

int get capacity ( ) { return capacity ; }


create a size - constrained buffer in terms of the maximum number of bytes it will use

static eager buffer config max bytes ( final long byte limit ) { return new eager buffer config impl ( long max value , byte limit ) ; }


gets the specified annotation on this parameter or null

public < a extends annotation > a annotation ( class < a > type ) { for ( annotation a : annotations ( ) ) if ( a annotation type ( ) = = type ) return type cast ( a ) ; return null ; }


advances the read position by the specified number of samples

public final synchronized void skip ( int count ) { check argument ( count > = 0 & & read position + count < = length ) ; read position + = count ; }


private void create ( file ghidra install dir , string project name , file project dir , boolean create run config , string run config memory , set < module template type > module template types , string jython interpreter name , i progress monitor monitor ) throws invocation target exception { try { info ( " creating " + project name + " at " + project dir ) ; monitor begin task ( " creating " + project name , 3 ) ; ghidra application layout ghidra layout = new ghidra application layout ( ghidra install dir ) ; monitor worked ( 1 ) ; i java project java project = ghidra module utils create ghidra module project ( project name , project dir , create run config , run config memory , ghidra layout , jython interpreter name , monitor ) ; monitor worked ( 1 ) ; i file source file = ghidra module utils configure module source ( java project , project dir , ghidra layout , module template types , monitor ) ; monitor worked ( 1 ) ; if ( source file ! = null ) { eclipse message utils display in editor ( source file , workbench ) ; } info ( " finished creating " + project name ) ; } catch ( i o exception | parse exception | core exception e ) { throw new invocation target exception ( e ) ; } finally { monitor done ( ) ; } }


add a param element shortcut of < code > param ( ) $ name ( name ) $ value ( value ) ( ) ; < code >

param param ( string name , string value ) ;


inner entry point , with no logging or system exits

public static int exec ( configuration conf , string argv ) throws exception { try ( k diag kdiag = new k diag ( ) ) { return tool runner run ( conf , kdiag , argv ) ; } }


returns and removes the entry associated with the lowest element in this multiset , or returns { @ code null } if this multiset is empty


constructor with empty array has size 0 and contains no elements

public void test constructor empty array ( ) { atomic double array aa = new atomic double array ( new double [ 0 ] ) ; assert equals ( 0 , aa length ( ) ) ; try { aa get ( 0 ) ; fail ( ) ; } catch ( index out of bounds exception success ) { } }


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


returns a fluent iterable that combines two iterables the returned iterable has an iterator that traverses the elements in { @ code a } , followed by the elements in { @ code b } the source iterators are not polled until necessary the returned iterable ' s iterator supports { @ code remove ( ) } when the corresponding input iterator supports it < b > { @ code stream } equivalent : < b > { @ link stream # concat }

public static < t > fluent iterable < t > concat ( iterable < ? extends t > a , iterable < ? extends t > b ) { return concat no defensive copy ( a , b ) ; }


public long get image base ( boolean is windows platform ) { if ( is windows platform & & f opthdr ! = 0 ) { return 0x 8 0 ; } return 0 ; }


create a new instance of timeline reader client

public static timeline reader client create timeline reader client ( ) { return new timeline reader client impl ( ) ; }


adds the given options as linker options to the link command

public cc linking helper add linkopts ( iterable < string > linkopts ) { iterables add all ( this linkopts , linkopts ) ; return this ; }


set the verify checksum flag for the file system denoted by the path this is only applicable if the corresponding file system supports checksum by default doesn ' t do anything

public void set verify checksum ( final boolean verify checksum , final path f ) throws access control exception , file not found exception , unsupported file system exception , i o exception { final path abs f = resolve ( fix relative part ( f ) ) ; get f sof path ( abs f ) set verify checksum ( verify checksum ) ; }


get all the names of all the topics to which records have been produced during the test run call this method after piping the input into the test driver to retrieve the full set of topic names the topology produced records to the returned set of topic names may include user ( e g , output ) and internal ( e g , changelog , repartition ) topic names

public final set < string > produced topic names ( ) { return collections unmodifiable set ( output records by topic key set ( ) ) ; }


draws a rectangle with the bottom left corner at x , y having the given width and height in pixels the rectangle is offset by origin x , origin y relative to the origin scale specifies the scaling factor by which the rectangle should be scaled around origin x , origin y rotation specifies the angle of counter clockwise rotation of the rectangle around origin x , origin y the portion of the { @ link texture } given by src x , src y and src width , src height is used these coordinates and sizes are given in texels flip x and flip y specify whether the texture portion should be flipped horizontally or vertically

public void draw ( texture texture , float x , float y , float origin x , float origin y , float width , float height , float scale x , float scale y , float rotation , int src x , int src y , int src width , int src height , boolean flip x , boolean flip y ) ;


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


opens a file for reading , and returns a file channel

public file channel get input channel ( string filename ) throws i o exception { return new file input stream ( filename ) get channel ( ) ; }


public int get descriptor index ( ) { return u 2descriptor index ; }


post pet { pet id } upload image : uploads an image

response entity < model api response > upload file ( @ api param ( value = " id of pet to update " , required = true ) @ path variable ( " pet id " ) long pet id , @ api param ( value = " additional data to pass to server " ) @ valid @ request part ( value = " additional metadata " , required = false ) string additional metadata , @ api param ( value = " file to upload " ) @ valid @ request part ( value = " file " , required = false ) multipart file file ) ;


performs markup on the control flow guard dispatch function , if it exists

private static void markup cfg dispatch function ( load config directory lcd , boolean is 6 4bit , address space space , memory mem , symbol table symbol table ) { if ( lcd get cfg dispatch function pointer ( ) = = 0 ) { return ; } try { address function pointer addr = space get address ( lcd get cfg dispatch function pointer ( ) ) ; address function addr = space get address ( is 6 4bit ? mem get long ( function pointer addr ) : mem get int ( function pointer addr ) ) ; symbol table create label ( function addr , " guard dispatch icall " , source type imported ) ; } catch ( memory access exception | address out of bounds exception | invalid input exception e ) { msg warn ( control flow guard class , " unable to label control flow guard dispatch function " , e ) ; } }


equivalent to { @ code microseconds convert ( duration , this ) }

public long to micros ( long duration ) { throw new abstract method error ( ) ; }


prints the elements in a data set to the standard output stream { @ link system # out } of the jvm that calls the print ( ) method for programs that are executed in a cluster , this method needs to gather the contents of the data set back to the client , to print it there the string written for each element is defined by the { @ link object # to string ( ) } method this method immediately triggers the program execution , similar to the { @ link # collect ( ) } and { @ link # count ( ) } methods

public void print ( ) throws exception { list < t > elements = collect ( ) ; for ( t e : elements ) { system out println ( e ) ; } }


public final resource skyline get resource skyline ( ) { return resource skyline ; }


returns a new function scope as the top - level scope with the specified return type

public static function scope new function scope ( script scope script scope , class < ? > return type ) { return new function scope ( script scope , return type ) ; }


note that this test is testing also for the shared cancellation logic inside { @ link stream task } which , as of the time this test is being written , is not tested anywhere else ( like { @ link stream task test } or { @ link one input stream task test } )

public void test cancellation with source blocked on lock ( boolean with pending mail , boolean throw in cancel ) throws exception { final stream task test harness < string > test harness = new stream task test harness < > ( source stream task : : new , basic type info string type info ) ; cancel locking source reset ( ) ; test harness setup operator chain ( new operator i d ( ) , new stream source < > ( new cancel locking source ( throw in cancel ) ) ) chain ( new operator i d ( ) , new test bounded one input stream operator ( " operator 1 " ) , basic type info string type info create serializer ( new execution config ( ) ) ) finish ( ) ; stream config stream config = test harness get stream config ( ) ; stream config set time characteristic ( time characteristic processing time ) ; test harness invoke ( ) ; cancel locking source await running ( ) ; if ( with pending mail ) { / / this pending mail should be blocked on checkpoint lock acquisition , blocking the / / mailbox ( task ) thread test harness get task ( ) get mailbox executor factory ( ) create executor ( 0 ) execute ( ( ) - > assert false ( " this should never execute before task cancelation " , test harness get task ( ) is running ( ) ) , " test " ) ; } try { test harness get task ( ) cancel ( ) ; } catch ( expected test exception e ) { check state ( throw in cancel ) ; } try { test harness wait for task completion ( ) ; } catch ( throwable t ) { if ( ! exception utils find throwable ( t , interrupted exception class ) is present ( ) & & ! exception utils find throwable ( t , cancel task exception class ) is present ( ) ) { throw t ; } } }


set whether the cookie should only be sent using a secure protocol , such as https ( ssl ) this is an indication to the receiving browser , not processed by the http server itself default is " false "

public void set cookie secure ( boolean cookie secure ) { this cookie secure = cookie secure ; }


return any patterns provided in the ' default - autowire - candidates ' attribute of the top - level { @ code < beans > } element

public string [ ] get autowire candidate patterns ( ) { string candidate pattern = this defaults get autowire candidates ( ) ; return ( candidate pattern ! = null ? string utils comma delimited list to string array ( candidate pattern ) : null ) ; }


get the address for the data item to be processed by the base implementation in general this is the initial model address set when the command was created

final protected address get data address ( ) { return address ; }


update application ' s tracking url on next heartbeat

public void update tracking url ( string tracking url ) { / / unimplemented }


convert each string in the record list to a lengthvalue encoded pair and write to the outputstream

public void write record ( list < string > record ) throws i o exception { write num fields ( record size ( ) ) ; for ( string field : record ) { write field ( field ) ; } }


specify which { @ link reader event listener } to use the default implementation is empty reader event listener which discards every event notification external tools can provide an alternative implementation to monitor the components being registered in the bean factory

public void set event listener ( @ nullable reader event listener event listener ) { this event listener = ( event listener ! = null ? event listener : new empty reader event listener ( ) ) ; }


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


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


public int get proxy count ( ) { return jni get proxy count ( addr ) ; }


adds a data set as a broadcast set to the gather function

public void add broadcast set for gather function ( string name , data set < ? > data ) { this bc vars gather add ( new tuple 2 < > ( name , data ) ) ; }


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


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


the value reference combination to use , or all if unset

optional < reference type > values ( ) { return optional of nullable ( enums get if present ( reference type class , system get property ( " values " , " " ) to upper case ( ) ) or null ( ) ) ; }


should this request trigger a refresh ( { @ linkplain refresh policy # immediate } , the default ) , wait for a refresh ( { @ linkplain refresh policy # wait until } ) , or proceed ignore refreshes entirely ( { @ linkplain refresh policy # none } )

public refresh policy get refresh policy ( ) { return refresh policy ; }


called when the view is detached from window perform house keeping task , such as stopping runnable thread that would otherwise keep a reference on the context , thus preventing the activity to be recycled


return the parts of a multipart request if the content - type is { @ code " multipartform - data " } or an empty map otherwise note : calling this method causes the request body to be read and parsed in full and the resulting { @ code multi value map } is cached so that this method is safe to call more than once note : the { @ linkplain part # content ( ) contents } of each part is not cached , and can only be read once

mono < multi value map < string , part > > get multipart data ( ) ;


returns a new builder that initially holds the same keyvalue pairs as this starlark semantics

public builder to builder ( ) { return new builder ( new tree map < > ( map ) ) ; }


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


each argument is mapped using the supplied map function

public mapped vector arg < t > mapped ( command line item map fn < ? super t > map fn ) { return new mapped vector arg < > ( this , map fn ) ; }


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


specify the name of the jms message property that carries the type id for the contained object : either a mapped id value or a raw java class name default is none < b > note : this property needs to be set in order to allow for converting from an incoming message to a java object < b >

public void set type id property name ( string type id property name ) { this type id property name = type id property name ; }


returns true if this type is known to be an array type , such as { @ code int [ ] } , { @ code t [ ] } , { @ code < ? extends map < string , integer > [ ] > } etc

public final boolean is array ( ) { return get component type ( ) ! = null ; }


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


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


public boolean remove ( long key ) { if ( indexer remove ( key ) < 0 ) { return false ; } return true ; }


whether the context path and request uri should be decoded - - both of which are returned undecoded by the servlet api , in contrast to the servlet path either the request encoding or the default servlet spec encoding ( iso - 8859 - 1 ) is used when set to " true " by default this is set to { @ literal true } note : be aware the servlet path will not match when compared to encoded paths therefore use of { @ code url decode = false } is not compatible with a prefix - based servlet mapping and likewise implies also setting { @ code always use full path = true }

public void set url decode ( boolean url decode ) { check read only ( ) ; this url decode = url decode ; }


get the suitable { @ link network interface }

public static network interface find network interface ( ) { list < network interface > valid network interfaces = empty list ( ) ; try { valid network interfaces = get valid network interfaces ( ) ; } catch ( throwable e ) { logger warn ( e ) ; } network interface result = null ; / / try to find the preferred one for ( network interface network interface : valid network interfaces ) { if ( is preferred network interface ( network interface ) ) { result = network interface ; break ; } } if ( result = = null ) { / / if not found , try to get the first one for ( network interface network interface : valid network interfaces ) { enumeration < inet address > addresses = network interface get inet addresses ( ) ; while ( addresses has more elements ( ) ) { optional < inet address > address op = to valid address ( addresses next element ( ) ) ; if ( address op is present ( ) ) { try { if ( address op get ( ) is reachable ( 100 ) ) { result = network interface ; break ; } } catch ( i o exception e ) { / / ignore } } } } } if ( result = = null ) { result = first ( valid network interfaces ) ; } return result ; }


check that automatically creating an index is allowed , even when { @ link auto create index # auto create index setting } is < code > false < code > , when the index name matches a template and that template has < code > allow auto create < code > set to < code > true < code >

public void test can auto create index when allowed by template ( ) throws i o exception { configure auto create index ( false ) ; create template with allow auto create ( true ) ; / / attempt to add a document to a non - existing index auto - creating the index should succeed because the index name / / matches the template pattern assert o k ( this index document ( ) ) ; }


append the specified bean name to the list of beans that this definition depends on

public bean definition builder add depends on ( string bean name ) { if ( this bean definition get depends on ( ) = = null ) { this bean definition set depends on ( bean name ) ; } else { string [ ] added = object utils add object to array ( this bean definition get depends on ( ) , bean name ) ; this bean definition set depends on ( added ) ; } return this ; }


returns the current drag actor , or null

public @ null actor get drag actor ( ) { return drag actor ; }


parses the { @ code refresh token status } from the token document and throws an exception if the document is malformed returns the parsed { @ code refresh token status } together with an { @ code optional } validation exception that encapsulates the various logic about when and by who a token can be refreshed

private static tuple < refresh token status , optional < elasticsearch security exception > > check token document for refresh ( instant refresh requested , authentication client auth , map < string , object > source ) throws illegal state exception , date time exception { final refresh token status refresh token status = parse token and refresh status ( source ) v 2 ( ) ; final elasticsearch security exception validation exception = check token document expired ( refresh requested , source ) or else get ( ( ) - > { if ( refresh token status is invalidated ( ) ) { return invalid grant exception ( " token has been invalidated " ) ; } else { return check client can refresh ( refresh token status , client auth ) or else ( check multiple refreshes ( refresh requested , refresh token status ) or else ( null ) ) ; } } ) ; return new tuple < > ( refresh token status , optional of nullable ( validation exception ) ) ; }


returns a ghidra { @ link data type datatype } that corresponds to a type that can be used to represent an offset

public data type get offset type ( int size ) { return find matching data type by size ( base data type untyped , size ) ; }


find the next history location memento that contains a different function if no such location memento is found , null is returned

private location memento next function ( navigatable navigatable , boolean move to ) { if ( list is empty ( ) ) { return null ; } function current function = get current function ( navigatable ) ; for ( int i = current location + 1 ; i < list size ( ) ; i + + ) { location memento memento = list get ( i ) ; program location other location = memento get program location ( ) ; address address = other location get address ( ) ; function manager function manager = other location get program ( ) get function manager ( ) ; function history function = function manager get function containing ( address ) ; if ( history function ! = null & & ! history function equals ( current function ) ) { if ( move to ) { current location = i ; } return memento ; } } return null ; }


returns the hash value of the input as a long using the 64 bit fnv - 1a hash function the hash values produced by this function are less likely to collide than those produced by { @ link # hash code ( ) }

public static long get f n v 6 4 hash ( @ nullable string input ) { if ( input = = null ) { return 0 ; } long hash = 0 ; for ( int i = 0 ; i < input length ( ) ; i + + ) { hash ^ = input char at ( i ) ; / / this is equivalent to hash * = 0x 1 0 0 0 0 0 0 0 1b 3 ( the fnv magic prime number ) hash + = ( hash < < 1 ) + ( hash < < 4 ) + ( hash < < 5 ) + ( hash < < 7 ) + ( hash < < 8 ) + ( hash < < 40 ) ; } return hash ; }


generates a hash mash , and adds its score to the " global " statistics

private hash match score match ( function record function record , hash family family , task monitor monitor ) throws cancelled exception { if ( function record auto fail ( ) ) { return null ; } int function code units = function record get code unit size ( ) ; int specific code units = 0 ; hash lookup list mode mode = hash lookup list mode full ; if ( function record get specific hash ( ) = = family get hash ( ) get specific hash ( ) ) { specific code units = function record get specific hash additional size ( ) ; mode = hash lookup list mode specific ; } if ( function record is force specific ( ) & & ( mode ! = hash lookup list mode specific ) ) { return null ; } if ( function record auto pass ( ) ) { if ( function code units < medium hash code unit length limit ) { function code units = medium hash code unit length limit ; } } int child code units = 0 ; for ( fid hash quad fid hash quad : family get children ( ) ) { monitor check canceled ( ) ; if ( fid query service get superior full relation ( function record , fid hash quad ) ) { child code units + = fid hash quad get code unit size ( ) ; } } if ( function record is force relation ( ) & & child code units = = 0 ) { return null ; } int parent code units = 0 ; if ( family get parents ( ) size ( ) < max num parents for score ) { for ( fid hash quad fid hash quad : family get parents ( ) ) { monitor check canceled ( ) ; if ( fid query service get inferior full relation ( fid hash quad , function record ) ) { parent code units + = fid hash quad get code unit size ( ) ; } } } float function score = function code units ; function score + = 0 67 * specific code units ; / / each specific constant count is worth 2 / 3 of a whole code unit float child score = child code units ; float parent score = parent code units ; if ( function score + child score + parent score < score threshold ) { return null ; } hash match result = new hash match ( function record , function score , mode , child score , parent score ) ; return result ; }


return the second key at { @ code 0 & lt ; = index & lt ; = capacity ( ) } the result is undefined if the slot is unused

public long get key 2 ( long id ) { return keys get ( 2 * id + 1 ) ; }


public void 1 2 3number test ( ) { / / todo : test 1 2 3number }


this test needs to write to the config directory , this is difficult in an external cluster so we overwrite this to force running with { @ link internal test cluster }

protected boolean ignore external cluster ( ) { return true ; }


cycle detecting lock implementations must call this method in a { @ code finally } clause after any attempt to change the lock state , including both lock and unlock attempts failure to do so can result in corrupting the acquire locks set

private static void lock state changed ( cycle detecting lock lock ) { if ( ! lock is acquired by current thread ( ) ) { array list < lock graph node > acquired lock list = acquired locks get ( ) ; lock graph node node = lock get lock graph node ( ) ; / / iterate in reverse because locks are usually locked / unlocked in a / / lifo order for ( int i = acquired lock list size ( ) - 1 ; i > = 0 ; i - - ) { if ( acquired lock list get ( i ) = = node ) { acquired lock list remove ( i ) ; break ; } } } }


public boolean has branches ( int line ) { return branches contains key ( line ) ; }


gets a stream of points , and responds with statistics about the " trip " : number of points , number of known features visited , total distance traveled , and total time spent

public stream observer < point > record route ( final stream observer < route summary > response observer ) { return new stream observer < point > ( ) { int point count ; int feature count ; int distance ; point previous ; final long start time = system nano time ( ) ; @ override public void on next ( point point ) { point count + + ; if ( route guide util exists ( check feature ( point ) ) ) { feature count + + ; } / / for each point after the first , add the incremental distance from the previous point to / / the total distance value if ( previous ! = null ) { distance + = calc distance ( previous , point ) ; } previous = point ; } @ override public void on error ( throwable t ) { logger log ( level warning , " record route cancelled " ) ; } @ override public void on completed ( ) { long seconds = nanoseconds to seconds ( system nano time ( ) - start time ) ; response observer on next ( route summary new builder ( ) set point count ( point count ) set feature count ( feature count ) set distance ( distance ) set elapsed time ( ( int ) seconds ) build ( ) ) ; response observer on completed ( ) ; } } ; }


get an entry to access the key and value

public entry entry ( ) throws i o exception { check key ( ) ; return new entry ( ) ; }


assert that the upstream is not a fuseable source package - private : avoid leaking the now internal fusion properties into the public api use observer fusion to work with such tests

public final test observer ex < t > assert not fuseable ( ) { if ( qd ! = null ) { throw new assertion error ( " upstream is fuseable " ) ; } return this ; }


visits any type of class member of the given program class

public void visit program member ( program class program class , program member program member ) { visit any member ( program class , program member ) ; }


return a standalone instance of f s edit log that will log into the given log directory the returned instance is not yet opened

public static f s edit log create standalone edit log ( file log dir ) throws i o exception { assert true ( log dir mkdirs ( ) | | log dir exists ( ) ) ; if ( ! file util fully delete contents ( log dir ) ) { throw new i o exception ( " unable to delete contents of " + log dir ) ; } n n storage storage = mockito mock ( n n storage class ) ; storage directory sd = f s image test util mock storage directory ( log dir , name node dir type edits ) ; list < storage directory > sds = lists new array list ( sd ) ; mockito do return ( sds ) when ( storage ) dir iterable ( name node dir type edits ) ; mockito do return ( sd ) when ( storage ) get storage directory ( any ( ) ) ; f s edit log edit log = new f s edit log ( new configuration ( ) , storage , immutable list of ( log dir to u r i ( ) ) ) ; edit log init journals for write ( ) ; return edit log ; }


void draw ( image image ) { draw ( image , 0 , 0 ) ; }


return true iff calling { @ link # decrypt ( char [ ] ) } requires a non - empty password

public boolean has password ( ) { return has password ; }


backward compatibility signature ' add mapped statement '

public mapped statement add mapped statement ( string id , sql source sql source , statement type statement type , sql command type sql command type , integer fetch size , integer timeout , string parameter map , class < ? > parameter type , string result map , class < ? > result type , result set type result set type , boolean flush cache , boolean use cache , boolean result ordered , key generator key generator , string key property , string key column , string database id , language driver lang ) { return add mapped statement ( id , sql source , statement type , sql command type , fetch size , timeout , parameter map , parameter type , result map , result type , result set type , flush cache , use cache , result ordered , key generator , key property , key column , database id , lang , null ) ; }


get an optional of { @ link function definition } by a given name

default optional < function definition > get function definition ( string name ) { return optional empty ( ) ; }


an alternative to { @ link # set media types } for programmatic registrations

public void add media type ( string key , media type media type ) { this media types put ( key to lower case ( locale english ) , media type ) ; }


set to true to overwrite the existing file set it to false , an exception will be thrown when calling { @ link # build ( ) } if the file exists

public b overwrite ( boolean overwrite ) { if ( overwrite ) { flags add ( create flag overwrite ) ; } else { flags remove ( create flag overwrite ) ; } return get this builder ( ) ; }


public catalog table statistics copy ( ) { return new catalog table statistics ( this row count , this file count , this total size , this raw data size , new hash map < > ( this properties ) ) ; }


key set add will not add the element if it already exists in the set

public void test add 2 ( ) { set full = populated set ( 3 ) ; assert false ( full add ( one ) ) ; assert equals ( 3 , full size ( ) ) ; }


boolean lock query ( branch type branch type , string resource id , string xid , string lock keys ) throws transaction exception ;


< code > repeated io netty example worldclock local time local time = 1 ; < code >

public java util list < ? extends io netty example worldclock world clock protocol local time or builder > get local time or builder list ( ) { if ( local time builder ! = null ) { return local time builder get message or builder list ( ) ; } else { return java util collections unmodifiable list ( local time ) ; } }


cancel any existing requests for the specified { @ link bitmap target } instance

public void cancel request ( @ non null bitmap target target ) { / / check main ( ) is called from cancel existing request ( ) check not null ( target , " target = = null " ) ; cancel existing request ( target ) ; }


puts a new item into the < code > map map of string < code > map

public map test put map map of string item ( string key , map < string , string > map map of string item ) { this map map of string put ( key , map map of string item ) ; return this ; }


verify the bytes read value , taking into account block size

public long verify bytes read ( final i o statistics statistics , final long current , final int bytes read , final int buffer size ) { / / final position for unbuffered read , this is the expected value long final pos = current + bytes read ; long expected = final pos ; if ( buffer size > 0 ) { / / buffered count of read is number of buffers already read / / plus the current buffer , multiplied by that buffer size expected = buffer size * ( 1 + ( current / buffer size ) ) ; } verify statistic counter value ( statistics , stream read bytes , expected ) ; return final pos ; }


sets the sound that should be played for notifications posted to this channel and its audio attributes notification channels with an { @ link notification channel # get importance ( ) importance } of at least { @ link notification manager # importance default } should have a sound only modifiable before the channel is submitted to { @ link notification manager # create notification channel ( notification channel ) }

public channel config set sound ( uri sound , audio attributes audio attributes ) { if ( build version sdk int > = build version codes o ) { m notification channel set sound ( sound , audio attributes ) ; } return this ; }


confirm that get ( ) returns a list implementing random access

public void test get random access ( ) { multimap < string , integer > multimap = create ( ) ; multimap put ( " foo " , 1 ) ; multimap put ( " foo " , 3 ) ; assert true ( multimap get ( " foo " ) instanceof random access ) ; assert true ( multimap get ( " bar " ) instanceof random access ) ; }


public target state target state ( string connector ) { return connector target states get ( connector ) ; }


releases lock on this object if no more locks are acquired on it , this method will return true

boolean release ( ) { if ( ref counter < = 0 ) { return true ; } ref counter - = 1 ; return ref counter = = 0 ; }


schedules application of audio attributes

public builder set audio attributes ( audio attributes audio attributes , boolean handle audio focus ) { return apply ( new set audio attributes ( tag , audio attributes , handle audio focus ) ) ; }


gets the { @ link @ info } for the given opcode value

public static info get ( int opcode ) { int idx = opcode - opcodes min value ; try { info result = info [ idx ] ; if ( result ! = null ) { return result ; } } catch ( array index out of bounds exception ex ) { / / fall through } throw new illegal argument exception ( " bogus opcode : " + hex u 2or 4 ( opcode ) ) ; }


only perform this delete request if the document was last modification was assigned the given sequence number must be used in combination with { @ link # set if primary term ( long ) } if the document last modification was assigned a different sequence number a { @ link org elasticsearch index engine version conflict engine exception } will be thrown

public delete request builder set if seq no ( long seq no ) { request set if seq no ( seq no ) ; return this ; }


requests ads , if they have not already been requested must be called on the main thread ads will be requested automatically when the player is prepared if this method has not been called , so it is only necessary to call this method if you want to request ads before preparing the player

public void request ads ( data spec ad tag data spec , @ nullable view group ad view group ) { if ( has ad playback state | | ads manager ! = null | | pending ad request context ! = null ) { / / ads have already been requested return ; } if ( empty ad tag data spec equals ( ad tag data spec ) ) { / / handle deprecated ways of specifying the ad tag if ( ad tag uri ! = null ) { ad tag data spec = new data spec ( ad tag uri ) ; } else if ( ads response ! = null ) { ad tag data spec = new data spec ( util get data uri for string ( / * mime type = * / " text / xml " , / * data = * / ads response ) ) ; } else { throw new illegal state exception ( ) ; } } ads request request ; try { request = ima util get ads request for ad tag data spec ( ima factory , ad tag data spec ) ; } catch ( i o exception e ) { has ad playback state = true ; update ad playback state ( ) ; pending ad load error = ad load exception create for all ads ( e ) ; maybe notify pending ad load error ( ) ; return ; } this ad tag data spec = ad tag data spec ; pending ad request context = new object ( ) ; request set user request context ( pending ad request context ) ; if ( configuration vast load timeout ms ! = timeout unset ) { request set vast load timeout ( configuration vast load timeout ms ) ; } request set content progress provider ( component listener ) ; if ( ad view group ! = null ) { ad display container = ima factory create ad display container ( ad view group , / * player = * / component listener ) ; } else { ad display container = ima factory create audio ad display container ( context , / * player = * / component listener ) ; } if ( configuration companion ad slots ! = null ) { ad display container set companion slots ( configuration companion ad slots ) ; } ads loader = ima factory create ads loader ( context , ima sdk settings , ad display container ) ; ads loader add ad error listener ( component listener ) ; if ( configuration application ad error listener ! = null ) { ads loader add ad error listener ( configuration application ad error listener ) ; } ads loader add ads loaded listener ( component listener ) ; ads loader request ads ( request ) ; }


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

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


public cell < t > space top ( float space top ) { if ( space top < 0 ) throw new illegal argument exception ( " space top cannot be < 0 : " + space top ) ; this space top = fixed value of ( space top ) ; return this ; }


this method handles the following conditions : if retry is not to be processed , return null if there is no cache entry , add a new entry { @ code new entry } and return it if there is an existing entry , wait for its completion if the completion state is { @ link cache entry # failed } , the expectation is that the thread that waited for completion , retries the request the { @ link cache entry } state is set to { @ link cache entry # inprogress } again if the completion state is { @ link cache entry # success } , the entry is returned so that the thread that waits for it can can return previous response

private cache entry wait for completion ( cache entry new entry ) { cache entry map entry = null ; lock lock ( ) ; try { map entry = set get ( new entry ) ; / / if an entry in the cache does not exist , add a new one if ( map entry = = null ) { if ( log is trace enabled ( ) ) { log trace ( " adding rpc request client id " + new entry client id msb + new entry client id lsb + " call id " + new entry call id + " to retry cache " ) ; } set put ( new entry ) ; retry cache metrics incr cache updated ( ) ; return new entry ; } else { retry cache metrics incr cache hit ( ) ; } } finally { lock unlock ( ) ; } / / entry already exists in cache wait for completion and return its state preconditions check not null ( map entry , " entry from the cache should not be null " ) ; / / wait for in progress request to complete synchronized ( map entry ) { while ( map entry state = = cache entry inprogress ) { try { map entry wait ( ) ; } catch ( interrupted exception ie ) { / / restore the interrupted status thread current thread ( ) interrupt ( ) ; } } / / previous request has failed , the expectation is that it will be / / retried again if ( map entry state ! = cache entry success ) { map entry state = cache entry inprogress ; } } return map entry ; }


get the float array contained with this field

public float [ ] get float array ( ) { if ( float array ! = data [ data type offset ] ) { throw new illegal field access exception ( ) ; } if ( data [ data offset ] < 0 ) { return null ; } float [ ] values = new float [ ( data length - 2 ) / 4 ] ; binary data buffer buffer = new binary data buffer ( data ) ; int offset = data offset + 1 ; for ( int i = 0 ; i < values length ; i + + ) { values [ i ] = float int bits to float ( buffer get int ( offset ) ) ; offset + = 4 ; } return values ; }


public static void main ( string [ ] args ) { var user = new user ( " user " , 24 , sex female , " foobar com " ) ; logger info ( validator of ( user ) validate ( user : : get name , objects : : non null , " name is null " ) validate ( user : : get name , name - > ! name is empty ( ) , " name is empty " ) validate ( user : : get email , email - > ! email contains ( " @ " ) , " email doesn ' t contains ' @ ' " ) validate ( user : : get age , age - > age > 20 & & age < 30 , " age isn ' t between " ) get ( ) to string ( ) ) ; }


gets the address of the rtti 3 structure that is pointed to by this rtti 4

public address get rtti 3 address ( ) throws invalid data type exception { check validity ( ) ; address rtti 3 comp address = get address ( ) add ( rtti 3 ptr offset ) ; return get referenced address ( get program ( ) , rtti 3 comp address ) ; }


builds the { @ link handler strategies }


test serialization of the checkpoint barrier the checkpoint barrier does not support its own serialization , in order to be immutable

public void test serialization ( ) throws exception { long id = integer max value + 123123l ; long timestamp = integer max value + 1228l ; checkpoint options options = checkpoint options for checkpoint with default location ( ) ; checkpoint barrier barrier = new checkpoint barrier ( id , timestamp , options ) ; try { barrier write ( new data output serializer ( 1024 ) ) ; fail ( " should throw an exception " ) ; } catch ( unsupported operation exception e ) { / / expected } try { barrier read ( new data input deserializer ( new byte [ 32 ] ) ) ; fail ( " should throw an exception " ) ; } catch ( unsupported operation exception e ) { / / expected } }


return the configured reactive type registry of adapters

public reactive adapter registry get reactive adapter registry ( ) { return this reactive adapter registry ; }


public offset date time get date time ( ) { return date time ; }


selects the single process definition which has a start message event with the message name

process definition query message event subscription name ( string message name ) ; / / ordering / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /


returns all requests captured so far this method does clear the captured requests list if you do not want the captured requests list cleared , use { @ link # captured requests ( ) }

public captured request [ ] get captured requests and clear ( ) { list < captured request > requests = new array list < > ( captured requests size ( ) ) ; captured requests drain to ( requests ) ; return requests to array ( new captured request [ 0 ] ) ; }


returns the current program location of the cursor

public program location get program location ( ) { field location loc = field panel get cursor location ( ) ; if ( loc = = null ) { return null ; } field field = field panel get current field ( ) ; return layout model get program location ( loc , field ) ; }


asserts that data read from a { @ link data source } matches { @ code expected }

public static void assert data source content ( data source data source , data spec data spec , byte [ ] expected data , boolean expect known length ) throws i o exception { try { long length = data source open ( data spec ) ; assert that ( length ) is equal to ( expect known length ? expected data length : c length unset ) ; byte [ ] read data = util read to end ( data source ) ; assert that ( read data ) is equal to ( expected data ) ; } finally { data source close ( ) ; } }


set the additional ( undeclared ) property with the specified name and value if the property does not already exist , create it otherwise replace it

public additional properties number put additional property ( string key , big decimal value ) { if ( this additional properties = = null ) { this additional properties = new hash map < string , big decimal > ( ) ; } this additional properties put ( key , value ) ; return this ; }


return a new prepared statement creator for the given parameters

public prepared statement creator new prepared statement creator ( string sql to use , @ nullable object [ ] params ) { return new prepared statement creator impl ( sql to use , params ! = null ? arrays as list ( params ) : collections empty list ( ) ) ; }


public path get input file for write ( org apache hadoop mapreduce task i d map id , long size ) throws i o exception { return l dir alloc get local path for write ( string format ( reduce input file format string , m r job config output , map id get id ( ) ) , size , get conf ( ) ) ; }


determine if the ordering strategy is sorting on bucket key ascending

public static boolean is key asc ( bucket order order ) { return is order ( order , key asc ) ; }


void handle e o d ( encoder context context , string builder buffer ) { int unwritten = ( buffer length ( ) / 3 ) * 2 ; int rest = buffer length ( ) % 3 ; int cur codeword count = context get codeword count ( ) + unwritten ; context update symbol info ( cur codeword count ) ; int available = context get symbol info ( ) get data capacity ( ) - cur codeword count ; if ( rest = = 2 ) { buffer append ( ' \ 0 ' ) ; / / shift 1 while ( buffer length ( ) > = 3 ) { write next triplet ( context , buffer ) ; } if ( context has more characters ( ) ) { context write codeword ( high level encoder c40 unlatch ) ; } } else if ( available = = 1 & & rest = = 1 ) { while ( buffer length ( ) > = 3 ) { write next triplet ( context , buffer ) ; } if ( context has more characters ( ) ) { context write codeword ( high level encoder c40 unlatch ) ; } / / else no unlatch context pos - - ; } else if ( rest = = 0 ) { while ( buffer length ( ) > = 3 ) { write next triplet ( context , buffer ) ; } if ( available > 0 | | context has more characters ( ) ) { context write codeword ( high level encoder c40 unlatch ) ; } } else { throw new illegal state exception ( " unexpected case please report ! " ) ; } context signal encoder change ( high level encoder ascii encodation ) ; }


returns an { @ code internet domain name } that is the immediate ancestor of this one ; that is , the current domain with the leftmost part removed for example , the parent of { @ code www google com } is { @ code google com }

public internet domain name parent ( ) { check state ( has parent ( ) , " domain ' % s ' has no parent " , name ) ; return ancestor ( 1 ) ; }


return the embedded variable of the given opcode , or 0 if the opcode doesn ' t have one

private static int embedded variable ( byte opcode ) { switch ( opcode ) { case instruction constants op iload 1 : case instruction constants op lload 1 : case instruction constants op fload 1 : case instruction constants op dload 1 : case instruction constants op aload 1 : case instruction constants op istore 1 : case instruction constants op lstore 1 : case instruction constants op fstore 1 : case instruction constants op dstore 1 : case instruction constants op astore 1 : return 1 ; case instruction constants op iload 2 : case instruction constants op lload 2 : case instruction constants op fload 2 : case instruction constants op dload 2 : case instruction constants op aload 2 : case instruction constants op istore 2 : case instruction constants op lstore 2 : case instruction constants op fstore 2 : case instruction constants op dstore 2 : case instruction constants op astore 2 : return 2 ; case instruction constants op iload 3 : case instruction constants op lload 3 : case instruction constants op fload 3 : case instruction constants op dload 3 : case instruction constants op aload 3 : case instruction constants op istore 3 : case instruction constants op lstore 3 : case instruction constants op fstore 3 : case instruction constants op dstore 3 : case instruction constants op astore 3 : return 3 ; default : return 0 ; } }


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

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


reads up to { @ code length } bytes of data and stores them into { @ code buffer } , starting at index { @ code offset } this method blocks until at least one byte of data can be read , the end of the opened range is detected , or an exception is thrown

private int read internal ( byte [ ] buffer , int offset , int read length ) throws i o exception { if ( read length = = 0 ) { return 0 ; } if ( bytes to read ! = c length unset ) { long bytes remaining = bytes to read - bytes read ; if ( bytes remaining = = 0 ) { return c result end of input ; } read length = ( int ) min ( read length , bytes remaining ) ; } int read = input stream read ( buffer , offset , read length ) ; if ( read = = - 1 ) { if ( bytes to read ! = c length unset ) { / / end of stream reached having not read sufficient data throw new e o f exception ( ) ; } return c result end of input ; } bytes read + = read ; bytes transferred ( read ) ; return read ; }


check whether two arrays of types match , converting primitive types to their corresponding wrappers

private boolean match ( class < ? > [ ] declared types , class < ? > [ ] actual types ) { if ( declared types length = = actual types length ) { for ( int i = 0 ; i < actual types length ; i + + ) { if ( actual types [ i ] = = null class ) continue ; if ( wrapper ( declared types [ i ] ) is assignable from ( wrapper ( actual types [ i ] ) ) ) continue ; return false ; } return true ; } else { return false ; } }


returns whether or not the checkbox is selected

boolean get use for all ( ) { return use for all c b is selected ( ) ; }


releases the stream this method should be called when the stream is no longer required either this method or { @ link # release ( release callback ) } can be used to release this stream

public void release ( ) { release ( null ) ; }


use this server setup to test one { @ code @ controller } at a time this option loads the default configuration of { @ link org springframework web reactive config enable web flux @ enable web flux } there are builder methods to customize the java config the resulting web flux application will be tested without an http server using a mock request and response

static controller spec bind to controller ( object controllers ) { return new default controller spec ( controllers ) ; }


returns the nodes which have an incident edge in common with { @ code node } in this graph this is equal to the union of { @ link # predecessors ( object ) } and { @ link # successors ( object ) }


public void test model api response ( ) { / / todo : test model api response }


waits for the specified time ( in milliseconds ) for the thread to terminate ( using { @ link thread # join ( long ) } ) , else interrupts the thread ( in the hope that it may terminate later ) and fails

void await termination ( thread t , long timeout millis ) { try { t join ( timeout millis ) ; } catch ( interrupted exception ie ) { thread unexpected exception ( ie ) ; } finally { if ( t get state ( ) ! = thread state terminated ) { t interrupt ( ) ; fail ( " test timed out " ) ; } } }


returns a dirents structure , listing the names of all entries within the directory { @ code path } , plus their types ( file , directory , other )

protected collection < dirent > readdir ( path path , boolean follow symlinks ) throws i o exception { collection < string > children = get directory entries ( path ) ; list < dirent > dirents = lists new array list with capacity ( children size ( ) ) ; for ( string child : children ) { path child path = path get child ( child ) ; dirent type type = dirent from stat ( stat nullable ( child path , follow symlinks ) ) ; dirents add ( new dirent ( child , type ) ) ; } return dirents ; }


given an array of strings , return a comma - separated list of its elements

public static string array to string ( string [ ] strs ) { if ( strs length = = 0 ) { return " " ; } string builder sbuf = new string builder ( ) ; sbuf append ( strs [ 0 ] ) ; for ( int idx = 1 ; idx < strs length ; idx + + ) { sbuf append ( " , " ) ; sbuf append ( strs [ idx ] ) ; } return sbuf to string ( ) ; }


this implementation returns the long description can be overridden to return the short description or any kind of custom description instead

public string to string ( ) { return get long description ( ) ; }


generates a stateful factory class that will return script instances acts as a middle man between the { @ link script context # factory clazz } and the { @ link script context # instance clazz } when used so that the stateless factory can be used for caching and the stateful factory can act as a cache for new script instances uses the new instance method from a { @ link script context # stateful factory clazz } to define the factory method to create new instances of the { @ link script context # instance clazz }

private < t > type generate stateful factory ( loader loader , script context < t > context , script scope script scope ) { int class frames = class writer compute frames | class writer compute maxs ; int class access = opcodes acc public | opcodes acc super | opcodes acc final ; string interface base = type get type ( context stateful factory clazz ) get internal name ( ) ; string class name = interface base + " $ stateful factory " ; string [ ] class interfaces = new string [ ] { interface base } ; class writer writer = new class writer ( class frames ) ; writer visit ( writer constants class version , class access , class name , null , object type get internal name ( ) , class interfaces ) ; method new factory = null ; for ( method method : context factory clazz get methods ( ) ) { if ( " new factory " equals ( method get name ( ) ) ) { new factory = method ; break ; } } for ( int count = 0 ; count < new factory get parameter types ( ) length ; + + count ) { writer visit field ( opcodes acc private | opcodes acc final , " $ arg " + count , type get type ( new factory get parameter types ( ) [ count ] ) get descriptor ( ) , null , null ) visit end ( ) ; } org objectweb asm commons method base = new org objectweb asm commons method ( " < init > " , method type method type ( void class ) to method descriptor string ( ) ) ; org objectweb asm commons method init = new org objectweb asm commons method ( " < init > " , method type method type ( void class , new factory get parameter types ( ) ) to method descriptor string ( ) ) ; generator adapter constructor = new generator adapter ( opcodes asm5 , init , writer visit method ( opcodes acc public , init get name ( ) , init get descriptor ( ) , null , null ) ) ; constructor visit code ( ) ; constructor load this ( ) ; constructor invoke constructor ( object type , base ) ; for ( int count = 0 ; count < new factory get parameter types ( ) length ; + + count ) { constructor load this ( ) ; constructor load arg ( count ) ; constructor put field ( type get type ( " l " + class name + " ; " ) , " $ arg " + count , type get type ( new factory get parameter types ( ) [ count ] ) ) ; } constructor return value ( ) ; constructor end method ( ) ; method new instance = null ; for ( method method : context stateful factory clazz get methods ( ) ) { if ( " new instance " equals ( method get name ( ) ) ) { new instance = method ; break ; } } org objectweb asm commons method instance = new org objectweb asm commons method ( new instance get name ( ) , method type method type ( new instance get return type ( ) , new instance get parameter types ( ) ) to method descriptor string ( ) ) ; list < class < ? > > parameters = new array list < > ( arrays as list ( new factory get parameter types ( ) ) ) ; parameters add all ( arrays as list ( new instance get parameter types ( ) ) ) ; org objectweb asm commons method constru = new org objectweb asm commons method ( " < init > " , method type method type ( void class , parameters to array ( new class < ? > [ ] { } ) ) to method descriptor string ( ) ) ; generator adapter adapter = new generator adapter ( opcodes asm5 , instance , writer visit method ( opcodes acc public | opcodes acc final , instance get name ( ) , instance get descriptor ( ) , null , null ) ) ; adapter visit code ( ) ; adapter new instance ( writer constants class type ) ; adapter dup ( ) ; for ( int count = 0 ; count < new factory get parameter types ( ) length ; + + count ) { adapter load this ( ) ; adapter get field ( type get type ( " l " + class name + " ; " ) , " $ arg " + count , type get type ( new factory get parameter types ( ) [ count ] ) ) ; } adapter load args ( ) ; adapter invoke constructor ( writer constants class type , constru ) ; adapter return value ( ) ; adapter end method ( ) ; write needs methods ( context stateful factory clazz , writer , script scope get used variables ( ) ) ; writer visit end ( ) ; loader define factory ( class name replace ( ' / ' , ' ' ) , writer to byte array ( ) ) ; return type get type ( " l " + class name + " ; " ) ; }


public static string [ ] get set owner command ( string owner ) { return ( windows ) ? new string [ ] { get win utils path ( ) , " chown " , " \ " " + owner + " \ " " } : new string [ ] { " chown " , owner } ; }


returns true if this rule class is a starlark - defined rule class

public boolean is starlark ( ) { return is starlark ; }


groups by vertex and computes a group reduce transformation over the neighbors ( both edges and vertices ) of each vertex the neighbors function applied on the neighbors only has access to both the vertex id and the vertex value of the grouping vertex for each vertex , the neighbors function can iterate over all neighbors of this vertex with the specified direction , and emit any number of output elements , including none

public < t > data set < t > group reduce on neighbors ( neighbors function with vertex value < k , vv , ev , t > neighbors function , edge direction direction ) throws illegal argument exception { switch ( direction ) { case in : / / create < edge - source vertex > pairs data set < tuple 2 < edge < k , ev > , vertex < k , vv > > > edges with sources = edges join ( this vertices ) where ( 0 ) equal to ( 0 ) name ( " edge with source vertex " ) ; return vertices co group ( edges with sources ) where ( 0 ) equal to ( " f 0 f 1 " ) with ( new apply neighbor co group function < > ( neighbors function ) ) name ( " neighbors function " ) ; case out : / / create < edge - target vertex > pairs data set < tuple 2 < edge < k , ev > , vertex < k , vv > > > edges with targets = edges join ( this vertices ) where ( 1 ) equal to ( 0 ) name ( " edge with target vertex " ) ; return vertices co group ( edges with targets ) where ( 0 ) equal to ( " f 0 f 0 " ) with ( new apply neighbor co group function < > ( neighbors function ) ) name ( " neighbors function " ) ; case all : / / create < edge - source or target vertex > pairs data set < tuple 3 < k , edge < k , ev > , vertex < k , vv > > > edges with neighbors = edges flat map ( new emit one edge with neighbor per node < > ( ) ) name ( " forward and reverse edges " ) join ( this vertices ) where ( 1 ) equal to ( 0 ) with ( new project edge with neighbor < > ( ) ) name ( " edge with vertex " ) ; return vertices co group ( edges with neighbors ) where ( 0 ) equal to ( 0 ) with ( new apply co group function on all neighbors < > ( neighbors function ) ) name ( " neighbors function " ) ; default : throw new illegal argument exception ( " illegal edge direction " ) ; } }


tests that the elasticsearch sink fails eagerly if the provided list of addresses is empty

public void run empty addresses test ( ) { try { create elasticsearch sink ( 1 , get cluster name ( ) , collections empty list ( ) , source sink data test kit get json sink function ( " test " ) ) ; } catch ( illegal argument exception expected exception ) { / / test passes return ; } fail ( ) ; }


creates an { @ code authentication result } that indicates that the realm attempted to handle the authentication request but was unsuccessful the reason for the failure is given in the supplied message and optional exception the { @ link # get status ( ) status } is set to { @ link status # continue } the { @ link # get user ( ) user } is not populated

public static authentication result unsuccessful ( string message , @ nullable exception cause ) { objects require non null ( message ) ; return new authentication result ( status continue , null , message , cause , null ) ; }


depending on whether the user said " yes " or " no " , send him to the right place

public http response do act ( stapler request req , stapler response rsp ) throws i o exception { if ( req has parameter ( " no " ) ) { disable ( true ) ; return http responses redirect via context path ( " / manage " ) ; } else { return new http redirect ( " manage " ) ; } }


returns the status line ' s http minor version this returns 0 for http1 0 and 1 for http1 1 this returns 1 if the http version is unknown

public int get http minor version ( ) { return http minor version ! = - 1 ? http minor version : 1 ; }


get maximum allowed resource share for queue

public resource get max share ( ) { if ( custom resources ! = null ) { return resource new instance ( max share m b value ( ) , ( int ) max share v cores value ( ) , custom resources get max share values ( ) ) ; } return resource new instance ( max share m b value ( ) , ( int ) max share v cores value ( ) ) ; }


append the specified indentation to a builder

private void append ( string builder builder , int indent , char c ) { for ( int i = 0 ; i < indent ; i + + ) { builder append ( c ) ; } }


for zookeeper - 1046 test if cversion is getting incremented correctly

public void test increment cversion ( ) throws exception { try { / / digest calculator gets initialized for the new data tree constructor based on the system property zoo keeper server set digest enabled ( true ) ; data tree dt = new data tree ( ) ; dt create node ( " / test " , new byte [ 0 ] , null , 0 , dt get node ( " / " ) stat get cversion ( ) + 1 , 1 , 1 ) ; data node zk = dt get node ( " / test " ) ; int prev cversion = zk stat get cversion ( ) ; long prev pzxid = zk stat get pzxid ( ) ; long digest before = dt get tree digest ( ) ; dt set cversion pzxid ( " / test / " , prev cversion + 1 , prev pzxid + 1 ) ; int new cversion = zk stat get cversion ( ) ; long new pzxid = zk stat get pzxid ( ) ; assert true ( ( new cversion = = prev cversion + 1 & & new pzxid = = prev pzxid + 1 ) , " < cversion , pzxid > verification failed expected : < " + ( prev cversion + 1 ) + " , " + ( prev pzxid + 1 ) + " > , found : < " + new cversion + " , " + new pzxid + " > " ) ; assert not equals ( digest before , dt get tree digest ( ) ) ; } finally { zoo keeper server set digest enabled ( false ) ; } }


public void check update ( boolc done ) { core net http get ( " https : / / api github com / repos / anuken / mindustry builds / releases / latest " , res - > { if ( res get status ( ) = = http status ok ) { jval val = jval read ( res get result as string ( ) ) ; int new build = strings parse int ( val get string ( " tag name " , " 0 " ) ) ; if ( new build > version build ) { jval asset = val get ( " assets " ) as array ( ) find ( v - > v get string ( " name " , " " ) starts with ( headless ? " mindustry - be - server " : " mindustry - be - desktop " ) ) ; string url = asset get string ( " browser download url " , " " ) ; update available = true ; update build = new build ; update url = url ; core app post ( ( ) - > { show update dialog ( ) ; done get ( true ) ; } ) ; } else { core app post ( ( ) - > done get ( false ) ) ; } } else { core app post ( ( ) - > done get ( false ) ) ; } } , error - > { } ) ; / / ignore errors }


determines the addresses within the two programs where bytes differ if a byte difference is found , the entire code unit is added to the address set this also indicates addresses in program 1 that are not in program 2 as well as program 2 addresses that are compatible with program 1 but not in program 1 memory

private address set get byte differences ( address set view addrs , task monitor monitor ) throws cancelled exception { address set differences = new address set ( ) ; differences add ( get non common address set ( addrs ) ) ; differences add ( get initialization differs address set ( addrs ) ) ; / / check each address range from the address set for differences address set in common = get addresses in common ( ) ; if ( addrs ! = null ) { in common = in common intersect ( addrs ) ; } monitor initialize ( in common get num addresses ( ) ) ; address range iterator iter = in common get address ranges ( ) ; while ( iter has next ( ) ) { address range range = iter next ( ) ; try { compare bytes ( range , differences , monitor ) ; } catch ( memory access exception e ) { / / do nothing shouldn ' t happen both should have bytes } check cancelled ( monitor ) ; } check cancelled ( monitor ) ; return differences ; }


returns the value of the first manifest attribute found in the provided jar file

private static optional < string > find first manifest attribute ( file jar file , string attributes ) throws i o exception { if ( attributes length = = 0 ) { return optional empty ( ) ; } try ( jar file f = new jar file ( jar file ) ) { return find first manifest attribute ( f , attributes ) ; } }


write a series of bytes from the buffer , from the offset returns the number of bytes written only valid in the state { @ code writing } base class verifies the state but does no writing

int write ( final byte [ ] buffer , final int offset , final int length ) throws i o exception { verify state ( dest state writing ) ; preconditions check argument ( buffer ! = null , " null buffer " ) ; preconditions check argument ( length > = 0 , " length is negative " ) ; preconditions check argument ( offset > = 0 , " offset is negative " ) ; preconditions check argument ( ! ( buffer length - offset < length ) , " buffer shorter than amount of data to write " ) ; return 0 ; }


public default response creator headers ( http headers headers ) { this headers put all ( headers ) ; return this ; }


releases the drawing bitmap this should be called when { @ link line chart # on detached from window ( ) }

public void release bitmap ( ) { if ( m bitmap canvas ! = null ) { m bitmap canvas set bitmap ( null ) ; m bitmap canvas = null ; } if ( m draw bitmap ! = null ) { bitmap draw bitmap = m draw bitmap get ( ) ; if ( draw bitmap ! = null ) { draw bitmap recycle ( ) ; } m draw bitmap clear ( ) ; m draw bitmap = null ; } }


perform the http request and return a { @ link client response } with the response status and headers you can then use methods of the response to consume the body : mono & lt ; person & gt ; mono = client get ( ) uri ( " persons 1 " ) accept ( media type application json ) exchange ( ) flat map ( response - & gt ; response body to mono ( person class ) ) ; flux & lt ; person & gt ; flux = client get ( ) uri ( " persons " ) accept ( media type application stream json ) exchange ( ) flat map many ( response - & gt ; response body to flux ( person class ) ) ; note : unlike { @ link # retrieve ( ) } , when using { @ code exchange ( ) } , it is the responsibility of the application to consume any response content regardless of the scenario ( success , error , unexpected data , etc ) not doing so can cause a memory leak see { @ link client response } for a list of all the available options for consuming the body generally prefer using { @ link # retrieve ( ) } unless you have a good reason to use { @ code exchange ( ) } which does allow to check the response status and headers before deciding how or if to consume the response


returns the topic names for any optimized source changelogs

public set < string > source topic changelogs ( ) { return source topics stream ( ) filter ( state changelog topics : : contains key ) collect ( collectors to set ( ) ) ; }


handles a state change on a subchannel the initial state of a subchannel is idle you won ' t get a notification for the initial idle state if the new state is not shutdown , this method should create a new picker and call { @ link helper # update balancing state helper update balancing state ( ) } failing to do so may result in unnecessary delays of r p cs please refer to { @ link pick result # with subchannel pick result with subchannel ( ) } ' s javadoc for more information shutdown can only happen in two cases one is that load balancer called { @ link subchannel # shutdown } earlier , thus it should have already discarded this subchannel the other is that channel is doing a { @ link managed channel # shutdown now forced shutdown } or has already terminated , thus there won ' t be further requests to load balancer therefore , the load balancer usually don ' t need to react to a shutdown state

void on subchannel state ( connectivity state info new state ) ;


runs the registered health checks in parallel and returns a map of the results

public sorted map < string , health check result > run health checks ( executor service executor ) { return run health checks ( executor , health check filter all ) ; }


migrate only the state value , that is the " value " that is stored in rocks d b we don ' t migrate the key here , which is made up of key group , key , namespace and map key ( in case of map state )

private < n , s extends state , sv > void migrate state values ( state descriptor < s , sv > state desc , tuple 2 < column family handle , registered key value state backend meta info < n , sv > > state meta info ) throws exception { if ( state desc get type ( ) = = state descriptor type map ) { type serializer snapshot < sv > previous serializer snapshot = state meta info f 1 get previous state serializer snapshot ( ) ; check state ( previous serializer snapshot ! = null , " the previous serializer snapshot should exist " ) ; check state ( previous serializer snapshot instanceof map serializer snapshot , " previous serializer snapshot should be a map serializer snapshot " ) ; type serializer < sv > new serializer = state meta info f 1 get state serializer ( ) ; check state ( new serializer instanceof map serializer , " new serializer should be a map serializer " ) ; map serializer < ? , ? > map serializer = ( map serializer < ? , ? > ) new serializer ; map serializer snapshot < ? , ? > map serializer snapshot = ( map serializer snapshot < ? , ? > ) previous serializer snapshot ; if ( ! check map state key schema compatibility ( map serializer snapshot , map serializer ) ) { throw new state migration exception ( " the new serializer for a map state requires state migration in order for the job to proceed , since the key schema has changed however , migration for map state currently only allows value schema evolutions " ) ; } } log info ( " performing state migration for state { } because the state serializer ' s schema , i e serialization format , has changed " , state desc ) ; / / we need to get an actual state instance because migration is different / / for different state types for example , list state needs to deal with / / individual elements state factory state factory = state factories get ( state desc get class ( ) ) ; if ( state factory = = null ) { string message = string format ( " state % s is not supported by % s " , state desc get class ( ) , this get class ( ) ) ; throw new flink runtime exception ( message ) ; } state state = state factory create state ( state desc , state meta info , rocks d b keyed state backend this ) ; if ( ! ( state instanceof abstract rocks d b state ) ) { throw new flink runtime exception ( " state should be an abstract rocks d b state but is " + state ) ; } @ suppress warnings ( " unchecked " ) abstract rocks d b state < ? , ? , sv > rocks d b state = ( abstract rocks d b state < ? , ? , sv > ) state ; snapshot rocks d b snapshot = db get snapshot ( ) ; try ( rocks iterator wrapper iterator = rocks d b operation utils get rocks iterator ( db , state meta info f 0 , read options ) ; rocks d b write batch wrapper batch writer = new rocks d b write batch wrapper ( db , get write options ( ) , get write batch size ( ) ) ) { iterator seek to first ( ) ; data input deserializer serialized value input = new data input deserializer ( ) ; data output serializer migrated serialized value output = new data output serializer ( 512 ) ; while ( iterator is valid ( ) ) { serialized value input set buffer ( iterator value ( ) ) ; rocks d b state migrate serialized value ( serialized value input , migrated serialized value output , state meta info f 1 get previous state serializer ( ) , state meta info f 1 get state serializer ( ) ) ; batch writer put ( state meta info f 0 , iterator key ( ) , migrated serialized value output get copy of buffer ( ) ) ; migrated serialized value output clear ( ) ; iterator next ( ) ; } } finally { db release snapshot ( rocks d b snapshot ) ; rocks d b snapshot close ( ) ; } }


returns the rotation the returned quaternion should under no circumstances be modified

public quaternion get rotation ( ) { return rotation ; }


perform the open operation returns a future which , when get ( ) or a chained completion operation is invoked , will supply the input stream of the file referenced by the pathpath handle

public completable future < f s data input stream > build ( ) throws i o exception { optional < path > optional path = get optional path ( ) ; open file parameters parameters = new open file parameters ( ) with mandatory keys ( get mandatory keys ( ) ) with options ( get options ( ) ) with buffer size ( get buffer size ( ) ) with status ( super get status ( ) ) ; / / explicit to avoid ide warnings if ( optional path is present ( ) ) { return get f s ( ) open file with options ( optional path get ( ) , parameters ) ; } else { return get f s ( ) open file with options ( get path handle ( ) , parameters ) ; } }


evaluate the json path expression against the response content and assert that the result is a { @ link boolean }

public result matcher is boolean ( ) { return result - > this json path helper assert value is boolean ( get content ( result ) ) ; }


continue execution and block until either a breakpoint hits or error occurs

private void continue execution ( task monitor monitor ) throws cancelled exception { emulator set halt ( false ) ; do { execute instruction ( true , monitor ) ; } while ( ! emulator get halt ( ) ) ; }


public string get ssl proxy ( ) { return ssl proxy ; }


set the value for the specified thread local map the specified thread local map must be for the current thread

public final void set ( internal thread local map thread local map , v value ) { if ( value ! = internal thread local map unset ) { set known not unset ( thread local map , value ) ; } else { remove ( thread local map ) ; } }