add the given bean to the list of disposable beans in this factory , registering its disposable bean interface andor the given destroy method to be called on factory shutdown ( if applicable ) only applies to singletons

protected void register disposable bean if necessary ( string bean name , object bean , root bean definition mbd ) { access control context acc = ( system get security manager ( ) ! = null ? get access control context ( ) : null ) ; if ( ! mbd is prototype ( ) & & requires destruction ( bean , mbd ) ) { if ( mbd is singleton ( ) ) { / / register a disposable bean implementation that performs all destruction / / work for the given bean : destruction aware bean post processors , / / disposable bean interface , custom destroy method register disposable bean ( bean name , new disposable bean adapter ( bean , bean name , mbd , get bean post processor cache ( ) destruction aware , acc ) ) ; } else { / / a bean with a custom scope scope scope = this scopes get ( mbd get scope ( ) ) ; if ( scope = = null ) { throw new illegal state exception ( " no scope registered for scope name ' " + mbd get scope ( ) + " ' " ) ; } scope register destruction callback ( bean name , new disposable bean adapter ( bean , bean name , mbd , get bean post processor cache ( ) destruction aware , acc ) ) ; } } } / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - / / abstract methods to be implemented by subclasses / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


lambda class maker generates lambda classes for us , but it does so by essentially simulating the call to lambda metafactory that the jvm would make when encountering an invokedynamic lambda metafactory is in the jdk and its implementation has a property to write out ( " dump " ) generated classes , which we take advantage of here this property can be set externally , and in that case the specified directory is used as a temporary dir otherwise , it will be set here , before doing anything else since the property is read in the static initializer

static path create and register lambda dump directory ( ) { string property value = system get property ( lambda metafactory dumper property ) ; if ( property value ! = null ) { path path = paths get ( property value ) ; check state ( files is directory ( path ) , " the path ' % s ' is not a directory " , path ) ; / / it is not necessary to check whether ' path ' is an empty directory it is possible that / / lambda metafactory is loaded before this class , and there are already lambda classes dumped / / into the ' path ' folder / / todo ( kmb ) : maybe we can empty the folder here return path ; } path dump directory ; try { dump directory = files create temp directory ( " lambdas " ) ; } catch ( i o exception e ) { throw new i o error ( e ) ; } system set property ( lambda metafactory dumper property , dump directory to string ( ) ) ; delete tree on exit ( dump directory ) ; return dump directory ; }


