the response resources wrapped in the common mcp resource message these are typed resources that match the type url in the request resources message when ` incremental ` is true , this contains an array of resources to addupdate for the specified collection this modifies the existing collection at the sink when ` incremental ` is false , this contains the full set of resources for the specified collection this replaces any previously delivered resources < code > repeated istio mcp v 1alpha 1 resource resources = 3 ; < code >

public builder add all resources ( java lang iterable < ? extends com alibaba nacos istio model mcp resource > values ) { if ( resources builder = = null ) { ensure resources is mutable ( ) ; com google protobuf abstract message lite builder add all ( values , resources ) ; on changed ( ) ; } else { resources builder add all messages ( values ) ; } return this ; }


public f s data output stream builder append file ( path path ) { return create data output stream builder ( this , path ) append ( ) ; }


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

public void delete user ( @ path param ( " username " ) string username ) throws api exception , processing exception ;


check if identity is allowed to show metadata of tables by executing show tables , show grants etc in a catalog note : this method is only present to give users an error message when listing is not allowed the { @ link # filter tables } method must filter all results for unauthorized users , since there are multiple ways to list tables

default void check can show tables metadata ( identity identity , access control context context , catalog schema name schema ) { deny show tables metadata ( schema to string ( ) ) ; }


fake endpoint to test group parameters ( optional ) fake endpoint to test group parameters ( optional )

public single < void > rx test group parameters ( integer required string group , boolean required boolean group , long required int 6 4 group , integer string group , boolean boolean group , long int 6 4 group ) { return single create ( new io vertx rx java single on subscribe adapter < > ( fut - > delegate test group parameters ( required string group , required boolean group , required int 6 4 group , string group , boolean group , int 6 4 group , fut ) ) ) ; }


protected object prim transform ( object an object ) throws exception { return format format ( ( big decimal ) an object ) ; }


maximum number of processed documents defaults to processing all documents

public self max docs ( int max docs ) { request set max docs ( max docs ) ; return self ( ) ; }


the request format follows that of { @ code & lt ; n : form xmlns : n = " libform " > }

t do create item ( stapler request req , stapler response rsp ) throws i o exception , servlet exception ;


public boolean unlock orientation ( ) { return unlock orientation j s n i ( ) ; }


public void attribute integer test ( ) { / / todo : test attribute integer }


returns whether the media currently being played has captions this method is called each time the media session playback state needs to be updated and published upon a player state change

boolean has captions ( player player ) ;


public org elasticsearch action admin indices shrink resize response shrink ( org elasticsearch action admin indices shrink resize request resize request , request options options ) throws i o exception { return rest high level client perform request and parse entity ( resize request , indices request converters : : shrink , options , org elasticsearch action admin indices shrink resize response : : from x content , empty set ( ) ) ; }


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

default response entity < model api response > upload file with required file ( @ api param ( value = " id of pet to update " , required = true ) @ path variable ( " pet id " ) long pet id , @ api param ( value = " file to upload " ) @ valid @ request part ( value = " required file " , required = true ) multipart file required file , @ api param ( value = " additional data to pass to server " ) @ valid @ request part ( value = " additional metadata " , required = false ) string additional metadata ) { get request ( ) if present ( request - > { for ( media type media type : media type parse media types ( request get header ( " accept " ) ) ) { if ( media type is compatible with ( media type value of ( " application / json " ) ) ) { string example string = " { \ " code \ " : 0 , \ " type \ " : \ " type \ " , \ " message \ " : \ " message \ " } " ; api util set example response ( request , " application / json " , example string ) ; break ; } } } ) ; return new response entity < > ( http status not implemented ) ; }


disable default cleanup of expired state in background ( enabled by default ) if some specific cleanup is configured , e g { @ link # cleanup incrementally ( int , boolean ) } or { @ link # cleanup in rocksdb compact filter ( long ) } , this setting does not disable it

public builder disable cleanup in background ( ) { is cleanup in background = false ; return this ; }


get the tree pattern we are matching against

public parse tree pattern get pattern ( ) { return pattern ; }


visit the specified white node if this node has not already been visited , the white ( ) hook is called and true is returned ; otherwise , false is returned

protected final boolean visit white node ( white white node ) throws interrupted exception { if ( white node = = null ) { throw new null pointer exception ( ) ; } if ( ! visited white nodes contains key ( white node ) ) { visited white nodes put ( white node , next node id + + ) ; white ( white node ) ; return true ; } return false ; }


public static void main ( string [ ] args ) throws i o exception { if ( args length = = 0 ) { system out println ( " include a puzzle on the command line " ) ; } for ( int i = 0 ; i < args length ; + + i ) { sudoku problem = new sudoku ( new file input stream ( args [ i ] ) ) ; system out println ( " solving " + args [ i ] ) ; problem solve ( ) ; } }


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


public void upload file test ( ) throws exception { long pet id = cache get long ( " / upload file / pet id " ) ; string additional metadata = cache get string ( " / upload file / additional metadata " ) ; attachment file = new attachment ( " file " , media type text plain , " dummy attachment content " ) ; model api response response = api upload file ( pet id , additional metadata , file ) ; / / todo : complete test assertions validate ( response ) ; }


set step info for the given index inside of its { @ link lifecycle execution state } without changing other execution state

private void set step info ( index index , string policy , @ nullable step step key current step key , to x content object step info ) { cluster service submit state update task ( string format ( locale root , " ilm - set - step - info { policy [ % s ] , index [ % s ] , current step [ % s ] } " , policy , index get name ( ) , current step key ) , new set step info update task ( index , policy , current step key , step info ) ) ; }


initializes the necessary data structure

private void initialize necessary ( code attribute code attribute ) { int code length = code attribute u 4code length ; int max locals = code attribute u 2max locals ; int max stack = code attribute u 2max stack ; / / create new arrays for storing information at each instruction offset if ( stacks necessary after length < code length | | stacks necessary after [ 0 ] length < max stack ) { stacks necessary after = new boolean [ code length ] [ max stack ] ; } else { for ( int offset = 0 ; offset < code length ; offset + + ) { arrays fill ( stacks necessary after [ offset ] , 0 , max stack , false ) ; } } if ( stacks simplified before length < code length | | stacks simplified before [ 0 ] length < max stack ) { stacks simplified before = new boolean [ code length ] [ max stack ] ; } else { for ( int offset = 0 ; offset < code length ; offset + + ) { arrays fill ( stacks simplified before [ offset ] , 0 , max stack , false ) ; } } if ( instructions necessary length < code length ) { instructions necessary = new boolean [ code length ] ; } else { arrays fill ( instructions necessary , 0 , code length , false ) ; } }


test is key - field - based partitioned works with empty key

public void test empty key ( ) throws exception { int num reducers = 10 ; key field based partitioner < text , text > kfbp = new key field based partitioner < text , text > ( ) ; configuration conf = new configuration ( ) ; conf set int ( " num key fields for partition " , 10 ) ; kfbp set conf ( conf ) ; assert equals ( " empty key should map to 0th partition " , 0 , kfbp get partition ( new text ( ) , new text ( ) , num reducers ) ) ; / / check if the hashcode is correct when no keyspec is specified kfbp = new key field based partitioner < text , text > ( ) ; conf = new configuration ( ) ; kfbp set conf ( conf ) ; string input = " abc \ tdef \ txyz " ; int hash code = input hash code ( ) ; int expected partition = kfbp get partition ( hash code , num reducers ) ; assert equals ( " partitioner doesnt work as expected " , expected partition , kfbp get partition ( new text ( input ) , new text ( ) , num reducers ) ) ; / / check if the hashcode is correct with specified keyspec kfbp = new key field based partitioner < text , text > ( ) ; conf = new configuration ( ) ; conf set ( key field based partitioner partitioner options , " - k 2 , 2 " ) ; kfbp set conf ( conf ) ; string expected output = " def " ; byte [ ] e bytes = expected output get bytes ( ) ; hash code = kfbp hash code ( e bytes , 0 , e bytes length - 1 , 0 ) ; expected partition = kfbp get partition ( hash code , num reducers ) ; assert equals ( " partitioner doesnt work as expected " , expected partition , kfbp get partition ( new text ( input ) , new text ( ) , num reducers ) ) ; / / test with invalid end index in keyspecs kfbp = new key field based partitioner < text , text > ( ) ; conf = new configuration ( ) ; conf set ( key field based partitioner partitioner options , " - k 2 , 5 " ) ; kfbp set conf ( conf ) ; expected output = " def \ txyz " ; e bytes = expected output get bytes ( ) ; hash code = kfbp hash code ( e bytes , 0 , e bytes length - 1 , 0 ) ; expected partition = kfbp get partition ( hash code , num reducers ) ; assert equals ( " partitioner doesnt work as expected " , expected partition , kfbp get partition ( new text ( input ) , new text ( ) , num reducers ) ) ; / / test with 0 end index in keyspecs kfbp = new key field based partitioner < text , text > ( ) ; conf = new configuration ( ) ; conf set ( key field based partitioner partitioner options , " - k 2 " ) ; kfbp set conf ( conf ) ; expected output = " def \ txyz " ; e bytes = expected output get bytes ( ) ; hash code = kfbp hash code ( e bytes , 0 , e bytes length - 1 , 0 ) ; expected partition = kfbp get partition ( hash code , num reducers ) ; assert equals ( " partitioner doesnt work as expected " , expected partition , kfbp get partition ( new text ( input ) , new text ( ) , num reducers ) ) ; / / test with invalid keyspecs kfbp = new key field based partitioner < text , text > ( ) ; conf = new configuration ( ) ; conf set ( key field based partitioner partitioner options , " - k 1 0 " ) ; kfbp set conf ( conf ) ; assert equals ( " partitioner doesnt work as expected " , 0 , kfbp get partition ( new text ( input ) , new text ( ) , num reducers ) ) ; / / test with multiple keyspecs kfbp = new key field based partitioner < text , text > ( ) ; conf = new configuration ( ) ; conf set ( key field based partitioner partitioner options , " - k 2 , 2 - k 4 , 4 " ) ; kfbp set conf ( conf ) ; input = " abc \ tdef \ tpqr \ txyz " ; expected output = " def " ; e bytes = expected output get bytes ( ) ; hash code = kfbp hash code ( e bytes , 0 , e bytes length - 1 , 0 ) ; expected output = " xyz " ; e bytes = expected output get bytes ( ) ; hash code = kfbp hash code ( e bytes , 0 , e bytes length - 1 , hash code ) ; expected partition = kfbp get partition ( hash code , num reducers ) ; assert equals ( " partitioner doesnt work as expected " , expected partition , kfbp get partition ( new text ( input ) , new text ( ) , num reducers ) ) ; / / test with invalid start index in keyspecs kfbp = new key field based partitioner < text , text > ( ) ; conf = new configuration ( ) ; conf set ( key field based partitioner partitioner options , " - k 2 , 2 - k 3 0 , 21 - k 4 , 4 - k 5 " ) ; kfbp set conf ( conf ) ; expected output = " def " ; e bytes = expected output get bytes ( ) ; hash code = kfbp hash code ( e bytes , 0 , e bytes length - 1 , 0 ) ; expected output = " xyz " ; e bytes = expected output get bytes ( ) ; hash code = kfbp hash code ( e bytes , 0 , e bytes length - 1 , hash code ) ; expected partition = kfbp get partition ( hash code , num reducers ) ; assert equals ( " partitioner doesnt work as expected " , expected partition , kfbp get partition ( new text ( input ) , new text ( ) , num reducers ) ) ; }


final public boolean add ( e new element ) { if ( new element = = null ) { return false ; } if ( new element prev ( ) ! = invalid index | | new element next ( ) ! = invalid index ) { return false ; } if ( ( size + 1 ) > = elements length / 2 ) { change capacity ( calculate capacity ( elements length ) ) ; } int slot = add internal ( new element , elements ) ; if ( slot > = 0 ) { add to list tail ( head , elements , slot ) ; size + + ; return true ; } return false ; }


locates and decodes a maxi code in an image

public result decode ( binary bitmap image ) throws not found exception , checksum exception , format exception { return decode ( image , null ) ; }


setup the barrier , has to be called at the beginning of each superstep

public void setup ( ) { latch = new count down latch ( 1 ) ; }


sets the routing required if routing isn ' t id based

public term vectors request builder set routing ( string routing ) { request routing ( routing ) ; return this ; }


performs a md5 hash on the specified data

static byte [ ] md 5 ( byte [ ] data ) { / / todo ( normanmaurer ) : create md 5 method that not need message digest return digest ( md5 , data ) ; }


indicates if a post - processing algorithm is running

public boolean is ps running ( ) { return ps algorithm ! = null & & ( ps state = = 1 | | ps state = = 3 ) ; }


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


variant of { @ link # set allowed origins } for adding one origin at a time

public void add allowed origin ( string origin ) { if ( this allowed origins = = null ) { this allowed origins = new array list < > ( 4 ) ; } else if ( this allowed origins = = default permit all & & collection utils is empty ( this allowed origin patterns ) ) { set allowed origins ( default permit all ) ; } this allowed origins add ( origin ) ; }


deserialize the json string to java object

public static < t > t from json ( final string json str , final type reference type ) throws i o exception { return object mapper read value ( json str , type ) ; }


public int get parallelism ( ) { return parallelism ; }


this is when you would hide certain megaphones based on { @ link feature flags } you could conditionally set a { @ link forever schedule } set to false for disabled features

private static map < event , megaphone schedule > build display order ( @ non null context context ) { return new linked hash map < event , megaphone schedule > ( ) { { put ( event reactions , always ) ; put ( event pins for all , new pins for all schedule ( ) ) ; put ( event pin reminder , new signal pin reminder schedule ( ) ) ; put ( event message requests , should show message requests megaphone ( ) ? always : never ) ; put ( event link previews , should show link previews megaphone ( context ) ? always : never ) ; put ( event client deprecated , signal store misc ( ) is client deprecated ( ) ? always : never ) ; put ( event research , should show research megaphone ( context ) ? show for duration schedule show for days ( 7 ) : never ) ; put ( event donate , should show donate megaphone ( context ) ? show for duration schedule show for days ( 7 ) : never ) ; put ( event group calling , should show group calling megaphone ( ) ? always : never ) ; put ( event onboarding , should show onboarding megaphone ( context ) ? always : never ) ; } } ; }


platform independent implementation for { @ link file # set readable ( boolean ) } file # set readable does not work as expected on windows

public static boolean set readable ( file f , boolean readable ) { if ( shell windows ) { try { string permission = readable ? " u + r " : " u - r " ; file util chmod ( f get canonical path ( ) , permission , false ) ; return true ; } catch ( i o exception ex ) { return false ; } } else { return f set readable ( readable ) ; } }


assigns an alias for this window that the following { @ code select ( ) } clause can refer to

public over window as ( expression alias ) { return new over window ( alias , partition by , order by , preceding , optional following ) ; }


object [ ] undo action ( ) { if ( ! can undo ( ) ) return null ; end action ( ) ; - - actions index ; return action list get ( actions index ) ; }


is the given path name an absolute path ?

private static boolean is absolute ( @ non null string rel ) { return rel starts with ( " / " ) | | drive pattern matcher ( rel ) matches ( ) | | unc pattern matcher ( rel ) matches ( ) ; }


utility function to compare two shard ids

public static int compare shard ids ( string first shard id , string second shard id ) { return first shard id compare to ( second shard id ) ; }


the annotation on the { @ linkplain # get method ( ) method }

public t get annotation ( ) { return i ; }


obtain a { @ link input stream } from the given supplier , and read it into a { @ code flux } of { @ code data buffer } s closes the input stream when the flux is terminated

public static flux < data buffer > read input stream ( callable < input stream > input stream supplier , data buffer factory buffer factory , int buffer size ) { assert not null ( input stream supplier , " ' input stream supplier ' must not be null " ) ; return read byte channel ( ( ) - > channels new channel ( input stream supplier call ( ) ) , buffer factory , buffer size ) ; }


clears and disposes all assets and the preloading queue

public synchronized void clear ( ) { load queue clear ( ) ; while ( ! update ( ) ) ; object int map < string > dependency count = new object int map < string > ( ) ; while ( asset types size > 0 ) { / / for each asset , figure out how often it was referenced dependency count clear ( ) ; array < string > assets = asset types keys ( ) to array ( ) ; for ( string asset : assets ) dependency count put ( asset , 0 ) ; for ( string asset : assets ) { array < string > dependencies = asset dependencies get ( asset ) ; if ( dependencies = = null ) continue ; for ( string dependency : dependencies ) { int count = dependency count get ( dependency , 0 ) ; count + + ; dependency count put ( dependency , count ) ; } } / / only dispose of assets that are root assets ( not referenced ) for ( string asset : assets ) if ( dependency count get ( asset , 0 ) = = 0 ) unload ( asset ) ; } this assets clear ( ) ; this asset types clear ( ) ; this asset dependencies clear ( ) ; this loaded = 0 ; this to load = 0 ; this peak tasks = 0 ; this load queue clear ( ) ; this tasks clear ( ) ; }


commit an overriding prototype for a particular call site to the database the override only applies to the function ( s ) containing the actual call site calls to the same function from other sites are unaffected this is used typically either for indirect calls are for calls to a function with a variable number of parameters

public static void write override ( function function , address callsite , function signature sig ) throws invalid input exception { parameter definition [ ] params = sig get arguments ( ) ; function definition data type fsig = new function definition data type ( " tmpname " ) ; / / empty datatype , will get renamed later fsig set generic calling convention ( sig get generic calling convention ( ) ) ; fsig set arguments ( params ) ; fsig set return type ( sig get return type ( ) ) ; fsig set var args ( sig has var args ( ) ) ; data type symbol datsym = new data type symbol ( fsig , " prt " , auto cat ) ; program program = function get program ( ) ; symbol table symtab = program get symbol table ( ) ; data type manager dtmanage = program get data type manager ( ) ; namespace space = high function find create override space ( function ) ; if ( space = = null ) { throw new invalid input exception ( " could not create \ " override \ " namespace " ) ; } datsym write symbol ( symtab , callsite , space , dtmanage , true ) ; }


return a string that is used as the scope for metrics recorded by metered stores


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


get the name of the driver implementation for debugging

private string get driver name ( ) { return this get class ( ) get simple name ( ) ; }


creates a block channel reader that reads blocks from the given channel the reader reads asynchronously , such that a read request is accepted , carried out at some ( close ) point in time , and the full segment is pushed to the given queue

public block channel reader < memory segment > create block channel reader ( file i o channel id channel i d , linked blocking queue < memory segment > return queue ) throws i o exception { check state ( ! is shutdown get ( ) , " i / o - manager is shut down " ) ; return new asynchronous block reader ( channel i d , this readers [ channel i d get thread num ( ) ] request queue , return queue ) ; }


parses an { @ code annotation default } attribute

private attribute annotation default ( direct class file cf , int offset , int length , parse observer observer ) { if ( length < 2 ) { throw severely truncated ( ) ; } annotation parser ap = new annotation parser ( cf , offset , length , observer ) ; constant cst = ap parse value attribute ( ) ; return new att annotation default ( cst , length ) ; }


return the first error message for the field or object , if any

public string get error message ( ) { string [ ] error messages = init error messages ( ) ; return ( error messages length > 0 ? error messages [ 0 ] : " " ) ; }


map an extension to a media type ignore if extension already mapped

protected void add mapping ( string extension , media type media type ) { media type previous = this media types put if absent ( extension , media type ) ; if ( previous = = null ) { add file extension ( media type , extension ) ; this all file extensions add ( extension ) ; } }


stores an empty blob that ' s linking to the temporary file where ' re we ' re uploading the initial data

public void store empty link file ( string key , string temp blob key , permission status permission status ) throws azure exception { if ( null = = storage interaction layer ) { final string err msg = string format ( " storage session expected for uri ' % s ' but does not exist " , session uri ) ; throw new assertion error ( err msg ) ; } / / check if there is an authenticated account associated with the file / / this instance of the wasb file system if not the file system has not / / been authenticated and all access is anonymous if ( ! is authenticated access ( ) ) { / / preemptively raise an exception indicating no uploads are / / allowed to anonymous accounts throw new azure exception ( " uploads to to public accounts using anonymous access is prohibited " ) ; } try { check container ( container access type pure write ) ; cloud blob wrapper blob = get blob reference ( key ) ; store permission status ( blob , permission status ) ; store link attribute ( blob , temp blob key ) ; open output stream ( blob ) close ( ) ; } catch ( exception e ) { / / caught exception while attempting upload re - throw as an azure / / storage exception throw new azure exception ( e ) ; } }


return archived representation of the tree artifact ( if present )

optional < archived representation > get archived representation ( ) { return optional of nullable ( archived representation ) ; }


customizes the aggregated result for example , summarizing or making immutable

protected o finish ( o output ) { return output ; }


configure resolvers for custom controller method arguments

protected void configure argument resolvers ( argument resolver configurer configurer ) { }


on putting the node in service , check if the node has excess replicas if there are any excess replicas , call process extra redundancy block ( ) process extra redundancy blocks only when active nn is out of safe mode

void process extra redundancy blocks on in service ( final datanode descriptor src node ) { if ( ! is populating repl queues ( ) ) { return ; } int num extra redundancy = 0 ; for ( datanode storage info datanode storage info : src node get storage infos ( ) ) { / / the namesystem lock is released between iterations make sure the / / storage is not removed before continuing if ( src node get storage info ( datanode storage info get storage i d ( ) ) = = null ) { continue ; } final iterator < block info > it = datanode storage info get block iterator ( ) ; while ( it has next ( ) ) { final block info block = it next ( ) ; if ( block is deleted ( ) ) { / / orphan block , will be handled eventually , skip continue ; } int expected replication = this get expected redundancy num ( block ) ; number replicas num = count nodes ( block ) ; if ( should process extra redundancy ( num , expected replication ) ) { / / extra redundancy block process extra redundancy block ( block , ( short ) expected replication , null , null ) ; num extra redundancy + + ; } } / / when called by tests like test default block placement policy / / test placement with local rack nodes decommissioned , it is not protected by / / lock , only when called by datanode manager refresh nodes have write lock if ( namesystem has write lock ( ) ) { namesystem write unlock ( ) ; try { thread sleep ( 1 ) ; } catch ( interrupted exception e ) { thread current thread ( ) interrupt ( ) ; } namesystem write lock ( ) ; } } log info ( " invalidated { } extra redundancy blocks on { } after " + " it is in service " , num extra redundancy , src node ) ; }


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


is cas authentication old for max age authorization request boolean

public static boolean is cas authentication old for max age authorization request ( final web context context , final zoned date time authentication date ) { val max age = get oidc max age from authorization request ( context ) ; if ( max age is present ( ) & & max age get ( ) > 0 ) { val now = zoned date time now ( zone offset utc ) to epoch second ( ) ; val auth time = authentication date to epoch second ( ) ; val diff in seconds = now - auth time ; if ( diff in seconds > max age get ( ) ) { logger info ( " authentication is too old : [ { } ] and was created [ { } ] seconds ago " , auth time , diff in seconds ) ; return true ; } } return false ; }


test recursive root directory deletion fails if there is an entry underneath

public void test rm root dir recursive is forbidden ( ) throws throwable { path root = path ( " / " ) ; path test file = path ( " / test " ) ; create file ( test file ) ; assert true ( " rm ( / ) returned false " , fs delete ( root , true ) ) ; assert exists ( " root dir is missing " , root ) ; assert path does not exist ( " test file not deleted " , test file ) ; }


public bit set compatible regs ( dalv insn insn ) { register spec list regs = insn get registers ( ) ; bit set bits = new bit set ( 1 ) ; bits set ( 0 , unsigned fits in byte ( regs get ( 0 ) get reg ( ) ) ) ; return bits ; }


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


protected long get max wait ( ) { long max wait = config get long ( configuration keys store db max wait , default db max wait ) ; return max wait ; }


converts the given value to its string representation

public abstract string convert value to string ( x value ) ;


return whether this cache manager accepts and converts { @ code null } values for all of its caches

public boolean is allow null values ( ) { return this allow null values ; }


simulates a recovered container that is sent to the am in the heartbeat response

public void feed recovered container ( container id container id , string comp name ) { container container = create container ( container id , comp name ) ; recovered containers add ( container ) ; add container status ( container , container state running ) ; }


declares that the implementation of the associated rule class requires the given fragments to be present in this rule ' s host and target configurations the value is inherited by subclasses

public builder requires configuration fragments ( class < ? > configuration fragments ) { configuration fragment policy requires configuration fragments ( immutable set < class < ? > > copy of ( configuration fragments ) ) ; return this ; }


get the zookeeper database for this server

public z k database get z k database ( ) { return this zk db ; }


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

public boolean is set topology ( ) { return this topology ! = null ; }


a { @ link queryable store type } that accepts { @ link read only window store read only window store < k , value and timestamp < v > > }

public static < k , v > queryable store type < read only window store < k , value and timestamp < v > > > timestamped window store ( ) { return new timestamped window store type < > ( ) ; }


gets the write buffer size for created checkpoint stream if not explicitly configured , this is the default value of { @ link checkpointing options # fs write buffer size }

public int get write buffer size ( ) { return write buffer size > = 0 ? write buffer size : checkpointing options fs write buffer size default value ( ) ; }


do disassembly of a seed set of address locations

protected address set do disassembly seeds ( disassembler disassembler , address set seed set , auto analysis manager mgr ) { address set new disassembled addrs = disassembler disassemble ( seed set , restricted set , initial context value , follow flow ) ; if ( ! new disassembled addrs is empty ( ) ) { disassembly performed = true ; disassembled addrs add ( new disassembled addrs ) ; / / notify analysis manager of new code if ( mgr ! = null ) { mgr code defined ( new disassembled addrs ) ; } } return new disassembled addrs ; }


this simlulates a long server operation multiple threads start an operation that takes long time and finally fails the retries in this case end up waiting for the current operation to complete all the retries end up performing the operation again

public void test long operations failure ( ) throws exception { / / test long failed operations / / there is no entry in cache expected when the first operation starts test operations ( r next int ( ) , 100 , 20 , false , false , new call ( ) ) ; }


writes the given character sequence to this sink

public void write ( char sequence char sequence ) throws i o exception { check not null ( char sequence ) ; closer closer = closer create ( ) ; try { writer out = closer register ( open stream ( ) ) ; out append ( char sequence ) ; out flush ( ) ; / / https : / / code google com / p / guava - libraries / issues / detail ? id = 1330 } catch ( throwable e ) { throw closer rethrow ( e ) ; } finally { closer close ( ) ; } }


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

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


returns the { @ link flac stream metadata } decoded from the initialization data

public flac stream metadata get stream metadata ( ) { return stream metadata ; }


public static string get branch ( ) { return common version info get branch ( ) ; }


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


this will be called when the text render unit using mountable char sequence is unmounted


handle new addresses of the balancer and backends from the resolver , and create connection if not yet connected

void handle addresses ( list < lb address group > new lb address groups , list < equivalent address group > new backend servers ) { logger log ( channel log level debug , " [ grpclb - < { 0 } > ] resolved addresses : lb addresses { 0 } , backends : { 1 } " , service name , new lb address groups , new backend servers ) ; if ( new lb address groups is empty ( ) ) { / / no balancer address : close existing balancer connection and enter fallback mode / / immediately shutdown lb comm ( ) ; sync context execute ( new fallback mode task ( ) ) ; } else { lb address group new lb address group = flatten lb address groups ( new lb address groups ) ; start lb comm ( new lb address group ) ; / / avoid creating a new rpc just because the addresses were updated , as it can cause a / / stampeding herd the current rpc may be on a connection to an address not present in / / new lb address groups , but we ' re considering that " okay " if we detected the rpc is to an / / outdated backend , we could choose to re - create the rpc if ( lb stream = = null ) { start lb rpc ( ) ; } / / start the fallback timer if it ' s never started if ( fallback timer = = null ) { fallback timer = sync context schedule ( new fallback mode task ( ) , fallback timeout ms , time unit milliseconds , timer service ) ; } } fallback backend list = new backend servers ; if ( using fallback backends ) { / / populate the new fallback backends to round - robin list use fallback backends ( ) ; } maybe update picker ( ) ; }


create a utf - 8 encoded response for a given dialect for use with the new session command

private static byte [ ] encode as response ( dialect dialect , session id id , capabilities capabilities , map < string , object > metadata ) { map < string , object > to encode ; switch ( dialect ) { case oss : to encode = encode json wire protocol ( id , capabilities , metadata ) ; break ; case w3c : to encode = encode w 3 c ( id , capabilities , metadata ) ; break ; default : throw new illegal argument exception ( " unknown dialect : " + dialect ) ; } return json to json ( to encode ) get bytes ( utf 8 ) ; }


gets the random number generator to use for this operation

protected random get random ( ) { return this rnd ; }


put authentication into conversation scope

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


closes the { @ link auto unlocker } instance if this instance was the last unclosed one returned by { @ link # write lock } with argument { @ code k } owned by the current thread , then exclusive access to { @ code k } is yielded if this instance was the last unclosed one returned by { @ link # read lock } with argument { @ code k } , then a thread can request exclusive write access using { @ link # write lock } with argument { @ code k } this method may only be called at most once per { @ link auto unlocker } instance and must be called by the same thread that acquired the { @ link auto unlocker } via { @ link # write lock } or { @ link # read lock } otherwise , an { @ link illegal unlock exception } is thrown


release the given ejb instance the default implementation delegates to { @ link # remove session bean instance }

protected void release session bean instance ( e j b object ejb ) { if ( ! this cache session bean ) { remove session bean instance ( ejb ) ; } }


expand uri template variables in the target url with either model attribute values or as a fallback with uri variable values from the current request values are encoded

protected string builder expand target url template ( string target url , map < string , object > model , map < string , string > uri variables ) { matcher matcher = uri template variable pattern matcher ( target url ) ; boolean found = matcher find ( ) ; if ( ! found ) { return new string builder ( target url ) ; } string builder result = new string builder ( ) ; int end last match = 0 ; while ( found ) { string name = matcher group ( 1 ) ; object value = ( model contains key ( name ) ? model get ( name ) : uri variables get ( name ) ) ; assert not null ( value , ( ) - > " no value for uri variable ' " + name + " ' " ) ; result append ( target url , end last match , matcher start ( ) ) ; result append ( encode uri variable ( value to string ( ) ) ) ; end last match = matcher end ( ) ; found = matcher find ( ) ; } result append ( target url , end last match , target url length ( ) ) ; return result ; }


remove all zero values away from this vector

public void remove zero values ( ) { if ( this values length ! = 0 ) { list < integer > idxs = new array list < > ( ) ; for ( int i = 0 ; i < values length ; i + + ) { if ( 0 ! = values [ i ] ) { idxs add ( i ) ; } } int [ ] new indices = new int [ idxs size ( ) ] ; double [ ] new values = new double [ new indices length ] ; for ( int i = 0 ; i < new indices length ; i + + ) { new indices [ i ] = indices [ idxs get ( i ) ] ; new values [ i ] = values [ idxs get ( i ) ] ; } this indices = new indices ; this values = new values ; } }


public void evaluate ( ) throws throwable { for ( current run = 0 ; current run < = times on failure ; current run + + ) { try { statement evaluate ( ) ; break ; / / success } catch ( throwable t ) { log warn ( string format ( " test run failed ( % d / % d ) " , current run , times on failure + 1 ) , t ) ; / / throw the failure if retried too often if ( current run = = times on failure ) { throw t ; } } } }


private void maybe fail ( string error msg , int status code ) throws amazon client exception { / / code structure here is to line up for more failures later amazon service exception ex = null ; if ( policy true with probability ( policy get throttle probability ( ) ) ) { / / throttle the request ex = new amazon service exception ( error msg + " count = " + ( failure counter get ( ) + 1 ) , null ) ; ex set status code ( status code ) ; } int failure limit = policy get failure limit ( ) ; if ( ex ! = null ) { long count = failure counter increment and get ( ) ; if ( failure limit = = 0 | | ( failure limit > 0 & & count < failure limit ) ) { throw ex ; } } }


public void options ( string path , template view route route , template engine engine ) { add route ( http method options , template view route impl create ( path , route , engine ) ) ; }


public static boolean in saga branch ( ) { return branch type saga = = get branch type ( ) ; }


the average number primary shards across the indices

public double get avg index primary shards ( ) { if ( this indices = = 0 ) { return - 1 ; } return ( ( double ) this primaries ) / this indices ; }


low level method to reset the buffer and attributes to the specified values use with care !

protected void set buffer ( buffer data , boolean owns buffer , vertex attributes value ) { if ( is bound ) throw new gdx runtime exception ( " cannot change attributes while vbo is bound " ) ; attributes = value ; if ( data instanceof byte buffer ) byte buffer = ( byte buffer ) data ; else throw new gdx runtime exception ( " only byte buffer is currently supported " ) ; this owns buffer = owns buffer ; final int l = byte buffer limit ( ) ; byte buffer limit ( byte buffer capacity ( ) ) ; buffer = byte buffer as float buffer ( ) ; byte buffer limit ( l ) ; buffer limit ( l / 4 ) ; }


namespaces defined on this element < code > repeated aapt pb xml namespace namespace declaration = 1 ; < code >

private void add namespace declaration ( int index , com android aapt resources xml namespace value ) { if ( value = = null ) { throw new null pointer exception ( ) ; } ensure namespace declaration is mutable ( ) ; namespace declaration add ( index , value ) ; }


sets the selection to only the passed item , if it is a possible choice

public void set selected ( @ null t item ) { if ( items contains ( item , false ) ) selection set ( item ) ; else if ( selection get required ( ) & & items size > 0 ) selection set ( items first ( ) ) ; else selection clear ( ) ; }


subtract the top margin size equals status bar ' s height for view

public static void subtract margin top equal status bar height ( @ non null view view ) { if ( build version sdk int < build version codes kitkat ) return ; object have set offset = view get tag ( key offset ) ; if ( have set offset = = null | | ! ( boolean ) have set offset ) return ; margin layout params layout params = ( margin layout params ) view get layout params ( ) ; layout params set margins ( layout params left margin , layout params top margin - get status bar height ( ) , layout params right margin , layout params bottom margin ) ; view set tag ( key offset , false ) ; }


merges a new decision into existing decisions decisions are matched by id

private static set < string > merge decision ( final ldap attribute ldap consent , final consent decision decision ) { if ( decision get id ( ) < 0 ) { decision set id ( system current time millis ( ) ) ; } if ( ldap consent ! = null ) { val result = remove decision ( ldap consent , decision get id ( ) ) ; val json = map to json ( decision ) ; result add ( json ) ; logger debug ( " merged consent decision [ { } ] with ldap attribute [ { } ] " , decision , ldap consent get name ( ) ) ; return collection utils wrap ( result ) ; } val json = map to json ( decision ) ; val result = new hash set < string > ( 1 ) ; result add ( json ) ; return result ; }


sets the executable as an artifact calling this method overrides any previous values set via calls to { @ link # set executable } , { @ link # set java executable } , or { @ link # set shell command }

public builder set executable ( artifact executable ) { add tool ( executable ) ; return set executable ( executable get exec path ( ) ) ; }


removes a resource for the specified interval

public boolean remove interval ( reservation interval interval , resource resource ) { long start time = interval get start time ( ) ; long end time = interval get end time ( ) ; / / if the resource to be subtracted is less than the minimum resource in / / the range , abort removal to avoid negative capacity / / todo revesit decrementing end time if ( ! resources fits in ( resource , get minimum capacity in interval ( new reservation interval ( start time , end time - 1 ) ) ) ) { log info ( " request to remove more resources than what is available " ) ; return false ; } if ( start time > = 0 & & end time > start time & & end time < = time period ) { return super remove interval ( interval , resource ) ; } else { log info ( " interval extends beyond the end time " + time period ) ; return false ; } }


public int get branchingness ( ) { return branchingness ; }


get the index of the layer having the specified name , or - 1 if no such layer exists

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


removes exactly the specified number of occurrences of { @ code element } , or makes no change if this is not possible this method , in contrast to { @ link # remove ( object , int ) } , has no effect when the element count is smaller than { @ code occurrences }

public boolean remove exactly ( @ nullable decl object element , int occurrences ) { if ( occurrences = = 0 ) { return true ; } collect preconditions check positive ( occurrences , " occurences " ) ; atomic integer existing counter = maps safe get ( count map , element ) ; if ( existing counter = = null ) { return false ; } while ( true ) { int old value = existing counter get ( ) ; if ( old value < occurrences ) { return false ; } int new value = old value - occurrences ; if ( existing counter compare and set ( old value , new value ) ) { if ( new value = = 0 ) { / / just c a sed to 0 ; remove the entry to clean up the map if the removal fails , / / another thread has already replaced it with a new counter , which is fine count map remove ( element , existing counter ) ; } return true ; } } }


returns the current drag payload , or null

public @ null payload get drag payload ( ) { return payload ; }


create a row block directly from columnar nulls and field blocks

public static block from field blocks ( int position count , optional < boolean [ ] > row is null , block [ ] field blocks ) { int [ ] field block offsets = new int [ position count + 1 ] ; for ( int position = 0 ; position < position count ; position + + ) { field block offsets [ position + 1 ] = field block offsets [ position ] + ( row is null is present ( ) & & row is null get ( ) [ position ] ? 0 : 1 ) ; } validate constructor arguments ( 0 , position count , row is null or else ( null ) , field block offsets , field blocks ) ; return new row block ( 0 , position count , row is null or else ( null ) , field block offsets , field blocks ) ; }


public void delete pet ( @ path param ( " pet id " ) long pet id , @ header param ( " api key " ) string api key ) ;


static authentication handler disabled ( ) { return new authentication handler ( ) { @ override public authentication handler execution result authenticate ( final credential credential ) throws prevented exception { throw new prevented exception ( " authentication handler is disabled " ) ; } @ override public boolean supports ( final credential credential ) { return false ; } @ override public boolean supports ( final class < ? extends credential > clazz ) { return false ; } } ; }


we override equals so that if the same value is written to a { @ link node entry } twice , it can verify that the two values are equal , and avoid incrementing its version

public boolean equals ( object o ) { if ( this = = o ) { return true ; } if ( o = = null | | get class ( ) ! = o get class ( ) ) { return false ; } value with events that = ( value with events ) o ; / / shallow equals is a middle ground between using default equals , which might miss / / nested sets with the same elements , and deep equality checking , which would be expensive / / all three choices are sound , since shallow equals and default equals are more / / conservative than deep equals using shallow equals means that we may unnecessarily / / consider some values unequal that are actually equal , but this is still a net win over / / deep equals return value equals ( that value ) & & transitive events shallow equals ( that transitive events ) & & transitive postables shallow equals ( that transitive postables ) ; }


this test checks if after a client reads we can see the state id in updated via the response

public void test state transfer on read ( ) throws exception { d f s test util write file ( dfs , new path ( " / test file 2 " ) , " 123 " ) ; long last written id = cluster get namesystem ( active ) get last written transaction id ( ) ; d f s test util read file ( dfs , new path ( " / test file 2 " ) ) ; / / read should catch client up to last written state long client state = get context ( 0 ) get last seen state id ( ) ; assert equals ( client state , last written id ) ; }


returns the address of the { @ link mem buffer }

public address get address ( ) { return buf get address ( ) ; }


public static protos resource mem ( double amount ) { return mem ( unreserved role , amount ) ; }


writes the values of the snapshot to the given stream

public abstract void dump ( output stream output ) ;


public void prefix ns number test ( ) { / / todo : test prefix ns number }


returns a new immutable array the builder can continue to be used after this call , to append more values and build again < b > performance note : < b > the returned array is backed by the same array as the builder , so no data is copied as part of this step , but this may occupy more memory than strictly necessary to copy the data to a right - sized backing array , use { @ code build ( ) trimmed ( ) }

public immutable double array build ( ) { return count = = 0 ? empty : new immutable double array ( array , 0 , count ) ; }


merges the given { @ link options } into a new options object

public static options merge options ( @ nullable options options a , @ nullable options options b ) { final options result options = new options ( ) ; if ( options a ! = null ) { for ( option option : options a get options ( ) ) { result options add option ( option ) ; } } if ( options b ! = null ) { for ( option option : options b get options ( ) ) { result options add option ( option ) ; } } return result options ; }


cleanup ( synchronize ) the internal state when an object is removed from the primary cache

private void on cache eviction ( removal notification < bitset cache key , bit set > notification ) { final bitset cache key bitset key = notification get key ( ) ; final index reader cache key index key = bitset key index ; if ( keys by index get or default ( index key , set of ( ) ) contains ( bitset key ) = = false ) { / / if the bitset key isn ' t in the lookup map , then there ' s nothing to synchronize return ; } / / we push this to a background thread , so that it reduces the risk of blocking searches , but also so that the lock management is / / simpler - this callback is likely to take place on a thread that is actively adding something to the cache , and is therefore / / holding the read ( " update " ) side of the lock it is not possible to upgrade a read lock to a write ( " eviction " ) lock , but we / / need to acquire that lock here cleanup executor submit ( ( ) - > { try ( releasable lock ignored = cache eviction lock acquire ( ) ) { / / it ' s possible for the key to be back in the cache if it was immediately repopulated after it was evicted , so check if ( bitset cache get ( bitset key ) = = null ) { / / key is no longer in the cache , make sure it is no longer in the lookup map either keys by index get or default ( index key , set of ( ) ) remove ( bitset key ) ; } } } ) ; }


returns an array containing the edges in the graph

public edge [ ] get edge array ( ) { return edges to array ( ) ; }


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


prompts the user if the editor has unsaved changes saves the changes if the user indicates to do so

protected int save changes ( boolean allow cancel ) { / / check for changes and prompt user to check if saving them if ( editor model is valid name ( ) & & editor model has changes ( ) ) { string question = " the " + editor model get type name ( ) + " editor is closing \ n " + " save the changes to " + get dt path ( ) + " ? " ; string title = " save " + editor model get type name ( ) + " editor changes ? " ; int response ; if ( allow cancel ) { response = option dialog show yes no cancel dialog ( editor panel , title , question ) ; } else { response = option dialog show yes no dialog ( editor panel , title , question ) ; } if ( response = = 1 ) { / / yes selected if ( ! apply changes ( ) ) { return 3 ; } } return response ; } return 2 ; }


public void view changed ( address set view addr set ) ;


force type extractor to use kryo serializer for pojos even though we could analyze as pojo in some cases this might be preferable for example , when using interfaces with subclasses that cannot be analyzed as pojo

public void enable force kryo ( ) { force kryo = true ; }


public static void start py dev remote debugger ( ) throws operation not supported exception { try { py dev utils internal start py dev remote debugger ( ) ; } catch ( no class def found error | no such method error e ) { throw new operation not supported exception ( e get message ( ) ) ; } }


@ test public void test left recursive rule ref with arg 3 ( ) throws exception { string grammar = " grammar t ; \ n " + " a : ' x ' \ n " + " | a [ 3 ] ' y ' \ n " + " ; " ; string expected = " error ( " + error type nonconforming lr rule code + " ) : t g 4 : 2 : 0 : rule a is left recursive but doesn ' t conform to a pattern antlr can handle \ n " ; test errors ( new string [ ] { grammar , expected } , false ) ; }


tests that a service manager can be fully shut down if one of its failure listeners is slow or even permanently blocked

public void test listener deadlock ( ) throws interrupted exception { final count down latch fail enter = new count down latch ( 1 ) ; final count down latch fail leave = new count down latch ( 1 ) ; final count down latch after started = new count down latch ( 1 ) ; service fail run service = new abstract service ( ) { @ override protected void do start ( ) { new thread ( ) { @ override public void run ( ) { notify started ( ) ; / / we need to wait for the main thread to leave the service manager start async call / / to / / ensure that the thread running the failure callbacks is not the main thread uninterruptibles await uninterruptibly ( after started ) ; notify failed ( new exception ( " boom " ) ) ; } } start ( ) ; } @ override protected void do stop ( ) { notify stopped ( ) ; } } ; final service manager manager = new service manager ( arrays as list ( fail run service , new no op service ( ) ) ) ; manager add listener ( new service manager listener ( ) { @ override public void failure ( service service ) { fail enter count down ( ) ; / / block until after the service manager is shutdown uninterruptibles await uninterruptibly ( fail leave ) ; } } , direct executor ( ) ) ; manager start async ( ) ; after started count down ( ) ; / / we do not call await healthy because , due to races , that method may throw an exception but / / we really just want to wait for the thread to be in the failure callback so we wait for that / / explicitly instead fail enter await ( ) ; assert false ( " state should be updated before calling listeners " , manager is healthy ( ) ) ; / / now we want to stop the services thread stopping thread = new thread ( ) { @ override public void run ( ) { manager stop async ( ) await stopped ( ) ; } } ; stopping thread start ( ) ; / / this should be super fast since the only non stopped service is a no op service stopping thread join ( 1000 ) ; assert false ( " stop async has deadlocked ! " , stopping thread is alive ( ) ) ; fail leave count down ( ) ; / / release the background thread }


public string get name ( ) { return name ; }


remove object from list indicated by iterator , all iterators that point to objects other than this one remain valid

public void remove ( iterator < t > itr ) { linked node cur = ( ( linked iterator ) itr ) cur node ; if ( cur data = = null ) return ; / / should probably throw an exception here cur previous node next node = cur next node ; cur next node previous node = cur previous node ; }


get the target render time for the given frame number in ms

long get target render time ms ( int frame number ) ;


controls whether or not to preserve templates upon completion of this test the default implementation is to delete not preserve templates

protected boolean preserve templates upon completion ( ) { return false ; }


returns all proto source roots in this lib ( { @ code current proto source root } ) and in its transitive dependencies assumes { @ code current proto source root } is the same as the package name

private static nested set < string > compute transitive proto source roots ( immutable list < proto info > proto deps , string current proto source root ) { nested set builder < string > proto path = nested set builder stable order ( ) ; proto path add ( current proto source root ) ; for ( proto info provider : proto deps ) { proto path add transitive ( provider get transitive proto source roots ( ) ) ; } return proto path build ( ) ; }


public void set up ( ) throws exception { var data source = new jdbc data source ( ) ; data source set u r l ( db url ) ; dao = new db customer dao ( data source ) ; var result = dao add ( existing customer ) ; assert true ( result ) ; }


add folder to index during rebuild if missing note : index journal must already open ' ed by caller

private folder add folder to index if missing ( string folder path ) throws i o exception , not found exception { if ( separator equals ( folder path ) ) { return root folder ; } int index = folder path last index of ( separator ) ; string name = folder path substring ( index + 1 ) ; string parent path = index = = 0 ? separator : folder path substring ( 0 , index ) ; folder parent = get folder ( parent path , get folder option create all ) ; folder folder = parent folders get ( name ) ; if ( folder ! = null ) { return folder ; } folder = new folder ( ) ; folder parent = parent ; folder name = name ; parent folders put ( name , folder ) ; index journal add folder ( folder path ) ; return folder ; }


creates a channel builder with a target string and credentials the target can be either a valid { @ link name resolver } - compliant uri , or an authority string a { @ code name resolver } - compliant uri is an absolute hierarchical uri as defined by { @ link java net uri } example u r is : { @ code " dns : foo googleapis com : 8080 " } { @ code " dns : foo googleapis com " } { @ code " dns : % 5b2001 : db 8 : 8 5a 3 : 8d 3 : 1319 : 8a 2e : 370 : 7348 % 5d : 443 " } { @ code " dns : 8 8 8 8foo googleapis com : 8080 " } { @ code " dns : 8 8 8 8foo googleapis com " } { @ code " zookeeper : zk example com : 9 9 0 0example service " } an authority string will be converted to a { @ code name resolver } - compliant uri , which has the scheme from the name resolver with the highest priority ( e g { @ code " dns " } ) , no authority , and the original authority string as its path after properly escaped we recommend libraries to specify the schema explicitly if it is known , since libraries cannot know which name resolver will be default during runtime example authority strings : { @ code " localhost " } { @ code " 127 0 0 1 " } { @ code " localhost : 8080 " } { @ code " foo googleapis com : 8080 " } { @ code " 127 0 0 1 : 8080 " } { @ code " [ 2001 : db 8 : 8 5a 3 : 8d 3 : 1319 : 8a 2e : 370 : 7348 ] " } { @ code " [ 2001 : db 8 : 8 5a 3 : 8d 3 : 1319 : 8a 2e : 370 : 7348 ] : 443 " }

public static managed channel builder < ? > new channel builder ( string target , channel credentials creds ) { return managed channel registry get default registry ( ) new channel builder ( target , creds ) ; }


create bloom filter by error rate and mapping num

public static bloom filter create by fn ( int f , int n ) { return new bloom filter ( f , n ) ; }


close down this file system manager causes heartbeat and lease daemons to stop ; waits briefly for them to finish , but a short timeout returns control back to caller

void close ( ) { fs running = false ; try { stop common services ( ) ; } finally { / / using finally to ensure we also wait for lease daemon try { stop active services ( ) ; stop standby services ( ) ; } catch ( i o exception ie ) { } finally { i o utils cleanup with logger ( log , dir ) ; i o utils cleanup with logger ( log , fs image ) ; } } }


public static void put ( @ non null final string key , final j s o n object value , final int save time , @ non null final cache disk utils cache disk utils ) { cache disk utils put ( key , value , save time ) ; }


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


public list < item update > evaluate ( project project , engine engine ) { return evaluate ( project , engine , null ) ; }


verify whether quota is updated properly { @ link router quota update service # periodic invoke ( ) } should be able to update the quota even if the destination directory for some mount entry is not present in the filesystem

public void test quota update when destination not present ( ) throws exception { long ns quota = 5 ; long ss quota = 3 * block size ; string path = " / dst - not - present " ; final file system nn fs = nn context 1 get file system ( ) ; / / add one mount table : / / / dst - not - present - - > ns 0 - - - / dst - not - present nn fs mkdirs ( new path ( path ) ) ; mount table mount table = mount table new instance ( path , collections singleton map ( " ns 0 " , path ) ) ; mount table set quota ( new router quota usage builder ( ) quota ( ns quota ) space quota ( ss quota ) build ( ) ) ; add mount table ( mount table ) ; router router = router context get router ( ) ; router quota manager quota manager = router get quota manager ( ) ; router quota update service update service = router get quota cache update service ( ) ; / / verify quota usage is updated in router quota manager update service periodic invoke ( ) ; router quota usage quota usage = quota manager get quota usage ( path ) ; assert equals ( ns quota , quota usage get quota ( ) ) ; assert equals ( ss quota , quota usage get space quota ( ) ) ; assert equals ( 1 , quota usage get file and directory count ( ) ) ; assert equals ( 0 , quota usage get space consumed ( ) ) ; / / update quota to [ ns quota * 2 , ss quota * 2 ] mount table set quota ( new router quota usage builder ( ) quota ( ns quota * 2 ) space quota ( ss quota * 2 ) build ( ) ) ; update mount table ( mount table ) ; / / remove / dst - not - present nn fs delete ( new path ( path ) , true ) ; / / verify quota is updated in router quota manager update service periodic invoke ( ) ; quota usage = quota manager get quota usage ( path ) ; assert equals ( ns quota * 2 , quota usage get quota ( ) ) ; assert equals ( ss quota * 2 , quota usage get space quota ( ) ) ; assert equals ( 0 , quota usage get file and directory count ( ) ) ; assert equals ( 0 , quota usage get space consumed ( ) ) ; }


start and wait until the negotiation is done , returns the negotiated protocol

public string negotiate ( s s l socket ssl socket , string hostname , @ nullable list < protocol > protocols ) throws i o exception { if ( protocols ! = null ) { configure tls extensions ( ssl socket , hostname , protocols ) ; } try { / / force handshake ssl socket start handshake ( ) ; string negotiated protocol = get selected protocol ( ssl socket ) ; if ( negotiated protocol = = null ) { throw new runtime exception ( " tls alpn negotiation failed with protocols : " + protocols ) ; } return negotiated protocol ; } finally { platform after handshake ( ssl socket ) ; } }


register web - specific scopes ( " request " , " session " , " global session " , " application " ) with the given bean factory , as used by the web application context

public static void register web application scopes ( configurable listable bean factory bean factory , @ nullable servlet context sc ) { bean factory register scope ( web application context scope request , new request scope ( ) ) ; bean factory register scope ( web application context scope session , new session scope ( ) ) ; if ( sc ! = null ) { servlet context scope app scope = new servlet context scope ( sc ) ; bean factory register scope ( web application context scope application , app scope ) ; / / register as servlet context attribute , for context cleanup listener to detect it sc set attribute ( servlet context scope class get name ( ) , app scope ) ; } bean factory register resolvable dependency ( servlet request class , new request object factory ( ) ) ; bean factory register resolvable dependency ( servlet response class , new response object factory ( ) ) ; bean factory register resolvable dependency ( http session class , new session object factory ( ) ) ; bean factory register resolvable dependency ( web request class , new web request object factory ( ) ) ; if ( jsf present ) { faces dependency registrar register faces dependencies ( bean factory ) ; } }


public list < snapshot files > snapshots ( ) { return this shard snapshots ; }


derive properties to be passed to the { @ code flink kinesis producer }

public static properties get producer properties ( map < string , string > table options ) { properties properties = new properties ( ) ; for ( map entry < string , string > entry : table options entry set ( ) ) { string source key = entry get key ( ) ; string source val = entry get value ( ) ; if ( ! table level options contains ( source key ) ) { if ( source key starts with ( aws properties prefix ) ) { properties put ( translate aws key ( source key ) , source val ) ; } else if ( source key starts with ( producer prefix ) ) { properties put ( translate producer key ( source key ) , source val ) ; } } } return properties ; }


return the response body converted to string the charset used is that of the response " content - type " or otherwise { @ code " utf - 8 " }

public string get response body as string ( ) { return get response body as string ( default charset ) ; }


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

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


acquires < code > go to service < code > if available

protected void init ( ) { go to service = tool get service ( go to service class ) ; provider set go to service ( go to service ) ; marker service = tool get service ( marker service class ) ; tool add popup action provider ( this ) ; nav updater = new nav updater ( ) ; repaint mgr = new swing update manager ( 500 , ( ) - > provider repaint ( ) ) ; }


private string [ ] args ( string args ) { return args ; }


clear out structures associated with main sort

protected void clear sort ( ) { for ( instruct hash element : inst list ) element clear sort ( ) ; }


for shards and delta insert into ` shards ` for both shards and delta shards insert into ` shard nodes ` ( non - bucketed ) for both shards and delta shards insert into index table only for shards

private static void insert shards and index ( long table id , list < column info > columns , collection < shard info > shards , map < string , integer > node ids , handle handle , boolean is delta ) throws s q l exception { if ( shards is empty ( ) ) { return ; } boolean bucketed = shards iterator ( ) next ( ) get bucket number ( ) is present ( ) ; connection connection = handle get connection ( ) ; try ( index inserter index inserter = new index inserter ( connection , table id , columns ) ) { for ( list < shard info > batch : partition ( shards , batch size ( connection ) ) ) { list < long > shard ids = insert shards ( connection , table id , batch , is delta ) ; if ( ! bucketed ) { insert shard nodes ( connection , node ids , shard ids , batch ) ; } if ( ! is delta ) { for ( int i = 0 ; i < batch size ( ) ; i + + ) { shard info shard = batch get ( i ) ; set < integer > shard nodes = shard get node identifiers ( ) stream ( ) map ( node ids : : get ) collect ( to set ( ) ) ; index inserter insert ( shard ids get ( i ) , shard get shard uuid ( ) , shard get bucket number ( ) , shard nodes , shard get column stats ( ) ) ; } index inserter execute ( ) ; } } } }


public api client add default header ( string name , string value ) { if ( default headers contains key ( name ) ) { default headers remove ( name ) ; } default headers add ( name , value ) ; return this ; }


convert a " " - based resource path to a " " - based fully qualified class name

public static string convert resource path to class name ( string resource path ) { assert not null ( resource path , " resource path must not be null " ) ; return resource path replace ( path separator , package separator ) ; }


gets the spec of a local variable assignment that occurs at this instruction , or null if no local variable assignment occurs this may be the result register , or for { @ code mark - local } insns it may be the source

public register spec get local assignment ( ) { if ( result ! = null & & result get local item ( ) ! = null ) { return result ; } return null ; }


this test verifies ( for onw input tasks ) that the stream tasks react the following way to receiving a checkpoint cancellation barrier : - send a " decline checkpoint " notification out ( to the job manager ) - emit a cancellation barrier downstream

public void test decline call on cancel barrier one input ( ) throws exception { one input stream task test harness < string , string > test harness = new one input stream task test harness < > ( one input stream task : : new , 1 , 2 , basic type info string type info , basic type info string type info ) ; test harness setup output for singleton operator chain ( ) ; stream config stream config = test harness get stream config ( ) ; stream map < string , string > map operator = new stream map < > ( new identity map ( ) ) ; stream config set stream operator ( map operator ) ; stream config set operator i d ( new operator i d ( ) ) ; stream mock environment environment = spy ( test harness create environment ( ) ) ; / / start the task test harness invoke ( environment ) ; test harness wait for task running ( ) ; / / emit cancellation barriers test harness process event ( new cancel checkpoint marker ( 2l ) , 0 , 1 ) ; test harness process event ( new cancel checkpoint marker ( 2l ) , 0 , 0 ) ; test harness wait for input processing ( ) ; / / the decline call should go to the coordinator verify ( environment , times ( 1 ) ) decline checkpoint ( eq ( 2l ) , arg that ( new checkpoint exception matcher ( checkpoint failure reason checkpoint declined on cancellation barrier ) ) ) ; / / a cancellation barrier should be downstream object result = test harness get output ( ) poll ( ) ; assert not null ( " nothing emitted " , result ) ; assert true ( " wrong type emitted " , result instanceof cancel checkpoint marker ) ; assert equals ( " wrong checkpoint id " , 2l , ( ( cancel checkpoint marker ) result ) get checkpoint id ( ) ) ; / / cancel and shutdown test harness end input ( ) ; test harness wait for task completion ( ) ; }


returns the watch record as a map use { @ link org elasticsearch common xcontent object path } to navigate through the data

public map < string , object > get record as map ( ) { if ( data = = null ) { / / empty is safe here because we never use named object try ( input stream stream = content source stream input ( ) ; x content parser parser = x content type json x content ( ) create parser ( named x content registry empty , null , stream ) ) { data = ( map < string , object > ) x content utils read value ( parser , parser next token ( ) ) ; } catch ( i o exception ex ) { throw new elasticsearch exception ( " failed to read value " , ex ) ; } } return data ; }


returns an immutable multimap containing a single entry

public static < k , v > immutable list multimap < k , v > of ( k k 1 , v v 1 ) { immutable list multimap builder < k , v > builder = immutable list multimap builder ( ) ; builder put ( k 1 , v 1 ) ; return builder build ( ) ; }


handle deserialization of the ' null ' value

public fruit req get null value ( deserialization context ctxt ) throws json mapping exception { return null ; }


invoked first to determine if this interceptor applies

boolean supports ( method parameter method parameter , type target type , class < ? extends http message converter < ? > > converter type ) ;


updates the view with the new xml definition

public void update by xml ( source source ) throws i o exception { check permission ( configure ) ; string writer out = new string writer ( ) ; try { / / this allows us to use utf - 8 for storing data , / / plus it checks any well - formedness issue in the submitted / / data x m l utils safe transform ( source , new stream result ( out ) ) ; out close ( ) ; } catch ( transformer exception | s a x exception e ) { throw new i o exception ( " failed to persist configuration xml " , e ) ; } / / try to reflect the changes by reloading try ( input stream in = new buffered input stream ( new byte array input stream ( out to string ( ) get bytes ( standard charsets utf 8 ) ) ) ) { / / do not allow overwriting view name as it might collide with another / / view in same view group and might not satisfy jenkins check good name string oldname = name ; view group old owner = owner ; / / oddly , this field is not transient object o = jenkins xstream2 unmarshal ( x stream 2 get default driver ( ) create reader ( in ) , this , null , true ) ; if ( ! o get class ( ) equals ( get class ( ) ) ) { / / ensure that we ' ve got the same view type extending this code to support updating / / to different view type requires destroying & creating a new view type throw new i o exception ( " expecting view type : " + this get class ( ) + " but got : " + o get class ( ) + " instead " + " \ n should you needed to change to a new view type , you must first delete and then re - create " + " the view with the new view type " ) ; } name = oldname ; owner = old owner ; } catch ( stream exception | conversion exception | error e ) { / / mostly reflection errors throw new i o exception ( " unable to read " , e ) ; } save ( ) ; }


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

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


public void remove change listener ( change listener listener ) { listeners remove ( listener ) ; }


optional : if specified , only support the specified cipher list otherwise default to the default cipher list supported by envoy < code > repeated string cipher suites = 9 ; < code >

com google protobuf byte string get cipher suites bytes ( int index ) ;


creates list of users with given input array < b > 0 < b > - successful operation

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


set invocation ' s method ' s input parameter ' s types

public void set types ( class [ ] types ) { set ( types , types ! = null ? arrays copy of ( types , types length ) : null ) ; }


return the single { @ link cache memory utils } instance

public static cache memory utils get instance ( ) { return get instance ( default max count ) ; }


creates { @ link variable resolver } backed by { @ link # get build variables ( ) }

public final variable resolver < string > get build variable resolver ( ) { return new variable resolver by map < > ( get build variables ( ) ) ; }


the { @ link channel } of the { @ link channel handler context } was registered is now inactive and reached its end of lifetime

void channel inactive ( channel handler context ctx ) throws exception ;


check that copyreadwrite operation won ' t access memory it should not

static void check bounds ( final int offset , final int other length , final int other offset , final int count , final int memory size ) { preconditions check argument ( count > = 0 ) ; preconditions check argument ( offset > = 0 ) ; preconditions check argument ( other offset > = 0 ) ; preconditions check argument ( offset + count < = memory size ) ; preconditions check argument ( other offset + count < = other length ) ; }


returns a new block scope with the current scope as its parent

public block scope new local scope ( ) { return new block scope ( this ) ; }


tests the case when a block report was delayed past its scheduled time in that case the next block report should not be delayed for a full interval

public void test schedule next block report 3 ( ) { for ( final long now : get timestamps ( ) ) { scheduler scheduler = make mock scheduler ( now ) ; scheduler reset block report time = false ; / / make it look like the block report was scheduled to be sent between 1 - 3 / / intervals ago but sent just now final long block report delay = block report interval ms + random next int ( 2 * ( int ) block report interval ms ) ; final long orig block report time = now - block report delay ; scheduler next block report time = orig block report time ; scheduler schedule next block report ( ) ; assert true ( scheduler next block report time - now < block report interval ms ) ; assert true ( ( ( scheduler next block report time - orig block report time ) % block report interval ms ) = = 0 ) ; } }


public double get double ( ) { return double ; }


public ordering get ordering ( ) { return this ordering ; }


test the specified { @ link declared type type } is accepted or not

boolean accept ( processing environment processing env , declared type type ) ;


returns the byte array form of the content of this attribute the 6 header bytes ( attribute name index and attribute length ) must not be added in the returned byte vector

protected byte vector write ( final class writer class writer , final byte [ ] code , final int code length , final int max stack , final int max locals ) { return new byte vector ( content ) ; }


is the ugi managed by the ugi or an external subject ?

private boolean is hadoop login ( ) { / / checks if the private hadoop login context is managing the ugi return get login ( ) ! = null ; }


returns the number of times a version was looked up either from the index note this is only available if assertions are enabled

long get num index versions lookups ( ) { / / for testing return num index versions lookups count ( ) ; }


build a { @ linkplain function definition } for multi - arg function that is not aware of time zone and does not support { @ code distinct }

public static < t extends function > function definition def ( class < t > function , multi function builder < t > ctor ref , string names ) { function builder builder = ( source , children , distinct , cfg ) - > { if ( distinct ) { throw new ql illegal argument exception ( " does not support distinct yet it was specified " ) ; } return ctor ref build ( source , children ) ; } ; return def ( function , builder , false , names ) ; }


removes all values associated with a given key the returned collection is immutable because a { @ code sorted set multimap } has unique sorted values for a given key , this method returns a { @ link sorted set } , instead of the { @ link collection } specified in the { @ link multimap } interface

public sorted set < v > remove all ( @ nullable decl object key ) { return ( sorted set < v > ) super remove all ( key ) ; }


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


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

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


use the given domain for cookies created by this generator the cookie is only visible to servers in this domain

public void set cookie domain ( @ nullable string cookie domain ) { this cookie domain = cookie domain ; }


initialize the data structures used by this class important note : this method must be called once before calling any other public method on this class creates a singleton master populated storage directory for a namenode ( contains edits , fsimage , version , and time files ) and a datanode ( contains version and block files ) this can be a lengthy operation

public static void initialize ( ) throws exception { create empty dirs ( new string [ ] { test root dir to string ( ) } ) ; configuration config = new hdfs configuration ( ) ; config set ( d f s config keys dfs namenode name dir key , namenode storage to string ( ) ) ; config set ( d f s config keys dfs namenode edits dir key , namenode storage to string ( ) ) ; config set ( d f s config keys dfs datanode data dir key , datanode storage to string ( ) ) ; mini d f s cluster cluster = null ; string bpid = null ; try { / / format data - node create empty dirs ( new string [ ] { datanode storage to string ( ) } ) ; / / format and start name node and start data node d f s test util format name node ( config ) ; cluster = new mini d f s cluster builder ( config ) num data nodes ( 1 ) startup option ( startup option regular ) format ( false ) manage data dfs dirs ( false ) manage name dfs dirs ( false ) build ( ) ; namenode protocols namenode = cluster get name node rpc ( ) ; namenode storage namespace i d = namenode version request ( ) get namespace i d ( ) ; namenode storage fssc time = namenode version request ( ) get c time ( ) ; namenode storage cluster i d = namenode version request ( ) get cluster i d ( ) ; namenode storage block pool i d = namenode version request ( ) get block pool i d ( ) ; file system fs = file system get ( config ) ; path base dir = new path ( " / test upgrade " ) ; fs mkdirs ( base dir ) ; / / write some files int buffer size = 4096 ; byte [ ] buffer = new byte [ buffer size ] ; for ( int i = 0 ; i < buffer size ; i + + ) buffer [ i ] = ( byte ) ( ' 0 ' + i % 50 ) ; write file ( fs , new path ( base dir , " file 1 " ) , buffer , buffer size ) ; write file ( fs , new path ( base dir , " file 2 " ) , buffer , buffer size ) ; / / save image namenode set safe mode ( safe mode action safemode enter , false ) ; namenode save namespace ( 0 , 0 ) ; namenode set safe mode ( safe mode action safemode leave , false ) ; / / write more files write file ( fs , new path ( base dir , " file 3 " ) , buffer , buffer size ) ; write file ( fs , new path ( base dir , " file 4 " ) , buffer , buffer size ) ; bpid = cluster get namesystem ( 0 ) get block pool id ( ) ; } finally { / / shutdown if ( cluster ! = null ) cluster shutdown ( ) ; file util fully delete ( new file ( namenode storage , " in use lock " ) ) ; file util fully delete ( new file ( datanode storage , " in use lock " ) ) ; } namenode storage checksum = checksum contents ( name node , new file ( namenode storage , " current " ) , false ) ; file dn cur dir = new file ( datanode storage , " current " ) ; datanode storage checksum = checksum contents ( data node , dn cur dir , false ) ; file bp cur dir = new file ( block pool slice storage get bp root ( bpid , dn cur dir ) , " current " ) ; block pool storage checksum = checksum contents ( data node , bp cur dir , false ) ; file bp cur finalize dir = new file ( block pool slice storage get bp root ( bpid , dn cur dir ) , " current / " + data storage storage dir finalized ) ; block pool finalized storage checksum = checksum contents ( data node , bp cur finalize dir , true ) ; file bp cur rbw dir = new file ( block pool slice storage get bp root ( bpid , dn cur dir ) , " current / " + data storage storage dir rbw ) ; block pool rbw storage checksum = checksum contents ( data node , bp cur rbw dir , false ) ; }


similar to test rollover then restart , but ensure we can survive multiple epoch rollovers between restarts

public void test multiple rollover ( ) throws exception { zoo keeper zk = get client ( idx follower ) ; int count created = create nodes ( zk , 0 , 10 ) ; adjust epoch near end ( ) ; count created + = create nodes ( zk , count created , 10 ) ; adjust epoch near end ( ) ; count created + = create nodes ( zk , count created , 10 ) ; adjust epoch near end ( ) ; count created + = create nodes ( zk , count created , 10 ) ; adjust epoch near end ( ) ; count created + = create nodes ( zk , count created , 10 ) ; shutdown all ( ) ; start all ( ) ; zk = get client ( idx follower ) ; adjust epoch near end ( ) ; check nodes ( zk , 0 , count created ) ; count created + = create nodes ( zk , count created , 10 ) ; shutdown ( idx leader ) ; start ( idx leader ) ; zk = get client ( idx follower ) ; check nodes ( zk , 0 , count created ) ; count created + = create nodes ( zk , count created , 10 ) ; / / sanity check assert true ( count created > 0 ) ; assert true ( count created < 70 ) ; }


public string get application id ( ) { if ( application id = = null ) { application id = application context get environment ( ) get property ( spring application name key ) ; } return application id ; }


returns the y position of the actor ' s bottom edge


set seata change target connection auto commit record

public void set auto commit changed ( boolean auto commit changed ) { this auto commit changed = auto commit changed ; }


retrieves { @ link input stream } of image by uri ( image is accessed using { @ link content resolver } )

protected input stream get stream from content ( string image uri , object extra ) throws file not found exception { content resolver res = context get content resolver ( ) ; uri uri = uri parse ( image uri ) ; if ( is video content uri ( uri ) ) { / / video thumbnail long orig id = long value of ( uri get last path segment ( ) ) ; bitmap bitmap = media store video thumbnails get thumbnail ( res , orig id , media store images thumbnails mini kind , null ) ; if ( bitmap ! = null ) { byte array output stream bos = new byte array output stream ( ) ; bitmap compress ( compress format png , 0 , bos ) ; return new byte array input stream ( bos to byte array ( ) ) ; } } else if ( image uri starts with ( content contacts uri prefix ) ) { / / contacts photo return get contact photo stream ( uri ) ; } return res open input stream ( uri ) ; }


encodes input string to one or two key values according to metaphone 3 rules

void encode ( ) { flag al inversion = false ; m current = 0 ; m primary set length ( 0 ) ; m secondary set length ( 0 ) ; if ( m length < 1 ) { return ; } / / zero based index m last = m length - 1 ; / / / / / / / / / / / main loop / / / / / / / / / / / / / / / / / / / / / / / / / / while ( ! ( m primary length ( ) > m metaph length ) & & ! ( m secondary length ( ) > m metaph length ) ) { if ( m current > = m length ) { break ; } switch ( char at ( m current ) ) { case ' b ' : encode b ( ) ; break ; case ' ß ' : case ' ç ' : metaph add ( " s " ) ; m current + + ; break ; case ' c ' : encode c ( ) ; break ; case ' d ' : encode d ( ) ; break ; case ' f ' : encode f ( ) ; break ; case ' g ' : encode g ( ) ; break ; case ' h ' : encode h ( ) ; break ; case ' j ' : encode j ( ) ; break ; case ' k ' : encode k ( ) ; break ; case ' l ' : encode l ( ) ; break ; case ' m ' : encode m ( ) ; break ; case ' n ' : encode n ( ) ; break ; case ' ñ ' : metaph add ( " n " ) ; m current + + ; break ; case ' p ' : encode p ( ) ; break ; case ' q ' : encode q ( ) ; break ; case ' r ' : encode r ( ) ; break ; case ' s ' : encode s ( ) ; break ; case ' t ' : encode t ( ) ; break ; case ' ð ' : / / eth case ' þ ' : / / thorn metaph add ( " 0 " ) ; m current + + ; break ; case ' v ' : encode v ( ) ; break ; case ' w ' : encode w ( ) ; break ; case ' x ' : encode x ( ) ; break ; case ' ' : metaph add ( " x " ) ; m current + + ; break ; case ' ' : metaph add ( " s " ) ; m current + + ; break ; case ' z ' : encode z ( ) ; break ; default : if ( is vowel ( char at ( m current ) ) ) { encode vowels ( ) ; break ; } m current + + ; } } / / only give back m metaph length number of chars in m metaph if ( m primary length ( ) > m metaph length ) { m primary set length ( m metaph length ) ; } if ( m secondary length ( ) > m metaph length ) { m secondary set length ( m metaph length ) ; } / / it is possible for the two metaphs to be the same / / after truncation lose the second one if so if ( ( m primary to string ( ) ) equals ( m secondary to string ( ) ) ) { m secondary set length ( 0 ) ; } }


equality is implemented in support of tests , not for use in hash collections , since this class is mutable

public int hash code ( ) { throw new unsupported operation exception ( " processor record context is unsafe for use in hash collections " ) ; }


ensures that the joining node has a version that ' s compatible with all current nodes

public static void ensure nodes compatibility ( final version joining node version , discovery nodes current nodes ) { final version min node version = current nodes get min node version ( ) ; final version max node version = current nodes get max node version ( ) ; ensure nodes compatibility ( joining node version , min node version , max node version ) ; }


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


is authenticating at a public workstation ?

public static boolean is authenticating at public workstation ( final request context ctx ) { if ( ctx get flow scope ( ) contains ( public workstation attribute ) ) { logger debug ( " public workstation flag detected sso session will be considered renewed " ) ; return true ; } return false ; }


the floating buffer is recycled to local buffer pool directly , and the exclusive buffer will be gathered to return to global buffer pool later

void release all ( list < memory segment > exclusive segments ) { buffer buffer ; while ( ( buffer = floating buffers poll ( ) ) ! = null ) { buffer recycle buffer ( ) ; } while ( ( buffer = exclusive buffers poll ( ) ) ! = null ) { exclusive segments add ( buffer get memory segment ( ) ) ; } }


test that { @ link put mapping request # simple mapping ( string ) } rejects inputs where the { @ code object } varargs of field name and properties are not paired correctly

public void test build from simplified def ( ) { illegal argument exception e = expect throws ( illegal argument exception class , ( ) - > put mapping request simple mapping ( " only field " ) ) ; assert equals ( " mapping source must be pairs of fieldnames and properties definition " , e get message ( ) ) ; }


this is the extra test which committer test bindings can add

public void test 500 ( ) throws throwable { committer test binding test 500 ( ) ; }


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


public long get debug end offset ( ) { return internals get debug end offset ( ) ; }


returns the number of key - value mappings that this sparse float array currently stores


return whether the underlying class is declared within an enclosing class ( i e the underlying class is an innernested class or a local class within a method ) if this method returns { @ code false } , then the underlying class is a top - level class

default boolean has enclosing class ( ) { return ( get enclosing class name ( ) ! = null ) ; }


join an array of strings with the given separator note : this might be replaced by utility method from commons - lang or guava someday if one of those libraries is added as dependency

public static string join ( string [ ] array , string separator ) { int len = array length ; if ( len = = 0 ) { return " " ; } string builder out = new string builder ( ) ; out append ( array [ 0 ] ) ; for ( int i = 1 ; i < len ; i + + ) { out append ( separator ) append ( array [ i ] ) ; } return out to string ( ) ; }


enables the { @ link audio becoming noisy manager } which calls { @ link event listener # on audio becoming noisy ( ) } upon receiving an intent of { @ link audio manager # action audio becoming noisy }

public void set enabled ( boolean enabled ) { if ( enabled & & ! receiver registered ) { context register receiver ( receiver , new intent filter ( audio manager action audio becoming noisy ) ) ; receiver registered = true ; } else if ( ! enabled & & receiver registered ) { context unregister receiver ( receiver ) ; receiver registered = false ; } }


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

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


returns a { @ code self call = true } method for the given class under the given starlark semantics , or null if no such method exists

static method get self call method ( starlark semantics semantics , class < ? > obj class ) { method descriptor descriptor = get cache value ( obj class , semantics ) self call ; if ( descriptor = = null ) { return null ; } return descriptor get method ( ) ; }


set the value of the ' { @ code rows } ' attribute may be a runtime expression

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


reads a character value ( 16 bit , 2 bytes ) from the given position , in little - endian byte order this method ' s speed depends on the system ' s native byte order , and it is possibly slower than { @ link # get char ( int ) } for most cases ( such as transient storage in memory or serialization for io and network ) , it suffices to know that the byte order in which the value is written is the same as the one in which it is read , and { @ link # get char ( int ) } is the preferable choice

public final char get char little endian ( int index ) { if ( little endian ) { return get char ( index ) ; } else { return character reverse bytes ( get char ( index ) ) ; } }


set the message body converters to use these converters are used to convert objects to mime parts

public void set part converters ( list < http message converter < ? > > part converters ) { assert not empty ( part converters , " ' part converters ' must not be empty " ) ; this part converters = part converters ; }


pop up an editor dialog for the given data type


whether to jar sign the apk with the apksigner tool

public boolean sign v 1 ( ) { return sign v 1 ; }


private static float valid probability ( float p ) { preconditions check argument ( p > = 0 0f & & p < = 1 0f , " probability out of range 0 to 1 % s " , p ) ; return p ; }


accumulate the value with existing value in the same given key

public void value accumulation ( string key , long value ) { long element = data get ( key ) ; if ( element = = null ) { element = value ; } else { element + = value ; } data put ( key , element ) ; }


protected int get normal layout res id ( ) { return item common binder layout ; }


returns { @ code true } if and only if { @ code ( this capacity - this writer index ) } is greater than { @ code 0 }


find node by path deprecated - use get node by path with project parameter

public d b n node get node by path ( @ not null d b r progress monitor monitor , @ not null string path ) throws d b exception { final node path node path = get node path ( path ) ; if ( node path type = = d b n node node path type database ) { boolean has lazy projects = false ; for ( d b n project project node : get root ( ) get projects ( ) ) { if ( ! project node get project ( ) is registry loaded ( ) ) { has lazy projects = true ; continue ; } d b n data source cur node = project node get databases ( ) get data source ( node path first ( ) ) ; if ( cur node ! = null ) { return find node by path ( monitor , node path , cur node , 1 ) ; } } if ( has lazy projects ) { / / no try to search in uninitialized proejcts for ( d b n project project node : get root ( ) get projects ( ) ) { if ( ! project node get project ( ) is registry loaded ( ) ) { d b n data source cur node = project node get databases ( ) get data source ( node path first ( ) ) ; if ( cur node ! = null ) { return find node by path ( monitor , node path , cur node , 1 ) ; } } } } } else if ( node path type = = d b n node node path type ext ) { d b n project [ ] projects = root get projects ( ) ; if ( array utils is empty ( projects ) ) { throw new d b exception ( " no projects in workspace " ) ; } if ( projects length > 1 ) { throw new d b exception ( " multi - project workspace extension nodes not supported " ) ; } return find node by path ( monitor , node path , projects [ 0 ] , 0 ) ; } else if ( node path type = = d b n node node path type other ) { return find node by path ( monitor , node path , root , 0 ) ; } else { for ( d b n project project node : get root ( ) get projects ( ) ) { if ( project node get name ( ) equals ( node path first ( ) ) ) { return find node by path ( monitor , node path , node path type = = d b n node node path type folder ? project node get databases ( ) : project node , 1 ) ; } } } return null ; }


todo the front page should appear operable the external data source is imported into derby mysqldump - - defaults - file = " xxx " - - host = 0 0 0 0 - - protocol = tcp - - user = xxx - - extended - insert = false \ - - complete - insert = true \ - - skip - triggers - - no - create - info - - skip - column - statistics " { schema } " " { table name } "

public deferred result < rest result < string > > import derby ( @ request param ( value = " file " ) multipart file multipart file ) { deferred result < rest result < string > > response = new deferred result < > ( ) ; if ( ! property util is embedded storage ( ) ) { response set result ( rest result utils failed ( " limited to embedded storage mode " ) ) ; return response ; } database operate database operate = application utils get bean ( database operate class ) ; web utils on file upload ( multipart file , file - > { notify center publish event ( new derby import event ( false ) ) ; database operate data import ( file ) when complete ( ( result , ex ) - > { notify center publish event ( new derby import event ( true ) ) ; if ( objects non null ( ex ) ) { response set result ( rest result utils failed ( ex get message ( ) ) ) ; return ; } response set result ( result ) ; } ) ; } , response ) ; return response ; }


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