loads edits file , uses visitor to process all elements

public void load edits ( ) throws i o exception { try { visitor start ( input stream get version ( true ) ) ; while ( true ) { try { f s edit log op op = input stream read op ( ) ; if ( op = = null ) break ; if ( fix tx ids ) { if ( next tx id < = 0 ) { next tx id = op get transaction id ( ) ; if ( next tx id < = 0 ) { next tx id = 1 ; } } op set transaction id ( next tx id ) ; next tx id + + ; } visitor visit op ( op ) ; } catch ( i o exception e ) { if ( ! recovery mode ) { / / tell the visitor to clean up , then re - throw the exception log error ( " got i o exception at position " + input stream get position ( ) ) ; visitor close ( e ) ; throw e ; } log error ( " got i o exception while reading stream ! resyncing " , e ) ; input stream resync ( ) ; } catch ( runtime exception e ) { if ( ! recovery mode ) { / / tell the visitor to clean up , then re - throw the exception log error ( " got runtime exception at position " + input stream get position ( ) ) ; visitor close ( e ) ; throw e ; } log error ( " got runtime exception while reading stream ! resyncing " , e ) ; input stream resync ( ) ; } } visitor close ( null ) ; } finally { i o utils cleanup with logger ( log , input stream ) ; } }


stop searching long running searches can be stopped from another thread

public void stop searching ( ) { stop searching = true ; }


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

public void create user ( user body ) throws api exception { create user with http info ( body ) ; }


concatenate two string arrays into a third

public static string [ ] concat string arrays ( string [ ] first , string [ ] second ) { if ( first = = null & & second = = null ) { return strings empty array ; } if ( first = = null | | first length = = 0 ) { return second ; } if ( second = = null | | second length = = 0 ) { return first ; } string [ ] concat = new string [ first length + second length ] ; system arraycopy ( first , 0 , concat , 0 , first length ) ; system arraycopy ( second , 0 , concat , first length , second length ) ; return concat ; }


a normal case for mover : move a file into archival storage

public void test migrate file to archival ( ) throws exception { log info ( " test migrate file to archival " ) ; final path foo = new path ( " / foo " ) ; map < path , block storage policy > policy map = maps new hash map ( ) ; policy map put ( foo , cold ) ; namespace scheme ns scheme = new namespace scheme ( null , arrays as list ( foo ) , 2 * block size , null , policy map ) ; cluster scheme cluster scheme = new cluster scheme ( default conf , num datanodes , repl , gen storage types ( num datanodes ) , null ) ; new migration test ( cluster scheme , ns scheme ) run basic test ( true ) ; }


public state store metrics get metrics ( ) { return metrics ; }


sets the { @ code api name suffix } and returns a reference to this builder so that the methods can be chained together

public builder with api name suffix ( string api name suffix ) { this api name suffix = api name suffix ; return this ; }


set location of properties files to be loaded , containing object name mappings

public void set mapping locations ( resource mapping locations ) { this mapping locations = mapping locations ; }


public void clear all rules ( ) { transport ( ) clear behaviors ( ) ; connection manager ( ) clear behaviors ( ) ; }


indicate to the { @ link pdb address manager } that a new symbol with the given name has the associated address this allows the pdb address manager to create and organize the re - mapped address and supply them also returns the address of the pre - existing symbol of the same name if the name was unique , otherwise null if it didn ' t exist or wasn ' t unique

address witness symbol name at address ( string name , address address ) { return pdb address manager witness symbol name at address ( name , address ) ; }


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

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


