public synchronized void remove app from registry ( application id app id ) { map < string , token < a m r m token identifier > > sub cluster token map = this app sub cluster token map get ( app id ) ; log info ( " removing all registry entries for { } " , app id ) ; if ( sub cluster token map = = null | | sub cluster token map size ( ) = = 0 ) { return ; } / / lastly remove the application directory string key = get registry key ( app id , null ) ; try { remove key registry ( this registry , this user , key , true , true ) ; sub cluster token map clear ( ) ; } catch ( yarn exception e ) { log error ( " failed removing registry directory key " + key , e ) ; } }


indicate that source should be returned with every hit , with an " include " andor " exclude " set which can include simple wildcard elements

public top hits aggregation builder fetch source ( @ nullable string include , @ nullable string exclude ) { fetch source ( include = = null ? strings empty array : new string [ ] { include } , exclude = = null ? strings empty array : new string [ ] { exclude } ) ; return this ; }


returns true if drawing the center text is enabled

public boolean is draw center text enabled ( ) { return m draw center text ; }


register a listener that will be called when this model visibility has changed the listener will contribute to this model ' s hash code state per the { @ link com airbnb epoxy epoxy attribute option # do not hash } rules

public abstract model with holder on visibility changed ( on model visibility changed listener < abstract model with holder , abstract model with holder holder > listener ) { on mutation ( ) ; this on model visibility changed listener epoxy generated model = listener ; return this ; }


public boolean is login form username input visible ( final web engine context vars ) { val context = request context holder get request context ( ) ; return context ! = null & & web utils is cas login form viewable ( context ) & & string utils is blank ( web utils get open id local user id ( context ) ) & & web utils get passwordless authentication account ( context , serializable class ) = = null ; }


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


