should mkdir create this directory ? if the directory is root : false if the entry exists and is a directory : false if the entry exists and is a file : exception else : true

private boolean should create ( path directory ) throws i o exception { file status file status ; boolean should create ; if ( is root ( directory ) ) { / / its the base dir , bail out immediately return false ; } try { / / find out about the path file status = get file status ( directory ) ; if ( ! swift utils is directory ( file status ) ) { / / if it ' s a file , raise an error throw new parent not directory exception ( string format ( " % s : can ' t mkdir since it exists and is not a directory : % s " , directory , file status ) ) ; } else { / / path exists , and it is a directory if ( log is debug enabled ( ) ) { log debug ( " skipping mkdir ( " + directory + " ) as it exists already " ) ; } should create = false ; } } catch ( file not found exception e ) { should create = true ; } return should create ; }


resets variables maintaining the sum to zero this method may be a useful alternative to creating a new adder , but is only effective if there are no concurrent updates because this method is intrinsically racy , it should only be used when it is known that no threads are concurrently updating

public void reset ( ) { internal reset ( 0l ) ; }


return a builder for a { @ code sse event } , populated with the give { @ linkplain # data ( ) data }

public static < t > builder < t > builder ( t data ) { return new builder impl < > ( data ) ; }


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


puts the given instance in the intern table if it ' s not already there if a conflicting value is already in the table , then leave it return the interned value

private static type put intern ( type type ) { synchronized ( intern table ) { string descriptor = type get descriptor ( ) ; type already = intern table get ( descriptor ) ; if ( already ! = null ) { return already ; } intern table put ( descriptor , type ) ; return type ; } }


adds environmental variables for the builds to the given map if the { @ link environment } object wants to pass in information to the build that runs , it can do so by exporting additional environment variables to the map when this method is invoked , the map already contains the current " planned export " list

public void build env vars ( map < string , string > env ) { / / no - op by default }


set whether to allow the raw injection of a bean instance into some other bean ' s property , despite the injected bean eventually getting wrapped ( for example , through aop auto - proxying ) this will only be used as a last resort in case of a circular reference that cannot be resolved otherwise : essentially , preferring a raw instance getting injected over a failure of the entire bean wiring process default is " false " , as of spring 2 0 turn this on to allow for non - wrapped raw beans injected into some of your references , which was spring 1 2 ' s ( arguably unclean ) default behavior < b > note : < b > it is generally recommended to not rely on circular references between your beans , in particular with auto - proxying involved

public void set allow raw injection despite wrapping ( boolean allow raw injection despite wrapping ) { this allow raw injection despite wrapping = allow raw injection despite wrapping ; }


puts the sketch into the top - down cache may complete asynchronously

void put ( action sketch sketch , action execution value value ) ;


boolean is snapshot in progress ( ) { return active file ! = null ; }


add an action to set the alpha of a view can be called multiple times alpha between 0 - 1

public base adapter helper set alpha ( int view id , float value ) { if ( build version sdk int > = build version codes honeycomb ) { retrieve view ( view id ) set alpha ( value ) ; } else { / / pre - honeycomb hack to set alpha value alpha animation alpha = new alpha animation ( value , value ) ; alpha set duration ( 0 ) ; alpha set fill after ( true ) ; retrieve view ( view id ) start animation ( alpha ) ; } return this ; }


return true if this enum test object is equal to o

public boolean equals ( object o ) { if ( this = = o ) { return true ; } if ( o = = null | | get class ( ) ! = o get class ( ) ) { return false ; } enum test enum test = ( enum test ) o ; return objects equals ( this enum string , enum test enum string ) & & objects equals ( this enum string required , enum test enum string required ) & & objects equals ( this enum integer , enum test enum integer ) & & objects equals ( this enum number , enum test enum number ) & & objects equals ( this outer enum , enum test outer enum ) & & objects equals ( this outer enum integer , enum test outer enum integer ) & & objects equals ( this outer enum default value , enum test outer enum default value ) & & objects equals ( this outer enum integer default value , enum test outer enum integer default value ) ; }


gets the list of assigned user jar paths

public list < path > get user jars ( ) { return user jars ; }


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

t visit param literal ( sql base parser param literal context ctx ) ;


public string [ ] get automatic comment ( ) { return ( string [ ] ) display comment arrays [ my automatic ] ; }


compiles the given pattern into a { @ link n f a factory } the nfa factory can be used to create multiple n f as

void compile factory ( ) { if ( current pattern get quantifier ( ) get consuming strategy ( ) = = quantifier consuming strategy not follow ) { throw new malformed pattern exception ( " not followed by is not supported as a last part of a pattern ! " ) ; } check pattern name uniqueness ( ) ; check pattern skip strategy ( ) ; / / we ' re traversing the pattern from the end to the beginning - - > the first state is the / / final state state < t > sink state = create ending state ( ) ; / / add all the normal states sink state = create middle states ( sink state ) ; / / add the beginning state create start state ( sink state ) ; }


public static boolean is leeco ( ) { return rom leeco [ 0 ] equals ( get rom info ( ) name ) ; }


combines a user query with a time range query

public static query builder wrap in time range query ( query builder user query , string time field , long start , long end ) { query builder time query = new range query builder ( time field ) gte ( start ) lt ( end ) format ( epoch millis ) ; return new bool query builder ( ) filter ( user query ) filter ( time query ) ; }


returns an address map which may be used during the upgrade of old address encodings if the address map is up - to - date , then this method will return this instance of address map d b

public address map get old address map ( ) { return use old addr map ? this : old addr map ; }


should the response include version metadata

public boolean version ( ) { return search context version ( ) ; }


returns < code > true < code > iff the settings update should only add but not update settings if the setting already exists it should not be overwritten by this update the default is < code > false < code >

public boolean is preserve existing ( ) { return preserve existing ; }


generate error log entry and bookmark at relocation address indicating an unsupported relr relocation

public static void mark as unsupported relr ( program program , address relocation address ) { bookmark manager bookmark manager = program get bookmark manager ( ) ; bookmark manager set bookmark ( relocation address , bookmark type error , " unsupported relr relocation " , " elf extension does not specify type " ) ; }


gets the name of the { @ code planner } class associated with the queue

public string get replanner ( string queue ) { return default reservation planner name ; }


public void write map ( map map ) throws i o exception { write map header ( map size ( ) ) ; set < entry > entries = map entry set ( ) ; for ( entry entry : entries ) { write ( entry get key ( ) ) ; write ( entry get value ( ) ) ; } }


this implementations expects the other object to be of type bean component definition as well , in addition to the superclass ' s equality requirements

public boolean equals ( @ nullable object other ) { return ( this = = other | | ( other instanceof bean component definition & & super equals ( other ) ) ) ; }


public list < android library > get all library aars ( ) { list < android library > libraries = lists new array list ( ) ; if ( null ! = android library ) { libraries add ( android library ) ; } libraries add all ( android libraries ) ; return libraries ; }


return the { @ link jms headers # destination destination }

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


add an explicit data - block to this segment that might extend the length of this segment borland compilers in particular produce data - blocks that can extend the segment in this way

protected void append enumerated data ( omf enumerated data rec ) { long blockend = rec get data offset ( ) + rec get length ( ) ; if ( blockend > segment length ) { segment length = blockend ; } data blocks add ( rec ) ; }


public void to string test ( ) { branch register response branch register response = new branch register response ( ) ; branch register response set branch id ( 123457l ) ; branch register response set result code ( result code success ) ; branch register response set msg ( " " ) ; assertions assert equals ( " branch register response : branch id = 123457 , result code = success , get msg = " , branch register response to string ( ) ) ; }


protected list < string > flat user data ( user data user data ) { list < string > result = new array list < > ( ) ; map < string , list < string > > zone data = user data get zone data ( ) ; for ( map entry < string , list < string > > entry : zone data entry set ( ) ) { result add all ( entry get value ( ) ) ; } return result ; }


adds a listener to this future if the future has not yet completed , the listener will be notified of a response or exception in a runnable submitted to the executor service provided if the future has completed , the listener will be notified immediately without forking to a different thread

public void add listener ( action listener < v > listener , executor service executor ) { add listener ( listener , executor , null ) ; }


todo un - restrict it in a weekly after the patch

public boolean support is descendant ( ) { return true ; }


public string to string ( ) { return to human ( ) ; }


build type definition with the type or class

type definition build ( type type , class < ? > clazz , map < class < ? > , type definition > type cache ) ;


creates lazy proxies for the { @ code j m x connector } and { @ code m bean server connection }

private void create lazy connection ( ) { this connector target source = new j m x connector lazy init target source ( ) ; target source connection target source = new m bean server connection lazy init target source ( ) ; this connector = ( j m x connector ) new proxy factory ( j m x connector class , this connector target source ) get proxy ( this bean class loader ) ; this connection = ( m bean server connection ) new proxy factory ( m bean server connection class , connection target source ) get proxy ( this bean class loader ) ; }


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


public void test init state map ( ) { assert true ( state map is empty ( ) ) ; assert equals ( 0 , state map size ( ) ) ; assert equals ( 0 , state map total size ( ) ) ; assert equals ( 0 , state map get request count ( ) ) ; assert true ( state map get logically removed nodes ( ) is empty ( ) ) ; assert equals ( 0 , state map get highest required snapshot version plus one ( ) ) ; assert equals ( 0 , state map get highest finished snapshot version ( ) ) ; assert true ( state map get snapshot versions ( ) is empty ( ) ) ; assert true ( state map get pruning value nodes ( ) is empty ( ) ) ; assert equals ( 0 , state map get resource guard ( ) get lease count ( ) ) ; assert false ( state map get resource guard ( ) is closed ( ) ) ; assert false ( state map is closed ( ) ) ; assert null ( state map get ( 0 , 0l ) ) ; assert false ( state map contains key ( 1 , 2l ) ) ; assert null ( state map remove and get old ( 3 , 4l ) ) ; assert false ( state map get keys ( - 92l ) iterator ( ) has next ( ) ) ; assert equals ( 0 , state map size of namespace ( 8l ) ) ; assert false ( state map iterator ( ) has next ( ) ) ; assert false ( state map get state incremental visitor ( 100 ) has next ( ) ) ; }


returns arguments passed to the method vararg are expanded in this array


the specified type is primitive type or simple type

public static boolean is primitive ( class < ? > type ) { return type ! = null & & ( type is primitive ( ) | | is simple type ( type ) ) ; }


location to write model files you can use the model package ( ) as defined when the class is instantiated

public string model file folder ( ) { return output folder + " / model " ; }


returns a { @ code collector } that accumulates the input elements into a new { @ code immutable set } with an implementation specialized for enums unlike { @ link immutable set # to immutable set } , the resulting set will iterate over elements in their enum definition order , not encounter order

public static < e extends enum < e > > collector < e , ? , immutable set < e > > to immutable enum set ( ) { return collect collectors to immutable enum set ( ) ; }


the method to clip the db instance according to the target key group range using the { @ link rocks d b # delete ( column family handle , byte [ ] ) }

public static void clip d b with key group range ( @ nonnull rocks d b db , @ nonnull list < column family handle > column family handles , @ nonnull key group range target key group range , @ nonnull key group range current key group range , @ nonnegative int key group prefix bytes , @ nonnegative long write batch size ) throws rocks d b exception { final byte [ ] begin key group bytes = new byte [ key group prefix bytes ] ; final byte [ ] end key group bytes = new byte [ key group prefix bytes ] ; if ( current key group range get start key group ( ) < target key group range get start key group ( ) ) { rocks d b key serialization utils serialize key group ( current key group range get start key group ( ) , begin key group bytes ) ; rocks d b key serialization utils serialize key group ( target key group range get start key group ( ) , end key group bytes ) ; delete range ( db , column family handles , begin key group bytes , end key group bytes , write batch size ) ; } if ( current key group range get end key group ( ) > target key group range get end key group ( ) ) { rocks d b key serialization utils serialize key group ( target key group range get end key group ( ) + 1 , begin key group bytes ) ; rocks d b key serialization utils serialize key group ( current key group range get end key group ( ) + 1 , end key group bytes ) ; delete range ( db , column family handles , begin key group bytes , end key group bytes , write batch size ) ; } }


returns the number of array elements that use names and that follow this structure

public int get number of named entries ( ) { return number of named entries ; }


public void remove method proxy ( method proxy method proxy ) { if ( method proxy ! = null ) { remove method proxy ( method proxy get method name ( ) ) ; } }


moves the cursor to the given program location also , repositions the scrollbar to show that location , if the location is not on the screen

public boolean go to ( program location loc , boolean center when not visible ) { final field location floc = get field location ( loc ) ; if ( floc = = null ) { return false ; } if ( center when not visible ) { field panel go to ( floc get index ( ) , floc get field num ( ) , floc get row ( ) , floc get col ( ) , false ) ; } else { field panel set cursor position ( floc get index ( ) , floc get field num ( ) , floc get row ( ) , floc get col ( ) ) ; field panel scroll to cursor ( ) ; } return true ; }


return the configured set of pipeline aggregations

public collection < pipeline aggregation builder > get pipeline aggregations ( ) { return factories builder get pipeline aggregator factories ( ) ; }


set extended bounds on this histogram , so that buckets would also be generated on intervals that did not match any documents

public date histogram aggregation builder extended bounds ( long bounds extended bounds ) { if ( extended bounds = = null ) { throw new illegal argument exception ( " [ extended bounds ] must not be null : [ " + name + " ] " ) ; } this extended bounds = extended bounds ; return this ; }


gets the { @ link authentication } object that represents the user associated with the current request

public static @ non null authentication get authentication 2 ( ) { authentication a = security context holder get context ( ) get authentication ( ) ; / / on tomcat while serving the login page , this is null despite the fact / / that we have filters looking at the stack trace , tomcat doesn ' t seem to / / run the request through filters when this is the login request / / see http : / / www nabble com / matrix - authorization - problem - tp 1 4 6 0 2 0 8 1p 1 4 8 8 6 3 1 2 html if ( a = = null ) a = anonymous2 ; return a ; }


set the { @ link servlet config } that this object runs in invoked after population of normal bean properties but before an init callback like initializing bean ' s { @ code after properties set } or a custom init - method invoked after application context aware ' s { @ code set application context }

void set servlet config ( servlet config servlet config ) ;


if " expected sublist " is not a sublist of " arguments " , an informative assertion is failed in the context of the specified test case argument order mnemonic : assert ( x ) contains sublist ( y )

public static < t > void assert contains sublist ( list < t > arguments , t expected sublist ) { list < t > sublist = arrays as list ( expected sublist ) ; try { assert that ( collections index of sub list ( arguments , sublist ) ) is not equal to ( - 1 ) ; } catch ( assertion error e ) { throw new assertion error ( " did not find " + sublist + " as a sublist of " + arguments , e ) ; } }


finds the least loaded node that satisfies the selector criteria

protected discovery node select least loaded node ( cluster state cluster state , predicate < discovery node > selector ) { long min load = long max value ; discovery node min loaded node = null ; persistent tasks custom metadata persistent tasks = cluster state get metadata ( ) custom ( persistent tasks custom metadata type ) ; for ( discovery node node : cluster state get nodes ( ) ) { if ( selector test ( node ) ) { if ( persistent tasks = = null ) { / / we don ' t have any task running yet , pick the first available node return node ; } long number of tasks = persistent tasks get number of tasks on node ( node get id ( ) , task name ) ; if ( min load > number of tasks ) { min load = number of tasks ; min loaded node = node ; } } } return min loaded node ; }


removes only this exact instance , not others that are equals ( )

private boolean remove exact ( object target ) { for ( int i = 0 ; i < size ; i + + ) { if ( queue [ i ] = = target ) { remove at ( i ) ; return true ; } } return false ; }


marks this future as a success and notifies all listeners


returns true if a script info object exists for the specified script file

public boolean contains metadata ( resource file script file ) { return script file to info map contains key ( script file ) ; }


string get data source ( string name , string primary data source name , list < string > data source names ) ;


public static < e > deque push < e > push ( deque < e > stack , e elem ) { return new deque push < > ( stack , elem ) ; }


returns a { @ link java compilation args provider } that forwards the union of information from the inputs , see { @ link # merge ( collection < java compilation args provider > ) }

public static java compilation args provider merge ( java compilation args provider providers ) { return merge ( immutable list copy of ( providers ) ) ; }


returns the elements of the owning set sorted by their values of this attribute

public keyed object [ ] to sorted array ( ) { keyed object [ ] keyed objects = this owning set ( ) to array ( ) ; arrays sort ( keyed objects , new integer comparator ( ) ) ; return keyed objects ; }


was the build a " catastrophe " : a build failure severe enough to halt a keep going build

public boolean was catastrophe ( ) { return catastrophe ; }


returns a dispatcher that queues events that are posted in a single global queue this behavior matches the original behavior of async event bus exactly , but is otherwise not especially useful for async dispatch , an { @ linkplain # immediate ( ) immediate } dispatcher should generally be preferable

static dispatcher legacy async ( ) { return new legacy async dispatcher ( ) ; }


determines the addresses where program 1 and program 2 have different labels ( symbols or aliases ) specified

private address set get label differences ( address set view address set , task monitor monitor ) throws cancelled exception { symbol iterator iter 1 ; symbol iterator iter 2 ; if ( address set = = null ) { iter 1 = program 1 get symbol table ( ) get primary symbol iterator ( true ) ; iter 2 = program 2 get symbol table ( ) get primary symbol iterator ( true ) ; } else { iter 1 = program 1 get symbol table ( ) get primary symbol iterator ( address set , true ) ; address set address set 2 = diff utility get compatible address set ( address set , program 2 ) ; iter 2 = program 2 get symbol table ( ) get primary symbol iterator ( address set 2 , true ) ; } / / symbols return get object diffs ( new symbol comparator ( program 1 , program 2 ) , new iterator wrapper ( iter 1 ) , new iterator wrapper ( iter 2 ) , monitor ) ; }


creates a { @ link build info properties translator } to use for non - volatile keys

protected abstract build info properties translator create non volatile translator ( ) ;


return iterator over all the local actions defined for this component

iterator < docking action if > get actions ( ) { return actions iterator ( ) ; }


adds a field to be highlighted with default fragment size of 100 characters , and default number of fragments of 5 using the default encoder

public highlight builder field ( string name ) { return field ( new field ( name ) ) ; }


reflects a change in the application ' s queue from the one specified in the { @ link application submission context }


return the protocol scheme for the file system

public string get scheme ( ) { return cos n file system scheme ; }


returns the specified block ' s on - disk length ( excluding metadata )

long get length ( extended block b ) throws i o exception ;


retrieve the { @ code class } of an element in the { @ code collection } the exact element for which the { @ code class } is retrieved will depend on the concrete { @ code collection } implementation

private static < e > e peek ahead ( collection < e > collection ) { iterator < e > it = collection iterator ( ) ; if ( ! it has next ( ) ) { throw new illegal state exception ( " unable to peek ahead in non - empty collection - no element found " ) ; } e value = it next ( ) ; if ( value = = null ) { throw new illegal state exception ( " unable to peek ahead in non - empty collection - only null element found " ) ; } return value ; }


public static void register discriminator ( class < ? > model class , string discriminator property name , map < string , class < ? > > mappings ) { class discriminator mapping m = new class discriminator mapping ( model class , discriminator property name , mappings ) ; model discriminators put ( model class , m ) ; }


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 0 : / / success return success ; default : return null ; } }


returns a new request id to use when sending a message via { @ link connection # send request ( long , string , transport request , transport request options ) }

long new request id ( ) { return request id generator increment and get ( ) ; }


returns only default cluster get hedged read metrics

public d f s hedged read metrics get hedged read metrics ( ) { if ( this vfs = = null ) { return super get hedged read metrics ( ) ; } check default d f s ( default d f s , " get hedged read metrics " ) ; return default d f s get hedged read metrics ( ) ; }


returns a snapshot of the logged records

public synchronized list < log record > get stored log records ( ) { list < log record > result = new array list < > ( list ) ; return collections unmodifiable list ( result ) ; }


adds additional columns similar to a sql select statement the field expressions can contain complex expressions , but can not contain aggregations it will throw an exception if the added fields already exist example : { @ code tab add columns ( " a + 1 as a 1 , concat ( b , ' sunny ' ) as b 1 " ) }


public void set branch table ( string branch table ) { this branch table = branch table ; }


creates a { @ link f s r l root } as a child of a container { @ link fsrl } , using the supplied { @ code protocol } string as its type

public static f s r l root nested f s ( fsrl container file , string fstype ) { if ( container file instanceof f s r l root ) { throw new runtime exception ( " can ' t make nested f s with f s r l root path : " + container file ) ; } return new f s r l root ( container file , fstype ) ; }


check if the any child components stored in { @ link layout state } have enteredexited the working range , and dispatch the event to trigger the corresponding registered methods

public synchronized void check working range and dispatch ( int position , int first visible index , int last visible index , int first fully visible index , int last fully visible index ) { if ( m committed layout state ! = null ) { m committed layout state check working range and dispatch ( position , first visible index , last visible index , first fully visible index , last fully visible index , m working range status handler ) ; } }


public void set health check registry ( object health check registry ) { boolean is already set = get health check registry ( ) ! = null ; super set health check registry ( health check registry ) ; hikari pool p = pool ; if ( p ! = null ) { if ( is already set ) { throw new illegal state exception ( " health check registry can only be set one time " ) ; } else { p set health check registry ( super get health check registry ( ) ) ; } } } / / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / / hikari c p - specific methods / / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


public model and view handle request ( final http servlet request request , final http servlet response response ) throws exception { ensure session replication is autoconfigured if need be ( request ) ; val context = new j e e context ( request , response , get o auth configuration context ( ) get session store ( ) ) ; val manager = new profile manager < common profile > ( context ) ; if ( context get request attribute ( o auth 2 0 constants error ) is present ( ) ) { val mv = get o auth configuration context ( ) get oauth invalid authorization response builder ( ) build ( context ) ; if ( ! mv is empty ( ) & & mv has view ( ) ) { return mv ; } } val client id = context get request parameter ( o auth 2 0 constants client id ) map ( string : : value of ) or else ( string utils empty ) ; val registered service = get registered service by client id ( client id ) ; registered service access strategy utils ensure service access is allowed ( client id , registered service ) ; if ( is request authenticated ( manager ) ) { val mv = get o auth configuration context ( ) get consent approval view resolver ( ) resolve ( context , registered service ) ; if ( ! mv is empty ( ) & & mv has view ( ) ) { logger debug ( " redirecting to consent - approval view with model [ { } ] " , mv get model ( ) ) ; return mv ; } } return redirect to callback redirect url ( manager , registered service , context , client id ) ; }


void remove listener ( playlist event listener listener ) ;


returns { @ link method } instances for the tests that assume multisets support duplicates so that the test of { @ code multisets for set ( ) } can suppress them

public static list < method > get iterator duplicate initializing methods ( ) { return arrays as list ( helpers get method ( multiset iterator tester class , " test iterator known order " ) , helpers get method ( multiset iterator tester class , " test iterator unknown order " ) , helpers get method ( multiset iterator tester class , " test removing iterator known order " ) , helpers get method ( multiset iterator tester class , " test removing iterator unknown order " ) ) ; }


verifies that the client status is as expected by default , the code and description should be present , and the cause should be stripped away

private static void check client status ( status expected status , status client stream status ) { assert equals ( expected status get code ( ) , client stream status get code ( ) ) ; assert equals ( expected status get description ( ) , client stream status get description ( ) ) ; assert null ( client stream status get cause ( ) ) ; }


creates a { @ link search processor factory } based on bitap string search algorithm it is a jump free algorithm that has very stable performance ( the contents of the inputs have a minimal effect on it ) the limitation is that the { @ code needle } can be no more than 64 bytes long < br > precomputation ( this method ) time is linear in the size of the input ( { @ code o ( | needle | ) } ) < br > the factory allocates and retains a long [ 256 ] array < br > search ( the actual application of { @ link search processor } ) time is linear in the size of { @ link io netty buffer byte buf } on which the search is peformed ( { @ code o ( | haystack | ) } ) every byte of { @ link io netty buffer byte buf } is processed only once , sequentually

public static bitap search processor factory new bitap search processor factory ( byte [ ] needle ) { return new bitap search processor factory ( needle ) ; }


returns the package name of the class , without attempting to load the class behaves identically to { @ link package # get name ( ) } but does not require the class ( or package ) to be loaded

public string get package name ( ) { return reflection get package name ( class name ) ; }


clean up from other test runs which halted uses the authfs ; no - op if null

private void cleanup method paths ( ) throws i o exception { s 3 a file system fs = auth f s ; if ( fs ! = null ) { method auth path = new path ( auth path , get method name ( ) ) ; fs delete ( method auth path , true ) ; method nonauth path = new path ( nonauth path , get method name ( ) ) ; fs delete ( method nonauth path , true ) ; } }


searches in this string for the index of the specified string the search for the string starts at the specified offset and moves towards the end of this string

public int index of ( char sequence sub string , int start ) { final int sub count = sub string length ( ) ; if ( start < 0 ) { start = 0 ; } if ( sub count < = 0 ) { return start < length ? start : length ; } if ( sub count > length - start ) { return index not found ; } final char first char = sub string char at ( 0 ) ; if ( first char > max char value ) { return index not found ; } final byte first char as byte = c 2b 0 ( first char ) ; final int len = offset + length - sub count ; for ( int i = start + offset ; i < = len ; + + i ) { if ( value [ i ] = = first char as byte ) { int o 1 = i , o 2 = 0 ; while ( + + o 2 < sub count & & b 2c ( value [ + + o 1 ] ) = = sub string char at ( o 2 ) ) { / / intentionally empty } if ( o 2 = = sub count ) { return i - offset ; } } } return index not found ; }


cause the graph to be centered and scaled nicely for the view window

public void center and scale ( ) { viewer scale to layout ( ) ; satellite viewer scale to layout ( ) ; }


perform { @ link publishable http resource # do check ( rest client , action listener ) do check } against the { @ code resource } that throws an exception and assert that it returns { @ code on failure ( ) } when performing a { @ code delete } rather than the more common { @ code get }

protected void assert check as delete with exception ( final publishable http resource resource , final string resource base path , final string resource name ) { final string endpoint = concatenate endpoint ( resource base path , resource name ) ; final response exception response exception = response exception ( " delete " , endpoint , failed check status ( ) ) ; final exception e = random from ( new i o exception ( " expected " ) , new runtime exception ( " expected " ) , response exception ) ; final request request = new request ( " delete " , endpoint ) ; add parameters ( request , delete parameters ( resource get default parameters ( ) ) ) ; when perform request async with ( client , request , e ) ; resource do check ( client , wrap mock listener ( check listener ) ) ; verify check listener ( null ) ; }


exit a parse tree produced by the { @ code digit identifier } labeled alternative in { @ link sql base parser # unquote identifier }

void exit digit identifier ( sql base parser digit identifier context ctx ) ;


public static map < string , object > get system info ( ) { val properties = system get properties ( ) ; val info = new linked hash map < string , object > ( system info default size ) ; info put ( " cas version " , string utils default string ( cas version get version ( ) , " not available " ) ) ; info put ( " cas branch " , string utils default string ( git properties get branch ( ) , " not available " ) ) ; info put ( " cas commit id " , string utils default string ( git properties get commit id ( ) , " not available " ) ) ; info put ( " cas build date / time " , cas version get date time ( ) ) ; info put ( " spring boot version " , spring boot version get version ( ) ) ; info put ( " spring version " , spring version get version ( ) ) ; info put ( " java home " , properties get ( " java home " ) ) ; info put ( " java vendor " , properties get ( " java vendor " ) ) ; info put ( " java version " , properties get ( " java version " ) ) ; val runtime = runtime get runtime ( ) ; info put ( " jvm free memory " , file utils byte count to display size ( runtime free memory ( ) ) ) ; info put ( " jvm maximum memory " , file utils byte count to display size ( runtime max memory ( ) ) ) ; info put ( " jvm total memory " , file utils byte count to display size ( runtime total memory ( ) ) ) ; info put ( " os architecture " , properties get ( " os arch " ) ) ; info put ( " os name " , properties get ( " os name " ) ) ; info put ( " os version " , properties get ( " os version " ) ) ; info put ( " os date / time " , local date time now ( zone id system default ( ) ) ) ; info put ( " os temp directory " , file utils get temp directory path ( ) ) ; inject update info into banner if needed ( info ) ; return info ; }


specify packages to search for autodetection of your entity classes in the classpath this is analogous to spring ' s component - scan feature ( { @ link org springframework context annotation class path bean definition scanner } )

public void set packages to scan ( string packages to scan ) { this packages to scan = packages to scan ; }


returns the < a href = " http : en wikipedia orgwiki standard deviation # definition of population values " > population standard deviation of the values the count must be non - zero this is guaranteed to return zero if the dataset contains only exactly one finite value it is not guaranteed to return zero when the dataset consists of the same value multiple times , due to numerical errors however , it is guaranteed never to return a negative result < h 3 > non - finite values < h 3 > if the dataset contains any non - finite values ( { @ link double # positive infinity } , { @ link double # negative infinity } , or { @ link double # na n } ) then the result is { @ link double # na n }

public double population standard deviation ( ) { return math sqrt ( population variance ( ) ) ; }


verify if the getters of a { @ link rainbow fish } return the expected values

public void test values ( ) { final var fish = new rainbow fish ( " name " , 1 , 2 , 3 ) ; assert equals ( " name " , fish get name ( ) ) ; assert equals ( 1 , fish get age ( ) ) ; assert equals ( 2 , fish get length meters ( ) ) ; assert equals ( 3 , fish get weight tons ( ) ) ; }


public void set service class ( int service class ) { this service class = service class ; }


set the current working directory for the given file system all relative paths will be resolved relative to it

public void set working directory ( final path dir ) { if ( dir = = null ) { throw new invalid path exception ( " working directory cannot be set to null " ) ; } / * * * do not validate the scheme and uri of the passsed parameter when adls * runs as additional file system , working directory set has the default * file system scheme and uri * * found a problem during pig execution in * https : / / github com / apache / pig / blob / branch - 0 * 15 / src / org / apache / pig / backend / hadoop / executionengine / map reduce layer * / pig input format java # l235 * however similar problem would be present in other application so * defaulting to build working directory using relative path only * / this working directory = this make absolute ( dir ) ; }


gets whether to set filter bitmap flag flag to paint

public boolean get paint filter bitmap ( ) { return m paint filter bitmap ; }


public enum string required enum get enum string required ( ) { return enum string required ; }


model tests for outer enum integer default value

public void test outer enum integer default value ( ) { / / todo : test outer enum integer default value }


public float get float ( ) { return float ; }


to test the collection format in query parameters

public void test query parameter collection format ( list < string > pipe , list < string > ioutil , list < string > http , list < string > url , list < string > context ) throws api exception { test query parameter collection format with http info ( pipe , ioutil , http , url , context ) ; }


returns the empty immutable sorted multiset

public static < e > immutable sorted multiset < e > of ( ) { return ( immutable sorted multiset ) regular immutable sorted multiset natural empty multiset ; }


encodes up to the first three bytes of array < var > three bytes < var > and returns a four - byte array in base 6 4 notation the actual number of significant bytes in your array is given by < var > num sig bytes < var > the array < var > three bytes < var > needs only be as big as < var > num sig bytes < var > code can reuse a byte array by passing a four - byte array as < var > b 4 < var >

private static byte [ ] encode 3to 4 ( byte [ ] b 4 , byte [ ] three bytes , int num sig bytes , int options ) { encode 3to 4 ( three bytes , 0 , num sig bytes , b 4 , 0 , options ) ; return b 4 ; }


visit a parse tree produced by { @ link painless parser # primordefcasttype }

t visit primordefcasttype ( painless parser primordefcasttype context ctx ) ;


lazily register components immediately after the glide singleton is created but before any requests can be started this method will be called once and only once per implementation

void register components ( @ non null context context , @ non null glide glide , @ non null registry registry ) ;


return the value for the attribute of the given name , if any

public object get attribute ( string name ) { return this attributes get ( name ) ; }


returns an element less than the { @ link # samples ( ) } but greater than { @ link # below samples lesser ( ) }


read " size " bytes of data and verify that what was read and what was written are the same

private void read random data and verify ( int size ) throws azure exception , i o exception { byte [ ] b = new byte [ size ] ; f s data input stream stream = fs open ( blob path ) ; int bytes read = stream read ( b ) ; stream close ( ) ; assert equals ( bytes read , size ) ; / / compare the data read to the data written assert true ( compare prefix ( random data , b , size ) ) ; }


submit the job to the cluster and wait for it to finish

public boolean wait for completion ( boolean verbose ) throws i o exception , interrupted exception , class not found exception { if ( state = = job state define ) { submit ( ) ; } if ( verbose ) { monitor and print job ( ) ; } else { / / get the completion poll interval from the client int completion poll interval millis = job get completion poll interval ( cluster get conf ( ) ) ; while ( ! is complete ( ) ) { try { thread sleep ( completion poll interval millis ) ; } catch ( interrupted exception ie ) { } } } return is successful ( ) ; }


returns the difference of the given unknown integer value and this integer value

public integer value subtract from ( unknown integer value other ) { return subtract from ( ( integer value ) other ) ; }


returns { @ link parameters } suitable for simple round trip equality tests primitive variables are set to different values ( to the extent that this is possible ) , to increase the probability of such tests failing if they accidentally compare mismatched variables

private static parameters build parameters for equals test ( ) { sparse array < map < track group array , selection override > > selection overrides = new sparse array < > ( ) ; map < track group array , selection override > video overrides = new hash map < > ( ) ; video overrides put ( new track group array ( video track group ) , new selection override ( 0 , 1 ) ) ; selection overrides put ( 2 , video overrides ) ; sparse boolean array renderer disabled flags = new sparse boolean array ( ) ; renderer disabled flags put ( 3 , true ) ; return new parameters ( / / video / * max video width = * / 0 , / * max video height = * / 1 , / * max video frame rate = * / 2 , / * max video bitrate = * / 3 , / * min video width = * / 4 , / * min video height = * / 5 , / * min video frame rate = * / 6 , / * min video bitrate = * / 7 , / * exceed video constraints if necessary = * / false , / * allow video mixed mime type adaptiveness = * / true , / * allow video non seamless adaptiveness = * / false , / * viewport width = * / 8 , / * viewport height = * / 9 , / * viewport orientation may change = * / true , / / audio / * preferred audio language = * / " en " , / * max audio channel count = * / 10 , / * max audio bitrate = * / 11 , / * exceed audio constraints if necessary = * / false , / * allow audio mixed mime type adaptiveness = * / true , / * allow audio mixed sample rate adaptiveness = * / false , / * allow audio mixed channel count adaptiveness = * / true , / / text / * preferred text language = * / " de " , / * preferred text role flags = * / c role flag caption , / * select undetermined text language = * / true , / * disabled text track selection flags = * / 12 , / / general / * force lowest bitrate = * / false , / * force highest supported bitrate = * / true , / * exceed renderer capabilities if necessary = * / false , / * tunneling audio session id = * / 13 , / / overrides selection overrides , renderer disabled flags ) ; }


sets the ssl system properties such that the given x 5 0 9 util object can be used to create ssl contexts that will use the trust store and key store files created by this test context example usage : x 5 0 9 test context test context = ; create the test context x 5 0 9 util x 5 0 9 util = new quorum x 5 0 9 util ( ) ; test context set system properties ( x 5 0 9 util , key store file type jks , key store file type jks ) ; the returned context will use the key store and trust store created by the test context s s l context ctx = x 5 0 9 util get default s s l context ( ) ;

public void set system properties ( x 5 0 9 util x 5 0 9 util , key store file type key store file type , key store file type trust store file type ) throws i o exception { system set property ( x 5 0 9 util get ssl keystore location property ( ) , this get key store file ( key store file type ) get absolute path ( ) ) ; system set property ( x 5 0 9 util get ssl keystore passwd property ( ) , this get key store password ( ) ) ; system set property ( x 5 0 9 util get ssl keystore type property ( ) , key store file type get property value ( ) ) ; system set property ( x 5 0 9 util get ssl truststore location property ( ) , this get trust store file ( trust store file type ) get absolute path ( ) ) ; system set property ( x 5 0 9 util get ssl truststore passwd property ( ) , this get trust store password ( ) ) ; system set property ( x 5 0 9 util get ssl truststore type property ( ) , trust store file type get property value ( ) ) ; if ( hostname verification ! = null ) { system set property ( x 5 0 9 util get ssl hostname verification enabled property ( ) , hostname verification to string ( ) ) ; } else { system clear property ( x 5 0 9 util get ssl hostname verification enabled property ( ) ) ; } }


decodes all bytes from the input byte buffer using the { @ link base 6 4 } encoding scheme , writing the results into a newly - allocated byte buffer upon return , the source buffer ' s position will be updated to its limit ; its limit will not have been changed the returned output buffer ' s position will be zero and its limit will be the number of resulting decoded bytes { @ code illegal argument exception } is thrown if the input buffer is not in valid base 6 4 encoding scheme the position of the input buffer will not be advanced in this case

public byte buffer decode ( byte buffer buffer ) { int pos 0 = buffer position ( ) ; try { byte [ ] src ; int sp , sl ; if ( buffer has array ( ) ) { src = buffer array ( ) ; sp = buffer array offset ( ) + buffer position ( ) ; sl = buffer array offset ( ) + buffer limit ( ) ; buffer position ( buffer limit ( ) ) ; } else { src = new byte [ buffer remaining ( ) ] ; buffer get ( src ) ; sp = 0 ; sl = src length ; } byte [ ] dst = new byte [ out length ( src , sp , sl ) ] ; return byte buffer wrap ( dst , 0 , decode 0 ( src , sp , sl , dst ) ) ; } catch ( illegal argument exception iae ) { buffer position ( pos 0 ) ; throw iae ; } }


returns true if this object can have a set of other objects it ' s main purpose is to support non - java util collection objects like scala collections

< t > boolean is collection ( class < t > type ) ;


indicate whether the encryption context is reset certain modes , like ctr , require a different iv depending on the position in the stream generally , the encryptor maintains any necessary context for calculating the iv and counter so that no reinit is necessary during the encryption reinit before each operation is inefficient


returns a { @ link matcher } for comparing the { @ link type serializer schema compatibility } that the serializer upgrade produced with an expected { @ link type serializer schema compatibility }

matcher < type serializer schema compatibility < upgraded element t > > schema compatibility matcher ( migration version version ) ;


public string get first name ( ) { return first name ; }


creates random suggestion builder , renders it to x content and back to new instance that should be equal to original

public void test from x content ( ) throws i o exception { for ( int runs = 0 ; runs < number of testbuilders ; runs + + ) { sb suggestion builder = random test builder ( ) ; x content builder x content builder = x content factory content builder ( random from ( x content type values ( ) ) ) ; if ( random boolean ( ) ) { x content builder pretty print ( ) ; } x content builder start object ( ) ; suggestion builder to x content ( x content builder , to x content empty params ) ; x content builder end object ( ) ; x content builder shuffled = shuffle x content ( x content builder , shuffle protected fields ( ) ) ; try ( x content parser parser = create parser ( shuffled ) ) { / / we need to skip the start object and the name , those will be parsed by outer suggest builder parser next token ( ) ; suggestion builder < ? > second suggestion builder = suggestion builder from x content ( parser ) ; assert not same ( suggestion builder , second suggestion builder ) ; assert equals ( suggestion builder , second suggestion builder ) ; assert equals ( suggestion builder hash code ( ) , second suggestion builder hash code ( ) ) ; } } }


get the size of the serialized version object

public static int size ( ) { return ( short size + short size ) / byte size ; }


get capacity at time based on periodic repetition

public resource get capacity at time ( long tick ) { long converted time = ( tick % time period ) ; return super get capacity at time ( converted time ) ; }


return the description of the resource that the bean definition came from

public string get resource description ( ) { return string value of ( super get resource description ( ) ) ; }


an expectation for checking web element with given locator has attribute which contains specific value

public static expected condition < boolean > attribute contains ( final web element element , final string attribute , final string value ) { return new expected condition < boolean > ( ) { @ override public boolean apply ( web driver driver ) { return get attribute or css value ( element , attribute ) map ( seen - > seen contains ( value ) ) or else ( false ) ; } @ override public string to string ( ) { return string format ( " value to contain \ " % s \ " " , value ) ; } } ; }


allocate a specific index current index count will be adjusted if specified index exceeds current index count ;

boolean allocate index ( int index ) { / / increase index count if ( index > = next index ) { for ( int i = next index ; i < index ; i + + ) { free index stack push ( new integer ( i ) ) ; } next index = index + 1 ; return true ; } return free index stack remove ( new integer ( index ) ) ; }


adds a hint that null values are expected in the data for this type ( default behavior ) this method exists for explicit declaration of the default behavior or for invalidation of a previous call to { @ link # not null ( ) }


implementations should signal the waiting { @ link event processor } s that the cursor has advanced


put a guid into the byte array the guid is represented by the standard arguments used , and these are accepted as arguments to this method

public void put g u i d ( int data 1 , short data 2 , short data 3 , byte [ ] data 4 ) { if ( data 4 length ! = 8 ) { string msg = " guid invalid byte [ ] size terminating " ; msg error ( this , msg ) ; throw new assert exception ( msg ) ; } put int ( data 1 ) ; put short ( data 2 ) ; put short ( data 3 ) ; put bytes ( data 4 ) ; }


recreates editor ui used by lazy editor initializer


see whether an item can be coerced to { @ link s c m trigger item }

public static @ check for null s c m trigger item as s c m trigger item ( item item ) { if ( item instanceof s c m trigger item ) { return ( s c m trigger item ) item ; } else if ( item instanceof hudson model s c med item ) { return new bridge ( ( hudson model s c med item ) item ) ; } else { return null ; } }


throws { @ code throwable } if it is an instance of { @ code declared type } example usage : for ( foo foo : foos ) { try { foo bar ( ) ; } catch ( bar exception | runtime exception | error t ) { failure = t ; } } if ( failure ! = null ) { throw if instance of ( failure , bar exception class ) ; throw if unchecked ( failure ) ; throw new assertion error ( failure ) ; }

public static < x extends throwable > void throw if instance of ( throwable throwable , class < x > declared type ) throws x { check not null ( throwable ) ; if ( declared type is instance ( throwable ) ) { throw declared type cast ( throwable ) ; } }


we will retry connection with exponential back - off policy

void reconnect ( ) { try { int tried count = retries increment and get ( ) ; if ( tried count < = max retries ) { thread sleep ( get sleep time ms ( ) ) ; log info ( " reconnect [ { } ] " , tried count ) ; bootstrap connect ( remote addr ) ; log debug ( " connection started " ) ; } else { log warn ( " remote address is not reachable we will close this client " ) ; close ( ) ; } } catch ( interrupted exception e ) { log warn ( " connection failed " , e ) ; } }


create flink vector by hive vector from constant

public static org apache flink table data vector column vector create flink vector from constant ( logical type type , object value , int batch size ) { return create flink vector ( create hive vector from constant ( type , value , batch size ) ) ; }


enabledisable the option to allow another symbol be set to primary when the existing primary symbol is a mangled symbol , regardless of the symbol source type this is typically used when we can get better data type information from the pdb record than we can from the demangler

public void set allow demote primary mangled symbols ( boolean enable ) { this allow demote primary mangled symbols = enable ; }


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 : / / e return e ; default : return null ; } }


tests that clients with disabled sasl mechanism fail authentication with connection close delay if configured

public void test disabled sasl mechanism ( ) throws exception { string node = " 0 " ; security protocol security protocol = security protocol sasl ssl ; test jaas config jaas config = configure mechanisms ( " scram - sha - 256 " , collections singleton list ( " scram - sha - 256 " ) ) ; jaas config set client options ( " plain " , test jaas config username , " invalidpassword " ) ; server = create echo server ( security protocol ) ; create and check client authentication failure ( security protocol , node , " scram - sha - 256 " , null ) ; server verify authentication metrics ( 0 , 1 ) ; }


test fail all the datanodes except first in the pipeline

public void test with only first datanode is alive ( ) throws exception { test write file and verify after d n stop ( 1 , 1 , 1 , true ) ; }


recompute the display location and move with list window this is useful , e g , when the window containing the associated text field ( s ) moves

public void update display location ( ) { swing utilities invoke later ( ( ) - > { do update display location ( ) ; } ) ; }


if true , this is a view that renders the top page of hudson

public boolean is default ( ) { return get owner ( ) get primary view ( ) = = this ; }


provides an ordering for assembled instructions appearing in the list the items with the highest preference are positioned at the top of the list

protected int compute preference ( assembly resolved constructor rc , instruction existing ) { if ( existing = = null ) { return 0 ; } string my tree = rc dump constructor tree ( ) ; string ex tree = ( ( sleigh instruction prototype ) existing get prototype ( ) ) dump constructor tree ( ) ; for ( int i = 0 ; i < my tree length ( ) ; i + + ) { if ( ! my tree starts with ( ex tree substring ( 0 , i ) ) ) { return rc get instruction length ( ) = = existing get length ( ) ? 5000 : i ; } } return 10000 ; }


b headers ( multi value map < string , string > headers ) ;


gives all fields of underlying inputs in order of those inputs and order of fields within input

public list < field reference expression > get all input fields ( ) { return field references stream ( ) flat map ( input - > input values ( ) stream ( ) ) collect ( to list ( ) ) ; }


adds a constant fieldref info , constant methodref info or constant interface methodref info to the constant pool of this symbol table does nothing if the constant pool already contains a similar item

private entry add constant member reference ( final int tag , final string owner , final string name , final string descriptor ) { int hash code = hash ( tag , owner , name , descriptor ) ; entry entry = get ( hash code ) ; while ( entry ! = null ) { if ( entry tag = = tag & & entry hash code = = hash code & & entry owner equals ( owner ) & & entry name equals ( name ) & & entry value equals ( descriptor ) ) { return entry ; } entry = entry next ; } constant pool put 1 2 2 ( tag , add constant class ( owner ) index , add constant name and type ( name , descriptor ) ) ; return put ( new entry ( constant pool count + + , tag , owner , name , descriptor , 0 , hash code ) ) ; }


verify the integrity of the seal , only checked input stream will verify the check sum of the content

static void check seal integrity ( checked input stream is , input archive ia ) throws i o exception { long check sum = is get checksum ( ) get value ( ) ; long val = ia read long ( " val " ) ; ia read string ( " path " ) ; / / read and ignore " / " written by seal stream if ( val ! = check sum ) { throw new i o exception ( " crc corruption " ) ; } }


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


set the config based on the type of object passed in

public void set config ( object init arg ) { if ( null = = init arg ) { log debug ( " null object passed in : no config set " ) ; return ; } if ( init arg instanceof element ) { log debug ( " setting config from xml " ) ; set config ( ( element ) init arg ) ; } else if ( init arg instanceof boolean ) { log debug ( " setting config from boolean " ) ; set config ( ( boolean ) init arg ) ; } else { log info ( " unknown object type passed in as config for rule { } : { } " , get name ( ) , init arg get class ( ) ) ; } }


mark the given offset as having a property

void add ( short offset ) { add key ( offset ) ; }


public string to human ( ) { return annotation to string ( ) ; }


searches the subcomponents of the the given container and returns the j button that has the specified text

public static j button find button by text ( container container , string text ) { component [ ] comps = container get components ( ) ; for ( component element : comps ) { if ( element instanceof j button ) { j button button = ( j button ) element ; if ( button get text ( ) ! = null & & button get text ( ) equals ( text ) ) { return button ; } } else if ( element instanceof container ) { j button button = find button by text ( ( container ) element , text ) ; if ( button ! = null ) { return button ; } } } return null ; }


returns a newly - created { @ code immutable graph } based on the contents of this { @ code builder }

public immutable graph < n > build ( ) { return immutable graph copy of ( mutable graph ) ; }


creates a { @ link table sink } from a { @ link catalog table } it considers { @ link catalog # get factory ( ) } if provided

public static < t > table sink < t > find and create table sink ( @ nullable catalog catalog , object identifier object identifier , catalog table catalog table , readable config configuration , boolean is streaming mode , boolean is temporary ) { table sink factory context context = new table sink factory context impl ( object identifier , catalog table , configuration , ! is streaming mode , is temporary ) ; if ( catalog = = null ) { return find and create table sink ( context ) ; } else { return create table sink for catalog table ( catalog , context ) or else get ( ( ) - > find and create table sink ( context ) ) ; } }


only select tasks with a description matching the parameter the syntax is that of sql : for example usage : description like ( % activiti % )

t task description like ( string description like ) ;


called when a resource is successfully loaded

void on resource ready ( resource < ? > resource , data source data source , boolean is loaded from alternate cache key ) ;


returns the page size employed by this { @ link abstract msf }

public int get page size ( ) { return page size ; }


adds grpc - previous - rpc - attempts in the headers of a retryhedging rpc

final metadata update headers ( metadata original headers , int previous attempt count ) { metadata new headers = new metadata ( ) ; new headers merge ( original headers ) ; if ( previous attempt count > 0 ) { new headers put ( grpc previous rpc attempts , string value of ( previous attempt count ) ) ; } return new headers ; }


returns a new diff map with the given key removed , does not modify the invoking instance if the key does not exist in the diff map , the same instance is returned

public immutable open map diff < k , t > with key removed ( k key ) { if ( this diffs contains key ( key ) = = false & & this upserts contains key ( key ) = = false ) { return this ; } map < k , diff < t > > new diffs = new hash map < > ( this diffs ) ; new diffs remove ( key ) ; map < k , t > new upserts = new hash map < > ( this upserts ) ; new upserts remove ( key ) ; return new immutable open map diff < > ( this key serializer , this value serializer , this deletes , new diffs , new upserts ) ; }


creates a bucket ordering strategy which sorts buckets based on multiple criteria a tie - breaker may be added to avoid non - deterministic ordering

public static bucket order compound ( list < bucket order > orders ) { return new internal order compound order ( orders ) ; }


public long get bind space ( ) { return ( ( data high level shader language symbol internals 3 2 extended ) internals ) get bind space ( ) ; }


create a single image source for a given image request

public static image source for image request ( @ nullable image request image request , image request request level request level for fetch ) { if ( image request = = null ) { return empty source ( ) ; } return get ( ) single image request ( image request , request level for fetch ) ; }


planets cannot be viewed in the database dialog

public boolean is hidden ( ) { return true ; }


public void write ( string str , int off , int len ) throws i o exception { final int off plus len = off + len ; for ( int i = off ; i < off plus len ; ) { char c = str char at ( i + + ) ; if ( c < 0x 8 0 ) { bytes [ index ] = ( byte ) c ; if ( + + index > = bytes length ) { flush buffer ( ) ; } } else { write ( c ) ; } } }


check whether this container ' s listeners are generally allowed to run this implementation always returns { @ code true } ; the default ' running ' state is purely determined by { @ link # start ( ) } { @ link # stop ( ) } subclasses may override this method to check against temporary conditions that prevent listeners from actually running in other words , they may apply further restrictions to the ' running ' state , returning { @ code false } if such a restriction prevents listeners from running


builds a new min - max priority queue using the previously specified options , and having no initial contents

public < t extends b > min max priority queue < t > create ( ) { return create ( collections < t > empty set ( ) ) ; }


sets { @ link align # bottom } and clears { @ link align # top } for the alignment of widgets within each row

public horizontal group row bottom ( ) { row align | = align bottom ; row align & = ~ align top ; return this ; }


called when a track of type { @ code track type } is not supported by the player

void on unsupported track ( int track type ) ;


exit a parse tree produced by the { @ code aliased relation } labeled alternative in { @ link sql base parser # relation primary }

void exit aliased relation ( sql base parser aliased relation context ctx ) ;


parse comma separated list of acl entries to secure generated nodes , e g < code > sasl : hdfshost 1 @ my domain : cdrwa , sasl : hdfshost 2 @ my domain : cdrwa < code >

public static list < acl > parse a c ls ( string acl string ) throws bad acl format exception { list < acl > acl = lists new array list ( ) ; if ( acl string = = null ) { return acl ; } list < string > acl comps = lists new array list ( splitter on ( ' , ' ) omit empty strings ( ) trim results ( ) split ( acl string ) ) ; for ( string a : acl comps ) { / / from zoo keeper main private method int first colon = a index of ( ' : ' ) ; int last colon = a last index of ( ' : ' ) ; if ( first colon = = - 1 | | last colon = = - 1 | | first colon = = last colon ) { throw new bad acl format exception ( " acl ' " + a + " ' not of expected form scheme : id : perm " ) ; } acl new acl = new acl ( ) ; new acl set id ( new id ( a substring ( 0 , first colon ) , a substring ( first colon + 1 , last colon ) ) ) ; new acl set perms ( get perm from string ( a substring ( last colon + 1 ) ) ) ; acl add ( new acl ) ; } return acl ; }


overridable validation step for the policy configuration

public void validate ( weighted policy info new policy info ) throws federation policy initialization exception { if ( new policy info = = null ) { throw new federation policy initialization exception ( " the policy to " + " validate should not be null " ) ; } }


returns the size of a runtime [ in ] visible parameter annotations attribute containing all the annotation lists from the given annotation writer sub - array also adds the attribute name to the constant pool of the class

static int compute parameter annotations size ( final string attribute name , final annotation writer [ ] annotation writers , final int annotable parameter count ) { / / note : attribute name is added to the constant pool by the call to compute annotations size / / below this assumes that there is at least one non - null element in the annotation writers / / sub - array ( which is ensured by the lazy instantiation of this array in method writer ) / / the attribute name index , attribute length and num parameters fields use 7 bytes , and each / / element of the parameter annotations array uses 2 bytes for its num annotations field int attribute size = 7 + 2 * annotable parameter count ; for ( int i = 0 ; i < annotable parameter count ; + + i ) { annotation writer annotation writer = annotation writers [ i ] ; attribute size + = annotation writer = = null ? 0 : annotation writer compute annotations size ( attribute name ) - 8 ; } return attribute size ; }


returns whether the elements of the two given arrays are the same

public static boolean equal ( byte [ ] array 1 , byte [ ] array 2 , int size ) { for ( int index = 0 ; index < size ; index + + ) { if ( array 1 [ index ] ! = array 2 [ index ] ) { return false ; } } return true ; }


public list < big decimal > get array number ( ) { return array number ; }


configure the pipeline for tls npn negotiation to http2

private void configure ssl ( socket channel ch ) { ch pipeline ( ) add last ( ssl ctx new handler ( ch alloc ( ) ) , new http 2 or http handler ( ) ) ; }


encodes the image data given as rgb565 or rgb888 does not modify the position or limit of the { @ link byte buffer }

private static native byte buffer encode image ( byte buffer image data , int offset , int width , int height , int pixel size ) ; / * int compressed size = etc 1 get encoded data size ( width , height ) ; etc 1 byte * compressed data = ( etc 1 byte * ) malloc ( compressed size ) ; etc 1 encode image ( ( etc 1 byte * ) image data + offset , width , height , pixel size , width * pixel size , compressed data ) ; return env - > new direct byte buffer ( compressed data , compressed size ) ; * /


assert the response status code is { @ code http status loop detected } ( 508 )

public result matcher is loop detected ( ) { return matcher ( http status loop detected ) ; }


returns the program object that the location refers to

public string get program name ( ) { return program name ; }


tests that the equals and hashcode methods are consistent and copied versions of the instance are equal

public final void test equals and hashcode ( ) { for ( int runs = 0 ; runs < number of test runs ; runs + + ) { equals hash code test utils check equals and hash code ( create test instance ( ) , this : : copy instance , this : : mutate instance ) ; } }


set the uri to be invoked in - order to send a notification after the job has completed ( successfailure ) the uri can contain 2 special parameters : < tt > $ job id < tt > and < tt > $ job status < tt > those , if present , are replaced by the job ' s identifier and completion - status respectively this is typically used by application - writers to implement chaining of map - reduce jobs in an asynchronous manner

public void set job end notification u r i ( string uri ) { set ( job context mr job end notification url , uri ) ; }


returns true if the file is encrypted or directory is in an encryption zone

public boolean get encrypted bit ( ) { return false ; }


consume and decode the response body to a single object of type { @ code < b > } and then apply assertions

< b > body spec < b , ? > expect body ( class < b > body type ) ;


returns the parallelism for this instance the parallelism denotes how many parallel instances of a source or sink will be spawned during the execution

default optional < integer > get parallelism ( ) { return optional empty ( ) ; }


adds a list of false positive information to this retouched bloom filter

public void add false positive ( list < key > keys ) { if ( keys = = null ) { throw new null pointer exception ( " array list < key > can not be null " ) ; } for ( key k : keys ) { add false positive ( k ) ; } }


returns the chunk with the given chunk id

chunk get chunk by id ( int chunk id ) ;


get the { @ link unmarshaller } for the given { @ link channel handler context }

unmarshaller get unmarshaller ( channel handler context ctx ) throws exception ;


public void shutdown ( boolean delete dfs dir ) { shutdown ( delete dfs dir , true ) ; }


resolves the specified address if the specified address is resolved already , this method does nothing but returning the original address

future < t > resolve ( socket address address , promise < t > promise ) ;


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


register all specified listeners with the scheduler

protected void register listeners ( ) throws scheduler exception { listener manager listener manager = get scheduler ( ) get listener manager ( ) ; if ( this scheduler listeners ! = null ) { for ( scheduler listener listener : this scheduler listeners ) { listener manager add scheduler listener ( listener ) ; } } if ( this global job listeners ! = null ) { for ( job listener listener : this global job listeners ) { listener manager add job listener ( listener ) ; } } if ( this global trigger listeners ! = null ) { for ( trigger listener listener : this global trigger listeners ) { listener manager add trigger listener ( listener ) ; } } }


sets the { @ code data type features } and returns a reference to this builder so that the methods can be chained together

public builder data type features ( enum set < data type feature > data type features ) { if ( data type features ! = null ) { this data type features = data type features ; } else { this data type features = enum set none of ( data type feature class ) ; } return this ; }


checks that future get times out , with the default timeout of { @ code timeout millis ( ) }

void assert future times out ( future future ) { assert future times out ( future , timeout millis ( ) ) ; }


convert a cached block list into a datanode command with a list of blocks

private datanode command get cache command ( cached blocks list list , int action , string pool id ) { int length = list size ( ) ; if ( length = = 0 ) { return null ; } / / read the existing cache commands long [ ] block ids = new long [ length ] ; int i = 0 ; for ( cached block cached block : list ) { block ids [ i + + ] = cached block get block id ( ) ; } return new block id command ( action , pool id , block ids ) ; }


< bean > , construct collection type ( ) ( ) ,

public < t > t from json ( @ nullable string json string , java type java type ) { if ( string utils is empty ( json string ) ) { return null ; } try { return ( t ) mapper read value ( json string , java type ) ; } catch ( i o exception e ) { logger warn ( " parse json string error : " + json string , e ) ; return null ; } }


notifies a new file has been opened note that this does not mean that the file has been created in the file system it is only created logically and the actual file will be generated after it is committed

void on part file opened ( bucket i d bucket i d , path new path ) ;


this a sanity check to make sure that any filesystem ' s handling of renames non - empty dirs doesn ' t cause any regressions

public void test rename to dir with same prefix allowed ( ) throws throwable { assume true ( rename supported ( ) ) ; final path parentdir = path ( " test rename to dir with same prefix allowed " ) ; fs mkdirs ( parentdir ) ; / / before renaming , we create one file under the source parent directory create file ( new path ( parentdir , " mychild " ) ) ; final path dest = path ( " test rename to dir with same prefix allowed dest " ) ; rename ( parentdir , dest , true , false , true ) ; }


waits for n number of nodes use " 12 " for exact mapping , " & gt ; 12 " and " & lt ; 12 " for range

public cluster health request builder set wait for nodes ( string wait for nodes ) { request wait for nodes ( wait for nodes ) ; return this ; }


sets the label of the toolchain to resolve for use in toolchain - aware rules

public builder toolchain label ( label toolchain label ) { this toolchain label = toolchain label ; return this ; }


returns a set backed by the specified map the resulting set displays the same ordering , concurrency , and performance characteristics as the backing map in essence , this factory method provides a { @ link set } implementation corresponding to any { @ link map } implementation there is no need to use this method on a { @ link map } implementation that already has a corresponding { @ link set } implementation ( such as { @ link java util hash map } or { @ link java util tree map } ) each method invocation on the set returned by this method results in exactly one method invocation on the backing map or its { @ code key set } view , with one exception the { @ code add all } method is implemented as a sequence of { @ code put } invocations on the backing map the specified map must be empty at the time this method is invoked , and should not be accessed directly after this method returns these conditions are ensured if the map is created empty , passed directly to this method , and no reference to the map is retained , as illustrated in the following code fragment : { @ code set < object > identity hash set = sets new set from map ( new identity hash map < object , boolean > ( ) ) ; } the returned set is serializable if the backing map is

public static < e > set < e > new set from map ( map < e , boolean > map ) { return collections new set from map ( map ) ; }


stops the current gesture and calls the listener right after stopping it

private void stop gesture ( ) { if ( m gesture in progress ) { m gesture in progress = false ; if ( m listener ! = null ) { m listener on gesture end ( this ) ; } } }


get the name of the instruction corresponding to this node

public string get instruction ( ) { return instruction ; }


return a { @ link formatting conversion service } for use with annotated controllers see { @ link # add formatters } as an alternative to overriding this method

public formatting conversion service web flux conversion service ( ) { formatting conversion service service = new default formatting conversion service ( ) ; add formatters ( service ) ; return service ; }


gets an annotation parameter from an annotation usually you can just get the parameter directly , but if the parameter has type { @ link class } it doesn ' t work , because javac doesn ' t load classes in the normal manner

public static @ nullable < t > t get annotation parameter ( elements elements , element element , class < ? > annotation type , string parameter name , class < ? extends t > expected return type ) { list < ? extends annotation mirror > annotation mirrors = element get annotation mirrors ( ) ; annotation mirror mirror = null ; for ( annotation mirror m : annotation mirrors ) { if ( m get annotation type ( ) to string ( ) equals ( annotation type get canonical name ( ) ) ) { mirror = m ; break ; } } if ( mirror = = null ) { return null ; } for ( map entry < ? extends executable element , ? extends annotation value > entry : elements get element values with defaults ( mirror ) entry set ( ) ) { if ( parameter name equals ( entry get key ( ) get simple name ( ) to string ( ) ) ) { try { return expected return type cast ( entry get value ( ) get value ( ) ) ; } catch ( class cast exception e ) { throw new components processing exception ( element , mirror , string format ( " error processing the annotation ' % s ' are your imports set up correctly ? the causing error was : % s " , annotation type get canonical name ( ) , e ) ) ; } } } return null ; }


determines whether two iterators contain equal elements in the same order more specifically , this method returns { @ code true } if { @ code iterator 1 } and { @ code iterator 2 } contain the same number of elements and every element of { @ code iterator 1 } is equal to the corresponding element of { @ code iterator 2 } note that this will modify the supplied iterators , since they will have been advanced some number of elements forward

public static boolean elements equal ( iterator < ? > iterator 1 , iterator < ? > iterator 2 ) { while ( iterator 1 has next ( ) ) { if ( ! iterator 2 has next ( ) ) { return false ; } object o 1 = iterator 1 next ( ) ; object o 2 = iterator 2 next ( ) ; if ( ! objects equal ( o 1 , o 2 ) ) { return false ; } } return ! iterator 2 has next ( ) ; }


extract exception mappings from the { @ code @ exception handler } annotation first , and then as a fallback from the method signature itself

private list < class < ? extends throwable > > detect exception mappings ( method method ) { list < class < ? extends throwable > > result = new array list < > ( ) ; detect annotation exception mappings ( method , result ) ; if ( result is empty ( ) ) { for ( class < ? > param type : method get parameter types ( ) ) { if ( throwable class is assignable from ( param type ) ) { result add ( ( class < ? extends throwable > ) param type ) ; } } } if ( result is empty ( ) ) { throw new illegal state exception ( " no exception types mapped to " + method ) ; } return result ; }


public void test unary operator def ( ) { assert equals ( ( byte ) 5 , exec ( " def x = 5l ; return ( byte ) ( + x ) ; " ) ) ; assert equals ( ( short ) 5 , exec ( " def x = 5l ; return ( short ) ( + x ) ; " ) ) ; assert equals ( ( char ) 5 , exec ( " def x = 5l ; return ( char ) ( + x ) ; " ) ) ; assert equals ( 5 , exec ( " def x = 5l ; return ( int ) ( + x ) ; " ) ) ; assert equals ( 5f , exec ( " def x = 5l ; return ( float ) ( + x ) ; " ) ) ; assert equals ( 5l , exec ( " def x = 5l ; return ( long ) ( + x ) ; " ) ) ; assert equals ( 5d , exec ( " def x = 5l ; return ( double ) ( + x ) ; " ) ) ; }


public void test multiple thread ( ) throws exception { string testname = name get method name ( ) ; instrumented lock lock = new instrumented lock ( testname , log , 0 , 300 ) ; lock lock ( ) ; try { thread competing thread = new thread ( ) { @ override public void run ( ) { assert false ( lock try lock ( ) ) ; } } ; competing thread start ( ) ; competing thread join ( ) ; } finally { lock unlock ( ) ; } }


authorize the superuser which is doing do as

public static void authorize ( user group information user , inet address remote address ) throws authorization exception { get sip ( ) authorize ( user , remote address ) ; }


model tests for additional properties object

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


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


public string get sc a e t h flow points ( ) { return sc a e t h flow points ; }


set the next record range which is going to be processed by task

public void set next record range ( sorted ranges range next record range ) { this next record range = next record range ; }


get method desc " do ( i ) i " , " do ( ) v " , " do ( ljavalang string ; z ) v "

public static string get desc ( final ct method m ) throws not found exception { string builder ret = new string builder ( m get name ( ) ) append ( ' ( ' ) ; ct class [ ] parameter types = m get parameter types ( ) ; for ( ct class parameter type : parameter types ) { ret append ( get desc ( parameter type ) ) ; } ret append ( ' ) ' ) append ( get desc ( m get return type ( ) ) ) ; return ret to string ( ) ; }


after running the task , this method will return the server handle if the connection was successful if null , a connection error may have occurred ( { @ link # get exception ( ) } , or the task was cancelled by the user if both the exception and handle are null

remote repository server handle get repository server handle ( ) { return hdl ; }


given an index in the range < code > 0 size ( ) - 1 < code > , returns the value from the < code > index < code > th key - value mapping that this sparse array stores

public e value at ( int index ) { if ( m garbage ) { gc ( ) ; } return ( e ) m values [ index ] ; }


set the list of authorized users for this repository

public void set user list ( user [ ] users , boolean anonymous access allowed ) throws i o exception { synchronized ( server adapter ) { check repository ( ) ; try { repository set user list ( users , anonymous access allowed ) ; } catch ( not connected exception | remote exception e ) { if ( recover connection ( e ) ) { repository set user list ( users , anonymous access allowed ) ; return ; } throw e ; } } }


configure client keys to use for authorization in an ssl session use null to reset to default

public api client set key managers ( key manager [ ] managers ) { this key managers = managers ; apply ssl settings ( ) ; return this ; }


decodes given set of received codewords , which include both data and error - correction codewords really , this means it uses reed - solomon to detect and correct errors , in - place , in the input

public void decode ( int [ ] received , int two s ) throws reed solomon exception { generic g f poly poly = new generic g f poly ( field , received ) ; int [ ] syndrome coefficients = new int [ two s ] ; boolean no error = true ; for ( int i = 0 ; i < two s ; i + + ) { int eval = poly evaluate at ( field exp ( i + field get generator base ( ) ) ) ; syndrome coefficients [ syndrome coefficients length - 1 - i ] = eval ; if ( eval ! = 0 ) { no error = false ; } } if ( no error ) { return ; } generic g f poly syndrome = new generic g f poly ( field , syndrome coefficients ) ; generic g f poly [ ] sigma omega = run euclidean algorithm ( field build monomial ( two s , 1 ) , syndrome , two s ) ; generic g f poly sigma = sigma omega [ 0 ] ; generic g f poly omega = sigma omega [ 1 ] ; int [ ] error locations = find error locations ( sigma ) ; int [ ] error magnitudes = find error magnitudes ( omega , error locations ) ; for ( int i = 0 ; i < error locations length ; i + + ) { int position = received length - 1 - field log ( error locations [ i ] ) ; if ( position < 0 ) { throw new reed solomon exception ( " bad error location " ) ; } received [ position ] = generic g f add or subtract ( received [ position ] , error magnitudes [ i ] ) ; } }


sets the preferred sizes of the given components to the maximum of their current preferred sizes

private void set common preferred size ( list components ) { / / find the maximum preferred size dimension maximum size = null ; for ( int index = 0 ; index < components size ( ) ; index + + ) { j component component = ( j component ) components get ( index ) ; dimension size = component get preferred size ( ) ; if ( maximum size = = null | | size get width ( ) > maximum size get width ( ) ) { maximum size = size ; } } / / set the size that we found as the preferred size for all components for ( int index = 0 ; index < components size ( ) ; index + + ) { j component component = ( j component ) components get ( index ) ; component set preferred size ( maximum size ) ; } }


send the recycler a request to scroll the content to the first item in the binder

public void request scroll to top ( boolean animated ) { request scroll to position ( 0 , animated ) ; }


look for real blocks by counting meta files in all the storage dirs

private int count real blocks ( map < string , block locs > map ) { int total = 0 ; final string bpid = cluster get namesystem ( ) get block pool id ( ) ; for ( int i = 0 ; i < dn num ; i + + ) { for ( int j = 0 ; j < = 1 ; j + + ) { file storage dir = cluster get instance storage dir ( i , j ) ; file dir = mini d f s cluster get finalized dir ( storage dir , bpid ) ; if ( dir = = null ) { system out println ( " dir is null for dn = " + i + " and data dir = " + j ) ; continue ; } list < file > res = mini d f s cluster get all block metadata files ( dir ) ; if ( res = = null ) { system out println ( " res is null for dir = " + dir + " i = " + i + " and j = " + j ) ; continue ; } / / system out println ( " for dn " + i + " " + j + " : " + dir + " = " + res length + " files " ) ; / / int ii = 0 ; for ( file f : res ) { string s = f get name ( ) ; / / cut off " blk - " at the beginning and " meta " at the end assert not null ( " block file name should not be null " , s ) ; string bid = s substring ( s index of ( " " ) + 1 , s last index of ( " " ) ) ; / / system out println ( ii + + + " block " + s + " ; id = " + bid ) ; block locs val = map get ( bid ) ; if ( val = = null ) { val = new block locs ( ) ; } val num files + + ; / / one more file for the block map put ( bid , val ) ; } / / system out println ( " dir 1 = " + dir get path ( ) + " blocks = " + res length ) ; / / system out println ( " dir 2 = " + dir 2 get path ( ) + " blocks = " + res 2 length ) ; total + = res size ( ) ; } } return total ; }


public void test outer composite ( ) { / / todo : test outer composite }


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


get the roll euler angle in degrees , which is the rotation around the z axis requires that this quaternion is normalized

public float get roll ( ) { return get roll rad ( ) * math utils radians to degrees ; }


given a list of delete requests , convert them all to keypaths

public list < key path > keys to key paths ( final collection < delete objects request key version > keys to delete ) { return convert to key paths ( keys to delete , get store context ( ) : : key to path ) ; }


inserts the specified number of items at the specified index the new items will have values equal to the values at those indices before the insertion

public void insert range ( int index , int count ) { if ( index > size ) throw new index out of bounds exception ( " index can ' t be > size : " + index + " > " + size ) ; int size needed = size + count ; if ( size needed > items length ) items = resize ( math max ( math max ( 8 , size needed ) , ( int ) ( size * 1 7 5f ) ) ) ; system arraycopy ( items , index , items , index + count , size - index ) ; size = size needed ; }


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


the value of the num annotations item gives the number of runtime - visible annotations represented by the structure note that a maximum of 65535 runtime - visible java programming language annotations may be directly attached to a program element

public int get number of annotations ( ) { return number of annotations & 0xffff ; }


public static void main ( string [ ] args ) throws i o exception { string utils startup shutdown message ( registry d n s server class , args , log ) ; configuration conf = new registry configuration ( ) ; new generic options parser ( conf , args ) ; launch d n s server ( conf , null ) ; }


returns the maximum value from this list of instruction offsets returns < code > integer min value < code > if the list is empty

public int maximum value ( ) { int maximum value = integer min value ; if ( values ! = null ) { for ( int index = 0 ; index < values length ; index + + ) { int value = values [ index ] ; if ( maximum value < value ) { maximum value = value ; } } } return maximum value ; }


parses and validates that the source is not empty

private static void validate ( bytes reference source ) { if ( source = = null ) { throw new elasticsearch parse exception ( " policy must not be null " ) ; } try { x content helper convert to map ( source , false , x content type json ) v 2 ( ) ; } catch ( not x content exception e ) { throw new elasticsearch parse exception ( " policy must not be empty " ) ; } catch ( exception e ) { throw new elasticsearch parse exception ( " invalid policy " , e ) ; } }


private implementation of get children that will propagate an interrupted exception from a future in the nested set based on the value of { @ code interrupt strategy }

private object get children internal ( interrupt strategy interrupt strategy ) throws interrupted exception { switch ( interrupt strategy ) { case crash : return get children uninterruptibly ( ) ; case propagate : return get children interruptibly ( ) ; } throw new illegal state exception ( " unknown interrupt strategy " + interrupt strategy ) ; }


convenience version of { @ link # set final static ( field , object ) }

public static void set final static ( class < ? > clazz , string field name , object new value ) throws no such field exception , illegal access exception { final field declared field = clazz get declared field ( field name ) ; set final static ( declared field , new value ) ; }


create { @ link instance } from json string

public static instance from json ( string json ) { instance ip ; try { ip = jackson utils to obj ( json , instance class ) ; } catch ( exception e ) { ip = from string ( json ) ; } if ( ip = = null ) { throw new illegal argument exception ( " malformed ip config : " + json ) ; } if ( ip get weight ( ) > max weight value ) { ip set weight ( max weight value ) ; } if ( ip get weight ( ) < min positive weight value & & ip get weight ( ) > min weight value ) { ip set weight ( min positive weight value ) ; } else if ( ip get weight ( ) < min weight value ) { ip set weight ( 0 0d ) ; } try { ip validate ( ) ; } catch ( nacos exception e ) { throw new illegal argument exception ( " malformed ip config : " + json ) ; } return ip ; }


subclasses may implement special handling when the query threadpool shutdown process is interrupted this isn ' t likely to happen unless there ' s a bug in the lifecycle management of query tasks

protected void handle interrupted shutdown ( ) { }


refresh this engine internally iff the requesting seq no is greater than the last refreshed checkpoint

protected final void refresh if needed ( string source , long requesting seq no ) { if ( last refreshed checkpoint ( ) < requesting seq no ) { synchronized ( refresh if needed mutex ) { if ( last refreshed checkpoint ( ) < requesting seq no ) { refresh ( source , searcher scope internal , true ) ; } } } }


returns after stopping all threads by joining them back

public void stop ( ) throws exception { synchronized ( this ) { stopped = true ; } for ( testing thread t : test threads ) { t join ( ) ; } check exception ( ) ; }


appends the new program header to the end of the existing program header table

public void add program header ( elf program header ph ) { elf program header [ ] tmp = new elf program header [ e phnum + 1 ] ; int pos = tmp length - 1 ; boolean first load = true ; int first load pos = - 1 ; / * pt load segments must be inserted in sorted order * / if ( ph get type ( ) = = elf program header constants pt load ) { for ( int i = 0 ; i < program headers length - 1 ; + + i ) { if ( program headers [ i ] get type ( ) = = elf program header constants pt load ) { if ( first load ) { first load = false ; first load pos = i ; } pos = i ; } } + + pos ; } system arraycopy ( program headers , 0 , tmp , 0 , pos ) ; tmp [ pos ] = ph ; system arraycopy ( program headers , pos , tmp , pos + 1 , program headers length - pos ) ; if ( ph get type ( ) = = elf program header constants pt load ) { arrays sort ( tmp , first load pos , pos + 1 ) ; } program headers = tmp ; + + e phnum ; if ( e phnum ! = program headers length ) { throw new illegal state exception ( ) ; } }


returns a new path data with the given extension

public path data suffix ( string extension ) throws i o exception { return new path data ( fs , this + extension ) ; }


public void destroy ( ) { server = null ; if ( metrics ! = null ) { metrics shutdown ( ) ; } super destroy ( ) ; }


protected void finalize ( ) throws throwable { dispose ( ) ; super finalize ( ) ; }


parse the current token depending on its token type the following token types will be parsed by the corresponding parser methods : { @ link token # value string } : { @ link x content parser # text ( ) } { @ link token # value number } : { @ link x content parser # number value ( ) } ( ) } { @ link token # value boolean } : { @ link x content parser # boolean value ( ) } ( ) } { @ link token # value embedded object } : { @ link x content parser # binary value ( ) } ( ) } { @ link token # value null } : returns null { @ link token # start object } : { @ link x content parser # map ordered ( ) } ( ) } { @ link token # start array } : { @ link x content parser # list ordered map ( ) } ( ) }

public static object parse fields value ( x content parser parser ) throws i o exception { token token = parser current token ( ) ; object value = null ; if ( token = = token value string ) { / / binary values will be parsed back and returned as base 6 4 strings when reading from json and yaml value = parser text ( ) ; } else if ( token = = token value number ) { value = parser number value ( ) ; } else if ( token = = token value boolean ) { value = parser boolean value ( ) ; } else if ( token = = token value embedded object ) { / / binary values will be parsed back and returned as bytes array when reading from cbor and smile value = new bytes array ( parser binary value ( ) ) ; } else if ( token = = token value null ) { value = null ; } else if ( token = = token start object ) { value = parser map ordered ( ) ; } else if ( token = = token start array ) { value = parser list ordered map ( ) ; } else { throw unknown token ( token , parser get token location ( ) ) ; } return value ; }


checks if an item ' s range bottom is above the top range if true , it means the item is outside range

private static boolean is above viewport top ( rect visible rect , incremental module item item ) { return ! is below viewport top ( visible rect , item ) ; }


public static view set status bar color ( @ non null final activity activity , @ color int final int color ) { return set status bar color ( activity , color , false ) ; }


returns a keyed configured target instance that resolves aliases

public keyed configured target get actual ( ) { configured target actual = get configured target ( ) get actual ( ) ; configured target key actual key = this get configured target key ( ) = = null ? null : this get configured target key ( ) to builder ( ) set label ( actual get label ( ) ) build ( ) ; return keyed configured target create ( actual key , actual ) ; }


returns whether or not the application is headless

public boolean is headless ( ) { return true ; }


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


simple test of a proxy factory bean that has an inner bean as target that specifies autowiring checks for correct use of get type ( ) by bean factory

public void test inner bean target using autowiring ( ) { default listable bean factory bf = new default listable bean factory ( ) ; new xml bean definition reader ( bf ) load bean definitions ( new class path resource ( autowiring context , class ) ) ; bf get bean ( " test bean " ) ; }


paragraph - fill the specified input text , indenting lines to ' indent ' and wrapping lines at ' width ' returns the formatted result

static string paragraph fill ( string in , int indent , int width ) { string indent string = strings repeat ( " " , indent ) ; string builder out = new string builder ( ) ; string sep = " " ; for ( string paragraph : newline splitter split ( in ) ) { / / todo ( ccalvarin ) break iterators expect hyphenated words to be line - breakable , which looks / / funny for - - flag break iterator boundary = break iterator get line instance ( ) ; / / ( factory ) boundary set text ( paragraph ) ; out append ( sep ) append ( indent string ) ; int cursor = indent ; for ( int start = boundary first ( ) , end = boundary next ( ) ; end ! = break iterator done ; start = end , end = boundary next ( ) ) { string word = paragraph substring ( start , end ) ; / / ( may include trailing space ) if ( word length ( ) + cursor > width ) { out append ( ' \ n ' ) append ( indent string ) ; cursor = indent ; } out append ( word ) ; cursor + = word length ( ) ; } sep = " \ n " ; } return out to string ( ) ; }


finds the string literal from the given reader

protected boolean find text ( buffered reader in , string literal ) throws i o exception { string line ; while ( ( line = in read line ( ) ) ! = null ) if ( line contains ( literal ) ) return true ; return false ; }


minimizes ( iconifies ) the window iconified windows do not call their { @ link application listener } until the window is restored

public void iconify window ( ) { glfw glfw iconify window ( window handle ) ; }