parses the { @ code < tx : annotation - driven > } tag will { @ link aop namespace utils # register auto proxy creator if necessary register an auto proxy creator } with the container as necessary

public bean definition parse ( element element , parser context parser context ) { register transactional event listener factory ( parser context ) ; string mode = element get attribute ( " mode " ) ; if ( " aspectj " equals ( mode ) ) { / / mode = " aspectj " register transaction aspect ( element , parser context ) ; if ( class utils is present ( " javax transaction transactional " , get class ( ) get class loader ( ) ) ) { register jta transaction aspect ( element , parser context ) ; } } else { / / mode = " proxy " aop auto proxy configurer configure auto proxy creator ( element , parser context ) ; } return null ; }


completely rebuild filesystem index using item information contained within indexed property files empty folders will be lost

public static boolean rebuild ( file root dir ) throws i o exception { verify indexed file structure ( root dir ) ; indexed v 1 local file system fs = new indexed v 1 local file system ( root dir get absolute path ( ) ) ; fs rebuild index ( ) ; fs cleanup after construction ( ) ; fs dispose ( ) ; file error file = new file ( root dir , rebuild error file ) ; if ( error file exists ( ) ) { msg error ( local file system class , " indexed filesystem rebuild failed , see log for details : " + error file ) ; return false ; } msg info ( local file system class , " index rebuild completed : " + root dir ) ; return true ; }


private void update stat file ( long u time , long n time , long s time ) throws i o exception { file writer f writer = new file writer ( fake statfile ) ; f writer write ( string format ( stat file format , u time , n time , s time ) ) ; f writer close ( ) ; }


construct an in - memory keystore with multiple trusted cert entries

static key store build trust store ( iterable < certificate > certificates ) throws general security exception { assert certificates ! = null : " cannot create keystore with null certificates " ; key store store = build new key store ( ) ; int counter = 0 ; for ( certificate certificate : certificates ) { store set certificate entry ( " cert - " + counter , certificate ) ; counter + + ; } return store ; }


postmultiplies this matrix with a ( counter - clockwise ) rotation matrix postmultiplication is also used by open g l es ' 1 x gl translategl rotategl scale

public matrix 4 rotate rad ( vector 3 axis , float radians ) { if ( radians = = 0 ) return this ; quat set from axis rad ( axis , radians ) ; return rotate ( quat ) ; }


closes the given print stream , or closes it if is the standard output

private void close print stream ( print stream print stream ) { if ( print stream = = system out ) { print stream flush ( ) ; } else { print stream close ( ) ; } }


constructor with array is of same size and has all elements

public void test constructor 2 ( ) { atomic double array aa = new atomic double array ( values ) ; assert equals ( values length , aa length ( ) ) ; for ( int i = 0 ; i < values length ; i + + ) { assert bit equals ( values [ i ] , aa get ( i ) ) ; } }


return true if this enum arrays object is equal to o

public boolean equals ( object o ) { if ( this = = o ) { return true ; } if ( o = = null | | get class ( ) ! = o get class ( ) ) { return false ; } enum arrays enum arrays = ( enum arrays ) o ; return objects equals ( this just symbol , enum arrays just symbol ) & & objects equals ( this array enum , enum arrays array enum ) ; }


variant of { @ link # to entity flux ( class ) } with a { @ link parameterized type reference }

< t > mono < response entity < flux < t > > > to entity flux ( parameterized type reference < t > element type reference ) ;


returns the resource type id for example , rt cursor , rt bitmap , etc returns - 1 if this is a named resource

public int get type i d ( ) { return type i d ; }


fake endpoint for testing various parameters 가짜 엔드 포인트 fake endpoint for testing various parameters 가짜 엔드 포인트

public void test endpoint parameters ( big decimal number , double double , string pattern without delimiter , byte [ ] byte , integer integer , integer int 3 2 , long int 6 4 , float float , string string , file binary , local date date , offset date time date time , string password , string param callback ) throws api exception { test endpoint parameters with http info ( number , double , pattern without delimiter , byte , integer , int 3 2 , int 6 4 , float , string , binary , date , date time , password , param callback ) ; }


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


get the groups being used to map user - to - groups

public static synchronized groups get user to groups mapping service ( configuration conf ) { if ( groups = = null ) { if ( log is debug enabled ( ) ) { log debug ( " creating new groups object " ) ; } groups = new groups ( conf ) ; } return groups ; }


convert the specified dynamic symbol to a named symbol both symbol removed and symbol added notifications are performed , although the symbol instance is changed and continues to be valid

void convert dynamic symbol ( symbol d b symbol , string new name , long new parent i d , source type source ) { if ( source = = source type default ) { string msg = " can ' t rename dynamic symbol ' " + symbol get name ( ) + " ' and set its new source to default " ; throw new illegal argument exception ( msg ) ; } lock acquire ( ) ; try { long old key = symbol get key ( ) ; address address = symbol get address ( ) ; symbol removed ( symbol , address , symbol get name ( ) , old key , namespace global namespace id , null ) ; d b record record = adapter create symbol ( new name , address , new parent i d , symbol type label , 0 , 1 , null , source ) ; symbol set record ( record ) ; / / symbol object was morphed symbol added ( symbol ) ; } catch ( i o exception e ) { db error ( e ) ; } finally { lock release ( ) ; } }


is it just in first memory segment , we use quick way to do something

private static boolean in first segment ( memory segment [ ] segments , int offset , int num bytes ) { return num bytes + offset < = segments [ 0 ] size ( ) ; }


return the reverse zone name based on the address

private name get reverse zone name ( subnet utils utils , string network address ) { name reverse zone name = null ; boolean is large network = false ; if ( utils ! = null ) { is large network = utils get info ( ) get address count long ( ) > 256 ; } final string [ ] bytes = network address split ( " \ \ " ) ; if ( bytes length = = 4 ) { string reverse lookup zone name = null ; if ( is large network ) { reverse lookup zone name = string format ( " % s % s % s " , bytes [ 1 ] , bytes [ 0 ] , in addr arpa ) ; } else { reverse lookup zone name = string format ( " % s % s % s % s " , bytes [ 2 ] , bytes [ 1 ] , bytes [ 0 ] , in addr arpa ) ; } try { reverse zone name = name from string ( reverse lookup zone name ) ; } catch ( text parse exception e ) { log warn ( " unable to convert { } to dns name " , reverse lookup zone name ) ; } } return reverse zone name ; }


get the job id of the slot allocated for

public job i d get job i d ( ) { return job i d ; }


returns the non - function namespace with the given name contained inside the specified parent namespace pass < code > null < code > for namespace to indicate the global namespace

public final namespace get namespace ( namespace parent , string namespace name ) { return current program get symbol table ( ) get namespace ( namespace name , parent ) ; }


public void after properties set ( ) throws beans exception { if ( this locales to initialize ! = null ) { for ( locale locale : this locales to initialize ) { init factory ( locale ) ; } } }


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


convenience method for setting the value to an int value ;

public void set value ( int new value ) { set value ( big integer value of ( new value ) ) ; }


returns the value of this { @ code unsigned integer } as a { @ code float } , analogous to a widening primitive conversion from { @ code int } to { @ code float } , and correctly rounded

public float float value ( ) { return long value ( ) ; }


void clean up ( ) { blk movement tracker stop tracking ( ) ; if ( movement tracker thread ! = null ) { movement tracker thread interrupt ( ) ; } }


string get execution argument ( int daemon id ) { return null ; }


if the { @ code human readable } flag is set , writes both a formatted and unformatted version of the time value using the date transformer for the { @ link long } class

public x content builder time field ( string name , string readable name , long value ) throws i o exception { assert name equals ( readable name ) = = false : " expected raw and readable field names to differ , but they were both : " + name ; if ( human readable ) { function < object , object > long transformer = date transformers get ( long class ) ; if ( long transformer = = null ) { throw new illegal argument exception ( " cannot write time value xcontent for unknown value of type long " ) ; } field ( readable name ) value ( long transformer apply ( value ) ) ; } field ( name , value ) ; return this ; }


public boolean is private ( ) { return false ; }


returns an iterable that applies { @ code convert } to each element of { @ code from iterable } the conversion is done lazily the returned iterable ' s iterator supports { @ code remove ( ) } if the input iterator does after a successful { @ code remove ( ) } call , { @ code from iterable } no longer contains the corresponding element

public iterable < b > convert all ( final iterable < ? extends a > from iterable ) { check not null ( from iterable , " from iterable " ) ; return new iterable < b > ( ) { @ override public iterator < b > iterator ( ) { return new iterator < b > ( ) { private final iterator < ? extends a > from iterator = from iterable iterator ( ) ; @ override public boolean has next ( ) { return from iterator has next ( ) ; } @ override public b next ( ) { return convert ( from iterator next ( ) ) ; } @ override public void remove ( ) { from iterator remove ( ) ; } } ; } } ; }


state updates can be triggered from inside the change set calculation which causes an infinite loop because state updates calculates the change set again to prevent this we keep a track of how many times consequently state updates was invoked from within change set if this crosses the threshold a runtime exception is thrown

private void log state update when change set in progress ( ) { if ( + + m state updates from change set count = = state updates in loop threshold ) { components reporter emit message ( components reporter log level fatal , state updates in loop exceed threshold , " large number of state updates detected which indicates an infinite loop leading to unresponsive apps " ) ; } }


creates an instruction at the specified address

public instruction create code unit ( address address , instruction prototype prototype , mem buffer mem buf , processor context view context ) throws code unit insertion exception { lock acquire ( ) ; creating instruction = true ; try { address end addr = address add no wrap ( prototype get length ( ) - 1 ) ; check valid address range ( address , end addr ) ; instruction d b inst = add instruction ( address , end addr , prototype , mem buf , context ) ; / / fire event program set changed ( change manager docr code added , address , end addr , null , inst ) ; return inst ; } catch ( address overflow exception e ) { throw new code unit insertion exception ( " code unit would extend beyond address space " ) ; } catch ( i o exception e ) { program db error ( e ) ; } finally { creating instruction = false ; lock release ( ) ; } return null ; }


returns all nodes in this graph adjacent to { @ code node } which can be reached by traversing { @ code node } ' s incoming edges against the direction ( if any ) of the edge in an undirected graph , this is equivalent to { @ link # adjacent nodes ( object ) }


adds all of the converter testers from the given iterable only one tester for each class is permitted ; duplicates will cause { @ link # build } to fail

public builder add all ( iterable < converter tester > items ) { items for each ( this : : add ) ; return this ; }


to test \ & quot ; client \ & quot ; model to test \ & quot ; client \ & quot ; model

public client test client model ( @ valid client body ) ;


{ @ inherit doc } because the values for a given key may have duplicates and follow the insertion ordering , this method returns a { @ link list } , instead of the { @ link java util collection } specified in the { @ link multimap } interface


method that returns whether we can rollup from inner time unit to outer time unit

private static boolean can roll up ( time unit outer , time unit inner ) { / / special handling for quarter as it is not in the expected / / order in time unit switch ( outer ) { case year : case month : case day : case hour : case minute : case second : case millisecond : case microsecond : switch ( inner ) { case year : case quarter : case month : case day : case hour : case minute : case second : case millisecond : case microsecond : if ( inner = = time unit quarter ) { return outer = = time unit year ; } return outer ordinal ( ) < = inner ordinal ( ) ; } break ; case quarter : switch ( inner ) { case quarter : case month : case day : case hour : case minute : case second : case millisecond : case microsecond : return true ; } } return false ; }


verifies that nested directories are properly copied with a < tt > hdfs : < tt > file system ( from a < tt > file : absolutepath < tt > source path )

public void test copy from local recursive with scheme ( ) throws exception { final file system target file system = hdfs root path get file system ( hadoop config ) ; final path target dir = target file system get working directory ( ) ; test register multiple local resources ( target file system , target dir , local resource directory , temp folder , true , false ) ; }


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


returns a client to the single - node cluster

public client client ( ) { return wrap client ( node client ( ) ) ; }


unsafely removes the given entry from the given chain in this segment ' s hash table

e remove from chain for testing ( internal entry < k , v , ? > first , internal entry < k , v , ? > entry ) { return remove from chain ( cast for testing ( first ) , cast for testing ( entry ) ) ; }


determine if the array set contains all of the values in the given collection

public boolean contains all ( collection < ? > collection ) { iterator < ? > it = collection iterator ( ) ; while ( it has next ( ) ) { if ( ! contains ( it next ( ) ) ) { return false ; } } return true ; }


closes the connection with the socket server

public void close ( ) throws exception { try { if ( output stream ! = null ) { output stream flush ( ) ; output stream close ( ) ; } / / first regular attempt to cleanly close failing that will escalate if ( client ! = null ) { client close ( ) ; } } catch ( exception e ) { throw new i o exception ( " error while closing connection that streams data back to client at " + host ip to string ( ) + " : " + port , e ) ; } finally { / / if we failed prior to closing the client , close it if ( client ! = null ) { try { client close ( ) ; } catch ( throwable t ) { / / best effort to close , we do not care about an exception here any more } } } }


test of local header at method , of class zip in

public void test local header at ( ) throws exception { int count = entry count ; string filename = " test jar " ; zip file builder builder = new zip file builder ( ) ; for ( int i = 0 ; i < count ; i + + ) { builder add ( " pkg / f " + i + " class " , " all day long " ) ; } builder create ( filename ) ; final zip in zip in = new zip in ( filename ) ; zip in central directory ( ) ; list < directory entry > list = zip in central directory ( ) list ( ) ; count = 0 ; string name ; local file header header ; for ( directory entry dir entry : list ) { name = " pkg / f " + count + " class " ; header = zip in local header at ( dir entry get ( cenoff ) ) ; assert that ( dir entry get filename ( ) ) is equal to ( name ) ; assert that ( header get filename ( ) ) is equal to ( name ) ; count + + ; } }


transcodes an image to match the specified rotation angle and the scale factor

public static void transcode jpeg ( final input stream input stream , final output stream output stream , final int rotation angle , final int scale numerator , final int quality ) throws i o exception { native jpeg transcoder so loader ensure ( ) ; preconditions check argument ( scale numerator > = min scale numerator ) ; preconditions check argument ( scale numerator < = max scale numerator ) ; preconditions check argument ( quality > = min quality ) ; preconditions check argument ( quality < = max quality ) ; preconditions check argument ( jpeg transcoder utils is rotation angle allowed ( rotation angle ) ) ; preconditions check argument ( scale numerator ! = scale denominator | | rotation angle ! = 0 , " no transformation requested " ) ; native transcode jpeg ( preconditions check not null ( input stream ) , preconditions check not null ( output stream ) , rotation angle , scale numerator , quality ) ; }


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


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


any comment associated with the value < code > optional string comment = 2 ; < code >

public java lang string get comment ( ) { return comment ; }


returns the character located at the specified index in the buffer the index value is referenced from the current buffer position

public final char char at ( int index ) { if ( index < 0 | | index > = remaining ( ) ) { throw new index out of bounds exception ( ) ; } return get ( position + index ) ; }


post fake { pet id } upload image with required file : uploads an image ( required )

default response entity < model api response > upload file with required file ( @ api param ( value = " id of pet to update " , required = true ) @ path variable ( " pet id " ) long pet id , @ api param ( value = " file to upload " ) @ valid @ request part ( value = " required file " , required = true ) multipart file required file , @ api param ( value = " additional data to pass to server " ) @ valid @ request part ( value = " additional metadata " , required = false ) string additional metadata ) { return get delegate ( ) upload file with required file ( pet id , required file , additional metadata ) ; }


load tinker j a rs and add them to the application class loader

public static boolean load tinker ark hot ( final tinker application application , string directory , intent intent result ) { if ( ark hot apk info is empty ( ) ) { share tinker log w ( tag , " there is no apk to load " ) ; return true ; } path class loader class loader = ( path class loader ) tinker ark hot loader class get class loader ( ) ; if ( class loader ! = null ) { share tinker log i ( tag , " classloader : " + class loader to string ( ) ) ; } else { share tinker log e ( tag , " classloader is null " ) ; share intent util set intent return code ( intent result , share constants error load patch version dex classloader null ) ; return false ; } string apk path = directory + " / " + arkhot path + " / " ; array list < file > legal files = new array list < > ( ) ; / / verify merge class n apk if ( is ark hot runing & & ! ark hot apk info is empty ( ) ) { file class n file = null ; class n file = new file ( apk path + share constants arkhot patch name ) ; legal files add ( class n file ) ; } try { / / system class loader adder install apk ( class loader , legal files ) ; } catch ( throwable e ) { share tinker log e ( tag , " install dexes failed " ) ; intent result put extra ( share intent util intent patch exception , e ) ; share intent util set intent return code ( intent result , share constants error load patch version dex load exception ) ; return false ; } return true ; }


converts the given address range back from the source range back to the mapped range note : it is important that the specified mapped source range is restricted to the mapped source area of the specified mapped block

private address range get mapped range ( memory block mapped block , address range mapped source range ) { address start , end ; long source range length = mapped source range get length ( ) ; if ( source range length < = 0 ) { throw new assert exception ( " invalid mapped source range length " ) ; } memory block source info info = mapped block get source infos ( ) get ( 0 ) ; long start offset = mapped source range get min address ( ) subtract ( info get mapped range ( ) get ( ) get min address ( ) ) ; boolean is bit mapped = mapped block get type ( ) = = memory block type bit mapped ; try { if ( is bit mapped ) { start offset * = 8 ; start = mapped block get start ( ) add no wrap ( start offset ) ; long end offset = start offset + ( source range length * 8 ) - 1 ; / / since end may only partially consume a byte we must limit end address end = ( end offset < mapped block get size ( ) ) ? mapped block get start ( ) add no wrap ( end offset ) : mapped block get end ( ) ; } else { / / byte mapped byte mapping scheme byte mapping scheme = info get byte mapping scheme ( ) get ( ) ; start = byte mapping scheme get mapped address ( mapped block , start offset , false ) ; long end offset = start offset + source range length - 1 ; end = byte mapping scheme get mapped address ( mapped block , end offset , true ) ; if ( start = = null | | start compare to ( end ) > 0 ) { return null ; / / mapped source range corresponds to non - mapped / skipped bytes } } } catch ( address overflow exception e ) { throw new address out of bounds exception ( e get message ( ) ) ; } return new address range impl ( start , end ) ; }


wait till event thread enters waiting state ( i e waiting for new events )

public void wait for event thread to wait ( ) { while ( ! is event thread waiting ( ) ) { thread yield ( ) ; } }


return the path within the servlet mapping for the given request , i e the part of the request ' s url beyond the part that called the servlet , or " " if the whole url has been used to identify the servlet

public string get path within servlet mapping ( http servlet request request ) { return get path within servlet mapping ( request , get path within application ( request ) ) ; }


sets an offset that will be added to the timestamps ( and sub - sample timestamps ) of samples that are subsequently queued

public final void set sample offset us ( long sample offset us ) { if ( this sample offset us ! = sample offset us ) { this sample offset us = sample offset us ; invalidate upstream format adjustment ( ) ; } }


mark an access of the specified entry used only in { @ code compact linked hash map } for lru ordering

void access entry ( int index ) { / / no - op by default }


{ @ inherit doc } all elements in the returned list must be { @ link listenable future } instances the easiest way to obtain a { @ code list < listenable future < t > > } from this method is an unchecked ( but safe ) cast : { @ code @ suppress warnings ( " unchecked " ) guaranteed by invoke all contract } { @ code list < listenable future < t > > futures = ( list ) executor invoke all ( tasks ) ; }

< t > list < future < t > > invoke all ( collection < ? extends callable < t > > tasks ) throws interrupted exception ;


adds the given element to this queue if the queue is currently full , the element at the head of the queue is evicted to make room

public boolean offer ( e e ) { return add ( e ) ; }


returns the value nearest to { @ code value } which is within the closed range { @ code [ min max ] } if { @ code value } is within the range { @ code [ min max ] } , { @ code value } is returned unchanged if { @ code value } is less than { @ code min } , { @ code min } is returned , and if { @ code value } is greater than { @ code max } , { @ code max } is returned

public static long constrain to range ( long value , long min , long max ) { check argument ( min < = max , " min ( % s ) must be less than or equal to max ( % s ) " , min , max ) ; return math min ( math max ( value , min ) , max ) ; }


read the next instruction and executes it on the given state machine

public void execute ( ) throws i o exception { int opcode = reader read next byte ( ) & 0xff ; if ( opcode = = 0 ) { execute extended ( opcode ) ; } else if ( opcode > = prologue get opcode base ( ) ) { execute special ( opcode ) ; } else { execute standard ( opcode ) ; } }


creates a { @ link hash set } instance , with a high enough " initial capcity " that it should hold { @ code expected size } elements without growth

private static < t > hash set < t > new hash set with expected size ( int expected size ) { return new hash set < t > ( calculate initial capacity ( expected size ) ) ; }


tells whether a constructor or destructor is present

public boolean has constructor or destructor ( ) { return constructor or destructor present ; }


sets the csv reader vertices file to ignore any invalid lines this is useful for files that contain an empty line at the end , multiple header lines or comments this would throw an exception otherwise

public graph csv reader ignore invalid lines vertices ( ) { if ( this vertex reader ! = null ) { this vertex reader ignore invalid lines ( ) ; } return this ; }


get the value indicating if caller context is enabled

boolean get caller context enabled ( ) { return is caller context enabled ; }


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


creates a map by parsing text split text into key - value pairs using two delimiters the first delimiter separates pairs , and the second delimiter separates key and value if only one parameter is given , default delimiters are used : ' , ' as delimiter 1 and ' = ' as delimiter 2

public static map < string , string > str to map ( string text ) { return str to map ( text , " , " , " = " ) ; }


public void set commit method ( method commit method ) { this commit method = commit method ; }


roll a new version of the given key generating the material for it this implementation generates the key material and calls the { @ link # roll new version ( string , byte [ ] ) } method

public key version roll new version ( string name ) throws no such algorithm exception , i o exception { metadata meta = get metadata ( name ) ; if ( meta = = null ) { throw new i o exception ( " can ' t find metadata for key " + name ) ; } byte [ ] material = generate key ( meta get bit length ( ) , meta get cipher ( ) ) ; return roll new version ( name , material ) ; }


returns whether the given sphere is in the frustum

public boolean sphere in frustum ( float x , float y , float z , float radius ) { for ( int i = 0 ; i < 6 ; i + + ) if ( ( planes [ i ] normal x * x + planes [ i ] normal y * y + planes [ i ] normal z * z ) < ( - radius - planes [ i ] d ) ) return false ; return true ; }


found trusted certificates with the same dn + same public keys , but different certificates

private static certificate trust same public key ( list < x 5 0 9 certificate > issuer certs ) { return new certificate trust ( issuer certs , true , false ) ; }


optionally hide this part of the command line from being printed to the log

public argument list builder add ( string a , boolean mask ) { if ( a ! = null ) { if ( mask ) { this mask set ( args size ( ) ) ; } args add ( a ) ; } return this ; }


removes the specified element from the given array

public static void remove ( object [ ] array , int size , int index ) { system arraycopy ( array , index + 1 , array , index , array length - index - 1 ) ; array [ size - 1 ] = null ; }


test the property ' prefix namespace integer '

public void prefix namespace integer test ( ) { / / todo : test prefix namespace integer }


this test tries to simulate load while creating an index and indexing documents while the index is being created

public void test auto generate id no duplicates ( ) throws exception { int number of iterations = scaled random int between ( 10 , 50 ) ; for ( int i = 0 ; i < number of iterations ; i + + ) { exception first error = null ; create index ( " test " ) ; int num of docs = random int between ( 10 , 100 ) ; logger info ( " indexing [ { } ] docs " , num of docs ) ; list < index request builder > builders = new array list < > ( num of docs ) ; for ( int j = 0 ; j < num of docs ; j + + ) { builders add ( client ( ) prepare index ( " test " ) set source ( " field " , " value " + j ) ) ; } index random ( true , builders ) ; logger info ( " verifying indexed content " ) ; int num of checks = random int between ( 8 , 12 ) ; for ( int j = 0 ; j < num of checks ; j + + ) { try { logger debug ( " running search with all types " ) ; search response response = client ( ) prepare search ( " test " ) get ( ) ; if ( response get hits ( ) get total hits ( ) value ! = num of docs ) { final string message = " count is " + response get hits ( ) get total hits ( ) value + " but " + num of docs + " was expected " + elasticsearch assertions format shard status ( response ) ; logger error ( " { } search response : \ n { } " , message , response ) ; fail ( message ) ; } } catch ( exception e ) { logger error ( " search for all docs types failed " , e ) ; if ( first error = = null ) { first error = e ; } } try { logger debug ( " running search with a specific type " ) ; search response response = client ( ) prepare search ( " test " ) get ( ) ; if ( response get hits ( ) get total hits ( ) value ! = num of docs ) { final string message = " count is " + response get hits ( ) get total hits ( ) value + " but " + num of docs + " was expected " + elasticsearch assertions format shard status ( response ) ; logger error ( " { } search response : \ n { } " , message , response ) ; fail ( message ) ; } } catch ( exception e ) { logger error ( " search for all docs of a specific type failed " , e ) ; if ( first error = = null ) { first error = e ; } } } if ( first error ! = null ) { fail ( first error get message ( ) ) ; } internal cluster ( ) wipe indices ( " test " ) ; } }


encodes this instance to the given output

public final void encode ( code output out ) { format encode ( this , out ) ; }


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

public void test filter prefix ( ) throws i o exception { final builder sample = builder - > builder start object ( ) array ( " photos " , " foo " , " bar " ) field ( " photos count " , 2 ) end object ( ) ; builder expected = builder - > builder start object ( ) field ( " photos count " , 2 ) end object ( ) ; test filter ( expected , sample , singleton ( " photos count " ) , empty set ( ) ) ; }


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

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


public object get anytype 3 ( ) { return anytype 3 ; }


public static void main ( string [ ] args ) { var user = new user ( " user " , 24 , sex female , " foobar com " ) ; logger info ( validator of ( user ) validate ( user : : get name , objects : : non null , " name is null " ) validate ( user : : get name , name - > ! name is empty ( ) , " name is empty " ) validate ( user : : get email , email - > ! email contains ( " @ " ) , " email doesn ' t contains ' @ ' " ) validate ( user : : get age , age - > age > 20 & & age < 30 , " age isn ' t between " ) get ( ) to string ( ) ) ; }


id for a peer recovery retention lease for the given { @ link shard routing } see { @ link replication tracker # add peer recovery retention lease }

public static string get peer recovery retention lease id ( shard routing shard routing ) { return get peer recovery retention lease id ( shard routing current node id ( ) ) ; }


public void set source ( list < e > source ) { assert not null ( source , " source list must not be null " ) ; this source = source ; this refresh date = new date ( ) ; this sort used = null ; }


get the name of the currently running task , if any

public string current task name ( ) { return this current task name ; }


formats an { @ code int } as a 4 - byte signed hex value

public static string s 4 ( int v ) { char [ ] result = new char [ 9 ] ; if ( v < 0 ) { result [ 0 ] = ' - ' ; v = - v ; } else { result [ 0 ] = ' + ' ; } for ( int i = 0 ; i < 8 ; i + + ) { result [ 8 - i ] = character for digit ( v & 0x 0f , 16 ) ; v > > = 4 ; } return new string ( result ) ; }


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


public list < o m f seg map > get o m f seg maps ( ) { return seg maps list ; }


the thrift type for the value defined in zipkin ' s thrift definition note this is not the t binary protocol field type !


schedules { @ link # action } after { @ link # delay ms } the { @ link # next } node will be scheduled immediately after { @ link # action } is executed

public void schedule ( simple exo player player , default track selector track selector , @ nullable surface surface , handler wrapper main handler ) { this player = player ; this track selector = track selector ; this surface = surface ; this main handler = main handler ; if ( delay ms = = 0 & & looper my looper ( ) = = main handler get looper ( ) ) { run ( ) ; } else { main handler post delayed ( this , delay ms ) ; } }


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

public api response < void > update user with http info ( string username , user body ) throws api exception { http request builder local var request builder = update user request builder ( username , body ) ; try { http response < input stream > local var response = member var http client send ( local var request builder build ( ) , http response body handlers of input stream ( ) ) ; if ( member var response interceptor ! = null ) { member var response interceptor accept ( local var response ) ; } if ( local var response status code ( ) / 100 ! = 2 ) { throw new api exception ( local var response status code ( ) , " update user call received non - success response " , local var response headers ( ) , local var response body ( ) = = null ? null : new string ( local var response body ( ) read all bytes ( ) ) ) ; } return new api response < void > ( local var response status code ( ) , local var response headers ( ) map ( ) , null ) ; } catch ( i o exception e ) { throw new api exception ( e ) ; } catch ( interrupted exception e ) { thread current thread ( ) interrupt ( ) ; throw new api exception ( e ) ; } }


{ @ inherit doc } this editor provides a panel containing a { @ link task monitor component } and the ability to reload the columns ' data ; if the delegate editor provides an inline editor , this wraps it , and switches between task view and the editor depending on the executing state of the data - load task

protected component build inline editor component ( ) { j panel editor panel = new j panel ( new border layout ( ) ) ; status label = new g d html label ( ) ; status label set horizontal alignment ( swing constants center ) ; task monitor component = new task monitor component ( ) ; reload data button = new empty border button ( icons refresh icon ) ; reload data button set tool tip text ( " reload column data " ) ; reload data button add action listener ( e - > load data ( ) ) ; view layout = new card layout ( ) ; view panel = new j panel ( view layout ) ; view panel add ( task monitor component , task view ) ; component editor component = build delegate inline editor ( ) ; if ( editor component ! = null ) { editor panel add ( editor component , border layout center ) ; view panel add ( editor panel , editor view ) ; has inline editor component = true ; } j panel button panel = new j panel ( new column layout ( 2 , 2 , 1 ) ) ; button panel set border ( border factory create empty border ( 2 , 0 , 2 , 0 ) ) ; button panel add ( reload data button ) ; j panel panel = new j panel ( new border layout ( ) ) ; panel add ( view panel , border layout center ) ; panel add ( button panel , border layout east ) ; panel add ( status label , border layout south ) ; return panel ; }


do the move operation called from the drag source adapter when the drop completes and the user action was a dn d constants move


called when the audio track has provided an invalid latency

void on invalid latency ( long latency us ) ;


prepares the legend and calculates all needed forms , labels and colors

public void compute legend ( chart data < ? > data ) { if ( ! m legend is legend custom ( ) ) { computed entries clear ( ) ; / / loop for building up the colors and labels used in the legend for ( int i = 0 ; i < data get data set count ( ) ; i + + ) { i data set data set = data get data set by index ( i ) ; if ( data set = = null ) continue ; list < integer > clrs = data set get colors ( ) ; int entry count = data set get entry count ( ) ; / / if we have a barchart with stacked bars if ( data set instanceof i bar data set & & ( ( i bar data set ) data set ) is stacked ( ) ) { i bar data set bds = ( i bar data set ) data set ; string [ ] s labels = bds get stack labels ( ) ; int min entries = math min ( clrs size ( ) , bds get stack size ( ) ) ; for ( int j = 0 ; j < min entries ; j + + ) { string label ; if ( s labels length > 0 ) { int label index = j % min entries ; label = label index < s labels length ? s labels [ label index ] : null ; } else { label = null ; } computed entries add ( new legend entry ( label , data set get form ( ) , data set get form size ( ) , data set get form line width ( ) , data set get form line dash effect ( ) , clrs get ( j ) ) ) ; } if ( bds get label ( ) ! = null ) { / / add the legend description label computed entries add ( new legend entry ( data set get label ( ) , legend legend form none , float na n , float na n , null , color template color none ) ) ; } } else if ( data set instanceof i pie data set ) { i pie data set pds = ( i pie data set ) data set ; for ( int j = 0 ; j < clrs size ( ) & & j < entry count ; j + + ) { computed entries add ( new legend entry ( pds get entry for index ( j ) get label ( ) , data set get form ( ) , data set get form size ( ) , data set get form line width ( ) , data set get form line dash effect ( ) , clrs get ( j ) ) ) ; } if ( pds get label ( ) ! = null ) { / / add the legend description label computed entries add ( new legend entry ( data set get label ( ) , legend legend form none , float na n , float na n , null , color template color none ) ) ; } } else if ( data set instanceof i candle data set & & ( ( i candle data set ) data set ) get decreasing color ( ) ! = color template color none ) { int decreasing color = ( ( i candle data set ) data set ) get decreasing color ( ) ; int increasing color = ( ( i candle data set ) data set ) get increasing color ( ) ; computed entries add ( new legend entry ( null , data set get form ( ) , data set get form size ( ) , data set get form line width ( ) , data set get form line dash effect ( ) , decreasing color ) ) ; computed entries add ( new legend entry ( data set get label ( ) , data set get form ( ) , data set get form size ( ) , data set get form line width ( ) , data set get form line dash effect ( ) , increasing color ) ) ; } else { / / all others for ( int j = 0 ; j < clrs size ( ) & & j < entry count ; j + + ) { string label ; / / if multiple colors are set for a data set , group them if ( j < clrs size ( ) - 1 & & j < entry count - 1 ) { label = null ; } else { / / add label to the last entry label = data get data set by index ( i ) get label ( ) ; } computed entries add ( new legend entry ( label , data set get form ( ) , data set get form size ( ) , data set get form line width ( ) , data set get form line dash effect ( ) , clrs get ( j ) ) ) ; } } } if ( m legend get extra entries ( ) ! = null ) { collections add all ( computed entries , m legend get extra entries ( ) ) ; } m legend set entries ( computed entries ) ; } typeface tf = m legend get typeface ( ) ; if ( tf ! = null ) m legend label paint set typeface ( tf ) ; m legend label paint set text size ( m legend get text size ( ) ) ; m legend label paint set color ( m legend get text color ( ) ) ; / / calculate all dimensions of the m legend m legend calculate dimensions ( m legend label paint , m view port handler ) ; }


given a configuration get the address of the lifeline rpc server if the lifeline rpc is not configured returns null

inet socket address get lifeline rpc server address ( configuration conf ) { string addr = get trimmed or null ( conf , dfs namenode lifeline rpc address key ) ; if ( addr = = null ) { return null ; } return net utils create socket addr ( addr ) ; }


join a thread as uninterruptible the call continues to block until the result is available even when the caller thread is interrupted the method will log any { @ link interrupted exception } then will re - interrupt the thread

public static void join uninterruptibly ( thread to join ) { boolean interrupted = false ; try { while ( true ) { try { to join join ( ) ; return ; } catch ( interrupted exception e ) { interrupted = true ; log warn ( " interrupted while sleeping " , e ) ; } } } finally { if ( interrupted ) { thread current thread ( ) interrupt ( ) ; } } }


performs an in - place selection to find the element which would appear at a given index in a dataset if it were sorted the following preconditions should hold : { @ code required } , { @ code from } , and { @ code to } should all be indexes into { @ code array } ; { @ code required } should be in the range [ { @ code from } , { @ code to } ] ; all the values with indexes in the range [ 0 , { @ code from } ) should be less than or equal to all the values with indexes in the range [ { @ code from } , { @ code to } ] ; all the values with indexes in the range ( { @ code to } , { @ code array length - 1 } ] should be greater than or equal to all the values with indexes in the range [ { @ code from } , { @ code to } ] this method will reorder the values with indexes in the range [ { @ code from } , { @ code to } ] such that all the values with indexes in the range [ { @ code from } , { @ code required } ) are less than or equal to the value with index { @ code required } , and all the values with indexes in the range ( { @ code required } , { @ code to } ] are greater than or equal to that value therefore , the value at { @ code required } is the value which would appear at that index in the sorted dataset

private static void select in place ( int required , double [ ] array , int from , int to ) { / / if we are looking for the least element in the range , we can just do a linear search for it / / ( we will hit this whenever we are doing quantile interpolation : our first selection finds / / the lower value , our second one finds the upper value by looking for the next least element ) if ( required = = from ) { int min = from ; for ( int index = from + 1 ; index < = to ; index + + ) { if ( array [ min ] > array [ index ] ) { min = index ; } } if ( min ! = from ) { swap ( array , min , from ) ; } return ; } / / let ' s play quickselect ! we ' ll repeatedly partition the range [ from , to ] containing the / / required element , as long as it has more than one element while ( to > from ) { int partition point = partition ( array , from , to ) ; if ( partition point > = required ) { to = partition point - 1 ; } if ( partition point < = required ) { from = partition point + 1 ; } } }


public void set awake ( boolean awake ) { this awake = awake ; }


name to desc java util map [ ] [ ] = > " [ [ ljavautil map ; "

public static string name 2desc ( string name ) { string builder sb = new string builder ( ) ; int c = 0 , index = name index of ( ' [ ' ) ; if ( index > 0 ) { c = ( name length ( ) - index ) / 2 ; name = name substring ( 0 , index ) ; } while ( c - - > 0 ) { sb append ( " [ " ) ; } if ( " void " equals ( name ) ) { sb append ( jvm void ) ; } else if ( " boolean " equals ( name ) ) { sb append ( jvm boolean ) ; } else if ( " byte " equals ( name ) ) { sb append ( jvm byte ) ; } else if ( " char " equals ( name ) ) { sb append ( jvm char ) ; } else if ( " double " equals ( name ) ) { sb append ( jvm double ) ; } else if ( " float " equals ( name ) ) { sb append ( jvm float ) ; } else if ( " int " equals ( name ) ) { sb append ( jvm int ) ; } else if ( " long " equals ( name ) ) { sb append ( jvm long ) ; } else if ( " short " equals ( name ) ) { sb append ( jvm short ) ; } else { sb append ( ' l ' ) append ( name replace ( ' ' , ' / ' ) ) append ( ' ; ' ) ; } return sb to string ( ) ; }


add a maximum statistic to dynamically return the latest value of the source

public dynamic i o statistics builder with atomic integer maximum ( string key , atomic integer source ) { with long function maximum ( key , s - > source get ( ) ) ; return this ; }


< code > merge code units < code > merges all instructions andor data ( as indicated ) in the specified address set from the origin program it merges them into the result program when merging instructions , the bytes are also replaced if they differ this assumes origin to result translator maps address spaces and does not do fine - grained mapping of addresses

public void merge code units ( address set view origin address set , address set view byte diffs , boolean merge data bytes , task monitor monitor ) throws memory access exception , cancelled exception , unsupported operation exception { if ( ! origin to result translator is one for one translator ( ) ) { string message = origin to result translator get class ( ) get name ( ) + " is not a one for one translator and can ' t merge code units " ; throw new unsupported operation exception ( message ) ; } monitor set message ( " applying code units " ) ; if ( origin address set is empty ( ) ) { return ; } program context origin context = origin program get program context ( ) ; program context result context = result program get program context ( ) ; register origin context reg = origin context get base context register ( ) ; register result context reg = result context get base context register ( ) ; / / expand ranges to keep delay - slots together within origin range / / may need to expand each range up or down origin address set = simple diff utility expand address set to include full delay slots ( origin program , origin address set ) ; / / don ' t clear instructions which match ( same instruction prototype ) so that references / / are preserved for ( address range origin range : origin address set get address ranges ( ) ) { / / get a new address set for this range that does not include any addresses where / / the origin and result instruction prototypes are the same / / the range address set will be used to clear code units address set range set = new address set ( origin range ) ; instruction iterator instructions = origin listing get instructions ( new address set ( origin range ) , true ) ; for ( instruction instruction : instructions ) { address result address = origin to result translator get address ( instruction get min address ( ) ) ; instruction result instruction = result listing get instruction at ( result address ) ; if ( ! should clear instruction ( instruction , result instruction ) ) { / / remove any instructions with matching prototypes , so they won ' t be cleared range set delete ( instruction get min address ( ) , instruction get max address ( ) ) ; } } / / clear the code units still in our range set for ( address range new origin range : range set get address ranges ( ) ) { address range result range = origin to result translator get address range ( new origin range ) ; / / clear any existing code units in the merged program / / where this code unit needs to go result listing clear code units ( result range get min address ( ) , result range get max address ( ) , false ) ; try { if ( result context reg ! = null ) { if ( origin context reg ! = null ) { / / copy context register value merge program context ( result context , origin context , origin context get base context register ( ) , new origin range , result range , monitor ) ; } else { / / clear context register value if it did not exist in original result context remove ( result range get min address ( ) , result range get max address ( ) , result context reg ) ; } } } catch ( context change exception e ) { msg error ( this , " unexpected exception : " + e get message ( ) , e ) ; } } } code unit iterator origin source code units = origin listing get code units ( origin address set , true ) ; / / get each code unit out of the iterator and set it in the merged / / program if it is an instruction for ( long count = 0 ; origin source code units has next ( ) & & ! monitor is cancelled ( ) ; count + + ) { monitor check canceled ( ) ; code unit origin code unit = origin source code units next ( ) ; if ( count = = progress counter granularity ) { monitor set message ( " applying code units " + origin code unit get address string ( true , false ) ) ; count = 0 ; } / / note : perform merge instruction ( ) and perform merge data ( ) / / clear the existing code units and then create a / / new instruction or data / / may cause the merge code unit to lose info attached / / to it if ( origin code unit instanceof instruction ) { instruction origin instruction = ( instruction ) origin code unit ; address result address = origin to result translator get address ( origin instruction get min address ( ) ) ; instruction result instruction = result listing get instruction at ( result address ) ; if ( result instruction = = null | | ! origin instruction get prototype ( ) equals ( result instruction get prototype ( ) ) ) { perform merge instruction ( origin instruction , byte diffs ) ; } else { copy instruction attributes ( origin instruction , result instruction ) ; } } else if ( origin code unit instanceof data ) { try { perform merge data ( ( data ) origin code unit , byte diffs , merge data bytes ) ; } catch ( code unit insertion exception e ) { info msg append ( " diff / merge can ' t apply data from " + origin code unit get min address ( ) + " " + e get message ( ) ) ; } } } }


defines how runtime fields are dynamically created when objects are mapped with dynamic : runtime

default dynamic runtime fields builder get dynamic runtime fields builder ( ) { return null ; }


parses a { @ code local variable table } attribute

private attribute local variable table ( direct class file cf , int offset , int length , parse observer observer ) { if ( length < 2 ) { return throw severely truncated ( ) ; } byte array bytes = cf get bytes ( ) ; int count = bytes get unsigned short ( offset ) ; if ( observer ! = null ) { observer parsed ( bytes , offset , 2 , " local variable table length : " + hex u 2 ( count ) ) ; } local variable list list = parse local variables ( bytes slice ( offset + 2 , offset + length ) , cf get constant pool ( ) , observer , count , false ) ; return new att local variable table ( list ) ; }


called the first time { @ link # act ( float ) } is called this is a good place to query the { @ link # actor actor ' s } starting state


calculates the squared radius of the bounding sphere around the specified center for the specified part

public float calculate radius ( final float center x , final float center y , final float center z ) { return calculate radius ( center x , center y , center z , 0 , get num indices ( ) , null ) ; }


perform a cleanup on the given resource ( which is left bound to the thread )

protected mono < void > cleanup resource ( o resource holder , k resource key , boolean committed ) { return mono empty ( ) ; }


wrap an object , if necessary if the object is null , return the null object if it is an array or collection , wrap it in a j s o n array if it is a map , wrap it in a j s o n object if it is a standard property ( double , string , et al ) then it is already wrapped otherwise , if it comes from one of the java packages , turn it into a string and if it doesn ' t , try to wrap it in a j s o n object if the wrapping fails , then null is returned

static object wrap ( object object ) { try { if ( object = = null ) { return null ; } if ( object instanceof j s o n object | | object instanceof j s o n array | | object instanceof byte | | object instanceof character | | object instanceof short | | object instanceof integer | | object instanceof long | | object instanceof boolean | | object instanceof float | | object instanceof double | | object instanceof string | | null equals ( object ) ) { return object ; } if ( object instanceof collection ) { return new j s o n array ( ( collection ) object ) ; } if ( object get class ( ) is array ( ) ) { return new j s o n array ( object ) ; } if ( object instanceof map ) { return new j s o n object ( ( map ) object ) ; } package object package = object get class ( ) get package ( ) ; string object package name = ( object package ! = null ? object package get name ( ) : " " ) ; if ( object package name starts with ( " java " ) | | object package name starts with ( " javax " ) | | object get class ( ) get class loader ( ) = = null ) { return object to string ( ) ; } return new j s o n object ( object ) ; } catch ( exception exception ) { return null ; } }


put authentication into conversation scope

public static void put authentication ( final authentication authentication , final request context ctx ) { ctx get conversation scope ( ) put ( parameter authentication , authentication ) ; }


is called in context of caller thread before call to { @ link # call ( ) } large tasks should not be performed in this method as it will block the caller thread small tasks such as validations can be performed here so that the performance penalty of context switching is not incurred in case of invalid requests


sets the model ' s current selection to the indicated selection if the selection is empty , it gets adjusted to the empty last line when in unlocked mode

public void set selection ( field selection selection ) { if ( updating selection ) { return ; } if ( this selection equals ( selection ) ) { return ; } end field editing ( ) ; this selection clear ( ) ; int num ranges = selection get num ranges ( ) ; for ( int i = 0 ; i < num ranges ; i + + ) { field range range = selection get field range ( i ) ; this selection add range ( range get start ( ) get index ( ) int value ( ) , range get end ( ) get index ( ) int value ( ) ) ; } adjust current row ( ) ; selection changed ( ) ; }


check whether the boundaries are invalid ( upper & lt ; lower ) or not if they do , the value does not have to be evaluate

private boolean are boundaries invalid ( ) { integer compare = binary comparison compare ( lower fold ( ) , upper fold ( ) ) ; / / upper < lower or upper = = lower and the range doesn ' t contain any equals return compare ! = null & & ( compare > 0 | | ( compare = = 0 & & ( ! include lower | | ! include upper ) ) ) ; }


return an empty list , always , since this context does not support the use of type references

public list < constructor resolver > get constructor resolvers ( ) { return collections empty list ( ) ; }


called once for each keyvalue pair in the input split most applications should override this , but the default is the identity function

protected void map ( keyin key , valuein value , context context ) throws i o exception , interrupted exception { context write ( ( keyout ) key , ( valueout ) value ) ; }


test that fsck still works with ha enabled

public void test ha fsck ( ) throws exception { configuration conf = new configuration ( ) ; / / need some http ports mini d f s n n topology topology = new mini d f s n n topology ( ) add nameservice ( new mini d f s n n topology n s conf ( " ha - nn - uri - 0 " ) add n n ( new mini d f s n n topology n n conf ( " nn 1 " ) set http port ( 10051 ) ) add n n ( new mini d f s n n topology n n conf ( " nn 2 " ) set http port ( 10052 ) ) ) ; mini d f s cluster cluster = new mini d f s cluster builder ( conf ) nn topology ( topology ) num data nodes ( 0 ) build ( ) ; file system fs = null ; try { cluster wait active ( ) ; cluster transition to active ( 0 ) ; / / make sure conf has the relevant ha configs h a test util set failover configurations ( cluster , conf , " ha - nn - uri - 0 " , 0 ) ; fs = h a test util configure failover fs ( cluster , conf ) ; fs mkdirs ( new path ( " / test 1 " ) ) ; fs mkdirs ( new path ( " / test 2 " ) ) ; run fsck ( conf ) ; cluster transition to standby ( 0 ) ; cluster transition to active ( 1 ) ; run fsck ( conf ) ; / / stop one standby namenode , fsck should still be successful , since there / / is one active namenode available cluster get name node ( 0 ) stop ( ) ; run fsck ( conf ) ; } finally { if ( fs ! = null ) { fs close ( ) ; } if ( cluster ! = null ) { cluster shutdown ( ) ; } } }


test the audit log format for successful events passing nulls

private void test success log nulls ( boolean check i p ) { string s log = r m audit logger create success log ( null , null , null , null , null , null , null ) ; string builder exp log = new string builder ( ) ; exp log append ( " user = null \ t " ) ; if ( check i p ) { inet address ip = server get remote ip ( ) ; exp log append ( keys ip name ( ) + " = " + ip get host address ( ) + " \ t " ) ; } exp log append ( " operation = null \ t t a r g e t = null \ t r e s u l t = success " ) ; assert equals ( exp log to string ( ) , s log ) ; }


returns the raw call , initializing it if necessary throws if initializing the raw call throws , or has thrown in previous attempts to create it

private okhttp 3 call get raw call ( ) throws i o exception { okhttp 3 call call = raw call ; if ( call ! = null ) return call ; / / re - throw previous failures if this isn ' t the first attempt if ( creation failure ! = null ) { if ( creation failure instanceof i o exception ) { throw ( i o exception ) creation failure ; } else if ( creation failure instanceof runtime exception ) { throw ( runtime exception ) creation failure ; } else { throw ( error ) creation failure ; } } / / create and remember either the success or the failure try { return raw call = create raw call ( ) ; } catch ( runtime exception | error | i o exception e ) { throw if fatal ( e ) ; / / do not assign a fatal error to creation failure creation failure = e ; throw e ; } }


key command : ssh - keygen - f dsa - t dsa - b 1024 - m pem

public void load key d s a ( ) throws i o exception , general security exception { file file = new file ( this get class ( ) get resource ( " dsa " ) get file ( ) ) ; assert key pair not null ( file , null ) ; }


build the { @ link app settings dialog } from the specified options generally followed by a call to { @ link app settings dialog # show ( ) }

public app settings dialog build ( ) { m rationale = text utils is empty ( m rationale ) ? m context get string ( r string rationale ask again ) : m rationale ; m title = text utils is empty ( m title ) ? m context get string ( r string title settings dialog ) : m title ; m positive button text = text utils is empty ( m positive button text ) ? m context get string ( android r string ok ) : m positive button text ; m negative button text = text utils is empty ( m negative button text ) ? m context get string ( android r string cancel ) : m negative button text ; m request code = m request code > 0 ? m request code : default settings req code ; int intent flags = 0 ; if ( m open in new task ) { intent flags | = intent flag activity new task ; } return new app settings dialog ( m activity or fragment , m theme res id , m rationale , m title , m positive button text , m negative button text , m request code , intent flags ) ; }


the grouping function is used in conjunction with grouping sets , rollup and cube to indicate which columns are present in that grouping the grouping function must be invoked with arguments that exactly match the columns referenced in the corresponding grouping set , rollup or cube clause at the associated query level those column arguments are not evaluated and instead the function is re - written with the arguments below to compute the resulting bit set for a particular row , bits are assigned to the argument columns with the rightmost column being the most significant bit for a given grouping , a bit is set to 0 if the corresponding column is included in the grouping and 1 otherwise for an example , see the sql documentation for the function

static long calculate grouping ( set < integer > grouping set , list < integer > columns ) { long grouping = ( 1l < < columns size ( ) ) - 1 ; for ( int index = 0 ; index < columns size ( ) ; index + + ) { int column = columns get ( index ) ; if ( grouping set contains ( column ) ) { / / leftmost argument to grouping ( ) ( i e when index = 0 ) corresponds to / / the most significant bit in the result that is why we shift 1l starting / / from the columns size ( ) - 1 bit index grouping = grouping & ~ ( 1l < < ( columns size ( ) - 1 - index ) ) ; } } return grouping ; }


copied the content of this string to a character array

public void copy ( int src idx , char [ ] dst , int dst idx , int length ) { object util check not null ( dst , " dst " ) ; if ( is out of bounds ( src idx , length , length ( ) ) ) { throw new index out of bounds exception ( " expected : " + " 0 < = src idx ( " + src idx + " ) < = src idx + length ( " + length + " ) < = src len ( " + length ( ) + ' ) ' ) ; } final int dst end = dst idx + length ; for ( int i = dst idx , j = src idx + array offset ( ) ; i < dst end ; i + + , j + + ) { dst [ i ] = b 2c ( value [ j ] ) ; } }


set the serialization schema used to serialize objects to be added as payloads of pub sub messages

public < in > project name builder < in > with serialization schema ( serialization schema < in > deserialization schema ) { return new pub sub sink builder < > ( deserialization schema ) ; }


invoke the handler method with the given argument values

protected object do invoke ( object args ) throws exception { method method = get bridged method ( ) ; reflection utils make accessible ( method ) ; try { if ( kotlin detector is suspending function ( method ) ) { return coroutines utils invoke suspending function ( method , get bean ( ) , args ) ; } return method invoke ( get bean ( ) , args ) ; } catch ( illegal argument exception ex ) { assert target bean ( method , get bean ( ) , args ) ; string text = ( ex get message ( ) ! = null ? ex get message ( ) : " illegal argument " ) ; throw new illegal state exception ( format invoke error ( text , args ) , ex ) ; } catch ( invocation target exception ex ) { / / unwrap for handler exception resolvers throwable target exception = ex get target exception ( ) ; if ( target exception instanceof runtime exception ) { throw ( runtime exception ) target exception ; } else if ( target exception instanceof error ) { throw ( error ) target exception ; } else if ( target exception instanceof exception ) { throw ( exception ) target exception ; } else { throw new illegal state exception ( format invoke error ( " invocation failure " , args ) , target exception ) ; } } }


returns whether this playlist is newer than { @ code other }

public boolean is newer than ( hls media playlist other ) { if ( other = = null | | media sequence > other media sequence ) { return true ; } if ( media sequence < other media sequence ) { return false ; } / / the media sequences are equal int segment count = segments size ( ) ; int other segment count = other segments size ( ) ; return segment count > other segment count | | ( segment count = = other segment count & & has end tag & & ! other has end tag ) ; }


public static map config build map config ( final base hazelcast properties hz , final string map name , final long timeout seconds ) { val cluster = hz get cluster ( ) ; val eviction policy = eviction policy value of ( cluster get eviction policy ( ) ) ; val eviction config = new eviction config ( ) ; eviction config set eviction policy ( eviction policy ) ; eviction config set max size policy ( max size policy value of ( cluster get max size policy ( ) ) ) ; eviction config set size ( cluster get max size ( ) ) ; val merge policy config = new merge policy config ( ) ; if ( string utils has text ( cluster get map merge policy ( ) ) ) { switch ( cluster get map merge policy ( ) trim ( ) to lower case ( ) ) { case " discard " : merge policy config set policy ( discard merge policy class get name ( ) ) ; break ; case " pass through " : merge policy config set policy ( pass through merge policy class get name ( ) ) ; break ; case " expiration time " : merge policy config set policy ( expiration time merge policy class get name ( ) ) ; break ; case " higher hits " : merge policy config set policy ( higher hits merge policy class get name ( ) ) ; break ; case " latest update " : merge policy config set policy ( latest update merge policy class get name ( ) ) ; break ; case " latest access " : merge policy config set policy ( latest access merge policy class get name ( ) ) ; break ; case " put if absent " : default : merge policy config set policy ( put if absent merge policy class get name ( ) ) ; break ; } } return new map config ( ) set name ( map name ) set merge policy config ( merge policy config ) set max idle seconds ( ( int ) timeout seconds ) set backup count ( cluster get backup count ( ) ) set async backup count ( cluster get async backup count ( ) ) set eviction config ( eviction config ) ; }


returns the configured heap size used by the tasks

public long get task heap ( ) { return task heap ; }


gap of a { @ link window type # session } window empty for other types of windows

public optional < value literal expression > get gap ( ) { return optional of ( gap ) ; }


return the current local ip filter used by { @ link # get all local i ps ( ) }

public static local ip filter get local ip filter ( ) { return require non null ( local ip filter get ( ) ) ; }


removes all of the elements from this deque the deque will be empty after this call returns

public void clear ( ) { int h = head ; int t = tail ; if ( h ! = t ) { / / clear all cells head = tail = 0 ; int i = h ; int mask = elements length - 1 ; do { elements [ i ] = null ; i = ( i + 1 ) & mask ; } while ( i ! = t ) ; } }


the underlying collection of retention leases

public collection < retention lease > leases ( ) { return collections unmodifiable collection ( leases values ( ) ) ; }


determine whether the given registered path matches the given property path , either indicating the property itself or an indexed element of the property

public static boolean matches property ( string registered path , string property path ) { if ( ! registered path starts with ( property path ) ) { return false ; } if ( registered path length ( ) = = property path length ( ) ) { return true ; } if ( registered path char at ( property path length ( ) ) ! = property accessor property key prefix char ) { return false ; } return ( registered path index of ( property accessor property key suffix char , property path length ( ) + 1 ) = = registered path length ( ) - 1 ) ; }


tbody tbody ( string selector ) ; / / $ summary , width , border , frame , rules , cellpadding , cellspacing omitted / / use css instead


returns the service configuration properties property names are trimmed off from its prefix the sevice configuration properties are all properties with names starting with < code > # server # # service # < code > in the server configuration

protected configuration get service config ( ) { return service config ; }


order by duedate ( needs to be followed by { @ link # asc ( ) } or { @ link # desc ( ) } )

dead letter job query order by job duedate ( ) ;


default void on shuffle mode changed ( event time event time , boolean shuffle mode enabled ) { }


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


test uam work preserving restart when the keep containers across attempt flag is on , we allow uam to directly register again and move on without getting the application already registered exception

protected void test u a m restart ( boolean keep containers ) throws exception { / / start rm mock r m rm = new mock r m ( ) ; rm start ( ) ; mock n m nm = new mock n m ( " 127 0 0 1 : 1234 " , 15120 , rm get resource tracker service ( ) ) ; nm register node ( ) ; / / create app and launch the uam boolean unamanged = true ; int max attempts = 1 ; boolean wait for accepted = true ; mock r m app submission data data = mock r m app submission data builder create with memory ( 200 , rm ) with app name ( " " ) with user ( user group information get current user ( ) get short user name ( ) ) with acls ( null ) with unmanaged a m ( unamanged ) with queue ( null ) with max app attempts ( max attempts ) with credentials ( null ) with app type ( null ) with wait for app accepted state ( wait for accepted ) with keep containers ( keep containers ) build ( ) ; r m app app = mock r m app submitter submit ( rm , data ) ; mock a m am = mock r m launch u a m ( app , rm , nm ) ; / / register for the first time am register app attempt ( ) ; / / allocate two containers to uam int num containers = 3 ; list < container > conts = am allocate ( " 127 0 0 1 " , 1000 , num containers , new array list < container id > ( ) ) get allocated containers ( ) ; while ( conts size ( ) < num containers ) { nm node heartbeat ( true ) ; conts add all ( am allocate ( new array list < resource request > ( ) , new array list < container id > ( ) ) get allocated containers ( ) ) ; thread sleep ( 100 ) ; } / / release one container list < container id > release list = collections singleton list ( conts get ( 0 ) get id ( ) ) ; list < container status > finished conts = am allocate ( new array list < resource request > ( ) , release list ) get completed containers statuses ( ) ; while ( finished conts size ( ) < release list size ( ) ) { nm node heartbeat ( true ) ; finished conts add all ( am allocate ( new array list < resource request > ( ) , new array list < container id > ( ) ) get completed containers statuses ( ) ) ; thread sleep ( 100 ) ; } / / register for the second time register application master response response = null ; try { response = am register app attempt ( false ) ; } catch ( invalid application master request exception e ) { assert assert equals ( false , keep containers ) ; return ; } assert assert equals ( " rm should not allow second register " + " for uam without keep container flag " , true , keep containers ) ; / / expecting the two running containers previously assert assert equals ( 2 , response get containers from previous attempts ( ) size ( ) ) ; assert assert equals ( 1 , response get n m tokens from previous attempts ( ) size ( ) ) ; / / allocate one more containers to uam , just to be safe num containers = 1 ; am allocate ( " 127 0 0 1 " , 1000 , num containers , new array list < container id > ( ) ) ; nm node heartbeat ( true ) ; conts = am allocate ( new array list < resource request > ( ) , new array list < container id > ( ) ) get allocated containers ( ) ; while ( conts size ( ) < num containers ) { nm node heartbeat ( true ) ; conts add all ( am allocate ( new array list < resource request > ( ) , new array list < container id > ( ) ) get allocated containers ( ) ) ; thread sleep ( 100 ) ; } rm stop ( ) ; }


public input stream read ( ) throws i o exception , interrupted exception { return read ( null , false ) ; }


returns all the registered { @ link change log annotator } descriptors

public static extension list < change log annotator > all ( ) { return extension list lookup ( change log annotator class ) ; }


get an array of double parameters , throwing an exception if not found or one is not a number

public static double [ ] get required double parameters ( servlet request request , string name ) throws servlet request binding exception { return double parser parse doubles ( name , request get parameter values ( name ) ) ; }


register the specified handler for the given url path

protected void register handler ( string url path , object handler ) throws beans exception , illegal state exception { assert not null ( url path , " url path must not be null " ) ; assert not null ( handler , " handler object must not be null " ) ; object resolved handler = handler ; / / parse path pattern url path = prepend leading slash ( url path ) ; path pattern pattern = get path pattern parser ( ) parse ( url path ) ; if ( this handler map contains key ( pattern ) ) { object existing handler = this handler map get ( pattern ) ; if ( existing handler ! = null & & existing handler ! = resolved handler ) { throw new illegal state exception ( " cannot map " + get handler description ( handler ) + " to [ " + url path + " ] : " + " there is already " + get handler description ( existing handler ) + " mapped " ) ; } } / / eagerly resolve handler if referencing singleton via name if ( ! this lazy init handlers & & handler instanceof string ) { string handler name = ( string ) handler ; if ( obtain application context ( ) is singleton ( handler name ) ) { resolved handler = obtain application context ( ) get bean ( handler name ) ; } } / / register resolved handler this handler map put ( pattern , resolved handler ) ; if ( logger is trace enabled ( ) ) { logger trace ( " mapped [ " + url path + " ] onto " + get handler description ( handler ) ) ; } }


creates an empty { @ code compact linked hash set } instance

public static < e > compact linked hash set < e > create ( ) { return new compact linked hash set < > ( ) ; }


uploads an image < b > 200 < b > - successful operation

public mono < model api response > upload file ( long pet id , string additional metadata , file file ) throws web client response exception { object post body = null ; / / verify the required parameter ' pet id ' is set if ( pet id = = null ) { throw new web client response exception ( " missing the required parameter ' pet id ' when calling upload file " , http status bad request value ( ) , http status bad request get reason phrase ( ) , null , null , null ) ; } / / create path and map variables final map < string , object > path params = new hash map < string , object > ( ) ; path params put ( " pet id " , pet id ) ; final multi value map < string , string > query params = new linked multi value map < string , string > ( ) ; final http headers header params = new http headers ( ) ; final multi value map < string , string > cookie params = new linked multi value map < string , string > ( ) ; final multi value map < string , object > form params = new linked multi value map < string , object > ( ) ; if ( additional metadata ! = null ) form params add ( " additional metadata " , additional metadata ) ; if ( file ! = null ) form params add ( " file " , new file system resource ( file ) ) ; final string [ ] local var accepts = { " application / json " } ; final list < media type > local var accept = api client select header accept ( local var accepts ) ; final string [ ] local var content types = { " multipart / form - data " } ; final media type local var content type = api client select header content type ( local var content types ) ; string [ ] local var auth names = new string [ ] { " petstore auth " } ; parameterized type reference < model api response > local var return type = new parameterized type reference < model api response > ( ) { } ; return api client invoke a p i ( " / pet / { pet id } / upload image " , http method post , path params , query params , post body , header params , cookie params , form params , local var accept , local var content type , local var auth names , local var return type ) ; }


create a new { @ link avg } aggregation with the given name

public static avg aggregation builder avg ( string name ) { return new avg aggregation builder ( name ) ; }


creates a new { @ code hash multiset } containing the specified elements this implementation is highly efficient when { @ code elements } is itself a { @ link multiset }

public static < e > hash multiset < e > create ( iterable < ? extends e > elements ) { hash multiset < e > multiset = create ( multisets infer distinct elements ( elements ) ) ; iterables add all ( multiset , elements ) ; return multiset ; }


reader and writer have the same fields checks that fields are read in correctly

public void test values are read in correctly ( ) throws i o exception { list < string > reader fields = new array list < > ( arrays as list ( " field a " , " field b " , " field c " ) ) ; list < string > writer fields = new array list < > ( arrays as list ( " field a " , " field b " , " field c " ) ) ; list < string > writer data = new array list < > ( arrays as list ( " field a value " , " field b value " , " field c value " ) ) ; type reader type = get type ( reader fields ) ; type writer type = get type ( writer fields ) ; write ( temp file , writer type , writer data ) ; row block read block = read ( temp file , reader type ) ; list actual = ( list ) reader type get object value ( session get sql function properties ( ) , read block , 0 ) ; assert equals ( actual size ( ) , reader fields size ( ) ) ; assert equals ( actual get ( 0 ) , " field a value " ) ; assert equals ( actual get ( 1 ) , " field b value " ) ; assert equals ( actual get ( 2 ) , " field c value " ) ; }


returns a { @ link future } that is notified when the connection to the destination has been established or the connection attempt has failed

public final future < channel > connect future ( ) { return connect promise ; }


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

public model without hash on visibility changed ( on model visibility changed listener < model without hash , object > listener ) { on mutation ( ) ; this on model visibility changed listener epoxy generated model = listener ; return this ; }


get a configured instance of the give class specified by the given configuration key if the object implements configurable configure it using the configuration

public < t > t get configured instance ( string key , class < t > t , map < string , object > config overrides ) { class < ? > c = get class ( key ) ; return get configured instance ( c , t , originals ( config overrides ) ) ; }


public long get total input size ( ) { return this file size ; }


executes the extraction on the existing content of the json parser and outputs the match < p > notes : json parser must be on the first token of the value to be processed when extract is called invariant : when extract ( ) returns , the current token of the parser will be the last token of the value

t extract ( json parser json parser ) throws i o exception ;


sets the time characteristic for all streams create from this environment , e g , processing time , event time , or ingestion time if you set the characteristic to ingestion time of event time this will set a default watermark update interval of 200 ms if this is not applicable for your application you should change it using { @ link execution config # set auto watermark interval ( long ) }

public void set stream time characteristic ( time characteristic characteristic ) { this time characteristic = preconditions check not null ( characteristic ) ; if ( characteristic = = time characteristic processing time ) { get config ( ) set auto watermark interval ( 0 ) ; } else { get config ( ) set auto watermark interval ( 200 ) ; } }


synchronized void cache block ( long block id , string bpid , string block file name , long length , long genstamp , executor volume executor ) { extended block id key = new extended block id ( block id , bpid ) ; value prev value = mappable block map get ( key ) ; if ( prev value ! = null ) { log debug ( " block with id { } , pool { } already exists in the " + " fs dataset cache with state { } " , block id , bpid , prev value state ) ; num blocks failed to cache increment and get ( ) ; return ; } mappable block map put ( key , new value ( null , state caching ) ) ; volume executor execute ( new caching task ( key , block file name , length , genstamp ) ) ; log debug ( " initiating caching for block with id { } , pool { } " , block id , bpid ) ; }


gets the size of the byte buffer if it is valid otherwise , an exception is raised

public synchronized int size ( ) { ensure valid ( ) ; return m size ; }


find the file system counter for the given scheme and enum

public synchronized c find counter ( string scheme , file system counter key ) { return ( ( file system counter group < c > ) get group ( file system counter class get name ( ) ) get underlying group ( ) ) find counter ( scheme , key ) ; }


public boolean is empty ( ) { return size = = 0 ; }


returns the format based on its configuration name

public static trace format named ( string name ) { return trace format value of ( name replace ( ' - ' , ' ' ) to upper case ( us ) ) ; }


convenient synonym for { @ link # set property } that returns the current instance useful for method chaining and fluent - style use

public mock environment with property ( string key , string value ) { set property ( key , value ) ; return this ; }


return the enum value corresponding to the passed in same - site - flag , using a case insensitive comparison

static same site of ( string name ) { if ( name ! = null ) { for ( same site each : same site class get enum constants ( ) ) { if ( each name ( ) equals ignore case ( name ) ) { return each ; } } } return null ; }


return the transfer data with the given data flavor

public synchronized object get transfer data ( data flavor f ) throws unsupported flavor exception , i o exception { if ( f equals ( local data type flavor ) ) { return info list ; } throw new unsupported flavor exception ( f ) ; }


search for the snapshot whose id is 1 ) no less than the given id , and 2 ) most close to the given id

public final int get snapshot by id ( final int snapshot id ) { d diff = get diff by id ( snapshot id ) ; return diff = = null ? snapshot current state id : diff get snapshot id ( ) ; }


adds each element of { @ code elements } to the { @ code immutable multiset }

public builder < e > add ( e elements ) { super add ( elements ) ; return this ; }


a formatted string for reporting the status of the data node

public string get datanode report ( ) { string builder buffer = new string builder ( ) ; long c = get capacity ( ) ; long r = get remaining ( ) ; long u = get dfs used ( ) ; long non d f s used = get non dfs used ( ) ; float used percent = get dfs used percent ( ) ; float remaining percent = get remaining percent ( ) ; long cc = get cache capacity ( ) ; long cr = get cache remaining ( ) ; long cu = get cache used ( ) ; float cache used percent = get cache used percent ( ) ; float cache remaining percent = get cache remaining percent ( ) ; string lookup name = net utils get host name of i p ( get name ( ) ) ; int block count = get num blocks ( ) ; buffer append ( " name : " ) append ( get name ( ) ) ; if ( lookup name ! = null ) { buffer append ( " ( " ) append ( lookup name ) append ( " ) " ) ; } buffer append ( " \ n " ) append ( " hostname : " ) append ( get host name ( ) ) append ( " \ n " ) ; if ( ! network topology default rack equals ( location ) ) { buffer append ( " rack : " ) append ( location ) append ( " \ n " ) ; } if ( upgrade domain ! = null ) { buffer append ( " upgrade domain : " ) append ( upgrade domain ) append ( " \ n " ) ; } buffer append ( " decommission status : " ) ; if ( is decommissioned ( ) ) { buffer append ( " decommissioned \ n " ) ; } else if ( is decommission in progress ( ) ) { buffer append ( " decommission in progress \ n " ) ; } else if ( is in maintenance ( ) ) { buffer append ( " in maintenance \ n " ) ; } else if ( is entering maintenance ( ) ) { buffer append ( " entering maintenance \ n " ) ; } else { buffer append ( " normal \ n " ) ; } buffer append ( " configured capacity : " ) append ( c ) append ( " ( " ) append ( string utils byte desc ( c ) ) append ( " ) " ) append ( " \ n " ) append ( " dfs used : " ) append ( u ) append ( " ( " ) append ( string utils byte desc ( u ) ) append ( " ) " ) append ( " \ n " ) append ( " non dfs used : " ) append ( non d f s used ) append ( " ( " ) append ( string utils byte desc ( non d f s used ) ) append ( " ) " ) append ( " \ n " ) append ( " dfs remaining : " ) append ( r ) append ( " ( " ) append ( string utils byte desc ( r ) ) append ( " ) " ) append ( " \ n " ) append ( " dfs used % : " ) append ( percent 2 string ( used percent ) ) append ( " \ n " ) append ( " dfs remaining % : " ) append ( percent 2 string ( remaining percent ) ) append ( " \ n " ) append ( " configured cache capacity : " ) append ( cc ) append ( " ( " ) append ( string utils byte desc ( cc ) ) append ( " ) " ) append ( " \ n " ) append ( " cache used : " ) append ( cu ) append ( " ( " ) append ( string utils byte desc ( cu ) ) append ( " ) " ) append ( " \ n " ) append ( " cache remaining : " ) append ( cr ) append ( " ( " ) append ( string utils byte desc ( cr ) ) append ( " ) " ) append ( " \ n " ) append ( " cache used % : " ) append ( percent 2 string ( cache used percent ) ) append ( " \ n " ) append ( " cache remaining % : " ) append ( percent 2 string ( cache remaining percent ) ) append ( " \ n " ) append ( " xceivers : " ) append ( get xceiver count ( ) ) append ( " \ n " ) append ( " last contact : " ) append ( new date ( last update ) ) append ( " \ n " ) append ( " last block report : " ) append ( last block report time ! = 0 ? new date ( last block report time ) : " never " ) append ( " \ n " ) append ( " num of blocks : " ) append ( block count ) append ( " \ n " ) ; return buffer to string ( ) ; }


increases the current backoff and returns whether the operation was successful

protected boolean increase backoff ( ) { / / backoff is disabled if ( current backoff < 0 ) { return false ; } / / this is the first time backing off if ( current backoff = = 0 ) { current backoff = initial backoff ; return true ; } / / continue backing off else if ( current backoff < max backoff ) { current backoff = math min ( current backoff * 2 , max backoff ) ; return true ; } / / reached maximum backoff return false ; }


determine if the resource needs to be checked

public boolean is dirty ( ) { return state get ( ) ! = state clean ; }


get all of the xattr namevalue pairs for a file or directory only those xattrs which the logged - in user has permissions to view are returned refer to the hdfs extended attributes user documentation for details

public map < string , byte [ ] > get x attrs ( path path ) throws i o exception { throw new unsupported operation exception ( get class ( ) get simple name ( ) + " doesn ' t support get x attrs " ) ; }


{ @ link headers # get all ( object ) } and convert each element of { @ link list } to a { @ link string }

list < string > get all as string ( char sequence name ) ;


calculates the optimal load factor for the filter , given the number of entries per bucket will return 0 84 , 0 955 or 0 98 depending on b

private double get load factor ( int b ) { if ( ( b = = 2 | | b = = 4 | | b = = 8 ) = = false ) { throw new illegal argument exception ( " b must be one of [ 2 , 4 , 8 ] " ) ; } / * empirical constants from the paper : " with k = 2 hash functions , the load factor α is 50 % when bucket size b = 1 ( i e the hash table is directly mapped ) , but increases to 84 % , 95 % , 98 % respectively using bucket size b = 2 , 4 , 8 " * / if ( b = = 2 ) { return 0 84d ; } else if ( b = = 4 ) { return 0 955d ; } else { return 0 98d ; } }


public string to json ( ) { return jackson utils to json ( this ) ; }


gets whether the class that this method is part of is defined with { @ code acc super }

public boolean get acc super ( ) { return acc super ; }


public int get word count ( ) { / / it is the same as size because all elements are classes return size ; }


assert the response status code is { @ code http status proxy authentication required } ( 407 )

public result matcher is proxy authentication required ( ) { return matcher ( http status proxy authentication required ) ; }


public set < string > get photo urls ( ) { return photo urls ; }


unregisters all beans that this exported has exposed via jmx when the enclosing { @ code application context } is destroyed

public void destroy ( ) { logger debug ( " unregistering jmx - exposed beans on shutdown " ) ; unregister notification listeners ( ) ; unregister beans ( ) ; }


the actual render step : taking the poi { @ link workbook } and rendering it to the given response

protected void render workbook ( workbook workbook , http servlet response response ) throws i o exception { servlet output stream out = response get output stream ( ) ; workbook write ( out ) ; workbook close ( ) ; }


returns the record number ( id ) that indicates the type of primitive type

public int get number ( ) { return rec num ; }


how many nanoseconds should a batch of last batch size have taken if it were perfectly throttled ? package private for testing

float perfectly throttled batch time ( int last batch size ) { if ( requests per second = = float positive infinity ) { return 0 ; } / / requests / / - - - - - - - - - - - - - - - - - - - = = seconds / / request per seconds float target batch time in seconds = last batch size / requests per second ; / / nanoseconds per seconds * seconds = = nanoseconds return time unit seconds to nanos ( 1 ) * target batch time in seconds ; }


public string to string ( ) { return new string joiner ( " , " , template file type class get simple name ( ) + " [ " , " ] " ) add ( " template type = ' " + template type + " ' " ) to string ( ) ; }


calls the { @ link # register handlers } method in addition to the superclass ' s initialization

public void init application context ( ) throws beans exception { super init application context ( ) ; register handlers ( this url map ) ; }


retrieve the errors instance for the given bind object , using the " default html escape " setting

public errors get errors ( string name ) { return get errors ( name , is default html escape ( ) ) ; }


test that program merge can determine the function return types are different

public void test apply function return diff ( ) throws exception { / / 0x 0 1 0 0 4 8a 3 : p 1 returns d word , p 2 returns float / / 0x 0 1 0 0 5 9a 3 : p 1 returns byte , p 2 returns word / / 0x 0 1 0 0 2 2 3 9 : functions are the same , both return ascii int transaction i d = p 1 start transaction ( " test transaction " ) ; function manager function manager 1 = p 1 get function manager ( ) ; function function 1 = function manager 1 get function at ( addr ( 0x 0 1 0 0 4 8a 3 ) ) ; assert not null ( function 1 ) ; function 1 set return type ( new d word data type ( ) , source type user defined ) ; function 1 = function manager 1 get function at ( addr ( 0x 0 1 0 0 5 9a 3 ) ) ; assert not null ( function 1 ) ; function 1 set return type ( new byte data type ( ) , source type user defined ) ; function 1 = function manager 1 get function at ( addr ( 0x 0 1 0 0 2 2 3 9 ) ) ; assert not null ( function 1 ) ; function 1 set return type ( new char data type ( ) , source type user defined ) ; p 1 end transaction ( transaction i d , true ) ; int transaction i d 2 = p 2 start transaction ( " test transaction " ) ; function manager function manager 2 = p 2 get function manager ( ) ; function function 2 = function manager 2 get function at ( addr ( 0x 0 1 0 0 4 8a 3 ) ) ; assert not null ( function 2 ) ; function 2 set return type ( new float data type ( ) , source type user defined ) ; function 2 = function manager 2 get function at ( addr ( 0x 0 1 0 0 5 9a 3 ) ) ; assert not null ( function 2 ) ; function 2 set return type ( new word data type ( ) , source type user defined ) ; function 2 = function manager 2 get function at ( addr ( 0x 0 1 0 0 2 2 3 9 ) ) ; assert not null ( function 2 ) ; function 2 set return type ( new char data type ( ) , source type user defined ) ; p 2 end transaction ( transaction i d 2 , true ) ; program merge = new program merge manager ( p 1 , p 2 , task monitor adapter dummy monitor ) ; address set diff as = new address set ( ) ; diff as add range ( addr ( 0x 0 1 0 0 4 8a 3 ) , addr ( 0x 0 1 0 0 4 8a 3 ) ) ; diff as add range ( addr ( 0x 0 1 0 0 5 9a 3 ) , addr ( 0x 0 1 0 0 5 9a 3 ) ) ; program merge set diff filter ( new program diff filter ( program diff filter function diffs ) ) ; program merge set merge filter ( new program merge filter ( program merge filter functions , program merge filter replace ) ) ; assert equals ( diff as , program merge get filtered differences ( ) ) ; program merge merge ( diff as , task monitor adapter dummy monitor ) ; assert equals ( new address set ( ) , program merge get filtered differences ( ) ) ; }


{ @ code annotation config web context loader } should be used as a { @ link org springframework test context smart context loader smart context loader } , not as a legacy { @ link org springframework test context context loader context loader } consequently , this method is not supported

protected string [ ] modify locations ( class < ? > clazz , string locations ) { throw new unsupported operation exception ( " annotation config web context loader does not support the modify locations ( class , string ) method " ) ; }


load provided server namespace set to property in memory

public static void load server namespace set ( set < string > namespace set ) { namespace set property update value ( namespace set ) ; }


public object get anytype 2 ( ) { return anytype 2 ; }


return a wrapped reader that only exposes allowed fields

public directory reader filter ( directory reader reader ) throws i o exception { if ( has field level security ( ) = = false ) { return reader ; } return field subset reader wrap ( reader , permitted fields automaton ) ; }


creates a new build of this project for immediate execution calls the ( { @ link job } ) constructor of { @ link # get build class } suitable for { @ link sub task # create executable }

public final synchronized run t new build ( ) throws i o exception { try { run t last build = get build class ( ) get constructor ( as job ( ) get class ( ) ) new instance ( as job ( ) ) ; builds put ( last build ) ; last build get previous build ( ) ; / / jenkins - 20662 : create connection to previous build return last build ; } catch ( invocation target exception e ) { logger log ( level warning , string format ( " a new build could not be created in job % s " , as job ( ) get full name ( ) ) , e ) ; throw handle invocation target exception ( e ) ; } catch ( reflective operation exception | illegal state exception e ) { logger log ( level warning , string format ( " a new build could not be created in job % s " , as job ( ) get full name ( ) ) , e ) ; throw new error ( e ) ; } }


public map < string , boolean > get direct map ( ) { return direct map ; }


returns the current mode of how column constraints will be used to filter this column < p > this method is typically not overridden this is only needed in rare cases , such as when a column uses a renderer , but does not want this column to be filtered using a string column constraint or , if a column uses a renderer and wants that text to be available as a filter , along with any other column constraints

public default column constraint filter mode get column constraint filter mode ( ) { return column constraint filter mode allow renderer string filter only ; }


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


public alts server builder direct executor ( ) { delegate direct executor ( ) ; return this ; }


this will be called to inform implementations that the next layout has been computed implementations should use the widthheight to determine whether they still need more views to fill their initial viewport ( which should be reflected in the next call to { @ link # wants more ( ) }

void add ( render info render info , int width , int height ) ;


create a jms message producer for the given session and destination , configuring it to disable message ids andor timestamps ( if necessary ) delegates to { @ link # do create producer } for creation of the raw jms message producer

protected message producer create producer ( session session , @ nullable destination destination ) throws j m s exception { message producer producer = do create producer ( session , destination ) ; if ( ! is message id enabled ( ) ) { producer set disable message i d ( true ) ; } if ( ! is message timestamp enabled ( ) ) { producer set disable message timestamp ( true ) ; } return producer ; }


validates the option { @ code option } value must be a character

private static void validate character val ( readable config table options , config option < string > option ) { validate character val ( table options , option , false ) ; }


returns true if { @ code target } has " manual " in the tags attribute and thus should be ignored by command - line wildcards or by test suite $ implicit tests attribute

public static boolean has manual tag ( target target ) { return ( target instanceof rule ) & & has constraint ( ( rule ) target , " manual " ) ; }


public synchronized repository get repository ( string current user , string name ) throws user access exception { if ( ! is anonymous user ( current user ) ) { validate user ( current user ) ; } repository rep = repository map get ( name ) ; if ( rep ! = null ) { rep validate read privilege ( current user ) ; } return rep ; }


release the map ' s record and bucket area ' s memory segments

public void free ( ) { free ( false ) ; }