set layout version , namespace i d and blockpool i d into block pool storage version file

protected void set properties from fields ( properties props , storage directory sd ) throws i o exception { props set property ( " layout version " , string value of ( layout version ) ) ; props set property ( " namespace i d " , string value of ( namespace i d ) ) ; props set property ( " blockpool i d " , blockpool i d ) ; props set property ( " c time " , string value of ( c time ) ) ; }


the set of values defined for this entry , each corresponding to a different configurationvariant < code > repeated aapt pb config value config value = 4 ; < code >

public builder remove config value ( int index ) { copy on write ( ) ; instance remove config value ( index ) ; return this ; }


set the matches for the number of batches defaults to matching any integer because we usually don ' t care about how many batches the job takes

public bulk index by scroll response matcher batches ( matcher < integer > batches matcher ) { this batches matcher = batches matcher ; return this ; }


implement this method to perform extra treatments before and after the invocation polite implementations would certainly like to invoke { @ link joinpoint # proceed ( ) }

object invoke ( @ nonnull method invocation invocation ) throws throwable ;


public < k extends comparable < ? super k > , v > linked hash map < k , v > sort ( map < k , v > data ) { linked hash map < k , v > dup = new linked hash map < k , v > ( ) ; list < k > keys = new array list < k > ( ) ; keys add all ( data key set ( ) ) ; collections sort ( keys ) ; for ( k k : keys ) { dup put ( k , data get ( k ) ) ; } return dup ; }


initialize the strategy objects that this servlet uses may be overridden in subclasses in order to initialize further strategy objects

protected void init strategies ( application context context ) { init multipart resolver ( context ) ; init locale resolver ( context ) ; init theme resolver ( context ) ; init handler mappings ( context ) ; init handler adapters ( context ) ; init handler exception resolvers ( context ) ; init request to view name translator ( context ) ; init view resolvers ( context ) ; init flash map manager ( context ) ; }


returns all execution vertices for this job vertex

access execution vertex [ ] get task vertices ( ) ;


adds a route to the given handler function that handles all http { @ code get } requests that match the given pattern and predicate for instance , the following example routes get requests for " user " that accept json to the { @ code list users } method in { @ code user controller } : < pre class = " code " > router function & lt ; server response & gt ; route = router functions route ( ) get ( " user " , request predicates accept ( media type application json ) , user controller : : list users ) build ( ) ;

builder get ( string pattern , request predicate predicate , handler function < server response > handler function ) ;


computes the direct dependencies of a node in the configured target graph ( a configured target or an aspects ) returns null if skyframe hasn ' t evaluated the required dependencies yet in this case , the caller should also return null to skyframe

static ordered set multimap < dependency kind , configured target and data > compute dependencies ( environment env , skyframe dependency resolver resolver , target and configuration ctg value , iterable < aspect > aspects , immutable map < label , config matching provider > config conditions , @ nullable toolchain collection < toolchain context > toolchain contexts , boolean use toolchain transition , rule class provider rule class provider , build configuration host configuration , @ nullable nested set builder < package > transitive packages for package root resolution , nested set builder < cause > transitive root causes , build options default build options ) throws dependency evaluation exception , configured value creation exception , aspect creation exception , interrupted exception { / / create the map from attributes to set of ( target , transition ) pairs ordered set multimap < dependency kind , dependency key > initial dependencies ; build configuration configuration = ctg value get configuration ( ) ; label label = ctg value get label ( ) ; try { initial dependencies = resolver dependent node map ( ctg value , host configuration , aspects , config conditions , toolchain contexts , use toolchain transition , transitive root causes , ( ( configured rule class provider ) rule class provider ) get trimming transition factory ( ) ) ; } catch ( dependency resolver failure e ) { env get listener ( ) handle ( event error ( e get location ( ) , e get message ( ) ) ) ; env get listener ( ) post ( new analysis root cause event ( configuration , label , e get message ( ) ) ) ; throw new dependency evaluation exception ( new configured value creation exception ( e get message ( ) , label , configuration ) ) ; } catch ( inconsistent aspect order exception e ) { env get listener ( ) handle ( event error ( e get location ( ) , e get message ( ) ) ) ; throw new dependency evaluation exception ( e ) ; } / / trim each dep ' s configuration so it only includes the fragments needed by its transitive / / closure configuration resolver config resolver = new configuration resolver ( env , ctg value , host configuration , default build options , config conditions ) ; ordered set multimap < dependency kind , dependency > dep value names = config resolver resolve configurations ( initial dependencies ) ; / / return early in case packages were not loaded yet in theory , we could start configuring / / dependent targets in loaded packages however , that creates an artificial sync boundary / / between loading all dependent packages ( fast ) and configuring some dependent targets ( can / / have a long tail ) if ( env values missing ( ) ) { return null ; } / / resolve configured target dependencies and handle errors map < sky key , configured target and data > dep values = resolve configured target dependencies ( env , ctg value , dep value names values ( ) , transitive packages for package root resolution , transitive root causes ) ; if ( dep values = = null ) { return null ; } / / resolve required aspects ordered set multimap < dependency , configured aspect > dep aspects = aspect resolver resolve aspect dependencies ( env , dep values , dep value names values ( ) , transitive packages for package root resolution ) ; if ( dep aspects = = null ) { return null ; } / / merge the dependent configured targets and aspects into a single map try { return aspect resolver merge aspects ( dep value names , dep values , dep aspects ) ; } catch ( duplicate exception e ) { env get listener ( ) handle ( event error ( ctg value get target ( ) get location ( ) , e get message ( ) ) ) ; throw new configured value creation exception ( e get message ( ) , label , configuration ) ; } }


public void test backward flow with multi branch into delay slot from delay slot ( ) throws exception { program builder add bytes branch ( 4 , 14 ) ; program builder add bytes fallthrough ( 10 ) ; program builder add bytes branch with delay slot ( 12 , 22 ) ; program builder add bytes return ( 16 ) ; program builder add bytes branch with delay slot ( 20 , 14 ) ; program builder add bytes return ( 24 ) ; program builder disassemble ( to hex ( 4 ) , 2 , false ) ; program builder disassemble ( to hex ( 10 ) , 6 , false ) ; program builder disassemble ( to hex ( 16 ) , 2 , false ) ; program builder disassemble ( to hex ( 20 ) , 6 , false ) ; address addr = address ( 16 ) ; address set address set = new address set ( addr ) ; follow flow follow flow = new follow flow ( program , address set , follow all flows ( ) ) ; address set flow addresses = follow flow get flow to address set ( task monitor adapter dummy monitor ) ; address set expected addresses = new address set ( ) ; expected addresses add ( address ( 4 ) , address ( 5 ) ) ; expected addresses add ( address ( 14 ) , address ( 17 ) ) ; expected addresses add ( address ( 20 ) , address ( 23 ) ) ; assert equals ( new my selection ( expected addresses ) , new my selection ( flow addresses ) ) ; }


get the optional string value associated with an index it returns an empty string if there is no value at that index if the value is not a string and is not null , then it is coverted to a string

public string opt string ( int index ) { return opt string ( index , " " ) ; }


put all adds all key - value pairs from the given map

public void test put all ( ) { concurrent map empty = map ( ) ; concurrent map map = map 5 ( ) ; empty put all ( map ) ; assert equals ( 5 , empty size ( ) ) ; assert true ( empty contains key ( one ) ) ; assert true ( empty contains key ( two ) ) ; assert true ( empty contains key ( three ) ) ; assert true ( empty contains key ( four ) ) ; assert true ( empty contains key ( five ) ) ; }


converts this descriptor into a set of properties

public map < string , string > to properties ( ) { descriptor properties properties = new descriptor properties ( ) ; if ( from ! = null ) { properties put string ( function descriptor validator from , from ) ; } if ( class instance ! = null ) { properties put properties ( class instance to properties ( ) ) ; } if ( fully qualified name ! = null ) { properties put string ( python function validator fully qualified name , fully qualified name ) ; } return properties as map ( ) ; }


assert a cookie does not exist note that the existence check is irrespective of whether max age is 0 , i e expired

public result matcher does not exist ( string name ) { return result - > { cookie cookie = result get response ( ) get cookie ( name ) ; assert null ( " unexpected cookie with name ' " + name + " ' " , cookie ) ; } ; }


client api request log rt | status | request ip | op type | data id | group | datum id | md 5

private object log client request ( string request type , proceeding join point pjp , http servlet request request , http servlet response response , string data id , string group , string tenant , string md 5 ) throws throwable { final string request ip = request util get remote ip ( request ) ; string app name = request get header ( request util client appname header ) ; final long st = system current time millis ( ) ; object ret val = pjp proceed ( ) ; final long rt = system current time millis ( ) - st ; / / rt | status | request ip | op type | data id | group | datum id | md 5 | / / app name log util client log info ( " { } | { } | { } | { } | { } | { } | { } | { } | { } " , rt , ret val , request ip , request type , data id , group , tenant , md 5 , app name ) ; return ret val ; }


session credentials will not propagate with role tokens , so the superclass ' s method will fail this subclass intercepts the exception which is expected

protected abstract s 3 a token identifier verify credential propagation ( final s 3 a file system fs , final marshalled credentials marshalled credentials , final configuration conf ) throws exception { intercept ( delegation token i o exception class , e no session tokens for role binding , ( ) - > super verify credential propagation ( fs , marshalled credentials , conf ) ) ; return null ; }


child class implements this method to realize { @ code array offset ( ) }

abstract int protected array offset ( ) ;


clears the playlist and adds the specified { @ link media item media items }

void set media items ( list < media item > media items , boolean reset position ) ;


public static list < acl > parse ( string acl string ) { list < acl > acl ; string [ ] acls = acl string split ( " , " ) ; acl = new array list < acl > ( ) ; for ( string a : acls ) { int first colon = a index of ( ' : ' ) ; int last colon = a last index of ( ' : ' ) ; if ( first colon = = - 1 | | last colon = = - 1 | | first colon = = last colon ) { system err println ( a + " does not have the form scheme : id : perm " ) ; continue ; } acl new acl = new acl ( ) ; new acl set id ( new id ( a substring ( 0 , first colon ) , a substring ( first colon + 1 , last colon ) ) ) ; new acl set perms ( get perm from string ( a substring ( last colon + 1 ) ) ) ; acl add ( new acl ) ; } return acl ; }


turn onoff the caching of the xslt templates the default value is " true " only set this to " false " in development , where caching does not seriously impact performance

public void set cache templates ( boolean cache templates ) { this cache templates = cache templates ; }


deletes users after every test just in case any test adds any

public void delete users ( ) throws exception { client yaml test response response = get admin execution context ( ) call api ( " security get user " , empty map ( ) , empty list ( ) , empty map ( ) ) ; @ suppress warnings ( " unchecked " ) map < string , object > users = ( map < string , object > ) response get body ( ) ; for ( string user : users key set ( ) ) { map < ? , ? > metadata map = ( map < ? , ? > ) ( ( map < ? , ? > ) users get ( user ) ) get ( " metadata " ) ; boolean reserved = metadata map = = null ? null : ( boolean ) metadata map get ( " reserved " ) ; if ( reserved = = null | | reserved = = false ) { logger warn ( " deleting leftover user { } " , user ) ; get admin execution context ( ) call api ( " security delete user " , singleton map ( " username " , user ) , empty list ( ) , empty map ( ) ) ; } } }


get a reference to the wrapped input stream used by unit tests

public input stream get wrapped stream ( ) { return in ; }


aggregate response data and convert to a string using the " content - type " charset or " utf - 8 " by default

public mono < string > get body as string ( ) { charset charset = optional of nullable ( get headers ( ) get content type ( ) ) map ( mime type : : get charset ) or else ( standard charsets utf 8 ) ; return data buffer utils join ( get body ( ) ) map ( buffer - > { string s = buffer to string ( charset ) ; data buffer utils release ( buffer ) ; return s ; } ) default if empty ( " " ) ; }


the package contains two targets with the same name

private static name conflict exception name conflict ( target duplicate , target existing ) { return new name conflict exception ( duplicate get target kind ( ) + " ' " + duplicate get name ( ) + " ' in package ' " + duplicate get label ( ) get package name ( ) + " ' " + conflicts with ( existing ) ) ; }


sets the requests optional " timeout " parameter

public void timeout ( time value timeout ) { this timeout = timeout ; }


delete the child node entry ( key and buffer id ) associated with the specified key index all entries after index are shifted left the node key count is adjusted to reflect the removal of a child

private void delete entry ( int index ) { if ( key count < 3 | | index > = key count ) throw new assert exception ( ) ; + + index ; if ( index < key count ) { int start = base + ( index * entry size ) ; int end = base + ( key count * entry size ) ; buffer move ( start , start - entry size , end - start ) ; } set key count ( key count - 1 ) ; }


get petfind by tags : finds pets by tags multiple tags can be provided with comma separated strings use tag 1 , tag 2 , tag 3 for testing

response entity < set < pet > > find pets by tags ( @ not null @ api param ( value = " tags to filter by " , required = true ) @ valid @ request param ( value = " tags " , required = true ) set < string > tags ) ;


creates a binary log that writes to a temp file < b > warning : < b > this implementation is not performance optimized , and r p cs will experience back pressure if disk io does not keep up

public static binary log create binary log ( ) throws i o exception { return new binary log provider impl ( ) ; }


public builder base url ( url base url ) { objects require non null ( base url , " base url = = null " ) ; return base url ( http url get ( base url to string ( ) ) ) ; }


base 6 4 - decode the given string as string

public static string decode base 6 4 to string ( final string data ) { return new string ( decode base 6 4 ( data ) , standard charsets utf 8 ) ; }


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


is the store guarded non - authoritatively on the test path ?

public boolean is non auth ( ) { return is non auth ; }


public float get float ( ) { return float ; }


collects all named placeholders from the template while replacing them with % s example : for { @ code template } " % { name } % { locales } foo " , it will return " % s % s foo " and store " name " and " locales " in { @ code placeholders } incomplete placeholders are treated like text : for " a - % { x } - % { y " this method returns " a - % s - % % { y " and stores " x " in { @ code placeholders }

public static string create placeholder substitution format string ( string template , collection < string > placeholders ) { return create placeholder substitution format string recursive ( template , placeholders , new string builder ( ) ) ; }


returns the default operator for the query

public operator default operator ( ) { return this default operator ; }


protected boolean contains p k ( list < string > columns ) { if ( columns = = null | | columns is empty ( ) ) { return false ; } list < string > new columns = column utils del escape ( columns , get db type ( ) ) ; return get table meta ( ) contains p k ( new columns ) ; }


wait for service to finish ( normally , it runs forever )

public void join ( ) { try { rpc server join ( ) ; } catch ( interrupted exception ie ) { log info ( " caught interrupted exception " , ie ) ; } }


returns the members injector key for the raw type of { @ code type } parameterized types are not currently supported for members injection in generated code

public static string raw members key ( type mirror type ) { return " members / " + raw type to string ( type , ' $ ' ) ; }


get an instance based on the exception : either a value or a reference to { @ link # none }

public static maybe i o e of ( i o exception ex ) { return ex ! = null ? new maybe i o e ( ex ) : none ; }


test get with offset and length parameters that combine to request a length greater than actual file length

public void test offset plus length params longer than file ( ) throws i o exception { web hdfs file system webhdfs = ( web hdfs file system ) fs ; path dir = new path ( " / test " ) ; assert true ( webhdfs mkdirs ( dir ) ) ; / / create a file with some content path test file = new path ( " / test / test offset plus length params longer than file " ) ; string content = " test offset plus length params longer than file " ; f s data output stream test file out = webhdfs create ( test file ) ; try { test file out write ( content get bytes ( " us - ascii " ) ) ; } finally { i o utils close stream ( test file out ) ; } / / open the file , but request offset starting at 1 and length equal to file / / length considering the offset , this is longer than the actual content http op param op op = get op param op open ; url url = webhdfs to url ( op , test file , new length param ( long value of ( content length ( ) ) ) , new offset param ( 1l ) ) ; http u r l connection conn = null ; input stream is = null ; try { conn = ( http u r l connection ) url open connection ( ) ; conn set request method ( op get type ( ) to string ( ) ) ; conn set do output ( op get do output ( ) ) ; conn set instance follow redirects ( true ) ; / / expect ok response and content - length header equal to actual length assert equals ( http servlet response sc ok , conn get response code ( ) ) ; assert equals ( string value of ( content length ( ) - 1 ) , conn get header field ( " content - length " ) ) ; / / check content matches byte [ ] resp body = new byte [ content length ( ) - 1 ] ; is = conn get input stream ( ) ; i o utils read fully ( is , resp body , 0 , content length ( ) - 1 ) ; assert equals ( content substring ( 1 ) , new string ( resp body , " us - ascii " ) ) ; } finally { i o utils close stream ( is ) ; if ( conn ! = null ) { conn disconnect ( ) ; } } }


write the task specific job - configuration file

private static void write local job file ( path job file , job conf conf ) throws i o exception { file system local fs = file system get local ( conf ) ; local fs delete ( job file ) ; output stream out = null ; try { out = file system create ( local fs , job file , urw gr ) ; conf write xml ( out ) ; } finally { i o utils cleanup with logger ( log , out ) ; } }


return the cci template used by this operation

public org springframework jca cci core cci template get cci template ( ) { return this cci template ; }


mark this transaction as completed , that is , committed or rolled back

public void set completed ( ) { this completed = true ; }


returns inclusion object for non - standard inclusion cases or null if inclusion should be ignored

protected inclusion create other inclusion ( string inclusion content ) { return null ; }


put a keydouble pair in the j s o n object

public j s o n object put ( string key , double value ) throws j s o n exception { put ( key , new double ( value ) ) ; return this ; }


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


advances the time by the given duration time can also move backwards by supplying a negative value this method performs no overflow check

public void advance time ( duration duration ) { current time add and get ( duration to nanos ( ) ) ; }


discover all the service provider implementations of the given class , via { @ code meta - i n fservices }

public < t > collection < class < ? extends t > > discover ( class < t > spi ) { set < class < ? extends t > > result = new hash set < > ( ) ; for ( plugin wrapper p : active plugins ) { service load ( spi , p class loader , result ) ; } return result ; }


returns the number of bits in the underlying bit array

long bit size ( ) { return bits bit size ( ) ; }


list of all { @ link view property } s exposed primarily for the remoting api

public list < view property > get all properties ( ) { return get properties ( ) to list ( ) ; }


all method invocations on this mock can be empty - it means there were no interactions with the mock this method is useful for framework integrators and for certain edge cases manipulating the collection ( e g by removing , adding elements ) is safe and has no effect on the mock throws meaningful exception when object wrapped by mocking details is not a mock

collection < invocation > get invocations ( ) ;


performs union on the vertices and edges sets of the input graphs removing duplicate vertices but maintaining duplicate edges

public graph < k , vv , ev > union ( graph < k , vv , ev > graph ) { data set < vertex < k , vv > > unioned vertices = graph get vertices ( ) union ( this get vertices ( ) ) name ( " vertices " ) distinct ( ) name ( " vertices " ) ; data set < edge < k , ev > > unioned edges = graph get edges ( ) union ( this get edges ( ) ) name ( " edges " ) ; return new graph < > ( unioned vertices , unioned edges , this context ) ; }


returns a string which describes this node todo rename to ` get description ` once all exec nodes do not extend from flink physical rel , because rel node already has ` get description ` method


public static void unregister ( process engine process engine ) { process engines remove ( process engine get name ( ) ) ; }


fake endpoint for testing various parameters 가짜 엔드 포인트 fake endpoint for testing various parameters 가짜 엔드 포인트

public void test endpoint parameters ( big decimal number , double double , string pattern without delimiter , byte [ ] byte , integer integer , integer int 3 2 , long int 6 4 , float float , string string , async file binary , local date date , offset date time date time , string password , string param callback , handler < async result < void > > result handler ) { test endpoint parameters ( number , double , pattern without delimiter , byte , integer , int 3 2 , int 6 4 , float , string , binary , date , date time , password , param callback , null , result handler ) ; }


returns the number of keyvalue pairs in the object

public int size ( ) { return members size ( ) ; }


tests the making of a new file on root which is not matching to any of fallback files on root

public void test create file on root with fallback enabled ( ) throws exception { configuration conf = new configuration ( ) ; path fallback target = new path ( target test root , " fallback dir " ) ; fs target mkdirs ( fallback target ) ; config util add link ( conf , " / user 1 / hive / " , new path ( target test root to string ( ) ) to uri ( ) ) ; config util add link fallback ( conf , fallback target to uri ( ) ) ; abstract file system vfs = abstract file system get ( view fs default cluster uri , conf ) ; path vfs test file = new path ( " / test file " ) ; path test file in fallback = path merge paths ( fallback target , vfs test file ) ; assert false ( fs target exists ( test file in fallback ) ) ; vfs create ( vfs test file , enum set of ( create ) , options create opts perms ( fs permission get default ( ) ) ) close ( ) ; / / / test file should be created in fallback assert true ( fs target exists ( test file in fallback ) ) ; }


returns a list of all the symbols with the given name in the given namespace

public final list < symbol > get symbols ( string name , namespace namespace ) { return current program get symbol table ( ) get symbols ( name , namespace ) ; }


returns the number of edges in the graph

public int num edges ( ) { return this edges ( ) size ( ) ; }


the pointer index for the event the first touch is index 0 , second touch is index 1 , etc always - 1 on desktop valid for : touch down , touch dragged , touch up , enter , and exit

public int get pointer ( ) { return pointer ; }


return true if this array test object is equal to o

public boolean equals ( object o ) { if ( this = = o ) { return true ; } if ( o = = null | | get class ( ) ! = o get class ( ) ) { return false ; } array test array test = ( array test ) o ; return objects equals ( this array of string , array test array of string ) & & objects equals ( this array array of integer , array test array array of integer ) & & objects equals ( this array array of model , array test array array of model ) ; }


gets the limit for reading bytes from the given memory segment this method must return the position of the byte after the last valid byte in the given memory segment when the position returned by this method is reached , the view will attempt to switch to the next memory segment

protected abstract int get limit for segment ( memory segment segment ) ;


tells a plugin that it is no longer needed the plugin should remove itself from anything that it is registered to and release any resources

public void dispose ( ) { if ( current program ! = null ) { current program remove listener ( this ) ; } }


called after a workspace is deleted successfully

public void after delete ( abstract project project ) { }


add a " max - age = " directive this directive is well suited for publicly caching resources , knowing that they won ' t change within the configured amount of time additional directives can be also used , in case resources shouldn ' t be cached ( { @ link # cache private ( ) } ) or transformed ( { @ link # no transform ( ) } ) by shared caches in order to prevent caches to reuse the cached response even when it has become stale ( i e the " max - age " delay is passed ) , the " must - revalidate " directive should be set ( { @ link # must revalidate ( ) }

public static cache control max age ( long max age , time unit unit ) { return max age ( duration of seconds ( unit to seconds ( max age ) ) ) ; }


delete storeorder { order id } : delete purchase order by id for valid response try integer i ds with value & lt ; 1000 anything above 1000 or nonintegers will generate api errors

default response entity < void > delete order ( @ api param ( value = " id of the order that needs to be deleted " , required = true ) @ path variable ( " order id " ) string order id ) { return new response entity < > ( http status not implemented ) ; }


public static double to double ( byte [ ] bytes ) { return double long bits to double ( to long ( bytes ) ) ; }


print the client list into log for confirm how many clients built

private void print remote client list ( ) { if ( logger is debug enabled ( ) ) { string builder addresses = new string builder ( ) ; this using clients for each ( client - > addresses append ( client get address ( ) to string ( ) ) append ( " , " ) ) ; logger debug ( " remote client list : { } " , addresses ) ; } }


method that returns whether we can rollup from inner time unit to outer time unit

private static boolean can roll up ( time unit outer , time unit inner ) { / / special handling for quarter as it is not in the expected / / order in time unit switch ( outer ) { case year : case month : case day : case hour : case minute : case second : case millisecond : case microsecond : switch ( inner ) { case year : case quarter : case month : case day : case hour : case minute : case second : case millisecond : case microsecond : if ( inner = = time unit quarter ) { return outer = = time unit year ; } return outer ordinal ( ) < = inner ordinal ( ) ; } break ; case quarter : switch ( inner ) { case quarter : case month : case day : case hour : case minute : case second : case millisecond : case microsecond : return true ; } } return false ; }


gets the item with the given key , or null if there is no such item it is the caller ' s responsibility to close the returned reference once not needed anymore

public closeable reference < v > get ( final k key ) { preconditions check not null ( key ) ; final entry < k , v > old l f u exclusive ; final entry < k , v > old m f u exclusive ; closeable reference < v > client ref = null ; synchronized ( this ) { old l f u exclusive = m least frequently used exclusive entries remove ( key ) ; old m f u exclusive = m most frequently used exclusive entries remove ( key ) ; entry < k , v > entry = m cached entries get ( key ) ; if ( entry ! = null ) { client ref = new client reference ( entry ) ; } else { maybe update cache fraction ( key ) ; } } maybe notify exclusive entry removal ( old l f u exclusive , old m f u exclusive ) ; maybe update cache params ( ) ; maybe evict entries ( ) ; return client ref ; }


private void parse id 3 header ( ) { id 3 output sample data ( id 3 header buffer , id3 header size ) ; id 3 header buffer set position ( id3 size offset ) ; set reading sample state ( id 3 output , 0 , id3 header size , id 3 header buffer read synch safe int ( ) + id3 header size ) ; }


add additional hidden choices this function can be called multiple times these choices will not be printed in the usage string

public choice parameter add hidden choices ( string hidden choices ) { collections add all ( this hidden choices , hidden choices ) ; return this ; }


returns the apple architecture implied by apple command line options and core options

private string determine single architecture ( apple command line options apple options , core options config options ) { if ( ! strings is null or empty ( apple options apple split cpu ) ) { return apple options apple split cpu ; } switch ( apple options apple platform type ) { case ios : if ( ! apple options ios multi cpus is empty ( ) ) { return apple options ios multi cpus get ( 0 ) ; } else { return apple configuration ios cpu from cpu ( config options cpu ) ; } case watchos : if ( apple options watchos cpus is empty ( ) ) { return apple command line options default watchos cpu ; } return apple options watchos cpus get ( 0 ) ; case tvos : if ( apple options tvos cpus is empty ( ) ) { return apple command line options default tvos cpu ; } return apple options tvos cpus get ( 0 ) ; case macos : if ( apple options macos cpus is empty ( ) ) { return apple command line options default macos cpu ; } return apple options macos cpus get ( 0 ) ; case catalyst : if ( apple options catalyst cpus is empty ( ) ) { return apple command line options default catalyst cpu ; } return apple options catalyst cpus get ( 0 ) ; default : throw new illegal argument exception ( " unhandled platform type " + apple options apple platform type ) ; } }


returns the largest index for which { @ link # get } returns { @ code target } , or { @ code - 1 } if no such index exists equivalent to { @ code as list ( ) last index of ( target ) }

public int last index of ( long target ) { for ( int i = end - 1 ; i > = start ; i - - ) { if ( array [ i ] = = target ) { return i - start ; } } return - 1 ; }


returns whether the ad group has at least one ad that still needs to be played

public boolean has unplayed ads ( ) { return count = = c length unset | | get first ad index to play ( ) < count ; }


similar to load 6 4 , but allows offset + 8 > input length , padding the result with zeroes this has to explicitly reverse the order of the bytes as it packs them into the result which makes it slower than the native version

static long load 6 4 safely ( byte [ ] input , int offset , int length ) { long result = 0 ; / / due to the way we shift , we can stop iterating once we ' ve run out of data , the rest / / of the result already being filled with zeros / / this loop is critical to performance , so please check hash benchmark if altering it int limit = math min ( length , 8 ) ; for ( int i = 0 ; i < limit ; i + + ) { / / shift value left while iterating logically through the array result | = ( input [ offset + i ] & 0x f f l ) < < ( i * 8 ) ; } return result ; }


return the name of the bound root object


writes a { @ code double } as specified by { @ link data output stream # write double ( double ) } , except using little - endian byte order

public void write double ( double v ) throws i o exception { write long ( double double to long bits ( v ) ) ; }


public static boolean is remember me authentication enabled ( final request context context ) { return context get flow scope ( ) get boolean ( " remember me authentication enabled " , boolean false ) ; }


performs a quick search for the given item in the < b > unfiltered < b > data of this model to search only for object that are visible in the gui , use { @ link # get index for row object ( object ) }

protected int get unfiltered index for row object ( row object row object ) { return get index for row object ( row object , get unfiltered data ( ) ) ; }


public static erasure coding policy get by name ( string name ) { return system policies by name get ( name ) ; }


void read xml config ( file xml config file ) throws i o exception , parser configuration exception , s a x exception { if ( ! xml config file exists ( ) ) { return ; } system out printf ( " reading config file , % s \ n " , xml config file get absolute path ( ) ) ; buffered input stream input = null ; try { document builder factory factory = document builder factory new instance ( ) ; input = new buffered input stream ( new file input stream ( xml config file ) ) ; input source source = new input source ( input ) ; factory set namespace aware ( false ) ; factory set validating ( false ) ; document builder builder = factory new document builder ( ) ; / / block any external content resolving actions since we don ' t need them and a report / / says these actions may cause security problems builder set entity resolver ( new entity resolver ( ) { @ override public input source resolve entity ( string public id , string system id ) throws s a x exception , i o exception { return new input source ( ) ; } } ) ; document document = builder parse ( source ) ; node list issues = document get elements by tag name ( tag issue ) ; for ( int i = 0 , count = issues get length ( ) ; i < count ; i + + ) { node node = issues item ( i ) ; element element = ( element ) node ; string id = element get attribute ( attr id ) ; if ( id length ( ) = = 0 ) { system err println ( " invalid config file : missing required issue id attribute " ) ; continue ; } if ( id equals ( property issue ) ) { read property from xml ( node ) ; } else if ( id equals ( dex issue ) ) { read dex patterns from xml ( node ) ; } else if ( id equals ( so issue ) ) { read lib patterns from xml ( node ) ; } else if ( id equals ( res issue ) ) { read res patterns from xml ( node ) ; } else if ( id equals ( package config issue ) ) { read package config from xml ( node ) ; } else if ( id equals ( sign issue ) ) { if ( m use sign a pk ) { read sign from xml ( node ) ; } } else if ( id equals ( arkhot issue ) ) { read ark hot property from xml ( node ) ; } else { system err println ( " unknown issue " + id ) ; } } } finally { i o helper close quietly ( input ) ; } }


this test simulates : - a first authentication for a default service - a second authentication with the renew parameter and the same service ( and same credentials ) - a validation of the second ticket when supplemental authentications were returned with the chained authentications , the validation specification failed as it only expects one authentication thus supplemental authentications should not be returned in the chained authentications both concepts are orthogonal

public void verify authenticate twice with renew ( ) throws abstract ticket exception , authentication exception { val cas = get central authentication service ( ) ; val svc = get service ( " test default " ) ; val ctx = core authentication test utils get authentication result ( get authentication system support ( ) , svc ) ; val tgt id = cas create ticket granting ticket ( ctx ) ; cas grant service ticket ( tgt id get id ( ) , svc , ctx ) ; val st 2 id = cas grant service ticket ( tgt id get id ( ) , svc , ctx ) ; val assertion = cas validate service ticket ( st 2 id get id ( ) , svc ) ; val validation specification = new cas 2 0 without proxying validation specification ( mock ( services manager class ) ) ; assert true ( validation specification is satisfied by ( assertion , new mock http servlet request ( ) ) ) ; }


reads value as diff from stream if this serializer supports diffable values reading operation can be made dependent on map key

diff < v > read diff ( stream input in , k key ) throws i o exception ;


tests stepping the cache replication factor up and down , checking the number of cached replicas and blocks as well as the advertised locations

public void test replication factor ( ) throws exception { / / create the pool final string pool = " friendly pool " ; dfs add cache pool ( new cache pool info ( pool ) ) ; / / create some test files final list < path > paths = new linked list < path > ( ) ; paths add ( new path ( " / foo / bar " ) ) ; paths add ( new path ( " / foo / baz " ) ) ; paths add ( new path ( " / foo 2 / bar 2 " ) ) ; paths add ( new path ( " / foo 2 / baz 2 " ) ) ; dfs mkdir ( new path ( " / foo " ) , fs permission get dir default ( ) ) ; dfs mkdir ( new path ( " / foo 2 " ) , fs permission get dir default ( ) ) ; final int num blocks per file = 2 ; for ( path path : paths ) { file system test helper create file ( dfs , path , num blocks per file , ( int ) block size , ( short ) 3 , false ) ; } wait for cached blocks ( namenode , 0 , 0 , " test replication factor : 0 " ) ; check num cached replicas ( dfs , paths , 0 , 0 ) ; / / cache directory long id = dfs add cache directive ( new cache directive info builder ( ) set path ( new path ( " / foo " ) ) set replication ( ( short ) 1 ) set pool ( pool ) build ( ) ) ; wait for cached blocks ( namenode , 4 , 4 , " test replication factor : 1 " ) ; check num cached replicas ( dfs , paths , 4 , 4 ) ; / / step up the replication factor for ( int i = 2 ; i < = 3 ; i + + ) { dfs modify cache directive ( new cache directive info builder ( ) set id ( id ) set replication ( ( short ) i ) build ( ) ) ; wait for cached blocks ( namenode , 4 , 4 * i , " test replication factor : 2 " ) ; check num cached replicas ( dfs , paths , 4 , 4 * i ) ; } / / step it down for ( int i = 2 ; i > = 1 ; i - - ) { dfs modify cache directive ( new cache directive info builder ( ) set id ( id ) set replication ( ( short ) i ) build ( ) ) ; wait for cached blocks ( namenode , 4 , 4 * i , " test replication factor : 3 " ) ; check num cached replicas ( dfs , paths , 4 , 4 * i ) ; } / / remove and watch num cached go to 0 dfs remove cache directive ( id ) ; wait for cached blocks ( namenode , 0 , 0 , " test replication factor : 4 " ) ; check num cached replicas ( dfs , paths , 0 , 0 ) ; }


public pair < string , string > get grammar ( ) { string grammar = null ; final class loader loader = thread current thread ( ) get context class loader ( ) ; final url stuff = loader get resource ( " org / antlr / v 4 / test / runtime / large lexer g 4 " ) ; try { grammar = new string ( files read all bytes ( paths get ( stuff to u r i ( ) ) ) ) ; } catch ( exception e ) { system err println ( " cannot find grammar org / antlr / v 4 / test / runtime / large lexer g 4 " ) ; } return new pair < > ( grammar name , grammar ) ; }


set the range of start times to filter applications on

public abstract void set start range ( long begin , long end ) throws illegal argument exception ;


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

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


checks if an application - defined state backend is given , and if not , loads the state backend from the configuration , from the parameter ' state backend ' , as defined in { @ link checkpointing options # state backend } if no state backend is configured , this instantiates the default state backend ( the { @ link memory state backend } ) if an application - defined state backend is found , and the state backend is a { @ link configurable state backend } , this methods calls { @ link configurable state backend # configure ( readable config , class loader ) } on the state backend refer to { @ link # load state backend from config ( readable config , class loader , logger ) } for details on how the state backend is loaded from the configuration

public static state backend from application or config or default ( @ nullable state backend from application , configuration config , class loader class loader , @ nullable logger logger ) throws illegal configuration exception , dynamic code loading exception , i o exception { check not null ( config , " config " ) ; check not null ( class loader , " class loader " ) ; final state backend backend ; / / ( 1 ) the application defined state backend has precedence if ( from application ! = null ) { / / see if this is supposed to pick up additional configuration parameters if ( from application instanceof configurable state backend ) { / / needs to pick up configuration if ( logger ! = null ) { logger info ( " using job / cluster config to configure application - defined state backend : { } " , from application ) ; } backend = ( ( configurable state backend ) from application ) configure ( config , class loader ) ; } else { / / keep as is ! backend = from application ; } if ( logger ! = null ) { logger info ( " using application - defined state backend : { } " , backend ) ; } } else { / / ( 2 ) check if the config defines a state backend final state backend from config = load state backend from config ( config , class loader , logger ) ; if ( from config ! = null ) { backend = from config ; } else { / / ( 3 ) use the default backend = new memory state backend factory ( ) create from config ( config , class loader ) ; if ( logger ! = null ) { logger info ( " no state backend has been configured , using default ( memory / job manager ) { } " , backend ) ; } } } return backend ; }


this method is invoked with the time which the callback register for

void on processing time ( long time ) throws i o exception ;


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


method for passing user defined operators along with the type information that will transform the operator transformation < b > important : < b > any output from this operator will be discarded

public bootstrap transformation < t > transform ( savepoint writer operator factory factory ) { return new bootstrap transformation < > ( data set , operator max parallelism , timestamper , factory ) ; }


public float get density ( ) { return fixture get density ( ) ; }


public database meta data get meta data ( ) throws s q l exception { return null ; }


sets the string the parser should look for as an identifier for flag aliases

public builder with alias flag ( @ nullable string alias flag ) { this impl builder with alias flag ( alias flag ) ; return this ; }


void clear resolve errors ( ) { if ( error buf length ( ) > 0 ) { error buf = new string buffer ( ) ; } }


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 , char p 1 , @ nullable decl object p 2 ) { if ( obj = = null ) { throw new null pointer exception ( lenient format ( error message template , p 1 , p 2 ) ) ; } return obj ; }


returns a { @ link channel matcher } that matches all { @ link channel } s that are of type { @ link server channel }

public static channel matcher is server channel ( ) { return server channel matcher ; }


returns a string to string map containing the execution properties of this action

immutable map < string , string > get exec properties ( ) ;


this is a generic method for testing merge conflicts for equates on data it sets the bytes to those indicated beginning at the indicated address and then creates data using the specified data type at that address it then creates a conflicting equate name and chooses the latest or my change based on the boolean flag , choose my

protected void run test add name diff pick indicated ( string address , data type dt , byte [ ] bytes , long expected value , boolean choose my ) throws exception { mtf initialize ( " notepad merge listing test " , new original program modifier listener ( ) { @ override public void modify original ( program d b program ) { int tx id = program start transaction ( " setup original program " ) ; boolean commit = false ; try { listing listing = program get listing ( ) ; address addr = addr ( program , address ) ; try { program get memory ( ) set bytes ( addr , bytes ) ; listing create data ( addr , dt ) ; } catch ( code unit insertion exception | data type conflict exception | memory access exception e ) { assert fail ( e get message ( ) ) ; } data data = listing get data at ( addr ) ; assert assert true ( data ! = null ) ; assert assert true ( dt is equivalent ( data get data type ( ) ) ) ; commit = true ; } finally { program end transaction ( tx id , commit ) ; } } @ override public void modify latest ( program d b program ) { int tx id = program start transaction ( " modify latest program " ) ; boolean commit = false ; try { equate table equate tab = program get equate table ( ) ; address addr = addr ( program , address ) ; try { equate tab create equate ( " foo " , expected value ) add reference ( addr , 0 ) ; } catch ( duplicate name exception | invalid input exception e ) { assert fail ( e get message ( ) ) ; } commit = true ; } finally { program end transaction ( tx id , commit ) ; } } @ override public void modify private ( program d b program ) { int tx id = program start transaction ( " modify my program " ) ; boolean commit = false ; try { equate table equate tab = program get equate table ( ) ; address addr = addr ( program , address ) ; try { equate tab create equate ( " bar " , expected value ) add reference ( addr , 0 ) ; } catch ( duplicate name exception | invalid input exception e ) { assert fail ( e get message ( ) ) ; } commit = true ; } finally { program end transaction ( tx id , commit ) ; } } } ) ; execute merge ( ask user ) ; choose equate ( address , 0 , ( choose my ? keep my : keep latest ) ) ; wait for merge completion ( ) ; equate table equate tab = result program get equate table ( ) ; list < equate > equates = equate tab get equates ( addr ( address ) , 0 ) ; assert equals ( 1 , equates size ( ) ) ; equate eq = equates get ( 0 ) ; assert equals ( ( choose my ? " bar " : " foo " ) , eq get name ( ) ) ; assert equals ( expected value , eq get value ( ) ) ; }


return a special channel promise which can be reused for different operations it ' s only supported to use it for { @ link channel outbound invoker # write ( object , channel promise ) } be aware that the returned { @ link channel promise } will not support most operations and should only be used if you want to save an object allocation for every write operation you will not be able to detect if the operation was complete , only if it failed as the implementation will call { @ link channel pipeline # fire exception caught ( throwable ) } in this case be aware this is an expert feature and should be used with care !


shows the playback controls if { @ link # get show timeout ms ( ) } is positive then the controls will be automatically hidden after this duration of time has elapsed without user input

public void show ( ) { control view layout manager show ( ) ; }


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


public boolean get bool item ( ) { return bool item ; }


public string get mime type ( ) { return this mime type ; }


returns the subset of the given dexopts that are blacklisted from using incremental dexing by default

static iterable < string > blacklisted dexopts ( rule context rule context , list < string > dexopts ) { return iterables filter ( dexopts , new flag matcher ( get android config ( rule context ) get target dexopts that prevent incremental dexing ( ) ) ) ; }


trying to abort an upload with no data does not create a file

public void test abort all pending uploads ( ) throws exception { describe ( " initialize upload and abort the pending upload " ) ; path path = method path ( ) ; path file = new path ( path , " child " ) ; upload handle upload = start upload ( file ) ; try { completable future < integer > o f = get random uploader ( ) abort uploads under path ( path get parent ( ) ) ; int aborted uploads = await future ( o f ) ; if ( aborted uploads > = 0 ) { / / uploads can be aborted assertions assert that ( aborted uploads ) described as ( " number of uploads aborted " ) is greater than or equal to ( 1 ) ; assert path does not exist ( " uploaded file should not exist " , file ) ; } } finally { abort upload quietly ( upload , file ) ; } }


get or create { @ link annotation type mappings } for the specified annotation type

annotation type mappings get ( class < ? extends annotation > annotation type ) { return this mappings compute if absent ( annotation type , this : : create mappings ) ; }


model tests for additional properties array

public void test additional properties array ( ) { / / todo : test additional properties array }


if rm should enforce partition exclusivity for enforced partition " x " : 1 ) if request is " x " and app label is not " x " , override request to app ' s label 2 ) if app label is " x " , ensure request is " x "

public static void enforce partition exclusivity ( resource request res req , set < string > enforced partitions , string app label ) { if ( enforced partitions = = null | | enforced partitions is empty ( ) ) { return ; } if ( ! enforced partitions contains ( app label ) & & enforced partitions contains ( res req get node label expression ( ) ) ) { res req set node label expression ( app label ) ; } if ( enforced partitions contains ( app label ) ) { res req set node label expression ( app label ) ; } }


pet get pet by id ( @ param ( " pet id " ) long pet id ) ;


public channel credentials build ( ) { return new tls channel credentials ( this ) ; }


returns the service configuration properties property names are trimmed off from its prefix the sevice configuration properties are all properties with names starting with < code > # server # # service # < code > in the server configuration

protected configuration get service config ( ) { return service config ; }


public document db mapping context create document db mapping context ( ) { val document db mapping context = new document db mapping context ( ) ; document db mapping context set initial entity set ( new entity scanner ( application context ) scan ( persistent class ) ) ; return document db mapping context ; }


public x attr get x attr ( string prefixed name ) { x attr attr = x attr format get x attr ( attrs , prefixed name ) ; if ( attr = = null & & x attrs ! = null ) { x attr to find = x attr helper build x attr ( prefixed name ) ; for ( x attr a : x attrs ) { if ( a equals ignore value ( to find ) ) { attr = a ; break ; } } } return attr ; }


public boolean is sleeping allowed ( ) { return jni is sleeping allowed ( addr ) ; }


converts all data types in the data type manager into ansi - c code

public void write ( data type manager data type manager , task monitor monitor ) throws i o exception , cancelled exception { write ( data type manager get root category ( ) , monitor ) ; }


called once for each keyvalue pair in the input split most applications should override this , but the default is the identity function

protected void map ( keyin key , valuein value , context context ) throws i o exception , interrupted exception { context write ( ( keyout ) key , ( valueout ) value ) ; }


approves specific callables by their names

public http response do approve ( @ query parameter string value ) throws i o exception { whitelisted append ( value ) ; return http responses ok ( ) ; }


assert that a connector ' s set of active topics matches the given collection of topic names

public void assert connector active topics ( string connector name , collection < string > topics , string detail message ) throws interrupted exception { try { wait for condition ( ( ) - > check connector active topics ( connector name , topics ) or else ( false ) , connect internal topic updates duration ms , " connector active topics don ' t match the expected collection " ) ; } catch ( assertion error e ) { throw new assertion error ( detail message , e ) ; } }


shows an error dialog that a wizard can use to display information about an exception that occurred while wizard ' ing

public static string show wizard error dialog ( shell wizard shell , invocation target exception e ) { string message = null ; throwable cause = e get cause ( ) ; if ( cause ! = null ) { message = cause get class ( ) get simple name ( ) ; if ( cause get message ( ) ! = null & & ! cause get message ( ) is empty ( ) ) { message + = " : " + cause get message ( ) ; } } else { message = e get class ( ) get simple name ( ) ; } message dialog open error ( wizard shell , " error " , message ) ; return message ; }


test that a bad request exception can be thrown and not count towards errors and bypasses fallback

public void test bad request exception via queue in thread ( ) throws exception { test circuit breaker circuit breaker = new test circuit breaker ( ) ; bad request command command 1 = null ; try { command 1 = new bad request command ( circuit breaker , execution isolation strategy thread ) ; command 1 queue ( ) get ( ) ; fail ( " we expect to receive a " + hystrix bad request exception class get simple name ( ) ) ; } catch ( execution exception e ) { e print stack trace ( ) ; if ( e get cause ( ) instanceof hystrix bad request exception ) { / / success } else { fail ( " we expect a " + hystrix bad request exception class get simple name ( ) + " but got a " + e get class ( ) get simple name ( ) ) ; } } assert command execution events ( command 1 , hystrix event type bad request ) ; assert not null ( command 1 get execution exception ( ) ) ; assert equals ( 0 , circuit breaker metrics get current concurrent execution count ( ) ) ; assert sane hystrix request log ( 1 ) ; }


registers a { @ link user defined function } class as a catalog function in the given path compared to system functions with a globally defined name , catalog functions are always ( implicitly or explicitly ) identified by a catalog and database

void create function ( string path , class < ? extends user defined function > function class , boolean ignore if exists ) ;


gets the names and order of the actions to be included in the notification at the current player state the playback and custom actions are combined and placed in the following order if not omitted : + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + | prev | & lt ; & lt ; | playpause | & gt ; & gt ; | next | custom actions | stop | + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + this method can be safely overridden however , the names must be of the playback actions { @ link # action pause } , { @ link # action play } , { @ link # action fast forward } , { @ link # action rewind } , { @ link # action next } or { @ link # action previous } , or a key contained in the map returned by { @ link custom action receiver # create custom actions ( context , int ) } otherwise the action name is ignored

protected list < string > get actions ( player player ) { boolean enable previous = false ; boolean enable rewind = false ; boolean enable fast forward = false ; boolean enable next = false ; timeline timeline = player get current timeline ( ) ; if ( ! timeline is empty ( ) & & ! player is playing ad ( ) ) { timeline get window ( player get current window index ( ) , window ) ; enable previous = window is seekable | | ! window is dynamic | | player has previous ( ) ; enable rewind = control dispatcher is rewind enabled ( ) ; enable fast forward = control dispatcher is fast forward enabled ( ) ; enable next = window is dynamic | | player has next ( ) ; } list < string > string actions = new array list < > ( ) ; if ( use previous action & & enable previous ) { string actions add ( action previous ) ; } if ( enable rewind ) { string actions add ( action rewind ) ; } if ( use play pause actions ) { if ( should show pause button ( player ) ) { string actions add ( action pause ) ; } else { string actions add ( action play ) ; } } if ( enable fast forward ) { string actions add ( action fast forward ) ; } if ( use next action & & enable next ) { string actions add ( action next ) ; } if ( custom action receiver ! = null ) { string actions add all ( custom action receiver get custom actions ( player ) ) ; } if ( use stop action ) { string actions add ( action stop ) ; } return string actions ; }


add exception classes for which server won ' t log stack traces

public void add terse exceptions ( class < ? > exception class ) { exceptions handler add terse logging exceptions ( exception class ) ; }


default boolean should generate metadata for ( final optional < saml registered service > registered service ) { return registered service is empty ( ) ; }


public double bandwidth bytes ( long bytes ) { double duration = duration ( ) ; return duration > 0 ? bytes / duration : 0 ; }


public void stop ( ) { context unregister receiver ( check not null ( receiver ) ) ; receiver = null ; if ( util sdk int > = 24 & & network callback ! = null ) { unregister network callback v 2 4 ( ) ; } }


removes all { @ link cache span cache spans } for a resource , deleting the underlying files


test that program diff can determine there is a function difference when the function is only in program 1

public void test function only in p 1 ( ) throws exception { / / in p 1 not in p 2 int transaction i d = p 2 start transaction ( " test transaction " ) ; p 2 get function manager ( ) remove function ( addr ( 0x 1 0 0 3 0d 2 ) ) ; p 2 end transaction ( transaction i d , true ) ; program diff = new program diff ( p 1 , p 2 ) ; program diff set filter ( new program diff filter ( program diff filter function diffs ) ) ; assert equals ( new address set ( addr ( 0x 1 0 0 3 0d 2 ) , addr ( 0x 1 0 0 3 0d 2 ) ) , program diff get differences ( program diff get filter ( ) , null ) ) ; }


converts the given number of the current units into terabytes

public long to terabytes ( long l ) { return terabytes convert ( l , this ) ; }


returns { @ code true } if specify a custom window size and mem level is supported

public static boolean is supporting window size and mem level ( ) { return supports window size and mem level ; }


public static object get field value ( final object object , final field field ) { if ( null = = object | | null = = field ) { return null ; } field set accessible ( true ) ; object result = null ; try { result = field get ( object ) ; } catch ( illegal access exception ignored ) { } return result ; }


compute the arithmetic quotient as a solution to unsigned multiplication this is slightly different than { @ link # divide unsigned ( masked long ) } in its treatment of unknowns

public masked long inv multiply unsigned ( masked long that ) throws solver exception { if ( that is fully defined ( ) ) { / / if it ' s a power of 2 , re - write as bit shift if ( long bit count ( that val ) = = 1 ) { return inv shift left ( long number of trailing zeros ( that val ) ) ; } / / ditto comments from # divide unsigned / / todo : is this correct or even useful ? else if ( long number of leading zeros ( this msk ) + long number of trailing zeros ( ~ this msk ) = = long size ) { return from mask and value ( this msk , long divide unsigned ( this val , that val ) ) ; } } throw new unsupported operation exception ( " cannot divide unknown values , yet " ) ; }


get the heartbeat api path if the machine registry path of the dashboard is modified , then the api path should also be consistent with the api path of the dashboard

public static string get heartbeat api path ( ) { string api path = sentinel config get config ( heartbeat api path ) ; if ( string util is blank ( api path ) ) { return heartbeat default path ; } if ( ! api path starts with ( " / " ) ) { api path = " / " + api path ; } return api path ; }


encodes a collection of query parameters according to the swagger collection format of the various collection formats defined by swagger ( " csv " , " tsv " , etc ) , feign only natively supports " multi " this utility generates the other format types so it will be properly processed by feign note , as part of reformatting , it url encodes the parameters as well

public static object encode collection ( collection < ? > parameters , string collection format ) { if ( parameters = = null ) { return parameters ; } list < string > string values = new array list < > ( parameters size ( ) ) ; for ( object parameter : parameters ) { / / ignore null values ( same behavior as feign ) if ( parameter ! = null ) { string values add ( encode ( parameter ) ) ; } } / / feign natively handles single - element lists and the " multi " format if ( string values size ( ) < 2 | | " multi " equals ( collection format ) ) { return string values ; } / / otherwise return a formatted string string [ ] string array = string values to array ( new string [ 0 ] ) ; switch ( collection format ) { case " csv " : default : return string util join ( string array , " , " ) ; case " ssv " : return string util join ( string array , " " ) ; case " tsv " : return string util join ( string array , " \ t " ) ; case " pipes " : return string util join ( string array , " | " ) ; } }


public void consume ( parsable byte array data ) throws parser exception { data read bytes ( pes scratch data , 0 , 3 ) ; pes scratch set position ( 0 ) ; parse header ( ) ; data read bytes ( pes scratch data , 0 , extended header length ) ; pes scratch set position ( 0 ) ; parse header extension ( ) ; pes payload reader packet started ( time us , ts payload reader flag data alignment indicator ) ; pes payload reader consume ( data ) ; / / we always have complete pes packets with program stream pes payload reader packet finished ( ) ; }


apply cluster server and client assignment for provided app

cluster app assign result v o apply assign to app ( string app , list < cluster app assign map > cluster map , set < string > remaining set ) ;


list all children of a path , but not the path itself in the case that the path refers to a file or empty directory

public static file status [ ] list children ( file system file system , path path ) throws i o exception { file status [ ] entries = file system list status ( path ) ; if ( entries length = = 1 & & path equals ( entries [ 0 ] get path ( ) ) ) { / / this is the path : ignore return new file status [ ] { } ; } else { return entries ; } }


record a missing interface in the output

public void missing implemented interface ( string origin , string target ) { check argument ( descriptor utils is binary name ( origin ) , " ' % s ' is not a binary name " , origin ) ; check argument ( descriptor utils is binary name ( target ) , " ' % s ' is not a binary name " , target ) ; dependency collector missing implemented interface ( origin , target ) ; }


return a map with the failed messages as keys , and the thrown exceptions as values note that a general mail server connection failure will not result in failed messages being returned here : a message will only be contained here if actually sending it was attempted but failed the messages will be the same that were originally passed to the invoked send method , that is , simple mail messages in case of using the generic mail sender interface in case of sending mime message instances via java mail sender , the messages will be of type mime message < b > note : < b > this map will not be available after serialization use { @ link # get message exceptions ( ) } in such a scenario , which will be available after serialization as well

public final map < object , exception > get failed messages ( ) { return this failed messages ; }


return the number of vertices in this vertex set

public int size ( ) { return key indices size ( ) ; }


forces an update of the notification if already started

public void invalidate ( ) { if ( is notification started ) { post start or update notification ( ) ; } }


returns the translog location for this version value or null this is optional and might not be tracked all the time

public translog location get location ( ) { return null ; }


public static void trace ( string path , string accept type , route route , response transformer transformer ) { get instance ( ) trace ( path , accept type , route , transformer ) ; }


returns a collection of { @ link resource requirements } that describe which resources the corresponding job is missing

map < job i d , collection < resource requirement > > get missing resources ( ) ;


public int write annotation set ref list ( annotation set ref list annotation set ref list ) { ensure four bytes aligned ( table of contents annotation set ref lists , true ) ; return super write annotation set ref list ( annotation set ref list ) ; }


returns the unsigned short at the given offset , taking into account the endian - ness

default public int get unsigned short ( int offset ) throws memory access exception { return get short ( offset ) & 0xffff ; }


checks if the given file can be created on posix , this corresponds to the ' w ' permission of the parent directory

public boolean create ( file f ) throws security exception { return false ; }


strategy for an argument that corresponds to a given { @ link logical type family } and nullability implicit casts will be inserted if possible

public static family argument type strategy logical ( logical type family expected family , boolean expected nullability ) { return new family argument type strategy ( expected family , expected nullability ) ; }


safer variant of { @ link # impersonate 2 ( authentication ) } that does not require a finally - block

public static void impersonate 2 ( @ non null authentication auth , @ non null runnable body ) { security context old = impersonate 2 ( auth ) ; try { body run ( ) ; } finally { security context holder set context ( old ) ; } }


specify the maximum number of concurrent consumers to create default is 1 if this setting is higher than " concurrent consumers " , the listener container will dynamically schedule new consumers at runtime , provided that enough incoming messages are encountered once the load goes down again , the number of consumers will be reduced to the standard level ( " concurrent consumers " ) again raising the number of concurrent consumers is recommendable in order to scale the consumption of messages coming in from a queue however , note that any ordering guarantees are lost once multiple consumers are registered in general , stick with 1 consumer for low - volume queues < b > do not raise the number of concurrent consumers for a topic , unless vendor - specific setup measures clearly allow for it < b > with regular setup , this would lead to concurrent consumption of the same message , which is hardly ever desirable < b > this setting can be modified at runtime , for example through jmx < b >

public void set max concurrent consumers ( int max concurrent consumers ) { assert is true ( max concurrent consumers > 0 , " ' max concurrent consumers ' value must be at least 1 ( one ) " ) ; synchronized ( this lifecycle monitor ) { this max concurrent consumers = math max ( max concurrent consumers , this concurrent consumers ) ; } }


returns true if all requested configuration fragment are present ( this may be slow )

public boolean has all fragments ( set < class < ? > > fragment classes ) { for ( class < ? > fragment class : fragment classes ) { if ( ! has fragment ( fragment class as subclass ( fragment class ) ) ) { return false ; } } return true ; }


the highlighted fragments { @ code null } if failed to highlight ( for example , the field is not stored )

public text [ ] fragments ( ) { return fragments ; }


an application is finishing on this node manager this is a signal to this { @ link auxiliary service } about the same

public abstract void stop application ( application termination context stop app context ) ;


return the map of query parameters empty if no query has been set

public multi value map < string , string > get query params ( ) { return this query params ; } / / encoding


public void test successful as list logging exception ( ) throws exception { assert equals ( new array list ( ( object ) null ) , get done ( successful as list ( immediate failed future ( new my exception ( ) ) ) ) ) ; assert with message ( " nothing should be logged " ) that ( aggregate future log handler get stored log records ( ) ) is empty ( ) ; / / not even if there are a bunch of failures assert equals ( new array list ( null , null , null ) , get done ( successful as list ( immediate failed future ( new my exception ( ) ) , immediate failed future ( new my exception ( ) ) , immediate failed future ( new my exception ( ) ) ) ) ) ; assert with message ( " nothing should be logged " ) that ( aggregate future log handler get stored log records ( ) ) is empty ( ) ; }


returns whether the flag { @ code acc annotation } is on in the given flags

public static boolean is annotation ( int flags ) { return ( flags & acc annotation ) ! = 0 ; }


shutdown this { @ code kafka streams } by signaling all the threads to stop , and then wait up to the timeout for the threads to join a { @ code timeout } of duration zero ( or any other zero duration ) makes the close operation asynchronous negative - duration timeouts are rejected

public synchronized boolean close ( final duration timeout ) throws illegal argument exception { final string msg prefix = prepare millis check fail msg prefix ( timeout , " timeout " ) ; final long timeout ms = validate millisecond duration ( timeout , msg prefix ) ; if ( timeout ms < 0 ) { throw new illegal argument exception ( " timeout can ' t be negative " ) ; } log debug ( " stopping streams client with timeout millis = { } ms " , timeout ms ) ; return close ( timeout ms ) ; }


public < t > future < t > submit ( runnable task , t result ) { submitted mark ( ) ; return delegate submit ( new instrumented runnable ( task ) , result ) ; }


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


ask the inner stream for their i o statistics

public i o statistics get i o statistics ( ) { return retrieve i o statistics ( out ) ; }


return all of the parameters ( bind variables ) in the parsed sql statement repeated occurrences of the same parameter name are included here

list < string > get parameter names ( ) { return this parameter names ; }


get the done summary file name for a job

public static string get intermediate summary file name ( job id job id ) { return type converter from yarn ( job id ) to string ( ) + summary file name suffix ; }


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


public int action destroy ( string app name ) throws i o exception , yarn exception { int result = exit success ; try { client response response = get api client ( get service path ( app name ) ) delete ( client response class ) ; result = process response ( response ) ; } catch ( exception e ) { log error ( " fail to destroy application : " , e ) ; result = exit exception thrown ; } return result ; }


build an ` http uri request ` in post way

protected static http uri request post request ( string url , map < string , string > params , boolean support enhanced content type ) { http post http post = new http post ( url ) ; if ( params ! = null & & params size ( ) > 0 ) { list < name value pair > list = new array list < > ( params size ( ) ) ; for ( entry < string , string > entry : params entry set ( ) ) { list add ( new basic name value pair ( entry get key ( ) , entry get value ( ) ) ) ; } http post set entity ( new url encoded form entity ( list , consts utf 8 ) ) ; if ( ! support enhanced content type ) { http post set header ( http header content type , http header content type urlencoded ) ; } } return http post ; }


private static void build tree selection inactive colors ( ) { final set < string > colors = collections unmodifiable set ( sets new hash set ( " completion popup non focused state " ) ) ; final color transparent background = mtui tree get selection inactive background ( ) ; m t ui utils build resources ( colors , transparent background ) ; }


the connectors included in this assignment

public collection < string > connectors ( ) { return connector ids ; }


public string get dest vol uuid ( ) { return dest vol uuid ; }


returns { @ link spawn metrics } for the provided execution kind this will never return { @ code null } , but the { @ link spawn metrics } can be empty

public spawn metrics get metrics ( spawn metrics exec kind kind ) { @ nullable spawn metrics metrics = metrics map get ( kind ) ; if ( metrics = = null ) { return empty metrics instance get ( kind ) ; } return metrics ; }


creates an { @ code atomic reference array } instance with the same length as , and all elements copied from , the given array

public static < e > atomic reference array < e > new reference array ( e [ ] array ) { return new atomic reference array < e > ( array ) ; }


get a bit - field datatype instance for a given id the upper byte of the id will be ignored

static final bit field data type get bit field data type ( long id , data type manager d b dtm ) { int bit size = ( int ) ( id & 0xff ) ; / / 8 - bits int bit offset = ( int ) ( ( id > > bit offset shift ) & 0xff ) ; / / 8 - bits int base type info = ( int ) ( ( id > > base type shift ) & 0xff ) ; / / 8 - bit encoded field base datatype kind base data type kind = base datatype kind get kind ( ( base type info > > 5 ) & 3 ) ; / / boolean extra storage used = ( base type info & 0x 1 0 ) ! = 0 ; data type base data type = null ; long data type index = ( id > > datatype index shift ) & max datatype index ; / / 32 - bits if ( base data type kind ! = base datatype kind none & & data type index ! = max datatype index ) { if ( base data type kind = = base datatype kind typedef ) { base data type = get type def ( data type index , dtm ) ; } else if ( base data type kind = = base datatype kind enum ) { base data type = get enum ( data type index , dtm ) ; } else { base data type = get integer type ( data type index , dtm ) ; } } try { if ( base data type = = null ) { / / use integer datatype on failure base data type = integer data type data type clone ( dtm ) ; } / / int effective bit size = get effective bit size ( bit size , base data type get length ( ) ) ; / / int storage size = get minimum storage size ( effective bit size ) ; / / if ( extra storage used ) { / / + + storage size ; / / } return new bit field d b data type ( base data type , bit size , bit offset ) ; } catch ( invalid data type exception e ) { return null ; } }


remove the array of plugins from the tool

public void remove plugins ( plugin [ ] plugins ) { system utilities run swing now ( ( ) - > { try { plugin mgr remove plugins ( plugins ) ; } finally { set config changed ( true ) ; } } ) ; }


gets the query param , or returns default value

public string query param or default ( string query param , string default value ) { string value = query params ( query param ) ; return value ! = null ? value : default value ; }


gets the addresses in the left listing panel

public address set view get left addresses ( ) { return address sets [ left ] ; }


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


for testing purposes , but should probably be promoted to interpreter console interface

public string get prompt ( ) { return panel get prompt ( ) ; }


updates a pet in the store with form data

public void update pet with form test ( ) { long pet id = null ; string name = null ; string status = null ; / / api update pet with form ( pet id , name , status ) ; / / todo : test validations }


calls the upstream ' s queue disposable request fusion with the mode and saves the established mode in { @ link # source mode } if that mode doesn ' t have the { @ link queue disposable # boundary } flag set if the upstream doesn ' t support fusion ( { @ link # qd } is null ) , the method returns { @ link queue disposable # none }

protected final int transitive boundary fusion ( int mode ) { queue disposable < t > qd = this qd ; if ( qd ! = null ) { if ( ( mode & boundary ) = = 0 ) { int m = qd request fusion ( mode ) ; if ( m ! = none ) { source mode = m ; } return m ; } } return none ; }


generates the raw byte data of the zip 6 4 end of central directory record for the file

static byte [ ] create ( zip file data file ) { byte [ ] buf = new byte [ fixed data size ] ; zip util int to little endian ( buf , signature offset , signature ) ; zip util long to little endian ( buf , size offset , fixed data size - 12 ) ; zip util short to little endian ( buf , version offset , ( short ) 0x 2d ) ; zip util short to little endian ( buf , version needed offset , ( short ) 0x 2d ) ; zip util int to little endian ( buf , disk number offset , 0 ) ; zip util int to little endian ( buf , cd disk offset , 0 ) ; zip util long to little endian ( buf , disk entries offset , file get num entries ( ) ) ; zip util long to little endian ( buf , total entries offset , file get num entries ( ) ) ; zip util long to little endian ( buf , cd size offset , file get central directory size ( ) ) ; zip util long to little endian ( buf , cd offset offset , file get central directory offset ( ) ) ; return buf ; }


to test enum parameters to test enum parameters

public api response < void > test enum parameters with http info ( list < string > enum header string array , string enum header string , list < string > enum query string array , string enum query string , integer enum query integer , double enum query double , list < string > enum form string array , string enum form string ) throws api exception { object local var post body = null ; / / create path and map variables string local var path = " / fake " ; / / query params list < pair > local var query params = new array list < pair > ( ) ; map < string , string > local var header params = new hash map < string , string > ( ) ; map < string , string > local var cookie params = new hash map < string , string > ( ) ; map < string , object > local var form params = new hash map < string , object > ( ) ; local var query params add all ( api client parameter to pairs ( " csv " , " enum query string array " , enum query string array ) ) ; local var query params add all ( api client parameter to pairs ( " " , " enum query string " , enum query string ) ) ; local var query params add all ( api client parameter to pairs ( " " , " enum query integer " , enum query integer ) ) ; local var query params add all ( api client parameter to pairs ( " " , " enum query double " , enum query double ) ) ; if ( enum header string array ! = null ) local var header params put ( " enum header string array " , api client parameter to string ( enum header string array ) ) ; if ( enum header string ! = null ) local var header params put ( " enum header string " , api client parameter to string ( enum header string ) ) ; if ( enum form string array ! = null ) local var form params put ( " enum form string array " , enum form string array ) ; if ( enum form string ! = null ) local var form params put ( " enum form string " , enum form string ) ; final string [ ] local var accepts = { } ; final string local var accept = api client select header accept ( local var accepts ) ; final string [ ] local var content types = { " application / x - www - form - urlencoded " } ; final string local var content type = api client select header content type ( local var content types ) ; string [ ] local var auth names = new string [ ] { } ; return api client invoke a p i ( " fake api test enum parameters " , local var path , " get " , local var query params , local var post body , local var header params , local var cookie params , local var form params , local var accept , local var content type , local var auth names , null , false ) ; }


change the value of the force - specific property on the given function record

public function record set force specific on function ( function record func rec , boolean value ) throws i o exception { check update allowed ( ) ; return modify function flag ( func rec , function record force specific flag , value ) ; }


public ssl context builder protocols ( iterable < string > protocols ) { return protocols ( to array ( protocols , empty strings ) ) ; }


load a spring application context from the supplied { @ link merged context configuration } implementation details : calls { @ link # validate merged context configuration ( merged context configuration ) } to allow subclasses to validate the supplied configuration before proceeding calls { @ link # create context ( ) } to create a { @ link generic application context } instance if the supplied { @ code merged context configuration } references a { @ linkplain merged context configuration # get parent ( ) parent configuration } , the corresponding { @ link merged context configuration # get parent application context ( ) application context } will be retrieved and { @ linkplain generic application context # set parent ( application context ) set as the parent } for the context created by this method calls { @ link # prepare context ( generic application context ) } for backwards compatibility with the { @ link org springframework test context context loader context loader } spi calls { @ link # prepare context ( configurable application context , merged context configuration ) } to allow for customizing the context before bean definitions are loaded calls { @ link # customize bean factory ( default listable bean factory ) } to allow for customizing the context ' s { @ code default listable bean factory } delegates to { @ link # load bean definitions ( generic application context , merged context configuration ) } to populate the context from the locations or classes in the supplied { @ code merged context configuration } delegates to { @ link annotation config utils } for { @ link annotation config utils # register annotation config processors registering } annotation configuration processors calls { @ link # customize context ( generic application context ) } to allow for customizing the context before it is refreshed calls { @ link # customize context ( configurable application context , merged context configuration ) } to allow for customizing the context before it is refreshed { @ link configurable application context # refresh refreshes } the context and registers a jvm shutdown hook for it

public final configurable application context load context ( merged context configuration merged config ) throws exception { if ( logger is debug enabled ( ) ) { logger debug ( string format ( " loading application context for merged context configuration [ % s ] " , merged config ) ) ; } validate merged context configuration ( merged config ) ; generic application context context = create context ( ) ; application context parent = merged config get parent application context ( ) ; if ( parent ! = null ) { context set parent ( parent ) ; } prepare context ( context ) ; prepare context ( context , merged config ) ; customize bean factory ( context get default listable bean factory ( ) ) ; load bean definitions ( context , merged config ) ; annotation config utils register annotation config processors ( context ) ; customize context ( context ) ; customize context ( context , merged config ) ; context refresh ( ) ; context register shutdown hook ( ) ; return context ; }


indicates if an audit message should be written when on finish is called for the given checkpoint we audit the first checkpoint , and then every 10 checkpoints until completed checkpoint = = 99 then we audit every 100 , until completed checkpoint = = 999 then we always audit every 1 000 checkpoints

protected boolean should audit on finish ( long completed checkpoint ) { if ( + + log count % log every ! = 0 ) { return false ; } if ( completed checkpoint = = 0 ) { return true ; } int log 1 0 checkpoint = ( int ) math floor ( math log 1 0 ( completed checkpoint ) ) ; log every = log 1 0 checkpoint > = 3 ? 1 000 : ( int ) math pow ( 10 0 , log 1 0 checkpoint ) ; log count = 0 ; return true ; }


public long renew ( final token < ? > token , configuration conf ) throws i o exception , interrupted exception { log debug ( " renewing the delegation token " ) ; return get instance ( conf ) renew delegation token ( token ) ; }


private void on hit ( node node ) { node move to tail ( head ) ; }


returns a view of a multimap where each value is transformed by a function all other properties of the multimap , such as iteration order , are left intact for example , the code : { @ code multimap < string , integer > multimap = immutable set multimap of ( " a " , 2 , " b " , - 3 , " b " , - 3 , " a " , 4 , " c " , 6 ) ; function < integer , string > square = new function < integer , string > ( ) { public string apply ( integer in ) { return integer to string ( in in ) ; } } ; multimap < string , string > transformed = multimaps transform values ( multimap , square ) ; system out println ( transformed ) ; } prints { @ code { a = [ 4 , 16 ] , b = [ 9 , 9 ] , c = [ 36 ] } } changes in the underlying multimap are reflected in this view conversely , this view supports removal operations , and these are reflected in the underlying multimap it ' s acceptable for the underlying multimap to contain null keys , and even null values provided that the function is capable of accepting null input the transformed multimap might contain null values , if the function sometimes gives a null result the returned multimap is not thread - safe or serializable , even if the underlying multimap is the { @ code equals } and { @ code hash code } methods of the returned multimap are meaningless , since there is not a definition of { @ code equals } or { @ code hash code } for general collections , and { @ code get ( ) } will return a general { @ code collection } as opposed to a { @ code list } or a { @ code set } the function is applied lazily , invoked when needed this is necessary for the returned multimap to be a view , but it means that the function will be applied many times for bulk operations like { @ link multimap # contains value } and { @ code multimap to string ( ) } for this to perform well , { @ code function } should be fast to avoid lazy evaluation when the returned multimap doesn ' t need to be a view , copy the returned multimap into a new multimap of your choosing

public static < k , v1 , v2 > multimap < k , v2 > transform values ( multimap < k , v1 > from multimap , final function < ? super v1 , v2 > function ) { check not null ( function ) ; entry transformer < k , v1 , v2 > transformer = maps as entry transformer ( function ) ; return transform entries ( from multimap , transformer ) ; }


returns the lesser of the two values according to this ordering if the values compare as 0 , the first is returned < b > implementation note : < b > this method is invoked by the default implementations of the other { @ code min } overloads , so overriding it will affect their behavior < b > note : < b > consider using { @ code comparators min ( a , b , this comparator ) } instead if { @ code this comparator } is { @ link ordering # natural } , then use { @ code comparators min ( a , b ) }

public < e extends t > e min ( @ nullable e a , @ nullable e b ) { return ( compare ( a , b ) < = 0 ) ? a : b ; }


public connection get connection ( ) { return this connection ; }


public void place order test ( ) throws api exception { order body = null ; order response = api place order ( body ) ; / / todo : test validations }


public void close ( ) throws i o exception { cleanup timer cancel ( ) ; if ( shutdown requested compare and set ( false , true ) ) { exception exception = null ; try { this server socket close ( ) ; } catch ( i o exception ioe ) { exception = ioe ; } / / wake the thread up , in case it is waiting on some operation interrupt ( ) ; try { join ( ) ; } catch ( interrupted exception ie ) { thread current thread ( ) interrupt ( ) ; log debug ( " error while waiting for this thread to die " , ie ) ; } synchronized ( active connections ) { if ( ! active connections is empty ( ) ) { for ( blob server connection conn : active connections ) { log debug ( " shutting down connection { } " , conn get name ( ) ) ; conn close ( ) ; } active connections clear ( ) ; } } / / clean up the storage directory try { file utils delete directory ( storage dir ) ; } catch ( i o exception e ) { exception = exception utils first or suppressed ( e , exception ) ; } / / remove shutdown hook to prevent resource leaks shutdown hook util remove shutdown hook ( shutdown hook , get class ( ) get simple name ( ) , log ) ; if ( log is info enabled ( ) ) { log info ( " stopped blob server at { } : { } " , server socket get inet address ( ) get host address ( ) , get port ( ) ) ; } exception utils try rethrow i o exception ( exception ) ; } }


revert of org apache dubbo common service descriptor # get display service key ( )

public static base service metadata revert display service key ( string display key ) { string [ ] eles = string utils split ( display key , colon separator ) ; if ( eles = = null | | eles length < 1 | | eles length > 2 ) { return new base service metadata ( ) ; } base service metadata service descriptor = new base service metadata ( ) ; service descriptor set service interface name ( eles [ 0 ] ) ; if ( eles length = = 2 ) { service descriptor set version ( eles [ 1 ] ) ; } return service descriptor ; }


public static < t > t get ( @ non null final string key , @ non null final cache memory utils cache memory utils ) { return cache memory utils get ( key ) ; }


determine the criteria to resolve idp metadata if the criteria - set contains a service defn to act as an override , based on the presence of { @ link saml id p saml registered service criterion } , that service is positioned first in the list an empty criteria is always added to calculate and resolve metadata globally as the last step , in case an override is not available

private static list < optional < saml registered service > > determine filtering criteria ( final criteria set criteria ) { val results = new array list < optional < saml registered service > > ( ) ; if ( criteria contains ( saml id p saml registered service criterion class ) ) { val criterion = criteria get ( saml id p saml registered service criterion class ) ; results add ( optional of ( objects require non null ( criterion ) get registered service ( ) ) ) ; } results add ( optional empty ( ) ) ; return results ; }


check if identity is allowed to create the specified table in this catalog

default void check can create table ( connector transaction handle transaction handle , connector identity identity , access control context context , schema table name table name ) { deny create table ( table name to string ( ) ) ; }


clears the chart from all data ( sets it to null ) and refreshes it ( by calling invalidate ( ) )

public void clear ( ) { m data = null ; m offsets calculated = false ; m indices to highlight = null ; m chart touch listener set last highlighted ( null ) ; invalidate ( ) ; }


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


find pet by id returns a single pet < b > 200 < b > - successful operation < b > 400 < b > - invalid id supplied < b > 404 < b > - pet not found

public pet get pet by id ( long pet id ) throws rest client exception { return get pet by id with http info ( pet id ) get body ( ) ; }


sets the default parallelism for this plan that degree is always used when an operator is not explicitly given a parallelism

public void set default parallelism ( int default parallelism ) { check argument ( default parallelism > = 1 | | default parallelism = = execution config parallelism default , " the default parallelism must be positive , or execution config parallelism default if the system should use the globally configured default " ) ; this default parallelism = default parallelism ; }


returns the { @ link # sum } as an { @ code int } after a narrowing primitive conversion

public int int value ( ) { return ( int ) sum ( ) ; }


sets the address of the { @ link blob server }

public void set blob server address ( inet socket address blob server address ) { server address = check not null ( blob server address ) ; }


private void register invalid name report ( ) throws i o exception { string ns 0 = cluster get nameservices ( ) get ( 0 ) ; list < ? extends federation namenode context > origin = resolver get namenodes for nameservice id ( ns 0 ) ; federation namenode context nn info = origin get ( 0 ) ; namenode status report report = new namenode status report ( ns 0 , nn info get namenode id ( ) , nn info get rpc address ( ) , nn info get service address ( ) , nn info get lifeline address ( ) , nn info get web scheme ( ) , nn info get web address ( ) ) ; report set registration valid ( false ) ; assert true ( resolver register namenode ( report ) ) ; resolver load cache ( true ) ; }


returns { @ code true } if this entry should replace all other entries that are already cached for the hostname

protected abstract boolean should replace all ( e entry ) ;


sets a concrete index for this put mapping request

public put mapping request set concrete index ( index index ) { objects require non null ( index , " index must not be null " ) ; this concrete index = index ; return this ; }


prepares the multimap for unmodifiable tests , returning an unmodifiable view of the map

private static multimap < string , integer > prepare unmodifiable tests ( multimap < string , integer > multimap , boolean permits duplicates , @ nullable string null key , @ nullable integer null value ) { multimap clear ( ) ; multimap put ( " foo " , 1 ) ; multimap put ( " foo " , 2 ) ; multimap put ( " foo " , 3 ) ; multimap put ( " bar " , 5 ) ; multimap put ( " bar " , - 1 ) ; multimap put ( null key , null value ) ; multimap put ( " foo " , null value ) ; multimap put ( null key , 5 ) ; multimap put ( " foo " , 2 ) ; if ( permits duplicates ) { assert equals ( 9 , multimap size ( ) ) ; } else { assert equals ( 8 , multimap size ( ) ) ; } multimap < string , integer > unmodifiable ; if ( multimap instanceof sorted set multimap ) { unmodifiable = multimaps unmodifiable sorted set multimap ( ( sorted set multimap < string , integer > ) multimap ) ; } else if ( multimap instanceof set multimap ) { unmodifiable = multimaps unmodifiable set multimap ( ( set multimap < string , integer > ) multimap ) ; } else if ( multimap instanceof list multimap ) { unmodifiable = multimaps unmodifiable list multimap ( ( list multimap < string , integer > ) multimap ) ; } else { unmodifiable = multimaps unmodifiable multimap ( multimap ) ; } return unmodifiable ; }


sets whether to highlight enclosing peer characters or not

public void set highlight enclosing peer characters ( boolean highlight enclosing peer charcters ) { f highlight enclosing peer characters = highlight enclosing peer charcters ; install uninstall text listener ( highlight enclosing peer charcters ) ; }


lookup returns a target for a single key

public void route lookup ( io grpc lookup v 1 route lookup request request , io grpc stub stream observer < io grpc lookup v 1 route lookup response > response observer ) { io grpc stub server calls async unimplemented unary call ( get route lookup method ( ) , response observer ) ; }


generates the clickable map info and sends that to the response

public static void generate clickable map ( stapler request req , stapler response rsp , final j free chart chart , int default w , int default h ) throws i o exception { new graph ( - 1 , default w , default h ) { protected j free chart create graph ( ) { return chart ; } } do map ( req , rsp ) ; }


returns the matrix object the listener holds

public matrix get matrix ( ) { return m matrix ; }


returns the short at the specified index the 2 bytes starting at the specified index are composed into a short according to the current byte order and returned the position is not changed

public abstract short get short ( int index ) ;


add multiple arguments in the order they are returned by the collection to the list of executable arguments

public builder add executable arguments ( iterable < string > arguments ) { preconditions check state ( executable args ! = null ) ; this executable args add all ( immutable list copy of ( arguments ) ) ; return this ; }