callback when the global checkpoint is updated or the shard is closed if the shard is closed , the value of the global checkpoint will be set to { @ link org elasticsearch index seqno sequence numbers # unassigned seq no } and the exception will be non - null and an instance of { @ link index shard closed exception } if the listener timed out waiting for notification then the exception will be non - null and an instance of { @ link timeout exception } if the global checkpoint is updated , the exception will be null

void accept ( long global checkpoint , exception e ) ;


gets the current connectivity state of the channel this method is threadsafe

connectivity state get state ( ) { connectivity state state copy = state ; if ( state copy = = null ) { throw new unsupported operation exception ( " channel state api is not implemented " ) ; } return state copy ; }


set the number of units in a group this format does not support groups

public void set group size ( int group size ) { throw new unsupported operation exception ( " groups are not supported " ) ; }


gets the remaining delay for allocating the replica shard when a node holding the replica left the cluster and the deciders are waiting to see if the node returns before allocating the replica elsewhere only returns a meaningful positive value if { @ link # get allocation status ( ) } returns { @ link allocation status # delayed allocation } if { @ link # is decision taken ( ) } returns { @ code false } , then invoking this method will throw an { @ code illegal state exception }

public long get remaining delay in millis ( ) { check decision state ( ) ; return remaining delay in millis ; }


public string get table cat ( ) { return table cat ; }


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

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


public another fake api req spec ( consumer < request spec builder > req spec customizer ) { this req spec customizer = req spec customizer ; return this ; }


adds a parameters to the end of the parameter list for this demangled function

public void add parameter ( demangled data type parameter ) { parameters add ( parameter ) ; }


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


return the uri of the request ( including a query string if any , but only if it is well - formed for a uri representation )


public void set threshold ( float threshold percent ) { preconditions check state ( ( threshold percent > = 0 0f ) & & ( threshold percent < = 100 0f ) , " a percentage value expected " ) ; this threshold = threshold percent ; }


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


see original { @ link mockito # do return ( object ) }

public static b d d stubber will return ( object to be returned ) { return new b d d stubber impl ( mockito do return ( to be returned ) ) ; }


get a long test property look up configuration value ( which can pick up core - default xml ) , using { @ code def val } as the default value ( if conf ! = null ) fetch the system property if the system property is not empty or " ( unset ) " : it overrides the conf value this puts the build properties in charge of everything it ' s not a perfect design ; having maven set properties based on a file , as ant let you do , is better for customization as to why there ' s a special ( unset ) value , see { @ link http : stackoverflow comquestions 7 7 7 3 1 3 4null - versus - empty - arguments - in - maven }

public static long get test property long ( configuration conf , string key , long def val ) { return long value of ( get test property ( conf , key , long to string ( def val ) ) ) ; }


public void pet id test ( ) { / / todo : test pet id }


private long create meta file ( ) throws i o exception { long id = get free block id ( ) ; try ( fs dataset spi fs volume references refs = fds get fs volume references ( ) ) { int num volumes = refs size ( ) ; int index = rand next int ( num volumes - 1 ) ; file finalized dir = ( ( fs volume impl ) refs get ( index ) ) get finalized dir ( bpid ) ; file file = new file ( finalized dir , get meta file ( id ) ) ; if ( file create new file ( ) ) { log info ( " created metafile " + file get name ( ) ) ; } } return id ; }


returns true if this segment has relocations

public boolean has relocation ( ) { return ( flagword & flag reloc info ) ! = 0 ; }


set the length of the body in bytes , as specified by the { @ code content - length } header

builder < t > content length ( long content length ) ;


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


invoked when an per - request orca report is received note this callback will be invoked from the network thread as the rpc finishes , implementations should not block

void on load report ( orca load report report ) ;


returns the { @ link transformation } that represents the operation that logically creates this { @ link data stream }

public transformation < t > get transformation ( ) { return transformation ; }


converts { @ link big decimal } to { @ link slice } representing it for long { @ link decimal type } it is caller responsibility to ensure that { @ code value scale ( ) } equals to { @ link decimal type # get scale ( ) }

public static slice encode scaled value ( big decimal value ) { return encode unscaled value ( value unscaled value ( ) ) ; }


called after the main expression evaluation method has been generated , this method will callback any registered field adders or clinit adders to add any extra information to the class representing the compiled expression

public void finish ( ) { if ( this field adders ! = null ) { for ( field adder field adder : this field adders ) { field adder generate field ( this class writer , this ) ; } } if ( this clinit adders ! = null ) { method visitor mv = this class writer visit method ( acc public | acc static , " < clinit > " , " ( ) v " , null , null ) ; mv visit code ( ) ; this next free variable id = 0 ; / / to 0 because there is no ' this ' in a clinit for ( clinit adder clinit adder : this clinit adders ) { clinit adder generate code ( mv , this ) ; } mv visit insn ( return ) ; mv visit maxs ( 0 , 0 ) ; / / not supplied due to compute maxs mv visit end ( ) ; } }


public static table records empty ( table meta table meta ) { return new empty table records ( table meta ) ; }


returns the { @ code double } value of a header with the specified name if there is more than one value for the specified name , the first value in insertion order is returned

double get double ( k name , double default value ) ;


gets a mock context for initializing the source ' s state via { @ link org apache flink streaming api checkpoint checkpointed function # initialize state }

function initialization context get mock context ( ) throws exception { operator state store mock store = mockito mock ( operator state store class ) ; function initialization context mock context = mockito mock ( function initialization context class ) ; mockito when ( mock context get operator state store ( ) ) then return ( mock store ) ; mockito when ( mock store get list state ( any ( list state descriptor class ) ) ) then return ( null ) ; return mock context ; }


initializes the filter this implementation is a nop

public void init ( filter config config ) throws servlet exception { }


create a { @ link compression input stream } that will read from the given { @ link input stream } with the given { @ link decompressor }

public compression input stream create input stream ( input stream in , decompressor decompressor ) throws i o exception { check native code loaded ( ) ; return new decompressor stream ( in , decompressor , get decompression buffer size ( conf ) ) ; }


public float get reference angle ( ) { return joint get reference angle ( ) ; }


public void update instance ( string namespace id , string service name , instance instance ) throws nacos exception { service service = get service ( namespace id , service name ) ; if ( service = = null ) { throw new nacos exception ( nacos exception invalid param , " service not found , namespace : " + namespace id + " , service : " + service name ) ; } if ( ! service all i ps ( ) contains ( instance ) ) { throw new nacos exception ( nacos exception invalid param , " instance not exist : " + instance ) ; } add instance ( namespace id , service name , instance is ephemeral ( ) , instance ) ; }


finds pets by status multiple status values can be provided with comma separated strings

public completable future < api response < list < pet > > > find pets by status with http info ( list < string > status ) throws api exception { try { http request builder local var request builder = find pets by status request builder ( status ) ; return member var http client send async ( local var request builder build ( ) , http response body handlers of string ( ) ) then compose async ( local var response - > { if ( local var response status code ( ) / 100 ! = 2 ) { return completable future failed future ( get api exception ( " find pets by status " , local var response ) ) ; } try { return completable future completed future ( new api response < list < pet > > ( local var response status code ( ) , local var response headers ( ) map ( ) , member var object mapper read value ( local var response body ( ) , new type reference < list < pet > > ( ) { } ) ) ) ; } catch ( i o exception e ) { return completable future failed future ( new api exception ( e ) ) ; } } ) ; } catch ( api exception e ) { return completable future failed future ( e ) ; } }


public fingerprint add boolean ( boolean input ) { try { coded out write bool no tag ( input ) ; } catch ( i o exception e ) { throw new illegal state exception ( " failed to write bool " , e ) ; } return this ; }


public journal set get journal set ( ) { return journal set ; }


returns the value of the request header " user - agent " as a < code > string < code >

public static string get user agent ( http servlet request request ) { string user agent = request get header ( http header consts user agent header ) ; if ( string utils is empty ( user agent ) ) { user agent = string utils default if empty ( request get header ( http header consts client version header ) , string utils empty ) ; } return user agent ; }


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


if using android ' s embedded s q lite , this enables localized ordering of strings ( see { @ link # order asc ( property ) } and { @ link # order desc ( property ) } ) this uses " collate localized " , which is unavailable in s q l cipher ( in that case , the ordering is unchanged )

public query builder < t > prefer localized string order ( ) { / / s q l cipher 3 5 0 + does not understand " collate localized " if ( dao get database ( ) get raw database ( ) instanceof s q lite database ) { string order collation = " collate localized " ; } return this ; }


normalize latitude to lie within the - 90 to 90 ( both inclusive ) range note : you should not normalize longitude and latitude separately , because when normalizing latitude it may be necessary to add a shift of 180 & deg ; in the longitude for this purpose , you should call the { @ link # normalize point ( geo point ) } function

public static double normalize lat ( double lat ) { if ( lat > 9 0d | | lat < - 9 0d ) { lat = centered modulus ( lat , 360 ) ; if ( lat < - 90 ) { lat = - 180 - lat ; } else if ( lat > 90 ) { lat = 180 - lat ; } } / / avoid - 0 0 return lat + 0d ; }


the list of subject alternate names allowed for workload instances that implement this service this information is used to enforce [ secure - naming ] ( https : istio iodocsconceptssecurity # secure - naming ) if specified , the proxy will verify that the server certificate ' s subject alternate name matches one of the specified values < code > repeated string subject alt names = 8 ; < code >

public java lang string get subject alt names ( int index ) { return subject alt names get ( index ) ; }


remove the blocks associated to the given datanode storage info

void remove blocks associated to ( final datanode storage info storage info ) { assert namesystem has write lock ( ) ; final iterator < block info > it = storage info get block iterator ( ) ; datanode descriptor node = storage info get datanode descriptor ( ) ; collection < block info > to remove = new array list < > ( ) ; while ( it has next ( ) ) { to remove add ( it next ( ) ) ; } for ( block info block : to remove ) { remove stored block ( block , node ) ; final block b = get block on storage ( block , storage info ) ; if ( b ! = null ) { invalidate blocks remove ( node , b ) ; } } check safe mode ( ) ; log info ( " removed blocks associated with storage { } from data node { } " , storage info , node ) ; }


test setting the source for the request with different available setters

public void test set source ( ) throws exception { index request builder index request builder = new index request builder ( this test client , index action instance ) ; map < string , string > source = new hash map < > ( ) ; source put ( " some key " , " some value " ) ; index request builder set source ( source ) ; assert equals ( expected source , x content helper convert to json ( index request builder request ( ) source ( ) , true ) ) ; index request builder set source ( source , x content type json ) ; assert equals ( expected source , x content helper convert to json ( index request builder request ( ) source ( ) , true ) ) ; index request builder set source ( " some key " , " some value " ) ; assert equals ( expected source , x content helper convert to json ( index request builder request ( ) source ( ) , true ) ) ; / / force the object setter index request builder set source ( ( object ) " some key " , " some value " ) ; assert equals ( expected source , x content helper convert to json ( index request builder request ( ) source ( ) , true ) ) ; byte array output stream doc out = new byte array output stream ( ) ; x content builder doc = x content factory json builder ( doc out ) start object ( ) field ( " some key " , " some value " ) end object ( ) ; doc close ( ) ; index request builder set source ( doc out to byte array ( ) , x content type json ) ; assert equals ( expected source , x content helper convert to json ( index request builder request ( ) source ( ) , true , index request builder request ( ) get content type ( ) ) ) ; doc = x content factory json builder ( ) start object ( ) field ( " some key " , " some value " ) end object ( ) ; doc close ( ) ; index request builder set source ( doc ) ; assert equals ( expected source , x content helper convert to json ( index request builder request ( ) source ( ) , true ) ) ; }


register multifactor trusted authentication into webflow

protected void register multifactor trusted authentication ( ) { this multifactor authentication flow definition registries for each ( this : : register multifactor trusted authentication ) ; }


set up the metrics system , start it , and return it

protected metrics system init metrics system ( string path , boolean ignore errors , boolean allow append , boolean use secure params ) { / / if the prefix is not lower case , the metrics system won ' t be able to / / read any of the properties string prefix = method name get method name ( ) to lower case ( ) ; config builder builder = new config builder ( ) add ( " * period " , 10000 ) add ( prefix + " sink mysink 0 class " , mock sink class get name ( ) ) add ( prefix + " sink mysink 0 basepath " , path ) add ( prefix + " sink mysink 0 source " , " testsrc " ) add ( prefix + " sink mysink 0 context " , " test 1 " ) add ( prefix + " sink mysink 0 ignore - error " , ignore errors ) add ( prefix + " sink mysink 0 allow - append " , allow append ) add ( prefix + " sink mysink 0 roll - offset - interval - millis " , 0 ) add ( prefix + " sink mysink 0 roll - interval " , " 1h " ) add ( " * queue capacity " , 2 ) ; if ( use secure params ) { builder add ( prefix + " sink mysink 0 keytab - key " , sink keytab file key ) add ( prefix + " sink mysink 0 principal - key " , sink principal key ) ; } builder save ( test metrics config get test filename ( " hadoop - metrics 2 - " + prefix ) ) ; metrics system impl ms = new metrics system impl ( prefix ) ; ms start ( ) ; return ms ; }


tests that if the remote end closes connection ungracefully during ssl handshake while writing data , the disconnection is not treated as an authentication failure

public void test ungraceful remote close during handshake write ( args args ) throws exception { server = create echo server ( args , security protocol ssl ) ; test i o exceptions during handshake ( args , failure action no op , server : : close socket channels ) ; }


returns an { @ link escaper } that does no escaping , passing all character data through unchanged

public static escaper null escaper ( ) { return null escaper ; }


set the value of the < code > name < code > property to a < code > boolean < code >

public void set boolean ( string name , boolean value ) { set ( name , boolean to string ( value ) ) ; }


public long get index count ( ) { return index count ; }


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


resolve the argument also matching to the given type

public method parameter arg ( class < ? > type , class < ? > generics ) { return arg ( to resolvable type ( type , generics ) ) ; }


truncate the buffer file length to the specified index count

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


provides the static part of a partition a single partition maps each partition key to a partition value depending on the user - defined statement , the partition might not include all partition keys see the documentation of { @ link supports partitioning } for more information

void apply static partition ( map < string , string > partition ) ;


return all varnodes that start at a given address

public iterator < varnode a s t > get varnodes ( address addr ) { return vbank loc range ( addr ) ; }


the revision for all exported dubbo services from the specified { @ link service instance }

public static string get exported services revision ( service instance service instance ) { map < string , string > metadata = service instance get metadata ( ) ; return metadata get ( exported services revision property name ) ; }


if the specified agent config path is set , the agent will try to locate the specified agent config if the specified agent config path is not set , the agent will try to locate ` agent config ` , which should be in the config directory of agent package also try to override the config by system properties all the keys in this place should start with { @ link # env key prefix } e g in env ` skywalking agent service name = your app name ` to override ` agent service name ` in config file at the end , ` agent service name ` and ` collector servers ` must not be blank

public static void initialize core config ( string agent options ) { agent settings = new properties ( ) ; try ( final input stream reader config file stream = load config ( ) ) { agent settings load ( config file stream ) ; for ( string key : agent settings string property names ( ) ) { string value = ( string ) agent settings get ( key ) ; agent settings put ( key , property placeholder helper instance replace placeholders ( value , agent settings ) ) ; } } catch ( exception e ) { logger error ( e , " failed to read the config file , skywalking is going to run in default config " ) ; } try { override config by system prop ( ) ; } catch ( exception e ) { logger error ( e , " failed to read the system properties " ) ; } agent options = string util trim ( agent options , ' , ' ) ; if ( ! string util is empty ( agent options ) ) { try { agent options = agent options trim ( ) ; logger info ( " agent options is { } " , agent options ) ; override config by agent options ( agent options ) ; } catch ( exception e ) { logger error ( e , " failed to parse the agent options , val is { } " , agent options ) ; } } initialize config ( config class ) ; / / reconfigure logger after config initialization configure logger ( ) ; logger = log manager get logger ( sniffer config initializer class ) ; if ( string util is empty ( config agent service name ) ) { throw new exception in initializer error ( " ` agent service name ` is missing " ) ; } if ( string util is empty ( config collector backend service ) ) { throw new exception in initializer error ( " ` collector backend service ` is missing " ) ; } if ( config plugin peer max length < = 3 ) { logger warn ( " peer max length configuration : { } error , the default value of 200 will be used " , config plugin peer max length ) ; config plugin peer max length = 200 ; } is init completed = true ; }


set static attributes as a csv string format is : attname 0 = { value 1 } , attname 1 = { value 1 } " static " attributes are fixed attributes that are specified in the view instance configuration " dynamic " attributes , on the other hand , are values passed in as part of the model

public void set attributes c s v ( @ nullable string prop string ) throws illegal argument exception { if ( prop string ! = null ) { string tokenizer st = new string tokenizer ( prop string , " , " ) ; while ( st has more tokens ( ) ) { string tok = st next token ( ) ; int eq idx = tok index of ( ' = ' ) ; if ( eq idx = = - 1 ) { throw new illegal argument exception ( " expected ' = ' in attributes csv string ' " + prop string + " ' " ) ; } if ( eq idx > = tok length ( ) - 2 ) { throw new illegal argument exception ( " at least 2 characters ( [ ] ) required in attributes csv string ' " + prop string + " ' " ) ; } string name = tok substring ( 0 , eq idx ) ; / / delete first and last characters of value : { and } int begin index = eq idx + 2 ; int end index = tok length ( ) - 1 ; string value = tok substring ( begin index , end index ) ; add static attribute ( name , value ) ; } } }


returns whether the decoder may throw an { @ link illegal state exception } from { @ link media codec # dequeue output buffer ( media codec buffer info , long ) } or { @ link media codec # release output buffer ( int , boolean ) } after receiving an input buffer with { @ link media codec # buffer flag end of stream } set see [ internal : b 1 7 9 3 3 8 3 8 ]

private static boolean codec needs eos output exception workaround ( string name ) { return util sdk int = = 21 & & " omx google aac decoder " equals ( name ) ; }


generics support and serialization with deep stubs don ' t work together the issue is that generic metadata support is not serializable because the type elements inferred via reflection are not serializable supporting serialization would require to replace all types coming from the java reflection with our own and still managing type equality with the jdk ones

private object write replace ( ) throws i o exception { return mockito returns deep stubs ; }


returns the methods with { @ code member name index } declared by { @ code declaring type } and its subtypes

private set < integer > get method ids ( dex dex , set < integer > member name indexes , int declaring type ) { set < integer > subtypes = find assignable types ( dex , declaring type ) ; set < integer > methods = new hash set < integer > ( ) ; int method index = 0 ; for ( method id method : dex method ids ( ) ) { if ( member name indexes contains ( method get name index ( ) ) & & subtypes contains ( method get declaring class index ( ) ) ) { methods add ( method index ) ; } method index + + ; } return methods ; }


returns the callee save registers byte count

public long get callee save registers byte count ( ) { return callee save registers byte count ; }


writes the opening ' { @ code label } ' tag and forces a block tag so that body content is written correctly

protected int write tag content ( tag writer tag writer ) throws jsp exception { tag writer start tag ( label tag ) ; tag writer write attribute ( for attribute , resolve for ( ) ) ; write default attributes ( tag writer ) ; tag writer force block ( ) ; this tag writer = tag writer ; return eval body include ; }


prevent bottom view get any touch event especially in lay down mode

private void safe bottom view ( ) { status status = get open status ( ) ; list < view > bottoms = get bottom views ( ) ; if ( status = = status close ) { for ( view bottom : bottoms ) { if ( bottom ! = null & & bottom get visibility ( ) ! = invisible ) { bottom set visibility ( invisible ) ; } } } else { view current bottom view = get current bottom view ( ) ; if ( current bottom view ! = null & & current bottom view get visibility ( ) ! = visible ) { current bottom view set visibility ( visible ) ; } } }


listenable future < presto thrift split batch > get splits ( @ thrift field ( name = " schema table name " ) presto thrift schema table name schema table name , @ thrift field ( name = " desired columns " ) presto thrift nullable column set desired columns , @ thrift field ( name = " output constraint " ) presto thrift tuple domain output constraint , @ thrift field ( name = " max split count " ) int max split count , @ thrift field ( name = " next token " ) presto thrift nullable token next token ) ;


takes all jar files that are contained in this program ' s jar file and extracts them to the system ' s temp directory

public static list < file > extract contained libraries ( url jar file ) throws program invocation exception { try ( final jar file jar = new jar file ( new file ( jar file to u r i ( ) ) ) ) { final list < jar entry > contained jar file entries = get contained jar entries ( jar ) ; if ( contained jar file entries is empty ( ) ) { return collections empty list ( ) ; } final list < file > extracted temp libraries = new array list < > ( contained jar file entries size ( ) ) ; boolean incomplete = true ; try { final random rnd = new random ( ) ; final byte [ ] buffer = new byte [ 4096 ] ; for ( final jar entry entry : contained jar file entries ) { / / ' / ' as in case of zip , jar / / java util zip zip entry # is directory always looks only for ' / ' not for / / file separator final string name = entry get name ( ) replace ( ' / ' , ' ' ) ; final file temp file = copy lib to temp file ( name , rnd , jar , entry , buffer ) ; extracted temp libraries add ( temp file ) ; } incomplete = false ; } finally { if ( incomplete ) { delete extracted libraries ( extracted temp libraries ) ; } } return extracted temp libraries ; } catch ( throwable t ) { throw new program invocation exception ( " unknown i / o error while extracting contained jar files " , t ) ; } }


splits { @ code sequence } into string components and returns them as an immutable list if you want an { @ link iterable } which may be lazily evaluated , use { @ link # split ( char sequence ) }

public list < string > split to list ( char sequence sequence ) { check not null ( sequence ) ; iterator < string > iterator = splitting iterator ( sequence ) ; list < string > result = new array list < > ( ) ; while ( iterator has next ( ) ) { result add ( iterator next ( ) ) ; } return collections unmodifiable list ( result ) ; }


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


implement of { @ link base view # get context ( ) } ( ) }

public context get context ( ) { return this ; }


10 : or ( start 2 ) 12 : nfctx 20 , 2 ( 4 - byte instr not parsed due to instruction conflict @ 14 ) + - > 16 : ret | | 14 : imm ( start 1 ) ( parsed tail of 4 - byte nfctx instr ) + - - + test instruction conflict error

public void test disassembler instruction conflict ( ) throws exception { / / instr at 14 is tail of nfctx but we need to add to program builder to register / / instruction location for verification purpose only program builder add bytes fallthrough ( 14 ) ; program builder add bytes fallthrough ( 10 ) ; program builder add bytes fallthrough set no flow context ( 12 , 2 , 30 ) ; / / overwrites instr bytes at 14 program builder add bytes return ( 16 ) ; address set view dis addrs = disassembler disassemble ( addr ( 14 ) , null ) ; assert equals ( addrset ( range ( 14 , 17 ) ) , dis addrs ) ; dis addrs = disassembler disassemble ( addr ( 10 ) , null ) ; assert equals ( addrset ( range ( 10 , 11 ) ) , dis addrs ) ; verify instruction presence ( collection utils as set ( addr ( 12 ) ) ) ; verify error bookmark ( addr ( 12 ) , " conflicting instruction " ) ; }


configure tls extensions on { @ code ssl socket } for { @ code route }

public void configure tls extensions ( s s l socket ssl socket , string hostname , list < protocol > protocols ) { }


indicate that we just uploaded some data to azure storage

public void raw bytes uploaded ( long number of bytes ) { raw bytes uploaded incr ( number of bytes ) ; }


public void start ( ) { logger info ( " start game " ) ; ai component manager start ( ) ; physics component manager start ( ) ; render component manager start ( ) ; }


wait until a container has reached a specified state the timeout is specified by the parameter

public boolean wait for state ( mock n m nm , container id container id , r m container state container state , int timeout msecs ) throws exception { return wait for state ( arrays as list ( nm ) , container id , container state , timeout msecs ) ; }


ask this shard to refresh , in the background , to free up heap

protected void write indexing buffer async ( index shard shard ) { thread pool executor ( thread pool names refresh ) execute ( new abstract runnable ( ) { @ override public void do run ( ) { shard write indexing buffer ( ) ; } @ override public void on failure ( exception e ) { logger warn ( ( ) - > new parameterized message ( " failed to write indexing buffer for shard [ { } ] ; ignoring " , shard shard id ( ) ) , e ) ; } } ) ; }


public static java library to java lib ( resolved dependency info resolved dependency info ) { resolved artifact artifact = resolved dependency info get resolved artifact ( ) ; java library jar info = new java library impl ( artifact get file ( ) , null , immutable list < java library > of ( ) , null , convert ( artifact , type jar ) , false , false ) ; return jar info ; }


public static count down latch count down latch ( int count ) { return new count down latch ( count ) ; }


implements output stream write ( int ) in terms of output stream write ( byte [ ] , int , int ) output stream assumes that you implement output stream write ( int ) and provides default implementations of the others , but often the opposite is more efficient

public static void write single byte ( output stream out , int b ) throws i o exception { byte [ ] buffer = new byte [ 1 ] ; buffer [ 0 ] = ( byte ) ( b & 0xff ) ; out write ( buffer ) ; }


returns a data source supplier that will on get submit the request for execution and return a data source representing the pending results of the task

public supplier < data source < closeable reference < pooled byte buffer > > > get encoded image data source supplier ( final image request image request , final object caller context ) { return new supplier < data source < closeable reference < pooled byte buffer > > > ( ) { @ override public data source < closeable reference < pooled byte buffer > > get ( ) { return fetch encoded image ( image request , caller context ) ; } @ override public string to string ( ) { return objects to string helper ( this ) add ( " uri " , image request get source uri ( ) ) to string ( ) ; } } ; }


returns a newly - initialized { @ link options parser impl }

public options parser impl build ( ) { return new options parser impl ( this options data , this args pre processor , this skipped prefixes , this ignore internal options , this alias flag ) ; }


writes the ' { @ code value } ' attribute to the supplied { @ link tag writer } subclasses may choose to override this implementation to control exactly when the value is written

protected void write value ( tag writer tag writer ) throws jsp exception { string value to use = ( get value ( ) ! = null ? get value ( ) : get default value ( ) ) ; tag writer write attribute ( " value " , process field value ( get name ( ) , value to use , get type ( ) ) ) ; }


the " user " destination from the source message this may look like " userqueueposition - updates " when subscribing or " user { username } queueposition - updates " when sending a message

public string get source destination ( ) { return this source destination ; }


returns a list of framework library search paths

static immutable list < string > framework library search paths ( objc provider provider ) { immutable list builder < string > search paths = new immutable list builder < > ( ) ; return search paths / / add library search paths corresponding to custom ( non - sdk ) frameworks for each framework / / foo / bar framework , include " foo " as a search path add all ( provider static framework paths ( ) to list ( ) ) add all ( provider dynamic framework paths ( ) to list ( ) ) build ( ) ; }


public long get property long value ( final registered service service ) { if ( is assigned to ( service ) ) { val prop = get property value ( service ) ; if ( prop ! = null ) { return long parse long ( prop get value ( ) ) ; } } return long min value ; }


returns all banned i ps this does not include the i ps of id - banned players

public seq < string > get banned i ps ( ) { return banned i ps ; }


this method returns a { @ link state snapshot key group reader } that can be used to restore the state on a per - key - group basis this method tries to return a reader for the given version hint

state snapshot key group reader key group reader ( int read version hint ) ;


the string pool containing source paths referenced throughout the resource table this does not end up in the final binary arsc file < code > optional aapt pb string pool source pool = 1 ; < code >

public builder clear source pool ( ) { copy on write ( ) ; instance clear source pool ( ) ; return this ; }


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

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


public static void create table ( database db , boolean if not exists ) { string constraint = if not exists ? " if not exists " : " " ; db exec s q l ( " create table " + constraint + " \ " to one target2 \ " ( " + / / " \ " id \ " integer primary key ) ; " ) ; / / 0 : id }


the bulk iteration meta operator cannot have broadcast inputs this method always throws an exception

public < x > void set broadcast variables ( map < string , operator < x > > inputs ) { throw new unsupported operation exception ( " the bulk iteration meta operator cannot have broadcast inputs " ) ; }


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


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


public address get execution address ( ) { return emulator get execute address ( ) ; }


adds all of the given entries to the built bimap duplicate keys or values are not allowed , and will cause { @ link # build } to fail

public builder < k , v > put all ( iterable < ? extends entry < ? extends k , ? extends v > > entries ) { super put all ( entries ) ; return this ; }


public float get velocity x ( ) { return velocity x ; }


generate method config for service discovery metadata < p > make { @ link metadata service } support argument callback , used to notify { @ link org apache dubbo registry client service instance } ' s metadata change event

private list < method config > generate method config ( ) { method config method config = new method config ( ) ; method config set name ( " get and listen service discovery metadata " ) ; argument config argument config = new argument config ( ) ; argument config set index ( 1 ) ; argument config set callback ( true ) ; method config set arguments ( collections singleton list ( argument config ) ) ; return collections singleton list ( method config ) ; }


instant get expiration time ( ) { return expiration time ; }


public big decimal get my number ( ) { return my number ; }


launches the task built by this builder , using a non - blocking dialog the task will be run in the current thread if in a headless environment

public void launch non modal ( ) { validate ( ) ; boolean is modal = false ; task t = new task builder task ( is modal ) ; if ( system utilities is in headless mode ( ) ) { t monitored run ( task monitor dummy ) ; return ; } / / note : just calling the launcher will trigger the work int delay = get delay ( launch delay , is modal ) ; new task launcher ( t , parent , delay , dialog width ) ; }


build call for call 1 2 3test special tags

public okhttp 3 call call 1 2 3test special tags call ( client body , final api callback callback ) throws api exception { object local var post body = body ; / / create path and map variables string local var path = " / another - fake / dummy " ; list < pair > local var query params = new array list < pair > ( ) ; list < pair > local var collection query params = new array list < pair > ( ) ; map < string , string > local var header params = new hash map < string , string > ( ) ; map < string , string > local var cookie params = new hash map < string , string > ( ) ; map < string , object > local var form params = new hash map < string , object > ( ) ; final string [ ] local var accepts = { " application / json " } ; final string local var accept = local var api client select header accept ( local var accepts ) ; if ( local var accept ! = null ) { local var header params put ( " accept " , local var accept ) ; } final string [ ] local var content types = { " application / json " } ; final string local var content type = local var api client select header content type ( local var content types ) ; local var header params put ( " content - type " , local var content type ) ; string [ ] local var auth names = new string [ ] { } ; return local var api client build call ( local var path , " patch " , local var query params , local var collection query params , local var post body , local var header params , local var cookie params , local var form params , local var auth names , callback ) ; }


navigator nodes filter implementation returns true if element shouldn ' t be filtered ( i e always visible )

protected i navigator filter get navigator filter ( ) { return null ; }


adds an unnamed value to the formatted output it is strongly encouraged to use { @ link # add ( string , object ) } instead and give value a readable name

public to string helper add value ( @ nullable object value ) { return add holder ( value ) ; }


matches anything , including nulls and varargs see examples in javadoc for { @ link argument matchers } class this is an alias of : { @ link # any object ( ) } notes : < br > for primitive types use { @ link # any char ( ) } family or { @ link # is a ( class ) } or { @ link # any ( class ) } since mockito 2 1 0 { @ link # any ( class ) } is not anymore an alias of this method

public static < t > t any ( ) { return any object ( ) ; }


fix the button state after draggingdropping , since this is broken in java

private void reset button after drag ( j button button ) { / / hack : fix for error where the drag and drop system does not properly reset the state of / / j button if you drag away from and onto the same button and release , the button thinks / / it is still pressed and armed ( yeah , i know , dragging buttons is weird ) button model button model = button get model ( ) ; button model set armed ( false ) ; button model set pressed ( false ) ; button model set rollover ( false ) ; clear border ( ) ; }


decide whether frames should be prepared ahead of time when a frame is drawn

void prepare frames ( bitmap frame preparer bitmap frame preparer , bitmap frame cache bitmap frame cache , animation backend animation backend , int last drawn frame number ) ;


installs the given extension file this can be either an archive ( zip ) or a directory that contains an extension properties file

public static boolean install ( resource file r file ) { if ( r file = = null ) { msg warn ( null , " install file cannot be null " ) ; return false ; } try { if ( ! is extension ( r file ) ) { msg warn ( null , r file get absolute path ( ) + " does not point to a valid ghidra extension " ) ; return false ; } } catch ( extension exception e ) { msg warn ( null , r file get absolute path ( ) + " does not point to a valid ghidra extension " , e ) ; return false ; } return run install task ( r file get file ( false ) ) ; }


protected void start job acquisition thread ( ) { if ( async job acquisition thread = = null ) { async job acquisition thread = new thread ( async jobs due runnable ) ; } async job acquisition thread start ( ) ; }


resolve the given index names to index ids

public list < index id > resolve indices ( final list < string > indices ) { list < index id > resolved indices = new array list < > ( indices size ( ) ) ; for ( final string index name : indices ) { resolved indices add ( resolve index id ( index name ) ) ; } return resolved indices ; }


called once data should be decoded from the given { @ link byte buf } this method will call { @ link # decode ( channel handler context , byte buf , list ) } as long as decoding should take place

protected void call decode ( channel handler context ctx , byte buf in , list < object > out ) { try { while ( in is readable ( ) ) { int out size = out size ( ) ; if ( out size > 0 ) { fire channel read ( ctx , out , out size ) ; out clear ( ) ; / / check if this handler was removed before continuing with decoding / / if it was removed , it is not safe to continue to operate on the buffer / / / / see : / / - https : / / github com / netty / netty / issues / 4635 if ( ctx is removed ( ) ) { break ; } out size = 0 ; } int old input length = in readable bytes ( ) ; decode removal reentry protection ( ctx , in , out ) ; / / check if this handler was removed before continuing the loop / / if it was removed , it is not safe to continue to operate on the buffer / / / / see https : / / github com / netty / netty / issues / 1664 if ( ctx is removed ( ) ) { break ; } if ( out size = = out size ( ) ) { if ( old input length = = in readable bytes ( ) ) { break ; } else { continue ; } } if ( old input length = = in readable bytes ( ) ) { throw new decoder exception ( string util simple class name ( get class ( ) ) + " decode ( ) did not read anything but decoded a message " ) ; } if ( is single decode ( ) ) { break ; } } } catch ( decoder exception e ) { throw e ; } catch ( exception cause ) { throw new decoder exception ( cause ) ; } }


build up a metadata list of blobs in an azure blob directory this method uses a in - order first traversal of blob directory structures to maintain the sorted order of the blob names

private void build up list ( cloud blob directory wrapper a cloud blob directory , hash map < string , file metadata > metadata hash map , final int max listing count , final int max listing depth ) throws exception { / / push the blob directory onto the stack / / azure linked stack < iterator < list blob item > > dir iterator stack = new azure linked stack < iterator < list blob item > > ( ) ; iterable < list blob item > blob items = a cloud blob directory list blobs ( null , false , enum set of ( blob listing details metadata ) , null , get instrumented context ( ) ) ; iterator < list blob item > blob item iterator = blob items iterator ( ) ; if ( 0 = = max listing depth | | 0 = = max listing count ) { / / recurrence depth and listing count are already exhausted return / / immediately return ; } / / the directory listing depth is unbounded if the maximum listing depth / / is negative final boolean is unbounded depth = ( max listing depth < 0 ) ; / / reset the current directory listing depth int listing depth = 1 ; / / loop until all directories have been traversed in - order loop only / / the following conditions are satisfied : / / ( 1 ) the stack is not empty , and / / ( 2 ) max listing count > 0 implies that the number of items in the / / metadata list is less than the max listing count while ( null ! = blob item iterator & & ( max listing count < = 0 | | metadata hash map size ( ) < max listing count ) ) { while ( blob item iterator has next ( ) ) { / / check if the count of items on the list exhausts the maximum / / listing count / / if ( 0 < max listing count & & metadata hash map size ( ) > = max listing count ) { break ; } list blob item blob item = blob item iterator next ( ) ; / / add the file metadata to the list if this is not a blob / / directory item / / if ( blob item instanceof cloud block blob wrapper | | blob item instanceof cloud page blob wrapper ) { string blob key = null ; cloud blob wrapper blob = ( cloud blob wrapper ) blob item ; blob properties properties = blob get properties ( ) ; / / determine format of the blob name depending on whether an absolute / / path is being used or not blob key = normalize key ( blob ) ; file metadata metadata ; if ( retrieve folder attribute ( blob ) ) { metadata = new file metadata ( blob key , properties get last modified ( ) get time ( ) , get permission status ( blob ) , blob materialization explicit , hadoop block size ) ; } else { metadata = new file metadata ( blob key , get data length ( blob , properties ) , properties get last modified ( ) get time ( ) , get permission status ( blob ) , hadoop block size ) ; } / / add the metadata but remove duplicates note that the azure / / storage java sdk returns two types of entries : cloud blob wrappter / / and cloud directory wrapper in the case where wasb generated the / / data , there will be an empty blob for each " directory " , and we will / / receive a cloud blob wrapper if there are also files within this / / " directory " , we will also receive a cloud directory wrapper to / / complicate matters , the data may not be generated by wasb , in / / which case we may not have an empty blob for each " directory " / / so , sometimes we receive both a cloud blob wrapper and a / / cloud directory wrapper for each directory , and sometimes we receive / / one or the other but not both we remove duplicates , but / / prefer cloud blob wrapper over cloud directory wrapper / / furthermore , it is very unfortunate that the list results are not / / ordered , and it is a partial list which uses continuation so / / the hash map is the best structure to remove the duplicates , despite / / its potential large size metadata hash map put ( blob key , metadata ) ; } else if ( blob item instanceof cloud blob directory wrapper ) { cloud blob directory wrapper directory = ( cloud blob directory wrapper ) blob item ; / / this is a directory blob , push the current iterator onto / / the stack of iterators and start iterating through the current / / directory if ( is unbounded depth | | max listing depth > listing depth ) { / / push the current directory on the stack and increment the listing / / depth dir iterator stack push ( blob item iterator ) ; + + listing depth ; / / the current blob item represents the new directory get / / an iterator for this directory and continue by iterating through / / this directory blob items = directory list blobs ( null , false , enum set none of ( blob listing details class ) , null , get instrumented context ( ) ) ; blob item iterator = blob items iterator ( ) ; } else { / / determine format of directory name depending on whether an / / absolute path is being used or not string dir key = normalize key ( directory ) ; / / add the directory metadata to the list only if it ' s not already / / there see earlier note , we prefer cloud blob wrapper over / / cloud directory wrapper because it may have additional metadata ( / / properties and a c ls ) if ( ! metadata hash map contains key ( dir key ) ) { / / reached the targeted listing depth return metadata for the / / directory using default permissions / / / / note : something smarter should be done about permissions maybe / / inherit the permissions of the first non - directory blob / / also , getting a proper value for last - modified is tricky / / file metadata directory metadata = new file metadata ( dir key , 0 , default permission no blob metadata ( ) , blob materialization implicit , hadoop block size ) ; / / add the directory metadata to the list metadata hash map put ( dir key , directory metadata ) ; } } } } / / traversal of directory tree / / check if the iterator stack is empty if it is set the next blob / / iterator to null this will act as a terminator for the for - loop / / otherwise pop the next iterator from the stack and continue looping / / if ( dir iterator stack is empty ( ) ) { blob item iterator = null ; } else { / / pop the next directory item from the stack and decrement the / / depth blob item iterator = dir iterator stack pop ( ) ; - - listing depth ; / / assertion : listing depth should not be less than zero if ( listing depth < 0 ) { throw new assertion error ( " non - negative listing depth expected " ) ; } } } }


return the { @ link resource loader } currently being used

resource loader get resource loader ( ) ;


public long get exception handler offset ( ) { return exception handler offset ; }


block ( class < ? extends sub view > cls ) ;


draws an image at the coordinates specified

void draw ( image image , int x , int y ) { graphics draw image ( image image , x , y , null ) ; }


sets the pixel offset to move the gradient up or down the gradient is normally centered on the glyph

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


set the { @ link string } representations of the bytes immediately before ( and including ) a return instruction

public void set return bytes ( list < string > return bytes ) { this return bytes = return bytes ; }


sets the viewport visibility of the items in the section tree held by this recycler manually you almost definitely don ' t want to use this please talk to the litho team if you think you need to !

public void manually set viewport changed from external scroll ( int first visible index , int last visible index , int first fully visible index , int last fully visible index ) { if ( m section tree ! = null ) { m section tree view port changed from scrolling ( first visible index , last visible index , first fully visible index , last fully visible index ) ; } }


returns the front end major version number

public int get front end major version number ( ) { return front end major version number ; }


public long get low 8 ( ) { return lo 8 ; }


get the count of " 1 2 0d " triads which have two unidirectional edges and one bidirectional edge among the vertices , forming a closed triplet , a triangle ; both unidirectional edges source the same vertex

public big integer get count 1 2 0d ( ) { return counts [ 11 ] ; }


create a { @ link put object request } request the metadata is assumed to have been configured with the size of the operation

put object request new put object request ( string key , object metadata metadata , input stream input stream ) { preconditions check not null ( input stream ) ; preconditions check argument ( is not empty ( key ) , " null / empty key " ) ; put object request put object request = new put object request ( bucket , key , input stream , metadata ) ; set optional put request parameters ( put object request ) ; put object request set canned acl ( canned a c l ) ; return put object request ; }


gets called when the user clicks on the ok action for the dialog

protected void ok callback ( ) { list < domain file > list = new array list < > ( ) ; for ( int i = 0 ; i < checkboxes length ; i + + ) { if ( checkboxes [ i ] is selected ( ) ) { list add ( files get ( i ) ) ; } } if ( list size ( ) > 0 ) { domain file [ ] delete files = new domain file [ list size ( ) ] ; save task task = new save task ( list to array ( delete files ) ) ; new task launcher ( task , get component ( ) ) ; } else { operation completed = true ; close ( ) ; } }


creates an { @ link action config } from a { @ link starlark info }

static action config action config from starlark ( starlark info action config struct ) throws eval exception { check right provider type ( action config struct , " action config " ) ; string action name = get mandatory field from starlark provider ( action config struct , " action name " , string class ) ; if ( action name = = null | | action name is empty ( ) ) { throw info error ( action config struct , " the ' action name ' field of action config must be a nonempty string " ) ; } if ( ! action name matches ( " ^ [ a - z 0 - 9 + \ \ - \ \ ] * $ " ) ) { throw info error ( action config struct , " an action config ' s name must consist solely of lowercase ascii letters , digits , " + " ' ' , ' ' , ' + ' , and ' - ' , got ' % s ' " , action name ) ; } boolean enabled = get mandatory field from starlark provider ( action config struct , " enabled " , boolean class ) ; immutable list builder < cc toolchain features tool > tool builder = immutable list builder ( ) ; immutable list < starlark info > tool structs = get starlark provider list from starlark field ( action config struct , " tools " ) ; for ( starlark info tool struct : tool structs ) { tool builder add ( tool from starlark ( tool struct ) ) ; } immutable list builder < flag set > flag set builder = immutable list builder ( ) ; immutable list < starlark info > flag sets = get starlark provider list from starlark field ( action config struct , " flag sets " ) ; for ( starlark info flag set : flag sets ) { flag set builder add ( flag set from starlark ( flag set , action name ) ) ; } immutable list < string > implies = get string list from starlark provider field ( action config struct , " implies " ) ; return new action config ( action name , action name , tool builder build ( ) , flag set builder build ( ) , enabled , implies ) ; }


atomically adds the given value to the element at index { @ code i }

public double add and get ( int i , double delta ) { while ( true ) { long current = longs get ( i ) ; double current val = long bits to double ( current ) ; double next val = current val + delta ; long next = double to raw long bits ( next val ) ; if ( longs compare and set ( i , current , next ) ) { return next val ; } } }


returns a new instance of the distance field shader , see https : github comlibgdxlibgdxwiki distance - field - fonts if the u smoothing uniform > 0 0 otherwise the same code as the default sprite batch shader is used

static public shader program create distance field shader ( ) { string vertex shader = " attribute vec 4 " + shader program position attribute + " ; \ n " / / + " attribute vec 4 " + shader program color attribute + " ; \ n " / / + " attribute vec 2 " + shader program texcoord attribute + " 0 ; \ n " / / + " uniform mat 4 u proj trans ; \ n " / / + " varying vec 4 v color ; \ n " / / + " varying vec 2 v tex coords ; \ n " / / + " \ n " / / + " void main ( ) { \ n " / / + " v color = " + shader program color attribute + " ; \ n " / / + " v color a = v color a * ( 255 0 / 254 0 ) ; \ n " / / + " v tex coords = " + shader program texcoord attribute + " 0 ; \ n " / / + " gl position = u proj trans * " + shader program position attribute + " ; \ n " / / + " } \ n " ; string fragment shader = " # ifdef gl es \ n " / / + " precision mediump float ; \ n " / / + " precision mediump int ; \ n " / / + " # endif \ n " / / + " \ n " / / + " uniform sampler 2 d u texture ; \ n " / / + " uniform float u smoothing ; \ n " / / + " varying vec 4 v color ; \ n " / / + " varying vec 2 v tex coords ; \ n " / / + " \ n " / / + " void main ( ) { \ n " / / + " if ( u smoothing > 0 0 ) { \ n " / / + " float smoothing = 0 25 / u smoothing ; \ n " / / + " float distance = texture 2 d ( u texture , v tex coords ) a ; \ n " / / + " float alpha = smoothstep ( 0 5 - smoothing , 0 5 + smoothing , distance ) ; \ n " / / + " gl frag color = vec 4 ( v color rgb , alpha * v color a ) ; \ n " / / + " } else { \ n " / / + " gl frag color = v color * texture 2 d ( u texture , v tex coords ) ; \ n " / / + " } \ n " / / + " } \ n " ; shader program shader = new shader program ( vertex shader , fragment shader ) ; if ( ! shader is compiled ( ) ) throw new illegal argument exception ( " error compiling distance field shader : " + shader get log ( ) ) ; return shader ; }


@ override public abstract builder search enabled ( boolean search enabled ) ;


returns a list of indices that should be included into the snapshot

public string [ ] indices ( ) { return indices ; }


stops the directory scanner this method will wait for 1 minute for the main thread to exit and an additional 1 minute for the report compilation threads to exit if a thread does not exit in that time period , it is left running , and an error is logged

void shutdown ( ) { log info ( " shutdown has been called " ) ; if ( ! should run get and set ( false ) ) { log warn ( " shutdown has been called , but periodic scanner not started " ) ; } if ( master thread ! = null ) { master thread shutdown ( ) ; } if ( report compile thread pool ! = null ) { report compile thread pool shutdown now ( ) ; } if ( master thread ! = null ) { try { master thread await termination ( 1 , time unit minutes ) ; } catch ( interrupted exception e ) { log error ( " interrupted while waiting for master thread to " + " terminate " , e ) ; } } if ( report compile thread pool ! = null ) { try { report compile thread pool await termination ( 1 , time unit minutes ) ; } catch ( interrupted exception e ) { log error ( " interrupted while waiting for report compile thread pool to " + " terminate " , e ) ; } } if ( ! retain diffs ) { clear ( ) ; } }


updates the { @ link dash manifest } that this handler works on

public void update manifest ( dash manifest new manifest ) { is waiting for manifest refresh = false ; expired manifest publish time us = c time unset ; this manifest = new manifest ; remove previously expired manifest publish time values ( ) ; }


binds this instance buffer object for rendering via gl draw arrays instanced or gl draw elements instanced

public void bind ( shader program shader ) { bind ( shader , null ) ; }


static elf relocation table create elf relocation table ( factory bundled with binary reader reader , elf header header , elf section header reloc table section , long file offset , long addr offset , long length , long entry size , boolean addend type reloc , elf symbol table symbol table , elf section header section to be relocated , table format format ) throws i o exception { elf relocation table elf relocation table = ( elf relocation table ) reader get factory ( ) create ( elf relocation table class ) ; elf relocation table init elf relocation table ( reader , header , reloc table section , file offset , addr offset , length , entry size , addend type reloc , symbol table , section to be relocated , format ) ; return elf relocation table ; }


get the post from the provided endpoint record

protected int get port ( endpoint endpoint ) { int port = - 1 ; / / assume one address for now map < string , string > address = endpoint addresses get ( 0 ) ; if ( endpoint address type equals ( address types address hostname and port ) ) { port = integer parse int ( address get ( address types address port field ) ) ; } else if ( endpoint address type equals ( address types address uri ) ) { uri uri = uri create ( address get ( " uri " ) ) ; port = uri get port ( ) ; } return port ; }


creates a random string whose length is the number of characters specified characters will be chosen from the set of latin alphabetic characters ( a - z , a - z ) and the digits 0 - 9

public static string random alphanumeric ( final int count ) { return random ( count , true , true ) ; }


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 ) { return get configured instance ( key , t , collections empty map ( ) ) ; }


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

default response entity < void > test endpoint parameters ( @ api param ( value = " none " , required = true ) @ valid @ request part ( value = " number " , required = true ) big decimal number , @ api param ( value = " none " , required = true ) @ valid @ request part ( value = " double " , required = true ) double double , @ api param ( value = " none " , required = true ) @ valid @ request part ( value = " pattern without delimiter " , required = true ) string pattern without delimiter , @ api param ( value = " none " , required = true ) @ valid @ request part ( value = " byte " , required = true ) byte [ ] byte , @ api param ( value = " none " ) @ valid @ request part ( value = " integer " , required = false ) integer integer , @ api param ( value = " none " ) @ valid @ request part ( value = " int 3 2 " , required = false ) integer int 3 2 , @ api param ( value = " none " ) @ valid @ request part ( value = " int 6 4 " , required = false ) long int 6 4 , @ api param ( value = " none " ) @ valid @ request part ( value = " float " , required = false ) float float , @ api param ( value = " none " ) @ valid @ request part ( value = " string " , required = false ) string string , @ api param ( value = " none " ) @ valid @ request part ( value = " binary " , required = false ) multipart file binary , @ api param ( value = " none " ) @ valid @ request part ( value = " date " , required = false ) local date date , @ api param ( value = " none " ) @ valid @ request part ( value = " date time " , required = false ) offset date time date time , @ api param ( value = " none " ) @ valid @ request part ( value = " password " , required = false ) string password , @ api param ( value = " none " ) @ valid @ request part ( value = " callback " , required = false ) string param callback ) { return new response entity < > ( http status not implemented ) ; }


protected void clear ( ) { text label set text ( " " ) ; }


performs a rollover on a { @ code data stream } instance and returns a new instance containing the updated list of backing indices and incremented generation

public data stream rollover ( string write index uuid , version min node version ) { if ( replicated ) { throw new illegal argument exception ( " data stream [ " + name + " ] cannot be rolled over , " + " because it is a replicated data stream " ) ; } list < index > backing indices = new array list < > ( indices ) ; final string new write index name = data stream get default backing index name ( get name ( ) , get generation ( ) + 1 , min node version ) ; backing indices add ( new index ( new write index name , write index uuid ) ) ; return new data stream ( name , time stamp field , backing indices , generation + 1 , metadata , hidden , replicated ) ; }


are qual src and qual dst of the same file system ?

private static boolean is same f s ( path qual path 1 , path qual path 2 ) { uri src uri = qual path 1 to uri ( ) ; uri dst uri = qual path 2 to uri ( ) ; return ( src uri get scheme ( ) equals ( dst uri get scheme ( ) ) & & ! ( src uri get authority ( ) ! = null & & dst uri get authority ( ) ! = null & & src uri get authority ( ) equals ( dst uri get authority ( ) ) ) ) ; }


replace fails when the given key is not present

public void test replace ( ) { concurrent map map = map 5 ( ) ; assert null ( map replace ( six , " z " ) ) ; assert false ( map contains key ( six ) ) ; }


the value of the attributes count item indicates the number of additional attributes of this field

public int get attributes count ( ) { return attributes count & 0xffff ; }


public static string id for ( @ non null class < ? > clazz ) { return clazz get name ( ) replace ( ' $ ' , ' ' ) ; }


check to see if the second data type is the same as the first data type or is part of it < br > note : pointers to the second data type are references and therefore are not considered to be part of the first and won ' t cause true to be returned if you pass a pointer to this method for the first or second parameter , it will return false

public static boolean is second part of first ( data type first data type , data type second data type ) { if ( first data type instanceof pointer | | second data type instanceof pointer ) { return false ; } if ( first data type equals ( second data type ) ) { return true ; } if ( first data type instanceof array ) { data type element data type = ( ( array ) first data type ) get data type ( ) ; return is second part of first ( element data type , second data type ) ; } if ( first data type instanceof type def ) { data type inner data type = ( ( type def ) first data type ) get data type ( ) ; return is second part of first ( inner data type , second data type ) ; } if ( first data type instanceof composite ) { composite composite data type = ( composite ) first data type ; for ( data type component dtc : composite data type get defined components ( ) ) { data type data type to check = dtc get data type ( ) ; if ( is second part of first ( data type to check , second data type ) ) { return true ; } } if ( first data type instanceof structure ) { data type component flex dtc = ( ( structure ) first data type ) get flexible array component ( ) ; if ( flex dtc ! = null & & is second part of first ( flex dtc get data type ( ) , second data type ) ) { return true ; } } } return false ; }


computes the segment associated with a given index

public static int segment ( long index ) { return ( int ) ( index > > > segment shift ) ; }


returns a new multibinder that collects instances of { @ code type } in a { @ link set } that is itself bound with { @ code annotation }

public static < t > multibinder < t > new set binder ( binder binder , class < t > type , annotation annotation ) { return new set binder ( binder , type literal get ( type ) , annotation ) ; }


returns the string representation of the < code > cron expression < code >

public string to string ( ) { return expression ; }


sets the factory for { @ link extractor } s to process the media stream the default value is an instance of { @ link default extractors factory }

public factory set extractors factory ( @ nullable extractors factory extractors factory ) { this extractors factory = extractors factory ! = null ? extractors factory : new default extractors factory ( ) ; return this ; }


invoke api by sending http request with the given options

public < t > t invoke a p i ( string path , string method , list < pair > query params , list < pair > collection query params , object body , map < string , string > header params , map < string , string > cookie params , map < string , object > form params , string accept , string content type , string [ ] auth names , generic type < t > return type ) throws api exception { client response response = get a p i response ( path , method , query params , collection query params , body , header params , cookie params , form params , accept , content type , auth names ) ; status code = response get status info ( ) get status code ( ) ; response headers = response get headers ( ) ; if ( response get status info ( ) get status code ( ) = = client response status no content get status code ( ) ) { return null ; } else if ( response get status info ( ) get family ( ) = = family successful ) { if ( return type = = null ) return null ; else return response get entity ( return type ) ; } else { string message = " error " ; string resp body = null ; if ( response has entity ( ) ) { try { resp body = response get entity ( string class ) ; message = resp body ; } catch ( runtime exception e ) { / / e print stack trace ( ) ; } } throw new api exception ( response get status info ( ) get status code ( ) , message , response get headers ( ) , resp body ) ; } }


returns the number of samples per frame associated with { @ code header data } , or { @ link c # length unset } if it is invalid

public static int parse mpeg audio frame sample count ( int header data ) { if ( ! is magic present ( header data ) ) { return c length unset ; } int version = ( header data > > > 19 ) & 3 ; if ( version = = 1 ) { return c length unset ; } int layer = ( header data > > > 17 ) & 3 ; if ( layer = = 0 ) { return c length unset ; } / / those header values are not used but are checked for consistency with the other methods int bitrate index = ( header data > > > 12 ) & 15 ; int sampling rate index = ( header data > > > 10 ) & 3 ; if ( bitrate index = = 0 | | bitrate index = = 0x f | | sampling rate index = = 3 ) { return c length unset ; } return get frame size in samples ( version , layer ) ; }


sort the given range of items using quick sort { @ inherit doc } if the recursion depth falls below { @ link # get max depth } , then switch to { @ link heap sort }

public void sort ( indexed sortable s , int p , int r ) { sort ( s , p , r , null ) ; }


returns an immutable map containing a single entry this map behaves and performs comparably to { @ link collections # singleton map } but will not accept a null key or value it is preferable mainly for consistency and maintainability of your code

public static < k , v > immutable map < k , v > of ( k k 1 , v v 1 ) { return immutable bi map of ( k 1 , v 1 ) ; }


scan blocks in { @ link # needed reconstruction } and assign reconstruction ( replication or erasure coding ) work to data - nodes they belong to the number of process blocks equals either twice the number of live data - nodes or the number of low redundancy blocks whichever is less

int compute block reconstruction work ( int blocks to process ) { list < list < block info > > blocks to reconstruct = null ; namesystem write lock ( ) ; try { boolean reset = false ; if ( repl queue reset to head threshold > 0 ) { if ( repl queue calls since reset > = repl queue reset to head threshold ) { reset = true ; repl queue calls since reset = 0 ; } else { repl queue calls since reset + + ; } } / / choose the blocks to be reconstructed blocks to reconstruct = needed reconstruction choose low redundancy blocks ( blocks to process , reset ) ; } finally { namesystem write unlock ( ) ; } return compute reconstruction work for blocks ( blocks to reconstruct ) ; }


set the value of the { @ code if - modified - since } header the date should be specified as the number of milliseconds since january 1 , 1970 gmt

s if modified since ( zoned date time if modified since ) ;


an integer that contains the value of this symbol the format of this value is different for each type of symbol

public long get value ( ) { return n value ; }


set the encoding used for reading the script resource the default value for regular resources is " utf - 8 " a { @ code null } value implies the platform default

public void set encoding ( @ nullable string encoding ) { this resource = new encoded resource ( this resource get resource ( ) , encoding ) ; }


reads the next { @ code length } bytes as characters in the specified { @ link charset }

public string read string ( int length , charset charset ) { string result = new string ( data , position , length , charset ) ; position + = length ; return result ; }


model tests for array of array of number only

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


pause the container cancels the launch if the container isn ' t launched yet otherwise asks the executor to pause the container

public void pause container ( ) throws i o exception { container id container id = container get container id ( ) ; string container id str = container id to string ( ) ; log info ( " pausing the container " + container id str ) ; / / the pause event is only handled if the container is in the running state / / ( the container state machine ) , so we don ' t check for / / should launch container over here if ( ! should pause container compare and set ( false , true ) ) { log info ( " container " + container id + " not paused as " + " resume already called " ) ; return ; } try { / / pause the container exec pause container ( container ) ; / / pause container is a blocking call we are here almost means the / / container is paused , so send out the event dispatcher get event handler ( ) handle ( new container event ( container id , container event type container paused ) ) ; try { this context get n m state store ( ) store container paused ( container get container id ( ) ) ; } catch ( i o exception e ) { log warn ( " could not store container [ " + container get container id ( ) + " ] state the container has been paused " , e ) ; } } catch ( exception e ) { string message = " exception when trying to pause container " + container id str + " : " + string utils stringify exception ( e ) ; log info ( message ) ; container handle ( new container kill event ( container get container id ( ) , container exit status preempted , " container preempted as there was " + " an exception in pausing it " ) ) ; } }


this test creates a program with 4 sources ( 2 with master hooks , 2 without ) the resulting job graph must have 2 configured master hooks

public void test hook configuration ( ) throws exception { / / create some sources some of which configure master hooks final test source source 1 = new test source ( ) ; final test source with hook source 2 = new test source with hook ( " foo " ) ; final test source source 3 = new test source ( ) ; final test source with hook source 4 = new test source with hook ( " bar " ) ; final map function < string , string > identity = new identity < > ( ) ; final identity with hook < string > identity with hook 1 = new identity with hook < > ( " apple " ) ; final identity with hook < string > identity with hook 2 = new identity with hook < > ( " orange " ) ; final set < master trigger restore hook < ? > > hooks = new hash set < master trigger restore hook < ? > > ( as list ( source 2 create master trigger restore hook ( ) , source 4 create master trigger restore hook ( ) , identity with hook 1 create master trigger restore hook ( ) , identity with hook 2 create master trigger restore hook ( ) ) ) ; / / we can instantiate a local environment here , because we never actually execute something final stream execution environment env = stream execution environment create local environment ( ) ; env enable checkpointing ( 500 ) ; env add source ( source 1 ) map ( identity ) union ( env add source ( source 2 ) map ( identity ) ) union ( env add source ( source 3 ) map ( identity with hook 1 ) ) union ( env add source ( source 4 ) map ( identity with hook 2 ) ) add sink ( new discarding sink < string > ( ) ) ; final job graph jg = env get stream graph ( ) get job graph ( ) ; serialized value < factory [ ] > serialized configured hooks = jg get checkpointing settings ( ) get master hooks ( ) ; assert not null ( serialized configured hooks ) ; factory [ ] configured hooks = serialized configured hooks deserialize value ( get class ( ) get class loader ( ) ) ; assert equals ( hooks size ( ) , configured hooks length ) ; / / check that all hooks are contained and exist exactly once for ( factory f : configured hooks ) { master trigger restore hook < ? > hook = f create ( ) ; assert true ( hooks remove ( hook ) ) ; } assert true ( hooks is empty ( ) ) ; }


accepts the given visitor in the context of the given code attribute

public void accept ( clazz clazz , method method , code attribute code attribute , attribute visitor attribute visitor ) { / / delegate to the default invocation if the code attribute is null / / anyway if ( code attribute = = null ) { accept ( clazz , method , attribute visitor ) ; } else { throw new unsupported operation exception ( " method must be overridden in [ " + this get class ( ) get name ( ) + " ] if ever called " ) ; } }


sets whether media sources should be initialized lazily if false , all initial preparation steps ( e g , manifest loads ) happen immediately if true , these initial preparations are triggered only when the player starts buffering the media

public builder set use lazy preparation ( boolean use lazy preparation ) { assertions check state ( ! build called ) ; this use lazy preparation = use lazy preparation ; return this ; }


clears any resources for loading frames that are currently held on to by this object

public void recycle ( ) { is recycled = true ; state frame loader clear ( ) ; }


determine whether this { @ code resolvable type } is assignable from the specified other type

public boolean is assignable from ( class < ? > other ) { return is assignable from ( for class ( other ) , null ) ; }


adapt saml metadata and parse acts as a facade

public static optional < saml registered service service provider metadata facade > get ( final saml registered service caching metadata resolver resolver , final saml registered service registered service , final request abstract type request ) { return get ( resolver , registered service , saml id p utils get issuer from saml object ( request ) ) ; }


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

public string api file folder ( ) { return output folder + file separator + api package ( ) replace ( ' ' , file separator char ) ; }


look up a parameter type ids from a method index cheaper than : { @ code read type list ( proto ids get ( method ids ( ) get ( method dex index ) get proto index ( ) ) get parameters offset ( ) ) get types ( ) ; }

public short [ ] parameter type indices from method index ( int method index ) { check bounds ( method index , table of contents method ids size ) ; int position = table of contents method ids off + ( size of member id item * method index ) ; position + = size of ushort ; / / declaring class index int proto index = data get short ( position ) & 0x f f f f ; check bounds ( proto index , table of contents proto ids size ) ; position = table of contents proto ids off + ( size of proto id item * proto index ) ; position + = size of uint ; / / shorty index position + = size of uint ; / / return type index int parameters offset = data get int ( position ) ; if ( parameters offset = = 0 ) { return empty short array ; } position = parameters offset ; int size = data get int ( position ) ; if ( size < = 0 ) { throw new assertion error ( " unexpected parameter type list size : " + size ) ; } position + = size of uint ; short [ ] types = new short [ size ] ; for ( int i = 0 ; i < size ; i + + ) { types [ i ] = data get short ( position ) ; position + = size of ushort ; } return types ; }


retrieves the saveable object stored at the given index

public saveable get object ( long index ) { property page page = get page ( get page i d ( index ) ) ; if ( page ! = null ) { return page get saveable object ( get page offset ( index ) ) ; } return null ; }


setter for a map of { @ link s q l exception translator } references where the key must be the database name as defined in the { @ code sql - error - codes xml } file note that any existing translators will remain unless there is a match in the database name , at which point the new translator will replace the existing one

public void set translators ( map < string , s q l exception translator > translators ) { this translators put all ( translators ) ; }


extract unit and actual value from resource value

public static string [ ] parse resource value ( string resource value ) { string [ ] resource = new string [ 2 ] ; int i = 0 ; for ( ; i < resource value length ( ) ; i + + ) { if ( character is alphabetic ( resource value char at ( i ) ) ) { break ; } } string units = resource value substring ( i ) ; if ( string utils is alpha ( units ) | | units equals ( " " ) ) { resource [ 0 ] = units ; resource [ 1 ] = resource value substring ( 0 , i ) ; return resource ; } else { throw new illegal argument exception ( " units ' " + units + " ' " + " contains non alphabet characters , which is not allowed " ) ; } }


rewrites invokestatic method calls static calls to non - public methods are rewritten according to the following pseudo code : before : < code > $ value = $ type protected static ( arg 1 , arg 2 ) ; < code > after : < code > $ value = ( unbox ) $ package android instant runtime invoke protected static method ( new object [ ] { arg 1 , arg 2 } , new class [ ] { string class , integer class } , " protected static " , $ type class ) ; < code >

private boolean handle static opcode ( string owner , string name , string desc , boolean itf ) { if ( debug ) { system out println ( " static method : " + name + " : " + desc + " : " + itf + " : " + is static ) ; } access right access right = get method access right ( owner , name , desc ) ; if ( access right = = access right public ) { return false ; } / / for anything else , private , protected and package private , we must go through / / reflection / / stack : < param 1 > / / < param 2 > / / / / < param n > push method redirect arguments on stack ( name , desc ) ; / / push the class implementing the original static method visit ldc insn ( type get type ( " l " + owner + " ; " ) ) ; / / stack : < boxed method parameter > / / < target parameter types > / / < target method name > / / < target class name > invoke static ( ali runtime type , method get method ( " object invoke protected static method ( object [ ] , class [ ] , string , class ) " ) ) ; / / stack : method return value or null if the method was void handle return type ( desc ) ; return true ; }


perform an operation using the given method

void do with ( method method ) throws illegal argument exception , illegal access exception ;


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


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


gets the current generation stamp for this filesystem

public void set generation stamp ( long stamp ) { generation stamp set current value ( stamp ) ; }


creates a crash caused by the given { @ link throwable } with a specified { @ link exit code }

public static crash from ( throwable throwable , exit code exit code ) { return new crash ( throwable , detailed exit code of ( exit code , crash failure details for throwable ( throwable ) ) ) ; }


gets an instance of { @ link row data } from underlying { @ link memory segment }

public static row data read row data ( memory segment [ ] segments , int num fields , int base offset , long offset and size ) { final int size = ( ( int ) offset and size ) ; int offset = ( int ) ( offset and size > > 32 ) ; nested row data row = new nested row data ( num fields ) ; row point to ( segments , offset + base offset , size ) ; return row ; }


build the { @ link rest client } used for reindexing from remote clusters

static rest client build rest client ( remote info remote info , reindex ssl config ssl config , long task id , list < thread > thread collector ) { header [ ] client headers = new header [ remote info get headers ( ) size ( ) ] ; int i = 0 ; for ( map entry < string , string > header : remote info get headers ( ) entry set ( ) ) { client headers [ i + + ] = new basic header ( header get key ( ) , header get value ( ) ) ; } final rest client builder builder = rest client builder ( new http host ( remote info get host ( ) , remote info get port ( ) , remote info get scheme ( ) ) ) set default headers ( client headers ) set request config callback ( c - > { c set connect timeout ( math to int exact ( remote info get connect timeout ( ) millis ( ) ) ) ; c set socket timeout ( math to int exact ( remote info get socket timeout ( ) millis ( ) ) ) ; return c ; } ) set http client config callback ( c - > { / / enable basic auth if it is configured if ( remote info get username ( ) ! = null ) { username password credentials creds = new username password credentials ( remote info get username ( ) , remote info get password ( ) ) ; credentials provider credentials provider = new basic credentials provider ( ) ; credentials provider set credentials ( auth scope any , creds ) ; c set default credentials provider ( credentials provider ) ; } / / stick the task id in the thread name so we can track down tasks from stack traces atomic integer threads = new atomic integer ( ) ; c set thread factory ( r - > { string name = " es - client - " + task id + " - " + threads get and increment ( ) ; thread t = new thread ( r , name ) ; thread collector add ( t ) ; return t ; } ) ; / / limit ourselves to one reactor thread because for now the search process is single threaded c set default i o reactor config ( i o reactor config custom ( ) set io thread count ( 1 ) build ( ) ) ; c set s s l strategy ( ssl config get strategy ( ) ) ; return c ; } ) ; if ( strings has length ( remote info get path prefix ( ) ) & & " / " equals ( remote info get path prefix ( ) ) = = false ) { builder set path prefix ( remote info get path prefix ( ) ) ; } return builder build ( ) ; }


sets a column constraint for this rule if set , the rule ' s token will only be returned if the pattern is detected starting at the specified column if the column is smaller then 0 , the column constraint is considered removed

public void set column constraint ( int column ) { if ( column < 0 ) column = undefined ; f column = column ; }


applies when sorting , and controls if scores will be tracked as well defaults to { @ code false }

public search source builder track scores ( boolean track scores ) { this track scores = track scores ; return this ; }


public boolean is read only ( ) { return permission = = read only ; }


handles server response and returns new token if any to be sent to server

string handle response ( final string base 6 4 token ) throws privileged action exception { if ( gss context is established ( ) ) { throw new illegal state exception ( " gss context has already been established " ) ; } final byte [ ] token = base 6 4 get decoder ( ) decode ( base 6 4 token ) ; final byte [ ] out token = kerberos test case do as wrapper ( login context get subject ( ) , ( privileged exception action < byte [ ] > ) ( ) - > gss context init sec context ( token , 0 , token length ) ) ; if ( out token = = null | | out token length = = 0 ) { return null ; } return base 6 4 get encoder ( ) encode to string ( out token ) ; }


creates list of users with given input array

public void create users with array input ( list < user > user ) throws api exception { create users with array input with http info ( user ) ; }


public static < t > t get logout redirect url ( final request context context , final class < t > clazz ) { return context get flow scope ( ) get ( " logout redirect url " , clazz ) ; }


public long get $ special property name ( ) { return $ special property name ; }


public void remove ( node node ) { if ( node previous ! = null ) { node previous next = node next ; } else { head = node next ; } if ( node next ! = null ) { node next previous = node previous ; } else { end = node previous ; } }


return varnode of given size and starting address defined by a pcode op with a given sequence number

public varnode find varnode ( int sz , address addr , sequence number sq ) { return vbank find ( sz , addr , sq get target ( ) , sq get time ( ) ) ; }


boolean store state machine ( state machine state machine ) ;


assemble time point based on { @ link # step } and { @ link # start } { @ link # end }

public list < point of time > assemble duration points ( ) { return duration utils instance get duration points ( step , get start time bucket ( ) , get end time bucket ( ) ) ; }


encodes the specified byte array , and returns the encoded { @ code string }

public string encode ( byte [ ] bytes ) { return encode ( bytes , 0 , bytes length ) ; }


< code > optional org apache dubbo common serialize protobuf model p b request type c dubbo p b request type = 3 ; < code >


used for asynchronous execution with a callback by subscribing to the { @ link observable } this eagerly starts execution the same as { @ link hystrix collapser # queue ( ) } and { @ link hystrix collapser # execute ( ) } a lazy { @ link observable } can be obtained from { @ link # to observable ( ) } < b > callback scheduling < b > when using { @ link execution isolation strategy # thread } this defaults to using { @ link schedulers # computation ( ) } for callbacks when using { @ link execution isolation strategy # semaphore } this defaults to using { @ link schedulers # immediate ( ) } for callbacks use { @ link # to observable ( rx scheduler ) } to schedule the callback differently see https : github com netflix rx javawiki for more information

public observable < response type > observe ( ) { / / use a replay subject to buffer the eagerly subscribed - to observable replay subject < response type > subject = replay subject create ( ) ; / / eagerly kick off subscription final subscription underlying subscription = to observable ( ) subscribe ( subject ) ; / / return the subject that can be subscribed to later while the execution has already started return subject do on unsubscribe ( new action 0 ( ) { @ override public void call ( ) { underlying subscription unsubscribe ( ) ; } } ) ; }


creates a { @ link default completed checkpoint store } instance with { @ link zoo keeper state handle store }

public static completed checkpoint store create completed checkpoints ( curator framework client , configuration configuration , job i d job id , int max number of checkpoints to retain , executor executor ) throws exception { check not null ( configuration , " configuration " ) ; string checkpoints path = configuration get string ( high availability options ha zookeeper checkpoints path ) ; retrievable state storage helper < completed checkpoint > state storage = create file system state storage ( configuration , ha storage completed checkpoint ) ; checkpoints path + = get path for job ( job id ) ; final zoo keeper state handle store < completed checkpoint > completed checkpoint state handle store = create zoo keeper state handle store ( client , checkpoints path , state storage ) ; final completed checkpoint store zoo keeper completed checkpoint store = new default completed checkpoint store < > ( max number of checkpoints to retain , completed checkpoint state handle store , zoo keeper checkpoint store util instance , executor ) ; log info ( " initialized { } in ' { } ' with { } " , default completed checkpoint store class get simple name ( ) , completed checkpoint state handle store , checkpoints path ) ; return zoo keeper completed checkpoint store ; }


sets the increment applied to the ticker whenever it is queried the default behavior is to auto increment by zero i e : the ticker is left unchanged when queried

public fake ticker set auto increment step ( long auto increment step , time unit time unit ) { check argument ( auto increment step > = 0 , " may not auto - increment by a negative amount " ) ; this auto increment step nanos = time unit to nanos ( auto increment step ) ; return this ; }


verify that a parent queue ( type = parent ) cannot have a max a m share element as dynamic queues won ' t be able to inherit this setting

public void test parent tag with max a m share ( ) throws exception { conf set ( fair scheduler configuration allocation file , alloc file ) ; allocation file writer create ( ) add queue ( new allocation file queue builder ( " parent " ) parent ( true ) max a m share ( 0 75 ) build ( ) ) write to file ( alloc file ) ; allocation file loader service alloc loader = new allocation file loader service ( scheduler ) ; alloc loader init ( conf ) ; reload listener conf holder = new reload listener ( ) ; alloc loader set reload listener ( conf holder ) ; try { alloc loader reload allocations ( ) ; fail ( " expect allocation parsing to fail as max a m share cannot be set for " + " a parent queue " ) ; } catch ( allocation configuration exception ex ) { assert equals ( ex get message ( ) , " the configuration settings for root parent " + " are invalid a queue element that contains child queue elements " + " or that has the type = ' parent ' attribute cannot also include a " + " max a m share element " ) ; } }


closes the current line string by adding the starting point as the end point this will have no effect if starting and end point are already the same

public line string builder close ( ) { coordinate start = coordinates get ( 0 ) ; coordinate end = coordinates get ( coordinates size ( ) - 1 ) ; if ( start x ! = end x | | start y ! = end y ) { coordinates add ( start ) ; } return this ; }


writes a normalized key for the given record into the target byte array , starting at the specified position an writing exactly the given number of bytes note that the comparison of the bytes is treating the bytes as unsigned bytes : { @ code int byte i = bytes [ i ] & 0x f f ; } if the meaningful part of the normalized key takes less than the given number of bytes , then it must be padded padding is typically required for variable length data types , such as strings the padding uses a special character , either { @ code 0 } or { @ code 0xff } , depending on whether shorter values are sorted to the beginning or the end

void copy normalized key ( memory segment memory , int offset , int len ) ;


test the property ' enum string required '

public void enum string required test ( ) { / / todo : test enum string required }


< code > optional aapt pb attribute attr = 1 ; < code >

public builder set attr ( com android aapt resources attribute value ) { copy on write ( ) ; instance set attr ( value ) ; return this ; }


map of string keys and values that can be used by source and sink to communicate arbitrary metadata about this resource < code > map & lt ; string , string & gt ; annotations = 5 ; < code >

public boolean contains annotations ( java lang string key ) { if ( key = = null ) { throw new java lang null pointer exception ( ) ; } return internal get annotations ( ) get map ( ) contains key ( key ) ; }