delete a directory and all its contents if we return false , the directory may be partially - deleted ( 1 ) if dir is symlink to a file , the symlink is deleted the file pointed to by the symlink is not deleted ( 2 ) if dir is symlink to a directory , symlink is deleted the directory pointed to by symlink is not deleted ( 3 ) if dir is a normal file , it is deleted ( 4 ) if dir is a normal directory , then dir and all its contents recursively are deleted

public static boolean fully delete ( final file dir , boolean try grant permissions ) { if ( try grant permissions ) { / / try to chmod + rwx the parent folder of the ' dir ' : file parent = dir get parent file ( ) ; grant permissions ( parent ) ; } if ( delete impl ( dir , false ) ) { / / dir is ( a ) normal file , ( b ) symlink to a file , ( c ) empty directory or / / ( d ) symlink to a directory return true ; } / / handle nonempty directory deletion if ( ! fully delete contents ( dir , try grant permissions ) ) { return false ; } return delete impl ( dir , true ) ; }


lazily initialize the { @ link secure random } for { @ link # generate multipart boundary ( ) }

private static random init random ( ) { random random to use = random ; if ( random to use = = null ) { synchronized ( mime type utils class ) { random to use = random ; if ( random to use = = null ) { random to use = new secure random ( ) ; random = random to use ; } } } return random to use ; }


add a mapping that determines how old class names can be updated to newer class names such updates are desirable as the java code changes from version to version if the " from " argument ends with , then it ' s considered a prefix ; otherwise , it ' s an exact string match

static public void register class mapping ( string from , string to ) { class mappings add ( new class mapping ( from , to ends with ( " * " ) ? to substring ( 0 , to length ( ) - 1 ) : to ) ) ; }


consider using { @ link # create statement ( string , parsing options ) }

public statement create statement ( string sql ) { return create statement ( sql , new parsing options ( ) ) ; }


public int compare ( ssa basic block b 1 , ssa basic block b 2 ) { int label 1 = b 1 rop label ; int label 2 = b 2 rop label ; if ( label 1 < label 2 ) { return - 1 ; } else if ( label 1 > label 2 ) { return 1 ; } else { return 0 ; } }


public i package install observer 2 get binder ( ) { return m binder ; }


apply { @ link system rule } to the resource only inbound traffic will be checked

public static void check system ( resource wrapper resource wrapper ) throws block exception { if ( resource wrapper = = null ) { return ; } / / ensure the checking switch is on if ( ! check system status get ( ) ) { return ; } / / for inbound traffic only if ( resource wrapper get entry type ( ) ! = entry type in ) { return ; } / / total qps double current qps = constants entry node = = null ? 0 0 : constants entry node success qps ( ) ; if ( current qps > qps ) { throw new system block exception ( resource wrapper get name ( ) , " qps " ) ; } / / total thread int current thread = constants entry node = = null ? 0 : constants entry node cur thread num ( ) ; if ( current thread > max thread ) { throw new system block exception ( resource wrapper get name ( ) , " thread " ) ; } double rt = constants entry node = = null ? 0 : constants entry node avg rt ( ) ; if ( rt > max rt ) { throw new system block exception ( resource wrapper get name ( ) , " rt " ) ; } / / load bbr algorithm if ( highest system load is set & & get current system avg load ( ) > highest system load ) { if ( ! check bbr ( current thread ) ) { throw new system block exception ( resource wrapper get name ( ) , " load " ) ; } } / / cpu usage if ( highest cpu usage is set & & get current cpu usage ( ) > highest cpu usage ) { throw new system block exception ( resource wrapper get name ( ) , " cpu " ) ; } }


a timeout to wait if the index operation can ' t be performed immediately defaults to { @ code 1m }

public final request builder set timeout ( time value timeout ) { request timeout ( timeout ) ; return ( request builder ) this ; }


converts this object into an equiv { @ link data type path }

public data type path as data type path ( ) { return ! is root ( ) ? new data type path ( get parent c p ( ) , get name ( ) ) : null ; }


long bit size ( ) { return ( long ) data length ( ) * long size ; }


constructs a new { @ code caffeine } instance with default settings , including strong keys , strong values , and no automatic eviction of any kind note that while this return type is { @ code caffeine < object , object > } , type parameters on the { @ link # build } methods allow you to create a cache of any key and value type desired

public static caffeine < object , object > new builder ( ) { return new caffeine < > ( ) ; }


public int get value ( ) { return value ; }


returns the trash object associated with this shell

public path get current trash dir ( ) throws i o exception { return get trash ( ) get current trash dir ( ) ; }


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

void exit query specification ( sql base parser query specification context ctx ) ;


public static void main ( string [ ] args ) throws exception { var asfc = new app shipping fail cases ( ) ; / / asfc item unavailable case ( ) ; / / asfc shipping not possible case ( ) ; / / asfc shipping database unavailable case ( ) ; asfc shipping success case ( ) ; }


returns a description of the target being used , for error messaging

abstract string target description ( ) ;


< code > optional aapt pb styleable styleable = 3 ; < code >

public builder set styleable ( com android aapt resources styleable builder builder for value ) { copy on write ( ) ; instance set styleable ( builder for value ) ; return this ; }


test if the quota can be correctly updated when file length is updated through fsync

public void test update quota for f sync ( ) throws exception { final path foo = new path ( get parent ( generic test utils get method name ( ) ) , " foo " ) ; final path bar = new path ( foo , " bar " ) ; d f s test util create file ( get d f s ( ) , bar , blocksize , replication , 0l ) ; get d f s ( ) set quota ( foo , long max value - 1 , long max value - 1 ) ; f s data output stream out = get d f s ( ) append ( bar ) ; out write ( new byte [ blocksize / 4 ] ) ; ( ( d f s output stream ) out get wrapped stream ( ) ) hsync ( enum set of ( hdfs data output stream sync flag update length ) ) ; i node directory foo node = get f s directory ( ) get i node 4 write ( foo to string ( ) ) as directory ( ) ; quota counts quota = foo node get directory with quota feature ( ) get space consumed ( ) ; long ns = quota get name space ( ) ; long ds = quota get storage space ( ) ; assert equals ( 2 , ns ) ; / / foo and bar assert equals ( blocksize * 2 * replication , ds ) ; / / file is under construction out write ( new byte [ blocksize / 4 ] ) ; out close ( ) ; foo node = get f s directory ( ) get i node 4 write ( foo to string ( ) ) as directory ( ) ; quota = foo node get directory with quota feature ( ) get space consumed ( ) ; ns = quota get name space ( ) ; ds = quota get storage space ( ) ; assert equals ( 2 , ns ) ; assert equals ( ( blocksize + blocksize / 2 ) * replication , ds ) ; / / append another block d f s test util append file ( get d f s ( ) , bar , blocksize ) ; quota = foo node get directory with quota feature ( ) get space consumed ( ) ; ns = quota get name space ( ) ; ds = quota get storage space ( ) ; assert equals ( 2 , ns ) ; / / foo and bar assert equals ( ( blocksize * 2 + blocksize / 2 ) * replication , ds ) ; }


signals the end of input will flush all buffers and notify later stages

public void finish reading ( ) { if ( current buffer ! = null & & ! current buffer get buffer ( ) is empty ( ) ) { this dispatcher send ( sort stage sort , current buffer ) ; } / / add the sentinel to notify the receivers that the work is done / / send the eof marker final circular element < e > eof marker = circular element end marker ( ) ; this dispatcher send ( sort stage sort , eof marker ) ; log debug ( " reading thread done " ) ; }


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

public void create user ( user user ) throws api exception { create user with http info ( user ) ; }


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


create a new pool and add the filters to it a split cannot have files from different pools

protected void create pool ( list < path filter > filters ) { pools add ( new multi path filter ( filters ) ) ; }


mocks the asynchronous request execution by calling the { @ link # mock perform request ( request ) } method

private void mock perform request async ( request request , response listener response listener ) { try { response listener on success ( mock perform request ( request ) ) ; } catch ( i o exception e ) { response listener on failure ( e ) ; } return null ; }


determines if the map information appears valid based on the number of entries and the address of the map zero can be a valid number of entries

protected boolean is valid map ( int num entries , address map address ) { if ( num entries = = 0 ) { if ( map address = = null ) { return true ; / / null address indicates the map is not used , which is a valid state } if ( is relative ) { return image base address equals ( map address ) ; } return false ; } else if ( map address = = null ) { return false ; } memory memory = get program ( ) get memory ( ) ; return memory get loaded and initialized address set ( ) contains ( map address ) ; }


synchronized int allocate ( int n ) { final int remaining = max - count ; if ( remaining < = 0 ) { return 0 ; } else { final int allocated = remaining < n ? remaining : n ; count + = allocated ; return allocated ; } }


test override disables all service providers through enable = false expectation : all service providers can not be disabled through override

public void test nofity override urls disabled all provider ( ) { registry directory registry directory = get registry directory ( ) ; invocation = new rpc invocation ( ) ; list < url > durls = new array list < url > ( ) ; durls add ( serviceurl set host ( " 10 20 30 140 " ) ) ; durls add ( serviceurl set host ( " 10 20 30 141 " ) ) ; registry directory notify ( durls ) ; durls = new array list < url > ( ) ; durls add ( url value of ( " override : / / 0 0 0 0 ? " + enabled key + " = false " ) ) ; registry directory notify ( durls ) ; list < invoker < ? > > invokers = registry directory list ( invocation ) ; / / all service providers can not be disabled through override assertions assert equals ( 2 , invokers size ( ) ) ; }


run this command commands take a zoo keeper server and string - valued keyword arguments and return a map containing any information constituting the response to the command commands are responsible for parsing keyword arguments and performing any error handling if necessary errors should be reported by setting the " error " entry of the returned map with an appropriate message rather than throwing an exception

command response run ( zoo keeper server zk server , map < string , string > kwargs ) ;


adds stored data to given implementing model

public void add to implementor ( codegen config cc , codegen model implcm , list < map < string , string > > impl imports , boolean add interface imports ) { implcm get vendor extensions ( ) put if absent ( " x - implements " , new array list < string > ( ) ) ; / / add implemented interfaces for ( string intf : additional interfaces ) { list < string > impl = ( list < string > ) implcm get vendor extensions ( ) get ( " x - implements " ) ; impl add ( intf ) ; if ( add interface imports ) { / / add imports for interfaces implcm imports add ( intf ) ; map < string , string > imports item = new hash map < string , string > ( ) ; imports item put ( " import " , cc to model import ( intf ) ) ; impl imports add ( imports item ) ; } } / / add one of - containing models properties - we need to properly set the has more values to make rendering correct for ( int i = 0 ; i < additional props size ( ) ; i + + ) { codegen property var = additional props get ( i ) ; implcm vars add ( var ) ; } / / add imports for ( map < string , string > one import : additional imports ) { / / exclude imports from this package - these are imports that only the one of interface needs if ( ! impl imports contains ( one import ) & & ! one import get or default ( " import " , " " ) starts with ( cc model package ( ) ) ) { impl imports add ( one import ) ; } } }


public string get group name ( ) { return groupname ; }


generate a token vocab file with all the token namestypes for example : id = 7 for = 8 ' for ' = 8 this is independent of the target language ; used by antlr internally

st get token vocab output ( ) { st vocab file s t = new st ( vocab file pattern ) ; map < string , integer > tokens = new linked hash map < string , integer > ( ) ; / / make constants for the token names for ( string t : g token name to type map key set ( ) ) { int token type = g token name to type map get ( t ) ; if ( token type > = token min user token type ) { tokens put ( t , token type ) ; } } vocab file s t add ( " tokens " , tokens ) ; / / now dump the strings map < string , integer > literals = new linked hash map < string , integer > ( ) ; for ( string literal : g string literal to type map key set ( ) ) { int token type = g string literal to type map get ( literal ) ; if ( token type > = token min user token type ) { literals put ( literal , token type ) ; } } vocab file s t add ( " literals " , literals ) ; return vocab file s t ; }


test that we can set and clear quotas via { @ link hdfs admin }

public void test hdfs admin set quota ( ) throws exception { hdfs admin dfs admin = new hdfs admin ( file system get default uri ( conf ) , conf ) ; file system fs = null ; try { fs = file system get ( conf ) ; assert true ( fs mkdirs ( test path ) ) ; assert equals ( - 1 , fs get content summary ( test path ) get quota ( ) ) ; assert equals ( - 1 , fs get content summary ( test path ) get space quota ( ) ) ; dfs admin set space quota ( test path , 10 ) ; assert equals ( - 1 , fs get content summary ( test path ) get quota ( ) ) ; assert equals ( 10 , fs get content summary ( test path ) get space quota ( ) ) ; dfs admin set quota ( test path , 10 ) ; assert equals ( 10 , fs get content summary ( test path ) get quota ( ) ) ; assert equals ( 10 , fs get content summary ( test path ) get space quota ( ) ) ; dfs admin clear space quota ( test path ) ; assert equals ( 10 , fs get content summary ( test path ) get quota ( ) ) ; assert equals ( - 1 , fs get content summary ( test path ) get space quota ( ) ) ; dfs admin clear quota ( test path ) ; assert equals ( - 1 , fs get content summary ( test path ) get quota ( ) ) ; assert equals ( - 1 , fs get content summary ( test path ) get space quota ( ) ) ; } finally { if ( fs ! = null ) { fs close ( ) ; } } }


when splitting the reverse zone , return the number of subnets needed , given the range and netmask

protected static long get subnet count for reverse zones ( configuration conf ) { string subnet = conf get ( key dns zone subnet ) ; string mask = conf get ( key dns zone mask ) ; string range = conf get ( key dns split reverse zone range ) ; int parsed range ; try { parsed range = integer parse int ( range ) ; } catch ( number format exception e ) { log error ( " the supplied range is not a valid integer : supplied range : " , range ) ; throw e ; } if ( parsed range < 0 ) { string msg = string format ( " range cannot be negative : supplied range : % d " , parsed range ) ; log error ( msg ) ; throw new illegal argument exception ( msg ) ; } long ip count ; try { subnet utils subnet utils = new subnet utils ( subnet , mask ) ; subnet utils set inclusive host count ( true ) ; ip count = subnet utils get info ( ) get address count long ( ) ; } catch ( illegal argument exception e ) { log error ( " the subnet or mask is invalid : subnet : { } mask : { } " , subnet , mask ) ; throw e ; } if ( parsed range = = 0 ) { return ip count ; } return ip count / parsed range ; }


reads a jvms method info structure and makes the given visitor visit it

private int read method ( final class visitor class visitor , final context context , final int method info offset ) { char [ ] char buffer = context char buffer ; / / read the access flags , name index and descriptor index fields int current offset = method info offset ; context current method access flags = read unsigned short ( current offset ) ; context current method name = read u t f 8 ( current offset + 2 , char buffer ) ; context current method descriptor = read u t f 8 ( current offset + 4 , char buffer ) ; current offset + = 6 ; / / read the method attributes ( the variables are ordered as in section 4 7 of the jvms ) / / attribute offsets exclude the attribute name index and attribute length fields / / - the offset of the code attribute , or 0 int code offset = 0 ; / / - the offset of the exceptions attribute , or 0 int exceptions offset = 0 ; / / - the strings corresponding to the exceptions attribute , or null string [ ] exceptions = null ; / / - whether the method has a synthetic attribute boolean synthetic = false ; / / - the constant pool index contained in the signature attribute , or 0 int signature index = 0 ; / / - the offset of the runtime visible annotations attribute , or 0 int runtime visible annotations offset = 0 ; / / - the offset of the runtime invisible annotations attribute , or 0 int runtime invisible annotations offset = 0 ; / / - the offset of the runtime visible parameter annotations attribute , or 0 int runtime visible parameter annotations offset = 0 ; / / - the offset of the runtime invisible parameter annotations attribute , or 0 int runtime invisible parameter annotations offset = 0 ; / / - the offset of the runtime visible type annotations attribute , or 0 int runtime visible type annotations offset = 0 ; / / - the offset of the runtime invisible type annotations attribute , or 0 int runtime invisible type annotations offset = 0 ; / / - the offset of the annotation default attribute , or 0 int annotation default offset = 0 ; / / - the offset of the method parameters attribute , or 0 int method parameters offset = 0 ; / / - the non standard attributes ( linked with their { @ link attribute # next attribute } field ) / / this list in the < i > reverse order < / i > or their order in the class file structure attribute attributes = null ; int attributes count = read unsigned short ( current offset ) ; current offset + = 2 ; while ( attributes count - - > 0 ) { / / read the attribute info ' s attribute name and attribute length fields string attribute name = read u t f 8 ( current offset , char buffer ) ; int attribute length = read int ( current offset + 2 ) ; current offset + = 6 ; / / the tests are sorted in decreasing frequency order ( based on frequencies observed on / / typical classes ) if ( constants code equals ( attribute name ) ) { if ( ( context parsing options & skip code ) = = 0 ) { code offset = current offset ; } } else if ( constants exceptions equals ( attribute name ) ) { exceptions offset = current offset ; exceptions = new string [ read unsigned short ( exceptions offset ) ] ; int current exception offset = exceptions offset + 2 ; for ( int i = 0 ; i < exceptions length ; + + i ) { exceptions [ i ] = read class ( current exception offset , char buffer ) ; current exception offset + = 2 ; } } else if ( constants signature equals ( attribute name ) ) { signature index = read unsigned short ( current offset ) ; } else if ( constants deprecated equals ( attribute name ) ) { context current method access flags | = opcodes acc deprecated ; } else if ( constants runtime visible annotations equals ( attribute name ) ) { runtime visible annotations offset = current offset ; } else if ( constants runtime visible type annotations equals ( attribute name ) ) { runtime visible type annotations offset = current offset ; } else if ( constants annotation default equals ( attribute name ) ) { annotation default offset = current offset ; } else if ( constants synthetic equals ( attribute name ) ) { synthetic = true ; context current method access flags | = opcodes acc synthetic ; } else if ( constants runtime invisible annotations equals ( attribute name ) ) { runtime invisible annotations offset = current offset ; } else if ( constants runtime invisible type annotations equals ( attribute name ) ) { runtime invisible type annotations offset = current offset ; } else if ( constants runtime visible parameter annotations equals ( attribute name ) ) { runtime visible parameter annotations offset = current offset ; } else if ( constants runtime invisible parameter annotations equals ( attribute name ) ) { runtime invisible parameter annotations offset = current offset ; } else if ( constants method parameters equals ( attribute name ) ) { method parameters offset = current offset ; } else { attribute attribute = read attribute ( context attribute prototypes , attribute name , current offset , attribute length , char buffer , - 1 , null ) ; attribute next attribute = attributes ; attributes = attribute ; } current offset + = attribute length ; } / / visit the method declaration method visitor method visitor = class visitor visit method ( context current method access flags , context current method name , context current method descriptor , signature index = = 0 ? null : read utf ( signature index , char buffer ) , exceptions ) ; if ( method visitor = = null ) { return current offset ; } / / if the returned method visitor is in fact a method writer , it means there is no method / / adapter between the reader and the writer in this case , it might be possible to copy / / the method attributes directly into the writer if so , return early without visiting / / the content of these attributes if ( method visitor instanceof method writer ) { method writer method writer = ( method writer ) method visitor ; if ( method writer can copy method attributes ( this , synthetic , ( context current method access flags & opcodes acc deprecated ) ! = 0 , read unsigned short ( method info offset + 4 ) , signature index , exceptions offset ) ) { method writer set method attributes source ( method info offset , current offset - method info offset ) ; return current offset ; } } / / visit the method parameters attribute if ( method parameters offset ! = 0 ) { int parameters count = read byte ( method parameters offset ) ; int current parameter offset = method parameters offset + 1 ; while ( parameters count - - > 0 ) { / / read the name index and access flags fields and visit them method visitor visit parameter ( read u t f 8 ( current parameter offset , char buffer ) , read unsigned short ( current parameter offset + 2 ) ) ; current parameter offset + = 4 ; } } / / visit the annotation default attribute if ( annotation default offset ! = 0 ) { annotation visitor annotation visitor = method visitor visit annotation default ( ) ; read element value ( annotation visitor , annotation default offset , null , char buffer ) ; if ( annotation visitor ! = null ) { annotation visitor visit end ( ) ; } } / / visit the runtime visible annotations attribute if ( runtime visible annotations offset ! = 0 ) { int num annotations = read unsigned short ( runtime visible annotations offset ) ; int current annotation offset = runtime visible annotations offset + 2 ; while ( num annotations - - > 0 ) { / / parse the type index field string annotation descriptor = read u t f 8 ( current annotation offset , char buffer ) ; current annotation offset + = 2 ; / / parse num element value pairs and element value pairs and visit these values current annotation offset = read element values ( method visitor visit annotation ( annotation descriptor , / * visible = * / true ) , current annotation offset , / * named = * / true , char buffer ) ; } } / / visit the runtime invisible annotations attribute if ( runtime invisible annotations offset ! = 0 ) { int num annotations = read unsigned short ( runtime invisible annotations offset ) ; int current annotation offset = runtime invisible annotations offset + 2 ; while ( num annotations - - > 0 ) { / / parse the type index field string annotation descriptor = read u t f 8 ( current annotation offset , char buffer ) ; current annotation offset + = 2 ; / / parse num element value pairs and element value pairs and visit these values current annotation offset = read element values ( method visitor visit annotation ( annotation descriptor , / * visible = * / false ) , current annotation offset , / * named = * / true , char buffer ) ; } } / / visit the runtime visible type annotations attribute if ( runtime visible type annotations offset ! = 0 ) { int num annotations = read unsigned short ( runtime visible type annotations offset ) ; int current annotation offset = runtime visible type annotations offset + 2 ; while ( num annotations - - > 0 ) { / / parse the target type , target info and target path fields current annotation offset = read type annotation target ( context , current annotation offset ) ; / / parse the type index field string annotation descriptor = read u t f 8 ( current annotation offset , char buffer ) ; current annotation offset + = 2 ; / / parse num element value pairs and element value pairs and visit these values current annotation offset = read element values ( method visitor visit type annotation ( context current type annotation target , context current type annotation target path , annotation descriptor , / * visible = * / true ) , current annotation offset , / * named = * / true , char buffer ) ; } } / / visit the runtime invisible type annotations attribute if ( runtime invisible type annotations offset ! = 0 ) { int num annotations = read unsigned short ( runtime invisible type annotations offset ) ; int current annotation offset = runtime invisible type annotations offset + 2 ; while ( num annotations - - > 0 ) { / / parse the target type , target info and target path fields current annotation offset = read type annotation target ( context , current annotation offset ) ; / / parse the type index field string annotation descriptor = read u t f 8 ( current annotation offset , char buffer ) ; current annotation offset + = 2 ; / / parse num element value pairs and element value pairs and visit these values current annotation offset = read element values ( method visitor visit type annotation ( context current type annotation target , context current type annotation target path , annotation descriptor , / * visible = * / false ) , current annotation offset , / * named = * / true , char buffer ) ; } } / / visit the runtime visible parameter annotations attribute if ( runtime visible parameter annotations offset ! = 0 ) { read parameter annotations ( method visitor , context , runtime visible parameter annotations offset , / * visible = * / true ) ; } / / visit the runtime invisible parameter annotations attribute if ( runtime invisible parameter annotations offset ! = 0 ) { read parameter annotations ( method visitor , context , runtime invisible parameter annotations offset , / * visible = * / false ) ; } / / visit the non standard attributes while ( attributes ! = null ) { / / copy and reset the next attribute field so that it can also be used in method writer attribute next attribute = attributes next attribute ; attributes next attribute = null ; method visitor visit attribute ( attributes ) ; attributes = next attribute ; } / / visit the code attribute if ( code offset ! = 0 ) { method visitor visit code ( ) ; read code ( method visitor , context , code offset ) ; } / / visit the end of the method method visitor visit end ( ) ; return current offset ; } / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - / / methods to parse a code attribute / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


creates list of users with given input array

void create users with list input ( list < user > body ) ;


causes the component to refresh any colors for the given address range

public void refresh ( address start , address end ) { if ( start = = null ) { return ; } if ( end = = null ) { end = start ; } int pixel start = get pixel index ( start ) ; int pixel end = get pixel index ( end ) ; for ( int i = pixel start ; i < = pixel end ; i + + ) { if ( i > = 0 & i < colors length ) { colors [ i ] = null ; } } refresh updater update later ( ) ; }


skips a multi - line comment starting at the current position i , returns the length of the comment

private static int skip multi line comment ( int i , string sql ) throws s q l exception { int block = 0 ; for ( ; i < sql length ( ) - 1 ; i + + ) { char c = sql char at ( i ) ; if ( c = = ' / ' & & sql char at ( i + 1 ) = = ' * ' ) { i + + ; block + + ; } else if ( c = = ' * ' & & sql char at ( i + 1 ) = = ' / ' ) { i + + ; block - - ; } if ( block = = 0 ) { return i ; } } throw new s q l exception ( " cannot parse given sql ; unclosed / * comment " ) ; }


public synchronized void release license ( byte [ ] offline license key set id ) throws drm session exception { assertions check not null ( offline license key set id ) ; blocking key request ( default drm session manager mode release , offline license key set id , format with empty drm init data ) ; }


return the wrapped { @ link numeric double values }

public numeric double values get numeric double values ( ) { return in ; }


returns a value that represents a boolean

static public value boolean value ( string name , final boolean current value , final string description ) { return new default value ( name , string value of ( current value ) ) { public void show dialog ( ) { j check box check box = new j check box ( ) ; check box set selected ( current value ) ; if ( show value dialog ( check box , description ) ) value = string value of ( check box is selected ( ) ) ; } public object get object ( ) { return boolean value of ( value ) ; } } ; }


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


this factory should be used when there is no actual parsed option , since in those cases we do not have an original value or form that the option took

static parsed option description new dummy instance ( option definition option definition , option instance origin origin ) { return new parsed option description ( option definition , null , null , origin ) ; }


returns the hadoop - auth configuration from http f s server ' s configuration it returns all http f s server ' s configuration properties prefixed with < code > hadoop http authentication < code > the < code > hadoop http authentication < code > prefix is removed from the returned property names

protected properties get configuration ( string config prefix , filter config filter config ) throws servlet exception { properties props = new properties ( ) ; configuration conf = http f s server web app get ( ) get config ( ) ; props set property ( authentication filter cookie path , " / " ) ; for ( map entry < string , string > entry : conf ) { string name = entry get key ( ) ; if ( name starts with ( hadoop http conf prefix ) ) { name = name substring ( hadoop http conf prefix length ( ) ) ; props set property ( name , entry get value ( ) ) ; } } / / replace hadoop http authentication configs with http f s specific configs for ( map entry < string , string > entry : conf ) { string name = entry get key ( ) ; if ( name starts with ( conf prefix ) ) { string value = conf get ( name ) ; name = name substring ( conf prefix length ( ) ) ; props set property ( name , value ) ; } } string signature secret file = props get property ( signature secret file , null ) ; if ( signature secret file = = null ) { throw new runtime exception ( " undefined property : " + signature secret file ) ; } if ( ! is random secret ( filter config ) ) { try ( reader reader = new input stream reader ( files new input stream ( paths get ( signature secret file ) ) , standard charsets utf 8 ) ) { string builder secret = new string builder ( ) ; int c = reader read ( ) ; while ( c > - 1 ) { secret append ( ( char ) c ) ; c = reader read ( ) ; } props set property ( authentication filter signature secret , secret to string ( ) ) ; } catch ( i o exception ex ) { throw new runtime exception ( " could not read http f s signature " + " secret file : " + signature secret file ) ; } } set auth handler class ( props ) ; string dtkind = web hdfs constants webhdfs token kind to string ( ) ; if ( conf get boolean ( http f s server web server ssl enabled key , false ) ) { dtkind = web hdfs constants swebhdfs token kind to string ( ) ; } props set property ( kerberos delegation token authentication handler token kind , dtkind ) ; return props ; }


return the parent of this theme source , or { @ code null } if none

theme source get parent theme source ( ) ;


register a listener that will be called when this model is unbound from a view the listener will contribute to this model ' s hash code state per the { @ link com airbnb epoxy epoxy attribute option # do not hash } rules you may clear the listener by setting a null value , or by calling { @ link # reset ( ) }

public list subtype model view model on unbind ( on model unbound listener < list subtype model view model , list subtype model view > listener ) { on mutation ( ) ; this on model unbound listener epoxy generated model = listener ; return this ; }


application can have multiple application attempts { @ link application attempt report } this method returns the all { @ link application attempt report } s for the application

map < application attempt id , application attempt report > get application attempts ( application id app id ) throws yarn exception , i o exception ;


returns the current object mapper used for json serializationdeserialization note : if you make changes to the object mapper , remember to set it back via < code > set object mapper < code > in order to trigger http client rebuilding

public object mapper get object mapper ( ) { return object mapper ; }


were there overrides for this bean ? only valid after processing has occurred at least once

public boolean has property overrides for ( string bean name ) { return this bean names contains ( bean name ) ; }


computes the quantile value of the given dataset

public double compute ( double dataset ) { return compute in place ( dataset clone ( ) ) ; }


applies the given exception visitor to all exceptions that are applicable to the instruction at the specified offset

public void exceptions accept ( clazz clazz , method method , int offset , exception info visitor exception info visitor ) { for ( int index = 0 ; index < u 2exception table length ; index + + ) { exception info exception info = exception table [ index ] ; if ( exception info is applicable ( offset ) ) { exception info visitor visit exception info ( clazz , method , this , exception info ) ; } } }


returns a menu hierarchy of all the actions

public j menu get menu ( ) { if ( menu = = null ) { menu = new j menu ( name ) ; if ( mnemonic key ! = ' \ 0 ' ) { menu set mnemonic ( mnemonic key ) ; } if ( menu handler ! = null ) { menu add menu listener ( menu handler ) ; } list < managed menu item > list = new array list < > ( managed menu items ) ; collections sort ( list , comparator ) ; string last group = null ; for ( managed menu item item : list ) { if ( last group ! = null & & ! last group equals ( item get group ( ) ) ) { menu add separator ( ) ; } last group = item get group ( ) ; menu add ( item get menu item ( ) ) ; } } return menu ; }


returns the mapping of hook keys to values

map < string , object > get hook state ( ) { if ( m hook state = = null ) { m hook state = new hash map < > ( ) ; } return m hook state ; }


returns an iterator over elements of type { @ code t } the elements are returned in nondecreasing order according to the associated { @ link # comparator }


writes or processes the items out or to disk

protected abstract void write ( list < tuple < item , consumer < exception > > > candidates ) throws i o exception ;


renders the attachment in slack compatible structure : https : api slack comdocsattachments # attachment structure

public x content builder to x content ( x content builder builder , params params ) throws i o exception { builder start object ( ) ; if ( fallback ! = null ) { builder field ( x field fallback get preferred name ( ) , fallback ) ; } if ( color ! = null ) { builder field ( x field color get preferred name ( ) , color ) ; } if ( pretext ! = null ) { builder field ( x field pretext get preferred name ( ) , pretext ) ; } if ( author name ! = null ) { builder field ( x field author name get preferred name ( ) , author name ) ; if ( author link ! = null ) { builder field ( x field author link get preferred name ( ) , author link ) ; } if ( author icon ! = null ) { builder field ( x field author icon get preferred name ( ) , author icon ) ; } } if ( title ! = null ) { builder field ( x field title get preferred name ( ) , title ) ; if ( title link ! = null ) { builder field ( x field title link get preferred name ( ) , title link ) ; } } if ( text ! = null ) { builder field ( x field text get preferred name ( ) , text ) ; } if ( fields ! = null ) { builder start array ( x field fields get preferred name ( ) ) ; for ( field field : fields ) { field to x content ( builder , params ) ; } builder end array ( ) ; } if ( image url ! = null ) { builder field ( x field image url get preferred name ( ) , image url ) ; } if ( thumb url ! = null ) { builder field ( x field thumb url get preferred name ( ) , thumb url ) ; } if ( markdown supported fields ! = null ) { builder start array ( x field markdown in get preferred name ( ) ) ; for ( string field : markdown supported fields ) { builder value ( field ) ; } builder end array ( ) ; } if ( actions ! = null & & actions is empty ( ) = = false ) { builder start array ( " actions " ) ; for ( action action : actions ) { action to x content ( builder , params ) ; } builder end array ( ) ; } return builder end object ( ) ; }


protocol type and protocol name are mandatory since version 5 this methods verifies that they are defined for version 5 or higher , or returns true otherwise for older versions

public boolean are mandatory protocol type and name present ( ) { if ( version ( ) > = 5 ) return data protocol type ( ) ! = null & & data protocol name ( ) ! = null ; else return true ; }


notification that the apply button was hit


serialize the triangle tree in a bytes ref

public static bytes ref write ( list < indexable field > fields , coordinate encoder coordinate encoder , centroid calculator centroid calculator ) throws i o exception { final byte buffers data output out = new byte buffers data output ( ) ; / / normalization may be required due to floating point precision errors out write int ( coordinate encoder encode x ( coordinate encoder normalize x ( centroid calculator get x ( ) ) ) ) ; out write int ( coordinate encoder encode y ( coordinate encoder normalize y ( centroid calculator get y ( ) ) ) ) ; centroid calculator get dimensional shape type ( ) write to ( out ) ; out write v long ( double double to long bits ( centroid calculator sum weight ( ) ) ) ; triangle tree writer write to ( out , fields ) ; return new bytes ref ( out to array copy ( ) , 0 , math to int exact ( out size ( ) ) ) ; }


returns the first input { @ code transformation } of this { @ code two input transformation }

public transformation < in1 > get input 1 ( ) { return input 1 ; }


streaming access to the key useful for desrializing the key into user objects

public data input stream get key stream ( ) { key data input stream reset ( key buffer , klen ) ; return key data input stream ; }


forces a full blockreport on all the datatanodes the call blocks waiting for all blockreports to be received by the namenode

protected final void trigger block report ( ) throws interrupted exception , timeout exception , i o exception { / / trigger block report to nn final map < datanode storage info , integer > report counts before = new hash map < > ( ) ; final f s namesystem fsn = cluster get namesystem ( ) ; for ( data node dn : cluster get data nodes ( ) ) { final datanode descriptor dnd = name node adapter get datanode ( fsn , dn get datanode id ( ) ) ; final datanode storage info storage = dnd get storage infos ( ) [ 0 ] ; report counts before put ( storage , storage get block report count ( ) ) ; data node test utils trigger block report ( dn ) ; } / / wait for block reports to be received generic test utils wait for ( ( ) - > { for ( entry < datanode storage info , integer > report entry : report counts before entry set ( ) ) { final datanode storage info dn storage info = report entry get key ( ) ; final int cnt before = report entry get value ( ) ; final int current cnt = dn storage info get block report count ( ) ; if ( cnt before = = current cnt ) { / / same count means no report has been received return false ; } } / / if we reach here , then all the block reports have been received return true ; } , wait poll interval ms , wait for fbr ms ) ; }


cast { @ code klass } to { @ code base } and instantiate it

public static < t > t new instance ( class < ? > klass , class < t > base ) { return utils new instance ( klass as subclass ( base ) ) ; }


throw an illegal argument exception if any per - context setting does not match a context or if per - context settings are configured when using the general cache

void validate cache settings ( settings settings ) { list < setting affix setting < ? > > affixes = list of ( script max compilations rate setting , script cache expire setting , script cache size setting ) ; list < string > custom rates = new array list < > ( ) ; list < string > keys = new array list < > ( ) ; for ( setting affix setting < ? > affix : affixes ) { for ( string context : affix get as map ( settings ) key set ( ) ) { string s = affix get concrete setting for namespace ( context ) get key ( ) ; if ( contexts contains key ( context ) = = false ) { throw new illegal argument exception ( " context [ " + context + " ] doesn ' t exist for setting [ " + s + " ] " ) ; } keys add ( s ) ; if ( affix equals ( script max compilations rate setting ) ) { custom rates add ( s ) ; } } } if ( script disable max compilations rate setting get ( settings ) ) { if ( custom rates size ( ) > 0 ) { custom rates sort ( comparator natural order ( ) ) ; throw new illegal argument exception ( " cannot set custom context compilation rates [ " + string join ( " , " , custom rates ) + " ] if compile rates disabled via [ " + script disable max compilations rate setting get key ( ) + " ] " ) ; } } }


returns the amount of used heap memory in bytes at the time of measurement

public long get heap memory used ( ) { return heap memory used ; }


public discovery node local node ( ) { discovery node local node = state ( ) get nodes ( ) get local node ( ) ; if ( local node = = null ) { throw new illegal state exception ( " no local node found is the node started ? " ) ; } return local node ; }


returns an enum instance that corresponds to the setting stored , or the a custom default value if the setting has not been assigned yet

public t get enum value ( settings settings , t default value override ) { long lvalue = settings get long ( get setting name ( ) ) ; if ( lvalue = = null ) { return default value override ; } int value ordinal = ( int ) ( long ) lvalue ; return ( 0 < = value ordinal & & value ordinal < values length ) ? values [ value ordinal ] : default value override ; }


reads all bytes from a url into a byte array

public static byte [ ] to byte array ( url url ) throws i o exception { return as byte source ( url ) read ( ) ; }


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


test that the primary nn will not serve any files to a 2nn who doesn ' t share its namespace id , and also will not accept any files from one

public void test namespace verified on file transfer ( ) throws i o exception { mini d f s cluster cluster = null ; configuration conf = new hdfs configuration ( ) ; try { cluster = new mini d f s cluster builder ( conf ) num data nodes ( 0 ) format ( true ) build ( ) ; namenode protocols nn = cluster get name node rpc ( ) ; url fs name = d f s util get info server ( cluster get name node ( ) get service rpc address ( ) , conf , d f s util get http client scheme ( conf ) ) to u r l ( ) ; / / make a finalized log on the server side nn roll edit log ( ) ; remote edit log manifest manifest = nn get edit log manifest ( 1 ) ; remote edit log log = manifest get logs ( ) get ( 0 ) ; n n storage dst image = mockito mock ( n n storage class ) ; mockito do return ( lists new array list ( new file ( " / wont - be - written " ) ) ) when ( dst image ) get files ( mockito < name node dir type > any ( ) , mockito any string ( ) ) ; file mock image file = file create temp file ( " image " , " " ) ; file output stream image file = new file output stream ( mock image file ) ; image file write ( " data " get bytes ( ) ) ; image file close ( ) ; mockito do return ( mock image file ) when ( dst image ) find image file ( mockito any ( name node file class ) , mockito any long ( ) ) ; mockito do return ( new storage info ( 1 , 1 , " x " , 1 , node type name node ) to colon separated string ( ) ) when ( dst image ) to colon separated string ( ) ; try { transfer fs image download image to storage ( fs name , 0 , dst image , false , false ) ; fail ( " storage info was not verified " ) ; } catch ( i o exception ioe ) { string msg = string utils stringify exception ( ioe ) ; assert true ( msg , msg contains ( " but the secondary expected " ) ) ; } try { transfer fs image download edits to storage ( fs name , log , dst image ) ; fail ( " storage info was not verified " ) ; } catch ( i o exception ioe ) { string msg = string utils stringify exception ( ioe ) ; assert true ( msg , msg contains ( " but the secondary expected " ) ) ; } try { transfer fs image upload image from storage ( fs name , conf , dst image , name node file image , 0 ) ; fail ( " storage info was not verified " ) ; } catch ( i o exception ioe ) { string msg = string utils stringify exception ( ioe ) ; assert true ( msg , msg contains ( " but the secondary expected " ) ) ; } } finally { cleanup ( cluster ) ; cluster = null ; } }


public boolean can redo ( ) { return actions ! = null & & actions can redo ( ) ; }


populates a map by reading an input stream , as part of deserialization see { @ link # write map } for the data format

static < k , v > void populate map ( map < k , v > map , object input stream stream ) throws i o exception , class not found exception { int size = stream read int ( ) ; populate map ( map , stream , size ) ; }


returns the original element list , unchanged

public list < double > order ( list < double > insertion order ) { return insertion order ; }


obtain the target { @ code connection factory } for actual use ( never { @ code null } )

protected connection factory obtain target connection factory ( ) { connection factory connection factory = get target connection factory ( ) ; assert state ( connection factory ! = null , " no ' target connection factory ' set " ) ; return connection factory ; }


create a collect packages under directory request

public static sky key key ( repository name repository , rooted path rooted path , immutable set < path fragment > excluded paths ) { return key create ( repository , rooted path , excluded paths ) ; }


post fakeouternumber test serialization of outer number types

default response entity < big decimal > fake outer number serialize ( @ api param ( value = " input number as post body " ) @ valid @ request body ( required = false ) big decimal body ) { return new response entity < > ( http status not implemented ) ; }


remove this item from the associated filesystem the property file and the hidden data directory are removed if in - use files prevent removal a file in use exception will be thrown

void delete content ( string user ) throws i o exception { synchronized ( file system ) { file data dir = get data dir ( ) ; file chk dir = new file ( data dir get parent file ( ) , data dir get name ( ) + " delete " ) ; file utilities delete dir ( chk dir ) ; if ( use data dir & & data dir exists ( ) & & ! data dir rename to ( chk dir ) ) { throw new file in use exception ( get name ( ) + " is in use " ) ; } boolean success = false ; try { property file delete ( ) ; if ( property file exists ( ) ) { throw new file in use exception ( get name ( ) + " is in use " ) ; } success = true ; } finally { if ( ! success ) { if ( use data dir & & ! data dir exists ( ) & & chk dir exists ( ) & & property file exists ( ) ) { chk dir rename to ( data dir ) ; } } else { if ( use data dir ) { file utilities delete dir ( chk dir ) ; } log ( " file deleted " , user ) ; } } } }


sets the bitmap config to be used by this renderer default : bitmap config argb 8888 use bitmap config argb 4444 to consume less memory

public void set bitmap config ( bitmap config config ) { m bitmap config = config ; release bitmap ( ) ; }


given the rounded value ( which was potentially generated by { @ link # round ( long ) } , returns the next rounding value for example , with interval based rounding , if the interval is 3 , { @ code next round value ( 6 ) = 9 }

public final long next rounding value ( long utc millis ) { return prepare ( utc millis , utc millis ) next rounding value ( utc millis ) ; }


converts the given number of the current units into tebibytes

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


initiates the cleanup of fingerprints if enabled in case of configured external storage , the file system based storage cleanup is also performed

public void execute ( task listener listener ) { if ( global fingerprint configuration get ( ) is fingerprint cleanup disabled ( ) ) { logger fine ( " fingerprint cleanup is disabled skipping execution " ) ; return ; } fingerprint storage get ( ) iterate and cleanup fingerprints ( listener ) ; if ( ! ( fingerprint storage get ( ) instanceof file fingerprint storage ) & & fingerprint storage get file fingerprint storage ( ) is ready ( ) ) { file fingerprint storage get file fingerprint storage ( ) iterate and cleanup fingerprints ( listener ) ; } }


will try to reuse or , when not possible to reuse , optionally create a { @ link mesh } that meets the specified criteria

mesh obtain ( vertex attributes vertex attributes , int vertex count , int index count ) ;


configures silence in stdout of the driver server by unlogged messages

public builder with silent ( boolean silent ) { this silent = silent ; return this ; }


the main entry point the exit code is 0 if we successfully created a temporary directory as a sub - directory of the default temporary directory and printed the resulting path to the console

public static void main ( final string [ ] args ) throws i o exception { if ( args length ! = 0 ) { throw new illegal argument exception ( " expected zero arguments but was " + arrays to string ( args ) ) ; } / * * on windows , we avoid creating a unique temporary directory per invocation lest we pollute the temporary directory on other * operating systems , temporary directories will be cleaned automatically via various mechanisms ( e g , systemd , or restarts ) * / final path path ; if ( system get property ( " os name " ) starts with ( " windows " ) ) { path = paths get ( system get property ( " java io tmpdir " ) , " elasticsearch " ) ; files create directories ( path ) ; } else { path = launchers create temp directory ( " elasticsearch - " ) ; } launchers out println ( path to string ( ) ) ; }


verify that a { @ link keyed stream # process ( process function ) } call is correctly translated to an operator

public void test keyed stream process translation ( ) { stream execution environment env = stream execution environment get execution environment ( ) ; data stream source < long > src = env generate sequence ( 0 , 0 ) ; process function < long , integer > process function = new process function < long , integer > ( ) { private static final long serial version u i d = 1l ; @ override public void process element ( long value , context ctx , collector < integer > out ) throws exception { / / do nothing } @ override public void on timer ( long timestamp , on timer context ctx , collector < integer > out ) throws exception { / / do nothing } } ; data stream < integer > processed = src key by ( new identity key selector < long > ( ) ) process ( process function ) ; processed add sink ( new discarding sink < integer > ( ) ) ; assert equals ( process function , get function for data stream ( processed ) ) ; assert true ( get operator for data stream ( processed ) instanceof legacy keyed process operator ) ; }


returns the job id from the doc id returns { @ code null } if the doc id is invalid

public static string extract job id from doc id ( string doc id ) { string job id = doc id replace all ( " ^ " + type + " - " , " " ) ; return job id equals ( doc id ) ? null : job id ; }


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


deregister the { @ link channel } from its { @ link event loop } sub - classes may override this method

protected void do deregister ( ) throws exception { / / noop }


retrieve all attributes of all annotations of the given type , if any ( i e if defined on the underlying element , as direct annotation or meta - annotation ) note that this variant does not take attribute overrides into account

default multi value map < string , object > get all annotation attributes ( string annotation name , boolean class values as string ) { adapt [ ] adaptations = adapt values ( class values as string , true ) ; return get annotations ( ) stream ( annotation name ) filter ( merged annotation predicates unique ( merged annotation : : get meta types ) ) map ( merged annotation : : with non merged attributes ) collect ( merged annotation collectors to multi value map ( map - > map is empty ( ) ? null : map , adaptations ) ) ; }


asynchronously delete all the auto - generated ( i e created by the xpack user ) annotations

public void delete all annotations ( action listener < boolean > listener ) { delete annotations from time ( null , null , listener ) ; }


attempt to parse group names given that some names are not resolvable use the group id list to identify those that are not resolved

private set < string > parse partial group names ( string group names , string group i ds ) throws partial group name exception { string tokenizer name tokenizer = new string tokenizer ( group names , shell token separator regex ) ; string tokenizer id tokenizer = new string tokenizer ( group i ds , shell token separator regex ) ; set < string > groups = new linked hash set < > ( ) ; while ( name tokenizer has more tokens ( ) ) { / / check for unresolvable group names if ( ! id tokenizer has more tokens ( ) ) { throw new partial group name exception ( " number of group names and ids do " + " not match group name = " + group names + " , group id = " + group i ds ) ; } string group name = name tokenizer next token ( ) ; string group i d = id tokenizer next token ( ) ; if ( ! string utils is numeric ( group name ) | | ! group name equals ( group i d ) ) { / / if the group name is non - numeric , it is resolved / / if the group name is numeric , but is not the same as group id , / / regard it as a group name / / if unfortunately , some group names are not resolvable , and / / the group name is the same as the group id , regard it as not / / resolved groups add ( group name ) ; } } return groups ; }


asserts that an extractor behaves correctly given valid input data calls { @ link extractor # seek ( long , long ) } and { @ link extractor # release ( ) } without calling { @ link extractor # init ( extractor output ) } to check these calls do not fail calls { @ link # assert output ( extractor , string , byte [ ] , context , boolean , boolean , boolean , boolean , boolean ) } with all possible combinations of " simulate " parameters

public static void assert all behaviors ( extractor factory factory , string file ) throws i o exception { assert all behaviors ( factory , file , file ) ; }


public void add dump point ( address break addr , register dump addr reg , int relative offset , address space dump addr space , int dump size , int element size , dump format element format , string comment ) { list < dump point > list = dump point map get ( break addr ) ; if ( list = = null ) { list = new array list < > ( ) ; dump point map put ( break addr , list ) ; } list add ( new register relative dump point ( break addr , dump addr reg , relative offset , dump addr space , dump size , element size , element format , comment ) ) ; }


is a numeric year placed before a numeric month ?

boolean is year before month ( ) { return year before month ; }


a float between 0 0 and 1 0 , indicating the % of map work completed

public float map progress ( ) throws i o exception { return job map progress ( ) ; }


public string get string ( ) { return string ; }


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

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


returns an iterator over all the ranges in this list

public iterator < range > get ranges ( ) { return set iterator ( ) ; }


public static string encode ( object parameter ) { if ( parameter = = null ) { return null ; } try { return u r l encoder encode ( parameter to string ( ) , " utf - 8 " ) replace all ( " \ \ + " , " % 20 " ) ; } catch ( unsupported encoding exception e ) { / / should never happen , utf - 8 is always supported throw new runtime exception ( e ) ; } }


erase data from the specified chunks , just setting them as null

protected void erase data from chunks ( e c chunk [ ] chunks ) { for ( int i = 0 ; i < chunks length ; i + + ) { chunks [ i ] = null ; } }


records that a request has been dropped as instructed by the remote balancer

void record dropped request ( string token ) { calls started updater get and increment ( this ) ; calls finished updater get and increment ( this ) ; synchronized ( this ) { long holder holder ; if ( ( holder = calls dropped per token get ( token ) ) = = null ) { calls dropped per token put ( token , ( holder = new long holder ( ) ) ) ; } holder num + + ; } }


get a usage string , contains the command and the options

public string get usage str ( ) { return cmd str + " " + option str ; }


test events related to compensation events

public void test activity compensation events ( ) throws exception { process instance process instance = runtime service start process instance by key ( " compensation process " ) ; assert that ( process instance ) is not null ( ) ; task task = task service create task query ( ) process instance id ( process instance get id ( ) ) single result ( ) ; assert that ( task ) is not null ( ) ; / / complete task , next a compensation event will be thrown task service complete ( task get id ( ) ) ; assert that ( listener get events received ( ) ) has size ( 1 ) ; / / a compensate - event is expected assert that ( listener get events received ( ) get ( 0 ) ) is instance of ( activiti activity event class ) ; activiti activity event activity event = ( activiti activity event ) listener get events received ( ) get ( 0 ) ; assert that ( activity event get type ( ) ) is equal to ( activiti event type activity compensate ) ; assert that ( activity event get activity id ( ) ) is equal to ( " compensate " ) ; / / a new execution is created for the compensation - event , this should be / / visible in the event assert that ( process instance get id ( ) equals ( activity event get execution id ( ) ) ) is false ( ) ; assert that ( activity event get process instance id ( ) ) is equal to ( process instance get process instance id ( ) ) ; assert that ( activity event get process definition id ( ) ) is equal to ( process instance get process definition id ( ) ) ; / / check if the process is still alive process instance = runtime service create process instance query ( ) process instance id ( process instance get id ( ) ) single result ( ) ; assert that ( process instance ) is not null ( ) ; assert database event present ( activiti event type activity compensate ) ; }


creating usernames , sending messages by username

public static synchronized boolean usernames ( ) { return get boolean ( usernames , false ) ; }


returns the iterable of collections that have the specified provider

public static < s extends transitive info collection , c extends info > iterable < s > filter by provider ( iterable < s > prerequisites , final builtin provider < c > provider ) { return iterables filter ( prerequisites , target - > target get ( provider ) ! = null ) ; }


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


this indicates that the client call may now be capable of sending additional messages ( via { @ link # send message } ) without requiring excessive buffering internally this event is just a suggestion and the application is free to ignore it , however doing so may result in excessive buffering within the client call because there is a processing delay to deliver this notification , it is possible for concurrent writes to cause { @ code is ready ( ) = = false } within this callback handle " spurious " notifications by checking { @ code is ready ( ) } ' s current value instead of assuming it is now { @ code true } if { @ code is ready ( ) = = false } the normal expectations apply , so there would be another { @ code on ready ( ) } callback if the type of a call is either { @ link method descriptor method type # unary } or { @ link method descriptor method type # server streaming } , this callback may not be fired calls that send exactly one message should not await this callback


public float get max length ( ) { return joint get max length ( ) ; }


filter on methods annotated with the given annotation type

public final builder < t > annot present ( class < ? extends annotation > annotation types ) { string message = " annotation present = " + arrays to string ( annotation types ) ; add filter ( message , method - > arrays stream ( annotation types ) all match ( annot type - > annotated element utils find merged annotation ( method , annot type ) ! = null ) ) ; return this ; }


return a map from acl filters to futures which can be used to check the status of the deletions by each filter

public map < acl binding filter , kafka future < filter results > > values ( ) { return futures ; }


returns the { @ link acl } for this object we need to override the identical method in abstract item because we won ' t call get a c l ( job ) otherwise ( single dispatch )

public acl get a c l ( ) { return jenkins get ( ) get authorization strategy ( ) get a c l ( this ) ; }


generalization of { @ link x content map values tests # test shared prefixes ( ) }

public void test filter shared prefixes ( ) throws i o exception { final builder sample = builder - > builder start object ( ) field ( " foobar " , 2 ) field ( " foobaz " , 3 ) end object ( ) ; builder expected = builder - > builder start object ( ) field ( " foobar " , 2 ) end object ( ) ; test filter ( expected , sample , singleton ( " foobar " ) , empty set ( ) ) ; expected = builder - > builder start object ( ) field ( " foobaz " , 3 ) end object ( ) ; test filter ( expected , sample , empty set ( ) , singleton ( " foobar " ) ) ; }


returns the number of pairs in the dataset

public long count ( ) { return x stats count ( ) ; }


public void init ( ) { reloader = new thread ( this , " truststore reloader thread " ) ; reloader set daemon ( true ) ; running = true ; reloader start ( ) ; }


returns the number of { @ link f s r l root } s there are in this { @ link fsrl } a single level fsrl such as " file : path " will return 1 < br > a two level fsrl such as " file : path | subfs : path 2 " will return 2 < br > etc < br >

public int get nesting depth ( ) { int depth = 0 ; f s r l root root = get f s ( ) ; while ( root ! = null ) { depth + + ; root = root has container ( ) ? root get container ( ) get f s ( ) : null ; } return depth ; }


by default , return true to render the " edit view " link on the page this method is really just for the default " all " view to hide the edit link so that the default hudson top page remains the same as before 1 316

public boolean is editable ( ) { return true ; }


get the default port for this f t p file system

protected int get default port ( ) { return ftp default port ; }


asynchronously fulfills the request into the specified { @ link remote views } object with the given { @ code view id } this is used for loading bitmaps into a { @ link notification }

public void into ( @ non null remote views remote views , @ id res int view id , int notification id , @ non null notification notification , @ nullable string notification tag , @ nullable callback callback ) { long started = system nano time ( ) ; if ( remote views = = null ) { throw new illegal argument exception ( " remote views must not be null " ) ; } if ( notification = = null ) { throw new illegal argument exception ( " notification must not be null " ) ; } if ( deferred ) { throw new illegal state exception ( " fit cannot be used with remote views " ) ; } if ( placeholder drawable ! = null | | error drawable ! = null ) { throw new illegal argument exception ( " cannot use placeholder or error drawables with remote views " ) ; } request request = create request ( started ) ; remote views action action = new notification action ( picasso , request , error res id , new remote views target ( remote views , view id ) , notification id , notification , notification tag , callback ) ; perform remote view into ( request , action ) ; }


public final string get worker id ( ) { return this worker id to string ( ) ; }


record iterator get records ( ) throws i o exception { return name table iterator ( ) ; }


select the accept header ' s value from the given accepts array : if json exists in the given array , use it ; otherwise use all of them ( joining into a string )

public string select header accept ( string [ ] accepts ) { if ( accepts length = = 0 ) return null ; if ( string util contains ignore case ( accepts , " application / json " ) ) return " application / json " ; return string util join ( accepts , " , " ) ; }


invoked inside the { @ link runnable } submitted to the executor after calling the target message handler regardless of the outcome ( i e exception raised or not ) thus allowing for proper resource cleanup note that this will be invoked only if before handle successfully completed and returned a message , i e it did not return { @ code null }

default void after message handled ( message < ? > message , message channel channel , message handler handler , @ nullable exception ex ) { }


returns a builder that creates immutable sorted maps whose keys are ordered by the reverse of their natural ordering

public static < k extends comparable < ? > , v > builder < k , v > reverse order ( ) { return new builder < > ( ordering natural ( ) reverse ( ) ) ; }


specify the parallelism level default is { @ link runtime # available processors ( ) }

public void set parallelism ( int parallelism ) { this parallelism = parallelism ; }


public void test increment double ( ) { assert equals ( 0d , exec ( " double x = 0 0 ; return x + + ; " ) ) ; assert equals ( 0d , exec ( " double x = 0 0 ; return x - - ; " ) ) ; assert equals ( 1d , exec ( " double x = 0 0 ; return + + x ; " ) ) ; assert equals ( - 1d , exec ( " double x = 0 0 ; return - - x ; " ) ) ; }


customize the { @ link hint strategy table } which contains hint strategies supported by flink

public static hint strategy table create hint strategy table ( ) { return hint strategy table builder ( ) / / configure to always throw when we encounter any hint errors / / ( either the non - registered hint or the hint format ) error handler ( litmus throw ) hint strategy ( flink hints hint name options , hint strategy builder ( hint predicates table scan ) option checker ( ( hint , error handler ) - > error handler check ( hint kv options size ( ) > 0 , " hint [ { } ] only support non empty key value options " , hint hint name ) ) build ( ) ) build ( ) ; }


sets the initial background color defaults to black

public void set initial background color ( color color ) { initial background color = color ; }


method that initializes the various pieces of information that are used throughout the program

protected void init ( program program ) { init pointer info ( ) ; dword d t = new d word data type ( ) ; }


public void test container launch on configuration error ( ) throws exception { dispatcher dispatcher = mock ( dispatcher class ) ; event handler handler = mock ( event handler class ) ; when ( dispatcher get event handler ( ) ) then return ( handler ) ; application app = mock ( application class ) ; application id app id = mock ( application id class ) ; when ( app id to string ( ) ) then return ( " 1 " ) ; when ( app get app id ( ) ) then return ( app id ) ; container container = mock ( container class ) ; container id id = mock ( container id class ) ; when ( id to string ( ) ) then return ( " 1 " ) ; when ( container get container id ( ) ) then return ( id ) ; when ( container get user ( ) ) then return ( " user " ) ; container launch context clc = mock ( container launch context class ) ; when ( clc get commands ( ) ) then return ( lists new array list ( ) ) ; when ( container get launch context ( ) ) then return ( clc ) ; credentials credentials = mock ( credentials class ) ; when ( container get credentials ( ) ) then return ( credentials ) ; / / configuration errors should result in node shutdown container executor return config error = mock ( container executor class ) ; when ( return config error launch container ( any ( ) ) ) then throw ( new configuration exception ( " mock configuration error " ) ) ; container launch launch config error = new container launch ( dist context , conf , dispatcher , return config error , app , container , dirs handler , container manager ) ; node status updater updater = mock ( node status updater class ) ; dist context set node status updater ( updater ) ; launch config error call ( ) ; verify ( updater , at least once ( ) ) report exception ( any ( ) ) ; / / any other error should continue container executor return other error = mock ( container executor class ) ; when ( return other error launch container ( any ( ) ) ) then throw ( new i o exception ( " mock configuration error " ) ) ; container launch launch other error = new container launch ( dist context , conf , dispatcher , return other error , app , container , dirs handler , container manager ) ; node status updater updater no call = mock ( node status updater class ) ; dist context set node status updater ( updater no call ) ; launch other error call ( ) ; verify ( updater no call , never ( ) ) report exception ( any ( ) ) ; }


required if mode is ` simple ` or ` mutual ` the path to the file holding the server ' s private key < code > string private key = 4 ; < code >

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


prepares this instance for writing this performs any necessary prerequisites , including particularly adding stuff to other sections this method may only be called once per instance ; subsequent calls will throw an exception

public final void prepare ( ) { throw if prepared ( ) ; prepare 0 ( ) ; system out println ( " prepare type : " + name + " in " + file ) ; prepared = true ; }


informs consumer that processing of an archive file has begun

void on process archive start ( file file ) ;


sets the current { @ link execution environment } to be a { @ link test environment } the test environment executes the given jobs on a flink mini cluster with the given default parallelism and the additional jar files and class paths

public static void set as context ( final mini cluster mini cluster , final int parallelism , final collection < path > jar files , final collection < url > class paths ) { execution environment factory factory = ( ) - > new test environment ( mini cluster , parallelism , false , jar files , class paths ) ; initialize context environment ( factory ) ; }


returns the dynamically linked shared library

public dynamic library get dynamic library ( ) { return dylib ; }


adds { @ code equality group } with objects that are supposed to be equal to each other and not equal to any other equality groups added to this tester

public equals tester add equality group ( object equality group ) { check not null ( equality group ) ; equality groups add ( immutable list copy of ( equality group ) ) ; return this ; }


allows to choose a method when stubbing in do throw ( ) | do answer ( ) | do nothing ( ) | do return ( ) style example : < pre class = " code " > < code class = " java " > do throw ( new runtime exception ( ) ) when ( mocked list ) clear ( ) ; following throws runtime exception : mocked list clear ( ) ; < code > read more about those methods : { @ link mockito # do throw ( throwable [ ] ) } { @ link mockito # do answer ( answer ) } { @ link mockito # do nothing ( ) } { @ link mockito # do return ( object ) } see examples in javadoc for { @ link mockito }


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


verifies that a collection is immutable a collection is considered immutable if : all its mutation methods result in unsupported operation exception , and do not change the underlying contents all methods that return objects that can indirectly mutate the collection throw unsupported operation exception when those mutators are called

public static < e > void assert collection is unmodifiable ( collection < e > collection , e sample element ) { collection < e > sibling collection = new array list < > ( ) ; sibling collection add ( sample element ) ; collection < e > copy = new array list < > ( ) ; / / avoid copy add all ( collection ) , which runs afoul of an android bug in older versions : / / http : / / b android com / 72073 http : / / r android com / 98929 iterators add all ( copy , collection iterator ( ) ) ; try { collection add ( sample element ) ; fail ( " add succeeded on unmodifiable collection " ) ; } catch ( unsupported operation exception expected ) { } assert collections are equivalent ( copy , collection ) ; try { collection add all ( sibling collection ) ; fail ( " add all succeeded on unmodifiable collection " ) ; } catch ( unsupported operation exception expected ) { } assert collections are equivalent ( copy , collection ) ; try { collection clear ( ) ; fail ( " clear succeeded on unmodifiable collection " ) ; } catch ( unsupported operation exception expected ) { } assert collections are equivalent ( copy , collection ) ; assert iterator is unmodifiable ( collection iterator ( ) ) ; assert collections are equivalent ( copy , collection ) ; try { collection remove ( sample element ) ; fail ( " remove succeeded on unmodifiable collection " ) ; } catch ( unsupported operation exception expected ) { } assert collections are equivalent ( copy , collection ) ; try { collection remove all ( sibling collection ) ; fail ( " remove all succeeded on unmodifiable collection " ) ; } catch ( unsupported operation exception expected ) { } assert collections are equivalent ( copy , collection ) ; try { collection retain all ( sibling collection ) ; fail ( " retain all succeeded on unmodifiable collection " ) ; } catch ( unsupported operation exception expected ) { } assert collections are equivalent ( copy , collection ) ; }


provide the { @ link r socket strategies } to use this is useful for changing the default settings , yet still allowing further customizations via { @ link # rsocket strategies ( consumer ) } if not set , defaults are obtained from { @ link r socket strategies # builder ( ) }

r socket requester builder rsocket strategies ( @ nullable r socket strategies strategies ) ;


return the underlying native web socket session , if available

< t > t get native session ( @ nullable class < t > required type ) ;


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


get the absolute value of the given number if the number is int min value return 0 this is different from java lang math abs or scala math abs in that they return int min value ( ! )

public static int abs ( int n ) { return ( n = = integer min value ) ? 0 : math abs ( n ) ; }


aligns the current index on the specified alignment value for example , if current index was 123 and align value was 16 , then current index would become 128

public int align ( int align value ) { long align = current index % align value ; if ( align = = 0 ) { return 0 ; } current index = current index + ( align value - align ) ; return ( int ) ( align value - align ) ; }


public void visit plain cst insn ( plain cst insn insn ) { visit ( insn ) ; }


protected final request context get request context ( ) { assert state ( this request context ! = null , " no current request context " ) ; return this request context ; }


int allocate ( ) { return allocate ( lot size ) ; }


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

public static fields find by thrift id ( int field id ) { switch ( field id ) { case 1 : / / arg return arg ; default : return null ; } }


returns an instance that is just like this one , except that its opcode has the opposite sense ( as a test ; e g a { @ code lt } test becomes a { @ code ge } ) , and its branch target is replaced by the one given , and all set - once values associated with the class ( such as its address ) are reset

public target insn with new target and reversed ( code address target ) { dop opcode = get opcode ( ) get opposite test ( ) ; return new target insn ( opcode , get position ( ) , get registers ( ) , target ) ; }


public router quota manager get quota manager ( ) { return this quota manager ; }


private synchronized s 3 a data blocks data block create block if needed ( ) throws i o exception { if ( active block = = null ) { block count + + ; if ( block count > = constants max multipart count ) { log error ( " number of partitions in stream exceeds limit for s3 : " + constants max multipart count + " write may fail " ) ; } active block = block factory create ( block count , this block size , statistics ) ; } return active block ; }


gets passwordless authentication account

public static < t > t get passwordless authentication account ( final event event , final class < t > clazz ) { if ( event ! = null ) { return event get attributes ( ) get ( " passwordless account " , clazz ) ; } return null ; }


find out all plugins that depend on a plugin and add them to the dependency set

private void find dependencies ( plugin plugin , list < plugin > plugins ) { for ( int i = 0 ; i < plugins size ( ) ; i + + ) { plugin p = plugins get ( i ) ; if ( p depends upon ( plugin ) ) { plugins with dependencies set add ( get plugin description ( plugin ) ) ; } } }


does the domain name match one of the " wildcard " patterns ( e g { @ code " ar " } ) ? if a { @ code desired type } is specified , the wildcard pattern must also match that type

private static boolean matches wildcard suffix type ( optional < public suffix type > desired type , string domain ) { list < string > pieces = dot splitter limit ( 2 ) split to list ( domain ) ; return pieces size ( ) = = 2 & & matches type ( desired type , optional from nullable ( public suffix patterns under get ( pieces get ( 1 ) ) ) ) ; }


returns all nodes in this network adjacent to { @ code node } which can be reached by traversing { @ code node } ' s outgoing edges in the direction ( if any ) of the edge in an undirected network , this is equivalent to { @ link # adjacent nodes ( object ) } this is not the same as " all nodes reachable from { @ code node } by following outgoing edges " for that functionality , see { @ link graphs # reachable nodes ( graph , object ) }


builds and registers a { @ link spawn action builder }

public void register action ( spawn action builder spawn action builder ) { register action ( spawn action builder build ( rule context ) ) ; }


returns a view that associates each row key with the corresponding map from column keys to values changes to the returned map will update this table the returned map does not support { @ code put ( ) } or { @ code put all ( ) } , or { @ code set value ( ) } on its entries in contrast , the maps returned by { @ code row map ( ) get ( ) } have the same behavior as those returned by { @ link # row } those maps may support { @ code set value ( ) } , { @ code put ( ) } , and { @ code put all ( ) }


join records of this stream with another { @ code k stream } ' s records using windowed left equi join with default serializers and deserializers in contrast to { @ link # join ( k stream , value joiner , join windows ) inner - join } , all records from this stream will produce at least one output record ( cf below ) the join is computed on the records ' key with join attribute { @ code this k stream key = = other k stream key } furthermore , two records are only joined if their timestamps are close to each other as defined by the given { @ link join windows } , i e , the window defines an additional join predicate on the record timestamps for each pair of records meeting both join predicates the provided { @ link value joiner } will be called to compute a value ( with arbitrary type ) for the result record the key of the result record is the same as for both joining input records furthermore , for each input record of this { @ code k stream } that does not satisfy the join predicate the provided { @ link value joiner } will be called with a { @ code null } value for the other stream if an input record key or value is { @ code null } the record will not be included in the join operation and thus no output record will be added to the resulting { @ code k stream } example ( assuming all input records belong to the correct windows ) : < table border = ' 1 ' > < tr > < th > this < th > < th > other < th > < th > result < th > < tr > < tr > < td > & lt ; k1 : a & gt ; < td > < td > < td > < td > & lt ; k1 : value joiner ( a , null ) & gt ; < td > < tr > < tr > < td > & lt ; k2 : b & gt ; < td > < td > & lt ; k2 : b & gt ; < td > < td > & lt ; k2 : value joiner ( b , b ) & gt ; < td > < tr > < tr > < td > < td > < td > & lt ; k3 : c & gt ; < td > < td > < td > < tr > < table > both input streams ( or to be more precise , their underlying source topics ) need to have the same number of partitions if this is not the case , you would need to call { @ link # repartition ( repartitioned ) } ( for one input stream ) before doing the join and specify the " correct " number of partitions via { @ link repartitioned } parameter furthermore , both input streams need to be co - partitioned on the join key ( i e , use the same partitioner ) if this requirement is not met , kafka streams will automatically repartition the data , i e , it will create an internal repartitioning topic in kafka and write and re - read the data via this topic before the actual join the repartitioning topic will be named " $ { application id } - & lt ; name & gt ; - repartition " , where " application id " is user - specified in { @ link streams config } via parameter { @ link streams config # application id config application id config } , " & lt ; name & gt ; " is an internally generated name , and " - repartition " is a fixed suffix repartitioning can happen for one or both of the joining { @ code k stream } s for this case , all data of the stream will be redistributed through the repartitioning topic by writing all records to it , and rereading all records from it , such that the join input { @ code k stream } is partitioned correctly on its key both of the joining { @ code k stream } s will be materialized in local state stores with auto - generated store names for failure and recovery each store will be backed by an internal changelog topic that will be created in kafka the changelog topic will be named " $ { application id } - & lt ; storename & gt ; - changelog " , where " application id " is user - specified in { @ link streams config } via parameter { @ link streams config # application id config application id config } , " store name " is an internally generated name , and " - changelog " is a fixed suffix you can retrieve all generated internal topic names via { @ link topology # describe ( ) }

< vo , vr > k stream < k , vr > left join ( final k stream < k , vo > other stream , final value joiner < ? super v , ? super vo , ? extends vr > joiner , final join windows windows ) ;


use { @ link # logged ( string , duration ) } instead this should only be called when caller has a specially configured { @ code logger } and cannot use this class ' s one

public static auto profiler logged ( string description , google logger logger , duration min time for logging ) { return auto profiler create ( make receiver ( description , logger , min time for logging ) ) ; }


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


add the given { @ link property source } to the start of the chain

public void add first property source ( property source < ? > property source ) { list < property source < ? > > existing = new array list < > ( this property sources ) ; this property sources clear ( ) ; this property sources add ( property source ) ; this property sources add all ( existing ) ; }


public void add pet test ( ) throws i o exception { pet pet = null ; api add pet ( pet ) ; / / todo : test validations }


determine if this exception handler is complus

public boolean is complus ( ) { return is bit set ( complus bit ) ; }


retrieve a { @ link bind markers factory } by inspecting { @ link connection factory } and its metadata

public static bind markers factory resolve ( connection factory connection factory ) { for ( bind marker factory provider detector : detectors ) { bind markers factory bind markers factory = detector get bind markers ( connection factory ) ; if ( bind markers factory ! = null ) { return bind markers factory ; } } throw new no bind markers factory exception ( string format ( " cannot determine a bind markers factory for % s using % s " , connection factory get metadata ( ) get name ( ) , connection factory ) ) ; }


forces an immediate shutdown of the thread looses any state and all buffers that the thread is currently working on this terminates cleanly for the jvm , but looses intermediate results

public void shutdown ( ) { this alive = false ; this interrupt ( ) ; }


removes a resource for the specified interval

public boolean remove interval ( reservation interval reservation interval , resource tot cap ) { if ( tot cap equals ( zero resource ) ) { return true ; } write lock lock ( ) ; try { navigable map < long , resource > remove int = new tree map < long , resource > ( ) ; remove int put ( reservation interval get start time ( ) , tot cap ) ; remove int put ( reservation interval get end time ( ) , zero resource ) ; try { cumulative capacity = merge ( resource calculator , tot cap , cumulative capacity , remove int , long min value , long max value , r l e operator subtract ) ; } catch ( planning exception e ) { / / never happens for subtract } return true ; } finally { write lock unlock ( ) ; } }


public writable get ( ) { return instance ; }


emulates a way that we do not use { @ link long keyed bucket ords } because it is significantly slower than the { @ link # single bucket into single mutable monmorphic invocation monomorphic invocation }

public void single bucket into single mutable bimorphic invocation ( blackhole bh ) { long keyed bucket ords ords = long keyed bucket ords build ( big arrays , cardinality upper bound one ) ; for ( long i = 0 ; i < limit ; i + + ) { if ( i % 100 000 = = 0 ) { ords close ( ) ; bh consume ( ords ) ; ords = long keyed bucket ords build ( big arrays , cardinality upper bound one ) ; } ords add ( 0 , i % distinct values ) ; } bh consume ( ords ) ; ords close ( ) ; }


exit a parse tree produced by the { @ code timestamp escaped literal } labeled alternative in { @ link sql base parser # constant }

void exit timestamp escaped literal ( sql base parser timestamp escaped literal context ctx ) ;


settle the captured view based on standard free - moving fling behavior the caller should invoke { @ link # continue settling ( boolean ) } on each subsequent frame to continue the motion until it returns false

public void fling captured view ( int min left , int min top , int max left , int max top ) { if ( ! m release in progress ) { throw new illegal state exception ( " cannot fling captured view outside of a call to " + " callback # on view released " ) ; } m scroller fling ( m captured view get left ( ) , m captured view get top ( ) , ( int ) velocity tracker compat get x velocity ( m velocity tracker , m active pointer id ) , ( int ) velocity tracker compat get y velocity ( m velocity tracker , m active pointer id ) , min left , max left , min top , max top ) ; set drag state ( state settling ) ; }


simplfies this local property provided that the specified inputs are constants

default optional < local property < e > > with constants ( set < e > constants ) { set < e > set = new linked hash set < > ( get columns ( ) ) ; set remove all ( constants ) ; if ( set is empty ( ) ) { return optional empty ( ) ; } return optional of ( constrain ( set ) ) ; }


remove all listeners for desired message id

public void remove listeners ( final int id ) { if ( debug ) { final list < ui message callback > callbacks = m listeners specific get ( id ) ; if ( callbacks = = null | | callbacks size ( ) = = 0 ) { log w ( tag , " trying to remove specific listeners that are not registered id " + id ) ; } } synchronized ( m listeners specific ) { m listeners specific delete ( id ) ; } }


< code > optional aapt pb styleable styleable = 3 ; < code >

public builder set styleable ( com android aapt resources styleable value ) { copy on write ( ) ; instance set styleable ( value ) ; return this ; }


override this if you want to specify the asset path for a given font family

public string get font path ( string font family ) { return null ; }


return a description for this endpoint available to subclasses , for inclusion in their { @ code to string ( ) } result

protected string builder get endpoint description ( ) { string builder result = new string builder ( ) ; return result append ( get class ( ) get simple name ( ) ) append ( " [ " ) append ( this id ) append ( " ] destination = " ) append ( this destination ) append ( " ' | subscription = ' " ) append ( this subscription ) append ( " | selector = ' " ) append ( this selector ) append ( " ' " ) ; }


public void set primary ( boolean state ) { is primary = state ; }


returns a list of checks that are enforced when a node starts up once a node has the transport protocol bound to a non - loopback interface in this case we assume the node is running in production and all bootstrap checks must pass this allows plugins to provide a better out of the box experience by pre - configuring otherwise ( in production ) mandatory settings or to enforce certain configurations like os settings or 3rd party resources

public list < bootstrap check > get bootstrap checks ( ) { return collections empty list ( ) ; }


public final clear scroll response clear scroll ( clear scroll request clear scroll request , request options options ) throws i o exception { return perform request and parse entity ( clear scroll request , request converters : : clear scroll , options , clear scroll response : : from x content , empty set ( ) ) ; }


set the jdbc template for this dao explicitly , as an alternative to specifying a data source

public final void set jdbc template ( @ nullable jdbc template jdbc template ) { this jdbc template = jdbc template ; init template config ( ) ; }


public void get subchannel ( get subchannel request request , stream observer < get subchannel response > response observer ) { internal instrumented < channel stats > s = channelz get subchannel ( request get subchannel id ( ) ) ; if ( s = = null ) { response observer on error ( status not found with description ( " can ' t find subchannel " + request get subchannel id ( ) ) as runtime exception ( ) ) ; return ; } get subchannel response resp ; try { resp = get subchannel response new builder ( ) set subchannel ( channelz proto util to subchannel ( s ) ) build ( ) ; } catch ( status runtime exception e ) { response observer on error ( e ) ; return ; } response observer on next ( resp ) ; response observer on completed ( ) ; }


returns the maximum texture size that will be used by generate data ( ) when creating a texture atlas for the glyphs

public static int get max texture size ( ) { return max texture size ; }


convert this stream to a { @ link k table } if a key changing operator was used before this operation ( e g , { @ link # select key ( key value mapper ) } , { @ link # map ( key value mapper ) } , { @ link # flat map ( key value mapper ) } or { @ link # transform ( transformer supplier , string ) } ) an internal repartitioning topic will be created in kafka this topic will be named " $ { application id } - & lt ; name & gt ; - repartition " , where " application id " is user - specified in { @ link streams config } via parameter { @ link streams config # application id config application id config } , " & lt ; name & gt ; " is an internally generated name , and " - repartition " is a fixed suffix you can retrieve all generated internal topic names via { @ link topology # describe ( ) } for this case , all data of this stream will be redistributed through the repartitioning topic by writing all records to it , and rereading all records from it , such that the resulting { @ link k table } is partitioned correctly on its key note that you cannot enable { @ link streams config # topology optimization config } config for this case , because repartition topics are considered transient and don ' t allow to recover the result { @ link k table } in cause of a failure ; hence , a dedicated changelog topic is required to guarantee fault - tolerance note that this is a logical operation and only changes the " interpretation " of the stream , i e , each record of it was a " factevent " and is re - interpreted as update now ( cf { @ link k stream } vs { @ code k table } )

k table < k , v > to table ( final named named , final materialized < k , v , key value store < bytes , byte [ ] > > materialized ) ;


called by the workspace when it is updating its name ; causes a property change event to be fired

void set workspace name ( workspace ws , string name ) throws duplicate name exception { if ( ws map contains key ( name ) ) { throw new duplicate name exception ( " workspace named " + name + " already exists " ) ; } ws map remove ( ws get name ( ) ) ; ws map put ( name , ws ) ; / / fire property change event property change event event = new property change event ( this , workspace name property , ws get name ( ) , name ) ; for ( int i = 0 ; i < change listeners size ( ) ; i + + ) { workspace change listener l = change listeners get ( i ) ; l property change ( event ) ; } }


convenience method for counting the rows in the given table , using the provided { @ code where } clause see the javadoc for { @ link jdbc test utils # count rows in table where } for details

protected int count rows in table where ( string table name , string where clause ) { return jdbc test utils count rows in table where ( this jdbc template , table name , where clause ) ; }


run a test checking that the given assembly parses , but does not assemble

protected void assert all semantic errors ( string assembly ) { run test ( assembly , null , null , default addr , null , false , false , false , true ) ; }


search the currently managed source directories for the given script file

public static resource file find source directory containing ( resource file source file ) { string source path ; try { source path = source file get canonical path ( ) ; for ( resource file source dir : get script source directories ( ) ) { if ( source path starts with ( source dir get canonical path ( ) + file separator char ) ) { return source dir ; } } } catch ( i o exception e ) { msg error ( ghidra script util class , " failed to find script in any script directory : " + source file to string ( ) , e ) ; } return null ; }


public int get count ( ) { return m string offsets ! = null ? m string offsets length : 0 ; }


takes a list of operators and creates a cascade of unions of this inputs , if needed if not needed ( there was only one operator in the list ) , then that operator is returned

public static < t > operator < t > create union cascade ( list < ? extends operator < t > > operators ) { return create union cascade ( ( operator < t > [ ] ) operators to array ( new operator [ operators size ( ) ] ) ) ; }


public float get ratio ( ) { return jni get ratio ( addr ) ; }


bz 2 is recognized as the default extension for compressed b zip 2 files

public string get default extension ( ) { return codec constants bzip2 codec extension ; }