determine the http status code to apply for the given error view the default implementation returns the status code for the given view name ( specified through the { @ link # set status codes ( properties ) status codes } property ) , or falls back to the { @ link # set default status code default status code } if there is no match override this in a custom subclass to customize this behavior

protected integer determine status code ( http servlet request request , string view name ) { if ( this status codes contains key ( view name ) ) { return this status codes get ( view name ) ; } return this default status code ; }


public list < integer > get wrapped array ( ) { return wrapped array ; }


private @ non null schedule result schedule internal ( task p , int quiet period , list < action > actions ) { lock lock ( ) ; try { try { calendar due = new gregorian calendar ( ) ; due add ( calendar second , quiet period ) ; / / do we already have this task in the queue ? because if so , we won ' t schedule a new one list < item > duplicates in queue = new array list < > ( ) ; for ( item item : live get items ( p ) ) { boolean should schedule item = false ; for ( queue action action : item get actions ( queue action class ) ) { should schedule item | = action should schedule ( actions ) ; } for ( queue action action : util filter ( actions , queue action class ) ) { should schedule item | = action should schedule ( ( new array list < > ( item get all actions ( ) ) ) ) ; } if ( ! should schedule item ) { duplicates in queue add ( item ) ; } } if ( duplicates in queue is empty ( ) ) { logger log ( level fine , " { 0 } added to queue " , p ) ; / / put the item in the queue waiting item added = new waiting item ( due , p , actions ) ; added enter ( this ) ; schedule maintenance ( ) ; / / let an executor know that a new item is in the queue return schedule result created ( added ) ; } logger log ( level fine , " { 0 } is already in the queue " , p ) ; / / but let the actions affect the existing stuff for ( item item : duplicates in queue ) { for ( foldable action a : util filter ( actions , foldable action class ) ) { a fold into existing ( item , p , actions ) ; if ( logger is loggable ( level fine ) ) { logger log ( level fine , " after folding { 0 } , { 1 } includes { 2 } " , new object [ ] { a , item , item get all actions ( ) } ) ; } } } boolean queue updated = false ; for ( waiting item wi : util filter ( duplicates in queue , waiting item class ) ) { / / make sure to always use the shorter of the available due times if ( wi timestamp before ( due ) ) continue ; / / waiting list is sorted , so when we change a timestamp we need to maintain order wi leave ( this ) ; wi timestamp = due ; wi enter ( this ) ; queue updated = true ; } if ( queue updated ) schedule maintenance ( ) ; / / revisit : when there are multiple existing items in the queue that matches the incoming one , / / whether the new one should affect all existing ones or not is debatable i for myself / / thought this would only affect one , so the code was bit of surprise , but i ' m keeping the current / / behaviour return schedule result existing ( duplicates in queue get ( 0 ) ) ; } finally { update snapshot ( ) ; } } finally { lock unlock ( ) ; } }


gets the repository folder item name associated with the url if an ambiguous path has been specified , the folder item name may become null after a connection is established ( e g , folder item name will be appended to folder path and item name will become null if item turns out to be a folder )

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


get fakejson form data : test json serialization of form data

default response entity < void > test json form data ( string param , string param 2 ) { return new response entity < > ( http status not implemented ) ; }


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


public string get lock key ( ) { return lock key ; }


test all the operations supported in node hash map impl

public void test operations ( ) { node hash map impl nodes = new node hash map impl ( new digest calculator ( ) ) ; assert equals ( 0 , nodes size ( ) ) ; assert equals ( 0l , nodes get digest ( ) ) ; / / add a new node string p 1 = " p 1 " ; data node n 1 = new data node ( p 1 get bytes ( ) , 0l , new stat persisted ( ) ) ; nodes put ( p 1 , n 1 ) ; assert equals ( n 1 , nodes get ( p 1 ) ) ; assert not equals ( 0l , nodes get digest ( ) ) ; assert equals ( 1 , nodes size ( ) ) ; / / put another node string p 2 = " p 2 " ; nodes put ( p 2 , new data node ( p 2 get bytes ( ) , 0l , new stat persisted ( ) ) ) ; set < map entry < string , data node > > entries = nodes entry set ( ) ; assert equals ( 2 , entries size ( ) ) ; / / remove a node nodes remove ( p 1 ) ; assert equals ( 1 , nodes size ( ) ) ; nodes remove ( p 2 ) ; assert equals ( 0 , nodes size ( ) ) ; assert equals ( 0l , nodes get digest ( ) ) ; / / test pre change and post change string p 3 = " p 3 " ; data node n 3 = new data node ( p 3 get bytes ( ) , 0l , new stat persisted ( ) ) ; nodes put ( p 3 , n 3 ) ; long pre change digest = nodes get digest ( ) ; assert not equals ( 0l , pre change digest ) ; nodes pre change ( p 3 , n 3 ) ; assert equals ( 0l , nodes get digest ( ) ) ; n 3 stat set mzxid ( 1 ) ; n 3 stat set mtime ( 1 ) ; n 3 stat set version ( 1 ) ; nodes post change ( p 3 , n 3 ) ; long post change digest = nodes get digest ( ) ; assert not equals ( 0 , post change digest ) ; assert not equals ( pre change digest , post change digest ) ; }


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


protected int get name index ( ) { return u 2name index ; }


determine if the specified port for this { @ code socket type } is currently available on { @ code localhost }

protected abstract boolean is port available ( int port ) ;


reads one chunk from the end of the file this is useful when scrolling to the bottom of the viewport

public synchronized list < string > read last chunk ( ) throws i o exception { if ( raf = = null ) { return new array list < > ( ) ; } raf seek ( raf length ( ) ) ; return read chunk in reverse ( raf get file pointer ( ) ) ; }


called after a job has its configuration updated

public void on updated ( item item ) { }


inserts the string representation of the specified { @ code double } value at the specified { @ code offset } the { @ code double } value is converted to a string according to the rule defined by { @ link string # value of ( double ) }

public string builder insert ( int offset , double d ) { insert 0 ( offset , double to string ( d ) ) ; return this ; }


return the map with attributes associated with the web socket session

map < string , object > get attributes ( ) ;


add hi16 relocation for deferred processing

void add h i 1 6 relocation ( mips deferred relocation hi 1 6reloc ) { hi 1 6list add ( hi 1 6reloc ) ; }


verify rack - local node selection for the rack - local client in case of no local node

public void test local rack placement ( ) throws exception { string client machine = " client foo com " ; / / map client to rack2 string client rack = " / rack2 " ; static mapping add node to rack ( client machine , client rack ) ; test placement ( client machine , client rack , true ) ; }


returns an immutable array containing the given values , in order

public static immutable long array of ( long e 0 , long e 1 , long e 2 , long e 3 , long e 4 ) { return new immutable long array ( new long [ ] { e 0 , e 1 , e 2 , e 3 , e 4 } ) ; }


private int [ ] common asserts ( string name , int shards , int package count , int package size , collection < string > input , map < string , integer > output ) { assert maintain order ( input , output ) ; int [ ] counts = assert and count mappings ( shards , package size , output , package count < = shards ) ; assert balanced ( name , shards , package count , package size , input size ( ) , counts ) ; return counts ; }


this implementation " creates " a new ejb instance for each invocation can be overridden for custom invocation strategies alternatively , override { @ link # get session bean instance } and { @ link # release session bean instance } to change ejb instance creation , for example to hold a single shared ejb instance

public object invoke in context ( method invocation invocation ) throws throwable { object ejb = null ; try { ejb = get session bean instance ( ) ; method method = invocation get method ( ) ; if ( method get declaring class ( ) is instance ( ejb ) ) { / / directly implemented return method invoke ( ejb , invocation get arguments ( ) ) ; } else { / / not directly implemented method ejb method = ejb get class ( ) get method ( method get name ( ) , method get parameter types ( ) ) ; return ejb method invoke ( ejb , invocation get arguments ( ) ) ; } } catch ( invocation target exception ex ) { throwable target ex = ex get target exception ( ) ; if ( logger is debug enabled ( ) ) { logger debug ( " method of local ejb [ " + get jndi name ( ) + " ] threw exception " , target ex ) ; } if ( target ex instanceof create exception ) { throw new ejb access exception ( " could not create local ejb [ " + get jndi name ( ) + " ] " , target ex ) ; } else { throw target ex ; } } catch ( naming exception ex ) { throw new ejb access exception ( " failed to locate local ejb [ " + get jndi name ( ) + " ] " , ex ) ; } catch ( illegal access exception ex ) { throw new ejb access exception ( " could not access method [ " + invocation get method ( ) get name ( ) + " ] of local ejb [ " + get jndi name ( ) + " ] " , ex ) ; } finally { if ( ejb instanceof e j b local object ) { release session bean instance ( ( e j b local object ) ejb ) ; } } }


returns the lazily generated test scenarios

public static iterator < object [ ] > provides caches ( method test method ) throws exception { cache generator generator = new cache generator ( test method ) ; return as test cases ( test method , generator generate ( ) ) ; }


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


check whether if updated labels sent to rm was accepted or not

void verify r m heartbeat response for node labels ( node heartbeat response response ) ;


make sure the acl is exist in the acl map after snap syncing zoo keeper uses acl reference id and count to save the space in snapshot during fuzzy snapshot sync , the reference count may not be updated correctly in case like the znode is already exist when acl reference count reaches 0 , it will be deleted from the cache , but actually there might be other nodes still using it when visiting a node with the deleted acl id , it will be rejected because it doesn ' t exist anymore here is the detailed flow for one of the scenario here : 1 server a starts to have snap sync with leader 2 after serializing the acl map to server a , there is a txn t1 to create a node n1 with new acl 1 which was not exist in acl map 3 on leader , after this txn , the acl map will be id1 - & gt ; ( acl 1 , count : 1 ) , and data tree n1 - & gt ; id1 4 on server a , it will be empty acl map , and n1 - & gt ; id1 in fuzzy snapshot 5 when replaying the txn t1 , it will skip at the beginning since the node is already exist , which leaves an empty acl map , and n1 is referencing to a non - exist acl id1 6 node n1 will be not accessible because the acl not exist , and if it became leader later then all the write requests will be rejected as well with marshalling error

public void test a c l created during fuzzy snapshot sync ( ) throws i o exception { data tree leader data tree = new data tree ( ) ; / / start the simulated snap - sync by serializing acl cache file file = file create temp file ( " snapshot " , " zk " ) ; file output stream os = new file output stream ( file ) ; output archive oa = binary output archive get archive ( os ) ; leader data tree serialize acls ( oa ) ; / / add couple of transaction in - between txn header hdr 1 = new txn header ( 1 , 2 , 2 , 2 , zoo defs op code create ) ; record txn 1 = new create txn ( " / a 1 " , " foo " get bytes ( ) , zoo defs ids creator all acl , false , - 1 ) ; leader data tree process txn ( hdr 1 , txn 1 ) ; / / finish the snapshot leader data tree serialize nodes ( oa ) ; os close ( ) ; / / simulate restore on follower and replay file input stream is = new file input stream ( file ) ; input archive ia = binary input archive get archive ( is ) ; data tree follower data tree = new data tree ( ) ; follower data tree deserialize ( ia , " tree " ) ; follower data tree process txn ( hdr 1 , txn 1 ) ; data node a 1 = leader data tree get node ( " / a 1 " ) ; assert not null ( a 1 ) ; assert equals ( zoo defs ids creator all acl , leader data tree get a c l ( a 1 ) ) ; assert equals ( zoo defs ids creator all acl , follower data tree get a c l ( a 1 ) ) ; }


adds the deprecated key to the global deprecation map when no custom message is provided it does not override any existing entries in the deprecation map this is to be used only by the developers in order to add deprecation of keys , and attempts to call this method after loading resources once , would lead to < tt > unsupported operation exception < tt > if a key is deprecated in favor of multiple keys , they are all treated as aliases of each other , and setting any one of them resets all the others to the new value if you have multiple deprecation entries to add , it is more efficient to use # add deprecations ( deprecation delta [ ] deltas ) instead

public static void add deprecation ( string key , string [ ] new keys ) { add deprecation ( key , new keys , null ) ; }


the number of all rows in this column including both nulls and non - nulls

public long get total count ( ) { return get null count ( ) + get non null count ( ) ; }


returns the sql statement that caused the failure ( not the parameter array )

public string get failing sql statement ( ) { return batch result get sql ( ) ; }


creates a fixture and attach it to this body use this function if you need to set some fixture parameters , like friction otherwise you can create the fixture directly from a shape if the density is non - zero , this function automatically updates the mass of the body contacts are not created until the next time step

public final fixture create fixture ( fixture def def ) { assert ( m world is locked ( ) = = false ) ; if ( m world is locked ( ) = = true ) { return null ; } fixture fixture = new fixture ( ) ; fixture create ( this , def ) ; if ( ( m flags & e active flag ) = = e active flag ) { broad phase broad phase = m world m contact manager m broad phase ; fixture create proxies ( broad phase , m xf ) ; } fixture m next = m fixture list ; m fixture list = fixture ; + + m fixture count ; fixture m body = this ; / / adjust mass properties if needed if ( fixture m density > 0 0f ) { reset mass data ( ) ; } / / let the world know we have a new fixture this will cause new contacts / / to be created at the beginning of the next time step m world m flags | = world new fixture ; return fixture ; }


public static boolean is empty ( final object obj ) { if ( obj = = null ) { return true ; } if ( obj get class ( ) is array ( ) & & array get length ( obj ) = = 0 ) { return true ; } if ( obj instanceof char sequence & & obj to string ( ) length ( ) = = 0 ) { return true ; } if ( obj instanceof collection & & ( ( collection ) obj ) is empty ( ) ) { return true ; } if ( obj instanceof map & & ( ( map ) obj ) is empty ( ) ) { return true ; } if ( obj instanceof simple array map & & ( ( simple array map ) obj ) is empty ( ) ) { return true ; } if ( obj instanceof sparse array & & ( ( sparse array ) obj ) size ( ) = = 0 ) { return true ; } if ( obj instanceof sparse boolean array & & ( ( sparse boolean array ) obj ) size ( ) = = 0 ) { return true ; } if ( obj instanceof sparse int array & & ( ( sparse int array ) obj ) size ( ) = = 0 ) { return true ; } if ( build version sdk int > = build version codes jelly bean mr2 ) { if ( obj instanceof sparse long array & & ( ( sparse long array ) obj ) size ( ) = = 0 ) { return true ; } } if ( obj instanceof long sparse array & & ( ( long sparse array ) obj ) size ( ) = = 0 ) { return true ; } if ( build version sdk int > = build version codes jelly bean ) { if ( obj instanceof android util long sparse array & & ( ( android util long sparse array ) obj ) size ( ) = = 0 ) { return true ; } } return false ; }


public list < integer > get namespace wrapped array ( ) { return namespace wrapped array ; }


returns a pseudo - random , uniformly distributed { @ code double } value between 0 0 and 1 0 from this random number generator ' s sequence this implementation uses { @ link # next long ( ) } internally

public double next double ( ) { return ( next long ( ) > > > 11 ) * norm double ; }


returns an { @ link input stream } to read from { @ code stderr } of the child process when this method returns null , { @ link proc } will internally pump the output from the child process to your { @ link output stream } of choosing

public abstract input stream get stderr ( ) ;


publishes compression related data statistics following statistics are published total compressed input data size number of compressed input data files compression ratio text data dictionary size random text word size

static data statistics publish compressed data statistics ( path input dir , configuration conf , long uncompressed data size ) throws i o exception { file system fs = input dir get file system ( conf ) ; compression codec factory compression codecs = new compression codec factory ( conf ) ; / / iterate over compressed files and sum up the compressed file sizes long compressed data size = 0 ; int num compressed files = 0 ; / / obtain input data file statuses file status [ ] out file statuses = fs list status ( input dir , new utils output file utils output files filter ( ) ) ; for ( file status status : out file statuses ) { / / check if the input file is compressed if ( compression codecs ! = null ) { compression codec codec = compression codecs get codec ( status get path ( ) ) ; if ( codec ! = null ) { + + num compressed files ; compressed data size + = status get len ( ) ; } } } log info ( " gridmix is configured to use compressed input data " ) ; / / publish the input data size log info ( " total size of compressed input data : " + string utils human readable int ( compressed data size ) ) ; log info ( " total number of compressed input data files : " + num compressed files ) ; if ( num compressed files = = 0 ) { throw new runtime exception ( " no compressed file found in the input " + " directory : " + input dir to string ( ) + " to enable compression " + " emulation , run gridmix either with " + " an input directory containing compressed input file ( s ) or " + " use the - generate option to ( re ) generate it if compression " + " emulation is not desired , disable it by setting ' " + compression emulation enable + " ' to ' false ' " ) ; } / / publish compression ratio only if its generated in this gridmix run if ( uncompressed data size > 0 ) { / / compute the compression ratio double ratio = ( ( double ) compressed data size ) / uncompressed data size ; / / publish the compression ratio log info ( " input data compression ratio : " + ratio ) ; } return new data statistics ( compressed data size , num compressed files , true ) ; }


tries to get the given project object ' s enclosing project

public static i project get enclosing project ( object project obj ) { i project project = null ; if ( project obj instanceof list ) { list < ? > list = ( list < ? > ) project obj ; if ( list size ( ) = = 1 ) { project obj = list iterator ( ) next ( ) ; } } if ( project obj instanceof file editor input ) { file editor input file editor input = ( file editor input ) project obj ; project = file editor input get file ( ) get project ( ) ; } else if ( project obj instanceof i resource ) { i resource resource = ( i resource ) project obj ; project = resource get project ( ) ; } else if ( project obj instanceof i java element ) { i java element java element = ( i java element ) project obj ; i resource resource = java element get resource ( ) ; if ( resource ! = null ) { project = resource get project ( ) ; } } return project ; }


public long count ( ) { return count ; }


the position of the first byte in the file to process

public long get start ( ) { return start ; }


child class implements this method to realize { @ code array ( ) }


waits until all enqueued operations are complete , but at most the given amount of milliseconds if the thread gets interrupted , any { @ link interrupted exception } will be rethrown as a { @ link dao exception }

public boolean wait for completion ( int max millis ) { return executor wait for completion ( max millis ) ; }


sets the fall through address for this block and is used by the block flow iterator of the associated instruction set the fallthrough should not be set if it is added as a block flow

public void set fall through ( address fallthrough address ) { this fallthrough address = fallthrough address ; }


public void execute ( file system fs ) throws i o exception { if ( replication = = - 1 ) { replication = fs get default replication ( path ) ; } if ( block size = = - 1 ) { block size = fs get default block size ( path ) ; } fs permission fs permission = new fs permission ( permission ) ; if ( unmasked permission ! = - 1 ) { fs permission = fs create modes create ( fs permission , new fs permission ( unmasked permission ) ) ; } output stream os = fs create ( path , fs permission , override , buffer size , replication , block size , null ) ; long bytes = copy bytes ( is , os ) ; http f s server web app get ( ) get metrics ( ) incr bytes written ( bytes ) ; return null ; }


returns the class specification objects currently represented in this panel

public list get class specifications ( ) { int size = list model size ( ) ; if ( size = = 0 ) { return null ; } list class specifications = new array list ( size ) ; for ( int index = 0 ; index < size ; index + + ) { class specifications add ( list model get ( index ) ) ; } return class specifications ; }


$ x y attribute : x is surrounding rule , label ref ( in any alts )

public attribute resolve to attribute ( string x , string y , action a s t node ) { label element pair any label def = get any label def ( x ) ; if ( any label def ! = null ) { if ( any label def type = = label type rule label ) { return g get rule ( any label def element get text ( ) ) resolve retval or property ( y ) ; } else { attribute dict scope = get predefined scope ( any label def type ) ; if ( scope = = null ) { return null ; } return scope get ( y ) ; } } return null ; }


returns information about each certificate that referenced by this ssl configurations this includes certificates used for identity ( with a private key ) and those used for trust , but excludes certificates that are provided by the jre

list < certificate info > get defined certificates ( @ nullable environment environment ) throws general security exception , i o exception { list < certificate info > certificates = new array list < > ( ) ; certificates add all ( key config certificates ( environment ) ) ; certificates add all ( trust config certificates ( environment ) ) ; return certificates ; }


creates an iterator over shards interleaving between nodes : the iterator returns the first shard from the first node , then the first shard of the second node , etc until one shard from each node has been returned the iterator then resumes on the first node by returning the second shard and continues until all shards from all the nodes have been returned

public iterator < shard routing > node interleaved shard iterator ( ) { final queue < iterator < shard routing > > queue = new array deque < > ( ) ; for ( map entry < string , routing node > entry : nodes to shards entry set ( ) ) { queue add ( entry get value ( ) copy shards ( ) iterator ( ) ) ; } return new iterator < shard routing > ( ) { public boolean has next ( ) { while ( ! queue is empty ( ) ) { if ( queue peek ( ) has next ( ) ) { return true ; } queue poll ( ) ; } return false ; } public shard routing next ( ) { if ( has next ( ) = = false ) { throw new no such element exception ( ) ; } iterator < shard routing > iter = queue poll ( ) ; shard routing result = iter next ( ) ; queue offer ( iter ) ; return result ; } public void remove ( ) { throw new unsupported operation exception ( ) ; } } ; }


outputs a value from the index this is useful for " value " window functions such as { @ code lag } that operate on arbitrary types without caring about the specific contents

void append to ( int channel , int position , block builder output ) ;


return the path of storageemulated 0 androiddatapackagefiles ringtones

public static string get external app ringtones path ( ) { if ( ! utils bridge is s d card enable by environment ( ) ) return " " ; return get absolute path ( utils get app ( ) get external files dir ( environment directory ringtones ) ) ; }


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

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


virtual address is always a binary offset

public address get markup address ( program program , boolean is binary ) { address space space = program get address factory ( ) get default address space ( ) ; return space get address ( virtual address ) ; }


whether the underlying recycler binder will have a circular behaviour defaults to false note : circular lists do not support any operation that changes the size of items like insert , remove , insert range , remove range

public builder is circular ( boolean is circular ) { this is circular = is circular ; return this ; }


public float get float ( ) { return float ; }


public rounding params set border width ( float width ) { preconditions check argument ( width > = 0 , " the border width cannot be < 0 " ) ; m border width = width ; return this ; }


add to this collection a { @ link header } with the given key and value

headers add double ( string key , double value ) ;


set the { @ link class filter } to use for this pointcut default is { @ link class filter # true }

public void set class filter ( class filter class filter ) { this class filter = class filter ; }


reflects over the generated protobuf class and ensures that no new fields have been added since we wrote this if we didn ' t , newly added fields would not be detected by { @ link group change reconstruct # reconstruct group change }

public void ensure group change reconstruct knows about all fields of decrypted group ( ) { int max field found = get max declared field number ( decrypted group class ) ; assert equals ( " group change reconstruct and its tests need updating to account for new fields on " + decrypted group class get name ( ) , 10 , max field found ) ; }


public static map < class < ? > , object > get registered classes ( ) { return registrations ; }


gets an { @ link allocation decision } from a { @ link allocation status }

public static allocation decision from allocation status ( allocation status allocation status ) { if ( allocation status = = null ) { return yes ; } else { switch ( allocation status ) { case deciders throttled : return throttled ; case fetching shard data : return awaiting info ; case delayed allocation : return allocation delayed ; case no valid shard copy : return no valid shard copy ; case no attempt : return no attempt ; default : assert allocation status = = allocation status deciders no : " unhandled allocation status type [ " + allocation status + " ] " ; return no ; } } }


sending multipartform - data without a file should result in a bad request if the handler expects a file upload

public void test multi part form data without file upload ( ) throws exception { final string boundary = generate multi part boundary ( ) ; final string crlf = " \ r \ n " ; final http u r l connection connection = open http connection for upload ( boundary ) ; try ( output stream output = connection get output stream ( ) ; print writer writer = new print writer ( new output stream writer ( output , standard charsets utf 8 ) , true ) ) { writer append ( " - - " + boundary ) append ( crlf ) ; writer append ( " content - disposition : form - data ; name = \ " foo \ " " ) append ( crlf ) ; writer append ( crlf ) flush ( ) ; output write ( " test " get bytes ( standard charsets utf 8 ) ) ; output flush ( ) ; writer append ( crlf ) flush ( ) ; writer append ( " - - " + boundary + " - - " ) append ( crlf ) flush ( ) ; } assert equals ( 400 , connection get response code ( ) ) ; }


public static void validate encoding format options ( readable config table options ) { json options validate encoding format options ( table options ) ; / / validator for { @ link schema include } if ( table options get ( schema include ) ) { throw new validation exception ( string format ( " debezium json serialization doesn ' t support ' % s % s ' option been set to true " , identifier , schema include key ( ) ) ) ; } }


writes data to a block blob of the given size , flushing every x bytes measure performance of that and return it

private static test result write block blob test file ( native azure file system fs , long size , long flush interval ) throws i o exception { return write test file ( fs , new path ( " / block blob " ) , size , flush interval ) ; }


sets an user provided hash for this operator this will be used as is the create the job vertex i d the user provided hash is an alternative to the generated hashes , that is considered when identifying an operator through the default hash mechanics fails ( e g because of changes between flink versions ) important : this should be used as a workaround or for trouble shooting the provided hash needs to be unique per transformation and job otherwise , job submission will fail furthermore , you cannot assign user - specified hash to intermediate nodes in an operator chain and trying so will let your job fail a use case for this is in migration between flink versions or changing the jobs in a way that changes the automatically generated hashes in this case , providing the previous hashes directly through this method ( e g obtained from old logs ) can help to reestablish a lost mapping from states to their target operator

public data stream sink < t > set uid hash ( string uid hash ) { transformation set uid hash ( uid hash ) ; return this ; }


adjust the circuit breaker now that terms have been loaded , getting the actual used either from the parameter ( if estimation worked for the entire set ) , or from the terms enum if it has been wrapped in a ram accounting terms enum

public void after load ( terms enum terms enum , long actual used ) { if ( terms enum instanceof ram accounting terms enum ) { estimated bytes = ( ( ram accounting terms enum ) terms enum ) get total bytes ( ) ; } breaker add without breaking ( - ( estimated bytes - actual used ) ) ; }


default completable future < acknowledge > dispose savepoint ( final string savepoint path , @ rpc timeout final time timeout ) { throw new unsupported operation exception ( ) ; }


makes sure the fast - path emits in order

protected final void fast path ordered emit ( u value , boolean delay error , disposable disposable ) { final observer < ? super v > observer = downstream ; final simple plain queue < u > q = queue ; if ( wip get ( ) = = 0 & & wip compare and set ( 0 , 1 ) ) { if ( q is empty ( ) ) { accept ( observer , value ) ; if ( leave ( - 1 ) = = 0 ) { return ; } } else { q offer ( value ) ; } } else { q offer ( value ) ; if ( ! enter ( ) ) { return ; } } queue drain helper drain loop ( q , observer , delay error , disposable , this ) ; }


public string get nullable message ( ) { return nullable message or else ( null ) ; }


void set bytes cur block ( final long bytes cur block ) { get streamer ( ) set bytes cur block ( bytes cur block ) ; }


public a p itest group parameters request required boolean group ( boolean required boolean group ) { this required boolean group = required boolean group ; return this ; }


get storeinventory : returns pet inventories by status returns a map of status codes to quantities

response entity < map < string , integer > > get inventory ( ) ;


tests using s3 select on a file where the version visible in s3 does not initially match the version tracked in the metadata store , but eventually ( after retries ) does

public void test select eventually consistent file ( ) throws throwable { describe ( " eventually consistent s3 select " ) ; require s 3 guard ( ) ; require s 3 select ( ) ; amazon s 3 s 3 client spy = spy on filesystem ( ) ; final path testpath 1 = write eventually consistent file version ( " select 1 dat " , s 3 client spy , 0 , test max retries , 0 ) ; / / should succeed since the inconsistency doesn ' t last longer than the / / configured retry limit fs open file ( testpath 1 ) must ( select sql , " select * from s3object " ) build ( ) get ( ) close ( ) ; / / select ( ) makes a get file status ( ) call before the consistency checking / / that will match the stub as such , we need an extra inconsistency here / / to cross the threshold int get metadata inconsistency count = test max retries + 2 ; final path testpath 2 = write eventually consistent file version ( " select 2 dat " , s 3 client spy , 0 , get metadata inconsistency count , 0 ) ; if ( expected exception interactions contains ( interaction type eventually consistent select ) ) { / / should fail since the inconsistency lasts longer than the configured / / retry limit intercept future ( remote file changed exception class , " select " , fs open file ( testpath 2 ) must ( select sql , " select * from s3object " ) build ( ) ) ; } else { fs open file ( testpath 2 ) must ( select sql , " select * from s3object " ) build ( ) get ( ) close ( ) ; } }


spnego client after usage needs to be closed in order to logout from { @ link login context } and dispose { @ link g s s context }

public void close ( ) throws login exception , g s s exception , privileged action exception { if ( login context ! = null ) { access controller do privileged ( ( privileged exception action < void > ) ( ) - > { login context logout ( ) ; return null ; } ) ; } if ( gss context ! = null ) { access controller do privileged ( ( privileged exception action < void > ) ( ) - > { gss context dispose ( ) ; return null ; } ) ; } }


private void records deleted ( final int count ) { instrumentation records deleted ( count ) ; }


private void put version marker item to table ( ) { final item marker = create version marker ( version marker item name , version , system current time millis ( ) ) ; put item ( marker ) ; }


writes a { @ link tuple } data set as csv file ( s ) to the specified location with the specified field and line delimiters < b > note : only a tuple data set can written as a csv file < b > for each tuple field the result of { @ link object # to string ( ) } is written

public data sink < t > write as csv ( string file path , string row delimiter , string field delimiter , write mode write mode ) { return internal write as csv ( new path ( file path ) , row delimiter , field delimiter , write mode ) ; }


set the { @ code http client } used for { @ linkplain # create request ( uri , http method ) synchronous execution }

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


creates a new { @ link resource compiler }

public static resource compiler create ( listening executor service executor service , path compiled resources , path aapt 2 , revision build tools version , boolean generate pseudo locale ) { return new resource compiler ( new compiling visitor ( executor service , compiled resources , aapt 2 , build tools version , generate pseudo locale ? optional of ( compiled resources resolve ( compiled type generated as prefix ( ) ) ) : optional empty ( ) ) ) ; }


removes all associations from this range map ( optional operation )


generates h cpp files from the java files found in " src " , with their class files being in " bin " the generated files will be stored in " jni " all paths are relative to the applications working directory

public void generate ( ) throws exception { generate ( " src " , " bin " , " jni " , null , null ) ; }


public s 3 a input policy get input policy ( ) { return input policy ; }


update the animation locked count for all children and each parent of the animating item mount items that have a lock count > 0 will not be unmounted during incremental mount

private static void update animation lock count ( final extension state < transitions extension state > extension state , final transitions extension input input , final int index , final boolean increment ) { / / update children final int last descendant index = find last descendant index ( input , index ) ; for ( int i = index ; i < = last descendant index ; i + + ) { final render tree node render tree node = input get mountable output at ( i ) ; final long id = render tree node get render unit ( ) get id ( ) ; if ( increment ) { if ( ! extension state owns reference ( id ) ) { extension state acquire mount reference ( id , false ) ; } } else { if ( extension state owns reference ( id ) ) { extension state release mount reference ( id , false ) ; } } } / / update parents render tree node parent render tree node = input get mountable output at ( index ) get parent ( ) ; while ( parent render tree node ! = null & & parent render tree node get parent ( ) ! = null ) { final long id = parent render tree node get render unit ( ) get id ( ) ; if ( increment ) { / / we use the position as 0 as we are not mounting it , just acquiring reference if ( ! extension state owns reference ( id ) ) { extension state acquire mount reference ( id , false ) ; } if ( ! extension state owns reference ( id ) ) { extension state acquire mount reference ( id , false ) ; } } else { if ( extension state owns reference ( id ) ) { extension state release mount reference ( id , false ) ; } } parent render tree node = parent render tree node get parent ( ) ; } }


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


public void hide empty view ( ) { if ( m empty ! = null & & m empty view ! = null ) { m empty set visibility ( view gone ) ; } else { log d ( view log tag , " there is no such empty view " ) ; } }


destroy the data this operation allows the data structure to release any internal resources before gc


specify bean validation properties to be passed to the validation provider as a map can be populated with a " map " or " props " element in xml bean definitions

public void set validation property map ( @ nullable map < string , string > validation properties ) { if ( validation properties ! = null ) { this validation property map put all ( validation properties ) ; } }


public void test simple allocation ( ) { r m node node = create node ( ) ; f s scheduler node scheduler node = new f s scheduler node ( node , false ) ; create default container ( ) ; assert equals ( " nothing should have been allocated , yet " , resources none ( ) , scheduler node get allocated resource ( ) ) ; scheduler node allocate container ( containers get ( 0 ) ) ; assert equals ( " container should be allocated " , containers get ( 0 ) get container ( ) get resource ( ) , scheduler node get allocated resource ( ) ) ; scheduler node release container ( containers get ( 0 ) get container id ( ) , true ) ; assert equals ( " everything should have been released " , resources none ( ) , scheduler node get allocated resource ( ) ) ; / / check that we are error prone scheduler node release container ( containers get ( 0 ) get container id ( ) , true ) ; final validation ( scheduler node ) ; }


sets the current progress of the operation and notifies the listeners that implement { @ link generic progressive future listener }

progressive promise < v > set progress ( long progress , long total ) ;


public static set < marker policy > available policies ( ) { return available policies ; }


sets the listener of inbound frames this listener will only be set if the decoder ' s listener is { @ code null }

protected b frame listener ( http 2 frame listener frame listener ) { this frame listener = check not null ( frame listener , " frame listener " ) ; return self ( ) ; }


gets the clock difference in html string this version handles null { @ link clock difference }

public static string to html ( clock difference d ) { if ( d = = null ) return failed html ; return d to html ( ) ; }


public void set real time ( boolean real time ) { this real time = real time ; }


processes key stroke entry from the text field

private void process key stroke entry ( key stroke ks ) { clear info panel ( ) ; / / an action must be selected if ( selection model is selection empty ( ) ) { status label set text ( " no action is selected " ) ; return ; } if ( ks ! = null & & reserved key bindings is reserved keystroke ( ks ) ) { status label set text ( key entry text field parse key stroke ( ks ) + " is a reserved keystroke " ) ; ks field clear field ( ) ; return ; } string selected action name = get selected action name ( ) ; if ( selected action name ! = null ) { if ( process key stroke ( selected action name , ks ) ) { string key stroke text = key entry text field parse key stroke ( ks ) ; show actions mapped to key stroke ( key stroke text ) ; table model fire table data changed ( ) ; } } }


return the { @ link web socket handler }

public web socket handler get web socket handler ( ) { return this web socket handler ; }


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


reads a value of unspecified type if a collection is read then the collection will be mutable if it contains any entry but might be immutable if it is empty

public object read generic value ( ) throws i o exception { byte type = read byte ( ) ; switch ( type ) { case - 1 : return null ; case 0 : return read string ( ) ; case 1 : return read int ( ) ; case 2 : return read long ( ) ; case 3 : return read float ( ) ; case 4 : return read double ( ) ; case 5 : return read boolean ( ) ; case 6 : return read byte array ( ) ; case 7 : return read array list ( ) ; case 8 : return read array ( ) ; case 9 : return read linked hash map ( ) ; case 10 : return read hash map ( ) ; case 11 : return read byte ( ) ; case 12 : return read date ( ) ; case 13 : return read date time ( ) ; case 14 : return read bytes reference ( ) ; case 15 : return read text ( ) ; case 16 : return read short ( ) ; case 17 : return read int array ( ) ; case 18 : return read long array ( ) ; case 19 : return read float array ( ) ; case 20 : return read double array ( ) ; case 21 : return read bytes ref ( ) ; case 22 : return read geo point ( ) ; case 23 : return read zoned date time ( ) ; case 24 : return read collection ( stream input : : read generic value , linked hash set : : new , collections empty set ( ) ) ; case 25 : return read collection ( stream input : : read generic value , hash set : : new , collections empty set ( ) ) ; case 26 : return read big integer ( ) ; case 27 : return read offset time ( ) ; default : throw new i o exception ( " can ' t read unknown type [ " + type + " ] " ) ; } }


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

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


returns whether the argument at the given position is a value literal

boolean is argument literal ( int pos ) ;


returns a copy { @ link default content metadata } with { @ code mutations } applied if { @ code mutations } don ' t change anything , returns this instance

public default content metadata copy with mutations applied ( content metadata mutations mutations ) { map < string , byte [ ] > mutated metadata = apply mutations ( metadata , mutations ) ; if ( is metadata equal ( metadata , mutated metadata ) ) { return this ; } return new default content metadata ( mutated metadata ) ; }


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


tests whether retry policy retries on idempotent operations when encountering i o exception

public void test client retries idempotent op with i o exception succeeds second time ( ) throws exception { configuration conf = new configuration ( ) ; final string key name = " test " ; final key provider key version key version = new k m s client provider k m s key version ( key name , " v 1 " , new byte [ 0 ] ) ; / / setting total failover attempts to conf set int ( common configuration keys public kms client failover max retries key , 10 ) ; k m s client provider p 1 = mock ( k m s client provider class ) ; when ( p 1 get current key ( mockito any string ( ) ) ) then throw ( new i o exception ( " p 1 " ) ) then return ( key version ) ; k m s client provider p 2 = mock ( k m s client provider class ) ; when ( p 2 get current key ( mockito any string ( ) ) ) then throw ( new i o exception ( " p 2 " ) ) ; k m s client provider p 3 = mock ( k m s client provider class ) ; when ( p 3 get current key ( mockito any string ( ) ) ) then throw ( new i o exception ( " p 3 " ) ) ; when ( p 1 get k m s url ( ) ) then return ( " p 1 " ) ; when ( p 2 get k m s url ( ) ) then return ( " p 2 " ) ; when ( p 3 get k m s url ( ) ) then return ( " p 3 " ) ; load balancing k m s client provider kp = new load balancing k m s client provider ( new k m s client provider [ ] { p 1 , p 2 , p 3 } , 0 , conf ) ; key provider key version result = kp get current key ( key name ) ; assert equals ( key version , result ) ; verify ( kp get providers ( ) [ 0 ] , mockito times ( 2 ) ) get current key ( mockito eq ( key name ) ) ; verify ( kp get providers ( ) [ 1 ] , mockito times ( 1 ) ) get current key ( mockito eq ( key name ) ) ; verify ( kp get providers ( ) [ 2 ] , mockito times ( 1 ) ) get current key ( mockito eq ( key name ) ) ; }


release buffer back to buffer manager after invoking this method , the buffer object should not be used and all references should be dropped

public void release buffer ( data buffer buf ) throws i o exception { try { if ( buf is dirty ( ) ) { release dirty buffer ( buf ) ; } else { release clean buffer ( buf ) ; } } catch ( exception e ) { handle corruption exception ( e , " buffer mgr buffer release failed " ) ; } }


determine a media type for the given resource , if possible

public static optional < media type > get media type ( @ nullable resource resource ) { return optional of nullable ( resource ) map ( resource : : get filename ) flat map ( media type factory : : get media type ) ; }


returns all locations that { @ code classloader } and parent loaders load classes and resources from callers can { @ linkplain location info # scan resources scan } individual locations selectively or even in parallel

static immutable set < location info > locations from ( class loader classloader ) { immutable set builder < location info > builder = immutable set builder ( ) ; for ( map entry < file , class loader > entry : get class path entries ( classloader ) entry set ( ) ) { builder add ( new location info ( entry get key ( ) , entry get value ( ) ) ) ; } return builder build ( ) ; }


creates an instance of { @ link to string helper } this is helpful for implementing { @ link object # to string ( ) } specification by example : { @ code returns " class name { } " more objects to string helper ( this ) to string ( ) ; returns " class name { x = 1 } " more objects to string helper ( this ) add ( " x " , 1 ) to string ( ) ; returns " my object { x = 1 } " more objects to string helper ( " my object " ) add ( " x " , 1 ) to string ( ) ; returns " class name { x = 1 , y = foo } " more objects to string helper ( this ) add ( " x " , 1 ) add ( " y " , " foo " ) to string ( ) ; returns " class name { x = 1 } " more objects to string helper ( this ) omit null values ( ) add ( " x " , 1 ) add ( " y " , null ) to string ( ) ; } note that in gwt , class names are often obfuscated

public static to string helper to string helper ( object self ) { return new to string helper ( self get class ( ) get simple name ( ) ) ; }


public version get a p i version ( ) { return api version ; }


public void clear ( ) { tasks clear ( ) ; }


public void write raw ( byte [ ] bytes ) throws i o exception { out write ( bytes ) ; }


public list < integer > get namespace array ( ) { return namespace array ; }


usually a short tag indicating an event , like { @ code cache miss } or { @ code error }

public string value ( ) { return value ; }


returns the client interceptor that facilitates census - based stats reporting

client interceptor get client interceptor ( ) { return client interceptor ; }


called when a mouse button or a finger touch goes down on the actor if true is returned , this listener will have { @ link stage # add touch focus ( event listener , actor , actor , int , int ) touch focus } , so it will receive all touch dragged and touch up events , even those not over this actor , until touch up is received also when true is returned , the event is { @ link event # handle ( ) handled }

public boolean touch down ( input event event , float x , float y , int pointer , int button ) { return false ; }


notifies the master node that the state of a persistent task has changed persistent task implementers shouldn ' t call this method directly and use { @ link allocated persistent task # update persistent task state } instead

void send update state request ( final string task id , final long task allocation i d , final persistent task state task state , final action listener < persistent task < ? > > listener ) { update persistent task status action request request = new update persistent task status action request ( task id , task allocation i d , task state ) ; execute ( request , update persistent task status action instance , listener ) ; }


the bean name of this field retrieving factory bean will be interpreted as " static field " pattern , if neither " target class " nor " target object " nor " target field " have been specified this allows for concise bean definitions with just an idname

public void set bean name ( string bean name ) { this bean name = string utils trim all whitespace ( bean factory utils original bean name ( bean name ) ) ; }


return the type of the current target object the returned type should usually be constant across all target objects

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


evaluate the condition and if not null , return it if it is null , return the other value

public typed value get value internal ( expression state state ) throws evaluation exception { typed value value = this children [ 0 ] get value internal ( state ) ; / / if this check is changed , the generate code method will need changing too if ( value get value ( ) ! = null & & ! " " equals ( value get value ( ) ) ) { return value ; } else { typed value result = this children [ 1 ] get value internal ( state ) ; compute exit type descriptor ( ) ; return result ; } }


creates a bulk request when there is more than one object to store

public http call < void > build ( ) { query string encoder url builder = new query string encoder ( " / bulk " ) ; if ( pipeline ! = null ) url builder add param ( " pipeline " , pipeline ) ; if ( wait for refresh ) url builder add param ( " refresh " , " wait for " ) ; byte buf allocator alloc = request context map current ( request context : : alloc , ( ) - > pooled byte buf allocator default ) ; http call request supplier request = new bulk request supplier ( entries , should add type , request headers of ( http method post , url builder to string ( ) , http header names content type , media type json utf 8 ) , alloc ) ; return http new call ( request , check for errors , tag ) ; }


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


use a { @ linkplain value fetcher } to extract values from doc values

protected final list < ? > fetch from doc values ( mapper service mapper service , mapped field type ft , doc value format format , object source value ) throws i o exception { bi function < mapped field type , supplier < search lookup > , index field data < ? > > field data lookup = ( mft , lookup source ) - > mft fielddata builder ( " test " , ( ) - > { throw new unsupported operation exception ( ) ; } ) build ( new index field data cache none ( ) , new none circuit breaker service ( ) ) ; set once < list < ? > > result = new set once < > ( ) ; with lucene index ( mapper service , iw - > { iw add document ( mapper service document mapper ( ) parse ( source ( b - > b field ( ft name ( ) , source value ) ) ) root doc ( ) ) ; } , iw - > { search lookup lookup = new search lookup ( mapper service : : field type , field data lookup ) ; value fetcher value fetcher = new doc value fetcher ( format , lookup doc ( ) get for field ( ft ) ) ; index searcher searcher = new searcher ( iw ) ; leaf reader context context = searcher get index reader ( ) leaves ( ) get ( 0 ) ; lookup source ( ) set segment and document ( context , 0 ) ; value fetcher set next reader ( context ) ; result set ( value fetcher fetch values ( lookup source ( ) ) ) ; } ) ; return result get ( ) ; }


get the list of u r is the editlog is using for storage

collection < uri > get edit u r is ( ) { return edits dirs ; }


restores a { @ code bucket } from the state included in the provided { @ link bucket state }

static < in , bucket i d > bucket < in , bucket i d > restore ( final int subtask index , final long initial part counter , final bucket writer < in , bucket i d > bucket writer , final rolling policy < in , bucket i d > rolling policy , final bucket state < bucket i d > bucket state , @ nullable final file life cycle listener < bucket i d > file listener , final output file config output file config ) throws i o exception { return new bucket < > ( subtask index , initial part counter , bucket writer , rolling policy , bucket state , file listener , output file config ) ; }


route to a built router function if the given path prefix pattern applies this method can be used to create nested routes , where a group of routes share a common path prefix for instance , the following example creates a nested route with a " user " path predicate , so that get requests for " user " will list users , and post request for " user " will create a new user < pre class = " code " > router function & lt ; server response & gt ; nested route = router functions route ( ) path ( " user " , builder - > builder get ( this : : list users ) post ( this : : create user ) ) build ( ) ;

builder path ( string pattern , consumer < builder > builder consumer ) ;


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

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


calculate the distance between the given two strings according to the levenshtein algorithm

private static int calculate string distance ( string s 1 , string s 2 ) { if ( s 1 is empty ( ) ) { return s 2 length ( ) ; } if ( s 2 is empty ( ) ) { return s 1 length ( ) ; } int [ ] [ ] d = new int [ s 1 length ( ) + 1 ] [ s 2 length ( ) + 1 ] ; for ( int i = 0 ; i < = s 1 length ( ) ; i + + ) { d [ i ] [ 0 ] = i ; } for ( int j = 0 ; j < = s 2 length ( ) ; j + + ) { d [ 0 ] [ j ] = j ; } for ( int i = 1 ; i < = s 1 length ( ) ; i + + ) { char c 1 = s 1 char at ( i - 1 ) ; for ( int j = 1 ; j < = s 2 length ( ) ; j + + ) { int cost ; char c 2 = s 2 char at ( j - 1 ) ; if ( c 1 = = c 2 ) { cost = 0 ; } else { cost = 1 ; } d [ i ] [ j ] = math min ( math min ( d [ i - 1 ] [ j ] + 1 , d [ i ] [ j - 1 ] + 1 ) , d [ i - 1 ] [ j - 1 ] + cost ) ; } } return d [ s 1 length ( ) ] [ s 2 length ( ) ] ; }


called when the { @ link chunk sample stream } has finished being released

void on sample stream released ( chunk sample stream < t > chunk sample stream ) ;


sets the precision levels at which geohash cells neighbours are considered defaults to only considering neighbours at the index - time precision level

public builder set neighbours ( list < integer > neighbours ) { for ( int neighbour : neighbours ) { if ( neighbour < 1 | | neighbour > 12 ) { throw new illegal argument exception ( " neighbour value must be between 1 and 12 " ) ; } } this neighbours = neighbours ; return this ; }


public static boolean is word ( int operand type ) { return ( operand type & word ) ! = 0 ; }


returns the value of the first header with a specified name of this message if there is more than one matching header in the message the first element is returned if there is no matching header in the message < code > null < code > is returned

public string get header ( string name ) { header header = response get first header ( name ) ; if ( header = = null ) { return null ; } return header get value ( ) ; }


the shard number to use when finding the shard to explain

public cluster allocation explain request builder set shard ( int shard ) { request set shard ( shard ) ; return this ; }


gets the { @ link fetch source context } which defines how the source should be fetched

public fetch source context fetch source ( ) { return fetch source context ; }


simple test resource request test hash code , equals and compare

public void test resource request ( ) { resource resource = record factory new record instance ( resource class ) ; priority priority = record factory new record instance ( priority class ) ; resource request original = resource request new instance ( priority , " localhost " , resource , 2 ) ; resource request copy = resource request new instance ( priority , " localhost " , resource , 2 ) ; assert true ( original equals ( copy ) ) ; assert equals ( 0 , original compare to ( copy ) ) ; assert true ( original hash code ( ) = = copy hash code ( ) ) ; copy set num containers ( 1 ) ; assert false ( original equals ( copy ) ) ; assert not same ( 0 , original compare to ( copy ) ) ; assert false ( original hash code ( ) = = copy hash code ( ) ) ; }


returns a mutable view of the underlying bytes for the given { @ code hash code } if it is a byte - based hashcode otherwise it returns { @ link hash code # as bytes } do not mutate this array or else you will break the immutability contract of { @ code hash code }

byte [ ] get bytes internal ( ) { return as bytes ( ) ; }


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


public long get corrupt replica blocks count ( ) { return corrupt replica blocks count ; }


returns the parameter from the last call to { @ link # marked writability ( boolean ) }

boolean marked writability ( ) { return marked writable ; }


creates a new defined data object at the given address

public final data create data ( address address , data type datatype ) throws exception { listing listing = current program get listing ( ) ; data d = listing get defined data at ( address ) ; if ( d ! = null ) { if ( d get data type ( ) is equivalent ( datatype ) ) { return d ; } throw new code unit insertion exception ( " data conflict at address " + address ) ; } return listing create data ( address , datatype ) ; }


register a callback for the { @ link default codec config configuration } applied to default codecs this allows custom codecs to follow general guidelines applied to default ones , such as logging details and limiting the amount of buffered data

void with default codec config ( consumer < default codec config > codecs config consumer ) ;


returns a value mask which is sized based upon the register

public big integer get value mask ( ) { big integer value mask = new big integer ( 1 , get base value mask ( ) ) ; return value mask shift right ( start bit ) ; }


exit a parse tree produced by the { @ code single grouping set } labeled alternative in { @ link sql base parser # grouping element }

void exit single grouping set ( sql base parser single grouping set context ctx ) ;


< t > t new instance ( class < t > cls ) throws instantiation exception ;


loads an x 509 certificate from the classpath resources in srcmainresourcescerts

public static x 5 0 9 certificate load x 5 0 9 cert ( string file name ) throws certificate exception , i o exception { certificate factory cf = certificate factory get instance ( " x 509 " ) ; input stream in = test utils class get resource as stream ( " / certs / " + file name ) ; try { return ( x 5 0 9 certificate ) cf generate certificate ( in ) ; } finally { in close ( ) ; } }


post storeorder : place an order for a pet

default response entity < order > place order ( @ api param ( value = " order placed for purchasing the pet " , required = true ) @ valid @ request body order body ) { 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 = " { \ " pet id \ " : 6 , \ " quantity \ " : 1 , \ " id \ " : 0 , \ " ship date \ " : \ " 2000 - 01 - 23t04 : 56 : 07 000 + 00 : 00 \ " , \ " complete \ " : false , \ " status \ " : \ " placed \ " } " ; api util set example response ( request , " application / json " , example string ) ; break ; } if ( media type is compatible with ( media type value of ( " application / xml " ) ) ) { string example string = " < order > < id > 123456789 < / id > < pet id > 123456789 < / pet id > < quantity > 123 < / quantity > < ship date > 2000 - 01 - 23t04 : 56 : 07 000z < / ship date > < status > aeiou < / status > < complete > true < / complete > < / order > " ; api util set example response ( request , " application / xml " , example string ) ; break ; } } } ) ; return new response entity < > ( http status not implemented ) ; }


@ test public void test empty blocking ( ) throws exception { test empty blocking ( 0 ) ; test empty blocking ( 100 ) ; }


hook method called by the blaze command dispatcher prior to the dispatch of each command

void before command ( command environment env , common command options options ) { if ( options memory profile path ! = null ) { path memory profile path = env get working directory ( ) get relative ( options memory profile path ) ; memory profiler instance ( ) set stable memory parameters ( options memory profile stable heap parameters ) ; try { memory profiler instance ( ) start ( memory profile path get output stream ( ) ) ; } catch ( i o exception e ) { env get reporter ( ) handle ( event error ( " error while creating memory profile file : " + e get message ( ) ) ) ; } } }


retrieves and removes the head of the queue represented by this deque ( in other words , the first element of this deque ) , or returns < tt > null < tt > if this deque is empty this method is equivalent to { @ link # poll first }

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


enter a parse tree produced by the { @ code subquery expression } labeled alternative in { @ link sql base parser # primary expression }

void enter subquery expression ( sql base parser subquery expression context ctx ) ;


returns the product of { @ code a } and { @ code b } , provided it does not overflow

public static int checked multiply ( int a , int b ) { long result = ( long ) a * b ; check no overflow ( result = = ( int ) result , " checked multiply " , a , b ) ; return ( int ) result ; }


a callback called after the result is successfully computed by { @ link # call ( ) } in our implementation this method is called in context of background thread but in some variants , such as android where only ui thread can change the state of ui widgets , this method is called in context of ui thread


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


sets the < code > array item < code > property

public type holder example array item ( list < integer > array item ) { this array item = array item ; return this ; }


public void set conf ( configuration conf ) { this conf = conf ; if ( this next interceptor ! = null ) { this next interceptor set conf ( conf ) ; } }


tests to make sure the returned addresses are correct in case of federation of setup

public void test federation ( ) throws exception { final int ns count = 10 ; hdfs configuration conf = new hdfs configuration ( false ) ; / / test to ensure namenode , backup and secondary namenode addresses are / / returned from federation configuration returned namenode addresses are / / based on service rpc address and not regular rpc address setup name services ( conf , ns count ) ; string [ ] nn addresses = setup address ( conf , dfs namenode service rpc address key , ns count , 1000 ) ; setup address ( conf , dfs namenode rpc address key , ns count , 1500 ) ; setup static host resolution ( ns count , " nn " ) ; string [ ] backup addresses = setup address ( conf , dfs namenode backup address key , ns count , 2000 ) ; string [ ] secondary addresses = setup address ( conf , dfs namenode secondary http address key , ns count , 3000 ) ; verify addresses ( conf , test type namenode , false , nn addresses ) ; verify addresses ( conf , test type backup , false , backup addresses ) ; verify addresses ( conf , test type secondary , false , secondary addresses ) ; verify addresses ( conf , test type nnrpcaddresses , true , nn addresses ) ; / / test to ensure namenode , backup , secondary namenode addresses and / / namenode rpc addresses are returned from federation configuration / / returned namenode addresses are based on regular rpc address / / in the absence of service rpc address conf = new hdfs configuration ( false ) ; setup name services ( conf , ns count ) ; nn addresses = setup address ( conf , dfs namenode rpc address key , ns count , 1000 ) ; backup addresses = setup address ( conf , dfs namenode backup address key , ns count , 2000 ) ; secondary addresses = setup address ( conf , dfs namenode secondary http address key , ns count , 3000 ) ; verify addresses ( conf , test type namenode , false , nn addresses ) ; verify addresses ( conf , test type backup , false , backup addresses ) ; verify addresses ( conf , test type secondary , false , secondary addresses ) ; verify addresses ( conf , test type nnrpcaddresses , true , nn addresses ) ; }


model tests for additional properties class

public void test additional properties class ( ) { / / todo : test additional properties class }


unpacks an { @ link execution exception } and returns its cause otherwise the given throwable is returned

public static throwable strip execution exception ( throwable throwable ) { return strip exception ( throwable , execution exception class ) ; }


return a local map spill index file created earlier

public path get spill index file ( int spill number ) throws i o exception { string path = string format ( spill index file format string , tasktracker output , spill number ) ; return l dir alloc get local path to read ( path , conf ) ; }


determines an index ' s current state , with respect to whether its mappings can be updated

upgrade status get upgrade status ( cluster state cluster state , system index descriptor descriptor ) { final state index state = calculate index state ( cluster state , descriptor ) ; final string index description = " [ " + descriptor get primary index ( ) + " ] ( alias [ " + descriptor get alias name ( ) + " ] ) " ; / / the messages below will be logged on every cluster state update , which is why even in the index closed / red / / cases , the log levels are debug if ( index state index state = = index metadata state close ) { logger debug ( " index { } is closed this is likely to prevent some features from functioning correctly " , index description ) ; return upgrade status closed ; } if ( index state index health = = cluster health status red ) { logger debug ( " index { } health status is red , any pending mapping upgrades will wait until this changes " , index description ) ; return upgrade status unhealthy ; } if ( index state is index up to date = = false ) { logger debug ( " index { } is not on the current version features relying " + " on the index will not be available until the index is upgraded " , index description ) ; return upgrade status needs upgrade ; } else if ( index state mapping up to date ) { logger trace ( " index { } is up - to - date , no action required " , index description ) ; return upgrade status up to date ; } else { logger info ( " index { } mappings are not up - to - date and will be updated " , index description ) ; return upgrade status needs mappings update ; } }


more complex validations with how { @ link transform config # get destination ( ) } and { @ link transform config # get source ( ) } relate are done in the transport handler

public action request validation exception validate ( ) { action request validation exception validation exception = null ; validation exception = config validate ( validation exception ) ; validation exception = source dest validator validate request ( validation exception , config get destination ( ) get index ( ) ) ; if ( transform strings is valid id ( config get id ( ) ) = = false ) { validation exception = add validation error ( transform messages get message ( transform messages invalid id , transform field id get preferred name ( ) , config get id ( ) ) , validation exception ) ; } if ( transform strings has valid length for id ( config get id ( ) ) = = false ) { validation exception = add validation error ( transform messages get message ( transform messages id too long , transform strings id length limit ) , validation exception ) ; } time value frequency = config get frequency ( ) ; if ( frequency ! = null ) { if ( frequency compare to ( min frequency ) < 0 ) { validation exception = add validation error ( " minimum permitted [ " + transform field frequency + " ] is [ " + min frequency get string rep ( ) + " ] " , validation exception ) ; } else if ( frequency compare to ( max frequency ) > 0 ) { validation exception = add validation error ( " highest permitted [ " + transform field frequency + " ] is [ " + max frequency get string rep ( ) + " ] " , validation exception ) ; } } return validation exception ; }


private void generate choice animate ( final view view , final int position ) { view compat animate ( view ) translation x ( 0 ) set duration ( animation time ) / * set listener ( new animator listener adapter ( ) { @ override public void on animation end ( animator animation ) { swipe list view reset scrolling ( ) ; reset cell ( ) ; } } ) ; * / set listener ( new default animation ( ) { @ override public void on animation end ( view view ) { swipe list view reset scrolling ( ) ; reset cell ( ) ; } } ) ; }


create an instance of { @ link consumed } with provided processor name

public static < k , v > consumed < k , v > as ( final string processor name ) { return new consumed < > ( null , null , null , null , processor name ) ; }


returns < code > null < code > if the datafeed is not running on this node

private string get job id if datafeed running on this node ( transport start datafeed action datafeed task task ) { holder holder = running datafeeds on this node get ( task get allocation id ( ) ) ; if ( holder = = null ) { return null ; } return holder get job id ( ) ; }


creates { @ link ima sdk settings } for configuring the ima sdk

ima sdk settings create ima sdk settings ( ) ;


build aws credentials to talk to the sts also where checks for the session tests being disabled are implemented

public static a w s credentials provider build aws credentials provider ( final configuration conf ) throws i o exception { assume session tests enabled ( conf ) ; s 3x login helper login login = s 3 a utils get a w s access keys ( uri create ( " s 3a : / / foobar " ) , conf ) ; if ( ! login has login ( ) ) { skip ( " test s t s disabled because aws credentials not configured " ) ; } return new simple a w s credentials provider ( login ) ; }


returns the command line specification for this link , included any required linkstamp compilation steps the command line may refer to a params file

public final list < string > get command line ( @ nullable artifact expander expander ) throws command line expansion exception { return link command line get command line ( expander ) ; }


this implementation returns false to cause a further invocation of do begin despite an already existing transaction jta implementations might support nested transactions via further { @ code user transaction begin ( ) } invocations , but never support savepoints

protected boolean use savepoint for nested transaction ( ) { return false ; }


read a double - precision 64 - bit format ieee 754 value

public static double read double ( byte buffer buffer ) { return buffer get double ( ) ; }


this test verifies the new support for compiling mathematical expressions with different operand types

public void compiling mathematical expressions with different operand types ( ) throws exception { number holder nh = new number holder ( ) ; expression = parser parse expression ( " ( t ( integer ) value of ( payload ) double value ( ) ) / 18d " ) ; object o = expression get value ( nh ) ; assert that ( o ) is equal to ( 2d ) ; system out println ( " performance check for sp e l expression : ' ( t ( integer ) value of ( payload ) double value ( ) ) / 18d ' " ) ; long stime = system current time millis ( ) ; for ( int i = 0 ; i < 1000000 ; i + + ) { o = expression get value ( nh ) ; } system out println ( " one million iterations : " + ( system current time millis ( ) - stime ) + " ms " ) ; stime = system current time millis ( ) ; for ( int i = 0 ; i < 1000000 ; i + + ) { o = expression get value ( nh ) ; } system out println ( " one million iterations : " + ( system current time millis ( ) - stime ) + " ms " ) ; stime = system current time millis ( ) ; for ( int i = 0 ; i < 1000000 ; i + + ) { o = expression get value ( nh ) ; } system out println ( " one million iterations : " + ( system current time millis ( ) - stime ) + " ms " ) ; compile ( expression ) ; system out println ( " now compiled : " ) ; o = expression get value ( nh ) ; assert that ( o ) is equal to ( 2d ) ; stime = system current time millis ( ) ; for ( int i = 0 ; i < 1000000 ; i + + ) { o = expression get value ( nh ) ; } system out println ( " one million iterations : " + ( system current time millis ( ) - stime ) + " ms " ) ; stime = system current time millis ( ) ; for ( int i = 0 ; i < 1000000 ; i + + ) { o = expression get value ( nh ) ; } system out println ( " one million iterations : " + ( system current time millis ( ) - stime ) + " ms " ) ; stime = system current time millis ( ) ; for ( int i = 0 ; i < 1000000 ; i + + ) { o = expression get value ( nh ) ; } system out println ( " one million iterations : " + ( system current time millis ( ) - stime ) + " ms " ) ; expression = parser parse expression ( " payload / 18d " ) ; o = expression get value ( nh ) ; assert that ( o ) is equal to ( 2d ) ; system out println ( " performance check for sp e l expression : ' payload / 18d ' " ) ; stime = system current time millis ( ) ; for ( int i = 0 ; i < 1000000 ; i + + ) { o = expression get value ( nh ) ; } system out println ( " one million iterations : " + ( system current time millis ( ) - stime ) + " ms " ) ; stime = system current time millis ( ) ; for ( int i = 0 ; i < 1000000 ; i + + ) { o = expression get value ( nh ) ; } system out println ( " one million iterations : " + ( system current time millis ( ) - stime ) + " ms " ) ; stime = system current time millis ( ) ; for ( int i = 0 ; i < 1000000 ; i + + ) { o = expression get value ( nh ) ; } system out println ( " one million iterations : " + ( system current time millis ( ) - stime ) + " ms " ) ; compile ( expression ) ; system out println ( " now compiled : " ) ; o = expression get value ( nh ) ; assert that ( o ) is equal to ( 2d ) ; stime = system current time millis ( ) ; for ( int i = 0 ; i < 1000000 ; i + + ) { o = expression get value ( nh ) ; } system out println ( " one million iterations : " + ( system current time millis ( ) - stime ) + " ms " ) ; stime = system current time millis ( ) ; for ( int i = 0 ; i < 1000000 ; i + + ) { o = expression get value ( nh ) ; } system out println ( " one million iterations : " + ( system current time millis ( ) - stime ) + " ms " ) ; stime = system current time millis ( ) ; for ( int i = 0 ; i < 1000000 ; i + + ) { o = expression get value ( nh ) ; } system out println ( " one million iterations : " + ( system current time millis ( ) - stime ) + " ms " ) ; }


returns current { @ link url request } may be null if the data source is not opened

protected url request get current url request ( ) { return current url request ; }


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


test releasing a node which has a long path to the terminal node ( the node without an out - going edge )

public void test release nodes with long path ( ) throws exception { shared buffer < event > shared buffer = test shared buffer create test buffer ( event create type serializer ( ) ) ; final int number events = 100000 ; event [ ] events = new event [ number events ] ; event id [ ] event ids = new event id [ number events ] ; node id [ ] node ids = new node id [ number events ] ; final long timestamp = 1l ; for ( int i = 0 ; i < number events ; i + + ) { events [ i ] = new event ( i + 1 , " e " + ( i + 1 ) , i ) ; event ids [ i ] = shared buffer register event ( events [ i ] , timestamp ) ; } try ( shared buffer accessor < event > shared buffer accessor = shared buffer get accessor ( ) ) { for ( int i = 0 ; i < number events ; i + + ) { node id prev id = i = = 0 ? null : node ids [ i - 1 ] ; node ids [ i ] = shared buffer accessor put ( " n " + i , event ids [ i ] , prev id , dewey number from string ( " 1 0 " ) ) ; } node id last node = node ids [ number events - 1 ] ; shared buffer accessor release node ( last node ) ; for ( int i = 0 ; i < number events ; i + + ) { shared buffer accessor release event ( event ids [ i ] ) ; } } assert true ( shared buffer is empty ( ) ) ; }


public < response extends action response > void store result ( task task , exception error , action listener < response > listener ) { discovery node local node = last discovery nodes get local node ( ) ; if ( local node = = null ) { / / too early to store anything , shouldn ' t really be here - just pass the error along listener on failure ( error ) ; return ; } final task result task result ; try { task result = task result ( local node , error ) ; } catch ( i o exception ex ) { logger warn ( ( ) - > new parameterized message ( " couldn ' t store error { } " , exceptions helper stack trace ( error ) ) , ex ) ; listener on failure ( ex ) ; return ; } task results service store result ( task result , new action listener < void > ( ) { @ override public void on response ( void a void ) { listener on failure ( error ) ; } @ override public void on failure ( exception e ) { logger warn ( ( ) - > new parameterized message ( " couldn ' t store error { } " , exceptions helper stack trace ( error ) ) , e ) ; listener on failure ( e ) ; } } ) ; }


public m t config clone ( ) { return xml serializer util create copy ( this ) ; }


called upon the establishment of a new client connection

server transport listener transport created ( server transport transport ) ;


test { @ link d f s util # get secondary name service id ( configuration ) } to ensure nameservice id for backup node is determined based on matching the address with local node ' s address

public void get secondary name service id ( ) { configuration conf = setup address ( dfs namenode secondary http address key ) ; assert equals ( " nn 1 " , d f s util get secondary name service id ( conf ) ) ; }


public result build ( ) { check state ( config ! = null , " config is not set " ) ; return new result ( status ok , config , interceptor ) ; }


specify a custom { @ link task decorator } to be applied to any { @ link runnable } about to be executed note that such a decorator is not necessarily being applied to the user - supplied { @ code runnable } { @ code callable } but rather to the actual execution callback ( which may be a wrapper around the user - supplied task ) the primary use case is to set some execution context around the task ' s invocation , or to provide some monitoringstatistics for task execution < b > note : < b > exception handling in { @ code task decorator } implementations is limited to plain { @ code runnable } execution via { @ code execute } calls in case of { @ code # submit } calls , the exposed { @ code runnable } will be a { @ code future task } which does not propagate any exceptions ; you might have to cast it and call { @ code future # get } to evaluate exceptions

public void set task decorator ( task decorator task decorator ) { this task decorator = task decorator ; }


< code > required string message = 1 ; < code >

public string get message ( ) { object ref = message ; if ( ! ( ref instanceof string ) ) { string s = ( ( com google protobuf byte string ) ref ) to string utf 8 ( ) ; message = s ; return s ; } else { return ( string ) ref ; } }


post fakeouternumber test serialization of outer number types

public response entity < big decimal > fake outer number serialize ( @ api param ( value = " input number as post body " ) @ valid @ request body ( required = false ) big decimal body ) { return delegate fake outer number serialize ( body ) ; }


public static int get app uid ( string pkg name ) { try { return utils get app ( ) get package manager ( ) get application info ( pkg name , 0 ) uid ; } catch ( exception e ) { e print stack trace ( ) ; return - 1 ; } }


this method is implemented to invoke the simpler map row template method , ignoring parameters

protected final t map row ( result set rs , int row num , @ nullable object [ ] parameters , @ nullable map < ? , ? > context ) throws s q l exception { return map row ( rs , row num ) ; }


guaranteed to throw an exception and leave the map unmodified

public void put all ( map < ? extends type token < ? extends b > , ? extends b > map ) { throw new unsupported operation exception ( ) ; }


returns a string representation of the enclosed { @ link inet socket address }

public string get address ( ) { return network address format ( address get address ( ) ) ; }


finds the singular tool action by the given name if more than one action exists with that name , then an exception is thrown if you want more than one matching action , the call { @ link # get actions by name ( tool , string ) } instead < p > note : more specific test case subclasses provide other methods for finding actions when you have an owner name ( which is usually the plugin name )

public static docking action if get action ( tool tool , string name ) { set < docking action if > actions = get actions by name ( tool , name ) ; if ( actions is empty ( ) ) { return null ; } if ( actions size ( ) > 1 ) { throw new assertion failed error ( " found more than one action for name ' " + name + " ' " ) ; } return collection utils any ( actions ) ; }


sets whether loaded image will be cached on disk

public builder cache on disk ( boolean cache on disk ) { this cache on disk = cache on disk ; return this ; }


create a new block reference and add it to the queue

private static void queue dest reference ( linked list < code block reference impl > block ref queue , code block dest block , address to addr , address from addr , flow type flow type , task monitor monitor ) { if ( block ref queue = = null ) return ; block ref queue add ( new code block reference impl ( null , dest block , flow type , to addr , from addr ) ) ; }


get the displacement of the springs current value from its rest value

public double get current displacement distance ( ) { return get displacement distance for state ( m current state ) ; }


notification that the program is closed remove the root category for the program from the provider

public void program closed ( ) { program archive get data type manager ( ) remove data type manager listener ( listener delegate ) ; data type indexer remove data type manager ( program archive get data type manager ( ) ) ; open archives remove ( program archive ) ; fire archive closed ( program archive ) ; program archive = null ; }


public void delete pet test ( ) { long pet id = null ; string api key = null ; api delete pet ( pet id , api key ) ; / / todo : test validations }


indicates whether the record metadata includes the timestamp

public boolean has timestamp ( ) { return this timestamp ! = record batch no timestamp ; }


converts an internal method description into an external full method description

public static string external full method description ( string internal class name , int access flags , string internal method name , string internal method descriptor ) { return external method access flags ( access flags ) + external method return type and name ( internal class name , internal method name , internal method descriptor ) + java constants method arguments open + external method arguments ( internal method descriptor ) + java constants method arguments close ; }


notify the storage movement attempt finished block

public void notify reported block ( datanode info reported dn , storage type type , block reported block ) { synchronized ( scheduled blk locs ) { if ( scheduled blk locs size ( ) < = 0 ) { return ; } matches reported block ( reported dn , type , reported block ) ; } }


test num get block locations metric test initiates and performs file operations ( create , read , close , open file ) which results in metrics changes these metrics changes are updated and tested for correctness create file operation does not increment num get block location one read file operation increments num get block location by 1

public void test get block location metric ( ) throws exception { path file 1 path = new path ( test root dir path , " file 1 dat " ) ; / / when cluster starts first time there are no file ( read , create , open ) / / operations so metric get block locations should be 0 assert counter ( " get block locations " , 0l , get metrics ( nn metrics ) ) ; / / perform create file operation create file ( file 1 path , 100 , ( short ) 2 ) ; / / create file does not change num get block locations metric / / expect num get block locations = 0 for previous and current interval assert counter ( " get block locations " , 0l , get metrics ( nn metrics ) ) ; / / open and read file operation increments get block locations / / perform read file operation on earlier created file read file ( fs , file 1 path ) ; / / verify read file operation has incremented num get block locations by 1 assert counter ( " get block locations " , 1l , get metrics ( nn metrics ) ) ; / / opening and reading file twice will increment num get block locations by 2 read file ( fs , file 1 path ) ; read file ( fs , file 1 path ) ; assert counter ( " get block locations " , 3l , get metrics ( nn metrics ) ) ; }


returns the largest integer less than or equal to the specified float this method will only properly floor floats from - ( 2 ^ 14 ) to ( float max value - 2 ^ 14 )

static public int floor ( float value ) { return ( int ) ( value + big enough floor ) - big enough int ; }


sets the aliases that will be associated with the index when it gets created

public put index template request builder set aliases ( x content builder source ) { request aliases ( source ) ; return this ; }


rolls the edit log on the active name node

long roll edits ( ) throws i o exception { check open ( ) ; try ( trace scope ignored = tracer new scope ( " roll edits " ) ) { return namenode roll edits ( ) ; } catch ( remote exception re ) { throw re unwrap remote exception ( access control exception class ) ; } }


releases an allocated or acquired workspace

private synchronized void release ( @ non null file path p ) { entry old = in use get ( p get remote ( ) ) ; if ( old = = null ) throw new assertion error ( " releasing unallocated workspace " + p ) ; if ( logger is loggable ( level fine ) ) { logger log ( level fine , " releasing " + p + " with lock count " + old lock count , new throwable ( " from " + this ) ) ; } old lock count - - ; if ( old lock count = = 0 ) in use remove ( p get remote ( ) ) ; notify all ( ) ; }


gets execution type for specified class type

public static execution type get execution type ( class < ? > type ) { if ( future class is assignable from ( type ) ) { return execution type asynchronous ; } else if ( is rx type ( type ) ) { return execution type observable ; } else { return execution type synchronous ; } }


public string get index ( ) { return this index ; }


query documents whose timestamp is within the given time range

public batched results iterator < t > time range ( long start epoch ms , long end epoch ms ) { filter builder time range ( result timestamp get preferred name ( ) , start epoch ms , end epoch ms ) ; return this ; }


put faketest - query - paramters to test the collection format in query parameters

public response entity < void > test query parameter collection format ( @ not null @ api param ( value = " " , required = true ) @ valid @ request param ( value = " pipe " , required = true ) list < string > pipe , @ not null @ api param ( value = " " , required = true ) @ valid @ request param ( value = " ioutil " , required = true ) list < string > ioutil , @ not null @ api param ( value = " " , required = true ) @ valid @ request param ( value = " http " , required = true ) list < string > http , @ not null @ api param ( value = " " , required = true ) @ valid @ request param ( value = " url " , required = true ) list < string > url , @ not null @ api param ( value = " " , required = true ) @ valid @ request param ( value = " context " , required = true ) list < string > context ) { return new response entity < > ( http status not implemented ) ; }


obtain a new " blank " resolved sleigh constructor record

public static assembly resolved constructor nop ( string description , list < ? extends assembly resolution > sel ) { return resolved ( assembly pattern block nop ( ) , assembly pattern block nop ( ) , description , sel ) ; }


public void execute ( task task , int delay ) { task add task listener ( new task busy listener ( ) ) ; new task launcher ( task , get tool frame ( ) , delay ) ; }


test deleting snapshots in a more complicated scenario : need to combine snapshot diffs , but no need to handle diffs distributed in a dir tree

public void test combine snapshot diff 1 ( ) throws exception { test combine snapshot diff impl ( sub , " " , 1 ) ; }


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

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


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


add a new sink that forwards records from upstream parent processor andor source nodes to the named kafka topic , using the supplied partitioner the sink will use the { @ link streams config # default key serde class config default key serializer } and { @ link streams config # default value serde class config default value serializer } specified in the { @ link streams config stream configuration } the sink will also use the specified { @ link stream partitioner } to determine how records are distributed among the named kafka topic ' s partitions such control is often useful with topologies that use { @ link # add state store ( store builder , string ) state stores } in its processors in most other cases , however , a partitioner needs not be specified and kafka will automatically distribute records among partitions using kafka ' s default partitioning logic

public synchronized < k , v > topology add sink ( final string name , final string topic , final stream partitioner < ? super k , ? super v > partitioner , final string parent names ) { internal topology builder add sink ( name , topic , null , null , partitioner , parent names ) ; return this ; }


gets the name - and - type of the innermost enclosing method , if any

public cst nat get method ( ) { return method ; }


public void upload file with required file ( long pet id , async file required file , string additional metadata , api client auth info auth info , handler < async result < model api response > > result handler ) { object local var body = null ; / / verify the required parameter ' pet id ' is set if ( pet id = = null ) { result handler handle ( api exception fail ( 400 , " missing the required parameter ' pet id ' when calling upload file with required file " ) ) ; return ; } / / verify the required parameter ' required file ' is set if ( required file = = null ) { result handler handle ( api exception fail ( 400 , " missing the required parameter ' required file ' when calling upload file with required file " ) ) ; return ; } / / create path and map variables string local var path = " / fake / { pet id } / upload image with required file " replace all ( " \ \ { " + " pet id " + " \ \ } " , encode parameter ( pet id to string ( ) ) ) ; / / query params list < pair > local var query params = new array list < > ( ) ; / / header params multi map local var header params = multi map case insensitive multi map ( ) ; / / cookie params multi map local var cookie params = multi map case insensitive multi map ( ) ; / / form params / / todo : sending files within multipart / form - data is not supported yet ( because of vertx web - client ) map < string , object > local var form params = new hash map < > ( ) ; if ( additional metadata ! = null ) local var form params put ( " additional metadata " , additional metadata ) ; if ( required file ! = null ) local var form params put ( " required file " , required file ) ; string [ ] local var accepts = { " application / json " } ; string [ ] local var content types = { " multipart / form - data " } ; string [ ] local var auth names = new string [ ] { " petstore auth " } ; type reference < model api response > local var return type = new type reference < model api response > ( ) { } ; api client invoke a p i ( local var path , " post " , local var query params , local var body , local var header params , local var cookie params , local var form params , local var accepts , local var content types , local var auth names , auth info , local var return type , result handler ) ; }


optional : default value is ( string ) null

public test many types view model nullable string value ( @ nullable string nullable string value ) { on mutation ( ) ; this nullable string value string = nullable string value ; return this ; }


returns true if this is a primitive array a primitive array is an array whose elements are of primitive type

public boolean is primitive array ( ) { return is primitive array ; }