return a { @ link resolvable type } for the specified { @ link method parameter } at a specific nesting level , overriding the target type to resolve with a specific given type

static resolvable type for method parameter ( method parameter method parameter , @ nullable type target type , int nesting level ) { resolvable type owner = for type ( method parameter get containing class ( ) ) as ( method parameter get declaring class ( ) ) ; return for type ( target type , new method parameter type provider ( method parameter ) , owner as variable resolver ( ) ) get nested ( nesting level , method parameter type indexes per level ) ; }


to test class name in snake case to test class name in snake case

public client test classname ( client body ) throws api exception { api response < client > local var resp = test classname with http info ( body ) ; return local var resp get data ( ) ; }


returns the instruction defined after the specified address or null if no instruction exists the instruction that is returned does not have to be contiguous

public final instruction get instruction after ( address address ) { return current program get listing ( ) get instruction after ( address ) ; }


creates a new async stub that supports all call types for the service

public static metrics service stub new stub ( io grpc channel channel ) { io grpc stub abstract stub stub factory < metrics service stub > factory = new io grpc stub abstract stub stub factory < metrics service stub > ( ) { @ java lang override public metrics service stub new stub ( io grpc channel channel , io grpc call options call options ) { return new metrics service stub ( channel , call options ) ; } } ; return metrics service stub new stub ( factory , channel ) ; }


public object get anytype 2 ( ) { return anytype 2 ; }


returns the timestamp when the result was created as a formatted string

public string get timestamp ( ) { instant current instant = instant of epoch milli ( time ) ; zoned date time zoned date time = zoned date time of instant ( current instant , zone id system default ( ) ) ; return date format pattern format ( zoned date time ) ; }


called when actors are added to or removed from the group


return the custom { @ link scope metadata resolver } for use with { @ link annotated bean definition reader } andor { @ link class path bean definition scanner } , if any

protected scope metadata resolver get scope metadata resolver ( ) { return this scope metadata resolver ; }


public list < ? extends probable threat > threats ( ) { return threats ; }


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


returns a descriptive log string for the given { @ code status code } , or " unknown " if not one of { @ link cast status codes }

public static string get log string ( int status code ) { switch ( status code ) { case cast status codes application not found : return " a requested application could not be found " ; case cast status codes application not running : return " a requested application is not currently running " ; case cast status codes authentication failed : return " authentication failure " ; case cast status codes canceled : return " an in - progress request has been canceled , most likely because another action has " + " preempted it " ; case cast status codes error service creation failed : return " the cast remote display service could not be created " ; case cast status codes error service disconnected : return " the cast remote display service was disconnected " ; case cast status codes failed : return " the in - progress request failed " ; case cast status codes internal error : return " an internal error has occurred " ; case cast status codes interrupted : return " a blocking call was interrupted while waiting and did not run to completion " ; case cast status codes invalid request : return " an invalid request was made " ; case cast status codes message send buffer too full : return " a message could not be sent because there is not enough room in the send buffer at " + " this time " ; case cast status codes message too large : return " a message could not be sent because it is too large " ; case cast status codes network error : return " network i / o error " ; case cast status codes not allowed : return " the request was disallowed and could not be completed " ; case cast status codes replaced : return " the request ' s progress is no longer being tracked because another request of the " + " same type has been made before the first request completed " ; case cast status codes success : return " success " ; case cast status codes timeout : return " an operation has timed out " ; case cast status codes unknown error : return " an unknown , unexpected error has occurred " ; default : return cast status codes get status code string ( status code ) ; } }


quickselects the top k elements from the 2k elements in the buffer o ( k ) expected time , o ( k log k ) worst case

