private void create composite ( ) { composite = new composite ( parent , swt none ) ; composite set layout ( new grid layout ( 1 , true ) ) ; { group font group = u i utils create control group ( composite , binary editor messages editor binary hex froup font selection , 3 , grid data fill horizontal , 0 ) ; label label = u i utils create control label ( font group , binary editor messages editor binary hex label available fix width fonts ) ; grid data grid data = new grid data ( ) ; grid data horizontal span = 3 ; label set layout data ( grid data ) ; u i utils create control label ( font group , binary editor messages editor binary hex label name ) ; u i utils create control label ( font group , binary editor messages editor binary hex label style ) ; u i utils create control label ( font group , binary editor messages editor binary hex label size ) ; text name = new text ( font group , swt single | swt border ) ; grid data grid data 4 = new grid data ( ) ; grid data 4 horizontal alignment = grid data fill ; text name set layout data ( grid data 4 ) ; text style = new text ( font group , swt border ) ; grid data grid data 5 = new grid data ( ) ; grid data 5 horizontal alignment = grid data fill ; text style set layout data ( grid data 5 ) ; text style set enabled ( false ) ; text size = new text ( font group , swt border ) ; grid data grid data 6 = new grid data ( ) ; grid data 6 horizontal alignment = grid data fill ; gc gc = new gc ( font group ) ; int average char width = gc get font metrics ( ) get average char width ( ) ; gc dispose ( ) ; grid data 6 width hint = average char width * 6 ; text size set layout data ( grid data 6 ) ; list font = new list ( font group , swt single | swt v scroll | swt border ) ; grid data grid data 5 2 = new grid data ( ) ; grid data 5 2 height hint = items displayed * list font get item height ( ) ; grid data 5 2 width hint = average char width * 40 ; list font set layout data ( grid data 5 2 ) ; list font add selection listener ( new selection adapter ( ) { @ override public void widget selected ( selection event e ) { text name set text ( list font get selection ( ) [ 0 ] ) ; update size items and guess selected ( ) ; update and refresh sample ( ) ; } } ) ; list style = new list ( font group , swt single | swt border ) ; grid data grid data 2 1 = new grid data ( ) ; grid data 2 1 vertical alignment = grid data fill ; grid data 2 1 width hint = average char width * text bold italic length ( ) * 2 ; list style set layout data ( grid data 2 1 ) ; list style set items ( new string [ ] { text regular , text bold , text italic , text bold italic } ) ; list style add selection listener ( new selection adapter ( ) { @ override public void widget selected ( selection event e ) { text style set text ( list style get selection ( ) [ 0 ] ) ; update and refresh sample ( ) ; } } ) ; list size = new list ( font group , swt single | swt v scroll | swt border ) ; grid data grid data 7 = new grid data ( ) ; grid data 7 width hint = grid data 6 width hint ; grid data 7 height hint = grid data 5 2 height hint ; list size set layout data ( grid data 7 ) ; list size add selection listener ( new selection adapter ( ) { @ override public void widget selected ( selection event e ) { text size set text ( list size get selection ( ) [ 0 ] ) ; update and refresh sample ( ) ; } } ) ; sample text = new text ( font group , swt multi | swt wrap | swt v scroll | swt read only | swt border ) ; sample text set text ( sample text ) ; sample text set editable ( false ) ; grid data grid data 8 = new grid data ( ) ; grid data 8 horizontal span = 3 ; grid data 8 width hint = grid data 5 2 width hint + grid data 2 1 width hint + grid data 7 width hint + 10 ; grid data 8 height hint = 50 ; grid data 8 horizontal alignment = grid data fill ; sample text set layout data ( grid data 8 ) ; sample text add dispose listener ( e - > { if ( sample font ! = null & & ! sample font is disposed ( ) ) { sample font dispose ( ) ; } } ) ; } { group cmp byte settings = u i utils create control group ( composite , " settings " , 2 , grid data fill horizontal , 0 ) ; u i utils create control label ( cmp byte settings , " default width " ) ; cmb byte width = new combo ( cmp byte settings , swt border ) ; cmb byte width set items ( arr def valueto index ) ; int index = arrays as list ( arr def valueto index ) index of ( def width value ) ; cmb byte width select ( index ) ; } }


public static date begin of month ( @ not null final date date ) { return date utils truncate ( date , calendar month ) ; }


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


public just symbol enum get just symbol ( ) { return just symbol ; }


check that the plugins cat api handles no plugins being installed

public void test no plugins ( ) { final table table = build table ( list of ( ) , false ) ; assert that ( table get rows ( ) , is ( empty ( ) ) ) ; }


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 " ) replace ( " / " , file separator ) ; }


notify the listener about the timeout for an event identified by key additionally the method is called with the timeout ticket which allows to identify outdated timeout events

void notify timeout ( k key , uuid ticket ) ;


when set busy is called , a busy cursor will be displayed < b > and < b > all user mouse and keyboard events will be blocked

public void set busy ( boolean is busy ) { this is busy = is busy ; show busy cursor ( is busy ) ; / / always remove before adding , as this prevents multiple additions remove mouse listener ( blocking mouse listener ) ; if ( is busy ) { add mouse listener ( blocking mouse listener ) ; } paint immediately ( get bounds ( ) ) ; }


gets the value at the { @ code block } { @ code internal position - offset base } as a boolean without boundary checks

boolean get boolean unchecked ( unchecked block block , int internal position ) ;


appends { @ code values } , in order , to the end of the values the built { @ link immutable double array } will contain

public builder add all ( double [ ] values ) { ensure room for ( values length ) ; system arraycopy ( values , 0 , array , count , values length ) ; count + = values length ; return this ; }


prunes the keys and keeps up to the latest n keys around

synchronized token metadata prune keys ( int num keys to keep ) { if ( key cache cache size ( ) < = num keys to keep ) { return get token metadata ( ) ; / / nothing to do } map < bytes key , key and cache > map = new hash map < > ( key cache cache size ( ) + 1 ) ; key and cache current key = key cache get ( key cache current token key hash ) ; array list < key and cache > entries = new array list < > ( key cache cache values ( ) ) ; collections sort ( entries , ( left , right ) - > long compare ( right key and timestamp get timestamp ( ) , left key and timestamp get timestamp ( ) ) ) ; for ( key and cache value : entries ) { if ( map size ( ) < num keys to keep | | value key and timestamp get timestamp ( ) > = current key key and timestamp get timestamp ( ) ) { logger debug ( " keeping key { } " , value get key hash ( ) ) ; map put ( value get key hash ( ) , value ) ; } else { logger debug ( " prune key { } " , value get key hash ( ) ) ; } } assert map is empty ( ) = = false ; assert map contains key ( key cache current token key hash ) ; return new token metadata ( key cache current token key hash , map values ( ) ) ; }


closes the file and unmaps all memory mapped regions after calling this method , access to any byte buffer obtained from this instance will cause a segmentation fault

