test the computation and representation of diff between snapshots

public void test diff report ( ) throws exception { cluster get namesystem ( ) get snapshot manager ( ) set allow nested snapshots ( true ) ; path subsub 1 = new path ( sub 1 , " subsub 1 " ) ; path subsubsub 1 = new path ( subsub 1 , " subsubsub 1 " ) ; hdfs mkdirs ( subsubsub 1 ) ; modify and create snapshot ( sub 1 , new path [ ] { sub 1 , subsubsub 1 } ) ; modify and create snapshot ( subsubsub 1 , new path [ ] { sub 1 , subsubsub 1 } ) ; final string invalid name = " invalid " ; try { hdfs get snapshot diff report ( sub 1 , invalid name , invalid name ) ; fail ( " expect exception when providing invalid snapshot name " + " for diff report " ) ; } catch ( i o exception e ) { generic test utils assert exception contains ( " cannot find the snapshot of directory " + sub 1 + " with name " + invalid name , e ) ; } / / diff between the same snapshot snapshot diff report report = hdfs get snapshot diff report ( sub 1 , " s 0 " , " s 0 " ) ; log info ( report to string ( ) ) ; assert equals ( 0 , report get diff list ( ) size ( ) ) ; report = hdfs get snapshot diff report ( sub 1 , " " , " " ) ; log info ( report to string ( ) ) ; assert equals ( 0 , report get diff list ( ) size ( ) ) ; try { report = hdfs get snapshot diff report ( subsubsub 1 , null , " s 2 " ) ; fail ( " expect exception when providing null from snapshot " ) ; } catch ( illegal argument exception e ) { generic test utils assert exception contains ( " null from snapshot " , e ) ; } report = hdfs get snapshot diff report ( subsubsub 1 , " s 0 " , " s 2 " ) ; log info ( report to string ( ) ) ; assert equals ( 0 , report get diff list ( ) size ( ) ) ; / / test path with scheme also works report = hdfs get snapshot diff report ( hdfs make qualified ( subsubsub 1 ) , " s 0 " , " s 2 " ) ; log info ( report to string ( ) ) ; assert equals ( 0 , report get diff list ( ) size ( ) ) ; verify diff report ( sub 1 , " s 0 " , " s 2 " , new diff report entry ( diff type modify , d f s util string 2 bytes ( " " ) ) , new diff report entry ( diff type create , d f s util string 2 bytes ( " file 1 5 " ) ) , new diff report entry ( diff type delete , d f s util string 2 bytes ( " file 1 2 " ) ) , new diff report entry ( diff type delete , d f s util string 2 bytes ( " file 1 1 " ) ) , new diff report entry ( diff type create , d f s util string 2 bytes ( " file 1 1 " ) ) , new diff report entry ( diff type modify , d f s util string 2 bytes ( " file 1 3 " ) ) , new diff report entry ( diff type delete , d f s util string 2 bytes ( " link 1 3 " ) ) , new diff report entry ( diff type create , d f s util string 2 bytes ( " link 1 3 " ) ) ) ; verify diff report ( sub 1 , " s 0 " , " s 5 " , new diff report entry ( diff type modify , d f s util string 2 bytes ( " " ) ) , new diff report entry ( diff type create , d f s util string 2 bytes ( " file 1 5 " ) ) , new diff report entry ( diff type delete , d f s util string 2 bytes ( " file 1 2 " ) ) , new diff report entry ( diff type modify , d f s util string 2 bytes ( " file 1 0 " ) ) , new diff report entry ( diff type delete , d f s util string 2 bytes ( " file 1 1 " ) ) , new diff report entry ( diff type create , d f s util string 2 bytes ( " file 1 1 " ) ) , new diff report entry ( diff type modify , d f s util string 2 bytes ( " file 1 3 " ) ) , new diff report entry ( diff type delete , d f s util string 2 bytes ( " link 1 3 " ) ) , new diff report entry ( diff type create , d f s util string 2 bytes ( " link 1 3 " ) ) , new diff report entry ( diff type modify , d f s util string 2 bytes ( " subsub 1 / subsubsub 1 " ) ) , new diff report entry ( diff type create , d f s util string 2 bytes ( " subsub 1 / subsubsub 1 / file 1 0 " ) ) , new diff report entry ( diff type create , d f s util string 2 bytes ( " subsub 1 / subsubsub 1 / file 1 1 " ) ) , new diff report entry ( diff type create , d f s util string 2 bytes ( " subsub 1 / subsubsub 1 / file 1 3 " ) ) , new diff report entry ( diff type create , d f s util string 2 bytes ( " subsub 1 / subsubsub 1 / link 1 3 " ) ) , new diff report entry ( diff type create , d f s util string 2 bytes ( " subsub 1 / subsubsub 1 / file 1 5 " ) ) ) ; verify diff report ( sub 1 , " s 2 " , " s 5 " , new diff report entry ( diff type modify , d f s util string 2 bytes ( " file 1 0 " ) ) , new diff report entry ( diff type modify , d f s util string 2 bytes ( " subsub 1 / subsubsub 1 " ) ) , new diff report entry ( diff type create , d f s util string 2 bytes ( " subsub 1 / subsubsub 1 / file 1 0 " ) ) , new diff report entry ( diff type create , d f s util string 2 bytes ( " subsub 1 / subsubsub 1 / file 1 1 " ) ) , new diff report entry ( diff type create , d f s util string 2 bytes ( " subsub 1 / subsubsub 1 / file 1 3 " ) ) , new diff report entry ( diff type create , d f s util string 2 bytes ( " subsub 1 / subsubsub 1 / link 1 3 " ) ) , new diff report entry ( diff type create , d f s util string 2 bytes ( " subsub 1 / subsubsub 1 / file 1 5 " ) ) ) ; verify diff report ( sub 1 , " s 3 " , " " , new diff report entry ( diff type modify , d f s util string 2 bytes ( " subsub 1 / subsubsub 1 " ) ) , new diff report entry ( diff type create , d f s util string 2 bytes ( " subsub 1 / subsubsub 1 / file 1 5 " ) ) , new diff report entry ( diff type delete , d f s util string 2 bytes ( " subsub 1 / subsubsub 1 / file 1 2 " ) ) , new diff report entry ( diff type modify , d f s util string 2 bytes ( " subsub 1 / subsubsub 1 / file 1 0 " ) ) , new diff report entry ( diff type delete , d f s util string 2 bytes ( " subsub 1 / subsubsub 1 / file 1 1 " ) ) , new diff report entry ( diff type create , d f s util string 2 bytes ( " subsub 1 / subsubsub 1 / file 1 1 " ) ) , new diff report entry ( diff type modify , d f s util string 2 bytes ( " subsub 1 / subsubsub 1 / file 1 3 " ) ) , new diff report entry ( diff type create , d f s util string 2 bytes ( " subsub 1 / subsubsub 1 / link 1 3 " ) ) , new diff report entry ( diff type delete , d f s util string 2 bytes ( " subsub 1 / subsubsub 1 / link 1 3 " ) ) ) ; }


build an automaton matching a wildcard pattern , ascii case insensitive

public static automaton query case insensitive wildcard query ( term wildcardquery ) { return new automaton query ( wildcardquery , to case insensitive wildcard automaton ( wildcardquery , integer max value ) ) ; }


gets the original query score mode the default is { @ code total }

public query rescore mode get score mode ( ) { return this score mode ; }


public string get status ( ) { if ( status = = null ) { return null ; } return status value ( ) ; }