private void trim ( ) { int left = 0 ; int right = 2 * k - 1 ; int min threshold position = 0 ; / / the leftmost position at which the greatest of the k lower elements / / - - the new value of threshold - - might be found int iterations = 0 ; int max iterations = int math log 2 ( right - left , rounding mode ceiling ) * 3 ; while ( left < right ) { int pivot index = ( left + right + 1 ) > > > 1 ; int pivot new index = partition ( left , right , pivot index ) ; if ( pivot new index > k ) { right = pivot new index - 1 ; } else if ( pivot new index < k ) { left = math max ( pivot new index , left + 1 ) ; min threshold position = pivot new index ; } else { break ; } iterations + + ; if ( iterations > = max iterations ) { / / we ' ve already taken o ( k log k ) , let ' s make sure we don ' t take longer than o ( k log k ) arrays sort ( buffer , left , right , comparator ) ; break ; } } buffer size = k ; threshold = buffer [ min threshold position ] ; for ( int i = min threshold position + 1 ; i < k ; i + + ) { if ( comparator compare ( buffer [ i ] , threshold ) > 0 ) { threshold = buffer [ i ] ; } } }


public priority get request priority ( ) { return m request priority ; }


@ t c description : ， 。 @ test step : @ expect result :

public void publish beta config no beta ips beta ( ) throws exception { http headers headers = new http headers ( ) ; / / response entity < string > response = request ( config controller path + " / configs " , headers , params new params ( ) append param ( " data id " , data id ) append param ( " group " , group ) append param ( " tenant " , tenant ) append param ( " content " , content ) append param ( " config tags " , " " ) append param ( " app name " , app name ) done ( ) , string class , http method post ) ; system out println ( " publish beta config no beta ips beta post : " + response ) ; assert assert true ( response get status code ( ) is 2xx successful ( ) ) ; assert assert equals ( " true " , response get body ( ) ) ; response entity < string > response 1 = request ( config controller path + " / configs ? beta = true " , params new params ( ) append param ( " data id " , data id ) append param ( " group " , group ) append param ( " tenant " , tenant ) done ( ) , string class , http method get ) ; system out println ( " publish beta config no beta ips beta get : " + response ) ; assert assert true ( response 1 get status code ( ) is 2xx successful ( ) ) ; assert assert true ( jackson utils to obj ( response 1 get body ( ) ) get ( " data " ) is null ( ) ) ; }


updates the default references for a new or updated instruction

private void add references for instruction ( instruction d b inst ) { list < reference > old ref list = null ; if ( redisassembly mode ) { for ( reference ref : ref manager get references from ( inst get min address ( ) ) ) { if ( ref get source ( ) ! = source type default | | ! ref is memory reference ( ) ) { continue ; } if ( old ref list = = null ) { old ref list = new array list < > ( ) ; } old ref list add ( ref ) ; } } instruction prototype prototype = inst get prototype ( ) ; address [ ] flow addrs = prototype get flows ( inst ) ; int remaining addrs = flow addrs length ; int op count = prototype get num operands ( ) ; for ( int op index = 0 ; op index < op count ; op index + + ) { / / don ' t go through the instruction , go to the prototype , / / we only want the addresses reported by the prototype , / / not any addresses that are added by the user int ref cnt = 0 ; reference operand primary ref = null ; / / first look through the pieces of the operand to find the addresses array list < object > op list = prototype get op representation list ( op index , inst ) ; for ( object obj : op list ) { if ( obj instanceof address ) { address ref addr = ( address ) obj ; + + ref cnt ; ref type ref type = get operand memory reference type ( inst , op index , flow addrs , ref addr ) ; if ( ref type ! = null ) { operand primary ref = add default memory reference if missing ( inst , op index , ref addr , ref type , old ref list , operand primary ref ) ; - - remaining addrs ; } } } / / if there are still more addresses on this operand , see if the whole operand has any if ( ref cnt = = 0 & & remaining addrs > 0 ) { address ref addr = prototype get address ( op index , inst ) ; if ( ref addr ! = null ) { ref type ref type = get operand memory reference type ( inst , op index , flow addrs , ref addr ) ; if ( ref type ! = null ) { operand primary ref = add default memory reference if missing ( inst , op index , ref addr , ref type , old ref list , operand primary ref ) ; - - remaining addrs ; } } } if ( operand primary ref ! = null & & ! operand primary ref is primary ( ) ) { / / ensure that we have a primary ref on the operand if one exists ref manager set primary ( operand primary ref , true ) ; } } reference mnemonic primary ref = null ; for ( address flow addr : flow addrs ) { if ( flow addr ! = null & & flow addr is memory address ( ) ) { flow type flow type = ref type factory get default flow type ( inst , flow addr , false ) ; if ( flow type = = null ) { flow type = ref type invalid ; } boolean is fallthrough = ( flow type is jump ( ) & & flow addr equals ( inst get max address ( ) next ( ) ) ) ; if ( ! is fallthrough ) { mnemonic primary ref = add default memory reference if missing ( inst , reference mnemonic , flow addr , flow type , old ref list , mnemonic primary ref ) ; } } } if ( mnemonic primary ref ! = null & & ! mnemonic primary ref is primary ( ) ) { / / ensure that we have a primary ref on the mnemonic if one exists ref manager set primary ( mnemonic primary ref , true ) ; } if ( old ref list ! = null & & ! old ref list is empty ( ) ) { for ( reference ref : old ref list ) { ref manager delete ( ref ) ; } } }


public void test block location setters ( ) throws exception { block location loc ; loc = new block location ( ) ; / / test that null sets the empty array loc set hosts ( null ) ; loc set cached hosts ( null ) ; loc set names ( null ) ; loc set topology paths ( null ) ; check block location ( loc ) ; / / test that not - null gets set properly string [ ] names = new string [ ] { " name " } ; string [ ] hosts = new string [ ] { " host " } ; string [ ] cached hosts = new string [ ] { " cached host " } ; string [ ] topology paths = new string [ ] { " path " } ; string [ ] storage ids = new string [ ] { " storage id " } ; storage type [ ] storage types = new storage type [ ] { storage type disk } ; loc set names ( names ) ; loc set hosts ( hosts ) ; loc set cached hosts ( cached hosts ) ; loc set topology paths ( topology paths ) ; loc set storage ids ( storage ids ) ; loc set storage types ( storage types ) ; loc set offset ( 1 ) ; loc set length ( 2 ) ; loc set corrupt ( true ) ; check block location ( loc , names , hosts , cached hosts , topology paths , storage ids , storage types , 1 , 2 , true ) ; }


creates a { @ code listenable future } which has its value set immediately upon construction the getters just return the value this { @ code future } can ' t be canceled or timed out and its { @ code is done ( ) } method always returns { @ code true }

public static < v > listenable future < v > immediate future ( @ nullable v value ) { if ( value = = null ) { / / this cast is safe because null is assignable to v for all v ( i e it is bivariant ) @ suppress warnings ( " unchecked " ) listenable future < v > typed null = ( listenable future < v > ) immediate future null ; return typed null ; } return new immediate future < > ( value ) ; }


we have two different implementation strategy that can be executed in according if we have a connector action definition match or not

public void execute ( delegate execution execution ) { connector connector = get connector ( get implementation ( execution ) ) ; integration context integration context = connector apply ( integration context builder from ( execution ) ) ; execution set variables local ( integration context get out bound variables ( ) ) ; leave ( execution ) ; }


sets additional data this entry should represent

public void set data ( object data ) { this m data = data ; }


creates a bitmap from the specified subset of the source bitmap it is initialized with the same density as the original bitmap

public closeable reference < bitmap > create bitmap ( bitmap source , int x , int y , int width , int height ) { return create bitmap ( source , x , y , width , height , null ) ; }


mark functions as requiring any search result to also match one of its childparents

public list < function record > mark records force relation ( list < function record > func list , boolean value ) throws i o exception { array list < function record > res = new array list < > ( ) ; for ( function record func rec : func list ) { res add ( func rec get fid db ( ) set force relation on function ( func rec , value ) ) ; } return res ; }


this method checks if the specified http authentication < code > scheme < code > value is valid

public static string check auth scheme ( string scheme ) { if ( basic equals ignore case ( scheme ) ) { return basic ; } else if ( negotiate equals ignore case ( scheme ) ) { return negotiate ; } else if ( digest equals ignore case ( scheme ) ) { return digest ; } throw new illegal argument exception ( string format ( " unsupported http authentication scheme % s " + " supported schemes are [ % s , % s , % s ] " , scheme , basic , negotiate , digest ) ) ; }


gets an array of objects that indicate the repeatable comments at the " to addresses " of the references

private ref repeat comment [ ] get repeatable comments ( listing listing , reference [ ] mem refs , boolean show all ) { set < ref repeat comment > set = new hash set < > ( ) ; for ( int i = 0 ; i < mem refs length & & total comments found < max display lines ; + + i ) { if ( ! show all & & ! mem refs [ i ] is primary ( ) ) { continue ; } address address = mem refs [ i ] get to address ( ) ; code unit cu = listing get code unit at ( address ) ; if ( cu = = null ) { continue ; } string [ ] comment = new string [ 0 ] ; function func = listing get function at ( address ) ; if ( func ! = null ) { comment = func get repeatable comment as array ( ) ; } if ( comment length = = 0 ) { comment = cu get comment as array ( code unit repeatable comment ) ; } if ( comment ! = null & & comment length > 0 ) { set add ( new ref repeat comment ( address , comment ) ) ; total comments found + + ; } } return set to array ( new ref repeat comment [ set size ( ) ] ) ; }


returns the path to the build file for this package the package ' s root directory may be computed by calling get parent file ( ) on the result of this function instances of this interface do not attempt to do any caching , nor implement checks for package - boundary crossing logic ; the package cache does that if the same package exists beneath multiple package path entries , the first path that matches always wins

public path get package build file ( package identifier package name ) throws no such package exception { path build file = get package build file nullable ( package name , unix glob default syscalls ref ) ; if ( build file = = null ) { string message = " build file not found on package path " ; throw new build file not found exception ( package name , message , detailed exit code of ( failure detail new builder ( ) set message ( message ) set package loading ( package loading new builder ( ) set code ( package loading code build file missing ) build ( ) ) build ( ) ) ) ; } return build file ; }


extract the body with the given { @ code body extractor }

< t > t body ( body extractor < t , ? super client http response > extractor ) ;


returns the { @ code rd } ( recursion desired } field of this dns message


used to record the modification of a symlink node

public i node save child 2 snapshot ( i node directory current i node , final i node child , final int latest snapshot id , final i node snapshot copy ) { preconditions check argument ( ! child is directory ( ) , " child is a directory , child = % s " , child ) ; preconditions check argument ( latest snapshot id ! = snapshot current state id ) ; final directory diff diff = diffs check and add latest snapshot diff ( latest snapshot id , current i node ) ; if ( diff get child ( child get local name bytes ( ) , false , current i node ) ! = null ) { / / it was already saved in the latest snapshot earlier return child ; } diff diff modify ( snapshot copy , child ) ; return child ; }


execute a batch using the supplied sql statement with the batch of supplied arguments

int [ ] batch update ( string sql , list < object [ ] > batch args ) throws data access exception ;


repeat a string { @ code repeat } times to form a new string string utils repeat ( null , 2 ) = null string utils repeat ( " " , 0 ) = " " string utils repeat ( " " , 2 ) = " " string utils repeat ( " a " , 3 ) = " aaa " string utils repeat ( " ab " , 2 ) = " abab " string utils repeat ( " a " , - 2 ) = " "

public static string repeat ( final string str , final int repeat ) { / / performance tuned for 2 0 ( jdk1 4 ) if ( str = = null ) { return null ; } if ( repeat < = 0 ) { return empty string ; } final int input length = str length ( ) ; if ( repeat = = 1 | | input length = = 0 ) { return str ; } if ( input length = = 1 & & repeat < = pad limit ) { return repeat ( str char at ( 0 ) , repeat ) ; } final int output length = input length * repeat ; switch ( input length ) { case 1 : return repeat ( str char at ( 0 ) , repeat ) ; case 2 : final char ch 0 = str char at ( 0 ) ; final char ch 1 = str char at ( 1 ) ; final char [ ] output 2 = new char [ output length ] ; for ( int i = repeat * 2 - 2 ; i > = 0 ; i - - , i - - ) { output 2 [ i ] = ch 0 ; output 2 [ i + 1 ] = ch 1 ; } return new string ( output 2 ) ; default : final string builder buf = new string builder ( output length ) ; for ( int i = 0 ; i < repeat ; i + + ) { buf append ( str ) ; } return buf to string ( ) ; } }


returns an ( immutable ) list of all attributes defined for this class of rule , ordered by increasing index

public list < attribute > get attributes ( ) { return attributes ; }


increment the number of messages that have been read for the current read loop

void inc messages read ( int num messages ) ;


public get datafeed response get datafeed ( get datafeed request request , request options options ) throws i o exception { return rest high level client perform request and parse entity ( request , m l request converters : : get datafeed , options , get datafeed response : : from x content , collections empty set ( ) ) ; }


get the " size " of the constant pool this corresponds to the class file field { @ code constant pool count } , and is in fact always at least one more than the actual size of the constant pool , as element { @ code 0 } is always invalid


invoke the registered jms exception listener , if any

protected void invoke exception listener ( j m s exception ex ) { exception listener exception listener = get exception listener ( ) ; if ( exception listener ! = null ) { exception listener on exception ( ex ) ; } }


turn special characters into html character references handles complete character set defined in html 4 01 recommendation escapes all special characters to their corresponding numeric reference in hex format ( & # x hex ; ) reference : < a href = " https : www w 3 org t rhtml 4sgmlentities html " > https : www w 3 org t rhtml 4sgmlentities html

public static string html escape hex ( string input ) { return html escape hex ( input , web utils default character encoding ) ; }


assert that an array contains no { @ code null } elements note : does not complain if the array is empty ! < pre class = " code " > assert no null elements ( array , " the array must contain non - null elements " ) ;

public static void no null elements ( @ nullable object [ ] array , string message ) { if ( array ! = null ) { for ( object element : array ) { if ( element = = null ) { throw new illegal argument exception ( message ) ; } } } }


an implementation of { @ link list # add all ( int , collection ) }

static < e > boolean add all impl ( list < e > list , int index , iterable < ? extends e > elements ) { boolean changed = false ; list iterator < e > list iterator = list list iterator ( index ) ; for ( e e : elements ) { list iterator add ( e ) ; changed = true ; } return changed ; }


queries whether any threads are waiting for the given guard to become satisfied note that because timeouts and interrupts may occur at any time , a { @ code true } return does not guarantee that the guard becoming satisfied in the future will awaken any threads this method is designed primarily for use in monitoring of the system state

public boolean has waiters ( guard guard ) { return get wait queue length ( guard ) > 0 ; }


indicates whether or not there are frames pending for this stream


standard post without multipart but already support on factory ( memory management )

private static list < interface http data > formpost ( bootstrap bootstrap , string host , int port , uri uri simple , file file , http data factory factory , list < entry < string , string > > headers ) throws exception { / / xxx / formpost / / start the connection attempt channel future future = bootstrap connect ( socket utils socket address ( host , port ) ) ; / / wait until the connection attempt succeeds or fails channel channel = future sync ( ) channel ( ) ; / / prepare the http request http request request = new default http request ( http version http 1 1 , http method post , uri simple to a s c i i string ( ) ) ; / / use the post body encoder http post request encoder body request encoder = new http post request encoder ( factory , request , false ) ; / / false = > not multipart / / it is legal to add directly header or cookie into the request until finalize for ( entry < string , string > entry : headers ) { request headers ( ) set ( entry get key ( ) , entry get value ( ) ) ; } / / add form attribute body request encoder add body attribute ( " getform " , " post " ) ; body request encoder add body attribute ( " info " , " first value " ) ; body request encoder add body attribute ( " secondinfo " , " secondvalue � � � & " ) ; body request encoder add body attribute ( " thirdinfo " , text area ) ; body request encoder add body attribute ( " fourthinfo " , text area long ) ; body request encoder add body file upload ( " myfile " , file , " application / x - zip - compressed " , false ) ; / / finalize request request = body request encoder finalize request ( ) ; / / create the bodylist to be reused on the last version with multipart support list < interface http data > bodylist = body request encoder get body list attributes ( ) ; / / send request channel write ( request ) ; / / test if request was chunked and if so , finish the write if ( body request encoder is chunked ( ) ) { / / could do either request is chunked ( ) / / either do it through chunked write handler channel write ( body request encoder ) ; } channel flush ( ) ; / / do not clear here since we will reuse the interface http data on the next request / / for the example ( limit action on client side ) take this as a broadcast of the same / / request on both post actions / / / / on standard program , it is clearly recommended to clean all files after each request / / body request encoder clean files ( ) ; / / wait for the server to close the connection channel close future ( ) sync ( ) ; return bodylist ; }


list the directory and create { @ code sky key } s to request contents of its children recursively the returned keys are of type { @ link sky functions # recursive filesystem traversal }

private static collection < sky key > create recursive traversal keys ( environment env , traversal request traversal ) throws missing dep exception , interrupted exception , i o exception { / / use the traversal ' s path , even if it ' s a symlink the contents of the directory , as listed / / in the result , must be relative to it iterable < dirent > dirents ; if ( traversal is root generated ) { / / if we ' re dealing with an output file , read the directory directly instead of creating / / filesystem nodes under the output tree list < dirent > dirents collection = new array list < > ( traversal root as rooted path ( ) as path ( ) readdir ( symlinks follow ) ) ; collections sort ( dirents collection ) ; dirents = dirents collection ; } else { dirents = ( ( directory listing value ) get dependent sky value ( env , directory listing value key ( traversal root as rooted path ( ) ) ) ) get dirents ( ) ; } list < sky key > result = new array list < > ( ) ; for ( dirent dirent : dirents ) { rooted path child path = rooted path to rooted path ( traversal root as rooted path ( ) get root ( ) , traversal root as rooted path ( ) get root relative path ( ) get relative ( dirent get name ( ) ) ) ; traversal request child traversal = traversal for child entry ( child path ) ; result add ( child traversal ) ; } return result ; }


tests that when restoring from a snapshot and we find a node with a shard copy but allocation deciders say no , we still allocate to that node

public void test restore forces allocate if shard available ( ) { final long shard size = random non negative long ( ) ; routing allocation allocation = get restore routing allocation ( no allocation deciders ( ) , shard size , " alloc id " ) ; test allocator add data ( node 1 , " some alloc id " , random boolean ( ) ) ; allocate all unassigned ( allocation ) ; assert that ( allocation routing nodes changed ( ) , equal to ( true ) ) ; assert that ( allocation routing nodes ( ) unassigned ( ) ignored ( ) is empty ( ) , equal to ( true ) ) ; final list < shard routing > initializing shards = allocation routing nodes ( ) shards with state ( shard routing state initializing ) ; assert that ( initializing shards size ( ) , equal to ( 1 ) ) ; assert that ( initializing shards get ( 0 ) get expected shard size ( ) , equal to ( shard size ) ) ; assert cluster health status ( allocation , cluster health status yellow ) ; }


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

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


public static command result exec cmd ( final list < string > commands ) { return exec cmd ( commands = = null ? null : commands to array ( new string [ ] { } ) , false , true ) ; }


a comma separated list of routing values to control the shards the search will be executed on

public search request builder set routing ( string routing ) { request routing ( routing ) ; return this ; }


creates the collector tree from the provided < code > collectors < code > and wraps each collector with a profiler

static internal profile collector create query collector with profiler ( list < query collector context > collectors ) throws i o exception { internal profile collector collector = null ; for ( query collector context ctx : collectors ) { collector = ctx create with profiler ( collector ) ; } return collector ; }


public void write to ( dex file file , annotated output out ) { cst type type = get defining class ( ) ; cst string descriptor = type get descriptor ( ) ; int idx = file get string ids ( ) index of ( descriptor ) ; if ( out annotates ( ) ) { out annotate ( 0 , index string ( ) + ' ' + descriptor to human ( ) ) ; out annotate ( 4 , " descriptor idx : " + hex u 4 ( idx ) ) ; } out write int ( idx ) ; }


the package id of this package , in the range [ 0x 0 0 , 0xff ] the id 0x 0 0 is reserved for shared libraries , or when the id is assigned at run - time the id 0x 0 1 is reserved for the ' android ' package ( framework ) the id range [ 0x 0 2 , 0x 7f ) is reserved for auto - assignment to shared libraries at run - time the id 0x 7f is reserved for the application package i ds & gt ; 0x 7f are reserved for the application as well and are treated as feature splits < code > optional uint 3 2 package id = 1 ; < code >

public builder set package id ( int value ) { copy on write ( ) ; instance set package id ( value ) ; return this ; }


removes activity listener from the activity

void remove activity listener ( activity listener listener ) ;


for this test , the body for this request much reference a schema named & # x 6 0 ; file & # x 6 0 ;

public void test body with file schema test ( ) throws api exception { file schema test class body = null ; api test body with file schema ( body ) ; / / todo : test validations }


returns the { @ link merge scheduler config }

public merge scheduler config get merge scheduler config ( ) { return merge scheduler config ; }


returns true if at least one checked out file has a newer version in the repository

public boolean is enabled for context ( domain file context context ) { list < domain file > provided list = context get selected files ( ) ; for ( domain file domain file : provided list ) { if ( domain file is versioned ( ) & & ( domain file get latest version ( ) ! = domain file get version ( ) ) ) { return true ; / / at least one checked out file that has a newer version in the repository } } return false ; }


return the { @ link # set cors configuration source ( cors configuration source ) configured } { @ code cors configuration source } , if any

public cors configuration source get cors configuration source ( ) { return this cors configuration source ; }


/ * package * / static missing class events get events ( ) { return events ; }


public static logger get logger ( ) { return log ; }


returns true if the " using relative virtual address " is flag is set

public boolean is using r v a ( ) { return ( gr attrs & 1 ) = = 1 ; }


identify as a bean to proxy if the bean name matches one of the names in the configured list of supported names

protected object [ ] get advices and advisors for bean ( class < ? > bean class , string bean name , @ nullable target source target source ) { return ( is supported bean name ( bean class , bean name ) ? proxy without additional interceptors : do not proxy ) ; }


public address get section d ( ) { return section d ; }


discards every partial match that started before the first event of emitted match mapped to pattern name

public static skip to first strategy skip to first ( string pattern name ) { return new skip to first strategy ( pattern name , false ) ; }


clear the reference to make a particular r object effectively unreachable

/ * package * / void clear ( ) { holder = null ; }


build a response handler for the http response

protected < t > handler < async result < http response < buffer > > > build response handler ( type reference < t > return type , handler < async result < t > > handler ) { return response - > { async result < t > result ; if ( response succeeded ( ) ) { http response < buffer > http response = response result ( ) ; if ( http response status code ( ) / 100 = = 2 ) { if ( http response status code ( ) = = 204 | | return type = = null ) { result = future succeeded future ( null ) ; } else { t result content = null ; if ( " byte [ ] " equals ( return type get type ( ) to string ( ) ) ) { result content = ( t ) http response body ( ) get bytes ( ) ; result = future succeeded future ( result content ) ; } else if ( async file class equals ( return type get type ( ) ) ) { handle file download ( http response , handler ) ; return ; } else { try { result content = this object mapper read value ( http response body as string ( ) , return type ) ; result = future succeeded future ( result content ) ; } catch ( exception e ) { result = api exception fail ( new decode exception ( " failed to decode : " + e get message ( ) , e ) ) ; } } } } else { result = api exception fail ( http response status message ( ) , http response status code ( ) , http response headers ( ) , http response body as string ( ) ) ; } } else if ( response cause ( ) instanceof api exception ) { result = future failed future ( response cause ( ) ) ; } else { result = api exception fail ( 500 , response cause ( ) ! = null ? response cause ( ) get message ( ) : null ) ; } handler handle ( result ) ; } ; }


{ @ inherit doc } this editor provides a panel containing a { @ link task monitor component } and the ability to reload the columns ' data ; if the delegate editor provides an inline editor , this wraps it , and switches between task view and the editor depending on the executing state of the data - load task

protected component build inline editor component ( ) { j panel editor panel = new j panel ( new border layout ( ) ) ; status label = new g d html label ( ) ; status label set horizontal alignment ( swing constants center ) ; task monitor component = new task monitor component ( ) ; reload data button = new empty border button ( icons refresh icon ) ; reload data button set tool tip text ( " reload column data " ) ; reload data button add action listener ( e - > load data ( ) ) ; view layout = new card layout ( ) ; view panel = new j panel ( view layout ) ; view panel add ( task monitor component , task view ) ; component editor component = build delegate inline editor ( ) ; if ( editor component ! = null ) { editor panel add ( editor component , border layout center ) ; view panel add ( editor panel , editor view ) ; has inline editor component = true ; } j panel button panel = new j panel ( new column layout ( 2 , 2 , 1 ) ) ; button panel set border ( border factory create empty border ( 2 , 0 , 2 , 0 ) ) ; button panel add ( reload data button ) ; j panel panel = new j panel ( new border layout ( ) ) ; panel add ( view panel , border layout center ) ; panel add ( button panel , border layout east ) ; panel add ( status label , border layout south ) ; return panel ; }


protected void apply parse handlers ( ) { sequence flows = new hash map < string , sequence flow > ( ) ; for ( process process : bpmn model get processes ( ) ) { current process = process ; if ( process is executable ( ) ) { bpmn parser handlers parse element ( this , process ) ; } } }


encode and get the url request parameters

private string encode request params ( map < string , string > params map , charset charset ) { if ( charset = = null ) { throw new illegal argument exception ( " charset is not allowed to be null " ) ; } if ( params map = = null | | params map is empty ( ) ) { return " " ; } try { string builder params builder = new string builder ( ) ; for ( entry < string , string > entry : params map entry set ( ) ) { if ( entry get key ( ) = = null | | entry get value ( ) = = null ) { continue ; } params builder append ( u r l encoder encode ( entry get key ( ) , charset name ( ) ) ) append ( " = " ) append ( u r l encoder encode ( entry get value ( ) , charset name ( ) ) ) append ( " & " ) ; } if ( params builder length ( ) > 0 ) { / / remove the last ' & ' params builder delete ( params builder length ( ) - 1 , params builder length ( ) ) ; } return params builder to string ( ) ; } catch ( throwable e ) { record log warn ( " encode request params fail " , e ) ; return " " ; } }


returns an iterator over the names of all existing property mangers

public iterator < string > property managers ( ) { lock acquire ( ) ; try { return property map cache key set ( ) iterator ( ) ; } finally { lock release ( ) ; } }


find an order value indicated by the given object the default implementation checks against the { @ link ordered } interface can be overridden in subclasses

protected integer find order ( object obj ) { return ( obj instanceof ordered ? ( ( ordered ) obj ) get order ( ) : null ) ; }


insert the specified number of records using random keys

private d b record [ ] create random table records ( int schema type , int record cnt , int var data size ) throws i o exception { long tx id = dbh start transaction ( ) ; table table = d b test utils create fixed key table ( dbh , table 1 name , schema type , true , false ) ; d b record [ ] recs = new d b record [ record cnt ] ; for ( int i = 0 ; i < record cnt ; i + + ) { try { recs [ i ] = d b test utils create fixed key record ( table , var data size , true ) ; } catch ( duplicate key exception e ) { assert fail ( " duplicate key error " ) ; } } dbh end transaction ( tx id , true ) ; return recs ; }


required : the protocol exposed on the port must be one of http | https | grpc | http2 | mongo | tcp | tls tls implies the connection will be routed based on the sni header to the destination without terminating the tls connection < code > string protocol = 2 ; < code >

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


install the selected item indicator in trees

private static void replace selected indicator ( @ non nls final u i defaults defaults ) { final m t selected tree painter painter = new m t selected tree painter ( ) ; defaults put ( mtui list list selection background painter , painter ) ; defaults put ( mtui list list focused selection background painter , painter ) ; }


public synchronized void update job status ( job status status ) { this current status = status ; }


we consider an annotation to be valid for extraction if it ' s not an internal annotation ( i e is in the < code > com facebook litho < code > package and is not a source - only annotation

private static boolean is valid annotation ( project project , psi annotation psi annotation ) { final string text = psi annotation get qualified name ( ) ; if ( text starts with ( " com facebook " ) ) { return false ; } psi class annotation class = psi search utils find class ( project , psi annotation get qualified name ( ) ) ; if ( annotation class = = null ) { throw new runtime exception ( " annotation class not found , text is : " + text ) ; } final retention retention = psi annotation proxy utils find annotation in hierarchy ( annotation class , retention class ) ; return retention = = null | | retention value ( ) ! = retention policy source ; }


the path at which this entry ' s visibility was defined ( eg public xml ) < code > optional aapt pb source source = 2 ; < code >


reverses a collection so that it can be easily walked in reverse order

public static < t > iterable < t > reverse ( collection < t > collection ) { list < t > list = new array list < > ( collection ) ; collections reverse ( list ) ; return list ; }


set the statistic to the values of another synchronized

public void set ( final mean statistic other ) { set samples and sum ( other get samples ( ) , other get sum ( ) ) ; }


return a ref - counted stream that will only do work when at least one subscriber is present

public observable < hystrix utilization > observe ( ) { return all utilization stream ; }


use the given { @ link clock } instance for the time

public builder with clock ( clock clock ) { this clock = clock ; return this ; }


public string [ ] get error codes ( ) { return this error codes ; }


public void anytype 2 test ( ) { / / todo : test anytype 2 }


public integer get int 3 2 ( ) { return int 3 2 ; }


sets the matrix to an orthographic projection like gl ortho ( http : www opengl orgsdkdocsmanxhtmlgl ortho xml ) following the open g l equivalent

public matrix 4 set to ortho ( float left , float right , float bottom , float top , float near , float far ) { float x orth = 2 / ( right - left ) ; float y orth = 2 / ( top - bottom ) ; float z orth = - 2 / ( far - near ) ; float tx = - ( right + left ) / ( right - left ) ; float ty = - ( top + bottom ) / ( top - bottom ) ; float tz = - ( far + near ) / ( far - near ) ; val [ m00 ] = x orth ; val [ m10 ] = 0 ; val [ m20 ] = 0 ; val [ m30 ] = 0 ; val [ m01 ] = 0 ; val [ m11 ] = y orth ; val [ m21 ] = 0 ; val [ m31 ] = 0 ; val [ m02 ] = 0 ; val [ m12 ] = 0 ; val [ m22 ] = z orth ; val [ m32 ] = 0 ; val [ m03 ] = tx ; val [ m13 ] = ty ; val [ m23 ] = tz ; val [ m33 ] = 1 ; return this ; }


deserialize response body to java object according to the content - type

public < t > t deserialize ( response response , generic type < t > return type ) throws api exception { if ( response = = null | | return type = = null ) { return null ; } if ( " byte [ ] " equals ( return type to string ( ) ) ) { / / handle binary response ( byte array ) return ( t ) response read entity ( byte [ ] class ) ; } else if ( return type equals ( file class ) ) { / / handle file downloading @ suppress warnings ( " unchecked " ) t file = ( t ) download file from response ( response ) ; return file ; } string content type = null ; list < object > content types = response get headers ( ) get ( " content - type " ) ; if ( content types ! = null & & ! content types is empty ( ) ) content type = string value of ( content types get ( 0 ) ) ; if ( content type = = null ) throw new api exception ( 500 , " missing content - type in response " ) ; return response read entity ( return type ) ; }


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

public void delete user ( string username ) throws api exception { delete user with http info ( username ) ; }


return the characters up to the next close quote character backslash processing is done the formal json format does not allow strings in single quotes , but an implementation is allowed to accept them

public string next string ( char quote ) throws j s o n exception { char c ; string builder sb = new string builder ( ) ; for ( ; ; ) { c = next ( ) ; switch ( c ) { case 0 : case ' \ n ' : case ' \ r ' : throw syntax error ( " unterminated string " ) ; case ' \ \ ' : c = next ( ) ; switch ( c ) { case ' b ' : sb append ( ' \ b ' ) ; break ; case ' t ' : sb append ( ' \ t ' ) ; break ; case ' n ' : sb append ( ' \ n ' ) ; break ; case ' f ' : sb append ( ' \ f ' ) ; break ; case ' r ' : sb append ( ' \ r ' ) ; break ; case ' u ' : sb append ( ( char ) integer parse int ( next ( 4 ) , 16 ) ) ; break ; case ' " ' : case ' \ ' ' : case ' \ \ ' : case ' / ' : sb append ( c ) ; break ; default : throw syntax error ( " illegal escape " ) ; } break ; default : if ( c = = quote ) { return sb to string ( ) ; } sb append ( c ) ; } } }


void maybe throw ( flags flag ) throws i o exception ;


ensures that an object reference passed as a parameter to the calling method is not null see { @ link # check not null ( object , string , object ) } for details

public static < t extends object > t check not null ( @ non null decl t obj , @ nullable decl string error message template , int p 1 , long p 2 ) { if ( obj = = null ) { throw new null pointer exception ( lenient format ( error message template , p 1 , p 2 ) ) ; } return obj ; }


returns the old value associated with the specified key , or the specified default value

public float put ( k key , float value , float default value ) { int i = locate key ( key ) ; if ( i > = 0 ) { / / existing key was found float old value = value table [ i ] ; value table [ i ] = value ; return old value ; } i = - ( i + 1 ) ; / / empty space was found key table [ i ] = key ; value table [ i ] = value ; if ( + + size > = threshold ) resize ( key table length < < 1 ) ; return default value ; }


whether or not the memory at the indicated address appears to be a valid location for the indicated number of type descriptor data types

protected void validate model specific info ( ) throws invalid data type exception { program program = get program ( ) ; memory memory = program get memory ( ) ; address set view loaded and initialized set = memory get loaded and initialized address set ( ) ; address start address = get address ( ) ; / / do we at least have memory for the first 2 components ( the pointers ) int pointer size = m s data type utils is 6 4 bit ( program ) ? 8 : 4 ; / / test that we can get the expected number of bytes m s data type utils get bytes ( memory , start address , pointer size * 2 ) ; / / first component should be reference check vf table pointer component ( loaded and initialized set ) ; / / check spare data should be 0 or a valid address in program check spare data component ( loaded and initialized set ) ; check type name component ( ) ; }


public builder set key fields ( string [ ] key fields ) { this key fields = key fields ; return this ; }


returns a map of the headers the keys are strings that represent the header name each values is a list of strings that represent the corresponding header values see { @ link http response header }

map < string , list < string > > get headers ( ) ;


returns the recycling mode please see { @ link recycling mode for details of different modes }

public @ recycling mode int get recycling mode ( ) { return m recycling mode ; }


remove the given high symbol from this container the key is removed from the main symbol map it is also removed from the mapped entry map and from the list of parameter symbols if applicable

private void remove symbol ( high symbol high symbol ) { symbol entry map entry = high symbol get first whole map ( ) ; if ( map entry instanceof mapped entry ) { mapped var key key = new mapped var key ( map entry get storage ( ) , map entry get p c adress ( ) ) ; addr mapped symbols remove ( key ) ; } symbol map remove ( high symbol get id ( ) ) ; if ( high symbol is parameter ( ) ) { int index = high symbol get category index ( ) ; high symbol [ ] new array = new high symbol [ param symbols length - 1 ] ; for ( int i = 0 ; i < index ; + + i ) { new array [ i ] = param symbols [ i ] ; } for ( int i = index + 1 ; i < param symbols length ; + + i ) { high symbol param sym = param symbols [ i ] ; new array [ i - 1 ] = param sym ; param sym category index - = 1 ; } } }


determine whether the given response indicates a gzip response the default implementation checks whether the http " content - encoding " header contains " gzip " ( in any casing )

protected boolean is gzip response ( http response http response ) { header encoding header = http response get first header ( http header content encoding ) ; return ( encoding header ! = null & & encoding header get value ( ) ! = null & & encoding header get value ( ) to lower case ( ) contains ( encoding gzip ) ) ; }


the total time refreshes have been executed

public time value get total time ( ) { return new time value ( total time in millis ) ; }


verify get at most when sync generation policy = low watermark

public void testget at most policy l o w watermark ( ) throws exception { mock filler filler = new mock filler ( ) ; value queue < string > vq = new value queue < string > ( 10 , 0 3f , 30000 , 1 , sync generation policy low watermark , filler ) ; / / trigger a prefill ( 3 ) and an async refill ( 8 ) assert assert equals ( " test " , vq get next ( " k 1 " ) ) ; assert assert equals ( 3 , filler get top ( ) num ) ; / / wait for the async task to finish wait for refill ( vq , " k 1 " , 10 ) ; / / refill task should add 8 values to get to a full queue ( 3 produced by / / the prefill to the low watermark , 1 consumed by get next ( ) ) assert assert equals ( " failed in async call " , 8 , filler get top ( ) num ) ; / / drain completely , no further refills triggered vq drain ( " k 1 " ) ; / / queue is empty , sync will return 3 values and trigger a refill assert assert equals ( 3 , vq get at most ( " k 1 " , 10 ) size ( ) ) ; assert assert equals ( 3 , filler get top ( ) num ) ; / / wait for the async task to finish wait for refill ( vq , " k 1 " , 10 ) ; / / refill task should add 10 values to get to a full queue assert assert equals ( " failed in async call " , 10 , filler get top ( ) num ) ; vq shutdown ( ) ; }


returns a new builder the generated builder is equivalent to the builder created by the { @ link builder } constructor

public static < k , v > builder < k , v > builder ( ) { return new builder < > ( ) ; }


returns leaf app node path based on app id and configured split index if the passed flag create parent if not exists is true , also creates the parent app node if it does not exist

private string get leaf app id node path ( string app id , boolean create parent if not exists ) throws exception { return get leaf znode path ( app id , rm app root hierarchies get ( app id node split index ) , app id node split index , create parent if not exists ) ; }


equivalent to processing each { @ code char } value in the { @ code char sequence } , in order in other words , no character encoding is performed ; the low byte and high byte of each { @ code char } are hashed directly ( in that order ) the input must not be updated while this method is in progress < b > warning : < b > this method will produce different output than most other languages do when running the same hash function on the equivalent input for cross - language compatibility , use { @ link # put string } , usually with a charset of utf - 8 for other use cases , use { @ code put unencoded chars }

hasher put unencoded chars ( char sequence char sequence ) ;


performs a context - click at middle of the given element first performs a mouse move to the location of the element

public actions context click ( web element target ) { if ( is building actions ( ) ) { action add action ( new context click action ( json mouse , ( locatable ) target ) ) ; } return move in ticks ( target , 0 , 0 ) click in ticks ( right ) ; }


public authentication get authentication ( string auth name ) { return authentications get ( auth name ) ; }


tests that a task executor can disconnect from the { @ link resource manager }

public void test disconnect task executor ( ) throws exception { final registration response registration response = register task executor ( rm gateway , task executor gateway get address ( ) ) get ( ) ; assert that ( registration response , instance of ( task executor registration success class ) ) ; final instance i d registration id = ( ( task executor registration success ) registration response ) get registration id ( ) ; final int number slots = 10 ; final collection < slot status > slots = create slots ( number slots ) ; final slot report slot report = new slot report ( slots ) ; rm gateway send slot report ( task executor resource i d , registration id , slot report , timeout ) get ( ) ; final resource overview resource overview = rm gateway request resource overview ( timeout ) get ( ) ; assert that ( resource overview get number task managers ( ) , is ( 1 ) ) ; assert that ( resource overview get number registered slots ( ) , is ( number slots ) ) ; rm gateway disconnect task manager ( task executor resource i d , new flink exception ( " test disconnect task executor " ) ) ; final resource overview after disconnect resource overview = rm gateway request resource overview ( timeout ) get ( ) ; assert that ( after disconnect resource overview get number task managers ( ) , is ( 0 ) ) ; assert that ( after disconnect resource overview get number registered slots ( ) , is ( 0 ) ) ; }


return an output stream that quotes all of the output

public static output stream quote output stream ( final output stream out ) throws i o exception { return new output stream ( ) { private byte [ ] data = new byte [ 1 ] ; @ override public void write ( byte [ ] data , int off , int len ) throws i o exception { quote html chars ( out , data , off , len ) ; } @ override public void write ( int b ) throws i o exception { data [ 0 ] = ( byte ) b ; quote html chars ( out , data , 0 , 1 ) ; } @ override public void flush ( ) throws i o exception { out flush ( ) ; } @ override public void close ( ) throws i o exception { out close ( ) ; } } ; }


run through the omf segments an produce ghidra memory blocks most segments cause an initialized block to be created , but if a segment consists only of a string of zero bytes , as described by a compact lidata record , an uninitialized block is created

private void process segment headers ( binary reader reader , omf file header header , program program , task monitor monitor , message log log ) throws address overflow exception , i o exception { monitor set message ( " process segments " ) ; final language language = program get language ( ) ; array list < omf segment header > segments = header get segments ( ) ; / / int section number = 0 ; for ( omf segment header segment : segments ) { / / + + section number ; if ( monitor is cancelled ( ) ) { break ; } / / if ( segment has iterated data ( ) & & segment has enumerated data ( ) ) / / throw new i o exception ( " omf segment has both iterated and enumerated data blocks " ) ; memory block block = null ; final long segment size = segment get segment length ( ) ; address segment addr = segment get address ( language ) ; if ( segment size = = 0 ) { / / don ' t create a block just log that we ' ve seen the segment block = program get memory ( ) get block ( segment addr ) ; log append msg ( " empty segment : " + segment get name ( ) ) ; } else if ( segment has non zero data ( ) ) { block = memory block utils create initialized block ( program , false , segment get name ( ) , segment addr , segment get raw data stream ( reader , log ) , segment size , " address : 0x " + long to hex string ( segment addr get offset ( ) ) + " " + " size : 0x " + long to hex string ( segment size ) , null / * source * / , segment is readable ( ) , segment is writable ( ) , segment is executable ( ) , log , monitor ) ; if ( block ! = null ) { log append msg ( " created initialized block : " + segment get name ( ) + " @ " + segment addr ) ; } } else { block = memory block utils create uninitialized block ( program , false , segment get name ( ) , segment addr , segment size , " address : 0x " + long to hex string ( segment addr get offset ( ) ) + " " + " size : 0x " + long to hex string ( segment size ) , null / * source * / , segment is readable ( ) , segment is writable ( ) , segment is executable ( ) , log ) ; if ( block ! = null ) { log append msg ( " created uninitialized block : " + segment get name ( ) + " @ " + segment addr ) ; } } } }


public void update ( long duration , time unit unit ) { update ( unit to nanos ( duration ) ) ; }


get { @ link i nodes in path } for all files under the ancestor directory which has valid lease if the ancestor directory is null , then return all files in the system with valid lease callers must hold { @ link f s namesystem } read or write lock

public set < i nodes in path > get i node with leases ( final i node directory ancestor dir ) throws i o exception { assert fsnamesystem has read lock ( ) ; final long start time ms = time monotonic now ( ) ; set < i nodes in path > iip set = new hash set < > ( ) ; final i node [ ] inodes = get i nodes with lease ( ) ; int inode count = inodes length ; if ( inode count = = 0 ) { return iip set ; } list < future < list < i nodes in path > > > future list = lists new array list ( ) ; final int worker count = math min ( inode filter worker count max , ( ( ( inode count - 1 ) / inode filter worker task min ) + 1 ) ) ; executor service inode filter service = executors new fixed thread pool ( worker count ) ; for ( int worker idx = 0 ; worker idx < worker count ; worker idx + + ) { final int start idx = worker idx ; callable < list < i nodes in path > > c = new callable < list < i nodes in path > > ( ) { @ override public list < i nodes in path > call ( ) { list < i nodes in path > i nodes in paths = lists new array list ( ) ; for ( int idx = start idx ; idx < inode count ; idx + = worker count ) { i node inode = inodes [ idx ] ; if ( ! inode is file ( ) ) { continue ; } i nodes in path inodes in path = i nodes in path from i node ( fsnamesystem get f s directory ( ) get root ( ) , inode as file ( ) ) ; if ( ancestor dir ! = null & & ! inodes in path is descendant ( ancestor dir ) ) { continue ; } i nodes in paths add ( inodes in path ) ; } return i nodes in paths ; } } ; / / submit the inode filter task to the executor service future list add ( inode filter service submit ( c ) ) ; } inode filter service shutdown ( ) ; for ( future < list < i nodes in path > > f : future list ) { try { iip set add all ( f get ( ) ) ; } catch ( exception e ) { throw new i o exception ( " failed to get files with active leases " , e ) ; } } final long end time ms = time monotonic now ( ) ; if ( ( end time ms - start time ms ) > 1000 ) { log info ( " took { } ms to collect { } open files with leases { } " , ( end time ms - start time ms ) , iip set size ( ) , ( ( ancestor dir ! = null ) ? " under " + ancestor dir get full path name ( ) : " " ) ) ; } return iip set ; }


uploads a blob using the " multipart upload " method ( a single ' multipartrelated ' request containing both data and metadata the request is gziped ) , see : https : cloud google comstoragedocsjson apiv 1how - tosmultipart - upload

private void write blob multipart ( blob info blob info , input stream input stream , long blob size , boolean fail if already exists ) throws i o exception { assert blob size < = get large blob threshold in bytes ( ) : " large blob uploads should use the resumable upload method " ; final byte [ ] buffer = new byte [ math to int exact ( blob size ) ] ; streams read fully ( input stream , buffer ) ; try { final storage blob target option [ ] target options = fail if already exists ? new storage blob target option [ ] { storage blob target option does not exist ( ) } : new storage blob target option [ 0 ] ; socket access do privileged void i o exception ( ( ) - > client ( ) create ( blob info , buffer , target options ) ) ; / / we don ' t track this operation on the http layer as / / we do with the get / list operations since this operations / / can trigger multiple underlying http requests but only one / / operation is billed stats track post operation ( ) ; } catch ( final storage exception se ) { if ( fail if already exists & & se get code ( ) = = http precon failed ) { throw new file already exists exception ( blob info get blob id ( ) get name ( ) , null , se get message ( ) ) ; } throw se ; } }


returns the remainder of the given particular long value divided by this long value

public long value remainder of ( particular long value other ) { return remainder of ( ( specific long value ) other ) ; }


returns all data objects in row : line - bar - scatter - candle - bubble if not null

public list < bar line scatter candle bubble data > get all data ( ) { list < bar line scatter candle bubble data > data = new array list < bar line scatter candle bubble data > ( ) ; if ( m line data ! = null ) data add ( m line data ) ; if ( m bar data ! = null ) data add ( m bar data ) ; if ( m scatter data ! = null ) data add ( m scatter data ) ; if ( m candle data ! = null ) data add ( m candle data ) ; if ( m bubble data ! = null ) data add ( m bubble data ) ; return data ; }


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


creates a new async stub that supports all call types for the service

public static listener discovery service stub new stub ( io grpc channel channel ) { io grpc stub abstract stub stub factory < listener discovery service stub > factory = new io grpc stub abstract stub stub factory < listener discovery service stub > ( ) { @ java lang override public listener discovery service stub new stub ( io grpc channel channel , io grpc call options call options ) { return new listener discovery service stub ( channel , call options ) ; } } ; return listener discovery service stub new stub ( factory , channel ) ; }


returns the number of buckets that has been chosen based on the initial configuration expert - level api

int get num buckets ( ) { return num buckets ; }


tests the consumption and efficiency when being supplied with liquids

dynamic test [ ] generator works properly with liquid input ( ) { / / execute all tests for the case where only liquids are accepted and for the case where liquids and items are accepted ( but supply only liquids ) input type [ ] input types to be tested = new input type [ ] { input type liquids , input type any } ; array list < dynamic test > tests = new array list < > ( ) ; for ( input type input type : input types to be tested ) { tests add ( dynamic test ( " 01 " , ( ) - > simulate liquid consumption ( input type , liquids oil , 0 0f , " no liquids provided " ) ) ) ; tests add ( dynamic test ( " 02 " , ( ) - > simulate liquid consumption ( input type , liquids oil , maximum liquid usage / 4 0f , " low oil provided " ) ) ) ; tests add ( dynamic test ( " 03 " , ( ) - > simulate liquid consumption ( input type , liquids oil , maximum liquid usage * 1 0f , " sufficient oil provided " ) ) ) ; tests add ( dynamic test ( " 04 " , ( ) - > simulate liquid consumption ( input type , liquids oil , maximum liquid usage * 2 0f , " excess oil provided " ) ) ) ; / / note : the generator will decline any other liquid since it ' s not flammable } dynamic test [ ] test array = new dynamic test [ tests size ( ) ] ; test array = tests to array ( test array ) ; return test array ; }


override the default jackson smile { @ code decoder } note that { @ link # max in memory size ( int ) } , if configured , will be applied to the given decoder

void jackson 2 smile decoder ( decoder < ? > decoder ) ;


the timeout for waiting the exit code file is configured as 4 seconds , and the tests create it after 3 seconds the ce should successfully reacquire the container

public void test acquire with exit code timeout ( ) throws exception { application id app id = application id new instance ( 12345 , 67890 ) ; application attempt id attempt id = application attempt id new instance ( app id , 54321 ) ; container id cid = container id new container id ( attempt id , 9876 ) ; container executor mock c e = spy ( container executor ) ; file root = new file ( system get property ( " test build data " , " / tmp " ) ) ; file test dir = new file ( root , test container executor class get name ( ) ) get absolute file ( ) ; file pid file = new file ( test dir , " pid " ) ; path pid path = new path ( pid file to string ( ) ) ; do return ( pid path ) when ( mock c e ) get pid file path ( cid ) ; do return ( false ) when ( mock c e ) is container alive ( any ( ) ) ; do return ( true ) when ( mock c e ) is container active ( cid ) ; configuration conf = new yarn configuration ( ) ; conf set int ( yarn configuration nm container executor exit file timeout , 4000 ) ; mock c e set conf ( conf ) ; string exit code file string = container launch get exit code file ( pid file to string ( ) ) ; file exit code file = new file ( exit code file string ) ; timer timer = new timer ( ) ; try { int written exit code = 10 ; file utils write string to file ( pid file , " 2992 " , charset default charset ( ) , false ) ; timer task task = new java util timer task ( ) { @ override public void run ( ) { try { file utils write string to file ( exit code file , integer to string ( written exit code ) , charset default charset ( ) , false ) ; } catch ( i o exception ioe ) { log warn ( " could not write pid file " ) ; } } } ; timer schedule ( task , 3000 ) ; int return code = mock c e reacquire container ( new container reacquisition context builder ( ) set user ( " foouser " ) set container id ( cid ) build ( ) ) ; assert equals ( written exit code , return code ) ; } finally { timer cancel ( ) ; if ( test dir exists ( ) ) { file utils delete quietly ( test dir ) ; } } }


creates a crosstool release proto for the android ndk , given the api level to use and the release revision the crosstools are generated through code rather than checked in as a flat file to reduce the amount of templating needed ( for parameters like the release name and certain paths ) , to reduce duplication , and to make it easier to support future versions of the ndk todo ( bazel - team ) : eventually we should move this into starlark so the crosstools can be updated independently of bazel itself

static crosstool release create ( ndk paths ndk paths , stl impl stl impl , string host platform , string clang version ) { return crosstool release new builder ( ) set major version ( " android " ) set minor version ( " " ) set default target cpu ( " armeabi " ) add all toolchain ( create toolchains ( ndk paths , stl impl , host platform , clang version ) ) build ( ) ; }


tests that we fail when reading an invalid yarn properties file when retrieving the cluster id

public void test invalid yarn properties file ( ) throws exception { file directory path = write yarn properties file ( invalid properties file ) ; final configuration configuration = new configuration ( ) ; configuration set string ( yarn config options properties file location , directory path get absolute path ( ) ) ; create flink yarn session cli ( configuration ) ; }


public b get ( a model , int width , int height ) { model key < a > key = model key get ( model , width , height ) ; b result = cache get ( key ) ; key release ( ) ; return result ; }


public void test resend ( ) throws exception { final atomic integer flush count = new atomic integer ( ) ; final embedded channel channel = new channel ( flush count , true ) ; channel write and flush ( 1l ) add listener ( new generic future listener < future < ? super void > > ( ) { @ override public void operation complete ( future < ? super void > future ) throws exception { channel write and flush ( 1l ) ; } } ) ; channel flush outbound ( ) ; assert equals ( 1l , channel read outbound ( ) ) ; assert equals ( 1l , channel read outbound ( ) ) ; assert null ( channel read outbound ( ) ) ; assert false ( channel finish ( ) ) ; }


public void set ( injectable injectable , t value ) { injectable inject ( key , new precomputed value ( value ) ) ; }


returns true of this symbol type allows duplicate names

public boolean allows duplicates ( ) { return false ; }


public void set message ( final string value ) { this message = value ; }


the result of { @ link android media media codec info # is software only ( ) } for api levels 29 + , or a best - effort approximation for lower levels

private static boolean is software only ( android media media codec info codec info ) { if ( util sdk int > = 29 ) { return is software only v 2 9 ( codec info ) ; } string codec name = util to lower invariant ( codec info get name ( ) ) ; if ( codec name starts with ( " arc " ) ) { / / app runtime for chrome ( arc ) codecs return false ; } return codec name starts with ( " omx google " ) | | codec name starts with ( " omx ffmpeg " ) | | ( codec name starts with ( " omx sec " ) & & codec name contains ( " sw " ) ) | | codec name equals ( " omx qcom video decoder hevcswvdec " ) | | codec name starts with ( " c 2 android " ) | | codec name starts with ( " c 2 google " ) | | ( ! codec name starts with ( " omx " ) & & ! codec name starts with ( " c 2 " ) ) ; }


sets new animation speed factor see { @ link gif drawable # set speed ( float ) }

public void set speed ( @ float range ( from = 0 , from inclusive = false ) final float factor ) { m gif info handle set speed factor ( factor ) ; }


public integer get integer ( ) { return integer ; }


calls { @ link mount extension # before mount ( extension state , object , rect ) } for each { @ link render core extension } that has a mount phase

public static void before mount ( final mount delegate target mount delegate target , final host host , final @ nullable map < render core extension < ? , ? > , object > results ) { if ( results ! = null ) { final rect rect = new rect ( ) ; host get local visible rect ( rect ) ; for ( map entry < render core extension < ? , ? > , object > entry : results entry set ( ) ) { final object state = entry get value ( ) ; final mount extension extension = entry get key ( ) get mount extension ( ) ; if ( extension ! = null ) { extension before mount ( mount delegate target get extension state ( extension ) , state , rect ) ; } } } }


gets standalone profile configuration directory

public file get standalone profile configuration directory ( ) { val values = new linked hash set < > ( relaxed property names for camel case ( property cas standalone configuration directory ) get values ( ) ) ; values add ( property cas standalone configuration directory ) ; val file = values stream ( ) map ( key - > environment get property ( key , file class ) ) filter ( objects : : non null ) find first ( ) or else ( null ) ; if ( file ! = null & & file exists ( ) ) { logger trace ( " received standalone configuration directory [ { } ] " , file ) ; return file ; } return arrays stream ( default cas config directories ) filter ( file : : exists ) find first ( ) or else ( null ) ; }


returns the list of predecessor blocks associated with all operands that have { @ code reg } as an operand register

public list < ssa basic block > pred blocks for reg ( int reg , ssa method ssa meth ) { array list < ssa basic block > ret = new array list < ssa basic block > ( ) ; for ( operand o : operands ) { if ( o reg spec get reg ( ) = = reg ) { ret add ( ssa meth get blocks ( ) get ( o block index ) ) ; } } return ret ; }


public void remove ( int index ) { if ( index > = bytes length ) { return ; } bytes [ index ] = ( byte ) 0 ; if ( index = = last non zero index ) { last non zero index = find last non zero index ( ) ; } if ( last non zero index < bytes length / 4 ) { adjust array ( last non zero index * 2 ) ; } }


create the tree cache that monitors the registry for node addition , update , and deletion

public void monitor registry entries ( ) throws exception { string registry path = get config ( ) get ( registry constants key registry zk root , registry constants default zk registry root ) ; tree cache = new tree cache ( curator , registry path ) ; tree cache start ( ) ; }


public yubi key account get ( @ selector final string username ) { val result = registry get account ( username ) ; return result or else ( null ) ; }


" executes " the given action from the point of view of the cache ' s lifecycle with a custom client environment

private void run action ( action action , map < string , string > client env ) throws exception { run action ( action , client env , immutable map of ( ) ) ; }


updates all jvm metrics to the most recent remote values

public void update ( boolean need jvm info ) { if ( state = = v m info state error during attach | | state = = v m info state detached ) { return ; } try { int last jmx error count = jmx update error count ; / / state = v m info state attached ; / / jmx client flush ( ) ; update up time ( ) ; if ( need jvm info ) { if ( is linux ) { update process status ( ) ; update i o ( ) ; } update cpu ( ) ; update threads ( ) ; update class loader ( ) ; update memory pool ( ) ; update g c ( ) ; update safepoint ( ) ; } / / ， if ( jmx update error count = = last jmx error count ) { jmx update error count = 0 ; } } catch ( throwable e ) { / / ， e print stack trace ( ) ; system out flush ( ) ; state = v m info state detached ; } }


make the 0 21 counter group string format : { ( actual - name ) ( display - name ) ( value ) [ ] [ ] [ ] } where [ ] are compact strings for the counters within

public static < g extends counter group base < ? > > string to escaped compact string ( g group ) { list < string > escaped strs = lists new array list ( ) ; int length ; string escaped name , escaped disp name ; synchronized ( group ) { / / first up , obtain the strings that need escaping this will help us / / determine the buffer length apriori escaped name = escape ( group get name ( ) ) ; escaped disp name = escape ( group get display name ( ) ) ; int i = 0 ; length = escaped name length ( ) + escaped disp name length ( ) ; for ( counter counter : group ) { string escaped str = to escaped compact string ( counter ) ; escaped strs add ( escaped str ) ; length + = escaped str length ( ) ; } } length + = 6 ; / / for all the delimiting characters below string builder builder = new string builder ( length ) ; builder append ( group open ) ; / / group start / / add the group name builder append ( unit open ) ; builder append ( escaped name ) ; builder append ( unit close ) ; / / add the display name builder append ( unit open ) ; builder append ( escaped disp name ) ; builder append ( unit close ) ; / / write the value for ( string escaped : escaped strs ) { builder append ( escaped ) ; } builder append ( group close ) ; / / group end return builder to string ( ) ; }


delete fake : fake endpoint to test group parameters ( optional ) fake endpoint to test group parameters ( optional )

public response entity < void > test group parameters ( @ not null @ api param ( value = " required string in group parameters " , required = true ) @ valid @ request param ( value = " required string group " , required = true ) integer required string group , @ api param ( value = " required boolean in group parameters " , required = true ) @ request header ( value = " required boolean group " , required = true ) boolean required boolean group , @ not null @ api param ( value = " required integer in group parameters " , required = true ) @ valid @ request param ( value = " required int 6 4 group " , required = true ) long required int 6 4 group , @ api param ( value = " string in group parameters " ) @ valid @ request param ( value = " string group " , required = false ) integer string group , @ api param ( value = " boolean in group parameters " ) @ request header ( value = " boolean group " , required = false ) boolean boolean group , @ api param ( value = " integer in group parameters " ) @ valid @ request param ( value = " int 6 4 group " , required = false ) long int 6 4 group ) { return delegate test group parameters ( required string group , required boolean group , required int 6 4 group , string group , boolean group , int 6 4 group ) ; }


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 an array containing the same values as { @ code array } , but guaranteed to be of a specified minimum length if { @ code array } already has a length of at least { @ code min length } , it is returned directly otherwise , a new array of size { @ code min length + padding } is returned , containing the values of { @ code array } , and zeroes in the remaining places

public static double [ ] ensure capacity ( double [ ] array , int min length , int padding ) { check argument ( min length > = 0 , " invalid min length : % s " , min length ) ; check argument ( padding > = 0 , " invalid padding : % s " , padding ) ; return ( array length < min length ) ? arrays copy of ( array , min length + padding ) : array ; }


find the boundaries of segments , and then compare memory segment

private int compare multi segments ( binary string data other ) { if ( binary section size in bytes = = 0 | | other binary section size in bytes = = 0 ) { return binary section size in bytes - other binary section size in bytes ; } int len = math min ( binary section size in bytes , other binary section size in bytes ) ; memory segment seg 1 = binary section segments [ 0 ] ; memory segment seg 2 = other binary section segments [ 0 ] ; int segment size = binary section segments [ 0 ] size ( ) ; int other segment size = other binary section segments [ 0 ] size ( ) ; int size of first 1 = segment size - binary section offset ; int size of first 2 = other segment size - other binary section offset ; int var seg index 1 = 1 ; int var seg index 2 = 1 ; / / find the first segment of this string while ( size of first 1 < = 0 ) { size of first 1 + = segment size ; seg 1 = binary section segments [ var seg index 1 + + ] ; } while ( size of first 2 < = 0 ) { size of first 2 + = other segment size ; seg 2 = other binary section segments [ var seg index 2 + + ] ; } int offset 1 = segment size - size of first 1 ; int offset 2 = other segment size - size of first 2 ; int need compare = math min ( math min ( size of first 1 , size of first 2 ) , len ) ; while ( need compare > 0 ) { / / compare in one segment for ( int i = 0 ; i < need compare ; i + + ) { int res = ( seg 1 get ( offset 1 + i ) & 0x f f ) - ( seg 2 get ( offset 2 + i ) & 0x f f ) ; if ( res ! = 0 ) { return res ; } } if ( need compare = = len ) { break ; } len - = need compare ; / / next segment if ( size of first 1 < size of first 2 ) { / / i am smaller seg 1 = binary section segments [ var seg index 1 + + ] ; offset 1 = 0 ; offset 2 + = need compare ; size of first 1 = segment size ; size of first 2 - = need compare ; } else if ( size of first 1 > size of first 2 ) { / / other is smaller seg 2 = other binary section segments [ var seg index 2 + + ] ; offset 2 = 0 ; offset 1 + = need compare ; size of first 2 = other segment size ; size of first 1 - = need compare ; } else { / / same , should go ahead both seg 1 = binary section segments [ var seg index 1 + + ] ; seg 2 = other binary section segments [ var seg index 2 + + ] ; offset 1 = 0 ; offset 2 = 0 ; size of first 1 = segment size ; size of first 2 = other segment size ; } need compare = math min ( math min ( size of first 1 , size of first 2 ) , len ) ; } check argument ( need compare = = len ) ; return binary section size in bytes - other binary section size in bytes ; }


binds the frame buffer and sets the viewport accordingly , so everything gets drawn to it

public void begin ( ) { bind ( ) ; set frame buffer viewport ( ) ; }


determine whether the given descriptor declares a qualifier beyond the type ( typically - but not necessarily - a specific kind of annotation ) the default implementation returns { @ code false }

default boolean has qualifier ( dependency descriptor descriptor ) { return false ; }


verifies repository on the master node and returns the verification token if the verification token is not null , it ' s passed to all data nodes for verification if it ' s null - no additional verification is required


get all { @ code monitored system } s except { @ linkplain monitored system # unknown unknown }

public static stream < monitored system > all systems ( ) { return arrays stream ( monitored system values ( ) ) filter ( s - > s ! = monitored system unknown ) ; }


if the child node or attribute doesn ' t exist , it is created usage example : node property = get first child by attr value ( properties , " property " , " name " ) ;

private static node get first child by name attr value ( node node , string child name , string attr , string value ) { node list child nodes = node get child nodes ( ) ; for ( int i = 0 ; i < child nodes get length ( ) ; i + + ) { if ( child nodes item ( i ) get node name ( ) equals ( child name ) ) { named node map attributes = child nodes item ( i ) get attributes ( ) ; node attribute = attributes get named item ( attr ) ; if ( attribute get node value ( ) equals ( value ) ) return child nodes item ( i ) ; } } node new node = node get owner document ( ) create element ( child name ) ; named node map attributes = new node get attributes ( ) ; attr node attr = node get owner document ( ) create attribute ( attr ) ; node attr set node value ( value ) ; attributes set named item ( node attr ) ; if ( child nodes item ( 0 ) ! = null ) { return node insert before ( new node , child nodes item ( 0 ) ) ; } else { return node append child ( new node ) ; } }


returns d b p data source container fro d b p data source or object itself otherwise

public static d b s object get public object container ( @ not null d b s object object ) { if ( object instanceof d b p data source ) { return ( ( d b p data source ) object ) get container ( ) ; } else { return object ; } }


returns the { @ link java lang reflect method } instance for { @ link # test set null ( ) } so that tests of { @ link java util collections # checked collection ( java util collection , class ) } can suppress it with { @ code feature specific test suite builder suppressing ( ) } until < a href = " http : bugs sun combugdatabaseview bug do ? bug id = 6409434 " > sun bug 6409434 is fixed it ' s unclear whether nulls were to be permitted or forbidden , but presumably the eventual fix will be to permit them , as it seems more likely that code would depend on that behavior than on the other thus , we say the bug is in set ( ) , which fails to support null

public static method get set null supported method ( ) { return helpers get method ( list set tester class , " test set null " ) ; }


subscribes for the first cluster state update where node id and cluster id is present and sets these values in { @ link node id converter }

public static void get and set node id and cluster id ( cluster service cluster service , thread context thread context ) { cluster state cluster state = cluster service state ( ) ; cluster state observer observer = new cluster state observer ( cluster state , cluster service , null , logger , thread context ) ; observer wait for next change ( new node and cluster id state listener ( ) , node and cluster id state listener : : is node and cluster id present ) ; }


returns the paths to the children of this directory that satisfy the specified filter returns an empty list if this file handle represents a file and not a directory on the desktop , an { @ link file type # internal } handle to a directory on the classpath will return a zero length array

public file handle [ ] list ( filename filter filter ) { if ( type = = file type classpath ) throw new gdx runtime exception ( " cannot list a classpath directory : " + file ) ; file file = file ( ) ; string [ ] relative paths = file list ( ) ; if ( relative paths = = null ) return new file handle [ 0 ] ; file handle [ ] handles = new file handle [ relative paths length ] ; int count = 0 ; for ( int i = 0 , n = relative paths length ; i < n ; i + + ) { string path = relative paths [ i ] ; if ( ! filter accept ( file , path ) ) continue ; handles [ count ] = child ( path ) ; count + + ; } if ( count < relative paths length ) { file handle [ ] new handles = new file handle [ count ] ; system arraycopy ( handles , 0 , new handles , 0 , count ) ; handles = new handles ; } return handles ; }


formats an event and returns the formatted message

protected string format ( channel handler context ctx , string event name ) { string ch str = ctx channel ( ) to string ( ) ; return new string builder ( ch str length ( ) + 1 + event name length ( ) ) append ( ch str ) append ( ' ' ) append ( event name ) to string ( ) ; }


update internal status the update method pattern invoke udpate method for each entity in the game

private void update ( ) { for ( var entity : entities ) { entity update ( ) ; } }


provide the converters to use in argument resolvers and return value handlers that support reading andor writing to the body of the request and response

public void set message converters ( list < http message converter < ? > > message converters ) { this message converters = message converters ; }


public void remove all ( ) { size = 0 ; mod count + + ; root = null ; max entry = null ; }


calculate the width ( in meters ) of quadtree cells at a specific level

public static double quad tree cell width ( int level ) { assert level > = 0 ; return earth equator / ( 1l < < level ) ; }


get the current generation state , regardless of whether it is currently stable note that the generation information can be updated while we are still in the middle of a rebalance , after the join - group response is received

protected synchronized generation generation ( ) { return generation ; }


returns whether approximate local recovery is enabled

public boolean is approximate local recovery enabled ( ) { return approximate local recovery ; }


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


public string next c d a t a ( ) throws j s o n exception { char c ; int i ; string builder sb = new string builder ( ) ; for ( ; ; ) { c = next ( ) ; if ( end ( ) ) { throw syntax error ( " unclosed cdata " ) ; } sb append ( c ) ; i = sb length ( ) - 3 ; if ( i > = 0 & & sb char at ( i ) = = ' ] ' & & sb char at ( i + 1 ) = = ' ] ' & & sb char at ( i + 2 ) = = ' > ' ) { sb set length ( i ) ; return sb to string ( ) ; } } }


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


return the threshold in bytes after which read data in the buffer should be discarded

public int get discard threshold ( ) { return discard threshold ; }


public index lifecycle client index lifecycle ( ) { return ilm client ; }


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 a new { @ link builder } with the { @ link # default disk cache executor threads } threads , { @ link # default disk cache executor name } name and { @ link uncaught throwable strategy # default } uncaught throwable strategy disk cache executors do not allow network operations on their threads

public static glide executor builder new disk cache builder ( ) { return new glide executor builder ( / * prevent network operations = * / true ) set thread count ( default disk cache executor threads ) set name ( default disk cache executor name ) ; }


public string get description ( final string locale ) { if ( this ui info ! = null ) { val description = get localized values ( locale , this ui info get descriptions ( ) ) ; return optional of nullable ( description ) or else get ( super : : get description ) ; } return super get description ( ) ; }


partitions a pojo data stream on the specified key fields using a custom partitioner this method takes the key expression to partition on , and a partitioner that accepts the key type note : this method works only on single field keys

public < k > data stream < t > partition custom ( partitioner < k > partitioner , string field ) { keys expression keys < t > out expression keys = new keys expression keys < > ( new string [ ] { field } , get type ( ) ) ; return partition custom ( partitioner , out expression keys ) ; }


this is the main interface for reading a range of bytes from the memory sate the memory bank associated with the address space of the query is looked up and the request is forwarded to the get chunk method on the memory bank if there is no registered memory bank or some other error , an exception is thrown all get long value methods utilize this method to read the bytes from the appropriate memory bank

public int get chunk ( byte [ ] res , address space spc , long off , int size , boolean stop on unintialized ) { if ( spc is constant space ( ) ) { system arraycopy ( utils long to bytes ( off , size , language is big endian ( ) ) , 0 , res , 0 , size ) ; return size ; } memory bank mspace = get memory bank ( spc ) ; if ( mspace = = null ) throw new lowlevel error ( " getting chunk from unmapped memory space : " + spc get name ( ) ) ; return mspace get chunk ( off , size , res , stop on unintialized ) ; }


send the { @ link recycler collection component } a request to scroll the content to the next item in the binder

public void request scroll to next position ( boolean animated ) { final int default target = math max ( 0 , m last completely visible item position + 1 ) ; final int snap target = get smooth scroll target ( true , default target ) ; request scroll to position inner ( animated , default target , snap target ) ; }


set if all items opened will be closed when the user moves the list view

public void set swipe close all items when move list ( boolean swipe close all items when move list ) { touch listener set swipe closes all items when list moves ( swipe close all items when move list ) ; }


returns the maximum number of queued control frames that are allowed before the connection is closed this allows to protected against various attacks that can lead to high cpu memory usage if the remote - peer floods us with frames that would have us produce control frames , but stops to read from the underlying socket { @ code 0 } means no protection is in place

protected int encoder enforce max queued control frames ( ) { return max queued control frames ; }


returns { @ code true } if { @ link fast thread local # remove all ( ) } will be called once { @ link thread # run ( ) } completes

public static boolean will cleanup fast thread locals ( thread thread ) { return thread instanceof fast thread local thread & & ( ( fast thread local thread ) thread ) will cleanup fast thread locals ( ) ; }


called when the format of the media being consumed by a video renderer changes

default void on video input format changed ( event time event time , format format ) { }


manually run this to write binary snapshot data remove @ ignore to run

public void write reader snapshot ( ) throws exception { file test folder = temp folder new folder ( ) ; timestamped file input split split 1 = new timestamped file input split ( 0 , 3 , new path ( " test / test 1 " ) , 0 , 100 , null ) ; timestamped file input split split 2 = new timestamped file input split ( 10 , 2 , new path ( " test / test 2 " ) , 101 , 200 , null ) ; timestamped file input split split 3 = new timestamped file input split ( 10 , 1 , new path ( " test / test 2 " ) , 0 , 100 , null ) ; timestamped file input split split 4 = new timestamped file input split ( 11 , 0 , new path ( " test / test 3 " ) , 0 , 100 , null ) ; / / this always blocks to ensure that the reader doesn ' t to any actual processing so that / / we keep the state for the four splits final one shot latch blocking latch = new one shot latch ( ) ; blocking file input format format = new blocking file input format ( blocking latch , new path ( test folder get absolute path ( ) ) ) ; one input stream operator test harness < timestamped file input split , file input split > test harness = create harness ( format ) ; test harness set time characteristic ( time characteristic event time ) ; test harness open ( ) ; / / create some state in the reader test harness process element ( new stream record < > ( split 1 ) ) ; test harness process element ( new stream record < > ( split 2 ) ) ; test harness process element ( new stream record < > ( split 3 ) ) ; test harness process element ( new stream record < > ( split 4 ) ) ; / / take a snapshot of the operator ' s state this will be used / / to initialize another reader and compare the results of the / / two operators final operator subtask state snapshot ; synchronized ( test harness get checkpoint lock ( ) ) { snapshot = test harness snapshot ( 0l , 0l ) ; } operator snapshot util write state handle ( snapshot , " src / test / resources / reader - migration - test - flink " + flink generate savepoint version + " - snapshot " ) ; }


returns the target of the current invocation , ie java delegate , value expression


reads the datatypes encoded in xml from the specified xml parser and recreates them in a datatype manager

public void read ( xml pull parser parser , task monitor monitor ) throws s a x parse exception , cancelled exception { array list < xml tree node > todo = new array list < > ( ) ; xml element element = parser next ( ) ; built in data type manager built in mgr = built in data type manager get data type manager ( ) ; try { dt parser = new dt parser ( data manager ) ; while ( true ) { if ( monitor is cancelled ( ) ) { throw new cancelled exception ( ) ; } element = parser peek ( ) ; if ( element is end ( ) & & element get name ( ) equals ( " datatypes " ) ) { parser next ( ) ; break ; } xml tree node root = new xml tree node ( parser ) ; if ( ! process ( root , true ) ) { todo add ( root ) ; } } while ( true ) { if ( monitor is cancelled ( ) ) { throw new cancelled exception ( ) ; } boolean processed = false ; iterator < xml tree node > it = todo iterator ( ) ; while ( it has next ( ) ) { xml tree node node = it next ( ) ; if ( process ( node , false ) ) { it remove ( ) ; processed = true ; } } if ( ! processed ) { break ; } } } finally { built in mgr close ( ) ; dt parser = null ; } iterator < xml tree node > it = todo iterator ( ) ; while ( it has next ( ) ) { if ( monitor is cancelled ( ) ) { throw new cancelled exception ( ) ; } log error ( it next ( ) ) ; } }


{ @ inherit doc } the default implementation does nothing

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


< code > optional int 3 2 age = 3 ; < code >

public builder clear age ( ) { bit field 0 = ( bit field 0 & ~ 0x 0 0 0 0 0 0 0 4 ) ; age = 0 ; on changed ( ) ; return this ; }


generate an error if the host might be a non - bracketed i pv 6 literal uri formatting requires that i pv 6 literals be surrounded by brackets , like " [ 2001 : db 8 : : 1 ] " chain this call after { @ link # from string ( string ) } to increase the strictness of the parser , and disallow i pv 6 literals that don ' t contain these brackets note that this parser identifies i pv 6 literals solely based on the presence of a colon to perform actual validation of ip addresses , see the { @ link inet addresses # for string ( string ) } method

public host and port require brackets for i pv 6 ( ) { check argument ( ! has bracketless colons , " possible bracketless i pv 6 literal : % s " , host ) ; return this ; }


get ( and assign if needed ) the id associated with the specified calling convention name

byte get calling convention i d ( string name ) throws invalid input exception , i o exception { if ( name = = null | | name equals ( function unknown calling convention string ) ) { return calling convention d b adapter unknown calling convention id ; } else if ( name equals ( function default calling convention string ) ) { return calling convention d b adapter default calling convention id ; } byte id = calling convention name to i d map get ( name ) ; if ( id ! = null ) { return id ; } compiler spec compiler spec = program get compiler spec ( ) ; prototype model calling convention = compiler spec get calling convention ( name ) ; if ( calling convention = = null ) { throw new invalid input exception ( " invalid calling convention name : " + name ) ; } d b record record = calling convention adapter get calling convention record ( name ) ; if ( record = = null ) { record = calling convention adapter create calling convention record ( name ) ; } byte new id = record get key field ( ) get byte value ( ) ; calling convention i d to name map put ( new id , name ) ; calling convention name to i d map put ( name , new id ) ; return new id ; }


parse the given x content value to an object of type { @ link parsed } the value can be in any supported format

public abstract parsed parse ( x content parser parser ) throws i o exception , parse exception ;


public text prop model view model title quantity res ( @ plurals res int plural res , int quantity , object format args ) { on mutation ( ) ; assigned attributes epoxy generated model set ( 0 ) ; title string attribute data set value ( plural res , quantity , format args ) ; return this ; }


invokes ` client send ` followed by 1 or more ` client poll ` invocations until a response is received or a disconnection happens ( which can happen for a number of reasons including a request timeout ) in case of a disconnection , an ` i o exception ` is thrown if shutdown is initiated on the client during this method , an i o exception is thrown this method is useful for implementing blocking behaviour on top of the non - blocking ` network client ` , use it with care

public static client response send and receive ( kafka client client , client request request , time time ) throws i o exception { try { client send ( request , time milliseconds ( ) ) ; while ( client active ( ) ) { list < client response > responses = client poll ( long max value , time milliseconds ( ) ) ; for ( client response response : responses ) { if ( response request header ( ) correlation id ( ) = = request correlation id ( ) ) { if ( response was disconnected ( ) ) { throw new i o exception ( " connection to " + response destination ( ) + " was disconnected before the response was read " ) ; } if ( response version mismatch ( ) ! = null ) { throw response version mismatch ( ) ; } return response ; } } } throw new i o exception ( " client was shutdown before response was read " ) ; } catch ( disconnect exception e ) { if ( client active ( ) ) throw e ; else throw new i o exception ( " client was shutdown before response was read " ) ; } }


creates factory - placeholder for specified { @ link builder } s

static weapon factory factory ( consumer < builder > consumer ) { var map = new hash map < weapon type , supplier < weapon > > ( ) ; consumer accept ( map : : put ) ; return name - > map get ( name ) get ( ) ; }


public string get name ( ) { return name ; }


the number of buckets with no records in it used to measure general data fitness andor configuration problems ( bucket span )

public long get empty bucket count ( ) { return empty bucket count ; }


gets the commit data from { @ link index writer } as a map

private static map < string , string > commit data as map ( final index writer index writer ) { final map < string , string > commit data = new hash map < > ( 8 ) ; for ( map entry < string , string > entry : index writer get live commit data ( ) ) { commit data put ( entry get key ( ) , entry get value ( ) ) ; } return commit data ; }


the ' over ' field or < code > null < code > if not set

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


judge whether specified data id includes aggregation white list

public static boolean is aggr data id ( string data id ) { if ( null = = data id ) { throw new illegal argument exception ( " data id is null " ) ; } for ( pattern pattern : aggr dataid whitelist get ( ) ) { if ( pattern matcher ( data id ) matches ( ) ) { return true ; } } return false ; }


protected access token request data holder extract internal ( final http servlet request request , final http servlet response response , final access token request data holder access token request data holder builder builder ) { return builder build ( ) ; }


parses a version part string to an integer

private int parse version part ( string version part , string version part name ) throws parse exception { try { int i = integer parse int ( version part ) ; if ( i < 0 ) { throw new parse exception ( version part name + " cannot be negative " , 0 ) ; } return i ; } catch ( number format exception e ) { throw new parse exception ( " failed to convert " + version part name + " version to integer " , 0 ) ; } }