public void close ( ) throws i o exception { i o utils close quietly ( file channel ) ; for ( byte buffer bb : memory mapped regions ) { platform dependent free direct buffer ( bb ) ; } memory mapped regions clear ( ) ; / / to make this compatible with all versions of windows , we must wait with / / deleting the file until it is unmapped / / see also / / https : / / stackoverflow com / questions / 11099295 / file - flag - delete - on - close - and - memory - mapped - files / 51649618 # 51649618 files delete ( file path ) ; }


the compiler flags used for the compile that should also be used when finishing compilation during the lto backend

immutable list < string > get copts ( ) { return copts ; }


queue < runnable > new task queue ( int max capacity ) ;


this implementation always returns { @ code false }

public boolean is input value provided ( ) { return false ; }


public string get config label ( ) { return conf label ; }


gets the { @ code signed byte } value at a particular offset

public int get byte ( int off ) { check offsets ( off , off + 1 ) ; return get byte 0 ( off ) ; }


set the method to invoke for processing a message managed by this endpoint

public void set method ( @ nullable method method ) { this method = method ; }


public object pool < memcached client i f > get object pool ( ) { val pool = new generic object pool < > ( this ) ; pool set max idle ( memcached properties get max idle ( ) ) ; pool set min idle ( memcached properties get min idle ( ) ) ; pool set max total ( memcached properties get max total ( ) ) ; return pool ; }


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

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


public int hash code ( ) { return objects hash ( get template file ( ) , get folder ( ) , get destination filename ( ) , get template type ( ) ) ; }


gets the option value associated with this check box

private int get option ( ) { return option ; }


checks that a hasher returns the same hash code when given the same input , and also that the collision rate looks sane

static void assert invariants ( hash function hash function ) { int objects = 100 ; set < hash code > hashcodes = sets new hash set with expected size ( objects ) ; random random = new random ( 314159 ) ; for ( int i = 0 ; i < objects ; i + + ) { int value = random next int ( ) ; hash code hashcode 1 = hash function hash int ( value ) ; hash code hashcode 2 = hash function hash int ( value ) ; assert assert equals ( hashcode 1 , hashcode 2 ) ; / / idempotent assert assert equals ( hash function bits ( ) , hashcode 1 bits ( ) ) ; assert assert equals ( hash function bits ( ) , hashcode 1 as bytes ( ) length * 8 ) ; hashcodes add ( hashcode 1 ) ; } assert assert true ( hashcodes size ( ) > objects * 0 95 ) ; / / quite relaxed test assert hash bytes throws correct exceptions ( hash function ) ; assert independent hashers ( hash function ) ; assert shortcuts are equivalent ( hash function , 512 ) ; }


touch a file with a given name ; return the path

path touchf ( string name ) throws i o exception { path path = path ( name ) ; contract test utils touch ( get file system ( ) , path ) ; return path ; }


private static azure storage settings get client settings ( settings settings , string client name ) { try ( secure string account = get config value ( settings , client name , account setting ) ; secure string key = get config value ( settings , client name , key setting ) ; secure string sas token = get config value ( settings , client name , sas token setting ) ) { return new azure storage settings ( account to string ( ) , key to string ( ) , sas token to string ( ) , get value ( settings , client name , endpoint suffix setting ) , get value ( settings , client name , timeout setting ) , get value ( settings , client name , max retries setting ) , get value ( settings , client name , proxy type setting ) , get value ( settings , client name , proxy host setting ) , get value ( settings , client name , proxy port setting ) ) ; } }


returns the found serialization version if this instance was not read from serialized bytes but simply instantiated , then the current version is returned

public int get read version ( ) { return ( read version = = integer min value ) ? get version ( ) : read version ; }


check the supplied configuration for correctness

private static void check configuration ( configuration conf ) throws i o exception { final collection < uri > namespace dirs = f s namesystem get namespace dirs ( conf ) ; final collection < uri > edits dirs = f s namesystem get namespace edits dirs ( conf ) ; final collection < uri > required edits dirs = f s namesystem get required namespace edits dirs ( conf ) ; final collection < uri > shared edits dirs = f s namesystem get shared edits dirs ( conf ) ; for ( uri u : required edits dirs ) { if ( u to string ( ) compare to ( d f s config keys dfs namenode edits dir default ) = = 0 ) { continue ; } / / each required directory must also be in edits dirs or in / / shared edits dirs if ( ! edits dirs contains ( u ) & & ! shared edits dirs contains ( u ) ) { throw new illegal argument exception ( " required edits directory " + u + " not found : " + d f s config keys dfs namenode edits dir key + " = " + edits dirs + " ; " + d f s config keys dfs namenode edits dir required key + " = " + required edits dirs + " ; " + d f s config keys dfs namenode shared edits dir key + " = " + shared edits dirs ) ; } } if ( namespace dirs size ( ) = = 1 ) { log warn ( " only one image storage directory ( " + dfs namenode name dir key + " ) configured beware of data loss " + " due to lack of redundant storage directories ! " ) ; } if ( edits dirs size ( ) = = 1 ) { log warn ( " only one namespace edits storage directory ( " + dfs namenode edits dir key + " ) configured beware of data loss " + " due to lack of redundant storage directories ! " ) ; } }


gets all the { @ link item } s recursively in the { @ link item group } tree and filter them by the given type the returned list will represent a snapshot view of the items present at some time during the call if items are moved during the call , depending on the move , it may be possible for some items to escape the snapshot entirely if you do not need to iterate all items , or if the order of the items is not required , consider using { @ link # all items ( item group , class ) } instead

public static < t extends item > list < t > get all items ( final item group root , class < t > type ) { return get all items ( root , type , t - > true ) ; }


post - process the given property values before the factory applies them to the given bean allows for checking whether all dependencies have been satisfied , for example based on a " required " annotation on bean property setters also allows for replacing the property values to apply , typically through creating a new mutable property values instance based on the original property values , adding or removing specific values the default implementation returns the given { @ code pvs } as - is

default property values post process property values ( property values pvs , property descriptor [ ] pds , object bean , string bean name ) throws beans exception { return pvs ; }


dispatches { @ link # on drm keys removed ( int , media period id ) }

public void drm keys removed ( ) { for ( listener and handler listener and handler : listener and handlers ) { drm session event listener listener = listener and handler listener ; post or run ( listener and handler handler , ( ) - > listener on drm keys removed ( window index , media period id ) ) ; } }


clear storage type quota of the mount point

private boolean clr storage type quota ( string mount ) throws i o exception { long [ ] type quota = new long [ storage type values ( ) length ] ; each by storage type ( t - > type quota [ t ordinal ( ) ] = hdfs constants quota reset ) ; return update storage type quota ( mount , type quota ) ; }


returns the count of { @ code node } ' s outgoing edges ( equal to { @ code successors ( node ) size ( ) } ) in a directed graph in an undirected graph , returns the { @ link # degree ( object ) } if the count is greater than { @ code integer max value } , returns { @ code integer max value }


public void clear ( ) { size = 0 ; ints = new int [ min size ] ; }


returns an unmodifiable view of the specified multimap query operations on the returned multimap " read through " to the specified multimap , and attempts to modify the returned multimap , either directly or through the multimap ' s views , result in an { @ code unsupported operation exception } the returned multimap will be serializable if the specified multimap is serializable

public static < k , v > multimap < k , v > unmodifiable multimap ( multimap < k , v > delegate ) { if ( delegate instanceof unmodifiable multimap | | delegate instanceof immutable multimap ) { return delegate ; } return new unmodifiable multimap < > ( delegate ) ; }


set this to true to draw the text that is displayed in the center of the pie chart

public void set draw center text ( boolean enabled ) { this m draw center text = enabled ; }


helper method to return a literal bits comment string

protected static string literal bits comment ( cst literal bits value , int width ) { string buffer sb = new string buffer ( 20 ) ; sb append ( " # " ) ; long bits ; if ( value instanceof cst literal 6 4 ) { bits = ( ( cst literal 6 4 ) value ) get long bits ( ) ; } else { bits = value get int bits ( ) ; } switch ( width ) { case 4 : sb append ( hex u nibble ( ( int ) bits ) ) ; break ; case 8 : sb append ( hex u 1 ( ( int ) bits ) ) ; break ; case 16 : sb append ( hex u 2 ( ( int ) bits ) ) ; break ; case 32 : sb append ( hex u 4 ( ( int ) bits ) ) ; break ; case 64 : sb append ( hex u 8 ( bits ) ) ; break ; default : { throw new runtime exception ( " shouldn ' t happen " ) ; } } return sb to string ( ) ; }


specifies the types for the csv fields this method parses the csv data to a 1 - tuple which has fields of the specified types this method is overloaded for each possible length of the tuples to support type safe creation of data sets through csv parsing

public < t0 > data source < tuple 1 < t0 > > types ( class < t0 > type 0 ) { tuple type info < tuple 1 < t0 > > types = tuple type info get basic and basic value tuple type info ( type 0 ) ; csv input format < tuple 1 < t0 > > input format = new tuple csv input format < tuple 1 < t0 > > ( path , types , this included mask ) ; configure input format ( input format ) ; return new data source < tuple 1 < t0 > > ( execution context , input format , types , utils get call location name ( ) ) ; }


called when the subchannel ' s in - use state has changed to true , which means at least one transport is in use

void on in use ( internal subchannel is ) { }


invoked when the user - defined execution method in { @ link hystrix invokable } emits a value

public < t > t on execution emit ( hystrix invokable < t > command instance , t value ) { return value ; / / by default , just pass through }


< code > repeated aapt pb styled string span span = 2 ; < code >

private void set span ( int index , com android aapt resources styled string span builder builder for value ) { ensure span is mutable ( ) ; span set ( index , builder for value build ( ) ) ; }


public static object intercept ( @ this object obj , @ all arguments object [ ] all arguments , @ morph override callable zuper , @ origin method method ) throws throwable { enhanced instance target object = ( enhanced instance ) obj ; prepare ( ) ; method intercept result result = new method intercept result ( ) ; try { if ( interceptor ! = null ) { interceptor before method ( target object , method , all arguments , method get parameter types ( ) , result ) ; } } catch ( throwable t ) { if ( logger ! = null ) { logger error ( t , " class [ { } ] before method [ { } ] intercept failure " , obj get class ( ) , method get name ( ) ) ; } } object ret = null ; try { if ( ! result is continue ( ) ) { ret = result ret ( ) ; } else { ret = zuper call ( all arguments ) ; } } catch ( throwable t ) { try { if ( interceptor ! = null ) { interceptor handle method exception ( target object , method , all arguments , method get parameter types ( ) , t ) ; } } catch ( throwable t 2 ) { if ( logger ! = null ) { logger error ( t 2 , " class [ { } ] handle method [ { } ] exception failure " , obj get class ( ) , method get name ( ) ) ; } } throw t ; } finally { try { if ( interceptor ! = null ) { ret = interceptor after method ( target object , method , all arguments , method get parameter types ( ) , ret ) ; } } catch ( throwable t ) { if ( logger ! = null ) { logger error ( t , " class [ { } ] after method [ { } ] intercept failure " , obj get class ( ) , method get name ( ) ) ; } } } return ret ; }


convenience method for constructing composite formats given input format class ( inf ) , path ( p ) return : { @ code tbl ( < inf > , ) }

public static string compose ( class < ? extends input format > inf , string path ) { return compose ( inf get name ( ) intern ( ) , path , new string buffer ( ) ) to string ( ) ; }


reports whether a starlark value is assumed to be deeply immutable

public static boolean is immutable ( object x ) { / / nb : this is used as the basis for accepting objects in depsets , / / as well as for accepting objects as keys for starlark dicts if ( x instanceof string | | x instanceof boolean ) { return true ; } else if ( x instanceof starlark value ) { return ( ( starlark value ) x ) is immutable ( ) ; } else { throw new illegal argument exception ( " invalid starlark value : " + x get class ( ) ) ; } }


public boolean get attribute boolean ( ) { return attribute boolean ; }


void transfer data 2 target ( byte [ ] packet buf ) throws i o exception { if ( target buffer remaining ( ) = = 0 ) { return ; } if ( target buffer is direct ( ) ) { byte buffer direct check sum buf = buffer pool get buffer ( true , striped writer get checksum buf ( ) length ) ; striped writer get checksum ( ) calculate chunked sums ( target buffer , direct check sum buf ) ; direct check sum buf get ( striped writer get checksum buf ( ) ) ; buffer pool put buffer ( direct check sum buf ) ; } else { striped writer get checksum ( ) calculate chunked sums ( target buffer array ( ) , 0 , target buffer remaining ( ) , striped writer get checksum buf ( ) , 0 ) ; } int ck off = 0 ; while ( target buffer remaining ( ) > 0 ) { d f s packet packet = new d f s packet ( packet buf , striped writer get max chunks per packet ( ) , block offset 4 target , seq no 4 target + + , striped writer get checksum size ( ) , false ) ; int max bytes to packet = striped writer get max chunks per packet ( ) * striped writer get bytes per checksum ( ) ; int to write = target buffer remaining ( ) > max bytes to packet ? max bytes to packet : target buffer remaining ( ) ; int ck len = ( ( to write - 1 ) / striped writer get bytes per checksum ( ) + 1 ) * striped writer get checksum size ( ) ; packet write checksum ( striped writer get checksum buf ( ) , ck off , ck len ) ; ck off + = ck len ; packet write data ( target buffer , to write ) ; / / send packet packet write to ( target output stream ) ; block offset 4 target + = to write ; striped writer get reconstructor ( ) incr bytes written ( to write ) ; } }


create an http f s server to talk to the mini d f s cluster we created

private void create http f s server ( ) throws exception { file home dir = test dir helper get test dir ( ) ; assert assert true ( new file ( home dir , " conf " ) mkdir ( ) ) ; assert assert true ( new file ( home dir , " log " ) mkdir ( ) ) ; assert assert true ( new file ( home dir , " temp " ) mkdir ( ) ) ; http f s server web app set home dir for current thread ( home dir get absolute path ( ) ) ; file secret file = new file ( new file ( home dir , " conf " ) , " secret " ) ; writer w = new file writer ( secret file ) ; w write ( " secret " ) ; w close ( ) ; / / hdfs configuration file hadoop conf dir = new file ( new file ( home dir , " conf " ) , " hadoop - conf " ) ; if ( ! hadoop conf dir mkdirs ( ) ) { throw new i o exception ( ) ; } string fs default name = nn conf get ( common configuration keys public fs default name key ) ; configuration conf = new configuration ( false ) ; conf set ( common configuration keys public fs default name key , fs default name ) ; file hdfs site = new file ( hadoop conf dir , " hdfs - site xml " ) ; output stream os = new file output stream ( hdfs site ) ; conf write xml ( os ) ; os close ( ) ; / / httpfs configuration conf = new configuration ( false ) ; conf set ( " httpfs hadoop config dir " , hadoop conf dir to string ( ) ) ; conf set ( " httpfs proxyuser " + hadoop users conf test helper get hadoop proxy user ( ) + " groups " , hadoop users conf test helper get hadoop proxy user groups ( ) ) ; conf set ( " httpfs proxyuser " + hadoop users conf test helper get hadoop proxy user ( ) + " hosts " , hadoop users conf test helper get hadoop proxy user hosts ( ) ) ; conf set ( " httpfs authentication signature secret file " , secret file get absolute path ( ) ) ; file httpfs site = new file ( new file ( home dir , " conf " ) , " httpfs - site xml " ) ; os = new file output stream ( httpfs site ) ; conf write xml ( os ) ; os close ( ) ; class loader cl = thread current thread ( ) get context class loader ( ) ; url url = cl get resource ( " webapp " ) ; if ( url = = null ) { throw new i o exception ( ) ; } web app context context = new web app context ( url get path ( ) , " / webhdfs " ) ; server server = test jetty helper get jetty server ( ) ; server set handler ( context ) ; server start ( ) ; }


gets all the current matches pass the results of this to is valid to determine if a fully successful match has occured

map < string , string > get results ( ) { results clear ( ) ; if ( simple count > 0 ) { results put all ( simple results ) ; } if ( reference count > 0 ) { reference results for each ( ( k , v ) - > results put ( v get key ( ) , v get value ( ) ) ) ; } if ( append count > 0 ) { append results for each ( ( k , v ) - > results put ( k , v get append result ( ) ) ) ; } return results ; }


gets the annotation attributes { @ link rest template } bean being annotated { @ link dubbo transported @ dubbo transported }

private map < string , object > get dubbo translated attributes ( string bean name , dubbo transported attributes resolver attributes resolver ) { map < string , object > attributes = collections empty map ( ) ; bean definition bean definition = bean factory get bean definition ( bean name ) ; if ( bean definition instanceof annotated bean definition ) { annotated bean definition annotated bean definition = ( annotated bean definition ) bean definition ; method metadata factory method metadata = annotated bean definition get factory method metadata ( ) ; attributes = factory method metadata ! = null ? optional of nullable ( factory method metadata get annotation attributes ( dubbo transported class name ) ) or else ( attributes ) : collections empty map ( ) ; } return attributes resolver resolve ( attributes ) ; }


public synchronized void reset all counters ( ) { litho stats reset all counters ( ) ; }


called before the azure storage sdk sends a request client - side throttling uses this to suspend the request , if necessary , to minimize errors and maximize throughput

public void event occurred ( sending request event event ) { singleton sending request ( event ) ; }


public void set previous offset ( int offset ) { previous offset = offset ; }


set the mappings between exception class names and error view names the exception class name can be a substring , with no wildcard support at present a value of " servlet exception " would match { @ code javax servlet servlet exception } and subclasses , for example < b > nb : < b > consider carefully how specific the pattern is , and whether to include package information ( which isn ' t mandatory ) for example , " exception " will match nearly anything , and will probably hide other rules " java lang exception " would be correct if " exception " was meant to define a rule for all checked exceptions with more unusual exception names such as " base business exception " there ' s no need to use a fqn

public void set exception mappings ( properties mappings ) { this exception mappings = mappings ; }


returns true if restore process completed ( either successfully or with failure )

public boolean completed ( ) { return this = = success | | this = = failure ; }


override this method to configure " default " servlet handling

protected void configure default servlet handling ( default servlet handler configurer configurer ) { }


configure the http method ( s ) over which the locale can be changed

public void set http methods ( @ nullable string http methods ) { this http methods = http methods ; }


returns the right tree indent of this m t config object

public int get right tree indent ( ) { return right tree indent ; }


combine the value of records of the original { @ link k table } that got { @ link k table # group by ( key value mapper ) mapped } to the same key into a new instance of { @ link k table } records with { @ code null } key are ignored combining implies that the type of the aggregate result is the same as the type of the input value ( c f { @ link # aggregate ( initializer , aggregator , aggregator , materialized ) } ) the result is written into a local { @ link key value store } ( which is basically an ever - updating materialized view ) that can be queried using the provided { @ code queryable store name } furthermore , updates to the store are sent downstream into a { @ link k table } changelog stream each update to the original { @ link k table } results in a two step update of the result { @ link k table } the specified { @ link reducer adder } is applied for each update record and computes a new aggregate using the current aggregate ( first argument ) and the record ' s value ( second argument ) by adding the new record to the aggregate the specified { @ link reducer subtractor } is applied for each " replaced " record of the original { @ link k table } and computes a new aggregate using the current aggregate ( first argument ) and the record ' s value ( second argument ) by " removing " the " replaced " record from the aggregate if there is no current aggregate the { @ link reducer } is not applied and the new aggregate will be the record ' s value as - is thus , { @ code reduce ( reducer , reducer , string ) } can be used to compute aggregate functions like sum for sum , the adder and subtractor would work as follows : { @ code public class sum adder implements reducer < integer > { public integer apply ( integer current agg , integer new value ) { return current agg + new value ; } } public class sum subtractor implements reducer < integer > { public integer apply ( integer current agg , integer old value ) { return current agg - old value ; } } } not all updates might get sent downstream , as an internal cache is used to deduplicate consecutive updates to the same key the rate of propagated updates depends on your input data rate , the number of distinct keys , the number of parallel running kafka streams instances , and the { @ link streams config configuration } parameters for { @ link streams config # cache max bytes buffering config cache size } , and { @ link streams config # commit interval ms config commit interval } to query the local { @ link read only key value store } it must be obtained via { @ link kafka streams # store ( store query parameters ) kafka streams # store ( ) } : { @ code kafka streams streams = counting words read only key value store < k , value and timestamp < v > > local store = streams store ( queryable store name , queryable store types < k , value and timestamp < v > > timestamped key value store ( ) ) ; k key = " some - word " ; value and timestamp < v > reduce for word = local store get ( key ) ; key must be local ( application state is shared over all running kafka streams instances ) } for non - local keys , a custom rpc mechanism must be implemented using { @ link kafka streams # all metadata ( ) } to query the value of the key on a parallel running instance of your kafka streams application for failure and recovery the store will be backed by an internal changelog topic that will be created in kafka therefore , the store name defined by the materialized instance must be a valid kafka topic name and cannot contain characters other than ascii alphanumerics , ' ' , ' ' and ' - ' the changelog topic will be named " $ { application id } - $ { store name } - changelog " , where " application id " is user - specified in { @ link streams config } via parameter { @ link streams config # application id config application id config } , " store name " is the provide store name defined in { @ code materialized } , and " - changelog " is a fixed suffix you can retrieve all generated internal topic names via { @ link topology # describe ( ) }

k table < k , v > reduce ( final reducer < v > adder , final reducer < v > subtractor , final named named , final materialized < k , v , key value store < bytes , byte [ ] > > materialized ) ;


begin object will already be called on the keyframe so it can be differentiated with a non animated value

private static < t > keyframe < t > parse keyframe ( lottie composition composition , json reader reader , float scale , value parser < t > value parser ) throws i o exception { point f cp 1 = null ; point f cp 2 = null ; float start frame = 0 ; t start value = null ; t end value = null ; boolean hold = false ; interpolator interpolator = null ; / / only used by path keyframe point f path cp 1 = null ; point f path cp 2 = null ; reader begin object ( ) ; while ( reader has next ( ) ) { switch ( reader select name ( names ) ) { case 0 : / / t start frame = ( float ) reader next double ( ) ; break ; case 1 : / / s start value = value parser parse ( reader , scale ) ; break ; case 2 : / / e end value = value parser parse ( reader , scale ) ; break ; case 3 : / / o cp 1 = json utils json to point ( reader , 1f ) ; break ; case 4 : / / i cp 2 = json utils json to point ( reader , 1f ) ; break ; case 5 : / / h hold = reader next int ( ) = = 1 ; break ; case 6 : / / to path cp 1 = json utils json to point ( reader , scale ) ; break ; case 7 : / / ti path cp 2 = json utils json to point ( reader , scale ) ; break ; default : reader skip value ( ) ; } } reader end object ( ) ; if ( hold ) { end value = start value ; / / todo : create a hold interpolator so progress changes don ' t invalidate interpolator = linear interpolator ; } else if ( cp 1 ! = null & & cp 2 ! = null ) { interpolator = interpolator for ( cp 1 , cp 2 ) ; } else { interpolator = linear interpolator ; } keyframe < t > keyframe = new keyframe < > ( composition , start value , end value , interpolator , start frame , null ) ; keyframe path cp 1 = path cp 1 ; keyframe path cp 2 = path cp 2 ; return keyframe ; }


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


public void test has only read only ( ) { / / todo : test has only read only }


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


returns the entry with the given name , or null if it does not exist

public zip file entry get entry ( @ nullable string name ) { return entries get ( name ) ; }


returns true if field corresponding to field i d is set ( has been assigned a value ) and false otherwise

public boolean is set ( fields field ) { if ( field = = null ) { throw new illegal argument exception ( ) ; } switch ( field ) { case success : return is set success ( ) ; } throw new illegal state exception ( ) ; }


regression test : enqueue so many values that some of them won ' t have started processing , and then either interrupt processing or have a child throw an error in the latter case , this also tests that a value that hasn ' t started processing can still have a child error bubble up to it in both cases , it tests that the graph is properly cleaned of the dirty values and references to them

private void many dirty values clear children on fail ( boolean interrupt ) throws exception { sky key leaf key = graph tester non hermetic key ( " leaf " ) ; tester set ( leaf key , new string value ( " leafy " ) ) ; sky key last key = graph tester non hermetic key ( " last " ) ; tester set ( last key , new string value ( " last " ) ) ; final list < sky key > tops = new array list < > ( ) ; / / request far more top - level values than there are threads , so some of them will block until / / the / / leaf child is enqueued for processing for ( int i = 0 ; i < 10000 ; i + + ) { sky key top key = graph tester to sky key ( " top " + i ) ; tester get or create ( top key ) add dependency ( leaf key ) add dependency ( last key ) set computed value ( concatenate ) ; tops add ( top key ) ; } tester eval ( / * keep going = * / false , tops to array ( new sky key [ 0 ] ) ) ; final count down latch notify start = new count down latch ( 1 ) ; tester set ( leaf key , null ) ; if ( interrupt ) { / / leaf will wait for an interrupt if desired we cannot use the usual chained function / / because we need to actually throw the interrupt final atomic boolean should sleep = new atomic boolean ( true ) ; tester get or create ( leaf key , / * mark as modified = * / true ) set builder ( new no extractor function ( ) { @ override public sky value compute ( sky key sky key , environment env ) throws interrupted exception { notify start count down ( ) ; if ( should sleep get ( ) ) { / / should be interrupted within 5 seconds thread sleep ( 5000 ) ; throw new assertion error ( " leaf was not interrupted " ) ; } return new string value ( " crunchy " ) ; } } ) ; tester invalidate ( ) ; test thread eval thread = new test thread ( ( ) - > assert throws ( interrupted exception class , ( ) - > tester eval ( / * keep going = * / false , tops to array ( new sky key [ 0 ] ) ) ) ) ; eval thread start ( ) ; assert that ( notify start await ( test utils wait timeout seconds , time unit seconds ) ) is true ( ) ; eval thread interrupt ( ) ; eval thread join and assert state ( test utils wait timeout milliseconds ) ; / / free leaf key to compute next time should sleep set ( false ) ; } else { / / non - interrupt case just throw an error in the child tester get or create ( leaf key , / * mark as modified = * / true ) set has error ( true ) ; tester invalidate ( ) ; / / the error thrown may non - deterministically bubble up to a parent that has not yet started / / processing , but has been enqueued for processing tester eval ( / * keep going = * / false , tops to array ( new sky key [ 0 ] ) ) ; tester get or create ( leaf key , / * mark as modified = * / true ) set has error ( false ) ; tester set ( leaf key , new string value ( " crunchy " ) ) ; } / / last key was not touched during the previous build , but its reverse deps on its parents should / / still be accurate tester set ( last key , new string value ( " new last " ) ) ; tester invalidate ( ) ; evaluation result < string value > result = tester eval ( / * keep going = * / false , tops to array ( new sky key [ 0 ] ) ) ; for ( sky key top key : tops ) { assert with message ( top key to string ( ) ) that ( result get ( top key ) get value ( ) ) is equal to ( " crunchynew last " ) ; } }


create a new block from the current block by keeping the same elements only with respect to { @ code positions } that starts at { @ code offset } and has length of { @ code length } may return a view over the data in this block or may return a copy

default block get positions ( int [ ] positions , int offset , int length ) { check array range ( positions , offset , length ) ; return new dictionary block ( offset , length , this , positions , false , random dictionary id ( ) ) ; }


ensure that storage type and storage state are propagated in storage reports

public void test storage report has storage type and state ( ) throws i o exception { / / make sure we are not testing with the default type , that would not / / be a very good test assert not same ( storage type , storage type default ) ; name node nn = cluster get name node ( ) ; data node dn = cluster get data nodes ( ) get ( 0 ) ; / / insert a spy object for the nn rpc datanode protocol client side translator p b nn spy = internal data node test utils spy on bpos to n n ( dn , nn ) ; / / trigger a heartbeat so there is an interaction with the spy / / object data node test utils trigger heartbeat ( dn ) ; / / verify that the callback passed in the expected parameters argument captor < storage report [ ] > captor = argument captor for class ( storage report [ ] class ) ; mockito verify ( nn spy ) send heartbeat ( any ( datanode registration class ) , captor capture ( ) , any long ( ) , any long ( ) , any int ( ) , any int ( ) , any int ( ) , any ( ) , mockito any boolean ( ) , mockito any ( slow peer reports class ) , mockito any ( slow disk reports class ) ) ; storage report [ ] reports = captor get value ( ) ; for ( storage report report : reports ) { assert that ( report get storage ( ) get storage type ( ) , is ( storage type ) ) ; assert that ( report get storage ( ) get state ( ) , is ( datanode storage state normal ) ) ; } }


returns an immutable sorted multiset containing the elements of a sorted multiset , sorted by the same { @ code comparator } that behavior differs from { @ link # copy of ( iterable ) } , which always uses the natural ordering of the elements despite the method name , this method attempts to avoid actually copying the data when it is safe to do so the exact circumstances under which a copy will or will not be performed are undocumented and subject to change this method is safe to use even when { @ code sorted multiset } is a synchronized or concurrent collection that is currently being modified by another thread

public static < e > immutable sorted multiset < e > copy of sorted ( sorted multiset < e > sorted multiset ) { return copy of sorted entries ( sorted multiset comparator ( ) , lists new array list ( sorted multiset entry set ( ) ) ) ; }


read the md 5 file stored alongside the given data file and match the md 5 file content

private static matcher read stored md 5 ( file md 5 file ) throws i o exception { buffered reader reader = new buffered reader ( new input stream reader ( files new input stream ( md 5 file to path ( ) ) , charsets utf 8 ) ) ; string md 5 line ; try { md 5 line = reader read line ( ) ; if ( md 5 line = = null ) { md 5 line = " " ; } md 5 line = md 5 line trim ( ) ; } catch ( i o exception ioe ) { throw new i o exception ( " error reading md 5 file at " + md 5 file , ioe ) ; } finally { i o utils cleanup with logger ( log , reader ) ; } matcher matcher = line regex matcher ( md 5 line ) ; if ( ! matcher matches ( ) ) { throw new i o exception ( " invalid md5 file " + md 5 file + " : the content \ " " + md 5 line + " \ " does not match the expected pattern " ) ; } return matcher ; }


this tests that serializers used for snapshots are duplicates of the ones used in processing to avoid race conditions in stateful serializers

public void test serializer duplication in snapshot ( ) throws i o exception { final test duplicate serializer namespace serializer = new test duplicate serializer ( ) ; final test duplicate serializer state serializer = new test duplicate serializer ( ) ; final test duplicate serializer key serializer = new test duplicate serializer ( ) ; registered key value state backend meta info < integer , integer > meta info = new registered key value state backend meta info < > ( state descriptor type value , " test " , namespace serializer , state serializer ) ; internal key context < integer > mock key context = new mock internal key context < > ( ) ; copy on write state table < integer , integer , integer > table = new copy on write state table < > ( mock key context , meta info , key serializer ) ; table put ( 0 , 0 , 0 , 0 ) ; table put ( 1 , 0 , 0 , 1 ) ; table put ( 2 , 0 , 1 , 2 ) ; final copy on write state table snapshot < integer , integer , integer > snapshot = table state snapshot ( ) ; final state snapshot state key group writer partitioned snapshot = snapshot get key group writer ( ) ; namespace serializer disable ( ) ; key serializer disable ( ) ; state serializer disable ( ) ; partitioned snapshot write state in key group ( new data output view stream wrapper ( new byte array output stream with pos ( 1024 ) ) , 0 ) ; }


returns the data whose min address is less than or equal to the specified address and whose max address is greater than or equal to the specified address { @ literal data min address ( ) < = addr < = data max address ( ) }

public data get data containing ( address addr ) { code unit cu = get code unit containing ( addr ) ; if ( cu instanceof data ) { return ( data ) cu ; } return null ; }


dumps the { @ link segment map description } this method is for debugging only

protected string dump ( ) { string builder builder = new string builder ( ) ; builder append ( " segment map description - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " ) ; builder append ( " \ nflags : " ) ; builder append ( flags ) ; builder append ( " \ novl : " ) ; builder append ( ovl ) ; builder append ( " \ ngroup : " ) ; builder append ( group ) ; builder append ( " \ nframe : " ) ; builder append ( frame ) ; builder append ( " \ nseg name index : " ) ; builder append ( seg name index ) ; builder append ( " ; class name index : " ) ; builder append ( class name index ) ; builder append ( " ; seg offset : " ) ; builder append ( seg offset ) ; builder append ( " ; seg length : " ) ; builder append ( seg length ) ; return builder to string ( ) ; }


reads from buffer serialized in t binary protocol

public static dependencies from thrift ( byte buffer bytes ) { long start ts = 0l ; long end ts = 0l ; list < dependency link > links = collections empty list ( ) ; read buffer buffer = read buffer wrap unsafe ( bytes ) ; while ( true ) { thrift field thrift field = thrift field read ( buffer ) ; if ( thrift field type = = type stop ) break ; if ( thrift field is equal to ( start ts ) ) { start ts = buffer read long ( ) ; } else if ( thrift field is equal to ( end ts ) ) { end ts = buffer read long ( ) ; } else if ( thrift field is equal to ( links ) ) { int length = thrift codec read list length ( buffer ) ; if ( length = = 0 ) continue ; links = new array list < dependency link > ( length ) ; for ( int i = 0 ; i < length ; i + + ) { links add ( dependency link adapter read ( buffer ) ) ; } } else { skip ( buffer , thrift field type ) ; } } return dependencies create ( start ts , end ts , links ) ; }


public void close program ( program p ) { program manager release ( p ) ; assert true ( p get consumer list ( ) is empty ( ) ) ; }


do the action for updating multiple rows it will check the validity of conditions , then update rows in database if the format of conditions is invalid , throw lite pal support exception

private int do update all action ( string table name , content values values , string conditions ) { base utility check conditions correct ( conditions ) ; if ( values size ( ) > 0 ) { return m database update ( table name , values , get where clause ( conditions ) , get where args ( conditions ) ) ; } return 0 ; }


get the { @ link reservations a c ls manager } to use to check for the reservation access on a user

reservations a c ls manager get reservations a c ls manager ( ) ;


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


make sure we are adjusting subscriber request ( ) for filtered items

public void with backpressure 2 ( ) throws interrupted exception { flowable < integer > w = flowable range ( 1 , flowable buffer size ( ) * 2 ) ; flowable < integer > f = w filter ( new predicate < integer > ( ) { @ override public boolean test ( integer t 1 ) { return t 1 > 100 ; } } ) ; final count down latch latch = new count down latch ( 1 ) ; final test subscriber < integer > ts = new test subscriber < integer > ( ) { @ override public void on complete ( ) { system out println ( " on complete " ) ; latch count down ( ) ; } @ override public void on error ( throwable e ) { e print stack trace ( ) ; latch count down ( ) ; } @ override public void on next ( integer t ) { system out println ( " received : " + t ) ; / / request more each time we receive request ( 1 ) ; } } ; / / this means it will only request 1 item and expect to receive more ts request ( 1 ) ; f subscribe ( ts ) ; / / this will wait forever unless operator take handles the request ( n ) on filtered items latch await ( ) ; }


public void delete address range ( address start addr , address end addr , task monitor monitor ) throws cancelled exception { if ( instance settings adapter = = null ) { throw new unsupported operation exception ( ) ; } lock acquire ( ) ; try { list < ? > addr key ranges = addr map get key ranges ( start addr , end addr , false ) ; int cnt = addr key ranges size ( ) ; for ( int i = 0 ; i < cnt ; i + + ) { key range kr = ( key range ) addr key ranges get ( i ) ; instance settings adapter delete ( kr min key , kr max key , monitor ) ; } } catch ( i o exception e ) { db error ( e ) ; } finally { settings cache clear ( ) ; lock release ( ) ; } }


given an { @ link input stream } parse it into an instance of the declared type so that it can be passed to application code

public t parse ( input stream stream ) ;


ask the extension whether it vetoes killing of the given process

public abstract veto cause veto process killing ( @ non null i o s process p ) ;


similar to { @ link # add created ( element , int ) } but for the deleted list

private void add deleted ( final e element , final int i ) { if ( i > = 0 ) { throw new assertion error ( " element already exists : element = " + element + " , deleted = " + deleted ) ; } if ( deleted = = null ) { deleted = new array list < > ( default array initial capacity ) ; } deleted add ( - i - 1 , element ) ; }


delete a component template using the component templates api

public acknowledged response delete component template ( delete component template request req , request options options ) throws i o exception { return rest high level client perform request and parse entity ( req , cluster request converters : : delete component template , options , acknowledged response : : from x content , empty set ( ) ) ; }


public static error validate username ( string username , boolean allow reserved , settings settings ) { if ( ! is valid user or role name ( username ) ) { return new error ( string format ( locale root , invalid name message , " user " ) ) ; } if ( allow reserved = = false & & client reserved realm is reserved ( username , settings ) ) { return new error ( " username [ " + username + " ] is reserved and may not be used " ) ; } return null ; }


this method gets the count of nodes and the bytes under a subtree

private void get counts ( string path , counts counts ) { data node node = get node ( path ) ; if ( node = = null ) { return ; } string [ ] children = null ; int len = 0 ; synchronized ( node ) { set < string > childs = node get children ( ) ; children = childs to array ( new string [ childs size ( ) ] ) ; len = ( node data = = null ? 0 : node data length ) ; } / / add itself counts count + = 1 ; counts bytes + = len ; for ( string child : children ) { get counts ( path + " / " + child , counts ) ; } }


public void set width ( float width ) { this dimensions x = width ; updated = false ; }


int join ( ) throws interrupted exception { if ( rpc server ! = null ) { rpc server join ( ) ; } return result code ; }


public response entity < void > test body with query params with http info ( string query , user body ) throws rest client exception { object post body = body ; / / verify the required parameter ' query ' is set if ( query = = null ) { throw new http client error exception ( http status bad request , " missing the required parameter ' query ' when calling test body with query params " ) ; } / / verify the required parameter ' body ' is set if ( body = = null ) { throw new http client error exception ( http status bad request , " missing the required parameter ' body ' when calling test body with query params " ) ; } string path = api client expand path ( " / fake / body - with - query - params " , collections < string , object > empty map ( ) ) ; final multi value map < string , string > query params = new linked multi value map < string , string > ( ) ; final http headers header params = new http headers ( ) ; final multi value map < string , string > cookie params = new linked multi value map < string , string > ( ) ; final multi value map < string , object > form params = new linked multi value map < string , object > ( ) ; query params put all ( api client parameter to multi value map ( null , " query " , query ) ) ; final string [ ] local var accepts = { } ; final list < media type > local var accept = api client select header accept ( local var accepts ) ; final string [ ] content types = { " application / json " } ; final media type content type = api client select header content type ( content types ) ; string [ ] auth names = new string [ ] { } ; parameterized type reference < void > return type = new parameterized type reference < void > ( ) { } ; return api client invoke a p i ( path , http method put , query params , post body , header params , cookie params , form params , local var accept , content type , auth names , return type ) ; }


schedules a task on { @ link # instance }

static public task schedule ( task task , float delay seconds , float interval seconds , int repeat count ) { return instance ( ) schedule task ( task , delay seconds , interval seconds , repeat count ) ; }


returns the glyph for the specified code point if the glyph does not exist yet , it is created and queued to be loaded

public glyph get glyph ( int glyph code , int code point , rectangle bounds , glyph vector vector , int index ) { if ( glyph code < 0 | | glyph code > = max glyph code ) { / / glyph vector # get glyph code sometimes returns negative numbers on os x ! ? return new glyph ( code point , bounds , vector , index , this ) { public boolean is missing ( ) { return true ; } } ; } int page index = glyph code / page size ; int glyph index = glyph code & ( page size - 1 ) ; glyph glyph = null ; glyph [ ] page = glyphs [ page index ] ; if ( page ! = null ) { glyph = page [ glyph index ] ; if ( glyph ! = null ) return glyph ; } else page = glyphs [ page index ] = new glyph [ page size ] ; / / add glyph so size information is available and queue it so its image can be loaded later glyph = page [ glyph index ] = new glyph ( code point , bounds , vector , index , this ) ; queued glyphs add ( glyph ) ; return glyph ; }


returns whether any traced but unnecessary instruction between the two given offsets is branching over the second given offset

private boolean is any unnecessary instruction branching over ( int instruction offset 1 , int instruction offset 2 ) { for ( int offset = instruction offset 1 ; offset < instruction offset 2 ; offset + + ) { / / is it a traced but unmarked straddling branch ? if ( partial evaluator is traced ( offset ) & & ! is instruction necessary ( offset ) & & is any larger than ( partial evaluator branch targets ( offset ) , instruction offset 2 ) ) { return true ; } } return false ; }


evaluates client responses via ` sasl server evaluate response ` and returns the issued challenge to the client until authentication succeeds or fails the messages are sent and received as size delimited bytes that consists of a 4 byte network - ordered size n followed by n bytes representing the opaque payload

public void authenticate ( ) throws i o exception { if ( sasl state ! = sasl state reauth process handshake ) { if ( net out buffer ! = null & & ! flush net out buffer and update interest ops ( ) ) return ; if ( sasl server ! = null & & sasl server is complete ( ) ) { set sasl state ( sasl state complete ) ; return ; } / / allocate on heap ( as opposed to any socket server memory pool ) if ( net in buffer = = null ) net in buffer = new network receive ( max receive size , connection id ) ; net in buffer read from ( transport layer ) ; if ( ! net in buffer complete ( ) ) return ; net in buffer payload ( ) rewind ( ) ; } byte [ ] client token = new byte [ net in buffer payload ( ) remaining ( ) ] ; net in buffer payload ( ) get ( client token , 0 , client token length ) ; net in buffer = null ; / / reset the network receive as we read all the data try { switch ( sasl state ) { case reauth process handshake : case handshake or versions request : case handshake request : handle kafka request ( client token ) ; break ; case reauth bad mechanism : throw new sasl authentication exception ( reauth info bad mechanism error message ) ; case initial request : if ( handle kafka request ( client token ) ) break ; / / for default gssapi , fall through to authenticate using the client token as the first gssapi packet / / this is required for interoperability with 0 9 0 x clients which do not send handshake request case authenticate : handle sasl token ( client token ) ; / / when the authentication exchange is complete and no more tokens are expected from the client , / / update sasl state current sasl state will be updated when outgoing writes to the client complete if ( sasl server is complete ( ) ) set sasl state ( sasl state complete ) ; break ; default : break ; } } catch ( authentication exception e ) { / / exception will be propagated after response is sent to client set sasl state ( sasl state failed , e ) ; } catch ( exception e ) { / / in the case of i o exceptions and other unexpected exceptions , fail immediately sasl state = sasl state failed ; log debug ( " failed during { } : { } " , reauth info authentication or reauthentication text ( ) , e get message ( ) ) ; throw e ; } }


formats a millisecond duration as a english string expressing the number of hours , minutes and seconds in the duration

public static string format duration ( long millis ) { long days = 0 ; int hours = 0 ; int minutes = 0 ; int seconds = 0 ; if ( millis > = ms per day ) { days = millis / ms per day ; millis = millis % ms per day ; } if ( millis > = ms per hour ) { hours = ( int ) ( millis / ms per hour ) ; / / this cast is safe millis = millis % ms per hour ; } if ( millis > = ms per min ) { minutes = ( int ) ( millis / ms per min ) ; millis = millis % ms per min ; } if ( millis > = ms per sec ) { seconds = ( int ) ( millis / ms per sec ) ; millis = millis % ms per sec ; } string builder sb = new string builder ( ) ; if ( days > 0 ) { sb append ( long to string ( days ) ) append ( " days , " ) ; } if ( sb length ( ) > 0 | | hours > 0 ) { sb append ( integer to string ( hours ) ) append ( " hours , " ) ; } if ( sb length ( ) > 0 | | minutes > 0 ) { sb append ( integer to string ( minutes ) ) append ( " mins , " ) ; } sb append ( integer to string ( seconds ) ) append ( " secs " ) ; return sb to string ( ) ; }


asserts that the given node ' s pretty print at a given indent level matches the given string

private static void assert pretty matches ( node node , int indent level , string expected ) { string builder buf = new string builder ( ) ; new node printer ( buf , indent level ) print node ( node ) ; assert that ( buf to string ( ) ) is equal to ( expected ) ; }


returns an immutable array containing the given values , in order

public static immutable int array copy of ( int [ ] values ) { return values length = = 0 ? empty : new immutable int array ( arrays copy of ( values , values length ) ) ; }


gets the { @ link list } of { @ link dyld cache local symbols entry } s

public list < dyld cache local symbols entry > get local symbols ( ) { return local symbols entry list ; }


return the size of the left margin for the component viewing area

public int get left margin ( ) { return left margin ; }


boolean encode sugar ( ) { / / special case ' sugar - ' if ( string at ( m current , 5 , " sugar " , " " ) ) { metaph add ( " x " ) ; m current + + ; return true ; } return false ; }


removes and returns last element , or null if empty

private e unlink last ( ) { / / assert lock is held by current thread ( ) ; node < e > l = last ; if ( l = = null ) return null ; node < e > p = l prev ; e item = l item ; l item = null ; l prev = l ; / / help gc last = p ; if ( p = = null ) first = null ; else p next = null ; - - count ; not full signal ( ) ; return item ; }


private synchronized void init directory scanner ( configuration conf ) { if ( directory scanner ! = null ) { return ; } string reason = null ; if ( conf get time duration ( dfs datanode directoryscan interval key , dfs datanode directoryscan interval default , time unit seconds ) < 0 ) { reason = " verification is turned off by configuration " ; } else if ( " simulated f s dataset " equals ( data get class ( ) get simple name ( ) ) ) { reason = " verifcation is not supported by simulated f s dataset " ; } if ( reason = = null ) { directory scanner = new directory scanner ( data , conf ) ; directory scanner start ( ) ; } else { log info ( " periodic directory tree verification scan " + " is disabled because { } " , reason ) ; } }


return standard deviation of the processing time

public double get processing std dev ( ) { return rpc processing time last stat ( ) stddev ( ) ; }


computes the required branch offset size for this instruction ' s branch offset

private int required branch offset size ( ) { return ( short ) branch offset = = branch offset ? 2 : 4 ; }


returns an array of the references from the given address

public final reference [ ] get references from ( address address ) { return current program get reference manager ( ) get references from ( address ) ; }


returns the least value present in { @ code array } , treating values as unsigned

public static int min ( int array ) { check argument ( array length > 0 ) ; int min = flip ( array [ 0 ] ) ; for ( int i = 1 ; i < array length ; i + + ) { int next = flip ( array [ i ] ) ; if ( next < min ) { min = next ; } } return flip ( min ) ; }


abort all incomplete batches ( whether they have been sent or not )

void abort batches ( final runtime exception reason ) { for ( producer batch batch : incomplete copy all ( ) ) { deque < producer batch > dq = get deque ( batch topic partition ) ; synchronized ( dq ) { batch abort record appends ( ) ; dq remove ( batch ) ; } batch abort ( reason ) ; deallocate ( batch ) ; } }


add a reduce ( rn ) entry to the given cell

public boolean put reduce ( int from state , assembly terminal next , assembly production prod ) { return put ( from state , next , new reduce action ( prod ) ) ; }


returns the validation method to use for geo coordinates

public geo validation method get validation method ( ) { return this validation method ; }


allows { @ link s c m descriptor } s to choose which projects it wants to be configurable against when this method returns false , this { @ link scm } will not appear in the configuration screen for the given project the default is true for { @ link abstract project } but false for { @ link job }

public boolean is applicable ( job project ) { if ( project instanceof abstract project ) { return is applicable ( ( abstract project ) project ) ; } else { return false ; } }


public void set version ( string version ) { this version = version ; }


updates this panel with the given extension

public void set description ( extension details details ) { clear ( ) ; if ( details = = null ) { return ; } string builder buffer = new string builder ( " < html > " ) ; buffer append ( " < table cellpadding = 2 > " ) ; insert row title ( buffer , " name " ) ; insert row value ( buffer , details get name ( ) , name attr set ) ; insert row title ( buffer , " description " ) ; insert row value ( buffer , details get description ( ) , descr attr set ) ; insert row title ( buffer , " author " ) ; insert row value ( buffer , details get author ( ) , author attr set ) ; insert row title ( buffer , " created - on " ) ; string date = details get created on ( ) ; insert row value ( buffer , date , created on attr set ) ; insert row title ( buffer , " version " ) ; string version = details get version ( ) ; if ( version equals ( " @ extversion @ " ) ) { insert row value ( buffer , " " , version attr set ) ; } else { insert row value ( buffer , version , version attr set ) ; } string install path = details get install path ( ) ; if ( install path ! = null ) { insert row title ( buffer , " install path " ) ; insert row value ( buffer , install path , path attr set ) ; } buffer append ( " < / table > " ) ; text label set text ( buffer to string ( ) ) ; sp get viewport ( ) set view position ( new point ( 0 , 0 ) ) ; }


public org opensaml saml saml 2 ecp response new ecp response ( final string assertion consumer url ) { val saml response = new saml object ( org opensaml saml saml 2 ecp response class ) ; saml response set s o a p 1 1 must understand ( boolean true ) ; saml response set s o a p 1 1 actor ( actor bearing soap11 actor next ) ; saml response set assertion consumer service u r l ( assertion consumer url ) ; return saml response ; }


returns true if < code > o < code > is equal to this

public boolean equals ( object o ) { if ( same class as ( o ) = = false ) { return false ; } multi phrase prefix query other = ( multi phrase prefix query ) o ; return this slop = = other slop & & term arrays equals ( this term arrays , other term arrays ) & & this positions equals ( other positions ) ; }


returns a short buffer which is based on the remaining content of this byte buffer the new buffer ' s position is zero , its limit and capacity is the number of remaining bytes divided by two , and its mark is not set the new buffer ' s read - only property and byte order are the same as this buffer ' s the new buffer is direct if this byte buffer is direct the new buffer shares its content with this buffer , which means either buffer ' s change of content will be visible to the other the two buffer ' s position , limit and mark are independent

public abstract short buffer as short buffer ( ) ;


the name of this entry this corresponds to the ' entry ' part of a full resource name of the form package : typeentry < code > optional string name = 2 ; < code >


iterate through the values for the current key , reusing the same value object , which is stored in the context

iterable < valuein > get values ( ) throws i o exception , interrupted exception { return iterable ; }


public couch db saml id p metadata document get for service ( final optional < saml registered service > registered service ) { if ( registered service is present ( ) ) { val view = create query ( " service " ) limit ( 1 ) query param ( " applies to " , saml id p metadata generator get applies to for ( registered service ) ) ; return db query view ( view , couch db saml id p metadata document class ) stream ( ) find first ( ) or else ( null ) ; } return get for all ( ) ; }


prepare the given criteria object , applying cache settings andor a transaction timeout

protected void prepare criteria ( criteria criteria ) { if ( is cache queries ( ) ) { criteria set cacheable ( true ) ; if ( get query cache region ( ) ! = null ) { criteria set cache region ( get query cache region ( ) ) ; } } if ( get fetch size ( ) > 0 ) { criteria set fetch size ( get fetch size ( ) ) ; } if ( get max results ( ) > 0 ) { criteria set max results ( get max results ( ) ) ; } resource holder support session holder = ( resource holder support ) transaction synchronization manager get resource ( obtain session factory ( ) ) ; if ( session holder ! = null & & session holder has timeout ( ) ) { criteria set timeout ( session holder get time to live in seconds ( ) ) ; } }


returns the square root of { @ code x } , rounded with the specified rounding mode

public static big integer sqrt ( big integer x , rounding mode mode ) { check non negative ( " x " , x ) ; if ( fits in long ( x ) ) { return big integer value of ( long math sqrt ( x long value ( ) , mode ) ) ; } big integer sqrt floor = sqrt floor ( x ) ; switch ( mode ) { case unnecessary : check rounding unnecessary ( sqrt floor pow ( 2 ) equals ( x ) ) ; / / fall through case floor : case down : return sqrt floor ; case ceiling : case up : int sqrt floor int = sqrt floor int value ( ) ; boolean sqrt floor is exact = ( sqrt floor int * sqrt floor int = = x int value ( ) ) / / fast check mod 2 ^ 32 & & sqrt floor pow ( 2 ) equals ( x ) ; / / slow exact check return sqrt floor is exact ? sqrt floor : sqrt floor add ( big integer one ) ; case half down : case half up : case half even : big integer half square = sqrt floor pow ( 2 ) add ( sqrt floor ) ; / * * we wish to test whether or not x < = ( sqrt floor + 0 5 ) ^ 2 = half square + 0 25 since both x * and half square are integers , this is equivalent to testing whether or not x < = * half square * / return ( half square compare to ( x ) > = 0 ) ? sqrt floor : sqrt floor add ( big integer one ) ; default : throw new assertion error ( ) ; } }


construct { @ link i nodes in path } from { @ link i node }

static i nodes in path from i node ( i node inode ) { i node [ ] inodes = get i nodes ( inode ) ; byte [ ] [ ] paths = get paths ( inodes ) ; return new i nodes in path ( inodes , paths ) ; }


assert that the given component contains the provided pattern

public component assert has visible text matching ( string pattern ) { assert that litho view ( ) has visible text matching ( pattern ) ; return this ; }


get the field represented by the supplied { @ link field field object } on the specified { @ link object target object } in accordance with { @ link field # get ( object ) } semantics , the returned value is automatically wrapped if the underlying field has a primitive type thrown exceptions are handled via a call to { @ link # handle reflection exception ( exception ) }

public static object get field ( field field , @ nullable object target ) { try { return field get ( target ) ; } catch ( illegal access exception ex ) { handle reflection exception ( ex ) ; } throw new illegal state exception ( " should never get here " ) ; }


return the socket ( ip + port ) on which the rpc server is listening to

public synchronized inet socket address get listener address ( ) { return listener get address ( ) ; }


configure the data buffer factory to use for allocating buffers when preparing requests or creating responses by default this is set to { @ link netty data buffer factory } with pooled , allocated buffers for zero copy r socket must also be < a href = " https : github comrsocketrsocket - java # zero - copy " > configured for zero copy for client setup , { @ link r socket requester builder } adapts automatically to the { @ code data buffer factory } configured here , and sets the frame decoder in { @ link io rsocket core r socket connector r socket connector } accordingly for server setup , the { @ link io rsocket core r socket server r socket server } must be configured accordingly for zero copy too if using { @ link default data buffer factory } instead , there is no need for related config changes in r socket

builder data buffer factory ( @ nullable data buffer factory buffer factory ) ;


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


returns the next action that the producer should take in regards to transactions this method should be called every time before a producer sends a message this means that most of the time it should return # { @ link transaction action # no op } to signal the producer that its next step should be to send a message


asserts that the specific fields of a { @ link filtered monitoring doc } have the expected values

protected abstract void assert filtered monitoring doc ( f document ) ;


determines whether two orders are considered compatible an order is compatible with itself ( reflexivity ) and all orders are compatible with { @ link # stable order } ; the rest of the combinations are incompatible

public boolean is compatible ( order other ) { return this = = other | | this = = stable order | | other = = stable order ; }


private void stop ( int num of services started , boolean stop only started services ) { / / stop in reverse order of start exception first exception = null ; list < service > services = get services ( ) ; for ( int i = num of services started - 1 ; i > = 0 ; i - - ) { service service = services get ( i ) ; if ( log is debug enabled ( ) ) { log debug ( " stopping service # " + i + " : " + service ) ; } state state = service get service state ( ) ; / / depending on the stop police if ( state = = state started | | ( ! stop only started services & & state = = state inited ) ) { exception ex = service operations stop quietly ( log , service ) ; if ( ex ! = null & & first exception = = null ) { first exception = ex ; } } } / / after stopping all services , rethrow the first exception raised if ( first exception ! = null ) { throw service state exception convert ( first exception ) ; } }


public void test sql recognizing ( ) { / / test for ast was null assertions assert throws ( unsupported operation exception class , ( ) - > s q l visitor factory get ( " " , jdbc constants mysql ) ) ; / / test for mysql insert string sql = " insert into t ( id ) values ( 1 ) " ; list < s q l recognizer > recognizer = s q l visitor factory get ( sql , jdbc constants mysql ) ; assertions assert equals ( recognizer get ( 0 ) get class ( ) get name ( ) , my s q l insert recognizer class get name ( ) ) ; / / test for mysql delete sql = " delete from t " ; recognizer = s q l visitor factory get ( sql , jdbc constants mysql ) ; assertions assert equals ( recognizer get ( 0 ) get class ( ) get name ( ) , my s q l delete recognizer class get name ( ) ) ; / / test for mysql update sql = " update t set a = a " ; recognizer = s q l visitor factory get ( sql , jdbc constants mysql ) ; assertions assert equals ( recognizer get ( 0 ) get class ( ) get name ( ) , my s q l update recognizer class get name ( ) ) ; / / test for mysql select sql = " select * from t " ; recognizer = s q l visitor factory get ( sql , jdbc constants mysql ) ; assertions assert null ( recognizer ) ; / / test for mysql select for update sql = " select * from t for update " ; recognizer = s q l visitor factory get ( sql , jdbc constants mysql ) ; assertions assert equals ( recognizer get ( 0 ) get class ( ) get name ( ) , my s q l select for update recognizer class get name ( ) ) ; / / test for oracle insert sql = " insert into t ( id ) values ( 1 ) " ; recognizer = s q l visitor factory get ( sql , jdbc constants oracle ) ; assertions assert equals ( recognizer get ( 0 ) get class ( ) get name ( ) , oracle insert recognizer class get name ( ) ) ; / / test for oracle delete sql = " delete from t " ; recognizer = s q l visitor factory get ( sql , jdbc constants oracle ) ; assertions assert equals ( recognizer get ( 0 ) get class ( ) get name ( ) , oracle delete recognizer class get name ( ) ) ; / / test for oracle update sql = " update t set a = a " ; recognizer = s q l visitor factory get ( sql , jdbc constants oracle ) ; assertions assert equals ( recognizer get ( 0 ) get class ( ) get name ( ) , oracle update recognizer class get name ( ) ) ; / / test for oracle select sql = " select * from t " ; recognizer = s q l visitor factory get ( sql , jdbc constants oracle ) ; assertions assert null ( recognizer ) ; / / test for oracle select for update sql = " select * from t for update " ; recognizer = s q l visitor factory get ( sql , jdbc constants oracle ) ; assertions assert equals ( recognizer get ( 0 ) get class ( ) get name ( ) , oracle select for update recognizer class get name ( ) ) ; / / test for do not support db assertions assert throws ( enhanced service not found exception class , ( ) - > { s q l visitor factory get ( " select * from t " , jdbc constants db2 ) ; } ) ; / / test for multi - sql list < s q l recognizer > sql recognizers = null ; / / test for mysql insert assertions assert throws ( unsupported operation exception class , ( ) - > { s q l visitor factory get ( " insert into t ( id ) values ( 1 ) ; insert into t ( id ) values ( 2 ) " , jdbc constants mysql ) ; } ) ; / / test for mysql insert and update assertions assert throws ( unsupported operation exception class , ( ) - > { s q l visitor factory get ( " insert into t ( id ) values ( 1 ) ; update t set a = t ; " , jdbc constants mysql ) ; } ) ; / / test for mysql insert and deleted assertions assert throws ( unsupported operation exception class , ( ) - > { s q l visitor factory get ( " insert into t ( id ) values ( 1 ) ; delete from t where id = 1 " , jdbc constants mysql ) ; } ) ; / / test for mysql delete sql = " delete from t where id = 1 ; delete from t where id = 2 " ; sql recognizers = s q l visitor factory get ( sql , jdbc constants mysql ) ; for ( s q l recognizer sql recognizer : sql recognizers ) { assertions assert equals ( sql recognizer get class ( ) get name ( ) , my s q l delete recognizer class get name ( ) ) ; } / / test for mysql update sql = " update t set a = a ; update t set a = c ; " ; sql recognizers = s q l visitor factory get ( sql , jdbc constants mysql ) ; for ( s q l recognizer sql recognizer : sql recognizers ) { assertions assert equals ( sql recognizer get class ( ) get name ( ) , my s q l update recognizer class get name ( ) ) ; } / / test for mysql update and deleted assertions assert throws ( unsupported operation exception class , ( ) - > { s q l visitor factory get ( " update t set a = a where id = 1 ; update t set a = c where id = 1 ; delete from t where id = 1 " , jdbc constants mysql ) ; } ) ; / / test for mysql select assertions assert throws ( unsupported operation exception class , ( ) - > { s q l visitor factory get ( " select * from d where id = 1 ; select * from t where id = 2 " , jdbc constants mysql ) ; } ) ; / / test for mysql select for update assertions assert throws ( unsupported operation exception class , ( ) - > { s q l visitor factory get ( " select * from t for update ; select * from t where id = 2 " , jdbc constants mysql ) ; } ) ; / / test for oracle insert assertions assert throws ( unsupported operation exception class , ( ) - > { s q l visitor factory get ( " insert into t ( id ) values ( 1 ) ; insert into t ( id ) values ( 2 ) " , jdbc constants oracle ) ; } ) ; / / test for oracle delete and deleted sql = " delete from t where id = 1 ; delete from t where id = 2 " ; sql recognizers = s q l visitor factory get ( sql , jdbc constants oracle ) ; for ( s q l recognizer sql recognizer : sql recognizers ) { assertions assert equals ( sql recognizer get class ( ) get name ( ) , oracle delete recognizer class get name ( ) ) ; } / / test for oracle update sql = " update t set a = b where id = 1 ; update t set a = c where id = 1 ; " ; sql recognizers = s q l visitor factory get ( sql , jdbc constants oracle ) ; for ( s q l recognizer sql recognizer : sql recognizers ) { assertions assert equals ( sql recognizer get class ( ) get name ( ) , oracle update recognizer class get name ( ) ) ; } / / test for oracle select assertions assert throws ( unsupported operation exception class , ( ) - > { s q l visitor factory get ( " select * from b ; select * from t where id = 2 " , jdbc constants oracle ) ; } ) ; / / test for oracle select for update / / test for mysql select for update assertions assert throws ( unsupported operation exception class , ( ) - > { s q l visitor factory get ( " select * from t for update ; select * from t where id = 2 " , jdbc constants oracle ) ; } ) ; / / test for oracle insert and update assertions assert throws ( unsupported operation exception class , ( ) - > { s q l visitor factory get ( " insert into t ( id ) values ( 1 ) ; update t set a = t ; " , jdbc constants oracle ) ; } ) ; / / test for oracle insert and deleted assertions assert throws ( unsupported operation exception class , ( ) - > { s q l visitor factory get ( " insert into t ( id ) values ( 1 ) ; delete from t where id = 1 " , jdbc constants oracle ) ; } ) ; }


checks if this closable - reference is valid i e is not closed

public synchronized boolean is valid ( ) { return ! m is closed ; }


returns true if field arg is set ( has been assigned a value ) and false otherwise

public boolean is set arg ( ) { return isset bit vector get ( arg isset id ) ; }


return a bind expression that can be used in html forms as input name for the respective field , or { @ code null } if not field - specific returns a bind path appropriate for resubmission , e g " address street " note that the complete bind path as required by the bind tag is " customer address street " , if bound to a " customer " bean

public string get expression ( ) { return this expression ; }


creates an async job for the provided { @ link execution entity } , so that it can be continued later in a background thread

job entity create async job ( execution entity execution , boolean exclusive ) ;


public boolean exists ( get index request request , request options options ) throws i o exception { return rest high level client perform request ( request , indices request converters : : indices exist , options , rest high level client : : convert exists response , collections empty set ( ) ) ; }


public subtitle view get subtitle view ( ) { return subtitle view ; }


evaluate a jelly script and return output as a string

public static string run script ( script script ) throws jelly tag exception { string writer out = new string writer ( ) ; script run ( get current jelly context ( ) , x m l output create x m l output ( out ) ) ; return out to string ( ) ; }


only select tasks which are part of a process that has a local string variable which is not the given value , case insensitive this method only works if your database has encodingcollation that supports case - sensitive queries for example , use " collate utf - 8 " on my s q l and for mssql , select one of the case - sensitive collations available ( < a href = " http : msdn microsoft comen - uslibraryms 1 4 4 2 5 0 ( v = sql 105 ) aspx " > msdn server collation reference )

t process variable value equals ignore case ( string name , string value ) ;


wrap an existing { @ link r socket } typically for internal framework use , to wrap the remote { @ code r socket } in a client or server responder , but it can also be used to wrap any { @ link r socket }

static r socket requester wrap ( r socket rsocket , mime type data mime type , mime type metadata mime type , r socket strategies strategies ) { return new default r socket requester ( null , rsocket , data mime type , metadata mime type , strategies ) ; }


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

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


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


retrieves spans grouped by trace id from the storage system with no ordering expectation when strict trace id is disabled , spans are grouped by the right - most 16 characters of the trace id

call < list < list < span > > > get traces ( query request request ) ;


< code > replace comment < code > replaces the comment of the indicated type in program 1 with the comment in program 2 at the specified address

public void replace comment ( int comment type , address origin address ) { address result address = origin to result translator get address ( origin address ) ; string orig comment = origin listing get comment ( comment type , origin address ) ; result listing set comment ( result address , comment type , orig comment ) ; }


notification the services changed subclasses should override this method if they care about service changes

public void services changed ( ) { / / for subclasses }


return elf header associated with this program header

public elf header get elf header ( ) { return header ; }


if true then a tab key press will work the same as pressing the enter key if false , then a tab key press will trigger navigation , as is normally done in java this method is useful for widgets that have embedded editors that launch this dialog for these editors , like tables , it is nice to be able to tab through various editors this method allows these editors to keep this functionality , even though a new dialog was shown

public void set tab commits edit ( boolean does commit ) { editor set tab commits edit ( does commit ) ; }


return a { @ link # parse and cache previously } parsed and cached { @ code request path }

public static request path get parsed request path ( servlet request request ) { request path path = ( request path ) request get attribute ( path attribute ) ; assert not null ( path , " expected parsed request path in request attribute \ " " + path attribute + " \ " " ) ; return path ; }


wrapper for { @ link build options # contains } that throws an { @ link illegal argument exception } if the given { @ link fragment options } isn ' t in the " permitted " set

public boolean contains ( class < ? extends fragment options > options class ) { return options contains ( check fragment ( options class ) ) ; }


called when the window content is damaged and needs to be refreshed when this occurs , { @ link lwjgl 3 graphics # request rendering ( ) } is automatically called


public synchronized void add open channels ( list < file i o channel > to open ) { check argument ( ! closed ) ; for ( file i o channel channel : to open ) { open channels add ( channel ) ; channels remove ( channel get channel i d ( ) ) ; } }


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


the response resources wrapped in the common mcp resource message < code > repeated istio mcp v 1alpha 1 resource resources = 2 ; < code >

public builder set resources ( int index , com alibaba nacos istio model mcp resource builder builder for value ) { if ( resources builder = = null ) { ensure resources is mutable ( ) ; resources set ( index , builder for value build ( ) ) ; on changed ( ) ; } else { resources builder set message ( index , builder for value build ( ) ) ; } return this ; }


create a group of event handlers to be used as a dependency for example if the handler < code > a < code > must process events before handler < code > b < code > : < code > dw after ( a ) handle events with ( b ) ; < code >

public final event handler group < t > after ( final event handler < t > handlers ) { final sequence [ ] sequences = new sequence [ handlers length ] ; for ( int i = 0 , handlers length = handlers length ; i < handlers length ; i + + ) { sequences [ i ] = consumer repository get sequence for ( handlers [ i ] ) ; } return new event handler group < > ( this , consumer repository , sequences ) ; }


specifies the ordering of the generated multimap ' s values for each key if this method is called , the sets returned by the { @ code get ( ) } method of the generated multimap and its { @ link multimap # as map ( ) } view are { @ link immutable sorted set } instances however , serialization does not preserve that property , though it does maintain the key and value ordering

public builder < k , v > order values by ( comparator < ? super v > value comparator ) { super order values by ( value comparator ) ; return this ; }


returns a clock this is not hermetic , and should only be used for build info actions or performance measurements reporting


returns a map of environment variables ( derived from configuration ) that should be propagated for actions pertaining to building applications for apple platforms these environment variables are needed to use apple toolkits keys are variable names and values are their corresponding values

public static immutable map < string , string > apple target platform env ( apple platform platform , dotted version sdk version ) { immutable map builder < string , string > builder = immutable map builder ( ) ; builder put ( apple configuration apple sdk version env name , sdk version to string with minimum components ( 2 ) ) put ( apple configuration apple sdk platform env name , platform get name in plist ( ) ) ; return builder build ( ) ; }


sets the doc source of the update request to be used when the document does not exists the doc includes field and value pairs

public update request upsert ( x content type x content type , object source ) { safe upsert request ( ) source ( x content type , source ) ; return this ; }


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


public color set ( color color ) { this r = color r ; this g = color g ; this b = color b ; this a = color a ; return this ; }


get the block metadata file for a block from a given datanode

public file get block metadata file ( int dn index , extended block block ) { / / check for block file in the two storage directories of the datanode for ( int i = 0 ; i < = 1 ; i + + ) { file storage dir = get storage dir ( dn index , i ) ; file block meta file = get block metadata file ( storage dir , block ) ; if ( block meta file exists ( ) ) { return block meta file ; } } return null ; }


verify configuration that there are at least two rm - ids and rpc addresses are specified for each rm - id then set the rm - ids

private static void verify and set r m h a ids list ( configuration conf ) { collection < string > ids = conf get trimmed string collection ( yarn configuration rm ha ids ) ; if ( ids size ( ) < 2 ) { throw bad configuration exception ( get invalid value message ( yarn configuration rm ha ids , conf get ( yarn configuration rm ha ids ) + " \ n h a mode requires atleast two r ms " ) ) ; } string builder set value = new string builder ( ) ; for ( string id : ids ) { / / verify the rm service addresses configurations for every r m ids for ( string prefix : yarn configuration get service address conf keys ( conf ) ) { check and set r m r p c address ( prefix , id , conf ) ; } set value append ( id ) append ( " , " ) ; } conf set ( yarn configuration rm ha ids , set value substring ( 0 , set value length ( ) - 1 ) ) ; }


called when the renderer is enabled the default implementation is a no - op

protected void on enabled ( boolean joining , boolean may render start of stream ) throws exo playback exception { / / do nothing }


check whether the connector or any of its tasks are still in running state

protected boolean check connector and tasks are stopped ( string connector name ) { connector state info info ; try { info = connect connector status ( connector name ) ; } catch ( connect rest exception e ) { return e status code ( ) = = response status not found get status code ( ) ; } catch ( exception e ) { log error ( " could not check connector state info " , e ) ; return false ; } if ( info = = null ) { return true ; } return ! info connector ( ) state ( ) equals ( abstract status state running to string ( ) ) & & info tasks ( ) stream ( ) none match ( s - > s state ( ) equals ( abstract status state running to string ( ) ) ) ; }


return true if the given key is in the hashtable

public boolean contains ( object key ) { return indexer get ( key ) > = 0 ; }


creates list of users with given input array

public single < void > rx create users with list input ( list < user > body ) { return single create ( new io vertx rx java single on subscribe adapter < > ( fut - > delegate create users with list input ( body , fut ) ) ) ; }


returns an equivalent instance but only containing artifacts of the given type

public prerequisite artifacts filter ( file type file type ) { return filter ( file type , / * errors for non matching = * / false ) ; }


sets the horizontal text alignment of messages shown in the task dialog the default is { @ link swing constants # center } valid values are { @ link swing constants } leading , center and trailing

public task builder set status text alignment ( int alignment ) { boolean is valid = collection utils is one of ( alignment , leading , center , trailing ) ; system utilities assert true ( is valid , " illegal alignment argument : " + alignment ) ; this status text alignment = alignment ; return this ; }


edit an existing structure and create a structure from a selection , but cancel out of name dialog

public void test existing dt edit internal structure on selection cancel on name ( ) throws exception { init ( simple structure , pgm bb cat ) ; assert equals ( 8 , get model ( ) get num components ( ) ) ; set selection ( new int [ ] { 1 , 2 , 3 } ) ; data type original dt 1 = get data type ( 1 ) ; data type original dt 2 = get data type ( 2 ) ; data type original dt 3 = get data type ( 3 ) ; data type original dt 4 = get data type ( 4 ) ; / / make selected components into internal structure invoke ( create internal structure action ) ; / / specify name for structure j dialog input dialog = wait for j dialog ( " specify the structure ' s name " ) ; assert not null ( input dialog ) ; press button by text ( input dialog , " cancel " ) ; wait for swing ( ) ; / / verify the structure wasn ' t changed assert equals ( 8 , get model ( ) get num components ( ) ) ; assert equals ( 29 , get model ( ) get length ( ) ) ; assert equals ( original dt 1 , get data type ( 1 ) ) ; assert equals ( original dt 2 , get data type ( 2 ) ) ; assert equals ( original dt 3 , get data type ( 3 ) ) ; assert equals ( original dt 4 , get data type ( 4 ) ) ; }


returns a map of all the counters in the registry and their names

public sorted map < string , counter > get counters ( ) { return get counters ( metric filter all ) ; }


public void modify cache directive ( cache directive info info , enum set < cache flag > flags ) throws i o exception { statistics increment write ops ( 1 ) ; storage statistics increment op counter ( op type modify cache directive ) ; if ( info get path ( ) ! = null ) { info = new cache directive info builder ( info ) set path ( new path ( get path name ( fix relative part ( info get path ( ) ) ) ) make qualified ( get uri ( ) , get working directory ( ) ) ) build ( ) ; } dfs modify cache directive ( info , flags ) ; }


find purchase order by id for valid response try integer i ds with value & lt ; & # x 3 d ; 5 or & gt ; 10 other values will generated exceptions

public order get order by id ( long order id ) throws api exception { api response < order > local var resp = get order by id with http info ( order id ) ; return local var resp get data ( ) ; }


check the property names in the list ; if values changed in both places , then this is a conflict

private void check values ( string list name ) { options my list = my program get options ( list name ) ; options result list = result program get options ( list name ) ; options orig list = original program get options ( list name ) ; list < string > my name list = my list get option names ( ) ; list < string > result name list = result list get option names ( ) ; for ( int i = 0 ; i < my name list size ( ) ; i + + ) { string name = my name list get ( i ) ; if ( result name list contains ( name ) ) { update value ( my list , result list , orig list , name ) ; } else { / / not in the result check for added property ( my list , result list , orig list , name ) ; } } check deleted properties ( result list , orig list , my name list , result name list , orig list get option names ( ) ) ; }


method create random int matrix creates a random matrix of size

public static int [ ] [ ] create random int matrix ( int rows , int columns ) { var matrix = new int [ rows ] [ columns ] ; for ( var i = 0 ; i < rows ; i + + ) { for ( var j = 0 ; j < columns ; j + + ) { / / filling cells in matrix matrix [ i ] [ j ] = random next int ( 10 ) ; } } return matrix ; }


moves this rectangle so that its center point is located at a given position

public rectangle set center ( vector 2 position ) { set position ( position x - width / 2 , position y - height / 2 ) ; return this ; }


only select historic variable updates associated to the given { @ link historic activity instance activity instance }

historic detail query activity instance id ( string activity instance id ) ;


validates that each shard meets expected minimal and maximum size requirements , to ensure that shards are reasonably evenly sized

private void assert balanced ( string name , int shards , int package count , int package size , int entries , int [ ] counts ) { int classes = package size * package count ; int none class = entries - counts [ 0 ] - classes ; int ideal size = math max ( 1 , classes / shards ) ; int delta = math min ( math min ( 10 , ( ideal size + 3 ) > > 2 ) , ( int ) math log ( shards ) ) ; int lower bound = ideal size - delta ; int upper bound = ideal size + delta ; for ( int i = 1 ; i < counts length ; i + + ) { int adjusted = i = = 1 ? counts [ i ] - none class : counts [ i ] ; if ( i < shards & & counts [ i + 1 ] > 1 ) { if ( shards < = package count ) { / / if there are fewer shards than packages , expect shards contain at least 1 full package assert with message ( name + " dense shard " + i ) that ( counts [ i ] ) is in ( range closed ( package size , entries ) ) ; } else { assert with message ( name + " sparse shard " + i ) that ( counts [ i ] ) is in ( range closed ( 0 , package size ) ) ; } if ( none class = = 0 & & counts [ 0 ] = = 0 ) { / / give some slack in minimal number of entries in a shard because splitter recomputes / / boundaries for each shard , so our computed bounds can be off for later shards assert with message ( name + " shard " + i ) that ( counts [ i ] ) is in ( range closed ( lower bound - i , entries ) ) ; } } / / give some slack in maximum number of entries in a shard because splitter recomputes / / boundaries for each shard , so our computed bounds can be off for later shards assert with message ( name + " shard " + i ) that ( adjusted ) is at most ( upper bound + i ) ; } }


post usercreate with list : creates list of users with given input array

default response entity < void > create users with list input ( @ api param ( value = " list of user object " , required = true ) @ valid @ request body list < user > body ) { return new response entity < > ( http status not implemented ) ; }


reads and returns a 16 - bit unsigned integer throws an { @ link end of file exception } if an eof is reached

int get u int 1 6 ( ) throws i o exception ;


public void set controller ( @ nullable drawee controller controller ) { set controllers ( controller , null ) ; }


sets the default value of copts rule - level copts will append to this

public builder set default copts ( list < string > default copts ) { this default copts = default copts ; return this ; }


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