returns the underlying short buffer if you modify the buffer contents they wil be uploaded on the call to { @ link # bind ( ) } if you need immediate uploading use { @ link # set indices ( short [ ] , int , int ) }

public short buffer get buffer ( ) { is dirty = true ; return buffer ; }


performs markup on the return flow guard verify stack pointer function , if it exists

private static void markup rfg default stack pointer function ( load config directory lcd , boolean is 6 4bit , address space space , memory mem , symbol table symbol table ) { if ( lcd get rfg verify stack pointer function pointer ( ) = = 0 ) { return ; } try { address function pointer addr = space get address ( lcd get rfg verify stack pointer function pointer ( ) ) ; address function addr = space get address ( is 6 4bit ? mem get long ( function pointer addr ) : mem get int ( function pointer addr ) ) ; symbol table create label ( function addr , " guard ss verify sp default " , source type imported ) ; } catch ( memory access exception | address out of bounds exception | invalid input exception e ) { msg warn ( control flow guard class , " unable to label return flow guard verify stack pointer function " , e ) ; } }


creates the 101 switching protocols response message

private full http response create upgrade response ( char sequence upgrade protocol ) { default full http response res = new default full http response ( http 1 1 , switching protocols , unpooled empty buffer , validate headers ) ; res headers ( ) add ( http header names connection , http header values upgrade ) ; res headers ( ) add ( http header names upgrade , upgrade protocol ) ; return res ; }


returns whether raw types are allowed everywhere

boolean is allow raw globally ( ) { return allow raw globally ! = null & & allow raw globally ; }


gets the number of words of parameters required by this method ' s descriptor since instances of this class have no way to know if they will be used in a { @ code static } or instance context , one has to indicate this explicitly as an argument this method is just a convenient shorthand for { @ code get prototype ( ) get parameter types ( ) get word count ( ) } , plus { @ code 1 } if the method is to be treated as an instance method

public final int get parameter word count ( boolean is static ) { return get prototype ( is static ) get parameter types ( ) get word count ( ) ; }


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


tests that custom error messages are displayed for non - selectable options

public void nonselectable custom message option ( ) throws exception { check error ( " foo " , " badoption " , " option ' nonselectable custom message option ' cannot be used in a config setting " + " for very important reasons " , " config setting ( " , " name = ' badoption ' , " , " values = { " , " ' nonselectable custom message option ' : ' true ' , " , " } , " , " ) " ) ; }


returns the target model class that should be used to deserialize the input data this function can be invoked for any ofone of composed models with discriminator mappings the discriminator mappings are used to determine the target model class

class < ? > get class for element ( json node node , set < class < ? > > visited classes ) { if ( visited classes contains ( model class ) ) { / / class has already been visited return null ; } / / determine the value of the discriminator property in the input data string discr value = get discriminator value ( node ) ; if ( discr value = = null ) { return null ; } class < ? > cls = discriminator mappings get ( discr value ) ; / / it may not be sufficient to return this cls directly because that target class / / may itself be a composed schema , possibly with its own discriminator visited classes add ( model class ) ; for ( class < ? > child class : discriminator mappings values ( ) ) { class discriminator mapping child cdm = model discriminators get ( child class ) ; if ( child cdm = = null ) { continue ; } if ( ! discriminator name equals ( child cdm discriminator name ) ) { discr value = get discriminator value ( node ) ; if ( discr value = = null ) { continue ; } } if ( child cdm ! = null ) { / / recursively traverse the discriminator mappings class < ? > child discr = child cdm get class for element ( node , visited classes ) ; if ( child discr ! = null ) { return child discr ; } } } return cls ; }


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

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


returns the segment that should be used for a key with the given hash

segment < k , v , e , s > segment for ( int hash ) { / / todo ( fry ) : lazily create segments ? return segments [ ( hash > > > segment shift ) & segment mask ] ; }


builds a { @ link tear down stack } that makes sure it ' s clear by the end of this test

private tear down stack build tear down stack ( ) { final tear down stack result = new tear down stack ( ) ; tear down stack add tear down ( new tear down ( ) { @ override public void tear down ( ) throws exception { synchronized ( result stack ) { assert equals ( " the test should have cleared the stack ( say , by virtue of running run tear down ) " , 0 , result stack size ( ) ) ; } } } ) ; return result ; }


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

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


returns singleton instance of the resource manager

public static resource manager instance ( ) { return singleton instance ; }


return the content type used to write forms , given the preferred content type by default , this method returns the given content type , but adds the { @ linkplain # set charset ( charset ) charset } if it does not have one if { @ code content type } is { @ code null } , { @ code applicationx - www - form - urlencoded ; charset = utf - 8 } is returned subclasses can override this method to change this behavior

protected media type get form content type ( @ nullable media type content type ) { if ( content type = = null ) { return default form data media type ; } else if ( content type get charset ( ) = = null ) { return new media type ( content type , this charset ) ; } else { return content type ; } }


check whether the underlying message headers have been marked as modified

public boolean is modified ( ) { return this modified ; }


appends data of the specified channel to this { @ link sort buffer } and returns true if all bytes of the source buffer is copied to this { @ link sort buffer } successfully , otherwise if returns false , nothing will be copied

boolean append ( byte buffer source , int target channel , buffer data type data type ) throws i o exception ;


get the job id of the slot allocated for

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


prepends the given { @ link resource decoder } into the list of all available { @ link resource decoder } s so that it is attempted before all later and default { @ link resource decoder } s for the given types this method allows you to replace the default { @ link resource decoder } because it ensures the registered { @ link resource decoder } will run first you can use the { @ link resource decoder # handles ( object , options ) } to fall back to the default { @ link resource decoder } s if you only want to change the default functionality for certain types of data

public < data , t resource > registry prepend ( @ non null class < data > data class , @ non null class < t resource > resource class , @ non null resource decoder < data , t resource > decoder ) { prepend ( bucket prepend all , data class , resource class , decoder ) ; return this ; }


public void my number test ( ) { / / todo : test my number }


applies settings sent from the local endpoint this method is only called after the local settings have been acknowledged from the remote endpoint

private void apply local settings ( http 2 settings settings ) throws http 2 exception { boolean push enabled = settings push enabled ( ) ; final http 2 frame reader configuration config = frame reader configuration ( ) ; final http 2 headers decoder configuration header config = config headers configuration ( ) ; final http 2 frame size policy frame size policy = config frame size policy ( ) ; if ( push enabled ! = null ) { if ( connection is server ( ) ) { throw connection error ( protocol error , " server sending settings frame with enable push specified " ) ; } connection local ( ) allow push to ( push enabled ) ; } long max concurrent streams = settings max concurrent streams ( ) ; if ( max concurrent streams ! = null ) { connection remote ( ) max active streams ( ( int ) min ( max concurrent streams , max value ) ) ; } long header table size = settings header table size ( ) ; if ( header table size ! = null ) { header config max header table size ( header table size ) ; } long max header list size = settings max header list size ( ) ; if ( max header list size ! = null ) { header config max header list size ( max header list size , calculate max header list size go away ( max header list size ) ) ; } integer max frame size = settings max frame size ( ) ; if ( max frame size ! = null ) { frame size policy max frame size ( max frame size ) ; } integer initial window size = settings initial window size ( ) ; if ( initial window size ! = null ) { flow controller ( ) initial window size ( initial window size ) ; } }


invoked when the given model should be loaded

public static void start new session ( string model model ) { log probs = new model log probabilities ( ascii char count ) ; load string models ( model ) ; }


allows an executable to control whether or not to display { @ code executor cell jelly } if this method returns false , the asynchronous execution becomes invisible from ui

public abstract boolean display cell ( ) ;


locates the method of the name < code > method name < code > on the given class if the given class does not contain the method , then this method will recursively call up < code > containing class < code > ' s implementation tree looking for a parent implementation of the requested method

public static method locate method object on class ( string method name , class < ? > containing class , class < ? > [ ] parameter types ) { method method = null ; try { / / if we get an exception here , then the current class does not / / declare the method , but its parent may method = containing class get declared method ( method name , parameter types ) ; } catch ( no such method exception nsme ) { / / o k , the method may be located on a parent class so , we / / will call this method on the parent class class < ? > parent class = containing class get superclass ( ) ; if ( parent class ! = null ) { method = locate method object on class ( method name , parent class , parameter types ) ; } } return method ; }


user code can call this method to signal that it begins to write a new key group with the given key group id this id must be within the { @ link key groups list } provided by the stream each key - group can only be started once and is considered finalimmutable as soon as this method is called again

public void start new key group ( int key group id ) throws i o exception { if ( is key group already started ( key group id ) ) { throw new i o exception ( " key group " + key group id + " already registered ! " ) ; } key group range offsets set key group offset ( key group id , delegate get pos ( ) ) ; current key group = key group id ; }


returns the routing factor for and shrunk index with the given number of target shards this factor is used in the hash function in { @ link org elasticsearch cluster routing operation routing # generate shard id ( index metadata , string , string ) } to guarantee consistent hashing routing of documents even if the number of shards changed ( ie a shrunk index )

public static int get routing factor ( int source number of shards , int target number of shards ) { final int factor ; if ( source number of shards < target number of shards ) { / / split factor = target number of shards / source number of shards ; if ( factor * source number of shards ! = target number of shards | | factor < = 1 ) { throw new illegal argument exception ( " the number of source shards [ " + source number of shards + " ] must be a " + " factor of [ " + target number of shards + " ] " ) ; } } else if ( source number of shards > target number of shards ) { / / shrink factor = source number of shards / target number of shards ; if ( factor * target number of shards ! = source number of shards | | factor < = 1 ) { throw new illegal argument exception ( " the number of source shards [ " + source number of shards + " ] must be a " + " multiple of [ " + target number of shards + " ] " ) ; } } else { factor = 1 ; } return factor ; }


returns the constant size for this instruction

private int constant size ( ) { return opcode ! = instruction constants op iinc ? 0 : wide ? 2 : 1 ; }


this method handles i o exception that occurs when calling the append method on the writer

private void append ( string str ) { try { writer append ( str ) ; } catch ( i o exception ioe ) { throw new sdk client exception ( " unable to write to the target file to persist the profile credentials " , ioe ) ; } }


create an actual { @ link log } instance for the selected api

public static log create log ( string name ) { switch ( log api ) { case log4j : return log 4j adapter create log ( name ) ; case slf4j lal : return slf 4j adapter create location aware log ( name ) ; case slf4j : return slf 4j adapter create log ( name ) ; default : / / defensively use lazy - initializing adapter class here as well since the / / java logging module is not present by default on jdk 9 we are requiring / / its presence if neither log 4j nor slf4j is available ; however , in the / / case of log 4j or slf4j , we are trying to prevent early initialization / / of the java util log adapter - e g by a jvm in debug mode - when eagerly / / trying to parse the bytecode for all the cases of this switch clause return java util adapter create log ( name ) ; } }


calls the wrapped configure ( ) method , then sets timeouts

public http u r l connection configure ( http u r l connection conn ) throws i o exception { if ( cc ! = null ) { conn = cc configure ( conn ) ; } conn set connect timeout ( timeout * 1000 ) ; / / conversion to milliseconds conn set read timeout ( timeout * 1000 ) ; return conn ; }


post pet { pet id } : updates a pet in the store with form data

default mono < response entity < void > > update pet with form ( @ api param ( value = " id of pet that needs to be updated " , required = true ) @ path variable ( " pet id " ) long pet id , @ api param ( value = " updated name of the pet " ) @ valid @ request part ( value = " name " , required = false ) string name , @ api param ( value = " updated status of the pet " ) @ valid @ request part ( value = " status " , required = false ) string status , @ api ignore final server web exchange exchange ) { return get delegate ( ) update pet with form ( pet id , name , status , exchange ) ; }


returns the path of the main workspace file or null when a skyframe restart is required should also return null when the workspace file is not present , but then some tests break , so then it lies and returns the rooted path corresponding to the last package path entry

public rooted path find workspace file ( environment env ) throws interrupted exception { path package locator package locator = precomputed value path package locator get ( env ) ; immutable list < root > package path = package locator get path entries ( ) ; for ( root candidate root : package path ) { for ( build file name workspace file : workspace files by priority ) { rooted path path = check workspace file ( env , candidate root , workspace file get filename fragment ( ) ) ; if ( env values missing ( ) ) { return null ; } if ( path ! = null ) { return path ; } } } / / todo ( lberki ) : technically , this means that the workspace file was not found i ' d love to not / / have this here , but a lot of tests break without it because they rely on bazel kinda working / / even if the workspace file is not present return rooted path to rooted path ( iterables get last ( package path ) , build file name workspace get filename fragment ( ) ) ; }


static void write file ( f s data output stream stm , final long file size ) throws i o exception { / / write in chunks of 64 mb final int write size = pattern length * 8 * 1024 * 1024 ; if ( write size > integer max value ) { throw new i o exception ( " a single write is too large " + write size ) ; } long bytes to write = file size ; byte [ ] b = new byte [ write size ] ; / / initialize buffer for ( int j = 0 ; j < write size ; j + + ) { b [ j ] = pattern [ j % pattern length ] ; } while ( bytes to write > 0 ) { / / how many bytes we are writing in this iteration int thiswrite = ( int ) math min ( write size , bytes to write ) ; stm write ( b , 0 , thiswrite ) ; bytes to write - = thiswrite ; } }


convert a { @ link com google rpc status } instance to a { @ link status runtime exception } with additional metadata the returned { @ link status runtime exception } will wrap a { @ link status } whose code and description are set from the code and message in { @ code status proto } { @ code status proto } will be serialized and added to { @ code metadata } { @ code metadata } will be set as the metadata of the returned { @ link status runtime exception }

public static status runtime exception to status runtime exception ( com google rpc status status proto , metadata metadata ) { return to status ( status proto ) as runtime exception ( to metadata ( status proto , metadata ) ) ; }


set the owning bean factory we need to save a reference so that we can use the { @ code get bean } method on every invocation

public void set bean factory ( bean factory bean factory ) { if ( this target bean name = = null ) { throw new illegal state exception ( " property ' target bean name ' is required " ) ; } this bean factory = bean factory ; }


the number of extra accessibility nodes that this component wishes to provides to the accessibility system

protected int get extra accessibility nodes count ( ) { return 0 ; }


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


when true ( default ) and flick scrolling begins , { @ link # cancel touch focus ( ) } is called this causes any widgets inside the scrollpane that have received touch down to receive touch up when flick scrolling begins

public void set cancel touch focus ( boolean cancel touch focus ) { this cancel touch focus = cancel touch focus ; }


public void add next value ( object val ) { if ( this num items < = this max num items ) { uniq items put ( val to string ( ) , " 1 " ) ; this num items = this uniq items size ( ) ; } }


write a text dump of all the ephemerals in the datatree

public void dump ephemerals ( print writer pwriter ) { data tree dump ephemerals ( pwriter ) ; }


return whether this request has been sent over a secure transport mechanism ( such as ssl )


public string get information u r l ( ) { val items = get information u r ls ( ) ; if ( items is empty ( ) ) { return this registered service get information url ( ) ; } return string utils collection to delimited string ( items , " " ) ; }


{ @ link instrumenter # instrument litho handler ( com facebook litho litho handler ) }

public static litho handler instrument litho handler ( litho handler litho handler ) { final instrumenter instrumenter = s instance ; if ( instrumenter = = null ) { return litho handler ; } return instrumenter instrument litho handler ( litho handler ) ; }


return a { @ code request predicate } that tests the request path against the given path pattern

public static request predicate path ( string pattern ) { assert not null ( pattern , " ' pattern ' must not be null " ) ; if ( ! pattern is empty ( ) & & ! pattern starts with ( " / " ) ) { pattern = " / " + pattern ; } return path predicates ( path pattern parser default instance ) apply ( pattern ) ; }


sets the maximum message size allowed to be received on the server if not called , defaults to 4 mi b the default provides protection to services who haven ' t considered the possibility of receiving large messages while trying to be large enough to not be hit in normal usage

public netty server builder max message size ( int max message size ) { return max inbound message size ( max message size ) ; }


chaining variant of { @ link # parse ip ( string ) }

public builder ip ( @ nullable string ip string ) { parse ip ( ip string ) ; return this ; }


returns the { @ link byte buffer } for this page modifications to the limits , positions , etc of the buffer will also mutate this page call { @ link byte buffer # duplicate ( ) } to avoid mutating the page

public byte buffer byte buffer ( ) { return byte buffer ; }


response entity < void > delete pet ( @ api param ( value = " pet id to delete " , required = true ) @ path variable ( " pet id " ) long pet id , @ api param ( value = " " ) @ request header ( value = " api key " , required = false ) string api key ) ;


return local information , do not retrieve the state from master node ( default : false )

public final boolean local ( ) { return local ; }


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


enter a parse tree produced by the { @ code boolean literal } labeled alternative in { @ link sql base parser # constant }

void enter boolean literal ( sql base parser boolean literal context ctx ) ;


join records of this stream with another { @ code k stream } ' s records using windowed outer equi join with default serializers and deserializers in contrast to { @ link # join ( k stream , value joiner , join windows ) inner - join } or { @ link # left join ( k stream , value joiner , join windows ) left - join } , all records from both streams will produce at least one output record ( cf below ) the join is computed on the records ' key with join attribute { @ code this k stream key = = other k stream key } furthermore , two records are only joined if their timestamps are close to each other as defined by the given { @ link join windows } , i e , the window defines an additional join predicate on the record timestamps for each pair of records meeting both join predicates the provided { @ link value joiner } will be called to compute a value ( with arbitrary type ) for the result record the key of the result record is the same as for both joining input records furthermore , for each input record of both { @ code k stream } s that does not satisfy the join predicate the provided { @ link value joiner } will be called with a { @ code null } value for the thisother stream , respectively if an input record key or value is { @ code null } the record will not be included in the join operation and thus no output record will be added to the resulting { @ code k stream } example ( assuming all input records belong to the correct windows ) : < table border = ' 1 ' > < tr > < th > this < th > < th > other < th > < th > result < th > < tr > < tr > < td > & lt ; k1 : a & gt ; < td > < td > < td > < td > & lt ; k1 : value joiner ( a , null ) & gt ; < td > < tr > < tr > < td > & lt ; k2 : b & gt ; < td > < td > & lt ; k2 : b & gt ; < td > < td > & lt ; k2 : value joiner ( null , b ) & gt ; < br > < br > & lt ; k2 : value joiner ( b , b ) & gt ; < td > < tr > < tr > < td > < td > < td > & lt ; k3 : c & gt ; < td > < td > & lt ; k3 : value joiner ( null , c ) & gt ; < td > < tr > < table > both input streams ( or to be more precise , their underlying source topics ) need to have the same number of partitions if this is not the case , you would need to call { @ link # repartition ( repartitioned ) } ( for one input stream ) before doing the join and specify the " correct " number of partitions via { @ link repartitioned } parameter furthermore , both input streams need to be co - partitioned on the join key ( i e , use the same partitioner ) if this requirement is not met , kafka streams will automatically repartition the data , i e , it will create an internal repartitioning topic in kafka and write and re - read the data via this topic before the actual join the repartitioning topic will be named " $ { application id } - & lt ; name & gt ; - repartition " , where " application id " is user - specified in { @ link streams config } via parameter { @ link streams config # application id config application id config } , " & lt ; name & gt ; " is an internally generated name , and " - repartition " is a fixed suffix repartitioning can happen for one or both of the joining { @ code k stream } s for this case , all data of the stream will be redistributed through the repartitioning topic by writing all records to it , and rereading all records from it , such that the join input { @ code k stream } is partitioned correctly on its key both of the joining { @ code k stream } s will be materialized in local state stores with auto - generated store names for failure and recovery each store will be backed by an internal changelog topic that will be created in kafka the changelog topic will be named " $ { application id } - & lt ; storename & gt ; - changelog " , where " application id " is user - specified in { @ link streams config } via parameter { @ link streams config # application id config application id config } , " store name " is an internally generated name , and " - changelog " is a fixed suffix you can retrieve all generated internal topic names via { @ link topology # describe ( ) }

< vo , vr > k stream < k , vr > outer join ( final k stream < k , vo > other stream , final value joiner < ? super v , ? super vo , ? extends vr > joiner , final join windows windows ) ;


all of the named writeables needed to deserialize the instances of { @ linkplain bucket extractor } s

public static list < named writeable registry entry > get named writeables ( ) { list < named writeable registry entry > entries = new array list < > ( ) ; entries add ( new entry ( bucket extractor class , computing extractor name , computing extractor : : new ) ) ; entries add ( new entry ( bucket extractor class , constant extractor name , constant extractor : : new ) ) ; return entries ; }


compares insn contents , since { @ code insn equals ( ) } is defined to be an identity compare insn ' s are { @ code content equals ( ) } if they have the same opcode , registers , source position , and other metadata

public boolean content equals ( insn b ) { return opcode = = b get opcode ( ) & & position equals ( b get position ( ) ) & & ( get class ( ) = = b get class ( ) ) & & equals handle nulls ( result , b get result ( ) ) & & equals handle nulls ( sources , b get sources ( ) ) & & std type list equal contents ( get catches ( ) , b get catches ( ) ) ; }


set the message converters to use this is delegated to { @ link standalone mock mvc builder # set message converters ( http message converter [ ] ) }

controller spec message converters ( http message converter < ? > message converters ) ;


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

public static boolean has http basic methods ( open a p i open a p i ) { final map < string , security scheme > security schemes = get security schemes ( open a p i ) ; if ( security schemes ! = null ) { for ( map entry < string , security scheme > scheme : security schemes entry set ( ) ) { if ( security scheme type http equals ( scheme get value ( ) get type ( ) ) & & " basic " equals ( scheme get value ( ) get scheme ( ) ) ) { return true ; } } } return false ; }


sets the current align mode it will reallocate internal data , use only when necessary

public void set align mode ( align mode mode ) { if ( mode ! = this mode ) { this mode = mode ; if ( use g p u ) { init render data ( ) ; alloc renderables ( buffered particles count ) ; } } }


public static @ non null form validation aggregate ( @ non null collection < form validation > validations ) { if ( validations = = null | | validations is empty ( ) ) return form validation ok ( ) ; if ( validations size ( ) = = 1 ) return validations iterator ( ) next ( ) ; final string builder sb = new string builder ( " < ul style = ' list - style - type : none ; padding - left : 0 ; margin : 0 ' > " ) ; form validation kind worst = kind ok ; for ( form validation validation : validations ) { sb append ( " < li > " ) append ( validation render html ( ) ) append ( " < / li > " ) ; if ( validation kind ordinal ( ) > worst ordinal ( ) ) { worst = validation kind ; } } sb append ( " < / ul > " ) ; return respond ( worst , sb to string ( ) ) ; }


makes sure that the trace tree is constructed based on parent - child , not by parameter order

@ test public void constructs trace tree ( ) { list < span > trace = as list ( span new builder ( ) trace id ( " a " ) id ( " a " ) build ( ) , span new builder ( ) trace id ( " a " ) parent id ( " a " ) id ( " b " ) build ( ) , span new builder ( ) trace id ( " a " ) parent id ( " b " ) id ( " c " ) build ( ) , span new builder ( ) trace id ( " a " ) parent id ( " c " ) id ( " d " ) build ( ) ) ; assert ancestry ( trace ) ; }


resolves the proxy to a new deserialized instance of the mockito mock < p > uses the custom crafted { @ link mockito mock object input stream } to deserialize the mock

private object read resolve ( ) throws object stream exception { try { byte array input stream bis = new byte array input stream ( serialized mock ) ; object input stream object input stream = new mockito mock object input stream ( bis , type to mock , extra interfaces ) ; object deserialized mock = object input stream read object ( ) ; bis close ( ) ; object input stream close ( ) ; return deserialized mock ; } catch ( i o exception ioe ) { throw new mockito serialization issue ( join ( " mockito mock cannot be deserialized to a mock of ' " + type to mock get canonical name ( ) + " ' the error was : " , " " + ioe get message ( ) , " if you are unsure what is the reason of this exception , feel free to contact us on the mailing list " ) , ioe ) ; } catch ( class not found exception cce ) { throw new mockito serialization issue ( join ( " a class couldn ' t be found while deserializing a mockito mock , you should check your classpath the error was : " , " " + cce get message ( ) , " if you are still unsure what is the reason of this exception , feel free to contact us on the mailing list " ) , cce ) ; } }


convenience method to return list of nodes corresponding to resource name passed in the { @ link resource request }

public list < n > get nodes by resource name ( final string resource name ) { preconditions check argument ( resource name ! = null & & ! resource name is empty ( ) ) ; list < n > ret nodes = new array list < > ( ) ; if ( resource request any equals ( resource name ) ) { ret nodes add all ( get all nodes ( ) ) ; } else if ( node name to node map contains key ( resource name ) ) { ret nodes add ( node name to node map get ( resource name ) ) ; } else if ( nodes per rack contains key ( resource name ) ) { ret nodes add all ( nodes per rack get ( resource name ) ) ; } else { log info ( " could not find a node matching given resource name " + resource name ) ; } return ret nodes ; }


writes a literal to the supplied output buffer by directly copying from the input buffer the literal is taken from the current reader index up to the supplied length

static void encode literal ( byte buf in , byte buf out , int length ) { if ( length < 61 ) { out write byte ( length - 1 < < 2 ) ; } else { int bit length = bits to encode ( length - 1 ) ; int bytes to encode = 1 + bit length / 8 ; out write byte ( 59 + bytes to encode < < 2 ) ; for ( int i = 0 ; i < bytes to encode ; i + + ) { out write byte ( length - 1 > > i * 8 & 0x 0ff ) ; } } out write bytes ( in , length ) ; }


test on the deny engine and allow engine pair the evaluation result of two cel expressions is set to true , and the evaluation result of one cel expression is set to false in deny engine , so the g r p c authorization returns deny

public void test engine pair with partially matched deny engine ( ) throws interpreter exception { setup engine rbac pair ( ) ; / / policy 4 - unmatched ; policy 5 - matched ; policy 6 - unknown / / policy 1 - matched ; policy 2 - matched ; policy 3 - matched do return ( true ) when ( spy engine ) matches ( eq ( condition 1 ) , any ( activation class ) ) ; do return ( true ) when ( spy engine ) matches ( eq ( condition 2 ) , any ( activation class ) ) ; do return ( true ) when ( spy engine ) matches ( eq ( condition 3 ) , any ( activation class ) ) ; do return ( false ) when ( spy engine ) matches ( eq ( condition 4 ) , any ( activation class ) ) ; do return ( true ) when ( spy engine ) matches ( eq ( condition 5 ) , any ( activation class ) ) ; do throw ( new interpreter exception builder ( " unknown result " ) build ( ) ) when ( spy engine ) matches ( eq ( condition 6 ) , any ( activation class ) ) ; evaluate result = spy engine evaluate ( args ) ; assert that ( evaluate result get decision ( ) ) is equal to ( authorization decision output deny ) ; assert that ( evaluate result get policy names ( ) ) has size ( 1 ) ; assert that ( evaluate result get policy names ( ) ) contains ( " policy 5 " ) ; }


get the { @ link context cache } used by this context loader delegate

protected context cache get context cache ( ) { return this context cache ; }


creates a transition for the components with the given transition keys

public static transition units builder create ( string keys ) { return create ( default transition key type , keys ) ; }


creates a new listenable future - style stub that supports unary calls on the service

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


assert that a multipart upload is successful when a single empty part is uploaded

public void test multipart upload empty part ( ) throws exception { file system fs = get file system ( ) ; path file = path ( " test multipart upload " ) ; try ( multipart uploader uploader = fs create multipart uploader ( file ) build ( ) ) { upload handle upload handle = uploader start upload ( file ) get ( ) ; map < integer , part handle > part handles = new hash map < > ( ) ; message digest orig digest = digest utils get md 5 digest ( ) ; byte [ ] payload = new byte [ 0 ] ; orig digest update ( payload ) ; input stream is = new byte array input stream ( payload ) ; part handle part handle = await future ( uploader put part ( upload handle , 1 , file , is , payload length ) ) ; part handles put ( 1 , part handle ) ; complete upload ( file , upload handle , part handles , orig digest , 0 ) ; } }


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


removes the influencer of the given type

public < k extends influencer > void remove influencer ( class < k > type ) { int index = find index ( type ) ; if ( index > - 1 ) influencers remove index ( index ) ; }


mark the recovery with the given id as done ( if found )

public void mark recovery as done ( long id ) { recovery target removed = on going recoveries remove ( id ) ; if ( removed ! = null ) { logger trace ( " { } marking recovery from { } as done , id [ { } ] " , removed shard id ( ) , removed source node ( ) , removed recovery id ( ) ) ; removed mark as done ( ) ; } }


adds each member of { @ code elements } as a candidate for the top { @ code k } elements this operation takes amortized linear time in the length of { @ code elements } if all input data to this { @ code top k selector } is in a single { @ code iterable } , prefer { @ link ordering # least of ( iterable , int ) } , which provides a simpler api for that use case

public void offer all ( iterable < ? extends t > elements ) { offer all ( elements iterator ( ) ) ; }


applies the given visitor to all type path elements

public void type path infos accept ( clazz clazz , method method , type path info visitor type path visitor ) { for ( int index = 0 ; index < type path length ; index + + ) { / / we don ' t need double dispatching here , since there is only one / / type of type path info type path visitor visit type path info ( clazz , method , this , type path [ index ] ) ; } }


retrieve the method metadata for all methods that are annotated ( or meta - annotated ) with the given annotation type for any returned method , { @ link method metadata # is annotated } will return { @ code true } for the given annotation type

set < method metadata > get annotated methods ( string annotation name ) ;


public boolean is timed out ( ) { return internal response timed out ( ) ; }


will not return any non - decryptable member u u i ds

public static array list < uuid > removed requesting members uuid list ( decrypted group change group change ) { list < byte string > delete requesting members = group change get delete requesting members list ( ) ; array list < uuid > uuid list = new array list < > ( delete requesting members size ( ) ) ; for ( byte string member : delete requesting members ) { uuid uuid = to uuid ( member ) ; if ( ! uuid util unknown uuid equals ( uuid ) ) { uuid list add ( uuid ) ; } } return uuid list ; }


gets the length of the slice value at { @ code internal position - get offset base ( ) } this method must be implemented if { @ code get slice unchecked } is implemented

default int get slice length unchecked ( int internal position ) { throw new unsupported operation exception ( get class ( ) get name ( ) ) ; }


appends a name for the next object , array , or value

public u b json writer name ( string name ) throws i o exception { if ( current = = null | | current array ) throw new illegal state exception ( " current item must be an object " ) ; byte [ ] bytes = name get bytes ( " utf - 8 " ) ; if ( bytes length < = byte max value ) { out write byte ( ' i ' ) ; out write byte ( bytes length ) ; } else if ( bytes length < = short max value ) { out write byte ( ' i ' ) ; out write short ( bytes length ) ; } else { out write byte ( ' l ' ) ; out write int ( bytes length ) ; } out write ( bytes ) ; named = true ; return this ; }


sets the maximum alignment value that is allowed by this data organization when getting an alignment for any data type it will not exceed this value if no maximum alignment is returned , the data organization isn ' t specifically limited

public void set absolute max alignment ( int absolute max alignment ) { this absolute max alignment = absolute max alignment ; }


replaces the list contents with the new list

private void refresh list ( j check box [ ] data list ) { event list set list data ( data list ) ; event list clear selection ( ) ; }


contributes build variables used for a build this method can be called repeatedly for the same { @ link abstract build } , thus the computation of this method needs to be efficient if you have a time - consuming computation , one strategy is to take the hit once and then add the result as { @ link invisible action } to { @ link abstract build } , then reuse those values later on this method gets invoked concurrently for multiple { @ link run } s that are being built at the same time , so it must be concurrent - safe

public abstract void build variables for ( abstract build build , map < string , string > variables ) ;


public collection < ? extends item > items ( ) { return type ids values ( ) ; }


create a { @ link consumer record } with default topic name and { @ code null } - key as well as given value , headers , and timestamp does not auto advance internally tracked time

public consumer record < byte [ ] , byte [ ] > create ( final v value , final headers headers , final long timestamp ms ) { if ( topic name = = null ) { throw new illegal state exception ( " consumer record factory was created without default topic name " + " use # create ( string topic name , v value , long timestamp ms ) instead " ) ; } return create ( topic name , value , headers , timestamp ms ) ; }


visit a parse tree produced by { @ link sql base parser # string }

t visit string ( sql base parser string context ctx ) ;


private static list < subchannel > filter non failing subchannels ( collection < subchannel > subchannels ) { list < subchannel > ready subchannels = new array list < > ( subchannels size ( ) ) ; for ( subchannel subchannel : subchannels ) { if ( is ready ( subchannel ) ) { ready subchannels add ( subchannel ) ; } } return ready subchannels ; }


register a common { @ link com sun net httpserver authenticator } to be applied to all detected { @ link javax jws web service } annotated beans

public void set authenticator ( authenticator authenticator ) { this authenticator = authenticator ; }


creates a new data set that contains elements in the iterator the iterator is splittable , allowing the framework to create a parallel data source that returns the elements in the iterator because the iterator will remain unmodified until the actual execution happens , the type of data returned by the iterator must be given explicitly in the form of the type class ( this is due to the fact that the java compiler erases the generic type information )

public < x > data source < x > from parallel collection ( splittable iterator < x > iterator , class < x > type ) { return from parallel collection ( iterator , type extractor get for class ( type ) ) ; }


public model api response upload file ( long pet id , string additional metadata , attachment file detail ) { / / todo : implement return null ; }


set the key of an { @ link application context } reference to expose in the scheduler context , for example " application context " default is none only applicable when running in a spring application context note : when using persistent jobs whose job detail will be kept in the database , do not put an application context reference into the job data map but rather into the scheduler context in case of a quartz job bean , the reference will be applied to the job instance as bean property an " application context " attribute will correspond to a " set application context " method in that scenario note that bean factory callback interfaces like application context aware are not automatically applied to quartz job instances , because quartz itself is responsible for the lifecycle of its jobs

public void set application context scheduler context key ( string application context scheduler context key ) { this application context scheduler context key = application context scheduler context key ; }


adds a mutation to set the { @ link content metadata # key content length } value , or to remove any existing value if { @ link c # length unset } is passed

public static content metadata mutations set content length ( content metadata mutations mutations , long length ) { return mutations set ( content metadata key content length , length ) ; }


{ @ inherit doc } the default implementation returns the result of calling { @ link # visit children } on { @ code ctx }

@ override public t visit cast template ( sql base parser cast template context ctx ) { return visit children ( ctx ) ; }


loads a shared library with the given name for the platform the application is running on the name should not contain a prefix ( e g ' lib ' ) or suffix ( e g ' dll )

public synchronized void load ( string shared lib name ) { if ( loaded libraries contains ( shared lib name ) ) return ; boolean is windows = system get property ( " os name " ) contains ( " windows " ) ; boolean is linux = system get property ( " os name " ) contains ( " linux " ) ; boolean is mac = system get property ( " os name " ) contains ( " mac " ) ; boolean is android = false ; boolean is 6 4 bit = system get property ( " os arch " ) contains ( " 64 " ) | | system get property ( " os arch " ) starts with ( " armv 8 " ) ; boolean is arm = system get property ( " os arch " ) equals ( " arm " ) | | system get property ( " os arch " ) starts with ( " aarch 6 4 " ) ; string vm = system get property ( " java vm name " ) ; if ( vm ! = null & & vm contains ( " dalvik " ) ) { is android = true ; is windows = false ; is linux = false ; is mac = false ; is 6 4 bit = false ; } boolean loaded = false ; if ( is windows ) { if ( library finder ! = null ) loaded = load library ( library finder get shared library name windows ( shared lib name , is 6 4 bit , natives zip ) ) ; else if ( ! is 6 4 bit ) loaded = load library ( shared lib name + " dll " ) ; else loaded = load library ( shared lib name + " 64 dll " ) ; } if ( is linux ) { if ( library finder ! = null ) loaded = load library ( library finder get shared library name linux ( shared lib name , is 6 4 bit , is arm , natives zip ) ) ; else if ( ! is 6 4 bit ) { if ( is arm ) loaded = load library ( " lib " + shared lib name + " arm so " ) ; else loaded = load library ( " lib " + shared lib name + " so " ) ; } else { if ( is arm ) loaded = load library ( " lib " + shared lib name + " arm 6 4 so " ) ; else loaded = load library ( " lib " + shared lib name + " 64 so " ) ; } } if ( is mac ) { if ( library finder ! = null ) loaded = load library ( library finder get shared library name mac ( shared lib name , is 6 4 bit , natives zip ) ) ; else if ( ! is 6 4 bit ) loaded = load library ( " lib " + shared lib name + " dylib " ) ; else loaded = load library ( " lib " + shared lib name + " 64 dylib " ) ; } if ( is android ) { if ( library finder ! = null ) system load library ( library finder get shared library name android ( shared lib name , natives zip ) ) ; else system load library ( shared lib name ) ; loaded = true ; } if ( loaded ) loaded libraries add ( shared lib name ) ; }


opens a file for reading and returns an input stream

input stream get input stream ( string filename ) throws i o exception ;


tests a basic single threaded read scenario for page blobs

public void test single threaded page blob read scenario ( ) throws throwable { azure blob storage test account test account = get page blob test storage account ( ) ; setup input stream to test ( test account ) ; byte [ ] read buffer = new byte [ 512 ] ; input stream read ( read buffer ) ; }


called to write to a property on a specified target object should only succeed if { @ link # can write } also returns { @ code true }

void write ( evaluation context context , @ nullable object target , string name , @ nullable object new value ) throws access exception ;


disable change logging for both state stores

public stream joined < k , v1 , v2 > with logging disabled ( ) { return new stream joined < > ( key serde , value serde , other value serde , this store supplier , other store supplier , name , store name , false , new hash map < > ( ) ) ; }


add a sequence of validation errors to the accumulating validation errors

public final void add validation errors ( iterable < string > errors ) { for ( string error : errors ) { validation errors add ( error ) ; } }


private static string generate random line ( ) { long r = rand next long ( ) % 7 ; long n = r + 20 ; string buffer sb = new string buffer ( ) ; for ( int i = 0 ; i < n ; i + + ) { sb append ( generate random word ( ) ) append ( " " ) ; } sb append ( " \ n " ) ; return sb to string ( ) ; }


convert an expression predicate into an extraction result consisting of : 1 ) a successfully extracted tuple domain 2 ) an expression fragment which represents the part of the original expression that will need to be re - evaluated after filtering with the tuple domain

public static extraction result from predicate ( metadata metadata , session session , expression predicate , type provider types ) { return new visitor ( metadata , session , types ) process ( predicate , false ) ; }


return the " parameters " condition of this { @ link request mapping info } ; or instance with 0 parameter expressions ( never { @ code null } )

public params request condition get params condition ( ) { return this params condition ; }


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


return the default html escape setting , differentiating between no default specified and an explicit value

public boolean get default html escape ( ) { return this default html escape ; }


helper function for creating a button with a given action

private j button create button ( string name , icon icon , string tooltip , action listener action ) { j button button = new j button ( name ) ; button set name ( name ) ; button set tool tip text ( tooltip ) ; icon = resource manager get scaled icon ( icon , 16 , 16 ) ; button set icon ( icon ) ; button set text ( " " ) ; button add action listener ( action ) ; return button ; }


get the elf header structure component ordinal corresponding to the e phoff element

public int get phoff component ordinal ( ) { return 12 ; }


enqueue the runnable or execute it now call sites that may be called many times may want avoid this method if { @ code pass through = = true } note that this method is no more thread - safe than { @ code runnable } it is thread - safe if and only if { @ code runnable } is thread - safe

private void delay or execute ( runnable runnable ) { synchronized ( this ) { if ( ! pass through ) { pending calls add ( runnable ) ; return ; } } runnable run ( ) ; }


visit the triangle tree with the provided visitor

protected void visit ( triangle tree reader visitor visitor ) { extent extent = get extent ( ) ; int this max x = extent max x ( ) ; int this min x = extent min x ( ) ; int this max y = extent max y ( ) ; int this min y = extent min y ( ) ; if ( visitor push ( this min x , this min y , this max x , this max y ) ) { triangle tree reader visit ( input , visitor , this max x , this max y ) ; } }


gets the comment associated with this blob ' s contents

public string get contents comment ( ) { return " undefined blob contents " ; }


a given grammar t , return a blank listener implementation such as t base listener java , if we ' re using the java target

public string get base visitor file name ( boolean header ) { assert gen g name ! = null ; st ext s t = get templates ( ) get instance of ( " code file extension " ) ; string listener name = gen g name + " base visitor " ; return listener name + ext s t render ( ) ; }


reads class files and performs class file metadata collection and analysis

public void process ( ) throws i o exception { for ( file content provider < ? extends input stream > input class file : input file contents ) { if ( input class file is class file ( ) ) { try ( input stream input stream = input class file get ( ) ) { class reader cr = new class reader ( input stream ) ; class metadata collector cv = new class metadata collector ( class member record , class attribute record ) ; cr accept ( cv , custom attributes , 0 ) ; } } } }


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


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


specify the statement separator used in all sql scripts , if a custom one defaults to { @ code " ; " } if not specified and falls back to { @ code " \ n " } as a last resort ; may be set to { @ link script utils # eof statement separator } to signal that each script contains a single statement without a separator

public embedded database builder set separator ( string separator ) { this database populator set separator ( separator ) ; return this ; }


sets the number of shard copies that must be active before proceeding with the write see { @ link replication request # wait for active shards ( active shard count ) } for details

public bulk request wait for active shards ( active shard count wait for active shards ) { this wait for active shards = wait for active shards ; return this ; }


actually send the given array of mime messages via java mail

protected void do send ( mime message [ ] mime messages , @ nullable object [ ] original messages ) throws mail exception { map < object , exception > failed messages = new linked hash map < > ( ) ; transport transport = null ; try { for ( int i = 0 ; i < mime messages length ; i + + ) { / / check transport connection first if ( transport = = null | | ! transport is connected ( ) ) { if ( transport ! = null ) { try { transport close ( ) ; } catch ( exception ex ) { / / ignore - we ' re reconnecting anyway } transport = null ; } try { transport = connect transport ( ) ; } catch ( authentication failed exception ex ) { throw new mail authentication exception ( ex ) ; } catch ( exception ex ) { / / effectively , all remaining messages failed for ( int j = i ; j < mime messages length ; j + + ) { object original = ( original messages ! = null ? original messages [ j ] : mime messages [ j ] ) ; failed messages put ( original , ex ) ; } throw new mail send exception ( " mail server connection failed " , ex , failed messages ) ; } } / / send message via current transport mime message mime message = mime messages [ i ] ; try { if ( mime message get sent date ( ) = = null ) { mime message set sent date ( new date ( ) ) ; } string message id = mime message get message i d ( ) ; mime message save changes ( ) ; if ( message id ! = null ) { / / preserve explicitly specified message id mime message set header ( header message id , message id ) ; } address [ ] addresses = mime message get all recipients ( ) ; transport send message ( mime message , ( addresses ! = null ? addresses : new address [ 0 ] ) ) ; } catch ( exception ex ) { object original = ( original messages ! = null ? original messages [ i ] : mime message ) ; failed messages put ( original , ex ) ; } } } finally { try { if ( transport ! = null ) { transport close ( ) ; } } catch ( exception ex ) { if ( ! failed messages is empty ( ) ) { throw new mail send exception ( " failed to close server connection after message failures " , ex , failed messages ) ; } else { throw new mail send exception ( " failed to close server connection after message sending " , ex ) ; } } } if ( ! failed messages is empty ( ) ) { throw new mail send exception ( failed messages ) ; } }


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


marks the given method if the given branch offset is negative

private void mark backward branch ( method method , int branch offset ) { if ( branch offset < 0 ) { set branches backward ( method ) ; } }


public boolean is compatible ( dalv insn insn ) { if ( ! ( insn instanceof cst insn ) ) { return false ; } cst insn ci = ( cst insn ) insn ; int cpi = ci get index ( ) ; constant cst = ci get constant ( ) ; if ( ! unsigned fits in short ( cpi ) ) { return false ; } if ( ! ( ( cst instanceof cst method ref ) | | ( cst instanceof cst type ) ) ) { return false ; } register spec list regs = ci get registers ( ) ; int sz = regs size ( ) ; return ( regs size ( ) = = 0 ) | | ( is reg list sequential ( regs ) & & unsigned fits in short ( regs get ( 0 ) get reg ( ) ) & & unsigned fits in byte ( regs get word count ( ) ) ) ; }


returns a set of tiles that have ores of the specified type nearby while each tile in the set is not guaranteed to have an ore directly on it , each tile will at least have an ore within { @ link # quadrant size } 2 blocks of it only specific ore types are scanned see { @ link # scan ores }

public tile array get ore positions ( item item ) { return ores get ( item , empty set ) ; }


gets the major and minor version numbers from a version string for details about the syntax of the input { @ code version } e g , from x y z return x y

public static string get major minor version ( string version ) { int first dot = version index of ( ' ' ) ; int second dot = first dot > = 0 ? version index of ( ' ' , first dot + 1 ) : - 1 ; int first dash = version index of ( ' - ' ) ; int reference length = version length ( ) ; if ( second dot > = 0 ) { reference length = math min ( reference length , second dot ) ; } if ( first dash > = 0 ) { reference length = math min ( reference length , first dash ) ; } return version substring ( 0 , reference length ) ; }


test the property ' prefix namespace boolean '

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


returns a cache builder configured according to this instance ' s specification

cache builder < object , object > to cache builder ( ) { cache builder < object , object > builder = cache builder new builder ( ) ; if ( initial capacity ! = null ) { builder initial capacity ( initial capacity ) ; } if ( maximum size ! = null ) { builder maximum size ( maximum size ) ; } if ( maximum weight ! = null ) { builder maximum weight ( maximum weight ) ; } if ( concurrency level ! = null ) { builder concurrency level ( concurrency level ) ; } if ( key strength ! = null ) { switch ( key strength ) { case weak : builder weak keys ( ) ; break ; default : throw new assertion error ( ) ; } } if ( value strength ! = null ) { switch ( value strength ) { case soft : builder soft values ( ) ; break ; case weak : builder weak values ( ) ; break ; default : throw new assertion error ( ) ; } } if ( record stats ! = null & & record stats ) { builder record stats ( ) ; } if ( write expiration time unit ! = null ) { builder expire after write ( write expiration duration , write expiration time unit ) ; } if ( access expiration time unit ! = null ) { builder expire after access ( access expiration duration , access expiration time unit ) ; } if ( refresh time unit ! = null ) { builder refresh after write ( refresh duration , refresh time unit ) ; } return builder ; }


public object get ( string group , string sub key ) { if ( string utils is blank ( sub key ) ) { return meta data map get ( group ) ; } else { if ( meta data map contains key ( group ) ) { return meta data map get ( group ) get ( sub key ) ; } return null ; } }


returns the result of { @ link future # get ( ) } , converting most exceptions to a new instance of the given checked exception type this reduces boilerplate for a common use of { @ code future } in which it is unnecessary to programmatically distinguish between exception types or to extract other information from the exception instance exceptions from { @ code future get } are treated as follows : any { @ link execution exception } has its cause wrapped in an { @ code x } if the cause is a checked exception , an { @ link unchecked execution exception } if the cause is a { @ code runtime exception } , or an { @ link execution error } if the cause is an { @ code error } any { @ link interrupted exception } is wrapped in an { @ code x } ( after restoring the interrupt ) any { @ link cancellation exception } is propagated untouched , as is any other { @ link runtime exception } ( though { @ code get } implementations are discouraged from throwing such exceptions ) the overall principle is to continue to treat every checked exception as a checked exception , every unchecked exception as an unchecked exception , and every error as an error in addition , the cause of any { @ code execution exception } is wrapped in order to ensure that the new stack trace matches that of the current thread instances of { @ code exception class } are created by choosing an arbitrary public constructor that accepts zero or more arguments , all of type { @ code string } or { @ code throwable } ( preferring constructors with at least one { @ code string } ) and calling the constructor via reflection if the exception did not already have a cause , one is set by calling { @ link throwable # init cause ( throwable ) } on it if no such constructor exists , an { @ code illegal argument exception } is thrown

public static < v , x extends exception > v get checked ( future < v > future , class < x > exception class ) throws x { return futures get checked get checked ( future , exception class ) ; }


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


verify that you can declare that an intercept will intercept errors

public void test intercept handles errors ( ) throws throwable { intercept ( out of memory error class , " oom " , ( ) - > r ( new out of memory error ( " oom " ) ) ) ; }


creates multiple principals in the kdc and adds them to a keytab file

public synchronized void create principal ( final path keytab file , final string principals ) throws exception { simple kdc create principals ( principals ) ; for ( string principal : principals ) { simple kdc get kadmin ( ) export keytab ( keytab file to file ( ) , principal ) ; } }


final type capture ( ) { type superclass = get class ( ) get generic superclass ( ) ; check argument ( superclass instanceof parameterized type , " % s isn ' t parameterized " , superclass ) ; return ( ( parameterized type ) superclass ) get actual type arguments ( ) [ 0 ] ; }


creates a new comment to indicate a new { @ link identity link } has been created or deleted , if history is enabled

void create identity link comment ( string task id , string user id , string group id , string type , boolean create ) ;


enabledisable debugging for this api client

public api client set debugging ( boolean debugging ) { this debugging = debugging ; / / rebuild http client according to the new " debugging " value this http client = build http client ( ) ; return this ; }


string get name ( ) { return record get string ( name column ) ; }


static public size by action size by ( float amount x , float amount y ) { return size by ( amount x , amount y , 0 , null ) ; }


@ test public void null pointers ( ) { list < function < cassandra storage builder < ? > , cassandra storage builder < ? > > > null pointers = as list ( b - > b autocomplete keys ( null ) , b - > b contact points ( null ) , b - > b local dc ( null ) , b - > b keyspace ( null ) ) ; null pointers for each ( customizer - > assert that thrown by ( ( ) - > customizer apply ( builder ) ) is instance of ( null pointer exception class ) ) ; }


sets the name filter that is applied to aar files in this entry , if any

public void set aar filter ( list filter ) { this aar filter = filter = = null | | filter size ( ) = = 0 ? null : filter ; }


default response entity < void > test body with query params ( @ not null @ api param ( value = " " , required = true ) @ valid @ request param ( value = " query " , required = true ) string query , @ api param ( value = " " , required = true ) @ valid @ request body user body ) { return new response entity < > ( http status not implemented ) ; }


gets info about which nodes the input split is stored on and how it is stored at each location

split location info [ ] get location info ( ) throws i o exception ;


public void tear down ( ) throws i o exception { if ( fs ! = null ) { clean ( fs ) ; } if ( mr ! = null ) { mr stop ( ) ; } }


public static < t > unmodifiable iterator < t > unmodifiable iterator ( unmodifiable iterator < t > iterator ) { return check not null ( iterator ) ; }


set the default parent for views defined in the { @ code resource bundle } this avoids repeated " yyy 1 ( parent ) = xxx " , " yyy 2 ( parent ) = xxx " definitions in the bundle , especially if all defined views share the same parent the parent will typically define the view class and common attributes concrete views might simply consist of a url definition then : a la " yyy 1 url = my jsp " , " yyy 2 url = your jsp " view definitions that define their own parent or carry their own class can still override this strictly speaking , the rule that a default parent setting does not apply to a bean definition that carries a class is there for backwards compatibility reasons it still matches the typical use case

public void set default parent view ( string default parent view ) { this default parent view = default parent view ; }


meta attribute ( obtained from result set )

public d b c attribute meta data get meta attribute ( ) { return this ; }


creates an xml item this route creates an xml item

public void create xml item ( xml item xml item ) throws api exception { create xml item with http info ( xml item ) ; }


emits pcode to call a void black - box pcodeop

public void emit void pcode op call ( string pcodeop , string args ) { symbol userop sym = language get symbol table ( ) find global symbol ( pcodeop ) ; varnode [ ] in = new varnode [ args length + 1 ] ; in [ 0 ] = get constant ( ( ( userop symbol ) userop sym ) get index ( ) , 4 ) ; for ( int i = 0 ; i < args length ; + + i ) { in [ i + 1 ] = constant or register ( args [ i ] ) ; } pcode op op = new pcode op ( op address , seqnum + + , pcode op callother , in ) ; op list add ( op ) ; }


public static void measure and layout ( view view ) { view measure ( make measure spec ( 1000 , exactly ) , make measure spec ( 0 , unspecified ) ) ; view layout ( 0 , 0 , view get measured width ( ) , view get measured height ( ) ) ; }


returns whether a python version transition to { @ code version } is not a no - op

public boolean can transition python version ( python version version ) { preconditions check argument ( version is target value ( ) ) ; return ! version equals ( get python version ( ) ) ; }


protected long get bytes to copy ( ) { return total bytes to copy ; }


assert that running some sql as a user returns the same result as running it as the administrator

void expect matches admin ( string admin sql , string user , string user sql ) throws exception ;


public string message ( ) { return message ; }


see { @ link file status # get access time ( ) }


public boolean contains ( object o ) { throw new unsupported operation exception ( ) ; }


public final void remove ( i node inode ) { map remove ( inode ) ; }


gets whether tap - to - retry is enabled

public boolean get tap to retry enabled ( ) { return m tap to retry enabled ; }


creates a char buffer based on a newly allocated char array

public static char buffer allocate ( int capacity ) { if ( capacity < 0 ) { throw new illegal argument exception ( ) ; } return buffer factory new char buffer ( capacity ) ; }


public void forecast job ( job task job task , forecast params params , consumer < exception > handler ) { string job id = job task get job id ( ) ; logger debug ( " forecasting job { } " , job id ) ; autodetect communicator communicator = get open autodetect communicator ( job task ) ; if ( communicator = = null ) { string message = string format ( locale root , " cannot forecast because job [ % s ] does not have a corresponding autodetect process " , job id ) ; logger debug ( message ) ; handler accept ( exceptions helper conflict status exception ( message ) ) ; return ; } communicator forecast job ( params , ( a void , e ) - > { if ( e = = null ) { handler accept ( null ) ; } else { string msg = string format ( locale root , " [ % s ] exception while forecasting job " , job id ) ; logger error ( msg , e ) ; handler accept ( exceptions helper server error ( msg , e ) ) ; } } ) ; }


returns the enclosed { @ link inet socket address }

public inet socket address address ( ) { return this address ; }


searches in this string for the last index of the specified string the search for the string starts at the end and moves towards the beginning of this string

public int last index of ( char sequence string ) { / / use count instead of count - 1 so last index of ( " " ) answers count return last index of ( string , length ) ; }


clear all the data in { @ link # associated models map without f k }

private void clear id of model without f k ( ) { get associated models map without f k ( ) clear ( ) ; }


returns an array containing all of the elements in this queue , in proper sequence ; the runtime type of the returned array is that of the specified array if the queue fits in the specified array , it is returned therein otherwise , a new array is allocated with the runtime type of the specified array and the size of this queue if this queue fits in the specified array with room to spare ( i e , the array has more elements than this queue ) , the element in the array immediately following the end of the queue is set to < tt > null < tt > like the { @ link # to array ( ) } method , this method acts as bridge between array - based and collection - based a p is further , this method allows precise control over the runtime type of the output array , and may , under certain circumstances , be used to save allocation costs suppose < tt > x < tt > is a queue known to contain only strings the following code can be used to dump the queue into a newly allocated array of < tt > string < tt > : string [ ] y = x to array ( new string [ 0 ] ) ; note that < tt > to array ( new object [ 0 ] ) < tt > is identical in function to < tt > to array ( ) < tt >

public < t > t [ ] to array ( t [ ] a ) { final e [ ] items = this items ; final monitor monitor = this monitor ; monitor enter ( ) ; try { if ( a length < count ) a = object arrays new array ( a , count ) ; int k = 0 ; int i = take index ; while ( k < count ) { / / this cast is not itself safe , but the following statement / / will fail if the runtime type of items [ i ] is not assignable / / to the runtime type of a [ k + + ] , which is all that the method / / contract requires ( see @ throws array store exception above ) @ suppress warnings ( " unchecked " ) t t = ( t ) items [ i ] ; a [ k + + ] = t ; i = inc ( i ) ; } if ( a length > count ) a [ count ] = null ; return a ; } finally { monitor leave ( ) ; } }


determine whether the given interface is proxied

boolean is interface proxied ( class < ? > intf ) ;


create a { @ link consumer record } with the given topic name , key , value , headers , and timestamp does not auto advance internally tracked time

public consumer record < byte [ ] , byte [ ] > create ( final string topic name , final k key , final v value , final headers headers , final long timestamp ms ) { objects require non null ( topic name , " topic name cannot be null " ) ; objects require non null ( headers , " headers cannot be null " ) ; final byte [ ] serialized key = key serializer serialize ( topic name , headers , key ) ; final byte [ ] serialized value = value serializer serialize ( topic name , headers , value ) ; return new consumer record < > ( topic name , - 1 , - 1l , timestamp ms , timestamp type create time , ( long ) consumer record null checksum , serialized key = = null ? 0 : serialized key length , serialized value = = null ? 0 : serialized value length , serialized key , serialized value , headers ) ; }


set a unique number for pcode ops that are attached to the same address

public final void set time ( int t ) { seqnum set time ( t ) ; }


create a new object metadata instance any standard metadata headers are added here , for example : encryption

public object metadata new object metadata ( long length ) { return owner new object metadata ( length ) ; }


public void remote disk space usage ( ) throws exception { dumb slave s = j create slave ( ) ; slave computer c = s get computer ( ) ; c connect ( false ) get ( ) ; / / wait until it ' s connected if ( c is offline ( ) ) fail ( " slave failed to go online : " + c get log ( ) ) ; disk space du = temporary space monitor descriptor monitor ( c ) ; du to html ( ) ; assert true ( du size > 0 ) ; }


resource definitions corresponding to an android package < code > repeated aapt pb package package = 2 ; < code >

private void add package ( int index , com android aapt resources package builder builder for value ) { ensure package is mutable ( ) ; package add ( index , builder for value build ( ) ) ; }


protected i o statistics get wrapped ( ) { return wrapped ; }


return an iterable view so that this iterator can be used in for each statements important : the returned iterable is single use only

public iterable < string > as iterable ( ) { return ( ) - > path parent iterator this ; }


creates list of users with given input array

public void create users with array input test ( ) throws exception { list < user > body = cache get objects ( " / create users with array input / body " , user class ) ; api create users with array input ( body ) ; }


returns { @ code true } if the the given cipher ( in openssl format ) is for t l sv 1 3 , { @ code false } otherwise

static boolean is t l sv 1 3 cipher ( string cipher ) { / / see https : / / tools ietf org / html / rfc 8 4 4 6 # appendix - b 4 return tlsv13 ciphers contains ( cipher ) ; }


max queue size that gets passed to { @ link blocking queue } in { @ link hystrix concurrency strategy # get blocking queue ( int ) } this should only affect the instantiation of a threadpool - it is not eliglible to change a queue size on the fly for that , use { @ link # queue size rejection threshold ( ) }

public hystrix property < integer > max queue size ( ) { return max queue size ; }


matches a single path segment for whether it could be a windows short path

public static boolean is short path ( string segment ) { matcher m = pattern matcher ( segment ) ; return segment length ( ) < = 12 & & m matches ( ) & & m group count ( ) > = 2 & & ( m group ( 1 ) length ( ) + m group ( 2 ) length ( ) ) < 8 ; / / the " ~ " makes it at most 8 }


executes the task using the executor in other thread and fulfills the promise returned once the task completes either successfully or with an exception

public promise < t > fulfill in async ( final callable < t > task , executor executor ) { executor execute ( ( ) - > { try { fulfill ( task call ( ) ) ; } catch ( exception ex ) { fulfill exceptionally ( ex ) ; } } ) ; return this ; }


finds a { @ link d w a r f attribute value attribute } with a matching { @ link d w a r f attribute } type returns null if the attribute does not exist or is wrong java class type attributes are searched for in each fragment in this aggregate , starting with the ' head ' fragment , progressing toward the ' decl ' fragment

public < t extends d w a r f attribute value > t get attribute ( int attribute , class < t > clazz ) { attr info attr info = find attribute ( attribute ) ; return attr info ! = null ? attr info get value ( clazz ) : null ; }


autodetect a { @ link free marker config } object via the application context

protected free marker config autodetect configuration ( ) throws beans exception { try { return bean factory utils bean of type including ancestors ( obtain application context ( ) , free marker config class , true , false ) ; } catch ( no such bean definition exception ex ) { throw new application context exception ( " must define a single free marker config bean in this web application context " + " ( may be inherited ) : free marker configurer is the usual implementation " + " this bean may be given any name " , ex ) ; } }


public static void require non nulls ( final object objects ) { if ( objects = = null ) throw new null pointer exception ( ) ; for ( object object : objects ) { if ( object = = null ) throw new null pointer exception ( ) ; } }


set the portion of an http request to elasticsearch that can be manipulated without changing elasticsearch ' s behavior

public void set options ( request options options ) { objects require non null ( options , " options cannot be null " ) ; this options = options ; }


creates a new , empty { @ code old concurrent hash multiset } using the default initial capacity , load factor , and concurrency settings

public static < e > old concurrent hash multiset < e > create ( ) { return new old concurrent hash multiset < e > ( new concurrent hash map < e , integer > ( ) ) ; }


increment a named counter by a given value

private long increment ( string name , long value ) { return inc counter ( name , value ) ; }


gets all the { @ link abstract project } s that this user has committed to

public @ non null set < abstract project < ? , ? > > get projects ( ) { set < abstract project < ? , ? > > r = new hash set < > ( ) ; for ( abstract project < ? , ? > p : jenkins get ( ) all items ( abstract project class , p - > p has participant ( this ) ) ) r add ( p ) ; return r ; }


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


returns the start position of the first occurrence of the specified { @ code target } within { @ code array } , or { @ code - 1 } if there is no such occurrence more formally , returns the lowest index { @ code i } such that { @ code arrays copy of range ( array , i , i + target length ) } contains exactly the same elements as { @ code target }

public static int index of ( int [ ] array , int [ ] target ) { check not null ( array , " array " ) ; check not null ( target , " target " ) ; if ( target length = = 0 ) { return 0 ; } outer : for ( int i = 0 ; i < array length - target length + 1 ; i + + ) { for ( int j = 0 ; j < target length ; j + + ) { if ( array [ i + j ] ! = target [ j ] ) { continue outer ; } } return i ; } return - 1 ; }


public table debug ( debug debug ) { super set debug ( debug ! = debug none ) ; if ( this debug ! = debug ) { this debug = debug ; if ( debug = = debug none ) clear debug rects ( ) ; else invalidate ( ) ; } return this ; }


sets the connect timeout ( in milliseconds ) a value of 0 means no timeout , otherwise values must be between 1 and { @ link integer # max value }

public api client set connect timeout ( int connection timeout ) { http client = http client new builder ( ) connect timeout ( connection timeout , time unit milliseconds ) build ( ) ; return this ; }


read n bytes in big endian order and convert to long

private static long bytes to long b e ( input stream input , int n ) throws i o exception { long out = 0 ; long val ; while ( n > 0 ) { n - - ; / / store it in a long and then shift else integer overflow will occur val = input read ( ) ; out | = ( val < < ( n * 8 ) ) ; } return out ; }


public final short get index unit ( ) { return ( short ) index ; }


public map < string , set < task i d > > get filtered map ( ) { return bad nodes to filtered tasks ; }


specifies that records of the same key are joinable if their timestamps are within { @ code time difference ms } , i e , the timestamp of a record from the secondary stream is max { @ code time difference ms } earlier or later than the timestamp of the record from the primary stream

public static join windows of ( final long time difference ms ) throws illegal argument exception { / / this is a static factory method , so we initialize grace and retention to the defaults return new join windows ( time difference ms , time difference ms , - 1l , default retention ms ) ; }


handles phi uses of new objects will merge together the sources of a phi into a single escape set adds the result of the phi to the worklist so its uses can be followed

private void process phi use ( ssa insn use , escape set esc set , array list < register spec > reg worklist ) { int set index = find set index ( use get result ( ) ) ; if ( set index ! = lattice values size ( ) ) { / / check if result is in a set already escape set merge set = lattice values get ( set index ) ; if ( merge set ! = esc set ) { / / if it is , merge the sets and states , then delete the copy esc set replaceable array = false ; esc set reg set or ( merge set reg set ) ; if ( esc set escape compare to ( merge set escape ) < 0 ) { esc set escape = merge set escape ; } replace node ( esc set , merge set ) ; lattice values remove ( set index ) ; } } else { / / if no set is found , add it to this esc set and the worklist esc set reg set set ( use get result ( ) get reg ( ) ) ; reg worklist add ( use get result ( ) ) ; } }


called if the up ( or cancel ) motion event is intercepted by this layout

void on up or cancel motion event ( motion event ev ) ;


public static string read u t f ( data input in ) throws i o exception { return data input stream read u t f ( in ) ; }


remove any memory requirement that is stored for the specified data frame analytics job it doesn ' t matter if this method is called for a job that doesn ' t have a stored memory requirement

public void remove data frame analytics job ( string id ) { memory requirement by data frame analytics job remove ( id ) ; }


sets the doc to use for updates when a script is not specified

public update request doc ( index request doc ) { this doc = doc ; return this ; }


for pointer needing update , skip unaligned part ( 4 bytes ) for convenient updating

private int check skip write for pointer ( abstract paged output view out view ) throws i o exception { / / skip if there is no enough size int available = out view get segment size ( ) - out view get current position in segment ( ) ; if ( available < element point length ) { out view advance ( ) ; return available ; } return 0 ; }


synchronize client metadata state with active name node in ha the client synchronizes its state with the active name node in order to guarantee subsequent read consistency from observer nodes

public void msync ( ) throws i o exception { dfs msync ( ) ; }


for j unit testing only , set the option for resolving a conflict

void set conflict decision ( int decision ) { if ( decision < canceled | | decision > keep all ) { throw new illegal argument exception ( ) ; } conflict option = decision ; }


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


returns whether the instruction at the given offset is pushing a simple enum class

private boolean is pushing simple enum ( int offset ) { reference value reference value = partial evaluator get stack after ( offset ) get top ( 0 ) reference value ( ) ; clazz referenced class = reference value get referenced class ( ) ; return is simple enum ( referenced class ) & & ! class util is internal array type ( reference value get type ( ) ) ; }


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


builds a new { @ code file source } using a { @ link stream format } to read record - by - record from a file stream when possible , stream - based formats are generally easier ( preferable ) to file - based formats , because they support better default behavior around io batching or progress tracking ( checkpoints ) stream formats also automatically de - compress files based on the file extension this supports files ending in " deflate " ( deflate ) , " xz " ( xz ) , " bz 2 " ( b zip 2 ) , " gz " , " gzip " ( g zip )

public static < t > file source builder < t > for record stream format ( final stream format < t > reader , final path paths ) { check not null ( reader , " reader " ) ; check not null ( paths , " paths " ) ; check argument ( paths length > 0 , " paths must not be empty " ) ; final bulk format < t , file source split > bulk format = new stream format adapter < > ( reader ) ; return new file source builder < > ( paths , bulk format ) ; }


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

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


this method ensures that all mask settings in the dialog are applied to the { @ link # instructions } list

public void apply masks ( instruction table table ) { for ( int row = 0 ; row < instructions size ( ) ; row + + ) { store instruction mask ( table , row ) ; } model changed ( update type update ) ; }


public int get count ( ) { return count ; }


writes the given block the request may be executed synchronously , or asynchronously , depending on the implementation

void write block ( t block ) throws i o exception ;


create a new { @ code mock mvc html unit driver builder } based on the supplied { @ link mock mvc } instance

public static mock mvc html unit driver builder mock mvc setup ( mock mvc mock mvc ) { assert not null ( mock mvc , " mock mvc must not be null " ) ; return new mock mvc html unit driver builder ( mock mvc ) ; }


return the configuration used by this object


according to the custom enhancement file , return lass description nodes in the file

private node list resolver file class desc ( file file ) throws parser configuration exception , i o exception , s a x exception { document builder factory factory = document builder factory new instance ( ) ; document builder builder = factory new document builder ( ) ; document doc = builder parse ( file ) ; return doc get elements by tag name ( constants xml element class ) ; }


merge this stream and the given stream into one larger stream there is no ordering guarantee between records from this { @ code k stream } and records from the provided { @ code k stream } in the merged stream relative order is preserved within each input stream though ( ie , records within one input stream are processed in order )

k stream < k , v > merge ( final k stream < k , v > stream , final named named ) ;


return whether this { @ link parameter } has a empty

public boolean is empty ( ) { return ( this value = = null ) ; }


void add r type resource name ( r type r type , string resource name , string resource value , resource directory resource directory ) { map < string , set < resource directory > > directory resource directory map = null ; if ( this r type resource directory map contains key ( r type ) ) { directory resource directory map = this r type resource directory map get ( r type ) ; } else { directory resource directory map = new hash map < string , set < resource directory > > ( ) ; this r type resource directory map put ( r type , directory resource directory map ) ; } set < resource directory > resource directory set = null ; if ( directory resource directory map contains key ( resource directory directory name ) ) { resource directory set = directory resource directory map get ( resource directory directory name ) ; } else { resource directory set = new hash set < resource directory > ( ) ; directory resource directory map put ( resource directory directory name , resource directory set ) ; } boolean find = false ; resource directory new resource directory = new resource directory ( resource directory directory name , resource directory resource full filename ) ; if ( ! resource directory set contains ( new resource directory ) ) { resource directory set add ( new resource directory ) ; } for ( resource directory old resource directory : resource directory set ) { if ( old resource directory resource entry set contains ( new resource entry ( resource name , resource value ) ) ) { find = true ; string resource key = r type + " / " + resource directory directory name + " / " + resource name ; set < string > full filename set = null ; if ( ! this duplicate resource map contains key ( resource key ) ) { full filename set = new hash set < string > ( ) ; full filename set add ( old resource directory resource full filename ) ; this duplicate resource map put ( resource key , full filename set ) ; } else { full filename set = this duplicate resource map get ( resource key ) ; } full filename set add ( resource directory resource full filename ) ; } } if ( ! find ) { for ( resource directory old resource directory : resource directory set ) { if ( old resource directory equals ( new resource directory ) ) { if ( ! old resource directory resource entry set contains ( new resource entry ( resource name , resource value ) ) ) { old resource directory resource entry set add ( new resource entry ( resource name , resource value ) ) ; } } } } }


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

public void delete user ( string username ) { }


expected distance is the expected distance between client and dn 0 means local host 2 means same rack 4 means remote rack of first degree invalid script mapping config is used to test

private void test read file system statistics ( int expected distance , boolean use script mapping , boolean invalid script mapping file ) throws i o exception { mini d f s cluster cluster = null ; static mapping add node to rack ( net utils get local hostname ( ) , " / rack client " ) ; final configuration conf = get test configuration ( ) ; conf set boolean ( fs client topology resolution enabled , true ) ; / / client context is cached globally by default thus we will end up using / / the network distance computed by other test cases / / use different value for dfs client context in each test case so that it / / can compute network distance independently conf set ( dfs client context , " test context " + expected distance ) ; / / create a cluster with a dn with the expected distance / / mini d f s cluster by default uses static mapping unless the test / / overrides it if ( use script mapping ) { conf set class ( d f s config keys net topology node switch mapping impl key , script based mapping class , d n s to switch mapping class ) ; if ( invalid script mapping file ) { conf set ( d f s config keys net topology script file name key , " invalid script file txt " ) ; } cluster = new mini d f s cluster builder ( conf ) use configured topology mapping class ( true ) build ( ) ; } else if ( expected distance = = 0 ) { cluster = new mini d f s cluster builder ( conf ) hosts ( new string [ ] { net utils get local hostname ( ) } ) build ( ) ; } else if ( expected distance = = 2 ) { cluster = new mini d f s cluster builder ( conf ) racks ( new string [ ] { " / rack client " } ) build ( ) ; } else if ( expected distance = = 4 ) { cluster = new mini d f s cluster builder ( conf ) racks ( new string [ ] { " / rack foo " } ) build ( ) ; } / / create a file , read the file and verify the metrics try { final file system fs = cluster get file system ( ) ; d f s test util get statistics ( fs ) reset ( ) ; path dir = new path ( " / test " ) ; path file = new path ( dir , " file " ) ; string input = " hello world " ; d f s test util write file ( fs , file , input ) ; f s data input stream stm = fs open ( file ) ; byte [ ] actual = new byte [ 4096 ] ; stm read ( actual ) ; check read statistics ( fs , expected distance , input length ( ) ) ; } finally { if ( cluster ! = null ) cluster shutdown ( ) ; } }