write a list of serializers and their corresponding config snapshots to the provided data output view this method writes in a fault tolerant way , so that when read again using { @ link # read serializers and configs with resilience ( data input view , class loader ) } , if deserialization of the serializer fails , its configuration snapshot will remain intact specifically , all written serializers and their config snapshots are indexed by their offset positions within the serialized bytes the serialization format is as follows : 1 number of serializer and configuration snapshot pairs 2 offsets of each serializer and configuration snapshot , in order 3 total number of bytes for the serialized serializers and the config snapshots 4 serialized serializers and the config snapshots

public static void write serializers and configs with resilience ( data output view out , list < tuple 2 < type serializer < ? > , type serializer snapshot < ? > > > serializers and configs ) throws i o exception { try ( byte array output stream with pos buffer with pos = new byte array output stream with pos ( ) ; data output view stream wrapper buffer wrapper = new data output view stream wrapper ( buffer with pos ) ) { out write int ( serializers and configs size ( ) ) ; for ( tuple 2 < type serializer < ? > , type serializer snapshot < ? > > ser and conf snapshot : serializers and configs ) { out write int ( buffer with pos get position ( ) ) ; write serializer ( buffer wrapper , ser and conf snapshot f 0 ) ; out write int ( buffer with pos get position ( ) ) ; type serializer snapshot serialization util write serializer snapshot ( buffer wrapper , ( type serializer snapshot ) ser and conf snapshot f 1 , ser and conf snapshot f 0 ) ; } out write int ( buffer with pos get position ( ) ) ; out write ( buffer with pos get buf ( ) , 0 , buffer with pos get position ( ) ) ; } }


repeated sequence of one request followed by one response should be called streaming ping - pong the server returns the client payload as - is on each response

public io grpc stub stream observer < io grpc benchmarks proto messages simple request > streaming call ( io grpc stub stream observer < io grpc benchmarks proto messages simple response > response observer ) { return io grpc stub client calls async bidi streaming call ( get channel ( ) new call ( get streaming call method ( ) , get call options ( ) ) , response observer ) ; }


returns if the node ' s value is currently being computed , asynchronously

final boolean is computing async ( node < ? , ? > node ) { return is async & & ! async is ready ( ( completable future < ? > ) node get value ( ) ) ; }


public function ms attributes get function attributes ( ) { return function attributes ; }


finds a table factory of the given class and property map this method enables disambiguating multiple matching { @ link component factory } s based on additional optional context provided via { @ link component factory # optional context ( ) }

public static < t extends component factory > t find ( class < t > factory class , map < string , string > property map ) { list < t > all = table factory service find all ( factory class , property map ) ; list < t > filtered = all stream ( ) filter ( factory - > { map < string , string > optional context = factory optional context ( ) ; return optional context entry set ( ) stream ( ) all match ( entry - > { string property = property map get ( entry get key ( ) ) ; if ( property ! = null ) { return property equals ( entry get value ( ) ) ; } else { return true ; } } ) ; } ) collect ( collectors to list ( ) ) ; if ( filtered size ( ) > 1 ) { throw new ambiguous table factory exception ( filtered , factory class , new array list < > ( all ) , property map ) ; } else if ( filtered is empty ( ) ) { throw new no matching table factory exception ( " no factory supports the additional filters " , factory class , new array list < > ( all ) , property map ) ; } else { return filtered get ( 0 ) ; } }


creates an empty token id to be used for de - serializing an { @ link a m r m token identifier } by the rpc layer

public a m r m token identifier create identifier ( ) { return new a m r m token identifier ( ) ; }


public static configuration get h base configuration ( map < string , string > options ) { org apache flink configuration configuration table options = org apache flink configuration configuration from map ( options ) ; / / create default configuration from current runtime env ( ` hbase - site xml ` in classpath ) / / first , configuration hbase client conf = h base configuration util get h base configuration ( ) ; hbase client conf set ( h constants zookeeper quorum , table options get ( zookeeper quorum ) ) ; hbase client conf set ( h constants zookeeper znode parent , table options get ( zookeeper znode parent ) ) ; / / add h base properties final properties properties = get h base client properties ( options ) ; properties for each ( ( k , v ) - > hbase client conf set ( k to string ( ) , v to string ( ) ) ) ; return hbase client conf ; }


takes the item at position index from items and puts it into scrap items if no such item exists the invocation of this method will have no effect

static < t > void scrap item at ( int index , t [ ] items , t [ ] scrap items ) { if ( items = = null | | scrap items = = null ) { return ; } final t value = items [ index ] ; if ( value ! = null ) { scrap items [ index ] = value ; } }


set the text field to be editable according to the state param

public void set editable ( boolean state ) { text field set editable ( state ) ; }


return the value to multiply the current interval by for each retry attempt

public double get multiplier ( ) { return this multiplier ; }


randomly creates a match tag in the tag table for the specified match set manager

public static v t match tag get random tag ( v t session session ) { int random int = get random int ( 0 , random tags length - 1 ) ; string name = random tags [ random int ] ; return session create match tag ( name ) ; }


set the so reuseport option on the underlying channel this will allow to bind multiple { @ link k queue socket channel } s to the same port and so accept connections with multiple threads be aware this method needs be called before { @ link k queue datagram channel # bind ( java net socket address ) } to have any affect

public k queue datagram channel config set reuse port ( boolean reuse port ) { try { ( ( k queue datagram channel ) channel ) socket set reuse port ( reuse port ) ; return this ; } catch ( i o exception e ) { throw new channel exception ( e ) ; } }


guaranteed to throw an exception and leave the underlying data unmodified

public final void set ( e e ) { throw new unsupported operation exception ( ) ; }


assert the extracted body with a { @ link matcher }

< t extends s > t value ( matcher < ? super b > matcher ) ;


this method returns the wrapped context for raw access to the validation framework if you use the context to add violations make sure to call < code > set violation occurred ( true ) < code >

public constraint validator context get context ( ) { return constraint validator context ; }


public integer request i d ( ) { return req i d ; }


public void small snake test ( ) { / / todo : test small snake }


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


public void test type holder example ( ) { / / todo : test type holder example }


sets the maximum number of cpu cores to use during headless processing

public void set max cpu ( int cpu ) { this maxcpu = cpu ; system set property ( " cpu core limit " , integer to string ( cpu ) ) ; }


visit a binding created from converting a bound instance to a new type the source binding has the same binding annotation but a different type this target is found only on injector bindings

v visit ( converted constant binding < ? extends t > binding ) ;


multiply float vector components within the buffer with the specified matrix the specified offset value is added to the { @ link buffer # position ( ) } and used as the offset

public static void transform ( buffer data , int dimensions , int stride in bytes , int count , matrix 3 matrix , int offset ) { switch ( dimensions ) { case 3 : transform v 3 m 3 jni ( data , stride in bytes , count , matrix val , position in bytes ( data ) + offset ) ; break ; case 2 : transform v 2 m 3 jni ( data , stride in bytes , count , matrix val , position in bytes ( data ) + offset ) ; break ; default : throw new illegal argument exception ( ) ; } }


creates a { @ code striped < l > } with eagerly initialized , strongly referenced locks every lock is obtained from the passed supplier

static < l > striped < l > custom ( int stripes , supplier < l > supplier ) { return new compact striped < > ( stripes , supplier ) ; }


public void write ( data output out ) throws i o exception { out write ( code ) ; }


test to validate correct exception is thrown for multithreaded seek scenario for block blobs

public void test multi thread block blob seek scenario ( ) throws throwable { / * azure blob storage test account test account = create test account ( ) ; fs = test account get file system ( ) ; * / path base = method path ( ) ; path test file path 1 = new path ( base , " test 1 dat " ) ; path rename path = new path ( base , " test 2 dat " ) ; get input stream to test ( fs , test file path 1 ) ; thread rename thread = new thread ( new rename thread ( fs , test file path 1 , rename path ) ) ; rename thread start ( ) ; rename thread join ( ) ; input stream seek ( 5 ) ; input stream read ( ) ; }


an optional attribute value of the token tokens which are not used as syntactic sugar will often contain meaningful values that will be used later on by the compiler or interpreter this attribute value is often different from the image any subclass of token that actually wants to return a non - null value can override this method as appropriate

public object get value ( ) { return null ; }


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


adds a suffix to the final name in the path

public path suffix ( string suffix ) { return new path ( get parent ( ) , get name ( ) + suffix ) ; }


register a listener that will be called when this model visibility state has changed the listener will contribute to this model ' s hash code state per the { @ link com airbnb epoxy epoxy attribute option # do not hash } rules

public model with type < t > on visibility state changed ( on model visibility state changed listener < model with type < t > , object > listener ) { on mutation ( ) ; this on model visibility state changed listener epoxy generated model = listener ; return this ; }


bidirectional rpc to get a list of servers

public io grpc stub stream observer < io grpc lb v 1 load balance request > balance load ( io grpc stub stream observer < io grpc lb v 1 load balance response > response observer ) { return io grpc stub client calls async bidi streaming call ( get channel ( ) new call ( get balance load method ( ) , get call options ( ) ) , response observer ) ; }


returns the values of all the gauges that are currently being maintained by the service

public void get all gauges ( io grpc testing integration metrics empty message request , io grpc stub stream observer < io grpc testing integration metrics gauge response > response observer ) { io grpc stub server calls async unimplemented unary call ( get get all gauges method ( ) , response observer ) ; }


returns true if zipper should be loaded we load the zipper executable if fdo optimization is enabled through - - fdo optimize or - - fdo profile

private static boolean should include zipper in toolchain ( cpp configuration cpp configuration ) { if ( cpp configuration is tool configuration do not use will be removed for 1 2 9 0 4 5 2 9 4 ( ) ) { / / this is actually a bug , because with platforms , and before toolchain - transitions are / / implemented , all toolchains are analyzed in the host configuration we ' re betting on / / nobody in the bazel world actually using zipped fdo profiles and platforms at the same / / time , and if people do , they ' ll have to wait for toolchain - transitions this needs to be / / fixed / / todo ( b / 129045294 ) : fix this once toolchain - transitions are implemented return false ; } return cpp configuration get fdo optimize label unsafe since it can return value from wrong configuration ( ) ! = null | | cpp configuration get fdo profile label unsafe since it can return value from wrong configuration ( ) ! = null | | cpp configuration get fdo path unsafe since it can return value from wrong configuration ( ) ! = null ; }


change check interval between two computations in millisecond

public void configure ( long new check interval ) { long new interval = new check interval / 10 * 10 ; if ( check interval get and set ( new interval ) ! = new interval ) { if ( new interval < = 0 ) { stop ( ) ; / / no more active monitoring last time set ( milli second from nano ( ) ) ; } else { / / restart stop ( ) ; start ( ) ; } } }


specify the order value for this view resolver bean the default value is { @ code ordered lowest precedence } , meaning non - ordered

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


invokes { @ link video renderer event listener # on video frame processing offset }

public void report video frame processing offset ( long total processing offset us , int frame count ) { if ( handler ! = null ) { handler post ( ( ) - > cast non null ( listener ) on video frame processing offset ( total processing offset us , frame count ) ) ; } }


query given sql to create a prepared statement from sql and a list of arguments to bind to the query , expecting a result object the query is expected to be a single rowsingle column query ; the returned result will be directly mapped to the corresponding object type

< t > t query for object ( string sql , sql parameter source param source , class < t > required type ) throws data access exception ;


returns a new { @ link file system ref } to an existing , already open { @ link g file system filesystem } caller is responsible for { @ link file system ref # close ( ) closing } it returns null if the requested filesystem isn ' t already open and mounted in the cache

public synchronized file system ref get ref ( f s r l root fsrl ) { if ( root f s r l equals ( fsrl ) ) { return root f s get ref manager ( ) create ( ) ; } f s cache info fsci = filesystems get ( fsrl ) ; if ( fsci ! = null ) { return fsci ref dup ( ) ; } / / if the query fsrl doesn ' t have a md5 , do a slow scan / / for filesystems that match by equiv if ( fsrl get m d 5 ( ) = = null ) { for ( entry < f s r l root , f s cache info > entry : filesystems entry set ( ) ) { if ( entry get key ( ) is equivalent ( fsrl ) ) { return entry get value ( ) ref dup ( ) ; } } } return null ; }


a debugging aid that just prints the raw information about the dancing link columns that were selected for each row

void raw write ( list solution ) { for ( iterator itr = solution iterator ( ) ; itr has next ( ) ; ) { iterator subitr = ( ( list ) itr next ( ) ) iterator ( ) ; while ( subitr has next ( ) ) { system out print ( subitr next ( ) to string ( ) + " " ) ; } system out println ( ) ; } }


adds a constant method handle info to the constant pool of this symbol table does nothing if the constant pool already contains a similar item

symbol add constant method handle ( final int reference kind , final string owner , final string name , final string descriptor , final boolean is interface ) { final int tag = symbol constant method handle tag ; / / note that we don ' t need to include is interface in the hash computation , because it is / / redundant with owner ( we can ' t have the same owner with different is interface values ) int hash code = hash ( tag , owner , name , descriptor , reference kind ) ; entry entry = get ( hash code ) ; while ( entry ! = null ) { if ( entry tag = = tag & & entry hash code = = hash code & & entry data = = reference kind & & entry owner equals ( owner ) & & entry name equals ( name ) & & entry value equals ( descriptor ) ) { return entry ; } entry = entry next ; } if ( reference kind < = opcodes h putstatic ) { constant pool put 1 1 2 ( tag , reference kind , add constant fieldref ( owner , name , descriptor ) index ) ; } else { constant pool put 1 1 2 ( tag , reference kind , add constant methodref ( owner , name , descriptor , is interface ) index ) ; } return put ( new entry ( constant pool count + + , tag , owner , name , descriptor , reference kind , hash code ) ) ; }


remove any path extension from the { @ link http servlet request # get request u r i ( ) request u r i } this method must be invoked before any calls to { @ link # path ( string ) } or { @ link # path segment ( string ) } get http : www foo examplerestbooks 6 json servlet uri components builder builder = servlet uri components builder from request uri ( this request ) ; string ext = builder remove path extension ( ) ; string uri = builder path ( " pages 1 { ext } " ) build and expand ( ext ) to uri string ( ) ; assert equals ( " http : www foo examplerestbooks 6pages 1 json " , result ) ;

public string remove path extension ( ) { string extension = null ; if ( this original path ! = null ) { extension = uri utils extract file extension ( this original path ) ; if ( string utils has length ( extension ) ) { int end = this original path length ( ) - ( extension length ( ) + 1 ) ; replace path ( this original path substring ( 0 , end ) ) ; } this original path = null ; } return extension ; }


sets the restart strategy configuration the configuration specifies which restart strategy will be used for the execution graph in case of a restart

public void set restart strategy ( restart strategies restart strategy configuration restart strategy configuration ) { config set restart strategy ( restart strategy configuration ) ; }


signals that process has yielded { @ link # process ( ) } will be called again later

public static < t > process state < t > yield ( ) { return ( process state < t > ) yield state ; }


public void set cache used ( long cache used ) { this cache used = cache used ; }


returns the window that is being evaluated


aggregate the values of records in this stream by the grouped key and defined windows records with { @ code null } key or value are ignored the result is written into a local { @ link window store } ( which is basically an ever - updating materialized view ) furthermore , updates to the store are sent downstream into a { @ link k table } changelog stream the specified { @ link initializer } is applied directly before the first input record ( per key ) in each window is processed to provide an initial intermediate aggregation result that is used to process the first record for the window ( per key ) the specified { @ link aggregator } ( as specified in { @ link k grouped stream # cogroup ( aggregator ) } or { @ link cogrouped k stream # cogroup ( k grouped stream , aggregator ) } ) is applied for each input record and computes a new aggregate using the current aggregate ( or for the very first record using the intermediate aggregation result provided via the { @ link initializer } ) and the record ' s value thus , { @ code aggregate ( ) } can be used to compute aggregate functions like count or sum etc the default key and value serde from the config will be used for serializing the result if a different serde is required then you should use { @ link # aggregate ( initializer , named , materialized ) } not all updates might get sent downstream , as an internal cache is used to deduplicate consecutive updates to the same window and 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 } for failure and recovery the store ( which always will be of type { @ link timestamped window store } ) will be backed by an internal changelog topic that will be created in kafka the changelog topic will be named " $ { application id } - $ { internal store name } - changelog " , where " application id " is user - specified in { @ link streams config } via parameter { @ link streams config # application id config application id config } , " internal store name " is an internal name and " - changelog " is a fixed suffix note that the internal store name may not be queryable through interactive queries you can retrieve all generated internal topic names via { @ link topology # describe ( ) }

k table < windowed < k > , v > aggregate ( final initializer < v > initializer , final named named ) ;


returns the call metric recorder attached to the current { @ link context } if there is none , returns a no - op recorder important : it returns the recorder specifically for the current rpc call < b > do not < b > save the returned object or share it between different rpc calls important : it must be called under the { @ link context } under which the rpc handler was called if it is called from a different thread , the context must be propagated to the same thread , e g , with { @ link context # wrap ( runnable ) }

public static call metric recorder get current ( ) { call metric recorder recorder = context key get ( ) ; return recorder ! = null ? recorder : noop ; }


public x content builder to x content grouped by none ( x content builder builder , params params ) throws i o exception { to x content common ( builder , params ) ; builder start array ( tasks ) ; for ( task info task info : get tasks ( ) ) { builder start object ( ) ; task info to x content ( builder , params ) ; builder end object ( ) ; } builder end array ( ) ; return builder ; }


public void mix ( ) { logger info ( " mixing the immutable stew we find : { } potatoes , { } carrots , { } meat and { } peppers " , data get num potatoes ( ) , data get num carrots ( ) , data get num meat ( ) , data get num peppers ( ) ) ; }


extract the url for the outermost archive from the given jarwar url ( which may point to a resource in a jar file or to a jar file itself ) in the case of a jar file nested within a war file , this will return a url to the war file since that is the one resolvable in the file system

public static url extract archive u r l ( url jar url ) throws malformed u r l exception { string url file = jar url get file ( ) ; int end index = url file index of ( war url separator ) ; if ( end index ! = - 1 ) { / / tomcat ' s " war : file : mywar war * / web - inf / lib / myjar jar ! / myentry txt " string war file = url file substring ( 0 , end index ) ; if ( url protocol war equals ( jar url get protocol ( ) ) ) { return new url ( war file ) ; } int start index = war file index of ( war url prefix ) ; if ( start index ! = - 1 ) { return new url ( war file substring ( start index + war url prefix length ( ) ) ) ; } } / / regular " jar : file : myjar jar ! / myentry txt " return extract jar file u r l ( jar url ) ; }


returns whether it ' s allowed to create runfile symlinks in the { @ code runfiles dir } also returns { @ code false } if the runfiles supplier doesn ' t know about the directory

boolean is runfile links enabled ( path fragment runfiles dir ) ;


find locations of potential damage from calls to non - returning functions

private address set find potential damaged locations ( program prog , address entry ) { string name = entry to string ( ) ; function func = prog get function manager ( ) get function at ( entry ) ; if ( func ! = null ) { name = func get name ( ) ; } try { monitor set message ( " no return - clearing and repairing flows for : " + name ) ; return find repair locations ( prog , entry ) ; } catch ( cancelled exception e ) { / / a cancel here implies that the entire script has been cancelled } return new address set ( ) ; }


returns the domain object associated with this task

public undoable domain object get domain object ( ) { return obj ; }


@ java script method public final j s o n object news ( ) { last news time = system current time millis ( ) ; j s o n object r = new j s o n object ( ) ; try { r put ( " data " , data ( ) ) ; } catch ( runtime exception x ) { log log ( level warning , " failed to update " + uri , x ) ; status = error ; } object status j s o n = status = = 1 ? " done " : status = = canceled ? " canceled " : status = = error ? " error " : status ; r put ( " status " , status j s o n ) ; if ( status j s o n instanceof string ) { / / somehow completed log log ( level fine , " finished in news so releasing { 0 } " , bound id ) ; release ( ) ; } last news time = system current time millis ( ) ; log log ( level finer , " news from { 0 } " , uri ) ; return r ; }


return whether the current handler ' s session processing has been marked as complete


always returns the specified target class , or { @ code null } if none

public class < ? > get target class ( ) { return this target class ; }


gets the freelist for the specified bucket if it exists

private synchronized bucket < v > get bucket if present ( int bucketed size ) { return m buckets get ( bucketed size ) ; }


returns a set containg all of the vertices from which an edge comes into the given vertex

public set < vertex > get parents ( vertex v ) { set < vertex > parents = new hash set < vertex > ( ) ; edge e = vertices get first incoming edge ( v ) ; while ( e ! = null ) { parents add ( e from ( ) ) ; e = edges get next edge with same to ( e ) ; } return parents ; }


check file changed status , if so , send the notification

private void check and notify ( ) { if ( system current time millis ( ) - last check timestamp < watching period in sec * 1000 ) { / / don ' t reach the period threshold , ignore this check return ; } boolean is changed = false ; for ( final watched file watched file : watched files ) { is changed = is changed | | watched file detect content changed ( ) ; } if ( is changed ) { list < byte [ ] > contents = new array list < > ( watched files size ( ) ) ; watched files for each ( file - > { contents add ( file file content ) ; } ) ; try { notifier files changed ( contents ) ; } catch ( exception e ) { log error ( " files = " + this + " notification process failure " , e ) ; } } }


public void print help ( ) { string header = " execute command runs a submits a plan for execution on " + " the given data node \ n \ n " ; string footer = " \ n execute command submits the job to data node and " + " returns immediately the state of job can be monitored via query " + " command " ; help formatter help formatter = new help formatter ( ) ; help formatter print help ( " hdfs diskbalancer - execute < planfile > " , header , disk balancer c l i get execute options ( ) , footer ) ; }


performs complete setup of ssl configuration in preparation for testing an s s l factory this includes keys , certs , keystores , truststores , the server ssl configuration file , the client ssl configuration file , and the master configuration file read by the s s l factory

public static void setup s s l config ( string keystores dir , string ssl conf dir , configuration conf , boolean use client cert , boolean trust store , string exclude ciphers ) throws exception { setup s s l config ( keystores dir , ssl conf dir , conf , use client cert , trust store , exclude ciphers , server key store password default , client key store password default , trust store password default ) ; }


create a chain with isolated end vertices

public void create chain ( float [ ] vertices ) { vec 2 [ ] v = new vec 2 [ vertices length / 2 ] ; for ( int i = 0 , vi = 0 ; i < vertices length ; i + = 2 , vi + + ) { v [ vi ] = new vec 2 ( vertices [ i ] , vertices [ i + 1 ] ) ; } shape create chain ( v , v length ) ; is looped = false ; }


returns true if this { @ code test observer } received a subscription

public final boolean has subscription ( ) { return upstream get ( ) ! = null ; }


public void visit switch ( int opcode , int offset , int length , switch list cases , int padding ) ;


set the current locale context to the given one , potentially including a locale with associated time zone information

void set locale context ( http servlet request request , @ nullable http servlet response response , @ nullable locale context locale context ) ;


helper method to set access token for the first o auth 2 authentication

public void set access token ( string access token ) { for ( authentication auth : authentications values ( ) ) { if ( auth instanceof o auth ) { ( ( o auth ) auth ) set access token ( access token ) ; return ; } } throw new runtime exception ( " no o auth 2 authentication configured ! " ) ; }


set whether or not we allow fallback to java serialization when no matching codec is found

public builder set allow default codec ( boolean allow default codec ) { this allow default codec = allow default codec ; return this ; }


set the jms message listener for this endpoint

public void set message listener ( message listener message listener ) { this message listener = message listener ; }


zooms out by 0 7f , x and y are the coordinates ( in pixels ) of the zoom center

public matrix zoom out ( float x , float y ) { matrix save = new matrix ( ) ; zoom out ( x , y , save ) ; return save ; }


set the target object on which the field is defined only necessary when the target field is not static ; else , a target class is sufficient

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


the number of partitions for the new topic or - 1 if a replica assignment has been specified

public int num partitions ( ) { return num partitions or else ( create topics request no num partitions ) ; }


public int compare to ( v long writable o ) { long this value = this value ; long that value = o value ; return ( this value < that value ? - 1 : ( this value = = that value ? 0 : 1 ) ) ; }


verify whether sorter thread is running or not

public boolean is sorter thread running ( ) { return ( handler ! = null ) ; }


thread pool executor get bounded copy thread pool ( ) { return bounded copy thread pool ; }


set the class loader to use for bean classes default is { @ code null } , which suggests to not load bean classes eagerly but rather to just register bean definitions with class names , with the corresponding classes to be resolved later ( or never )

public void set bean class loader ( @ nullable class loader bean class loader ) { this bean class loader = bean class loader ; }


adds display image task to execution pool image will be set to image view when it ' s turn < br > < b > note : < b > { @ link # init ( image loader configuration ) } method must be called before this method call

public void display image ( string uri , image view image view , display image options options , image loading listener listener , image loading progress listener progress listener ) { display image ( uri , new image view aware ( image view ) , options , listener , progress listener ) ; }


return the variance for the requested field

public double get variance ( string field ) { check field ( field , results variances ) ; return results variances get ( field ) ; }


a " certainty " threshold which defines the weight - of - evidence required before a term found in this field is identified as a useful connection

public vertex request shard min doc count ( int value ) { shard min doc count = value ; return this ; }


interpret test target labels from the command - line arguments and return the corresponding set of targets , handling the filter flags , and expanding test suites

private static resolved targets < target > determine tests ( environment env , list < string > target patterns , path fragment offset , test filter test filter ) throws interrupted exception { list < target pattern key > pattern sky keys = new array list < > ( ) ; for ( target pattern sky key or exception key or exception : target pattern value keys ( target patterns , filtering policies filter tests , offset ) ) { try { pattern sky keys add ( key or exception get sky key ( ) ) ; } catch ( target parsing exception e ) { / / skip } } map < sky key , value or exception < target parsing exception > > resolved patterns = env get values or throw ( pattern sky keys , target parsing exception class ) ; if ( env values missing ( ) ) { return null ; } list < sky key > expanded suite keys = new array list < > ( ) ; for ( target pattern key key : pattern sky keys ) { target pattern value value ; try { value = ( target pattern value ) resolved patterns get ( key ) get ( ) ; } catch ( target parsing exception e ) { / / skip continue ; } expanded suite keys add ( tests for target pattern value key ( value get targets ( ) get targets ( ) ) ) ; } map < sky key , sky value > expanded suites = env get values ( expanded suite keys ) ; if ( env values missing ( ) ) { return null ; } resolved targets builder < target > test targets builder = resolved targets builder ( ) ; for ( target pattern key pattern : pattern sky keys ) { target pattern value value ; try { value = ( target pattern value ) resolved patterns get ( pattern ) get ( ) ; } catch ( target parsing exception e ) { / / this was already reported in get targets to build ( maybe merge the two code paths ? ) continue ; } tests for target pattern value expanded suites value = ( tests for target pattern value ) expanded suites get ( tests for target pattern value key ( value get targets ( ) get targets ( ) ) ) ; if ( pattern is negative ( ) ) { resolved targets < target > negative targets = tests for target pattern function labels to targets ( env , expanded suites value get labels ( ) get targets ( ) , expanded suites value get labels ( ) has error ( ) ) ; test targets builder filter ( predicates not ( predicates in ( negative targets get targets ( ) ) ) ) ; test targets builder merge error ( negative targets has error ( ) ) ; } else { resolved targets < target > positive targets = tests for target pattern function labels to targets ( env , expanded suites value get labels ( ) get targets ( ) , expanded suites value get labels ( ) has error ( ) ) ; test targets builder add all ( positive targets get targets ( ) ) ; test targets builder merge error ( positive targets has error ( ) ) ; } } test targets builder filter ( test filter ) ; return test targets builder build ( ) ; }


public swift file status get object metadata ( path path ) throws i o exception { return get object metadata ( path , true ) ; }


returns the length in bytes of this file , or 0 if this file is a directory , does not exist , or the size cannot otherwise be determined

public long length ( ) { if ( type = = file type classpath | | ! file exists ( ) ) { input stream input = read ( ) ; try { return input available ( ) ; } catch ( exception ignored ) { } finally { try { input close ( ) ; } catch ( i o exception ignored ) { } } return 0 ; } return file ( ) length ( ) ; }


protected void configure oidc client ( final collection < indirect client > properties ) { val pac 4j properties = cas properties get authn ( ) get pac 4j ( ) ; pac 4j properties get oidc ( ) for each ( oidc - > { val client = get oidc client from ( oidc ) ; if ( client ! = null ) { logger debug ( " created client [ { } ] " , client ) ; properties add ( client ) ; } } ) ; }


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


private void update node labels and queue resource ( node labels update scheduler event label update event ) { write lock lock ( ) ; try { set < string > update labels = new hash set < string > ( ) ; for ( entry < node id , set < string > > entry : label update event get updated node to labels ( ) entry set ( ) ) { node id id = entry get key ( ) ; set < string > labels = entry get value ( ) ; fi ca scheduler node node = node tracker get node ( id ) ; if ( node ! = null ) { / / update old partition to list update labels add ( node get partition ( ) ) ; } update labels on node ( id , labels ) ; update labels add all ( labels ) ; } refresh label to node cache ( update labels ) ; resource cluster resource = get cluster resource ( ) ; get root queue ( ) update cluster resource ( cluster resource , new resource limits ( cluster resource ) ) ; } finally { write lock unlock ( ) ; } }


returns { @ code true } for non - bridge default methods not in { @ link # instance methods }

private boolean should stub as default method ( int access , string name , string desc ) { / / ignore private methods , which technically aren ' t default methods and can only be called from / / other methods defined in the interface this also ignores lambda body methods , which is fine / / as we don ' t want or need to stub those also ignore bridge methods as javac adds them to / / concrete classes as needed anyway and we handle them separately for generated lambda classes / / note that an exception is that , if a bridge method is for a default interface method , javac / / will not generate the bridge method in the implementing class so we need extra logic to / / handle these bridge methods return is non bridge default method ( access ) & & ! recorded instance method ( name , desc ) ; }


public ticker get ticker ( ) { return ticker ; }


removes and returns the least element of this queue , or returns { @ code null } if the queue is empty

public e poll first ( ) { return poll ( ) ; }


return a set of files whose cumulative size is at least < tt > target size < tt > todo clearly size is not the only criterion , e g refresh from generated data without including running task output , tolerance for permission issues , etc

abstract long select files ( long target size , collection < file status > files ) throws i o exception ;


public void log ( logger log ) { log info ( " counters : " + size ( ) ) ; for ( group group : this ) { log info ( " " + group get display name ( ) ) ; for ( counter counter : group ) { log info ( " " + counter get display name ( ) + " = " + counter get counter ( ) ) ; } } }


public json value next ( ) { return next ; }


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


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


cancel any pending loads glide may have for the view and free any resources that may have been loaded for the view note that this will only work if { @ link view # set tag ( object ) } is not called on this view outside of glide

public void clear ( @ non null view view ) { clear ( new clear target ( view ) ) ; }


public s q l exception get s q l exception ( ) { return ( s q l exception ) get cause ( ) ; }


parse a list of context registers from a csv string of context register names it is assumed that the list contains no duplicates

public static list < string > get context register list ( string context regs c s v ) { list < string > context registers = new array list < > ( ) ; if ( context regs c s v = = null ) { return context registers ; } context regs c s v = context regs c s v trim ( ) ; / / literal string null : this can be a value in a properties file if ( ( context regs c s v equals ( " " ) ) | | context regs c s v equals ( " null " ) ) { return context registers ; } string [ ] components = context regs c s v split ( " , " ) ; for ( string component : components ) { if ( ! string utils is empty ( component trim ( ) ) ) { context registers add ( component trim ( ) ) ; } } return context registers ; }


static method get start finalizer ( class < ? > finalizer ) { try { return finalizer get method ( " start finalizer " , class class , reference queue class , phantom reference class ) ; } catch ( no such method exception e ) { throw new assertion error ( e ) ; } }


returns the string representation of an { @ link inet address } for i pv 4 addresses , this is identical to { @ link inet address # get host address ( ) } , but for i pv 6 addresses , the output follows < a href = " http : tools ietf orghtmlrfc 5 9 5 2 " > rfc 5952 section 4 the main difference is that this method uses " : : " for zero compression , while java ' s version uses the uncompressed form this method uses hexadecimal for all i pv 6 addresses , including i pv 4 - mapped i pv 6 addresses such as " : : c 0 0 0 : 201 " the output does not include a scope id

public static string to addr string ( inet address ip ) { if ( ip = = null ) { throw new null pointer exception ( " ip " ) ; } if ( ip instanceof inet 4 address ) { / / for i pv 4 , java ' s formatting is good enough byte [ ] bytes = ip get address ( ) ; return ( bytes [ 0 ] & 0xff ) + " " + ( bytes [ 1 ] & 0xff ) + " " + ( bytes [ 2 ] & 0xff ) + " " + ( bytes [ 3 ] & 0xff ) ; } if ( ! ( ip instanceof inet 6 address ) ) { throw new illegal argument exception ( " ip " ) ; } byte [ ] bytes = ip get address ( ) ; int [ ] hextets = new int [ ipv6 part count ] ; for ( int i = 0 ; i < hextets length ; i + + ) { hextets [ i ] = ( bytes [ 2 * i ] & 255 ) < < 8 | bytes [ 2 * i + 1 ] & 255 ; } compress longest run of zeroes ( hextets ) ; return hextets to i pv 6 string ( hextets ) ; }


performs a watch for the serving status of the requested service the server will immediately send back a message indicating the current serving status it will then subsequently send a new message whenever the service ' s serving status changes if the requested service is unknown when the call is received , the server will send a message setting the serving status to service unknown but will not terminate the call if at some future point , the serving status of the service becomes known , the server will send a new message with the service ' s serving status if the call terminates with status unimplemented , then clients should assume this method is not supported and should not retry the call if the call terminates with any other status ( including ok ) , clients should retry the call with appropriate exponential backoff

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


used when mocking non - static inner classes in conjunction with { @ link # is using constructor ( ) }


sets a minimal threshold in number of documents a suggested term should appear in this can be specified as an absolute number or as a relative percentage of number of documents this can improve quality by only suggesting high frequency terms defaults to 0f and is not enabled if a value higher than 1 is specified then the number cannot be fractional

public term suggestion builder min doc freq ( float min doc freq ) { if ( min doc freq < 0 0f ) { throw new illegal argument exception ( " min doc freq must be positive " ) ; } if ( min doc freq > 1 0f & & min doc freq ! = math floor ( min doc freq ) ) { throw new illegal argument exception ( " if min doc freq is greater than 1 , it must not be a fraction " ) ; } this min doc freq = min doc freq ; return this ; }


make sure we have ' need ' elements from current position { @ link # p p } last valid { @ code p } index is { @ code tokens length - 1 } { @ code p + need - 1 } is the tokens index ' need ' elements ahead if we need 1 element , { @ code ( p + 1 - 1 ) = = p } must be less than { @ code tokens length }

protected void sync ( int want ) { int need = ( p + want - 1 ) - n + 1 ; / / how many more elements we need ? if ( need > 0 ) { fill ( need ) ; } }


this method is invoked each time a field type is tested in { @ link aggregator test case # test supported field types ( ) } the field type and name are provided , and the implementor is expected to return an agg builder accordingly the agg builder should be returned even if the aggregation does not support the field type , because the test will check if an exception is thrown in that case the list of supported types are provided by { @ link aggregator test case # get supported values source types ( ) } , which must also be implemented

protected aggregation builder create agg builder for type test ( mapped field type field type , string field name ) { throw new unsupported operation exception ( " if get supported values source types ( ) is implemented , " + " create agg builder for type test ( ) must be implemented as well " ) ; }


returns an executor that prioritizes newer work this is the opposite of a traditional executor , which processor work in fifo order

public static executor service new fixed lifo thread executor ( string name , int min threads , int max threads ) { return new thread pool executor ( min threads , max threads , 0 , time unit milliseconds , new linked blocking lifo queue < > ( ) , new numbered thread factory ( name ) ) ; }


deprecated database change is not supported ( as it is ambiguous )

public void set default instance ( @ not null d b r progress monitor monitor , @ not null postgre database new database , postgre schema schema ) throws d b exception { final postgre database old database = get default instance ( ) ; if ( old database ! = new database ) { new database initialize meta context ( monitor ) ; new database cache data types ( monitor , false ) ; } postgre schema old default schema = null ; if ( schema ! = null ) { old default schema = new database get meta context ( ) get default schema ( ) ; new database get meta context ( ) change default schema ( monitor , schema , false ) ; } active database name = new database get name ( ) ; / / notify ui d b utils fire object select ( old database , false ) ; d b utils fire object select ( new database , true ) ; if ( schema ! = null & & schema ! = old default schema ) { if ( old default schema ! = null ) { d b utils fire object select ( old default schema , false ) ; } d b utils fire object select ( schema , true ) ; } / / close all database connections but meta ( we need it to browse metadata like navigator tree ) old database shutdown ( monitor , true ) ; }


gets a command line string , which can be passed to agent start command

public string to command line string ( @ non null slave computer computer ) { if ( disabled ) { return " " ; } string builder bldr = new string builder ( ) ; bldr append ( " - work dir \ " " ) ; if ( work dir path = = null ) { slave node = computer get node ( ) ; if ( node = = null ) { / / it is not possible to launch this node anyway return " " ; } bldr append ( node get remote f s ( ) ) ; } else { bldr append ( work dir path ) ; } bldr append ( " \ " " ) ; if ( ! default internal dir equals ( internal dir ) ) { bldr append ( " - internal dir \ " " ) ; bldr append ( internal dir ) ; bldr append ( " \ " " ) ; } if ( fail if work dir is missing ) { bldr append ( " - fail if work dir is missing " ) ; } return bldr to string ( ) ; }


checks whether the given access flags are valid field access flags , throwing a parse exception if they aren ' t

private void check field access flags ( int required set member access flags , int required unset member access flags ) throws parse exception { if ( ( ( required set member access flags | required unset member access flags ) & ~ class constants valid acc field ) ! = 0 ) { throw new parse exception ( " invalid method access modifier for field before " + reader location description ( ) ) ; } }


sets the results list to be the given single value < b > note : < b > if there is more than one result value , the others may be added by using { @ link # add result }

protected final void set result ( type bearer result ) { if ( result = = null ) { throw new null pointer exception ( " result = = null " ) ; } results [ 0 ] = result ; result count = 1 ; }


called whenever the mouse button is pressed

void button pressed ( field location location , field field , mouse event ev ) ;


returns the most recent { @ link timeline } for the given { @ link media period id } , or null if no timeline is available

public timeline get media period id timeline ( media period id media period id ) { return media period timelines get ( media period id ) ; }


verify that the configuration gets passed as environment variables to the fencer

public void test conf as environment ( ) { if ( ! shell windows ) { fencer try fence ( test target , " echo $ in fencing tests " ) ; mockito verify ( shell command fencer log ) info ( mockito ends with ( " echo $ in ing tests : yessir " ) ) ; } else { fencer try fence ( test target , " echo % in fencing tests % " ) ; mockito verify ( shell command fencer log ) info ( mockito ends with ( " echo % in ng tests % : yessir " ) ) ; } }


sets the value of " end " which is a timestamp only buckets whose timestamp is before the " end " value will be returned

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


initialize lazily ( ) should get called to try to get the code format service and create the panel the first time we want to use the panel

protected void initialize lazily ( ) { if ( panel ! = null ) { return ; } if ( tool = = null ) { return ; } if ( code format service = = null ) { code format service = tool get service ( code format service class ) ; } if ( code format service = = null ) { return ; } panel = new listing panel ( code format service get format manager ( ) ) ; / / share the manager from the code viewer panel set text background color ( background color ) ; tool tip = new j tool tip ( ) ; }


create named { @ link bind markers } using identifiers to bind parameters named bind markers support { @ link bind markers # next ( string ) name hints } if no { @ link bind markers # next ( string ) hint } is given , named bind markers can use a counter or a random value source to generate unique bind markers

static bind markers factory named ( string prefix , string name prefix , int max length , function < string , string > hint filter function ) { assert not null ( prefix , " prefix must not be null " ) ; assert not null ( name prefix , " index prefix must not be null " ) ; assert not null ( hint filter function , " hint filter function must not be null " ) ; return ( ) - > new named bind markers ( prefix , name prefix , max length , hint filter function ) ; }


check whether the specified interfaces is a published introduction interface

public boolean implements interface ( class < ? > ifc ) { for ( class < ? > pub ifc : this published interfaces ) { if ( ifc is interface ( ) & & ifc is assignable from ( pub ifc ) ) { return true ; } } return false ; }


turn an html href reference into an absolute path this will locate files based upon relative references , specialized help system references ( i e , helptopics ) , and absolute u r ls

public static path locate reference ( path source file , string ref ) throws u r i syntax exception { uri resolved = resolve ( source file , ref ) ; if ( is remote ( resolved ) ) { return null ; } / / non - remote / local path path ref path = create path from u r i ( source file , resolved ) ; return ref path ; }


generates new delegates for all ' patchable ' methods in the visited class delegates are static methods that do the same thing the visited code does , but from outside the class for instance methods , the instance is passed as the first argument note that : we ignore the class constructor as we don ' t support it right now we skip abstract methods for constructors split the method body into super arguments and the rest of the method body , see { @ link constructor builder }

public method visitor visit method ( int access , string name , string desc , string signature , string [ ] exceptions ) { if ( instant run disabled | | ! is access compatible with instant run ( access ) ) { / / nothing to generate return null ; } if ( name equals ( byte code utils class initializer ) ) { / / we skip the class init as it can reset static fields which we don ' t support right now return null ; } boolean is static = ( access & opcodes acc static ) ! = 0 ; string new desc = compute override method desc ( desc , is static ) ; if ( debug ) { system out println ( " > > > visiting method " + visited class name + " : " + name + " : " + desc ) ; if ( exceptions ! = null ) { for ( string exception : exceptions ) { system out println ( " > exception thrown : " + exception ) ; } } } if ( debug ) { system out println ( " new desc is " + new desc + " : " + is static ) ; } / / do not carry on any access flags from the original method for example synchronized / / on the original method would translate into a static synchronized method here access = opcodes acc public | opcodes acc static ; method node method = get method by name in class ( name , desc , class node ) ; if ( name equals ( byte code utils constructor ) ) { constructor constructor = constructor builder build ( visited class name , method ) ; method visitor mv = create method adapter ( access , constructor args name , constructor args desc , constructor args desc , constructor args signature , exceptions , is static , true / * is constructor * / ) ; constructor args accept ( mv ) ; mv = create method adapter ( access , constructor body name , constructor body desc , new desc , constructor body signature , exceptions , is static , true / * is constructor * / ) ; constructor body accept ( mv ) ; / / remember our created methods so we can generated the access $ dispatch for them added methods add ( constructor args ) ; added methods add ( constructor body ) ; return null ; } else { string new name = is static ? compute override method name ( name , desc ) : name ; return create method adapter ( access , new name , new desc , new desc , signature , exceptions , is static , false / * is constructor * / ) ; } }


whether the response received was a fallback as result of being rejected ( either via threadpool or semaphore )

public boolean is response rejected ( ) { return get command result ( ) is response rejected ( ) ; }


creates a new rest request the path is not decoded so this constructor will not throw a { @ link bad parameter exception }

public static rest request request without parameters ( named x content registry x content registry , http request http request , http channel http channel ) { map < string , string > params = collections empty map ( ) ; return new rest request ( x content registry , params , http request uri ( ) , http request get headers ( ) , http request , http channel , request id generator increment and get ( ) ) ; }


public boolean is empty ( ) { return this num records = = 0 ; }


returns a { @ link flink resource } instance if the instance could not be instantiated ( for example , because a mandatory parameter was missing ) , then an exception should be thrown

flink resource create ( flink resource setup setup ) throws exception ;


submit a task to the thread pool ; the task will be scheduled to run based on the given priority

public < t > future < t > submit ( callable < t > task , int priority ) { if ( task = = null ) { throw new null pointer exception ( ) ; } runnable future < t > ftask = new task for ( task , priority ) ; execute ( ftask ) ; return ftask ; }


creates list of users with given input array

public void create users with array input test ( ) throws api exception { / / list < user > user = null ; / / api create users with array input ( user ) ; / / todo : test validations }


parses python shell options and transfer to options which will be used in ` java ` to exec a flink job in local mini cluster

static list < string > parse local ( string [ ] args ) { string [ ] params = new string [ args length - 1 ] ; system arraycopy ( args , 1 , params , 0 , params length ) ; command line command line = parse ( local options , params ) ; if ( command line has option ( option help get opt ( ) ) ) { print local help ( ) ; system exit ( 0 ) ; } list < string > options = new array list < > ( ) ; options add ( " local " ) ; return options ; }


whether to fingerprint the artifacts after we archive them

@ data bound setter public void set fingerprint ( boolean fingerprint ) { this fingerprint = fingerprint ; }


resolves { @ code bind hosts } to a list of internet addresses the list will not contain duplicate addresses

public inet address [ ] resolve bind host addresses ( string bind hosts [ ] ) throws i o exception { if ( bind hosts = = null | | bind hosts length = = 0 ) { for ( custom name resolver custom name resolver : custom name resolvers ) { inet address addresses [ ] = custom name resolver resolve default ( ) ; if ( addresses ! = null ) { return addresses ; } } / / we know it ' s not here get the defaults bind hosts = new string [ ] { " local " } ; } inet address addresses [ ] = resolve inet addresses ( bind hosts ) ; / / try to deal with some ( mis ) configuration for ( inet address address : addresses ) { / / check if its multicast : flat out mistake if ( address is multicast address ( ) ) { throw new illegal argument exception ( " bind address : { " + network address format ( address ) + " } is invalid : multicast address " ) ; } / / check if its a wildcard address : this is only ok if its the only address ! if ( address is any local address ( ) & & addresses length > 1 ) { throw new illegal argument exception ( " bind address : { " + network address format ( address ) + " } is wildcard , but multiple addresses specified : this makes no sense " ) ; } } return addresses ; }


tries to resolve given name to { @ link table reference expression }

optional < table reference expression > lookup table ( string name ) ;


create a blob that will exist for multiple app sessions the file will be created on disk synchronously , but the data will copied asynchronously this is helpful when the copy is long - running , such as in the case of recording a voice note it is the caller ' s responsibility to eventually call { @ link blob provider # delete ( context , uri ) } when the blob is no longer in use

public uri create for multiple sessions on disk async ( @ non null context context , @ nullable success listener success listener , @ nullable error listener error listener ) throws i o exception { return write blob spec to disk async ( context , build blob spec ( storage type multi session disk ) , success listener , error listener ) ; }


find a jar that contains a class of the same name , if any it will return a jar file , even if that is not the first thing on the class path that has a class with the same name

public static string find containing jar ( class my class ) { return class util find containing jar ( my class ) ; }


performs the location of files of type file type extension passed in , whether recursively or not , and stores these files in the curr files from search list parameter

private static final void locate files from dir root ( file [ ] curr dir array , list < string > curr file type ext list , list < file > curr files from search list , boolean recursive search ) { list < file > curr dir root list = new array list < file > ( ) ; curr dir root list add all ( arrays as list ( curr dir array ) ) ; / / no sanity checks needed as this is a private member and used internally for ( file curr file : curr dir root list ) { if ( curr file is directory ( ) ) { if ( recursive search ) { / / recursion ! ! ! file [ ] curr file dir array = curr file list files ( ) ; locate files from dir root ( curr file dir array , curr file type ext list , curr files from search list , recursive search ) ; } } else { for ( string curr file type ext : curr file type ext list ) { if ( curr file get name ( ) ends with ( curr file type ext ) ) { curr files from search list add ( curr file ) ; } } } } }


return true if the field includes the { @ code volatile } modifier

public boolean is volatile ( ) { return field is volatile ( ) ; }


returns the mock that was used for this stub it allows to create a stub in one line of code this can be helpful to keep test code clean for example , some boring stub can be created & stubbed at field initialization in a test : < pre class = " code " > < code class = " java " > public class car test { car boring stubbed car = when ( mock ( car class ) shift gear ( ) ) then throw ( engine not started class ) get mock ( ) ; & # 064 ; test public void should { } < code >


public void test duplicate local flags ( ) throws exception { scratch file ( " foo / build " , " genrule ( name = ' g ' , " + " srcs = [ ] , " + " outs = [ ' grj ' ] , " + " cmd = ' echo g ' , " + " local = 1 , " + " tags = [ ' local ' ] ) " ) ; get configured target ( " / / foo : g " ) ; assert no events ( ) ; }


create a { @ link repository } with a random name

private repository create repository ( ) { settings settings = settings builder ( ) put ( " location " , random alpha of length ( 10 ) ) build ( ) ; repository metadata repository metadata = new repository metadata ( random alpha of length ( 10 ) , fs repository type , settings ) ; final cluster service cluster service = blob store test util mock cluster service ( repository metadata ) ; final fs repository repository = new fs repository ( repository metadata , create environment ( ) , x content registry ( ) , cluster service , mock big arrays non recycling instance , new recovery settings ( settings empty , new cluster settings ( settings empty , cluster settings built in cluster settings ) ) ) { @ override protected void assert snapshot or generic thread ( ) { / / eliminate thread name check as we create repo manually } } ; cluster service add state applier ( event - > repository update state ( event state ( ) ) ) ; / / apply state once to initialize repo properly like repositories service would repository update state ( cluster service state ( ) ) ; repository start ( ) ; return repository ; }


clear configurable fields , like ( absolute ) capacity ( absolute ) maximum - capacity , this will be used by queue reinitialize , when we reinitialize a queue , we will first clear all configurable fields , and load new values

public void clear configurable fields ( ) { write lock lock ( ) ; try { for ( string label : capacities map key set ( ) ) { set ( label , capacity type cap , 0 ) ; set ( label , capacity type max cap , 0 ) ; set ( label , capacity type abs cap , 0 ) ; set ( label , capacity type abs max cap , 0 ) ; set ( label , capacity type weight , 0 ) ; } } finally { write lock unlock ( ) ; } }


copies the indentation of the previous line and add a star if the sql multi - line comment just started on this line add standard method tags and close the comment

private void comment indent after new line ( i document d , document command c ) { if ( c offset = = - 1 | | d get length ( ) = = 0 ) { return ; } try { / / find start of line int p = ( c offset = = d get length ( ) ? c offset - 1 : c offset ) ; i region info = d get line information of offset ( p ) ; int start = info get offset ( ) ; / / find white spaces int end = find end of white space ( d , start , c offset ) ; string builder buf = new string builder ( c text ) ; if ( end > = start ) { string indentation = comment extract line prefix ( d , d get line of offset ( c offset ) ) ; buf append ( indentation ) ; if ( end < c offset ) { / / if it is the single line comment ' / / ' , don ' t append ' * ' if ( d get char ( end ) = = ' / ' & & d get char ( end + 1 ) ! = ' / ' ) { / / sql multi - line comment started on this line buf append ( " * " ) ; / / $ non - nls - 1 $ if ( d b workbench get platform ( ) get preference store ( ) get boolean ( s q l preference constants sqleditor close comments ) & & is new comment ( d , c offset , partitioning ) & & ! has close comment slash ( d , c , end ) ) { / / already has comment close block string line delimiter = get line delimiter ( d ) ; string end tag = line delimiter + indentation + " * / " ; / / $ non - nls - 1 $ d replace ( c offset , 0 , end tag ) ; / / $ non - nls - 1 $ } } } } c text = buf to string ( ) ; } catch ( bad location exception excp ) { / / stop work } }


encodes the byte array into a newly created hex char array , without allocating any other temporary variables

public static char [ ] to hex char array ( byte [ ] bytes ) { objects require non null ( bytes ) ; final char [ ] result = new char [ 2 * bytes length ] ; for ( int i = 0 ; i < bytes length ; i + + ) { byte b = bytes [ i ] ; result [ 2 * i ] = hex digits [ b > > 4 & 0xf ] ; result [ 2 * i + 1 ] = hex digits [ b & 0xf ] ; } return result ; }


public static bitmap scale ( final bitmap src , final int new width , final int new height ) { return scale ( src , new width , new height , false ) ; }


public string get name ( ) { return name ; }


get the configured inbound message buffer size in bytes

public int get inbound message size limit ( ) { return this inbound message size limit ; }


get a thread - local typed bytes writable input for the supplied { @ link typed bytes input }

public static typed bytes writable input get ( typed bytes input in ) { typed bytes writable input bin = tb in get ( ) ; bin set typed bytes input ( in ) ; return bin ; }


read an ecma array from an amf encoded buffer

private static hash map < string , object > read amf ecma array ( parsable byte array data ) { int count = data read unsigned int to int ( ) ; hash map < string , object > array = new hash map < > ( count ) ; for ( int i = 0 ; i < count ; i + + ) { string key = read amf string ( data ) ; int type = read amf type ( data ) ; object value = read amf data ( data , type ) ; if ( value ! = null ) { array put ( key , value ) ; } } return array ; }


adds the given { @ code entry } to the map , making it immutable if necessary duplicate keys are not allowed , and will cause { @ link # build } to fail

public builder < k , v > put ( entry < ? extends k , ? extends v > entry ) { return put ( entry get key ( ) , entry get value ( ) ) ; }


serializes the template to x content , making sure not to nest mappings under the type name note that this method should currently only be used for creating rest responses , and not when directly updating stored templates index templates are still stored in the old , typed format , and have yet to be migrated to be typeless

public static void to x content ( index template metadata index template metadata , x content builder builder , to x content params params ) throws i o exception { builder start object ( index template metadata name ( ) ) ; to inner x content ( index template metadata , builder , params , false ) ; builder end object ( ) ; }


private void create text panel ( ) { grid layout grid layout = new grid layout ( ) ; grid layout num columns = 2 ; text composite = new composite ( dialog shell , swt none ) ; text composite set layout ( grid layout ) ; create radix panel ( ) ; text = new text ( text composite , swt border | swt single ) ; text set text limit ( 30 ) ; int columns = 35 ; gc gc = new gc ( text ) ; font metrics fm = gc get font metrics ( ) ; int width = columns * fm get average char width ( ) ; gc dispose ( ) ; text set layout data ( new grid data ( width , swt default ) ) ; text add modify listener ( new modify listener ( ) { @ override public void modify text ( modify event e ) { string new text = text get text ( ) ; int radix = 10 ; matcher number matcher ; if ( hex radio button get selection ( ) ) { number matcher = pattern hex digits matcher ( new text ) ; radix = 16 ; } else { number matcher = pattern dec digits matcher ( new text ) ; } temp result = - 1 ; if ( number matcher matches ( ) ) temp result = long parse long ( new text , radix ) ; if ( temp result > = 0l & & temp result < = limit ) { show button set enabled ( true ) ; goto button set enabled ( true ) ; label 2 set text ( " " ) ; / / $ non - nls - 1 $ } else { show button set enabled ( false ) ; goto button set enabled ( false ) ; if ( " " equals ( new text ) ) / / $ non - nls - 1 $ label 2 set text ( " " ) ; / / $ non - nls - 1 $ else if ( temp result < 0 ) label 2 set text ( binary editor messages dialog go to label not number ) ; else label 2 set text ( binary editor messages dialog go to label out of range ) ; } } } ) ; form data form data = new form data ( ) ; form data top = new form attachment ( label ) ; text composite set layout data ( form data ) ; }


resolve the given destination name to a destination , convert the payload object to serialized form , possibly using a { @ link org springframework messaging converter message converter } , wrap it as a message with the given headers and send it to the resolved destination

< t > void convert and send ( string destination name , t payload , @ nullable map < string , object > headers ) throws messaging exception ;


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


applies this function to the given argument and its index within a stream


returns a label in the same package as this label with the given target name

public label get local target label ( string target name ) throws label syntax exception { return create ( package identifier , target name ) ; }


gets the output quality of a video of the given {

public quality get target quality ( long duration , int input total bit rate ) { int max video bit rate = math min ( maximum target video bitrate , input total bit rate - audio bitrate ) ; int min video bit rate = math min ( minimum target video bitrate , max video bit rate ) ; int target video bit rate = math max ( min video bit rate , math min ( get target video bit rate ( upper file size limit with margin , duration ) , max video bit rate ) ) ; int bit rate range = max video bit rate - min video bit rate ; double quality = bit rate range = = 0 ? 1 : ( target video bit rate - min video bit rate ) / ( double ) bit rate range ; return new quality ( target video bit rate , audio bitrate , quality , duration ) ; }


one or more endpoints associated with the service < code > repeated istio networking v 1alpha 3 service entry endpoint endpoints = 6 ; < code >

public java util list < ? extends com alibaba nacos istio model naming service entry endpoint or builder > get endpoints or builder list ( ) { return endpoints ; }


return whether the rom is made by smartisan

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


set the charset used to read script and template files ( { @ code utf - 8 } by default )

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


this tests cases when line ends with \ r \ n and \ n is used as delimiter , the last \ r should be removed

public void test removing trailing c r ( ) throws i o exception { test removing trailing c r ( " \ n " , " \ n " ) ; test removing trailing c r ( " \ r \ n " , " \ n " ) ; test removing trailing c r ( " | " , " | " ) ; test removing trailing c r ( " | " , " \ n " ) ; }


this implementation throws a file not found exception , assuming that the resource cannot be resolved to a url

public url get u r l ( ) throws i o exception { throw new file not found exception ( get description ( ) + " cannot be resolved to url " ) ; }


finagle labels two sides of the same socket " ca " , v 1 binary annotation type boolean , " sa " with the local endpoint name

public void special cases finagle local socket labeling client ( ) { dependency link v 2 span iterator iterator = iterator ( new record ( ) values ( trace id high , trace id , parent id , span id , " cs " , - 1 , " service " ) , new record ( ) values ( trace id high , trace id , parent id , span id , " ca " , type boolean , " service " ) , new record ( ) values ( trace id high , trace id , parent id , span id , " sa " , type boolean , " service " ) ) ; span span = iterator next ( ) ; / / when there ' s no " sr " annotation , we assume it is a client assert that ( span kind ( ) ) is equal to ( span kind client ) ; assert that ( span local endpoint ( ) ) is null ( ) ; assert that ( span remote service name ( ) ) is equal to ( " service " ) ; }


executes all stored actions and updates plus the actual { @ code testable }

public void run ( ) throws exception { setup execute all ( ) ; decorated run ( ) ; }


if this is a checked - out copy , replace the buffer file content with that provided by the specified src file this database must be a checkout copy if a cumulative change files exists , it will be deleted following the update

public void update checkout copy ( managed buffer file src file , int old version , task monitor monitor ) throws cancelled exception , i o exception { if ( ! is check out copy ) { throw new i o exception ( " database is not a checkout copy " ) ; } synchronized ( sync object ) { if ( src file ! = null ) { boolean success = false ; / / todo : watch - out for multiple updatable buffer file instances local managed buffer file local bf = new local managed buffer file ( bf mgr , true , - 1 , - 1 ) ; try { local bf update from ( src file , old version , monitor ) ; / / performs a save local bf close ( ) ; success = true ; } finally { if ( ! success ) { local bf delete ( ) ; } } } ( new file ( db dir , cumulative change filename ) ) delete ( ) ; ( new file ( db dir , cumulative modmap filename ) ) delete ( ) ; } }


public void get pet by id test ( ) { long pet id = null ; / / pet response = api get pet by id ( pet id ) ; / / assert not null ( response ) ; / / todo : test validations }


public static collection < object [ ] > data ( ) { return arrays as list ( new object [ ] [ ] { { false } , { true } } ) ; }


check that when verifying the file permissions of file environment variables , symlinks are followed

public void test 0 8 1 symlinks are followed with environment variable files ( ) throws exception { / / test relies on configuring security assume true ( distribution is default ( ) ) ; / / test relies on symlinks assume false ( platforms windows ) ; final string xpack password = " hunter 2 " ; final string password filename = " password txt " ; final string symlink filename = " password symlink " ; / / elastic password file files write string ( temp dir resolve ( password filename ) , xpack password + " \ n " ) ; / / link to the password file we can ' t use an absolute path for the target , because / / it won ' t resolve inside the container files create symbolic link ( temp dir resolve ( symlink filename ) , path of ( password filename ) ) ; map < string , string > env vars = map of ( " elastic password file " , " / run / secrets / " + symlink filename , / / enable security so that we can test that the password has been used " xpack security enabled " , " true " ) ; / / file permissions need to be secured in order for the es wrapper to accept / / them for populating env var values the wrapper will resolve the symlink / / and check the target ' s permissions files set posix file permissions ( temp dir resolve ( password filename ) , p 6 0 0 ) ; final map < path , path > volumes = map of ( temp dir , path of ( " / run / secrets " ) ) ; / / restart the container - this will check that elasticsearch started correctly , / / and didn ' t fail to follow the symlink and check the file permissions run container ( distribution ( ) , builder ( ) volumes ( volumes ) env vars ( env vars ) ) ; }


register a listener that will be called when this model is bound to 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 model with super attributes on bind ( on model bound listener < model with super attributes , object > listener ) { on mutation ( ) ; this on model bound listener epoxy generated model = listener ; return this ; }


creates a new late bound default which always returns the given value this is used primarily for matching names with late - bound attributes on other rules and for testing use normal default values if the name does not matter

public static label late bound default < void > from constant for testing ( label default value ) { return new label late bound default < void > ( false , void class , preconditions check not null ( default value ) , ( rule , attributes , unused ) - > default value ) { } ; }


public destination order get destination order ( ) { return this dest order ; }


public boolean is restful index ( ) { return " get " equals ignore case ( http method ) & & " " equals ( path without base name ( ) ) ; }


creates an event poller for this ring buffer gated on the supplied sequences

public event poller < e > new poller ( sequence gating sequences ) { return sequencer new poller ( this , gating sequences ) ; }


this implementation throws an unsupported operation exception

public void add transformer ( class transformer class transformer ) { throw new unsupported operation exception ( " add transformer not supported " ) ; }


public string get capital camel ( ) { return capital camel ; }


total number of successfully processed documents

default long get successfully processed ( ) { return get updated ( ) + get created ( ) + get deleted ( ) ; }


public sub cluster id get home subcluster ( application submission context app submission context , list < sub cluster id > black list sub clusters ) throws yarn exception { / / run standard validation , as error might differ validate ( app submission context ) ; throw new federation policy exception ( " the policy configured for this queue " + " ( " + app submission context get queue ( ) + " ) reject all routing " + " requests by construction application " + app submission context get application id ( ) + " cannot be routed to any rm " ) ; }


updates the queue of the media session by calling { @ link queue navigator # on timeline changed ( player ) } apps normally only need to call this method when the backing data for a given queue item has changed and the queue should be updated immediately

public final void invalidate media session queue ( ) { if ( queue navigator ! = null & & player ! = null ) { queue navigator on timeline changed ( player ) ; } }


set whether a debug overlay that displays image information , like dimensions and size should be drawn on top of a drawee view

public builder set draw debug overlay ( boolean draw debug overlay ) { return set debug overlay enabled supplier ( suppliers of ( draw debug overlay ) ) ; }


the name of the resource ( in the form package : typename ) < code > optional string resource name = 1 ; < code >

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


public send result send ( message msg , message queue mq ) throws m q client exception , remoting exception , m q broker exception , interrupted exception { return send ( msg , mq , this default m q producer get send msg timeout ( ) ) ; }


{ @ inherit doc } increment the counter { @ code stream read unbuffered } and then merge the current set of statistics into the file system ' s statistics through { @ link # merge ( boolean ) }

public void unbuffered ( ) { increment ( stream read unbuffered ) ; merge ( false ) ; }


signals that transformation has finished { @ link # process ( ) } method will not be called again

public static < t > transformation state < t > finished ( ) { return ( transformation state < t > ) finished state ; }


public static void init request from entity ( http request base request base , map < string , string > body , string charset ) throws exception { if ( body = = null | | body is empty ( ) ) { return ; } list < name value pair > params = new array list < name value pair > ( body size ( ) ) ; for ( map entry < string , string > entry : body entry set ( ) ) { params add ( new basic name value pair ( entry get key ( ) , entry get value ( ) ) ) ; } if ( request base instanceof http entity enclosing request ) { http entity enclosing request request = ( http entity enclosing request ) request base ; http entity entity = new url encoded form entity ( params , charset ) ; request set entity ( entity ) ; } }


retrieves return a list of { @ link index template config } that represents the composable templates that should be installed and managed

protected list < index template config > get composable template configs ( ) { return collections empty list ( ) ; }


tries to read as many bytes as possible into supplied buffer , checksumming each chunk if needed < b > preconditions : < b > if checksumming is enabled , buf remaining must be a multiple of bytes per checksum note that this is not a requirement for clients of read ( byte buffer ) - in the case of non - checksum - sized read requests , read ( byte buffer ) will substitute a suitably sized buffer to pass to this method < b > postconditions : < b > buf limit and buf mark are unchanged buf position + = min ( offset from chunk boundary , total bytes read ) - so the requested bytes can be read straight from the buffer

private synchronized int do byte buffer read ( byte buffer buf ) throws i o exception { if ( verify checksum ) { assert buf remaining ( ) % bytes per checksum = = 0 ; } int data read ; int oldpos = buf position ( ) ; / / read as much as we can into the buffer data read = fill buffer ( data in , buf ) ; if ( data read = = - 1 ) { return - 1 ; } if ( verify checksum ) { byte buffer to checksum = buf duplicate ( ) ; to checksum position ( oldpos ) ; to checksum limit ( oldpos + data read ) ; checksum buff clear ( ) ; / / equivalent to / / ( int ) math ceil ( to checksum remaining ( ) * 1 0 / bytes per checksum ) ; int num chunks = ( to checksum remaining ( ) + bytes per checksum - 1 ) / bytes per checksum ; checksum buff limit ( checksum size * num chunks ) ; fill buffer ( checksum in , checksum buff ) ; checksum buff flip ( ) ; checksum verify chunked sums ( to checksum , checksum buff , filename , this start offset ) ; } if ( data read > = 0 ) { buf position ( oldpos + math min ( offset from chunk boundary , data read ) ) ; } if ( data read < offset from chunk boundary ) { / / yikes , didn ' t even get enough bytes to honour offset this can happen / / even if we are verifying checksums if we are at eof offset from chunk boundary - = data read ; data read = 0 ; } else { data read - = offset from chunk boundary ; offset from chunk boundary = 0 ; } return data read ; }


painless { @ link class } s and names of the arguments to the { @ code execute } method the names are exposed to the painless script

public list < method argument > get execute arguments ( ) { return execute arguments ; }


determines if found ascii strings are valid strings , and creates them if so

private void find strings ( final program program , address set view address set , int minimum string length , int align val , boolean require null termination , boolean include all char widths , task monitor monitor ) { found string callback found string callback = found string - > create string if valid ( found string , program , address set , monitor ) ; string searcher searcher = new string searcher ( program , minimum string length , align val , include all char widths , require null termination ) ; searcher search ( address set , found string callback , true , monitor ) ; }


returns the greatest value present in { @ code array }

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


gets the address range as indicated by index the index is zero based address ranges are in order from the minimum address to the maximum address range

public address range get range ( int index ) { return ranges [ index ] ; }


escape characters that are special to graphviz

private static string escape special characters ( string label ) { return label replace ( " < " , " \ \ < " ) replace ( " > " , " \ \ > " ) replace ( " \ " " , " \ \ \ " " ) ; }


this method use java reflect api to get field value dynamically most importantly , it could access fields with private modifier to break encapsulation

static object get field ( object object , string field name , class < ? > object class ) throws illegal argument exception , illegal access exception { if ( object class = = lite pal support class | | object class = = object class ) { throw new lite pal support exception ( lite pal support exception no such field exceptioin ( object class get simple name ( ) , field name ) ) ; } try { field object field = object class get declared field ( field name ) ; object field set accessible ( true ) ; return object field get ( object ) ; } catch ( no such field exception e ) { return get field ( object , field name , object class get superclass ( ) ) ; } }


forces a refilter , even though filtering operations may be disabled

public void force refilter ( ) { one to many table model re filter ( ) ; }


create a task attempt for a job by creating a stub task id

public task attempt context create task attempt for job ( ) { return abstract commit i test task attempt for job ( m r builder utils new job id ( 1 , job id get id ( ) , 1 ) , job ) ; }


this is an interface method to handle the move tasks block moving info must contain the required info to move the block , that source location , destination location and storage types

void submit move task ( block moving info blk moving info ) throws i o exception ;


get the appropriate string to use as the label prefix for an array , taking into account the actual data at the memory location see also { @ link # get default label prefix ( ) }

default public string get array default label prefix ( mem buffer buf , settings settings , int len , data type display options options ) { array stringable stringable element type = array stringable get array stringable ( get data type ( ) ) ; string prefix = ( stringable element type ! = null ) ? stringable element type get array default label prefix ( buf , settings , len , options ) : null ; return ( prefix ! = null ) ? prefix : get default label prefix ( ) ; }


verify if the health value is set properly though the constructor and setter

public void test set health ( ) { final var model = new giant model ( health healthy , fatigue alert , nourishment saturated ) ; assert equals ( health healthy , model get health ( ) ) ; var message format = " the giant looks % s , alert and saturated " ; for ( final var health : health values ( ) ) { model set health ( health ) ; assert equals ( health , model get health ( ) ) ; assert equals ( string format ( message format , health ) , model to string ( ) ) ; } }


remove the specified animation , by marking the affected nodes as not animated when switching animation , this should be call prior to apply animation ( s )

protected void remove animation ( final animation animation ) { for ( final node animation node anim : animation node animations ) { node anim node is animated = false ; } }


public void test complex quadrilateral ( ) { / / todo : test complex quadrilateral }


set whether to prefer file system access for template loading file system access enables hot detection of template changes if this is enabled , free marker configuration factory will try to resolve the specified " template loader path " as file system resource ( which will work for expanded class path resources and servlet context resources too ) default is " true " turn this off to always load via spring template loader ( i e as stream , without hot detection of template changes ) , which might be necessary if some of your templates reside in an expanded classes directory while others reside in jar files

public void set prefer file system access ( boolean prefer file system access ) { this prefer file system access = prefer file system access ; }


called when the surface changed size called after the surface is created and whenever the open g l es surface size changes typically you will set your viewport here if your camera is fixed then you could also set your projection matrix here : < pre class = " prettyprint " > void on surface changed ( gl10 gl , int width , int height ) { gl gl viewport ( 0 , 0 , width , height ) ; for a fixed camera , set the projection too float ratio = ( float ) width height ; gl gl matrix mode ( gl10 gl projection ) ; gl gl load identity ( ) ; gl gl frustumf ( - ratio , ratio , - 1 , 1 , 1 , 10 ) ; }

void on surface changed ( gl10 gl , int width , int height ) ;


load the fingerprint stored inside the given file

public static @ check for null fingerprint load ( @ non null file file ) throws i o exception { xml file config file = get config file ( file ) ; if ( ! config file exists ( ) ) { return null ; } try { object loaded = config file read ( ) ; if ( ! ( loaded instanceof fingerprint ) ) { throw new i o exception ( " unexpected fingerprint type expected " + fingerprint class + " or subclass but got " + ( loaded ! = null ? loaded get class ( ) : " null " ) ) ; } fingerprint f = ( fingerprint ) loaded ; return f ; } catch ( i o exception e ) { if ( file exists ( ) & & file length ( ) = = 0 ) { / / despite the use of atomic file , there are reports indicating that people often see / / empty xml file , presumably either due to file system corruption ( perhaps by sudden / / power loss , etc ) or abnormal program termination / / generally we don ' t want to wipe out user data just because we can ' t load it , / / but if the file size is 0 , which is what ' s reported in jenkins - 2012 , then it seems / / like recovering it silently by deleting the file is not a bad idea logger log ( level warning , " size zero fingerprint disk corruption ? { 0 } " , config file ) ; file delete ( ) ; return null ; } string parse error = message of parse exception ( e ) ; if ( parse error ! = null ) { logger log ( level warning , " malformed xml in { 0 } : { 1 } " , new object [ ] { config file , parse error } ) ; file delete ( ) ; return null ; } logger log ( level warning , " failed to load " + config file , e ) ; throw e ; } }


releases a task executor with the given { @ link resource i d } from the { @ link slot pool }

boolean release task manager ( final resource i d resource id , final exception cause ) ;


test convert non - nullable data type to avro schema then converts back

public void test data type to schema to data type non nullable ( ) { data type data type = data types row ( data types field ( " f boolean " , data types boolean ( ) not null ( ) ) , / / tinyint and smallint all convert to int data types field ( " f int " , data types int ( ) not null ( ) ) , data types field ( " f bigint " , data types bigint ( ) not null ( ) ) , data types field ( " f float " , data types float ( ) not null ( ) ) , data types field ( " f double " , data types double ( ) not null ( ) ) , / / char converts to string data types field ( " f string " , data types string ( ) not null ( ) ) , / / binary converts to bytes data types field ( " f varbinary " , data types bytes ( ) not null ( ) ) , data types field ( " f timestamp " , data types timestamp ( 3 ) not null ( ) ) , data types field ( " f date " , data types date ( ) not null ( ) ) , data types field ( " f time " , data types time ( 3 ) not null ( ) ) , data types field ( " f decimal " , data types decimal ( 10 , 0 ) not null ( ) ) , data types field ( " f row " , data types row ( data types field ( " f 0 " , data types int ( ) not null ( ) ) , data types field ( " f 1 " , data types timestamp ( 3 ) not null ( ) ) ) not null ( ) ) , / / multiset converts to map / / map key is always not null data types field ( " f map " , data types map ( data types string ( ) not null ( ) , data types int ( ) not null ( ) ) not null ( ) ) , data types field ( " f array " , data types array ( data types int ( ) not null ( ) ) not null ( ) ) ) not null ( ) ; schema schema = avro schema converter convert to schema ( data type get logical type ( ) ) ; data type converted = avro schema converter convert to data type ( schema to string ( ) ) ; assert equals ( data type , converted ) ; }


terminate the line in the way appropriate for the operating system

private void crlf ( ) throws i o exception { terminal write string ( system line separator ( ) ) ; }


gets the a register number , as a nibble this will throw if the value is out of the range of an unsigned nibble

public final short get a nibble ( ) { int a = get a ( ) ; if ( ( a & ~ 0xf ) ! = 0 ) { throw new dex exception 2 ( " register a out of range : " + hex u 8 ( a ) ) ; } return ( short ) a ; }


sets a header with the specified name and values if there is an existing header with the same name , it is removed this get method can be represented approximately as the following code : headers remove ( name ) ; for ( object v : values ) { if ( v = = null ) { break ; } headers add ( name , v ) ; }

public http headers set ( char sequence name , iterable < ? > values ) { return set ( name to string ( ) , values ) ; }


returns true if the task supports cancellation

public boolean is cancellable ( ) { return cancellable ; }


resets relative position state when the base field is moved

private void reset ( ) { x = get start ( ) ; y = base row * row height ; width left field = - 1 ; width right field = - 1 ; if ( base col > 0 ) { width left field = model get factorys ( base row ) [ base col - 1 ] get width ( ) ; } if ( base col < model get factorys ( base row ) length - 1 ) { width right field = model get factorys ( base row ) [ base col + 1 ] get width ( ) ; } }


converts the open a p i schema name to a model name suitable for the current code generator may be overriden for each programming language in case the name belongs to the type system it won ' t be renamed

public string to model name ( final string name ) { return camelize ( model name prefix + " " + name + " " + model name suffix ) ; }


updates the given measure spec with respect to the aspect ratio note : measure spec is not changed if the aspect ratio is not greater than zero or if layout params is null measure spec of the layout dimension ( width or height ) specified as " 0dp " is updated to match the measure spec of the other dimension adjusted by the aspect ratio exactly one layout dimension should be specified as " 0dp " padding is taken into account so that the aspect ratio refers to the content without padding : { @ code aspect ratio = = ( view width - width padding ) ( view height - height padding ) } updated measure spec respects the parent ' s constraints i e measure spec is not changed if the parent has specified mode { @ code exactly } , and it doesn ' t exceed measure size if parent has specified mode { @ code at most }

public static void update measure spec ( spec spec , float aspect ratio , @ nullable view group layout params layout params , int width padding , int height padding ) { if ( aspect ratio < = 0 | | layout params = = null ) { return ; } if ( should adjust ( layout params height ) ) { int width spec size = view measure spec get size ( spec width ) ; int desired height = ( int ) ( ( width spec size - width padding ) / aspect ratio + height padding ) ; int resolved height = view resolve size ( desired height , spec height ) ; spec height = view measure spec make measure spec ( resolved height , view measure spec exactly ) ; } else if ( should adjust ( layout params width ) ) { int height spec size = view measure spec get size ( spec height ) ; int desired width = ( int ) ( ( height spec size - height padding ) * aspect ratio + width padding ) ; int resolved width = view resolve size ( desired width , spec width ) ; spec width = view measure spec make measure spec ( resolved width , view measure spec exactly ) ; } }


reverses a branch which is buried a given number of instructions backward in the output it is illegal to call this unless the indicated instruction really is a reversible branch

public void reverse branch ( int which , code address new target ) { finisher reverse branch ( which , new target ) ; }


returns this module ' s additional predeclared bindings ( excludes { @ link starlark # universe } ) the map reflects any semantics - based filtering of flag guarded values done by { @ link # with predeclared } : enabled flag guarded values are replaced by their underlying value

public immutable map < string , object > get predeclared bindings ( ) { return predeclared ; }


void close tool ( plugin tool tool ) { / / find the workspace running the tool for ( int i = 0 ; i < workspaces size ( ) ; i + + ) { workspace impl ws = ( workspace impl ) workspaces get ( i ) ; plugin tool [ ] tools = ws get tools ( ) ; for ( plugin tool tool 2 : tools ) { if ( tool = = tool 2 ) { ws close running tool ( tool ) ; return ; } } } }