a version of { @ link # external ( context , string ) } that should be used when you know the identifier is a group id important : this will throw an exception if the group id you ' re using could have been migrated if you ' re dealing with inbound data , you should be using { @ link # external possibly migrated group ( context , group id ) } , or checking the database before calling this method

public static @ non null recipient external group exact ( @ non null context context , @ non null group id group id ) { return recipient resolved ( database factory get recipient database ( context ) get or insert from group id ( group id ) ) ; }


public active span set baggage item ( string key , string value ) { return this ; }


public void check block ( extended block b , long min length , replica state state ) throws replica not found exception , unexpected replica state exception , file not found exception , e o f exception , i o exception { final replica info replica info = volume map get ( b get block pool id ( ) , b get local block ( ) ) ; if ( replica info = = null ) { throw new replica not found exception ( b ) ; } if ( replica info get state ( ) ! = state ) { throw new unexpected replica state exception ( b , state ) ; } if ( ! replica info block data exists ( ) ) { throw new file not found exception ( replica info get block u r i ( ) to string ( ) ) ; } long on disk length = get length ( b ) ; if ( on disk length < min length ) { throw new e o f exception ( b + " ' s on - disk length " + on disk length + " is shorter than min length " + min length ) ; } }


test whether can local replica update with replica ( ) correct the wrongly recorded replica location

public void test local replica update with replica ( ) throws exception { string base dir = generic test utils get randomized temp path ( ) ; long blk id = get random block id ( ) ; file block dir = datanode util id to block dir ( new file ( base dir ) , blk id ) ; string subdir 2 = block dir get name ( ) ; string subdir 1 = new file ( block dir get parent ( ) ) get name ( ) ; string disk sub = subdir 2 equals ( " subdir 0 " ) ? " subdir 1 " : " subdir 0 " ; / / the block file on disk file disk block dir = new file ( base dir + sep + subdir 1 + sep + disk sub ) ; file real blk file = new file ( disk block dir , block file prefix + blk id ) ; / / the block file in mem file mem block dir = block dir ; local replica local replica = ( local replica ) new replica builder ( hdfs server constants replica state finalized ) set directory to use ( mem block dir ) set block id ( blk id ) build ( ) ; / / directory scanner find the inconsistent file and try to make it right storage location sl = storage location parse ( real blk file to string ( ) ) ; local replica update with replica ( sl ) ; assert equals ( real blk file , local replica get block file ( ) ) ; }


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

public int get pointer ( ) { return pointer ; }


verify that block token serial no is always within the range designated to to the name node

public void test block token ranges ( ) throws i o exception { final int interval = 1024 ; final int num n ns = integer max value / interval ; for ( int nn idx = 0 ; nn idx < 64 ; nn idx + + ) { block token secret manager sm = new block token secret manager ( block key update interval , block token lifetime , nn idx , num n ns , " fake - pool " , null , false ) ; int range start = nn idx * interval ; for ( int i = 0 ; i < interval * 3 ; i + + ) { int serial no = sm get serial no for testing ( ) ; assert true ( " serial no " + serial no + " is not in the designated range : [ " + range start + " , " + ( range start + interval ) + " ) " , serial no > = range start & & serial no < ( range start + interval ) ) ; sm update keys ( ) ; } } }


sets the max width and max height to the specified value if the max size is 0 , no maximum size is used

public cell < t > max size ( float size ) { max size ( fixed value of ( size ) ) ; return this ; }


encode the given uri user info with the given encoding

public static string encode user info ( string user info , string encoding ) { return encode ( user info , encoding , hierarchical uri components type user info ) ; }


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

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


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


set the query parameter name to use when { @ link # set favor parameter } is on the default parameter name is { @ code " format " }

public void set parameter name ( string parameter name ) { assert not null ( parameter name , " parameter name is required " ) ; this parameter name = parameter name ; }


gets the matching code unit from the other listing for the specified code unit from one of the two listings whose differences this class determines

public code unit get matching code unit ( code unit code unit , boolean is listing 1 ) { if ( correlation = = null ) { return null ; } address min address = code unit get min address ( ) ; program source program = correlation get first program ( ) ; program destination program = correlation get second program ( ) ; if ( is listing 1 ) { address destination = correlation get address in second ( min address ) ; if ( destination ! = null ) { return destination program get listing ( ) get code unit at ( destination ) ; } } else { address source = correlation get address in first ( min address ) ; if ( source ! = null ) { return source program get listing ( ) get code unit at ( source ) ; } } / / code unit not from our programs return null ; }


create random match info between given source and destination addresses and in a given session

public static v t match info create random match ( address source address , address destination address , v t session session ) { v t match info info = new v t match info ( null ) ; info set source address ( source address ) ; info set destination address ( destination address ) ; info set destination length ( get random int ( ) ) ; info set source length ( get random int ( ) ) ; info set similarity score ( new v t score ( get random int ( ) ) ) ; info set confidence score ( new v t score ( get random int ( ) ) ) ; info set association type ( get random type ( ) ) ; / / if we have a session then randomly create a tag for this match if ( session ! = null ) { info set tag ( get random tag ( session ) ) ; } return info ; }


applies a touch up event to the stage and returns true if an actor in the scene { @ link event # handle ( ) handled } the event only { @ link input listener listeners } that returned true for touch down will receive this event

public boolean touch up ( int screen x , int screen y , int pointer , int button ) { pointer touched [ pointer ] = false ; pointer screen x [ pointer ] = screen x ; pointer screen y [ pointer ] = screen y ; if ( touch focuses size = = 0 ) return false ; screen to stage coordinates ( temp coords set ( screen x , screen y ) ) ; input event event = pools obtain ( input event class ) ; event set type ( type touch up ) ; event set stage ( this ) ; event set stage x ( temp coords x ) ; event set stage y ( temp coords y ) ; event set pointer ( pointer ) ; event set button ( button ) ; snapshot array < touch focus > touch focuses = this touch focuses ; touch focus [ ] focuses = touch focuses begin ( ) ; for ( int i = 0 , n = touch focuses size ; i < n ; i + + ) { touch focus focus = focuses [ i ] ; if ( focus pointer ! = pointer | | focus button ! = button ) continue ; if ( ! touch focuses remove value ( focus , true ) ) continue ; / / touch focus already gone event set target ( focus target ) ; event set listener actor ( focus listener actor ) ; if ( focus listener handle ( event ) ) event handle ( ) ; pools free ( focus ) ; } touch focuses end ( ) ; boolean handled = event is handled ( ) ; pools free ( event ) ; return handled ; }


returns a predicate that evaluates to { @ code true } if the { @ code char sequence } being tested contains any match for the given regular expression pattern the test used is equivalent to { @ code pattern compile ( pattern ) matcher ( arg ) find ( ) }

public static predicate < char sequence > contains pattern ( string pattern ) { return new contains pattern from string predicate ( pattern ) ; }


a unix command to get the current user ' s groups list

public static string [ ] get groups command ( ) { return ( windows ) ? new string [ ] { " cmd " , " / c " , " groups " } : new string [ ] { " groups " } ; }


return the phase in which this component will be started and stopped

public int get phase ( ) { return this phase ; }


updates computers this method tries to reuse existing { @ link computer } objects so that we won ' t upset { @ link executor } s running in it

protected void update computer list ( final boolean automatic slave launch ) { final map < node , computer > computers = get computer map ( ) ; final set < computer > old = new hash set < > ( computers size ( ) ) ; queue with lock ( new runnable ( ) { @ override public void run ( ) { map < string , computer > by name = new hash map < > ( ) ; for ( computer c : computers values ( ) ) { old add ( c ) ; node node = c get node ( ) ; if ( node = = null ) continue ; / / this computer is gone by name put ( node get node name ( ) , c ) ; } set < computer > used = new hash set < > ( old size ( ) ) ; update computer ( abstract c i base this , by name , used , automatic slave launch ) ; for ( node s : get nodes ( ) ) { long start = system current time millis ( ) ; update computer ( s , by name , used , automatic slave launch ) ; if ( log startup performance & & logger is loggable ( level fine ) ) { logger fine ( string format ( " took % dms to update node % s " , system current time millis ( ) - start , s get node name ( ) ) ) ; } } / / find out what computers are removed , and kill off all executors / / when all executors exit , it will be removed from the computers map / / so don ' t remove too quickly old remove all ( used ) ; / / we need to start the process of reducing the executors on all computers as distinct / / from the killing action which should not excessively use the queue lock for ( computer c : old ) { c inflict mortal wound ( ) ; } } } ) ; for ( computer c : old ) { / / when we get to here , the number of executors should be zero so this call should not need the queue lock kill computer ( c ) ; } get queue ( ) schedule maintenance ( ) ; for ( computer listener cl : computer listener all ( ) ) { try { cl on configuration change ( ) ; } catch ( throwable t ) { logger log ( level warning , null , t ) ; } } }


stop the profiler and wait for the log to be written

static void stop ( ) throws i o exception { if ( instance = = null ) { throw new illegal state exception ( " stop without start " ) ; } cpu profiler profiler = instance ; instance = null ; stop timer ( ) ; / / finish writing the file and fail if there were any i / o errors profiler pprof write end ( ) ; }


make the 0 21 counter group string format : { ( actual - name ) ( display - name ) ( value ) [ ] [ ] [ ] } where [ ] are compact strings for the counters within

public static < g extends counter group base < ? > > string to escaped compact string ( g group ) { list < string > escaped strs = lists new array list ( ) ; int length ; string escaped name , escaped disp name ; synchronized ( group ) { / / first up , obtain the strings that need escaping this will help us / / determine the buffer length apriori escaped name = escape ( group get name ( ) ) ; escaped disp name = escape ( group get display name ( ) ) ; int i = 0 ; length = escaped name length ( ) + escaped disp name length ( ) ; for ( counter counter : group ) { string escaped str = to escaped compact string ( counter ) ; escaped strs add ( escaped str ) ; length + = escaped str length ( ) ; } } length + = 6 ; / / for all the delimiting characters below string builder builder = new string builder ( length ) ; builder append ( group open ) ; / / group start / / add the group name builder append ( unit open ) ; builder append ( escaped name ) ; builder append ( unit close ) ; / / add the display name builder append ( unit open ) ; builder append ( escaped disp name ) ; builder append ( unit close ) ; / / write the value for ( string escaped : escaped strs ) { builder append ( escaped ) ; } builder append ( group close ) ; / / group end return builder to string ( ) ; }


returns { @ literal true } if this type of attribute is unknown this means that the attribute content can ' t be parsed to extract constant pool references , labels , etc instead , the attribute content is read as an opaque byte array , and written back as is this can lead to invalid attributes , if the content actually contains constant pool references , labels , or other symbolic references that need to be updated when there are changes to the constant pool , the method bytecode , etc the default implementation of this method always returns { @ literal true }

public boolean is unknown ( ) { return true ; }


public okhttp 3 call build call ( final api callback callback ) throws api exception { return test group parameters call ( required string group , required boolean group , required int 6 4 group , string group , boolean group , int 6 4 group , callback ) ; }


reads a typed bytes sequence the first byte is interpreted as a type code , and then the right number of subsequent bytes are read depending on the obtained type

public byte [ ] read raw ( ) throws i o exception { int code = - 1 ; try { code = in read unsigned byte ( ) ; } catch ( e o f exception eof ) { return null ; } if ( code = = type bytes code ) { return read raw bytes ( ) ; } else if ( code = = type byte code ) { return read raw byte ( ) ; } else if ( code = = type bool code ) { return read raw bool ( ) ; } else if ( code = = type int code ) { return read raw int ( ) ; } else if ( code = = type long code ) { return read raw long ( ) ; } else if ( code = = type float code ) { return read raw float ( ) ; } else if ( code = = type double code ) { return read raw double ( ) ; } else if ( code = = type string code ) { return read raw string ( ) ; } else if ( code = = type vector code ) { return read raw vector ( ) ; } else if ( code = = type list code ) { return read raw list ( ) ; } else if ( code = = type map code ) { return read raw map ( ) ; } else if ( code = = type marker code ) { return null ; } else if ( 50 < = code & & code < = 200 ) { / / application - specific typecodes return read raw bytes ( code ) ; } else { throw new runtime exception ( " unknown type " ) ; } }


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


returns true if this die has a dw at declaration attribute

public boolean is partial declaration ( ) { return has attribute ( d w a r f attribute dw at declaration ) ; }


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

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


checks whether the given time is the same or after the scheduled time of this schedule if so , the scheduled time is returned a new scheduled time is computed and set otherwise ( the given time is before the scheduled time ) , { @ code - 1 } is returned

public long check ( long time ) { if ( time < scheduled time ) { return - 1 ; } long prev scheduled time = scheduled time = = 0 ? time : scheduled time ; scheduled time = schedule next scheduled time after ( start time , time ) ; return prev scheduled time ; }


public boolean is read only ( ) throws s q l exception { if ( throw exception ) { throw new s q l exception ( ) ; } return false ; }


locates the first parameter file used by the action and returns its command line

protected final command line param file command line for action ( action action ) { if ( action instanceof spawn action ) { command lines command lines = ( ( spawn action ) action ) get command lines ( ) ; for ( command line and param file info pair : command lines get command lines ( ) ) { if ( pair param file info ! = null ) { return pair command line ; } } } parameter file write action parameter file write action = param file write action for action ( action ) ; return parameter file write action ! = null ? parameter file write action get command line ( ) : null ; }


public string dump ( string prefix , string separator , string suffix , boolean all ) { metric string builder metric builder = new metric string builder ( null , prefix , separator , suffix ) ; registry snapshot ( metric builder , all ) ; return metric builder to string ( ) ; }


reads the given file { @ code path } , assumed to have size { @ code file size } , and does a check on the number of bytes read use this method when you already know the size of the file the check is intended to catch issues where filesystems incorrectly truncate files

public static byte [ ] read with known file size ( path path , long file size ) throws i o exception { if ( file size > integer max value ) { throw new i o exception ( " cannot read file with size larger than 2gb " ) ; } int file size int = ( int ) file size ; byte [ ] bytes = read content with limit ( path , file size int ) ; if ( file size int > bytes length ) { throw new short read i o exception ( path , file size int , bytes length ) ; } return bytes ; }


map < string , stored script source > get stored scripts ( ) { return scripts ; }


public item type item type ( ) { return item type type debug info item ; }


returns additional listeners to the console output stream called at the beginning of each command ( after # before command )

public out err get output listener ( ) { return null ; }


handle deserialization of the ' null ' value

public gm fruit get null value ( deserialization context ctxt ) throws json mapping exception { throw new json mapping exception ( ctxt get parser ( ) , " gm fruit cannot be null " ) ; }


normalize the given windows path string this does the following : 1 adds " file : " scheme for absolute paths 2 ensures the scheme - specific part starts with ' ' per rfc2396 3 replaces backslash path separators with forward slashes

private static string normalize windows path ( string path string ) throws i o exception { if ( ! path windows ) { return path string ; } boolean slashed = ( ( path string length ( ) > = 1 ) & & ( path string char at ( 0 ) = = ' / ' ) ) ; / / is it a backslash - separated absolute path ? if ( windows non uri absolute path 1 matcher ( path string ) find ( ) ) { / / forward slashes disallowed in a backslash - separated path if ( path string index of ( ' / ' ) ! = - 1 ) { throw new i o exception ( " invalid path string " + path string ) ; } path string = path string replace ( ' \ \ ' , ' / ' ) ; return " file : " + ( slashed ? " " : " / " ) + path string ; } / / is it a forward slash - separated absolute path ? if ( windows non uri absolute path 2 matcher ( path string ) find ( ) ) { return " file : " + ( slashed ? " " : " / " ) + path string ; } / / is it a backslash - separated relative file path ( no scheme and / / no drive - letter specifier ) ? if ( ( path string index of ( ' : ' ) = = - 1 ) & & ( path string index of ( ' \ \ ' ) ! = - 1 ) ) { path string = path string replace ( ' \ \ ' , ' / ' ) ; } return path string ; }


boolean append record and insert ( binary row data record , int hash code ) throws i o exception { final int pos hash code = find bucket ( hash code ) ; / / get the bucket for the given hash code final int bucket array pos = pos hash code > > table buckets per segment bits ; final int bucket in segment pos = ( pos hash code & table buckets per segment mask ) < < bucket size bits ; final memory segment bucket = this buckets [ bucket array pos ] ; if ( ! table try distinct build row | | ! partition is in memory ( ) | | ! find first same build row ( bucket , hash code , bucket in segment pos , record ) ) { int pointer = partition insert into build buffer ( record ) ; if ( pointer ! = - 1 ) { / / record was inserted into an in - memory partition a pointer must be inserted into / / the buckets insert to bucket ( bucket , bucket in segment pos , hash code , pointer , true ) ; return true ; } else { return false ; } } else { / / distinct build rows in memory return true ; } }


check if this type is assignable from the given type

public boolean is assignable from ( type from ) { if ( from = = null ) { return false ; } if ( type equals ( from ) ) { return true ; } if ( type instanceof class < ? > ) { return raw type is assignable from ( $ gson $ types get raw type ( from ) ) ; } else if ( type instanceof parameterized type ) { return is assignable from ( from , ( parameterized type ) type , new hash map < string , type > ( ) ) ; } else if ( type instanceof generic array type ) { return raw type is assignable from ( $ gson $ types get raw type ( from ) ) & & is assignable from ( from , ( generic array type ) type ) ; } else { throw build unexpected type error ( type , class class , parameterized type class , generic array type class ) ; } }


construct a temporary ' impl ' { @ link function definition } data type using the information found in the specified { @ link d i e aggregate }

public function definition get function signature ( d i e aggregate diea ) { diea = get func d i e a ( diea ) ; if ( diea ! = null ) { d w a r f name info dni = prog get name ( diea ) ; return create function definition data type ( diea , dni ) ; } return null ; }


public arrow field reader [ ] get field readers ( ) { return field readers ; }


sets a post comment at the specified address

public final boolean set post comment ( address address , string comment ) { set comment cmd cmd = new set comment cmd ( address , code unit post comment , comment ) ; return cmd apply to ( current program ) ; }


determine if the specified annotation is either directly present or meta - present equivalent to calling { @ code get ( annotation type ) is present ( ) }

< a extends annotation > boolean is present ( class < a > annotation type ) ;


returns the directory where object files are created

public static path fragment get obj directory ( label rule label , boolean use pic , boolean sibling repository layout ) { if ( use pic ) { return analysis utils get unique directory ( rule label , pic objs , sibling repository layout ) ; } else { return analysis utils get unique directory ( rule label , objs , sibling repository layout ) ; } }


returns an ordered list based on modules name

public list < plugin info > get module infos ( ) { list < plugin info > modules = new array list < > ( this modules ) ; collections sort ( modules , comparator comparing ( plugin info : : get name ) ) ; return modules ; }


gets the query param , or returns default value

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


this test checks , that for an unregistered { @ link incremental remote keyed state handle } all state ( including shared ) is discarded

public void test unregistered discarding ( ) throws exception { incremental remote keyed state handle state handle = create ( new random ( 42 ) ) ; state handle discard state ( ) ; for ( stream state handle handle : state handle get private state ( ) values ( ) ) { verify ( handle ) discard state ( ) ; } for ( stream state handle handle : state handle get shared state ( ) values ( ) ) { verify ( handle ) discard state ( ) ; } verify ( state handle get meta state handle ( ) ) discard state ( ) ; }


set the path matcher implementation to use for this resource pattern resolver default is ant path matcher

public void set path matcher ( path matcher path matcher ) { assert not null ( path matcher , " path matcher must not be null " ) ; this path matcher = path matcher ; }


find the fields constant that matches field id , throwing an exception if it is not found

public static fields find by thrift id or throw ( int field id ) { fields fields = find by thrift id ( field id ) ; if ( fields = = null ) throw new illegal argument exception ( " field " + field id + " doesn ' t exist ! " ) ; return fields ; }


set those bits in the non flowing context register mask which should not flow with context

private void init context bit masks ( register context reg ) { byte [ ] sub mask = context reg get base mask ( ) ; if ( ! context reg follows flow ( ) ) { has non flowing context = true ; for ( int i = 0 ; i < non flowing context register mask length ; i + + ) { non flowing context register mask [ i ] | = sub mask [ i ] ; flowing context register mask [ i ] & = ~ sub mask [ i ] ; } } else { for ( int i = 0 ; i < flowing context register mask length ; i + + ) { flowing context register mask [ i ] | = sub mask [ i ] ; } if ( context reg has children ( ) ) { for ( register child reg : context reg get child registers ( ) ) { init context bit masks ( child reg ) ; } } } }


reads the next four bytes as a signed value

public int read int ( ) { return ( data [ position + + ] & 0x f f ) < < 24 | ( data [ position + + ] & 0x f f ) < < 16 | ( data [ position + + ] & 0x f f ) < < 8 | ( data [ position + + ] & 0x f f ) ; }


notification that a field edit has ended

public void end field editing ( ) { if ( ! is editing field ( ) ) { return ; } for ( composite editor model listener listener : listeners ) { listener end field editing ( ) ; } }


private boolean save changes ( @ nullable final d b r progress monitor monitor , @ not null result set save settings settings , @ nullable final result set persister data update listener listener ) { u i utils sync exec ( ( ) - > get active presentation ( ) apply changes ( ) ) ; try { final result set persister persister = create data persister ( false ) ; final result set persister data update listener apply listener = success - > { if ( listener ! = null ) { listener on update ( success ) ; } if ( success & & get preference store ( ) get boolean ( result set preferences rs edit refresh after update ) ) { / / refresh updated rows try { persister refresh inserted rows ( ) ; } catch ( throwable e ) { log error ( " error refreshing rows after update " , e ) ; } } } ; return persister apply changes ( monitor , false , settings , apply listener ) ; } catch ( d b exception e ) { d b workbench get platform u i ( ) show error ( " apply changes error " , " error saving changes in database " , e ) ; return false ; } }


public long get virtual memory size ( ) { return get conf ( ) get long ( maxvmem testing property , - 1 ) ; }


get the value of the ' { @ code onkeydown } ' attribute may be a runtime expression

protected string get onkeydown ( ) { return this onkeydown ; }


called on the generated model immediately after the main model on bind method has been called this let ' s the generated model handle binding of its own and dispatch calls to its on bind listener we don ' t want to rely on the main on bind method to dispatch the on bind listener call because there are two on bind methods ( one for payloads and one for no payloads ) , and one can call into the other we don ' t want to dispatch two on bind listener calls in that case

void handle post bind ( t object to bind , int position ) ;


returns whether the timeline service v 2 is enabled via configuration

public static boolean timeline service v 2 enabled ( configuration conf ) { boolean enabled = false ; if ( timeline service enabled ( conf ) ) { collection < float > versions = get timeline service versions ( conf ) ; for ( float version : versions ) { if ( version int value ( ) = = 2 ) { enabled = true ; break ; } } } return enabled ; }


returns the { @ link weight } for this filter aggregation , creating it if necessary this is done lazily so that the { @ link weight } is only created if the aggregation collects documents reducing the overhead of the aggregation in the case where no documents are collected note that as aggregations are initialsed and executed in a serial manner , no concurrency considerations are necessary here

public weight get weight ( ) { if ( weight = = null ) { index searcher context searcher = context searcher ( ) ; try { weight = context searcher create weight ( context searcher rewrite ( filter ) , score mode complete no scores , 1f ) ; } catch ( i o exception e ) { throw new aggregation initialization exception ( " failed to initialse filter " , e ) ; } } return weight ; }


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

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


sets whether or not existing defined data should invalidate the creation of new data

public void set ignore defined data ( boolean ignore defined data ) { this ignore defined data = ignore defined data ; }


private void clear all masks ( ) { task b task = new task ( " clearing all masks " , true , true , true ) { @ override public void run ( task monitor monitor ) { monitor set maximum ( get row count ( ) * get column count ( ) ) ; for ( int i = 0 ; i < get row count ( ) ; i + + ) { for ( int j = 0 ; j < get column count ( ) ; j + + ) { if ( monitor is cancelled ( ) ) { return ; } monitor increment progress ( 1 ) ; mask field ( i , j , false ) ; } } } } ; new task launcher ( b task , this ) ; instruction table model model = ( instruction table model ) get model ( ) ; model fire table data changed ( ) ; }


quick check whether the given { @ link ray } and { @ link bounding box } intersect

static public boolean intersect ray bounds fast ( ray ray , bounding box box ) { return intersect ray bounds fast ( ray , box get center ( tmp 1 ) , box get dimensions ( tmp 2 ) ) ; }


exactly like guard is satisfied ( ) , but in addition signals all waiting threads in the ( hopefully unlikely ) event that is satisfied ( ) throws

private boolean is satisfied ( guard guard ) { try { return guard is satisfied ( ) ; } catch ( throwable throwable ) { signal all waiters ( ) ; throw throwable ; } }


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


set optional boolean parameter for the builder

public b opt ( @ nonnull final string key , boolean value ) { mandatory keys remove ( key ) ; options set boolean ( key , value ) ; return get this builder ( ) ; }


public synchronized type id item intern ( cst type type ) { if ( type = = null ) { throw new null pointer exception ( " type = = null " ) ; } throw if prepared ( ) ; type type per se = type get class type ( ) ; type id item result = type ids get ( type per se ) ; if ( result = = null ) { result = new type id item ( type ) ; type ids put ( type per se , result ) ; } return result ; }


set the underlying output format for lazy output format

public static void set output format class ( job conf job , class < ? extends output format > the class ) { job set output format ( lazy output format class ) ; job set class ( " mapreduce output lazyoutputformat outputformat " , the class , output format class ) ; }


set the value of the { @ linkplain # authorization authorization } header to basic authentication based on the given username and password

public void set basic auth ( string username , string password , @ nullable charset charset ) { set basic auth ( encode basic auth ( username , password , charset ) ) ; }


public path make qualified ( uri default uri , path working dir ) { path path = this ; if ( ! is absolute ( ) ) { path = new path ( working dir , this ) ; } uri path uri = path to uri ( ) ; string scheme = path uri get scheme ( ) ; string authority = path uri get authority ( ) ; string fragment = path uri get fragment ( ) ; if ( scheme ! = null & & ( authority ! = null | | default uri get authority ( ) = = null ) ) return path ; if ( scheme = = null ) { scheme = default uri get scheme ( ) ; } if ( authority = = null ) { authority = default uri get authority ( ) ; if ( authority = = null ) { authority = " " ; } } uri new uri = null ; try { new uri = new uri ( scheme , authority , normalize path ( scheme , path uri get path ( ) ) , null , fragment ) ; } catch ( u r i syntax exception e ) { throw new illegal argument exception ( e ) ; } return new path ( new uri ) ; }


returns true if the specified oas model has at least one operation with the http basic security scheme

public static boolean has http basic methods ( list < codegen security > auth methods ) { if ( auth methods ! = null & & ! auth methods is empty ( ) ) { for ( codegen security cs : auth methods ) { if ( boolean true equals ( cs is basic basic ) ) { return true ; } } } return false ; }


public void logout user test ( test context context ) { async async = context async ( ) ; api logout user ( result - > { / / todo : test validations async complete ( ) ; } ) ; }


this is a spurious hash code subclass to keep findbugs quiet

public int hash code ( ) { return super hash code ( ) ; }


marks the message as processed should only be called by a { @ link sender } and may be called multiple times

public synchronized void mark as processed ( boolean is delivered ) { this is delivered | = is delivered ; is processed = true ; notify all ( ) ; }


get the length of a stored record optimized if record offset already known

private int get record length ( int index , int offset ) { if ( index = = 0 ) { return buffer length ( ) - offset ; } return get record data offset ( index - 1 ) - offset ; }


{ @ inherit doc } this implementation is correct for single consumer thread use only

public e peek ( ) { final e [ ] buffer = consumer buffer ; final long index = consumer index ; final long mask = consumer mask ; final long offset = modified calc element offset ( index , mask ) ; object e = lv element ( buffer , offset ) ; / / load load if ( e = = null & & index ! = lv producer index ( ) ) { / / peek ( ) = = null iff queue is empty , null element is not strong enough indicator , so we must / / check the producer index if the queue is indeed not empty we spin until element is / / visible while ( ( e = lv element ( buffer , offset ) ) = = null ) { ; } } if ( e = = jump ) { return new buffer peek ( get next buffer ( buffer , mask ) , index ) ; } return ( e ) e ; }


reads whole ( including chunk type ) string block from stream stream must be at the chunk type

public static string block read ( ext data input reader ) throws i o exception { reader skip check chunk type int ( chunk stringpool type , chunk null type ) ; int chunk size = reader read int ( ) ; int string count = reader read int ( ) ; int style count = reader read int ( ) ; int flags = reader read int ( ) ; int strings offset = reader read int ( ) ; int styles offset = reader read int ( ) ; string block block = new string block ( ) ; block m is u t f 8 = ( flags & utf8 flag ) ! = 0 ; block m string offsets = reader read int array ( string count ) ; block m string owns = new int [ string count ] ; arrays fill ( block m string owns , - 1 ) ; if ( style count ! = 0 ) { block m style offsets = reader read int array ( style count ) ; } { int size = ( ( styles offset = = 0 ) ? chunk size : styles offset ) - strings offset ; if ( ( size % 4 ) ! = 0 ) { throw new i o exception ( " string data size is not multiple of 4 ( " + size + " ) " ) ; } block m strings = new byte [ size ] ; reader read fully ( block m strings ) ; } if ( styles offset ! = 0 ) { int size = ( chunk size - styles offset ) ; if ( ( size % 4 ) ! = 0 ) { throw new i o exception ( " style data size is not multiple of 4 ( " + size + " ) " ) ; } block m styles = reader read int array ( size / 4 ) ; } return block ; }


scrolls the view to the currently selected item

public void scroll to selected row ( ) { int [ ] selected rows = table get selected rows ( ) ; if ( selected rows = = null | | selected rows length = = 0 ) { return ; } / / just make sure that the first row is visible int row = selected rows [ 0 ] ; / / update the cell rectangle to be the entire row so that if the user is horizontally / / scrolled , then we do not change that rectangle visible rect = get visible rect ( ) ; rectangle cell rect = table get cell rect ( row , 0 , true ) ; cell rect x = visible rect x ; cell rect width = visible rect width ; table scroll rect to visible ( cell rect ) ; }


returns a new { @ link default channel pipeline } instance

protected default channel pipeline new channel pipeline ( ) { return new default channel pipeline ( this ) ; }


the set of enumsflags defined in this attribute only makes sense if the format includes either format flags : : enum or format flags : : flags having both is an error < code > repeated aapt pb attribute symbol symbol = 4 ; < code >


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


get the current { @ linkplain object test instance } for this test context note : this is a mutable property


returns the hash code for this network the hash code of a network is defined as the hash code of a map from each of its { @ link # edges ( ) edges } to their { @ link # incident nodes ( object ) incident nodes } a reference implementation of this is provided by { @ link abstract network # hash code ( ) }


initializes paint objects and sets desired attributes

private void init ( context context , attribute set attrs , int def style ) { / / initialize paint objects paint = new paint ( ) ; paint set anti alias ( true ) ; paint border = new paint ( ) ; paint border set anti alias ( true ) ; paint border set style ( paint style stroke ) ; paint selector border = new paint ( ) ; paint selector border set anti alias ( true ) ; / / enable software rendering on honey comb and up ( needed for shadow ) if ( build version sdk int > = build version codes honeycomb ) set layer type ( layer type software , null ) ; / / load the styled attributes and set their properties typed array attributes = context obtain styled attributes ( attrs , r styleable circular image view , def style , 0 ) ; / / check for extra features being enabled has border = attributes get boolean ( r styleable circular image view civ border , false ) ; has selector = attributes get boolean ( r styleable circular image view civ selector , false ) ; shadow enabled = attributes get boolean ( r styleable circular image view civ shadow , shadow enabled ) ; / / set border properties , if enabled if ( has border ) { int default border size = ( int ) ( 2 * context get resources ( ) get display metrics ( ) density + 0 5f ) ; set border width ( attributes get dimension pixel offset ( r styleable circular image view civ border width , default border size ) ) ; set border color ( attributes get color ( r styleable circular image view civ border color , color white ) ) ; } / / set selector properties , if enabled if ( has selector ) { int default selector size = ( int ) ( 2 * context get resources ( ) get display metrics ( ) density + 0 5f ) ; set selector color ( attributes get color ( r styleable circular image view civ selector color , color transparent ) ) ; set selector stroke width ( attributes get dimension pixel offset ( r styleable circular image view civ selector stroke width , default selector size ) ) ; set selector stroke color ( attributes get color ( r styleable circular image view civ selector stroke color , color blue ) ) ; } / / set shadow properties , if enabled if ( shadow enabled ) { shadow radius = attributes get float ( r styleable circular image view civ shadow radius , shadow radius ) ; shadow dx = attributes get float ( r styleable circular image view civ shadow dx , shadow dx ) ; shadow dy = attributes get float ( r styleable circular image view civ shadow dy , shadow dy ) ; shadow color = attributes get color ( r styleable circular image view civ shadow color , shadow color ) ; set shadow enabled ( true ) ; } / / we no longer need our attributes typed array , give it back to cache attributes recycle ( ) ; }


waits for the value returned by the supplier to be non - null , throwing an exception if that does not happen by the default timeout

public static < t > t wait for ( supplier < t > supplier , string failure message ) { return wait for value ( supplier , failure message , true ) ; }


public void set pointer size ( int pointer size ) { this pointer size = pointer size ; }


authenticates the provided credentials on success , an { @ link authentication } object is returned containing metadata about the result of each authenticated credential note that a particular implementation may require some or all credentials to be successfully authenticated failure to authenticate is considered an exceptional case , and an authentication exception is thrown

authentication authenticate ( authentication transaction authentication transaction ) throws authentication exception ;


void test stable serialization ( ) throws exception { for ( t subject : subjects ) { byte [ ] serialized = to bytes ( subject ) ; t deserialized = from bytes ( serialized ) ; byte [ ] reserialized = to bytes ( deserialized ) ; assert that ( reserialized ) is equal to ( serialized ) ; } }


immediately force a commit or rollback of the transaction for the configured test context , according to the { @ linkplain # is flagged for rollback rollback flag }

void end transaction ( ) { if ( logger is trace enabled ( ) ) { logger trace ( string format ( " ending transaction for test context % s ; transaction status [ % s ] ; rollback [ % s ] " , this test context , this transaction status , this flagged for rollback ) ) ; } assert state ( this transaction status ! = null , ( ) - > " failed to end transaction - transaction does not exist : " + this test context ) ; try { if ( this flagged for rollback ) { this transaction manager rollback ( this transaction status ) ; } else { this transaction manager commit ( this transaction status ) ; } } finally { this transaction status = null ; } if ( logger is info enabled ( ) ) { logger info ( ( this flagged for rollback ? " rolled back " : " committed " ) + " transaction for test : " + this test context ) ; } }


returns all ( types of ) convenience symlinks that may be created note that this is independent of which symlinks are actually requested by the build options ; that ' s controlled by returning no candidates in { @ link symlink definition # get link paths } the order of the result indicates precedence for { @ link path pretty printer }

private static final immutable list < symlink definition > get all link definitions ( iterable < symlink definition > symlink definitions , boolean include product out ) { / / todo ( mitchellhyang ) : remove the boolean parameter " include product out " after the flag / / " - - experimental no product name out symlink " has been removed we should avoid adding new / / parameters to this method however , in this case , without the " include product out " , callers / / such as the pretty printer may print out false information immutable list builder < symlink definition > builder = immutable list builder ( ) ; builder add all ( convenience symlinks get standard link definitions ( include product out ) ) ; builder add all ( symlink definitions ) ; return builder build ( ) ; }


provide a custom flash map manager this is delegated to { @ link standalone mock mvc builder # set flash map manager ( flash map manager ) }

controller spec flash map manager ( flash map manager flash map manager ) ;


public path get input file for write ( org apache hadoop mapreduce task i d map id , long size ) throws i o exception { return l dir alloc get local path for write ( string format ( reduce input file format string , m r job config output , map id get id ( ) ) , size , get conf ( ) ) ; }


switch to the next available user to bind to

protected void switch bind user ( authentication exception e ) { bind user info old bind user = this current bind user ; current bind user = this bind users next ( ) ; if ( ! old bind user equals ( current bind user ) ) { log info ( " switched from { } to { } after an authentication exception : { } " , old bind user , current bind user , e get message ( ) ) ; } }


find out how many transactions we can read from a file journal manager , starting at a given transaction id

static long get number of transactions ( file journal manager jm , long from tx id , boolean in progress ok , boolean abort on gap ) throws i o exception { long num transactions = 0 , tx id = from tx id ; final priority queue < edit log input stream > all streams = new priority queue < edit log input stream > ( 64 , journal set edit log input stream comparator ) ; jm select input streams ( all streams , from tx id , in progress ok ) ; edit log input stream elis = null ; try { while ( ( elis = all streams poll ( ) ) ! = null ) { try { elis skip until ( tx id ) ; while ( true ) { f s edit log op op = elis read op ( ) ; if ( op = = null ) { break ; } if ( abort on gap & & ( op get transaction id ( ) ! = tx id ) ) { log info ( " get number of transactions : detected gap at tx id " + from tx id ) ; return num transactions ; } tx id = op get transaction id ( ) + 1 ; num transactions + + ; } } finally { i o utils cleanup with logger ( log , elis ) ; } } } finally { i o utils cleanup with logger ( log , all streams to array ( new edit log input stream [ 0 ] ) ) ; } return num transactions ; }


test keyed keyed co process function side output

public void test keyed co process function side output ( ) throws exception { final output tag < string > side output tag = new output tag < string > ( " side " ) { } ; test list result sink < string > side output result sink = new test list result sink < > ( ) ; test list result sink < integer > result sink = new test list result sink < > ( ) ; stream execution environment see = stream execution environment get execution environment ( ) ; see set parallelism ( 3 ) ; data stream < integer > ds 1 = see from collection ( elements ) ; data stream < integer > ds 2 = see from collection ( elements ) ; single output stream operator < integer > pass throught stream = ds 1 key by ( i - > i ) connect ( ds 2 key by ( i - > i ) ) process ( new keyed co process function < integer , integer , integer , integer > ( ) { @ override public void process element 1 ( integer value , context ctx , collector < integer > out ) throws exception { if ( value < 3 ) { out collect ( value ) ; ctx output ( side output tag , " sideout 1 - " + ctx get current key ( ) + " - " + string value of ( value ) ) ; } } @ override public void process element 2 ( integer value , context ctx , collector < integer > out ) throws exception { if ( value > = 3 ) { out collect ( value ) ; ctx output ( side output tag , " sideout 2 - " + ctx get current key ( ) + " - " + string value of ( value ) ) ; } } } ) ; pass throught stream get side output ( side output tag ) add sink ( side output result sink ) ; pass throught stream add sink ( result sink ) ; see execute ( ) ; assert equals ( arrays as list ( " sideout 1 - 1 - 1 " , " sideout 1 - 2 - 2 " , " sideout 2 - 3 - 3 " , " sideout 2 - 4 - 4 " , " sideout 2 - 5 - 5 " ) , side output result sink get sorted result ( ) ) ; assert equals ( arrays as list ( 1 , 2 , 3 , 4 , 5 ) , result sink get sorted result ( ) ) ; }


returns a map joiner with the same behavior as this one , except automatically substituting { @ code null text } for any provided null keys or values

public map joiner use for null ( string null text ) { return new map joiner ( joiner use for null ( null text ) , key value separator ) ; }


returns the symlinks as a map from path fragment to artifact

public map < path fragment , artifact > get runfiles inputs ( event handler event handler , location location ) { conflict checker checker = new conflict checker ( conflict policy , event handler , location ) ; map < path fragment , artifact > manifest = get symlinks as map ( checker ) ; / / add artifacts ( committed to inclusion on construction of runfiles ) for ( artifact artifact : get artifacts ( ) to list ( ) ) { checker put ( manifest , artifact get runfiles path ( ) , artifact ) ; } manifest = filter list for obscuring symlinks ( event handler , location , manifest ) ; / / todo ( bazel - team ) : create / dev / null - like artifact to avoid nulls ? for ( path fragment extra path : empty files supplier get extra paths ( manifest key set ( ) ) ) { checker put ( manifest , extra path , null ) ; } / / copy manifest map to another manifest map , prepending the workspace name to every path / / e g for workspace " myworkspace " , the runfile entry " mylib so " - > " / path / to / mylib so " becomes / / " myworkspace / mylib so " - > " / path / to / mylib so " manifest builder builder = new manifest builder ( suffix , legacy external runfiles ) ; builder add under workspace ( manifest , checker ) ; / / finally add symlinks relative to the root of the runfiles tree , on top of everything else / / this operation is always checked for conflicts , to match historical behavior if ( conflict policy = = conflict policy ignore ) { checker = new conflict checker ( conflict policy warn , event handler , location ) ; } builder add ( get root symlinks as map ( checker ) , checker ) ; return builder build ( ) ; }


returns the value associated with the given config option as a float if no value is mapped under any key of the option , it returns the specified default instead of the option ' s default value

public float get float ( config option < float > config option , float override default ) { return get optional ( config option ) or else ( override default ) ; }


if a trial license was not started as a result of the request corresponding to this response ( see { @ link # is trial was started ( ) } then returns a brief message explaining why the trial could not be started returns false otherwise

public string get error message ( ) { return error message ; }


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

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


returns the value of the stored { @ link translation settings definition # get translated value ( settings ) translated settings } string

public string get translated value ( ) { return translated value ; }


this setter should only be used during parsing , to set the user value type hint this is information the user provides in the json query to indicate the output type of a script or the type of the ' missing ' replacement value

public ab user value type hint ( value type value type ) { if ( value type = = null ) { / / todo : this is nonsense we allow the value to be null ( via constructor ) , but don ' t allow it to be set to null this means / / thing looking to copy settings ( like rollup request translator ) need to check if user value type hint is not null , and then / / set it if and only if it is non - null throw new illegal argument exception ( " [ user value type hint ] must not be null : [ " + name + " ] " ) ; } this user value type hint = value type ; return ( ab ) this ; }


returns the default value of this attribute in the context of the specified rule for attributes with a computed default , i e { @ code has computed default ( ) } , { @ code rule } must be non - null since the result may depend on the values of its other attributes the result may be null ( although this is not a value in the build language ) during population of the rule ' s attribute dictionary , all non - computed defaults must be set before all computed ones

public object get default value ( rule rule ) { if ( ! get condition ( ) apply ( rule = = null ? null : nonconfigurable attribute mapper of ( rule ) ) ) { return null ; } else if ( default value instanceof late bound default < ? , ? > ) { return ( ( late bound default < ? , ? > ) default value ) get default ( ) ; } else { return default value ; } }


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


submits all the callable tasks to the executor and waits for the results

static void submit tasks and wait for results ( executor service executor , callable [ ] tasks ) throws exception { final list < future > results = lists new array list with capacity ( tasks length ) ; for ( callable task : tasks ) { / / noinspection unchecked results add ( executor submit ( task ) ) ; } for ( future result : results ) { result get ( ) ; } }


persist the current state on to a stack , must be complimented by a call to { @ link # restore ( ) }

public void save ( ) { canvas matrix save ( ) ; }


public string get pet type ( ) { return pet type ; }


check whether context wrapper is a wrapper of base context

private static boolean is context wrapper ( context context wrapper , context base context ) { while ( base context instanceof context wrapper ) { base context = ( ( context wrapper ) base context ) get base context ( ) ; } context current context = context wrapper ; while ( current context instanceof context wrapper ) { current context = ( ( context wrapper ) current context ) get base context ( ) ; } return current context = = base context ; }


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

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


return an unmodifiable { @ code transaction definition } with defaults for customization purposes , use the modifiable { @ link org springframework transaction support default transaction definition } instead

static transaction definition with defaults ( ) { return static transaction definition instance ; }


helper method to set access token for the first bearer authentication

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


public raw comparable get last key ( ) throws i o exception { check t file data index ( ) ; return tfile index get last key ( ) ; }


public boolean is my boolean ( ) { return my boolean ; }


initializes the writer must be called once , before any calls to { @ link # sample data ( extractor input , long ) }

void init ( int data start position , long data end position ) throws parser exception ;


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

public static < e > immutable sorted set < e > copy of sorted ( sorted set < e > sorted set ) { comparator < ? super e > comparator = sorted iterables comparator ( sorted set ) ; immutable list < e > list = immutable list copy of ( sorted set ) ; if ( list is empty ( ) ) { return empty set ( comparator ) ; } else { return new regular immutable sorted set < e > ( list , comparator ) ; } }


get or create a sensor with the given unique name and zero or more parent sensors all parent sensors will receive every value recorded with this sensor

public synchronized sensor sensor ( string name , metric config config , sensor recording level recording level , sensor parents ) { / / we need to make sure that all sensor names are unique across all groups , so use the sensor prefix sensor result = metrics sensor ( sensor prefix + name , config , long max value , recording level , parents ) ; if ( result ! = null ) sensor names add ( result name ( ) ) ; return result ; }


perform additional checks on a resolved resource beyond checking whether the resources exists and is readable the default implementation also verifies the resource is either under the location relative to which it was found or is under one of the { @ link # set allowed locations allowed locations }

protected boolean check resource ( resource resource , resource location ) throws i o exception { if ( is resource under location ( resource , location ) ) { return true ; } if ( get allowed locations ( ) ! = null ) { for ( resource current : get allowed locations ( ) ) { if ( is resource under location ( resource , current ) ) { return true ; } } } return false ; }


returns the discrete domain for values of type { @ code integer }

public static discrete domain < integer > integers ( ) { return integer domain instance ; }


a helper function to serialize the job token identifier to be sent to the shuffle handler as service data

public static byte buffer serialize service data ( token < job token identifier > job token ) throws i o exception { / / todo these bytes should be versioned data output buffer job token dob = new data output buffer ( ) ; job token write ( job token dob ) ; return byte buffer wrap ( job token dob get data ( ) , 0 , job token dob get length ( ) ) ; }


simply add a snapshot into the { @ link # snapshots by names } used when loading fsimage

void add snapshot ( snapshot snapshot ) { this snapshots by names add ( snapshot ) ; }


set the body of the response to the given { @ code object } and return it the parameter { @ code body type } is used to capture the generic type

< t > server response body ( t body , parameterized type reference < t > body type ) ;


use this method to look up a processor from a string when you want a processor not found exception thrown if the processor isn ' t found < b > < u > warning : < u > < b > use of this method depends upon languages being loaded see { @ link default language service }

public static synchronized processor to processor ( string name ) { initialize ( ) ; processor processor = instances get ( name ) ; if ( processor = = null ) { throw new processor not found exception ( name ) ; } return processor ; }


the total time spent executing external refreshes ( in milliseconds )

public long get external total time in millis ( ) { return this external total time in millis ; }


truncate the buffer file length to the specified index count

void truncate ( int index count ) throws i o exception { if ( read only ) { throw new i o exception ( " file is read - only " ) ; } long size = ( index count + 1 ) * block size ; raf set length ( size ) ; this buffer count = index count ; }


renders the specified frame only should be called on the rendering thread

public void render frame ( int frame number , bitmap bitmap ) { canvas canvas = new canvas ( bitmap ) ; canvas draw color ( color transparent , porter duff mode src ) ; / / if blending is required , prepare the canvas with the nearest cached frame int next index ; if ( ! is key frame ( frame number ) ) { / / blending is required next index points to the next index to render onto the canvas next index = prepare canvas with closest cached frame ( frame number - 1 , canvas ) ; } else { / / blending isn ' t required start at the frame we ' re trying to render next index = frame number ; } / / iterate from next index to the frame number just preceding the one we ' re trying to render / / and composite them in order according to the disposal method for ( int index = next index ; index < frame number ; index + + ) { animated drawable frame info frame info = m animated drawable backend get frame info ( index ) ; disposal method disposal method = frame info disposal method ; if ( disposal method = = disposal method dispose to previous ) { continue ; } if ( frame info blend operation = = blend operation no blend ) { dispose to background ( canvas , frame info ) ; } m animated drawable backend render frame ( index , canvas ) ; m callback on intermediate result ( index , bitmap ) ; if ( disposal method = = disposal method dispose to background ) { dispose to background ( canvas , frame info ) ; } } animated drawable frame info frame info = m animated drawable backend get frame info ( frame number ) ; if ( frame info blend operation = = blend operation no blend ) { dispose to background ( canvas , frame info ) ; } / / finally , we render the current frame we don ' t dispose it m animated drawable backend render frame ( frame number , canvas ) ; maybe apply transformation ( bitmap ) ; }


test how { @ link http url } does against the web platform test suite

@ parameterized test public void http url ( web platform url test data test data ) throws exception { if ( ! test data scheme is empty ( ) & & ! http url schemes contains ( test data scheme ) ) { system err println ( " ignoring unsupported scheme " + test data scheme ) ; return ; } if ( ! test data base starts with ( " https : " ) & & ! test data base starts with ( " http : " ) & & ! test data base equals ( " about : blank " ) ) { system err println ( " ignoring unsupported base " + test data base ) ; return ; } try { test http url ( test data ) ; if ( known failures contains ( test data to string ( ) ) ) { system err println ( " expected failure but was success : " + test data ) ; } } catch ( throwable e ) { if ( known failures contains ( test data to string ( ) ) ) { system err println ( " ignoring known failure : " + test data ) ; e print stack trace ( ) ; } else { throw e ; } } }


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


public offset date time get ship date ( ) { return ship date ; }


attaches the tool tip from the gui resources that corresponds to the given key , to the given component

private static j component tip ( j component component , string message key ) { component set tool tip text ( msg ( message key ) ) ; return component ; }


show a warning about deleting files , asking for a confirmation if { @ code batch mode } is false

private string deleting files details ( path translog path , set < path > files ) { string builder builder = new string builder ( ) ; builder append ( " documents inside of translog files will be lost \ n " ) append ( " the following files will be deleted at " ) append ( translog path ) append ( " \ n \ n " ) ; for ( iterator < path > it = files iterator ( ) ; it has next ( ) ; ) { builder append ( " - - > " ) append ( it next ( ) get file name ( ) ) ; if ( it has next ( ) ) { builder append ( " \ n " ) ; } } return builder to string ( ) ; }


format a stack trace in a human - readable format

public static string format stacktrace ( throwable throwable ) { final string writer string writer = new string writer ( ) ; final print writer print writer = new print writer ( string writer ) ; string output = null ; try { throwable print stack trace ( print writer ) ; } finally { print writer close ( ) ; try { output = string writer to string ( ) ; string writer close ( ) ; } catch ( final i o exception ignored ) { / / this would mean that closing failed which doesn ' t concern us } } return output ; }


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


return whether data was updated if this method returns false , there ' s nothing to roll back the default implementation always returns true this can be overridden in subclasses

public boolean was data updated ( ) { return true ; }


public string get pet type ( ) { return pet type ; }


return the raw request body content written through the request note : if the request content has not been consumed for any reason yet , use of this method will trigger consumption

public byte [ ] get request body content ( ) { return this request body block ( this timeout ) ; }


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

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


find all annotations of the specified { @ code annotation types } within the annotation hierarchy above the supplied { @ code element } ; and for each annotation found , merge that annotation ' s attributes with matching attributes from annotations in lower levels of the annotation hierarchy and synthesize the results back into an annotation of the corresponding { @ code annotation type } { @ link alias for @ alias for } semantics are fully supported , both within a single annotation and within annotation hierarchies this method follows find semantics as described in the { @ linkplain annotated element utils class - level javadoc }

public static set < annotation > find all merged annotations ( annotated element element , set < class < ? extends annotation > > annotation types ) { return find annotations ( element ) stream ( ) filter ( merged annotation predicates type in ( annotation types ) ) sorted ( high aggregate indexes first ( ) ) collect ( merged annotation collectors to annotation set ( ) ) ; }


indicate that the entire test run was interrupted

public void test run interrupted ( ) { root node test interrupted ( now ( ) ) ; }


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

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


wait until an attempt has reached a specified state the timeout is 40 seconds

public static void wait for state ( r m app attempt attempt , r m app attempt state final state ) throws interrupted exception { wait for state ( attempt , final state , timeout ms for attempt ) ; }


returns the local address to which the socket is bound

socket address get local socket address ( ) { return local socket address ; }


public void add slow disk for testing ( string slow disk path , map < disk op , double > latencies ) { override status = false ; if ( latencies = = null ) { disk outliers stats put ( slow disk path , immutable map of ( ) ) ; } else { disk outliers stats put ( slow disk path , latencies ) ; } }


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

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


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


return the name of the persistence provider ' s root package ( e g " oracle toplink essentials " ) will be used for excluding provider classes from temporary class overriding

default string get persistence provider root package ( ) { return null ; }


the amount of work ( { @ code element count cycles per element } ) is used to generate a list of blocks of work of near - equal size

list < block info < t > > get random generables ( long element count , int cycles per element ) ;


advise that a block replica not be written to the local rack data node

public hdfs data output stream builder no local rack ( ) { get flags ( ) add ( create flag no local rack ) ; return this ; }


gets the data source supplier if set important : this only returns the externally set data source ( if any ) subclasses should use { # code obtain data source supplier ( ) } to obtain a data source to be passed to the controller

public supplier < data source < image > > get data source supplier ( ) { return m data source supplier ; }


set a dimension resource to specify the padding value to use on each side of the carousel and in between carousel items

public void set padding res ( @ dimen res int padding res ) { int px = res to px ( padding res ) ; set padding ( px , px , px , px ) ; set item spacing px ( px ) ; }


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


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

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


get the available data that can be read from the current entry in the archive this does not indicate how much data is left in the entire archive , only in the current entry this value is determined from the entry ' s size header field and the amount of data already read from the current entry integer max value is returned in case more than integer max value bytes are left in the current entry in the archive

public int available ( ) throws i o exception { if ( this entry size - this entry offset > integer max value ) { return integer max value ; } return ( int ) ( this entry size - this entry offset ) ; }


remove the { @ link open ssl engine } with the given { @ code ssl } address and return it

reference counted open ssl engine remove ( long ssl ) ;


adds an alias that will be added when the index gets created

public put index template request alias ( alias alias ) { aliases add ( alias ) ; return this ; }


adds a new constant initializer to be written

public void add constant initializer ( constant constant ) { if ( constant initializers put ( constant name , constant ) ! = null ) { throw new illegal state exception ( " constant initializer : " + constant name + " already exists " ) ; } }


generate delay millis list by given plans string , separated by comma < br > eg , 03 : 00 - 05 : 00 , 13 : 00 - 14 : 00

public static list < long > get delay mills list ( string schedule plans ) { list < long > result = new array list < > ( ) ; string [ ] plans = string utils split ( schedule plans , ' , ' ) ; for ( string plan : plans ) { result add ( get delay millis ( plan ) ) ; } return result ; }


public t get next ( ) throws i o exception { try { return mapper read value ( json parser , clazz ) ; } catch ( json mapping exception e ) { return null ; } }


gets the type corresponding to an array of this type

public type get array type ( ) { if ( array type = = null ) { array type = put intern ( new type ( ' [ ' + descriptor , bt object ) ) ; } return array type ; }


public void set null bit ( final int index ) { null bitmap [ get byte position ( index ) ] | = 1 < < get bit position ( index ) ; }


gets the value from an entry returns { @ code null } if the entry is invalid or partially - collected

v get live value ( e entry ) { if ( entry get key ( ) = = null ) { try drain reference queues ( ) ; return null ; } v value = entry get value ( ) ; if ( value = = null ) { try drain reference queues ( ) ; return null ; } return value ; }


performs a manual merge of external program conflicts

public void merge conflicts ( int chosen conflict option , task monitor monitor ) throws cancelled exception { monitor set message ( " resolving external program name conflicts " ) ; boolean ask user = ( chosen conflict option = = ask user ) ; int total conflicts = ext pgms size ( ) ; monitor initialize ( total conflicts ) ; for ( int conflict index = 0 ; conflict index < total conflicts ; conflict index + + ) { i d group id group = ext pgms get ( conflict index ) ; if ( ( external program choice = = ask user ) & & ask user & & merge manager ! = null ) { monitor check canceled ( ) ; show merge panel ( id group , monitor ) ; } else { int option to use = ( external program choice = = ask user ) ? chosen conflict option : external program choice ; merge ( id group , option to use , monitor ) ; } monitor set progress ( conflict index + 1 ) ; } }


returns a { @ link media source event listener event dispatcher } which dispatches all events to the registered listeners with the specified media period id

protected final media source event listener event dispatcher create event dispatcher ( @ nullable media period id media period id ) { return event dispatcher with parameters ( / * window index = * / 0 , media period id , / * media time offset ms = * / 0 ) ; }


check if the given array contains the given value ( with case - insensitive comparison )

public static boolean contains ignore case ( string [ ] array , string value ) { for ( string str : array ) { if ( value = = null & & str = = null ) return true ; if ( value ! = null & & value equals ignore case ( str ) ) return true ; } return false ; }


this test validates the correctness of blacklist logic in case the cluster has no active subclusters

public void test all blacklist subcluster ( ) throws yarn exception { federation router policy local policy = ( federation router policy ) get policy ( ) ; application submission context application submission context = application submission context new instance ( null , null , null , null , null , false , false , 0 , resources none ( ) , null , false , null , null ) ; map < sub cluster id , sub cluster info > active sub clusters = get active subclusters ( ) ; if ( active sub clusters ! = null & & active sub clusters size ( ) > 1 & & ! ( local policy instanceof reject router policy ) ) { list < sub cluster id > blacklist subclusters = new array list < sub cluster id > ( active sub clusters key set ( ) ) ; try { local policy get home subcluster ( application submission context , blacklist subclusters ) ; assert fail ( ) ; } catch ( yarn exception e ) { assert assert true ( e get message ( ) equals ( federation policy utils no active subcluster available ) ) ; } } }


returns the set of options filtered if a specific type is specified

private static < t > set < t > filter types ( optional < t > type , t [ ] options ) { if ( type is present ( ) ) { return type filter ( arrays as list ( options ) : : contains ) is present ( ) ? immutable set of ( type get ( ) ) : immutable set of ( ) ; } return immutable set copy of ( options ) ; }


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


trigger { @ code after completion } callbacks

private mono < void > trigger after completion ( transaction synchronization manager synchronization manager , generic reactive transaction status , int completion status ) { if ( status is new synchronization ( ) ) { list < transaction synchronization > synchronizations = synchronization manager get synchronizations ( ) ; synchronization manager clear synchronization ( ) ; if ( ! status has transaction ( ) | | status is new transaction ( ) ) { if ( status is debug ( ) ) { logger trace ( " triggering after completion synchronization " ) ; } / / no transaction or new transaction for the current scope - > / / invoke the after completion callbacks immediately return invoke after completion ( synchronization manager , synchronizations , completion status ) ; } else if ( ! synchronizations is empty ( ) ) { / / existing transaction that we participate in , controlled outside / / of the scope of this spring transaction manager - > try to register / / an after completion callback with the existing ( jta ) transaction return register after completion with existing transaction ( synchronization manager , status get transaction ( ) , synchronizations ) ; } } return mono empty ( ) ; }


tests if the pipeline is created properly

public void test request interceptor chain creation ( ) throws exception { r e s t request interceptor root = super get router web services ( ) create request interceptor chain ( ) ; int index = 0 ; while ( root ! = null ) { / / the current pipeline is : / / pass through r e s t request interceptor - index = 0 / / pass through r e s t request interceptor - index = 1 / / pass through r e s t request interceptor - index = 2 / / mock r e s t request interceptor - index = 3 switch ( index ) { case 0 : / / fall to the next case case 1 : / / fall to the next case case 2 : / / if index is equal to 0 , 1 or 2 we fall in this check assert assert equals ( pass through r e s t request interceptor class get name ( ) , root get class ( ) get name ( ) ) ; break ; case 3 : assert assert equals ( mock r e s t request interceptor class get name ( ) , root get class ( ) get name ( ) ) ; break ; default : assert fail ( ) ; } root = root get next interceptor ( ) ; index + + ; } assert assert equals ( " the number of interceptors in chain does not match " , 4 , index ) ; }


public static string research megaphone ( ) { return get string ( research megaphone 1 , " " ) ; }


accept a single line of the xml file , and return a { @ link block info } for any blocks contained within that line update internal state dependent on other xml values seen , e g the beginning of a file

list < block info > parse line ( string line ) throws i o exception { if ( current state = = state default ) { if ( line contains ( " < i node section > " ) ) { transition to ( state inode section ) ; } else { return collections empty list ( ) ; } } if ( line contains ( " < inode > " ) ) { transition to ( state inode ) ; } if ( line contains ( " < type > file < / type > " ) ) { transition to ( state file ) ; } list < string > replication strings = values from x m l string ( line , " replication " ) ; if ( ! replication strings is empty ( ) ) { if ( replication strings size ( ) > 1 ) { throw new i o exception ( string format ( " found % s replication strings " , replication strings size ( ) ) ) ; } transition to ( state file with replication ) ; current replication = short parse short ( replication strings get ( 0 ) ) ; } matcher block matcher = block pattern matcher ( line ) ; list < block info > block infos = new array list < > ( ) ; while ( block matcher find ( ) ) { if ( current state ! = state file with replication ) { throw new i o exception ( " found a block string when in state : " + current state ) ; } long id = long parse long ( block matcher group ( 1 ) ) ; long gs = long parse long ( block matcher group ( 2 ) ) ; long size = long parse long ( block matcher group ( 3 ) ) ; block infos add ( new block info ( id , gs , size , current replication ) ) ; } if ( line contains ( " < / inode > " ) ) { transition to ( state inode section ) ; } if ( line contains ( " < / i node section > " ) ) { transition to ( state default ) ; } return block infos ; }


remove all successors edges and return collection of its self edge removed but did not returned in result collection

collection < node < t > > remove all successors ( ) { this remove edge ( this ) ; / / remove self edge collection < node < t > > successors = this succs clear ( ) ; for ( node < t > s : successors ) { if ( ! s remove predecessor ( this ) ) { throw new illegal state exception ( " inconsistent graph state " ) ; } } return successors ; }


decommission may generate the parity block ' s content with all 0 in some case

public void test decommission 2 node with busy node ( ) throws exception { byte busy d n index = 6 ; byte decommission d n index = 6 ; byte decommission d n index 2 = 8 ; / / 1 create ec file final path ec file = new path ( ec dir , " test decommission 2 node with busy node " ) ; int write bytes = cell size * data blocks ; write striped file ( dfs , ec file , write bytes ) ; assert assert equals ( 0 , bm num of under replicated blocks ( ) ) ; file checksum file checksum 1 = dfs get file checksum ( ec file , write bytes ) ; / / 2 make once dn busy final i node file file node = cluster get namesystem ( ) get f s directory ( ) get i node 4 write ( ec file to string ( ) ) as file ( ) ; block info first block = file node get blocks ( ) [ 0 ] ; datanode storage info [ ] dn storage infos = bm get storages ( first block ) ; datanode descriptor busy node = dn storage infos [ busy d n index ] get datanode descriptor ( ) ; for ( int j = 0 ; j < replication streams hard limit ; j + + ) { busy node increment pending replication without targets ( ) ; } / / 3 decommissioning one node list < datanode info > decommission nodes = new array list < > ( ) ; decommission nodes add ( dn storage infos [ decommission d n index ] get datanode descriptor ( ) ) ; decommission nodes add ( dn storage infos [ decommission d n index 2 ] get datanode descriptor ( ) ) ; decommission node ( 0 , decommission nodes , admin states decommission inprogress ) ; / / 4 wait for decommissioning and not busy block to replicate ( 9 - 2 + 1 = 8 ) generic test utils wait for ( ( ) - > bm count nodes ( first block ) live replicas ( ) > = 8 , 100 , 60000 ) ; / / 5 release busy dn , make the decommissioning and busy block can replicate busy node decrement pending replication without targets ( ) ; / / 6 decommissioned one node , make the decommission finished decommission node ( 0 , decommission nodes , admin states decommissioned ) ; / / 7 busy dn shouldn ' t be reconstructed datanode storage info [ ] new dn storage infos = bm get storages ( first block ) ; assert assert equals ( " busy dn shouldn ' t be reconstructed " , dn storage infos [ busy d n index ] get storage i d ( ) , new dn storage infos [ busy d n index ] get storage i d ( ) ) ; / / 8 check the checksum of a file file checksum file checksum 2 = dfs get file checksum ( ec file , write bytes ) ; assert assert equals ( " checksum mismatches ! " , file checksum 1 , file checksum 2 ) ; / / 9 check the data is correct striped file test util check data ( dfs , ec file , write bytes , decommission nodes , null , block group size ) ; }


called after { @ link web element # click web element click ( ) } not called , if an exception is thrown

void after click on ( web element element , web driver driver ) ;


logs that this action or some portion of it completed successfully

void log completion ( string completed action ) { get logger ( ) fine ( string format ( " % s finished at % sms " , completed action , timer elapsed ( ) to millis ( ) ) ) ; }


returns whether the tag lists for the given functions contain the same items ; order is unimportant

public boolean is same ( object obj 1 , object obj 2 ) { function d b f 1 = ( function d b ) obj 1 ; function d b f 2 = ( function d b ) obj 2 ; if ( f 1 = = null & & f 2 = = null ) { / / both null - neither is a function so just return true return true ; } if ( f 1 = = null | | f 2 = = null ) { / / someone is not a function , return false return false ; } / / get the tag lists and check if they ' re the same collection < function tag > f 1 tags = f 1 get tags ( ) ; collection < function tag > f 2 tags = f 2 get tags ( ) ; return f 1 tags equals ( f 2 tags ) ; }


required the nonce provides a way for request change to uniquely reference a request resources < code > string nonce = 5 ; < code >

public java lang string get nonce ( ) { java lang object ref = nonce ; if ( ref instanceof java lang string ) { return ( java lang string ) ref ; } else { com google protobuf byte string bs = ( com google protobuf byte string ) ref ; java lang string s = bs to string utf 8 ( ) ; nonce = s ; return s ; } }


creates a { @ link local stream environment } the local execution environment will run the program in a multi - threaded fashion in the same jvm as the environment was created in the default parallelism of the local environment is the number of hardware contexts ( cpu cores threads ) , unless it was specified differently by { @ link # set parallelism ( int ) }

public static local stream environment create local environment ( ) { return create local environment ( default local parallelism ) ; }


public static < t extends describable < t > , d extends descriptor < t > > descriptor extension list < t , d > create descriptor list ( jenkins jenkins , class < t > describable type ) { if ( describable type = = publisher class ) { return ( descriptor extension list ) new publisher descriptor extension list impl ( jenkins ) ; } return new descriptor extension list < > ( jenkins , describable type ) ; }


add mapper ( the last mapper ) that reads input from queue and writes output to the output context

void add mapper ( chain blocking queue < key value pair < ? , ? > > input , task input output context output context , int index ) throws i o exception , interrupted exception { configuration conf = get conf ( index ) ; class < ? > key class = conf get class ( mapper input key class , object class ) ; class < ? > value class = conf get class ( mapper input value class , object class ) ; record reader rr = new chain record reader ( key class , value class , input , conf ) ; record writer rw = new chain record writer ( output context ) ; map runner runner = new map runner ( mappers get ( index ) , create map context ( rr , rw , output context , get conf ( index ) ) , rr , rw ) ; threads add ( runner ) ; }


{ @ inherit doc } this method returns a { @ link sorted map } , instead of the { @ code map } specified in the { @ link table } interface

sorted map < r , map < c , v > > row map ( ) ;


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

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


builds downstream tls context from file - names

private static downstream tls context build downstream tls context from filenames ( string private key , string cert chain , string trust ca ) throws i o exception { return build downstream tls context ( build common tls context from filenames ( private key , cert chain , trust ca ) ) ; }


closes the current edit log and opens a new one the call fails if the file system is in safe mode

public checkpoint signature roll edit log ( ) throws i o exception ;


throws { @ link mutability exception } if this instance is mutable

public final void throw if mutable ( ) { if ( mutable ) { throw new mutability exception ( " mutable instance " ) ; } }


public void delete pet ( long pet id , string api key , handler < async result < void > > result handler ) { delegate delete pet ( pet id , api key , result handler ) ; }


this method clears the current informational message

public void clear info message ( ) { info msg = new string buffer ( ) ; }


ensure that the actions artifacts created by genrule dependencies allow us to follow the chain of generated files backward

public void test dependencies via files ( ) throws exception { scratch file ( " foo / build " , " genrule ( name = ' bar ' , " , " srcs = [ ' bar in txt ' ] , " , " cmd = ' touch $ ( outs ) ' , " , " outs = [ ' bar out txt ' ] ) " , " genrule ( name = ' baz ' , " , " srcs = [ ' bar out txt ' ] , " , " cmd = ' touch $ ( outs ) ' , " , " outs = [ ' baz out txt ' ] ) " ) ; file configured target baz out target = get file configured target ( " / / foo : baz out txt " ) ; action baz action = get generating action ( baz out target get artifact ( ) ) ; artifact bar out = baz action get inputs ( ) to list ( ) get ( 0 ) ; assert that ( bar out get exec path ( ) ends with ( path fragment create ( " foo / bar out txt " ) ) ) is true ( ) ; action bar action = get generating action ( bar out ) ; artifact bar in = bar action get inputs ( ) to list ( ) get ( 0 ) ; assert that ( bar in get exec path ( ) ends with ( path fragment create ( " foo / bar in txt " ) ) ) is true ( ) ; }


the set of attribute declarations < code > repeated aapt pb styleable entry entry = 1 ; < code >

private void add all entry ( java lang iterable < ? extends com android aapt resources styleable entry > values ) { ensure entry is mutable ( ) ; com google protobuf abstract message lite add all ( values , entry ) ; }


checks , if all outgoing connections have their interesting properties set from their target nodes

public boolean have all output connection interesting properties ( ) { for ( dag connection conn : get outgoing connections ( ) ) { if ( conn get interesting properties ( ) = = null ) { return false ; } } return true ; }


executed on the coordinating node to forward execution of the remaining work to the node that matches that requested { @ link task id # get node id ( ) } if the node isn ' t in the cluster then this will just proceed to { @ link # get finished task from index ( task , get task request , action listener ) } on this node

private void run on node with task if possible ( task this task , get task request request , action listener < get task response > listener ) { discovery node node = cluster service state ( ) nodes ( ) get ( request get task id ( ) get node id ( ) ) ; if ( node = = null ) { / / node is no longer part of the cluster ! try and look the task up from the results index get finished task from index ( this task , request , action listener wrap ( listener : : on response , e - > { if ( e instanceof resource not found exception ) { e = new resource not found exception ( " task [ " + request get task id ( ) + " ] belongs to the node [ " + request get task id ( ) get node id ( ) + " ] which isn ' t part of the cluster and there is no record of the task " , e ) ; } listener on failure ( e ) ; } ) ) ; return ; } get task request node request = request node request ( cluster service local node ( ) get id ( ) , this task get id ( ) ) ; transport service send request ( node , get task action name , node request , transport request options timeout ( request get timeout ( ) ) , new action listener response handler < > ( listener , get task response : : new , thread pool names same ) ) ; }


transform the extracted the body with a function , e g extracting a property , and assert the mapped value with a { @ link matcher }

< t extends s , r > t value ( function < b , r > body mapper , matcher < ? super r > matcher ) ;


repeated weak compare and set succeeds in changing value when equal to expected

public void test weak compare and set ( ) { atomic double array aa = new atomic double array ( size ) ; for ( int i : new int [ ] { 0 , size - 1 } ) { double prev = 0 0 ; double unused = math e + math pi ; for ( double x : values ) { assert bit equals ( prev , aa get ( i ) ) ; assert false ( aa weak compare and set ( i , unused , x ) ) ; assert bit equals ( prev , aa get ( i ) ) ; while ( ! aa weak compare and set ( i , prev , x ) ) { ; } assert bit equals ( x , aa get ( i ) ) ; prev = x ; } } }


sets the specified side of this cubemap to the specified { @ link pixmap } , overwriting any previous data set to that side note that you need to reload through { @ link cubemap # load ( cubemap data ) } any cubemap using this data for the change to be taken in account

public void load ( cubemap side side , pixmap pixmap ) { data [ side index ] = pixmap = = null ? null : new pixmap texture data ( pixmap , null , false , false ) ; }


cleans the data from the passed path in the passed file system

static void clean data ( file system fs , path dir path ) throws i o exception { fs delete ( dir path , true ) ; }


sets the percentage of the desired amount of time spent for io in the child event loops the default value is { @ code 50 } , which means the event loop will try to spend the same amount of time for io as for non - io tasks

public void set io ratio ( int io ratio ) { for ( event executor e : this ) { ( ( k queue event loop ) e ) set io ratio ( io ratio ) ; } }


apply the given properties to the given bean factory

protected abstract void process properties ( configurable listable bean factory bean factory , properties props ) throws beans exception ;


set the color used to fade the pane covered by the sliding pane out when the pane will become fully covered in the expanded state

public void set covered fade color ( int color ) { m covered fade color = color ; request layout ( ) ; }


process the entry point section of the xml file

void read ( xml pull parser parser , task monitor monitor ) throws s a x parse exception , cancelled exception { undefined register names = new hash set < string > ( ) ; xml element element = parser next ( ) ; if ( ! element is start ( ) | | ! element get name ( ) equals ( " register values " ) ) { throw new s a x parse exception ( " expected register values start tag " , null , null , parser get line number ( ) , parser get column number ( ) ) ; } element = parser next ( ) ; while ( element ! = null & & element is start ( ) & & element get name ( ) equals ( " register value range " ) ) { if ( monitor is cancelled ( ) ) { throw new cancelled exception ( ) ; } process register values ( element , parser ) ; element = parser next ( ) ; if ( element is start ( ) | | ! element get name ( ) equals ignore case ( " register value range " ) ) { throw new s a x parse exception ( " expected register value range end tag " , null , null , parser get line number ( ) , parser get column number ( ) ) ; } / / read next tag element = parser next ( ) ; } if ( element ! = null & & ! element get name ( ) equals ( " register values " ) ) { throw new s a x parse exception ( " expected register values end tag " , null , null , parser get line number ( ) , parser get column number ( ) ) ; } }