public string [ ] get http methods ( ) { return this http methods ; }


reads the next { @ code length } bytes as a utf - 8 string must only be called when the position is byte aligned

public string read bytes as string ( int length ) { return read bytes as string ( length , charsets utf 8 ) ; }


close all the proxy objects which have been opened over the lifetime of this proxy provider

public synchronized void close ( ) throws i o exception { for ( t proxy : proxies values ( ) ) { if ( proxy instanceof closeable ) { ( ( closeable ) proxy ) close ( ) ; } else { rpc stop proxy ( proxy ) ; } } }


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

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


creates a new blocking - style stub that supports unary and streaming output calls on the service

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


sets the message displayed on the task monitor

void append log msg ( string message ) { log append msg ( message ) ; }


this method captures the information of a request to terminate a computer instance method is public as it needs to be called from { @ link abstract cloud slave } and { @ link jenkins model nodes } in general you should not need to call this method directly , however if implementing a custom node type or a different path for removing nodes , it may make sense to call this method in order to capture the originating request

public void record termination ( ) { stapler request request = stapler get current request ( ) ; if ( request ! = null ) { terminated by add ( new termination request ( string format ( " termination requested at % s by % s [ id = % d ] from http request for % s " , new date ( ) , thread current thread ( ) , thread current thread ( ) get id ( ) , request get request u r l ( ) ) ) ) ; } else { terminated by add ( new termination request ( string format ( " termination requested at % s by % s [ id = % d ] " , new date ( ) , thread current thread ( ) , thread current thread ( ) get id ( ) ) ) ) ; } }


the main method of the bazel java builder

public static void main ( string [ ] args ) { bazel java builder builder = new bazel java builder ( ) ; if ( args length = = 1 & & args [ 0 ] equals ( " - - persistent worker " ) ) { work request handler worker handler = new work request handler ( builder : : parse and build , system err , new proto worker message processor ( system in , system out ) ) ; try { worker handler process requests ( ) ; } catch ( i o exception e ) { system err println ( e get message ( ) ) ; system exit ( 1 ) ; } } else { print writer pw = new print writer ( new output stream writer ( system err , charset default charset ( ) ) ) ; int return code ; try { return code = builder parse and build ( arrays as list ( args ) , pw ) ; } finally { pw flush ( ) ; } system exit ( return code ) ; } }


returns a string resulting from replacing all substrings that match the regular expression with replacement

public static string regexp replace ( string str , string regex , string replacement ) { if ( str = = null | | regex = = null | | replacement = = null ) { return null ; } try { return str replace all ( regex , matcher quote replacement ( replacement ) ) ; } catch ( exception e ) { log error ( string format ( " exception in regexp replace ( ' % s ' , ' % s ' , ' % s ' ) " , str , regex , replacement ) , e ) ; / / return null if exception in regex replace return null ; } }


creates a new { @ link request options } instance

public static request options mock request options ( ) { return mock glide options ( request options class ) ; }


protected string encrypt resolved username ( final principal principal , final service service , final registered service registered service , final string username ) { val application context = application context provider get application context ( ) ; val cipher = application context get bean ( registered service cipher executor default bean name , registered service cipher executor class ) ; return cipher encode ( username , optional of ( registered service ) ) ; }


authenticate request and produce a response

protected abstract radius response authenticate request ( radius client client , access request access request ) throws exception ;


< code > optional second msg blah = 2 ; < code >

public org springframework protobuf second msg get blah ( ) { if ( blah builder = = null ) { return blah ; } else { return blah builder get message ( ) ; } }


patch fake classname test : to test class name in snake case to test class name in snake case

response entity < client > test classname ( @ api param ( value = " client model " , required = true ) @ valid @ request body client body ) ;


sets the { @ link standard socket options # so reuseaddr } option

server socket channel config set reuse address ( boolean reuse address ) ;


checks that the given argument is neither null nor empty if it is , throws { @ link null pointer exception } or { @ link illegal argument exception } otherwise , returns the argument

public static < t > t [ ] check non empty ( t [ ] array , string name ) { check not null ( array , name ) ; check positive ( array length , name + " length " ) ; return array ; }


tests the basic functionality of the async wait operator : processing a limited stream of elements by doubling their value this is tested in for the ordered and unordered mode

public void test async wait operator ( ) throws exception { final int num elements = 5 ; final long timeout = 1000l ; stream execution environment env = stream execution environment get execution environment ( ) ; data stream < tuple 2 < integer , non serializable > > input = env add source ( new non serializable tuple source ( num elements ) ) ; async function < tuple 2 < integer , non serializable > , integer > function = new rich async function < tuple 2 < integer , non serializable > , integer > ( ) { private static final long serial version u i d = 7000343199829487985l ; transient executor service executor service ; @ override public void open ( configuration parameters ) throws exception { super open ( parameters ) ; executor service = executors new fixed thread pool ( num elements ) ; } @ override public void close ( ) throws exception { super close ( ) ; executor service shutdown now ( ) ; } @ override public void async invoke ( final tuple 2 < integer , non serializable > input , final result future < integer > result future ) throws exception { executor service submit ( new runnable ( ) { @ override public void run ( ) { result future complete ( collections singleton list ( input f 0 + input f 0 ) ) ; } } ) ; } } ; data stream < integer > ordered result = async data stream ordered wait ( input , function , timeout , time unit milliseconds , 2 ) set parallelism ( 1 ) ; / / save result from ordered process final memory sink function sink function 1 = new memory sink function ( 0 ) ; final list < integer > actual result 1 = new array list < > ( num elements ) ; memory sink function register collection ( 0 , actual result 1 ) ; ordered result add sink ( sink function 1 ) set parallelism ( 1 ) ; data stream < integer > unordered result = async data stream unordered wait ( input , function , timeout , time unit milliseconds , 2 ) ; / / save result from unordered process final memory sink function sink function 2 = new memory sink function ( 1 ) ; final list < integer > actual result 2 = new array list < > ( num elements ) ; memory sink function register collection ( 1 , actual result 2 ) ; unordered result add sink ( sink function 2 ) ; collection < integer > expected = new array list < > ( 10 ) ; for ( int i = 0 ; i < num elements ; i + + ) { expected add ( i + i ) ; } env execute ( ) ; assert assert equals ( expected , actual result 1 ) ; collections sort ( actual result 2 ) ; assert assert equals ( expected , actual result 2 ) ; memory sink function clear ( ) ; }


sets the minimum width that the axis should take ( in dp )

public void set min width ( float min width ) { m min width = min width ; }


asserts that there were no verification errors during the current test , failing immediately if any are found

public void check for verification errors ( ) { stb check for verification errors ( ) ; }


merge the given properties instance into the given map , copying all properties ( key - value pairs ) over uses { @ code properties property names ( ) } to even catch default properties linked into the original properties instance

public static < k , v > void merge properties into map ( @ nullable properties props , map < k , v > map ) { if ( props ! = null ) { for ( enumeration < ? > en = props property names ( ) ; en has more elements ( ) ; ) { string key = ( string ) en next element ( ) ; object value = props get ( key ) ; if ( value = = null ) { / / allow for defaults fallback or potentially overridden accessor value = props get property ( key ) ; } map put ( ( k ) key , ( v ) value ) ; } } }


return whether a transaction was created by this aspect , or whether we just have a placeholder to keep thread local stack integrity

public boolean has transaction ( ) { return ( this transaction status ! = null ) ; }


compute the bits required to represent pth percentile value

static int percentile bits ( long [ ] data , int offset , int length , double percentile ) { check argument ( percentile < = 1 0 & & percentile > 0 0 ) ; / / histogram that store the encoded bit requirement for each values / / maximum number of bits that can encoded is 32 ( refer fixed bit sizes ) int [ ] hist = new int [ 32 ] ; / / compute the histogram for ( int i = offset ; i < ( offset + length ) ; i + + ) { int idx = encode bit width ( find closest num bits ( data [ i ] ) ) ; hist [ idx ] + = 1 ; } int per len = ( int ) ( length * ( 1 0 - percentile ) ) ; / / return the bits required by pth percentile length for ( int i = hist length - 1 ; i > = 0 ; i - - ) { per len - = hist [ i ] ; if ( per len < 0 ) { return decode bit width ( i ) ; } } return 0 ; }


protected static response entity build unauthorized response entity ( final string code ) { val map = new linked multi value map < string , string > ( 1 ) ; map add ( o auth 2 0 constants error , code ) ; val value = o auth 2 0 utils to json ( map ) ; return new response entity < > ( value , http status unauthorized ) ; }


called by { @ link run map } to obtain a reference to this run

protected @ non null build reference < run t > create reference ( ) { return new build reference < > ( get id ( ) , this ( ) ) ; }


public method get commit method ( ) { return commit method ; }


resolves relative symlinks and puts them in the { @ code entries } map note that { @ code relative links } should only contain entries in { @ link relative symlink behavior # resolve } or { @ link relative symlink behavior # resolve fully } mode

private static void resolve relative symlinks ( map < path fragment , string > entries , map < path fragment , string > relative links , boolean absolute , relative symlink behavior rel symlink behavior ) throws i o exception { if ( rel symlink behavior = = relative symlink behavior resolve fully & & ! relative links is empty ( ) ) { fully resolve relative symlinks ( entries , relative links , absolute ) ; } else if ( rel symlink behavior = = relative symlink behavior resolve ) { for ( map entry < path fragment , string > e : relative links entry set ( ) ) { path fragment location = e get key ( ) ; string value = e get value ( ) ; string actual = preconditions check not null ( value , e ) ; preconditions check state ( ! actual starts with ( " / " ) , e ) ; path fragment actual location = location ; / / recursively resolve relative symlinks linked hash set < string > seen = new linked hash set < > ( ) ; int traversals = 0 ; do { actual location = actual location get parent directory ( ) get relative ( actual ) ; actual = relative links get ( actual location ) ; } while ( + + traversals < = max symlink traversals & & actual ! = null & & seen add ( actual ) ) ; if ( traversals > = max symlink traversals ) { logger at warning ( ) log ( " symlink % s is part of a chain of length at least % d " + " which exceeds blaze ' s maximum allowable symlink chain length " , location , traversals ) ; } else if ( actual ! = null ) { / / todo ( b / 113128395 ) : throw here logger at warning ( ) log ( " symlink % s forms a symlink cycle : % s " , location , seen ) ; } else if ( ! entries contains key ( actual location ) ) { / / we ' ve found a relative symlink that points out of the fileset we should really always / / throw here , but current behavior is that we tolerate such symlinks when they occur in / / runfiles , which is the only time this code is hit / / todo ( b / 113128395 ) : throw here logger at warning ( ) log ( " symlink % s ( transitively ) points to % s " + " that is not in this fileset ( or was pruned because of a cycle ) " , location , actual location ) ; } else { / / we have successfully resolved the symlink entries put ( location , entries get ( actual location ) ) ; } } } }


required : a list of server specifications < code > repeated istio networking v 1alpha 3 server servers = 1 ; < code >

public builder add servers ( com alibaba nacos istio model server value ) { if ( servers builder = = null ) { if ( value = = null ) { throw new null pointer exception ( ) ; } ensure servers is mutable ( ) ; servers add ( value ) ; on changed ( ) ; } else { servers builder add message ( value ) ; } return this ; }


ors bit array { @ code b } into bit array { @ code a } { @ code a length } must be greater than or equal to { @ code b length }

public static void or ( int [ ] a , int [ ] b ) { for ( int i = 0 ; i < b length ; i + + ) { a [ i ] | = b [ i ] ; } }


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

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


static timeline event create event ( long timestamp , string type , map < string , object > info ) { timeline event event = new timeline event ( ) ; event set timestamp ( timestamp ) ; event set event type ( type ) ; event set event info ( info ) ; return event ; }


returns the queue that the entry ' s resides in ( window , probation , or protected )

public int get queue type ( ) { return window ; }


public void remove branch session test ( global session global session , branch session branch session ) throws exception { for ( session manager session manager : session manager list ) { session manager add global session ( global session ) ; session manager add branch session ( global session , branch session ) ; session manager remove branch session ( global session , branch session ) ; session manager remove global session ( global session ) ; } }


determine whether the given two { @ link connection } s are equal , asking the target { @ link connection } in case of a proxy used to detect equality even if the user passed in a raw target connection while the held one is a proxy

private static boolean connection equals ( connection holder con holder , connection passed in con ) { if ( ! con holder has connection ( ) ) { return false ; } connection held con = con holder get connection ( ) ; / / explicitly check for identity too : for connection handles that do not implement / / " equals " properly ) return ( held con = = passed in con | | held con equals ( passed in con ) | | get target connection ( held con ) equals ( passed in con ) ) ; }


applies this function to the given arguments


create a new { @ link channel } and register it with an { @ link event loop }

public channel future register ( ) { validate ( ) ; return init and register ( ) ; }


file { @ code version } from the { @ code previous } directory

public file get previous version file ( ) { if ( root = = null ) { return null ; } return new file ( new file ( root , storage dir previous ) , storage file version ) ; }


recycle this instance and return the { @ link promise }

public promise < void > recycle and get ( ) { promise < void > promise = this promise ; recycle ( ) ; return promise ; }


compare if this object is equal to another object

public boolean equals ( object o ) { return super equals ( o ) ; }


initialize registry d n s to use etcresolv conf values as default resolvers

private void update d n s server ( configuration conf ) { synchronized ( resolver update lock ) { if ( ! resolver update requested ) { return ; } int port = conf get int ( key dns port , default dns port ) ; resolver update requested = false ; list < inet address > list = new array list < inet address > ( ) ; try { / / if resolv conf contains the server ' s own ip address , / / and registry d n s handles the lookup local ip address / / must be filter out from default resolvers to prevent / / self recursive loop if ( port ! = 53 ) { / / when registry d n s is not running on default port , / / registry d n s can utilize local dns server as upstream lookup throw new socket exception ( " bypass filtering local dns server " ) ; } enumeration < network interface > net = network interface get network interfaces ( ) ; while ( net has more elements ( ) ) { network interface n = ( network interface ) net next element ( ) ; enumeration < inet address > ee = n get inet addresses ( ) ; while ( ee has more elements ( ) ) { inet address i = ( inet address ) ee next element ( ) ; list add ( i ) ; } } } catch ( socket exception e ) { } resolver config refresh ( ) ; extended resolver resolver ; try { resolver = new extended resolver ( ) ; } catch ( unknown host exception e ) { log error ( " can not resolve dns servers : " , e ) ; return ; } for ( resolver check : resolver get resolvers ( ) ) { if ( check instanceof simple resolver ) { inet address address = ( ( simple resolver ) check ) get address ( ) get address ( ) ; if ( list contains ( address ) ) { resolver delete resolver ( check ) ; continue ; } else { check set timeout ( 30 ) ; } } else { log error ( " not simple resolver ! ! ! ? " + check ) ; } } synchronized ( lookup class ) { lookup set default resolver ( resolver ) ; lookup set default search path ( resolver config get current config ( ) search path ( ) ) ; } string builder message = new string builder ( ) ; message append ( " dns servers : " ) ; if ( resolver config get current config ( ) servers ( ) ! = null ) { for ( string server : resolver config get current config ( ) servers ( ) ) { message append ( server ) ; message append ( " " ) ; } } log info ( message to string ( ) ) ; } }


the number of unassigned shards that are currently being delayed ( for example , due to node leaving the cluster and waiting for a timeout for the node to come back in order to allocate the shards back to it )

public int get delayed unassigned shards ( ) { return this delayed unassigned shards ; }


returns the { @ link values source } for this configuration

values source values source ( ) { return vs ; }


suspends the timer so it will no longer poll this does not perform a shutdown , so the future may be scheduled again

public void stop ( ) { future cancel ( false ) ; }


add a new profiling snapshot , send to { @ link # snapshot queue }

public void add profiling snapshot ( tracing thread snapshot snapshot ) { snapshot queue add ( snapshot ) ; }


performs the opening handshake when call this method you must not retain the { @ link http request } which is passed in

public final channel future handshake ( final channel channel , http request req , final http headers response headers , final channel promise promise ) { if ( req instanceof full http request ) { return handshake ( channel , ( full http request ) req , response headers , promise ) ; } if ( logger is debug enabled ( ) ) { logger debug ( " { } web socket version { } server handshake " , channel , version ( ) ) ; } channel pipeline p = channel pipeline ( ) ; channel handler context ctx = p context ( http request decoder class ) ; if ( ctx = = null ) { / / this means the user use an http server codec ctx = p context ( http server codec class ) ; if ( ctx = = null ) { promise set failure ( new illegal state exception ( " no http decoder and no http server codec in the pipeline " ) ) ; return promise ; } } / / add aggregator and ensure we feed the http request so it is aggregated a limit o 8192 should be more then / / enough for the websockets handshake payload / / / / todo : make handshake work without http object aggregator at all string aggregator name = " http aggregator " ; p add after ( ctx name ( ) , aggregator name , new http object aggregator ( 8192 ) ) ; p add after ( aggregator name , " handshaker " , new simple channel inbound handler < full http request > ( ) { @ override protected void channel read 0 ( channel handler context ctx , full http request msg ) throws exception { / / remove ourself and do the actual handshake ctx pipeline ( ) remove ( this ) ; handshake ( channel , msg , response headers , promise ) ; } @ override public void exception caught ( channel handler context ctx , throwable cause ) throws exception { / / remove ourself and fail the handshake promise ctx pipeline ( ) remove ( this ) ; promise try failure ( cause ) ; ctx fire exception caught ( cause ) ; } @ override public void channel inactive ( channel handler context ctx ) throws exception { / / fail promise if channel was closed if ( ! promise is done ( ) ) { promise try failure ( new closed channel exception ( ) ) ; } ctx fire channel inactive ( ) ; } } ) ; try { ctx fire channel read ( reference count util retain ( req ) ) ; } catch ( throwable cause ) { promise set failure ( cause ) ; } return promise ; }


returns the type for the return value type

public abstract ms type get return type ( ) { return pdb get type record ( return value record number ) ; }


remove the vertex returned by the most recent call to next ( )

public boolean remove ( ) throws concurrent modification exception { boolean removed ; if ( set modification number ! = get modification number ( ) ) { throw new concurrent modification exception ( " set modified " ) ; } removed = vertex set this remove ( get by index ( current position ) ) ; set modification number = get modification number ( ) ; return removed ; }


public void triangle type test ( ) { / / todo : test triangle type }


protected http status execute logout redirect ( final optional < string > state , final optional < string > redirect url , final optional < string > client id , final http servlet request request , final http servlet response response ) { redirect url if present ( url - > { val builder = uri components builder from http url ( url ) ; state if present ( st - > builder query param ( o auth 2 0 constants state , st ) ) ; client id if present ( id - > builder query param ( o auth 2 0 constants client id , id ) ) ; val logout url = builder build ( ) to uri string ( ) ; logger debug ( " final logout redirect url is [ { } ] " , logout url ) ; web utils put logout redirect url ( request , logout url ) ; } ) ; request get servlet context ( ) get request dispatcher ( cas protocol constants endpoint logout ) forward ( request , response ) ; return http status permanent redirect ; }


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

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


wrap the given connection with a proxy that delegates every method call to it but suppresses close calls this is useful for allowing application code to handle a special framework connection just like an ordinary connection from a jms connection factory

protected connection get shared connection proxy ( connection target ) { list < class < ? > > classes = new array list < > ( 3 ) ; classes add ( connection class ) ; if ( target instanceof queue connection ) { classes add ( queue connection class ) ; } if ( target instanceof topic connection ) { classes add ( topic connection class ) ; } return ( connection ) proxy new proxy instance ( connection class get class loader ( ) , class utils to class array ( classes ) , new shared connection invocation handler ( ) ) ; }


add the given background command to a queue that is processed after the main background command completes

public void schedule follow on command ( background command cmd , undoable domain object obj ) { task mgr schedule follow on command ( cmd , obj ) ; }


gets the double array for the given name

public double [ ] get doubles ( string name , double [ ] default value ) { return map contains key ( name ) ? ( double [ ] ) map get ( name ) : default value ; }


subclasses should invoke this method to set the result of the computation to { @ code value } this will set the state of the future to { @ link old abstract future sync # completed } and invoke the listeners if the state was successfully changed

protected boolean set ( @ nullable v value ) { boolean result = sync set ( value ) ; if ( result ) { execution list execute ( ) ; } return result ; }


scr 3962 - in this mode we allow the user to press enter o k with no text in the text field , which means to user the current directory as the selected dir

private boolean is special current directory selection ( file file ) { if ( ! is directories only ( ) ) { return false ; } file current directory = current directory ( ) ; string text = filename text field get text ( ) ; boolean no user text = text = = null | | text is empty ( ) ; return file equals ( current directory ) & & no user text ; }


base 6 4 encoded sha - 512 checksum of the downloaded file , if it could be computed

public string get computed s h a 5 1 2 ( ) { return computed s h a 5 1 2 ; }


adds runfiles inputs from runfiles supplier to input mappings

public map < path fragment , action input > add runfiles to inputs ( runfiles supplier runfiles supplier , metadata provider action file cache , artifact expander artifact expander ) throws i o exception { map < path fragment , action input > input map = new hash map < > ( ) ; add runfiles to inputs ( input map , runfiles supplier , action file cache , artifact expander ) ; return input map ; }


find the first occurred tab in a utf - 8 encoded string

public static int find tab ( byte [ ] utf , int start , int length ) { for ( int i = start ; i < ( start + length ) ; i + + ) { if ( utf [ i ] = = ( byte ) ' \ t ' ) { return i ; } } return - 1 ; }


public static boolean is startable ( docker container status container status ) { if ( container status equals ( docker container status exited ) | | container status equals ( docker container status stopped ) ) { return true ; } return false ; }


this test verifies the behaviour when the channel gets closed the channel is expected to be removed and all of its corresponding tasks get cancelled

public void test cancelled tasks ( ) throws exception { try ( test client node client = new test client ( settings empty , thread pool , true ) ) { int initial http channels = rest cancellable node client get num channels ( ) ; int num channels = random int between ( 1 , 30 ) ; int total searches = 0 ; list < test http channel > channels = new array list < > ( num channels ) ; for ( int i = 0 ; i < num channels ; i + + ) { test http channel channel = new test http channel ( ) ; channels add ( channel ) ; int num tasks = random int between ( 1 , 30 ) ; total searches + = num tasks ; rest cancellable node client client = new rest cancellable node client ( node client , channel ) ; for ( int j = 0 ; j < num tasks ; j + + ) { client execute ( search action instance , new search request ( ) , null ) ; } assert equals ( num tasks , rest cancellable node client get num tasks ( channel ) ) ; } assert equals ( initial http channels + num channels , rest cancellable node client get num channels ( ) ) ; for ( test http channel channel : channels ) { channel await close ( ) ; } assert equals ( initial http channels , rest cancellable node client get num channels ( ) ) ; assert equals ( total searches , node client search requests get ( ) ) ; assert equals ( total searches , node client cancelled tasks size ( ) ) ; } }


build a { @ code singleton supplier } with the given supplier

public static < t > singleton supplier < t > of nullable ( @ nullable supplier < t > supplier ) { return ( supplier ! = null ? new singleton supplier < > ( supplier ) : null ) ; }


parses the origin ( caller ) from dubbo invocation

string parse ( invoker < ? > invoker , invocation invocation ) ;


convenience method , so that we don ' t open a new connection when using this method from within another method otherwise every api invocation incurs the overhead of openingclosing a tcp connection

private boolean delete ( channel sftp channel , path file , boolean recursive ) throws i o exception { path work dir ; try { work dir = new path ( channel pwd ( ) ) ; } catch ( sftp exception e ) { throw new i o exception ( e ) ; } path absolute = make absolute ( work dir , file ) ; string path name = absolute to uri ( ) get path ( ) ; file status file stat = null ; try { file stat = get file status ( channel , absolute ) ; } catch ( file not found exception e ) { / / file not found , no need to delete , return true return false ; } if ( ! file stat is directory ( ) ) { boolean status = true ; try { channel rm ( path name ) ; } catch ( sftp exception e ) { status = false ; } return status ; } else { boolean status = true ; file status [ ] dir entries = list status ( channel , absolute ) ; if ( dir entries ! = null & & dir entries length > 0 ) { if ( ! recursive ) { throw new i o exception ( string format ( e dir notempty , file ) ) ; } for ( int i = 0 ; i < dir entries length ; + + i ) { delete ( channel , new path ( absolute , dir entries [ i ] get path ( ) ) , recursive ) ; } } try { channel rmdir ( path name ) ; } catch ( sftp exception e ) { status = false ; } return status ; } }


return a { @ link resolvable type } for the specified nesting level the nesting level refers to the specific generic parameter that should be returned a nesting level of 1 indicates this type ; 2 indicates the first nested generic ; 3 the second ; and so on for example , given { @ code list < set < integer > > } level 1 refers to the { @ code list } , level 2 the { @ code set } , and level 3 the { @ code integer } the { @ code type indexes per level } map can be used to reference a specific generic for the given level for example , an index of 0 would refer to a { @ code map } key ; whereas , 1 would refer to the value if the map does not contain a value for a specific level the last generic will be used ( e g a { @ code map } value ) nesting levels may also apply to array types ; for example given { @ code string [ ] } , a nesting level of 2 refers to { @ code string } if a type does not { @ link # has generics ( ) contain } generics the { @ link # get super type ( ) supertype } hierarchy will be considered

public resolvable type get nested ( int nesting level , @ nullable map < integer , integer > type indexes per level ) { resolvable type result = this ; for ( int i = 2 ; i < = nesting level ; i + + ) { if ( result is array ( ) ) { result = result get component type ( ) ; } else { / / handle derived types while ( result ! = resolvable type none & & ! result has generics ( ) ) { result = result get super type ( ) ; } integer index = ( type indexes per level ! = null ? type indexes per level get ( i ) : null ) ; index = ( index = = null ? result get generics ( ) length - 1 : index ) ; result = result get generic ( index ) ; } } return result ; }


sets the default value of ' testonly ' rule - level ' testonly ' will override this

builder set default testonly ( boolean default testonly ) { pkg set default test only ( default testonly ) ; return this ; }


get the ( possibly html ) text to display for the item

public string get display ( ) { return display ; }


typed version of the { @ link # get variable ( string ) } method

< t > t get variable ( string variable name , class < t > variable class ) ;


public final int length ( ) { return longs length ( ) ; }


see original { @ link stubber # do nothing ( ) }


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

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


return true - if there are still valid volumes on the data node

public boolean has enough resource ( ) { if ( vol failures tolerated = = data node max volume failure tolerated limit ) { / / if vol failures tolerated configured max volume failure limit then minimum / / one volume is required return volumes get volumes ( ) size ( ) > = 1 ; } else { return get num failed volumes ( ) < = vol failures tolerated ; } }


converts a command string into a list of arguments

static linked list < string > get args ( string cmd ) { return new linked list < string > ( arrays as list ( cmd split ( " " ) ) ) ; }


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


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


blocks until the event becomes the signaled state if the specified amount of time elapses , this method returns null even if the value isn ' t offered

public void block ( long timeout ) throws interrupted exception { synchronized ( lock ) { if ( ! signaled ) lock wait ( timeout ) ; } }


create the highlighters ( { @ code paintable } s to show which vertices have been selected or focused )

private void build highlighers ( ) { / / for highlighting of multiple selected vertices multi selected vertex paintable < attributed vertex , attributed edge > multi selected vertex paintable = multi selected vertex paintable builder ( viewer ) selection stroke min ( 4 f ) selection paint ( color red ) use bounds ( false ) build ( ) ; / / manages highlight painting of a single selected vertex single selected vertex paintable < attributed vertex , attributed edge > single selected vertex paintable = single selected vertex paintable builder ( viewer ) selection stroke min ( 4 f ) selection paint ( color red ) selected vertex function ( vs - > this focused vertex ) build ( ) ; / / draws the selection highlights viewer add post render paintable ( multi selected vertex paintable ) ; / / draws the location arrow viewer add post render paintable ( single selected vertex paintable ) ; }


show the given tooltip with the specified offsets from the bottom - left corner of the root component

public static void show tooltip on root component ( component context c , final popup window popup window , int x offset , int y offset ) { show tooltip ( c , popup window , null , x offset , y offset ) ; }


copy an anon datatype ( or a chain of pointers to a anon data type ) into a new category path with a new name that is appropriate for a structure member field use this method when a struct has a field with an anon datatype the new copied datatype will be called " anonorigname for structurefieldname "

private data type copy anon type for member ( data type dt , category path dest category , string membername ) { list < pointer > ptr chain types = new array list < > ( ) ; data type actual d t = dt ; while ( actual d t instanceof pointer ) { ptr chain types add ( ( pointer ) actual d t ) ; actual d t = ( ( pointer ) actual d t ) get data type ( ) ; } if ( actual d t get category path ( ) equals ( dest category ) ) { return dt ; } data type copy = actual d t copy ( data type manager ) ; try { copy set name and category ( dest category , copy get name ( ) + " for " + membername ) ; } catch ( invalid name exception | duplicate name exception e ) { msg error ( this , " failed to copy anon type " + dt ) ; return dt ; } data type result = copy ; for ( int i = ptr chain types size ( ) - 1 ; i > = 0 ; i - - ) { pointer orig ptr = ptr chain types get ( i ) ; result = new pointer data type ( result , orig ptr is dynamically sized ( ) ? - 1 : orig ptr get length ( ) , data type manager ) ; } return result ; }


get an array of objects that implement the given interface class

public < t > t [ ] get services ( class < t > interface class ) { list < object > list = services by interface get ( interface class ) ; if ( list = = null ) { return ( t [ ] ) java lang reflect array new instance ( interface class , 0 ) ; } t [ ] objs = ( t [ ] ) java lang reflect array new instance ( interface class , list size ( ) ) ; return list to array ( objs ) ; }


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


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

@ override public t visit arguments ( painless parser arguments context ctx ) { return visit children ( ctx ) ; }


returns a permission that represents this privilege only when building a role ( or role - like object ) that has many privileges , it is more efficient to build a shared permission using the { @ link # build permission ( cluster permission builder ) } method instead this method is intended to allow callers to interrogate the runtime permissions specifically granted by this privilege it is acceptable ( and encouraged ) for implementations of this method to cache ( or precompute ) the { @ link cluster permission } and return the same object on each call


private path make absolute ( path work dir , path path ) { if ( path is absolute ( ) ) { return path ; } return new path ( work dir , path ) ; }


public void logout user test ( test context context ) { async async = context async ( ) ; api logout user ( result - > { / / todo : test validations async complete ( ) ; } ) ; }


creates a { @ link private key } from the contents of { @ code b reader } that contains an ec private key encoded in open s s l traditional format

private static private key parse open ssl e c ( buffered reader b reader , supplier < char [ ] > password supplier ) throws i o exception , general security exception { string builder sb = new string builder ( ) ; string line = b reader read line ( ) ; map < string , string > pem headers = new hash map < > ( ) ; while ( line ! = null ) { if ( openssl ec footer equals ( line trim ( ) ) ) { break ; } / / parse pem headers according to https : / / www ietf org / rfc / rfc 1 4 2 1 txt if ( line contains ( " : " ) ) { string [ ] header = line split ( " : " ) ; pem headers put ( header [ 0 ] trim ( ) , header [ 1 ] trim ( ) ) ; } else { sb append ( line trim ( ) ) ; } line = b reader read line ( ) ; } if ( null = = line | | openssl ec footer equals ( line trim ( ) ) = = false ) { throw new i o exception ( " malformed pem file , pem footer is invalid or missing " ) ; } byte [ ] key bytes = possibly decrypt p k c s 1 key ( pem headers , sb to string ( ) , password supplier ) ; key factory key factory = key factory get instance ( " ec " ) ; e c private key spec ec spec = parse ec der ( key bytes ) ; return key factory generate private ( ec spec ) ; }


assert that timestamps are converted correctly , ticket hadoop - 11182

public void test put metrics 3 ( ) { / / setup graphite sink graphite sink sink = new graphite sink ( ) ; final graphite sink graphite mock graphite = make graphite ( ) ; whitebox set internal state ( sink , " graphite " , mock graphite ) ; / / given two metrics records with timestamps 1000 milliseconds apart list < metrics tag > tags = collections empty list ( ) ; set < abstract metric > metrics = new hash set < abstract metric > ( ) ; metrics add ( make metric ( " foo 1 " , 1 ) ) ; metrics record record 1 = new metrics record impl ( ms info context , 1000000000000l , tags , metrics ) ; metrics record record 2 = new metrics record impl ( ms info context , 1000000001000l , tags , metrics ) ; sink put metrics ( record 1 ) ; sink put metrics ( record 2 ) ; sink flush ( ) ; try { sink close ( ) ; } catch ( i o exception e ) { e print stack trace ( ) ; } / / then the timestamps in the graphite stream should differ by one second try { verify ( mock graphite ) write ( eq ( " null default context foo 1 1 1000000000 \ n " ) ) ; verify ( mock graphite ) write ( eq ( " null default context foo 1 1 1000000001 \ n " ) ) ; } catch ( i o exception e ) { e print stack trace ( ) ; } }


statuses of the sub requests into which this sub - request was sliced empty if this request wasn ' t sliced into sub - requests

public list < status or exception > get slice statuses ( ) { return slice statuses ; }


convert a string to an int treating empty strings as the default value

private static int convert to int ( string value , int default value ) { string trim = value trim ( ) ; if ( trim length ( ) = = 0 ) { return default value ; } return integer parse int ( trim ) ; }


construct the preferred type of sequence file writer

public static writer create writer ( file system fs , configuration conf , path name , class key class , class val class , compression type compression type , compression codec codec , progressable progress ) throws i o exception { return create writer ( conf , writer file ( name ) , writer filesystem ( fs ) , writer key class ( key class ) , writer value class ( val class ) , writer compression ( compression type , codec ) , writer progressable ( progress ) ) ; }


gets the project metadata from memory requires that the metadata has already been loaded from the data store

public project metadata get project metadata ( string name ) { for ( project metadata pm : projects metadata values ( ) ) { if ( pm get name ( ) equals ( name ) ) { return pm ; } } return null ; }


serialize a pojo object into a json string not in a pretty format

public static string dump timeline recordto j s o n ( object o ) throws json generation exception , json mapping exception , i o exception { return dump timeline recordto j s o n ( o , false ) ; }


returns whether the buffer being processed should be dropped

protected boolean should drop output buffer ( long early us , long elapsed realtime us ) { return is buffer late ( early us ) ; }


this will calibrate the algorithm such that a single invocation of { @ link # compute ( ) } emulates roughly 1 % of the total desired resource usage value

public void calibrate ( resource calculator plugin monitor , long total cpu usage ) { long init time = monitor get cumulative cpu time ( ) ; long default loop size = 0 ; long final time = init time ; / / todo make this configurable while ( final time - init time < 100 ) { / / 100 ms + + default loop size ; perform unit computation ( ) ; / / perform unit computation final time = monitor get cumulative cpu time ( ) ; } long reference runtime = final time - init time ; / / time for one loop = ( final - time - init - time ) / total - loops float time per loop = ( ( float ) reference runtime ) / default loop size ; / / compute the 1 % of the total cpu usage desired / / todo make this configurable long one percent = total cpu usage / 100 ; / / num - iterations for 1 % = ( total - desired - usage / 100 ) / time - for - one - loop num iterations = math max ( 1 , ( int ) ( ( float ) one percent / time per loop ) ) ; system out println ( " calibration done basic computation runtime : " + time per loop + " milliseconds optimal number of iterations ( 1 % ) : " + num iterations ) ; }


see { @ link file status # set path ( path ) }


revert a pending commit by deleting the destination

public void revert commit ( single pending commit commit , bulk operation state operation state ) throws i o exception { log info ( " revert { } " , commit ) ; try { write operations revert commit ( commit get destination key ( ) , operation state ) ; } finally { statistics commit reverted ( ) ; } }


tells the heartbeat and handler threads to stop and waits for them to terminate

protected void service stop ( ) throws exception { keep running = false ; heartbeat thread interrupt ( ) ; try { heartbeat thread join ( ) ; } catch ( interrupted exception ex ) { log error ( " error joining with heartbeat thread " , ex ) ; } client stop ( ) ; handler thread interrupt ( ) ; super service stop ( ) ; }


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


public void test body with query params ( string query , user body ) throws rest client exception { test body with query params with http info ( query , body ) ; }


create a new { @ link channel } that will call { @ code interceptors } before starting a call on the given channel the last interceptor will have its { @ link client interceptor # intercept call } called first

public static channel intercept ( channel channel , client interceptor interceptors ) { return intercept ( channel , arrays as list ( interceptors ) ) ; }


" runs " the indicated opcode in an appropriate way , using the arguments area as appropriate , and modifying the given frame in response

public void run ( frame frame , int offset , int opcode ) ;


protected abstract boolean is write possible ( ) ;


public void write ( digraph < t > graph , @ nullable conditional edges conditional edges , output stream out ) { print writer print writer = new print writer ( new output stream writer ( out , utf 8 ) ) ; if ( merge equivalent nodes ) { output factored ( graph , conditional edges , print writer ) ; } else { output unfactored ( graph , conditional edges , print writer ) ; } }


an additional explanation to append to the generic error message when a user attempts to use this option should explain why this option is unavailable if null , no content will be appended to the generic error message

public string get error message ( ) { return error message ; }


concatenates multiple { @ link char source } instances into a single source streams returned from the source will contain the concatenated data from the streams of the underlying sources only one underlying stream will be open at a time closing the concatenated stream will close the open underlying stream note : the input { @ code iterator } will be copied to an { @ code immutable list } when this method is called this will fail if the iterator is infinite and may cause problems if the iterator eagerly fetches data for each source when iterated ( rather than producing sources that only load data through their streams ) prefer using the { @ link # concat ( iterable ) } overload if possible

public static char source concat ( iterator < ? extends char source > sources ) { return concat ( immutable list copy of ( sources ) ) ; }


get the number of times { @ link # next ( ) } will return a distinct element before repeating or terminating


opens a new buffered { @ link writer } for writing to this sink the returned stream is not required to be a { @ link buffered writer } in order to allow implementations to simply delegate to { @ link # open stream ( ) } when the stream returned by that method does not benefit from additional buffering this method returns a new , independent writer each time it is called the caller is responsible for ensuring that the returned writer is closed

public writer open buffered stream ( ) throws i o exception { writer writer = open stream ( ) ; return ( writer instanceof buffered writer ) ? ( buffered writer ) writer : new buffered writer ( writer ) ; }


returns the corresponding wrapper type of { @ code type } if it is a primitive type ; otherwise returns { @ code type } itself idempotent wrap ( int class ) = = integer class wrap ( integer class ) = = integer class wrap ( string class ) = = string class

public static < t > class < t > wrap ( class < t > type ) { check not null ( type ) ; / / cast is safe : long class and long class are both of type class < long > @ suppress warnings ( " unchecked " ) class < t > wrapped = ( class < t > ) primitive to wrapper type get ( type ) ; return ( wrapped = = null ) ? type : wrapped ; }


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


verify the selection count ; return the original list if there ' s a mismatch , the whole list is logged at error , then an assertion raised

protected list < string > verify selection count ( final int expected , final string expression , final list < string > selection ) { return verify selection count ( expected , expected , expression , selection ) ; }


public string get queryable state name ( ) { return queryable state name ; }


wait until balanced : each datanode gives utilization within balance allowed variance of average

static void wait for balancer ( long total used space , long total capacity , client protocol client , mini d f s cluster cluster , balancer parameters p , int expected excluded nodes ) throws i o exception , timeout exception { long timeout = timeout ; long failtime = ( timeout < = 0l ) ? long max value : time monotonic now ( ) + timeout ; if ( ! p get included nodes ( ) is empty ( ) ) { total capacity = p get included nodes ( ) size ( ) * capacity ; } if ( ! p get excluded nodes ( ) is empty ( ) ) { total capacity - = p get excluded nodes ( ) size ( ) * capacity ; } final double avg utilization = ( ( double ) total used space ) / total capacity ; boolean balanced ; do { datanode info [ ] datanode report = client get datanode report ( datanode report type all ) ; assert equals ( datanode report length , cluster get data nodes ( ) size ( ) ) ; balanced = true ; int actual excluded node count = 0 ; for ( datanode info datanode : datanode report ) { double node utilization = ( ( double ) datanode get dfs used ( ) ) / datanode get capacity ( ) ; if ( dispatcher util is excluded ( p get excluded nodes ( ) , datanode ) ) { assert true ( node utilization = = 0 ) ; actual excluded node count + + ; continue ; } if ( ! dispatcher util is included ( p get included nodes ( ) , datanode ) ) { assert true ( node utilization = = 0 ) ; actual excluded node count + + ; continue ; } if ( math abs ( avg utilization - node utilization ) > balance allowed variance ) { balanced = false ; if ( time monotonic now ( ) > failtime ) { throw new timeout exception ( " rebalancing expected avg utilization to become " + avg utilization + " , but on datanode " + datanode + " it remains at " + node utilization + " after more than " + timeout + " msec " ) ; } try { thread sleep ( 100 ) ; } catch ( interrupted exception ignored ) { } break ; } } assert equals ( expected excluded nodes , actual excluded node count ) ; } while ( ! balanced ) ; }


public static int set bit on ( int value , int bit number ) { if ( bit number < = 0 | | bit number > 8 ) { throw new illegal argument exception ( " only bits 1 through 8 are supported " ) ; } / / to turn on , or with the correct mask return value | masks [ bit number - 1 ] ; }


record statistics and perform rule checking for the given method

entry entry ( method method , int batch count ) throws block exception ;


stop the profiler and wait for the log to be written

static void stop ( ) throws i o exception { if ( instance = = null ) { throw new illegal state exception ( " stop without start " ) ; } cpu profiler profiler = instance ; instance = null ; stop timer ( ) ; / / finish writing the file and fail if there were any i / o errors profiler pprof write end ( ) ; }


the entry point to create a { @ link desugar rule }

public static desugar rule builder builder ( object test instance , lookup test instance lookup ) { return new desugar rule builder ( test instance , test instance lookup ) ; }


lookup the current configuration of a connector this provides the current snapshot of configuration by querying the underlying herder a connector returned by previous invocation of { @ link # connectors ( ) } may no longer be available and could result in { @ link org apache kafka connect errors not found exception }

default map < string , string > connector config ( string conn name ) { throw new unsupported operation exception ( ) ; }


return the configured { @ link handler mapping } beans that were detected by type in the { @ link web application context } or initialized based on the default set of strategies from { @ literal dispatcher servlet properties } note : this method may return { @ code null } if invoked prior to { @ link # on refresh ( application context ) }

public final list < handler mapping > get handler mappings ( ) { return ( this handler mappings ! = null ? collections unmodifiable list ( this handler mappings ) : null ) ; }


short - circuit integer : no threadsemaphore : thread thread pool full integer : no thread pool queue full integer : no timeout : no execution result : asynchronous hystrix bad request exception

public void test execution hook thread async bad request exception ( ) { assert hooks on failure ( new func 0 < test hystrix observable command < integer > > ( ) { @ override public test hystrix observable command < integer > call ( ) { return get command ( execution isolation strategy thread , abstract test hystrix command execution result async bad request ) ; } } , new action 1 < test hystrix observable command < integer > > ( ) { @ override public void call ( test hystrix observable command < integer > command ) { testable execution hook hook = command get builder ( ) execution hook ; assert true ( hook command emissions match ( 0 , 1 , 0 ) ) ; assert true ( hook execution events match ( 0 , 1 , 0 ) ) ; assert true ( hook fallback events match ( 0 , 0 , 0 ) ) ; assert equals ( hystrix bad request exception class , hook get command exception ( ) get class ( ) ) ; assert equals ( hystrix bad request exception class , hook get execution exception ( ) get class ( ) ) ; assert equals ( " on start - on thread start - ! on run start - on execution start - on execution error - ! on run error - on thread complete - on error - " , command get builder ( ) execution hook execution sequence to string ( ) ) ; } } ) ; }


int get root buffer id ( ) { return record get int value ( buffer id column ) ; }


set if all item opened will be close when the user move list view

public void set swipe closes all items when list moves ( boolean swipe closes all items when list moves ) { this swipe closes all items when list moves = swipe closes all items when list moves ; }


prepare classpath resource if needed file

public static resource prepare classpath resource if needed ( final resource resource ) { if ( resource = = null ) { logger debug ( " no resource defined to prepare returning null " ) ; return null ; } return prepare classpath resource if needed ( resource , false , resource get filename ( ) ) ; }


helper for { @ link # visit constant } where the constant is a { @ code float }

private void visit literal float ( int opcode , int offset , int length , int bits ) { string opt arg = ( length ! = 1 ) ? " # " + hex u 4 ( bits ) : " " ; observer parsed ( bytes , offset , length , header ( offset ) + opt arg + " / / " + float int bits to float ( bits ) ) ; }


returns a comparator that compares two arrays of unsigned { @ code int } values < a href = " http : en wikipedia orgwiki lexicographical order " > lexicographically that is , it compares , using { @ link # compare ( int , int ) } ) , the first pair of values that follow any common prefix , or when one array is a prefix of the other , treats the shorter array as the lesser for example , { @ code [ ] < [ 1 ] < [ 1 , 2 ] < [ 2 ] < [ 1 < < 31 ] } the returned comparator is inconsistent with { @ link object # equals ( object ) } ( since arrays support only identity equality ) , but it is consistent with { @ link arrays # equals ( int [ ] , int [ ] ) }

public static comparator < int [ ] > lexicographical comparator ( ) { return lexicographical comparator instance ; }


writes a long value into the byte array at the given offset see { @ link # get bytes ( long , byte [ ] , int ) }

default void put long ( byte [ ] b , int offset , long value ) { put value ( value , long bytes , b , offset ) ; }


show the sign up page with the data from the identity

public http response commence signup ( final federated identity identity ) { / / store the identity in the session so that we can use this later stapler get current request ( ) get session ( ) set attribute ( federated identity session key , identity ) ; return new forward to view ( this , " signup with federated identity jelly " ) { @ override public void generate response ( stapler request req , stapler response rsp , object node ) throws i o exception , servlet exception { signup info si = new signup info ( identity ) ; si error message = messages hudson private security realm would you like to sign up ( identity get pronoun ( ) , identity get identifier ( ) ) ; req set attribute ( " data " , si ) ; super generate response ( req , rsp , node ) ; } } ; }


public long get finish time ( ) { return finish time ; }


attempts to pre - handle and throttlestifle the requests based on capacity and configured pools

default boolean throttle ( final http servlet request request , final http servlet response response ) { return false ; }


todo ( t69494307 ) : don ' t delete this method , it ' s going to replace { @ code component utils are collections equals ( type , collection , collection ) }

private static boolean are collections equivalent ( collection collection 1 , collection collection 2 ) { if ( collection 1 size ( ) ! = collection 2 size ( ) ) { return false ; } final iterator iterator 1 = collection 1 iterator ( ) ; final iterator iterator 2 = collection 2 iterator ( ) ; while ( iterator 1 has next ( ) ) { final object elem 1 = iterator 1 next ( ) ; final object elem 2 = iterator 2 next ( ) ; if ( ! are objects equivalent ( elem 1 , elem 2 ) ) { return false ; } } return true ; }


asserts that the expected completion time has passed ( and not " too much " time beyond that )

void assert completion expected ( ) { assert at least time passed ( stopwatch , expected completion wait millis ) ; assert time not passed ( stopwatch , expected completion wait millis + long delay ms ) ; }


private void read ( stream input in ) throws i o exception { fields = in read map ( stream input : : read string , multi values source field config : : new ) ; user value type hint = in read optional writeable ( value type : : read from stream ) ; format = in read optional string ( ) ; }


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

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


public void snake case test ( ) { / / todo : test snake case }


converts the map format of the environment variables to the k = v format in the array

public static string [ ] map to env ( @ non null map < string , string > m ) { string [ ] r = new string [ m size ( ) ] ; int idx = 0 ; for ( final map entry < string , string > e : m entry set ( ) ) { r [ idx + + ] = e get key ( ) + ' = ' + e get value ( ) ; } return r ; }


helper method to create an intercepted object for finer control over the generated instance , use a new instance of < code > enhancer < code > instead of this static method

public static object create ( class type , callback callback ) { enhancer e = new enhancer ( ) ; e set superclass ( type ) ; e set callback ( callback ) ; return e create ( ) ; }


return a list of services for the passed domain

collection < registered service > get services for domain ( string domain ) ;


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


sets the < code > int 3 2 < code > property


method clean tree removes all empty fragments and empty modules

static void clean tree ( program module module ) throws not empty exception { consumer < program module > renamer = m - > rename ( module ) ; set < program module > module set = new hash set < program module > ( ) ; clean tree ( module , renamer , module set ) ; }


public void user status test ( ) { / / todo : test user status }


this method is { @ link deprecated } , use { @ link default rolling policy # builder ( ) } instead

public static default rolling policy policy builder create ( ) { return builder ( ) ; }


returns true if any of the nodes used a noop breaker

private boolean noop breaker used ( ) { nodes stats response stats = client ( ) admin ( ) cluster ( ) prepare nodes stats ( ) set breaker ( true ) get ( ) ; for ( node stats node stats : stats get nodes ( ) ) { if ( node stats get breaker ( ) get stats ( circuit breaker request ) get limit ( ) = = noop circuit breaker limit ) { return true ; } if ( node stats get breaker ( ) get stats ( circuit breaker in flight requests ) get limit ( ) = = noop circuit breaker limit ) { return true ; } if ( node stats get breaker ( ) get stats ( circuit breaker fielddata ) get limit ( ) = = noop circuit breaker limit ) { return true ; } } return false ; }


sets the avro schema for specific or generic avro records

public avro avro schema ( string avro schema ) { preconditions check not null ( avro schema ) ; this avro schema = avro schema ; return this ; }


acknowledges a master state ( state generated on the checkpoint coordinator ) to the pending checkpoint

public void acknowledge master state ( string identifier , @ nullable master state state ) { synchronized ( lock ) { if ( ! disposed ) { if ( not yet acknowledged master states remove ( identifier ) & & state ! = null ) { master states add ( state ) ; } } } }


public void test long value ( ) { atomic double at = new atomic double ( ) ; assert equals ( 0l , at long value ( ) ) ; for ( double x : values ) { at set ( x ) ; assert equals ( ( long ) x , at long value ( ) ) ; } }


private void save result and close ( ) { last location text = text get text ( ) ; final result = temp result ; dialog shell close ( ) ; }


atomically sets the subscription on the field but does not cancel the previous subscription

public static boolean replace ( atomic reference < subscription > field , subscription s ) { for ( ; ; ) { subscription current = field get ( ) ; if ( current = = cancelled ) { if ( s ! = null ) { s cancel ( ) ; } return false ; } if ( field compare and set ( current , s ) ) { return true ; } } }


protected void configure saml client ( final collection < indirect client > properties ) { val pac 4j properties = cas properties get authn ( ) get pac 4j ( ) ; val index = new atomic integer ( ) ; pac 4j properties get saml ( ) stream ( ) filter ( saml - > saml is enabled ( ) & & string utils is not blank ( saml get keystore path ( ) ) & & string utils is not blank ( saml get identity provider metadata path ( ) ) & & string utils is not blank ( saml get service provider entity id ( ) ) & & string utils is not blank ( saml get service provider metadata path ( ) ) ) for each ( saml - > { val cfg = new s a m l 2 configuration ( saml get keystore path ( ) , saml get keystore password ( ) , saml get private key password ( ) , saml get identity provider metadata path ( ) ) ; cfg set force keystore generation ( saml is force keystore generation ( ) ) ; cfg set certificate name to append ( string utils default if blank ( saml get certificate name to append ( ) , saml get client name ( ) ) ) ; cfg set maximum authentication lifetime ( saml get maximum authentication lifetime ( ) ) ; cfg set service provider entity id ( saml get service provider entity id ( ) ) ; cfg set service provider metadata path ( saml get service provider metadata path ( ) ) ; cfg set authn request binding type ( saml get destination binding ( ) ) ; cfg set force auth ( saml is force auth ( ) ) ; cfg set passive ( saml is passive ( ) ) ; cfg set sign metadata ( saml is sign service provider metadata ( ) ) ; cfg set authn request signed ( saml is sign authn request ( ) ) ; cfg set sp logout request signed ( saml is sign service provider logout request ( ) ) ; cfg set accepted skew ( saml get accepted skew ( ) ) ; if ( string utils is not blank ( saml get principal id attribute ( ) ) ) { cfg set attribute as id ( saml get principal id attribute ( ) ) ; } cfg set wants assertions signed ( saml is wants assertions signed ( ) ) ; cfg set wants responses signed ( saml is wants responses signed ( ) ) ; cfg set all signature validation disabled ( saml is all signature validation disabled ( ) ) ; cfg set use name qualifier ( saml is use name qualifier ( ) ) ; cfg set attribute consuming service index ( saml get attribute consuming service index ( ) ) ; try { val clazz = class utils get class ( default delegated client factory class get class loader ( ) , saml get message store factory ( ) ) ; cfg set saml message store factory ( s a m l message store factory class cast ( clazz get declared constructor ( ) new instance ( ) ) ) ; } catch ( final exception e ) { logger error ( " unable to instantiate message store factory class [ { } ] " , saml get message store factory ( ) ) ; logging utils error ( logger , e ) ; } if ( saml get assertion consumer service index ( ) > = 0 ) { cfg set assertion consumer service index ( saml get assertion consumer service index ( ) ) ; } if ( ! saml get authn context class ref ( ) is empty ( ) ) { cfg set comparison type ( saml get authn context comparison type ( ) to upper case ( ) ) ; cfg set authn context class refs ( saml get authn context class ref ( ) ) ; } if ( string utils is not blank ( saml get keystore alias ( ) ) ) { cfg set keystore alias ( saml get keystore alias ( ) ) ; } if ( string utils is not blank ( saml get name id policy format ( ) ) ) { cfg set name id policy format ( saml get name id policy format ( ) ) ; } if ( ! saml get requested attributes ( ) is empty ( ) ) { saml get requested attributes ( ) stream ( ) map ( attribute - > new s a m l 2 service provicer requested attribute ( attribute get name ( ) , attribute get friendly name ( ) , attribute get name format ( ) , attribute is required ( ) ) ) for each ( attribute - > cfg get requested service provider attributes ( ) add ( attribute ) ) ; } if ( ! saml get blocked signature signing algorithms ( ) is empty ( ) ) { cfg set black listed signature signing algorithms ( saml get blocked signature signing algorithms ( ) ) ; } if ( ! saml get signature algorithms ( ) is empty ( ) ) { cfg set signature algorithms ( saml get signature algorithms ( ) ) ; } if ( ! saml get signature reference digest methods ( ) is empty ( ) ) { cfg set signature reference digest methods ( saml get signature reference digest methods ( ) ) ; } if ( ! string utils is not blank ( saml get signature canonicalization algorithm ( ) ) ) { cfg set signature canonicalization algorithm ( saml get signature canonicalization algorithm ( ) ) ; } cfg set provider name ( saml get provider name ( ) ) ; cfg set name id policy allow create ( saml get name id policy allow create ( ) to boolean ( ) ) ; val mapped attributes = saml get mapped attributes ( ) ; if ( ! mapped attributes is empty ( ) ) { val results = mapped attributes stream ( ) collect ( collectors to map ( pac 4j saml client properties service provider mapped attribute : : get name , pac 4j saml client properties service provider mapped attribute : : get mapped to ) ) ; cfg set mapped attributes ( results ) ; } val client = new s a m l 2 client ( cfg ) ; if ( string utils is blank ( saml get client name ( ) ) ) { val count = index int value ( ) ; client set name ( client get class ( ) get simple name ( ) + count ) ; } configure client ( client , saml ) ; index increment and get ( ) ; logger debug ( " created delegated client [ { } ] " , client ) ; properties add ( client ) ; } ) ; }


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


does the actual import work updates the { @ link # import summary summary } object with information about the types imported and errors encountered

public void import all data types ( task monitor monitor ) throws i o exception , d w a r f exception , cancelled exception { int dt count before = data type manager get data type count ( true ) ; for ( d i e aggregate diea : d i e a monitored iterator iterable ( prog , " dwarf import types " , monitor ) ) { monitor check canceled ( ) ; try { if ( is data type ( diea ) ) { do get data type ( diea ) ; } } catch ( illegal argument exception iae ) { / / squelch full stack trace for data type errors where structure is defined to / / have itself inside itself msg error ( this , " failed to process dwarf die " + diea get hex offset ( ) + " : " + iae get message ( ) ) ; } catch ( out of memory error oom ) { throw oom ; } catch ( throwable th ) { / / aggressively catch pretty much everything to allow the import to / / try to continue with the next compunit msg error ( this , " error when processing dwarf information for die " + diea get hex offset ( ) , th ) ; msg info ( this , " die info : \ n " + diea to string ( ) ) ; } } int dt count after = data type manager get data type count ( true ) ; import summary data types added = ( dt count after - dt count before ) ; if ( prog get import options ( ) is create func signatures ( ) ) { import func signatures ( monitor ) ; } }


used to build volume specs for mesos this allows for mounting additional volumes into a container

public static list < protos volume > build volumes ( option < string > container volumes ) { if ( container volumes is empty ( ) ) { return collections empty list ( ) ; } else { string [ ] volume specifications = container volumes get ( ) split ( " , " ) ; list < protos volume > volumes = new array list < > ( volume specifications length ) ; for ( string volume specification : volume specifications ) { if ( ! volume specification trim ( ) is empty ( ) ) { protos volume builder volume = protos volume new builder ( ) ; volume set mode ( protos volume mode rw ) ; string [ ] parts = volume specification split ( " : " ) ; switch ( parts length ) { case 1 : volume set container path ( parts [ 0 ] ) ; break ; case 2 : try { protos volume mode mode = protos volume mode value of ( parts [ 1 ] trim ( ) to upper case ( ) ) ; volume set mode ( mode ) set container path ( parts [ 0 ] ) ; } catch ( illegal argument exception e ) { volume set host path ( parts [ 0 ] ) set container path ( parts [ 1 ] ) ; } break ; case 3 : protos volume mode mode = protos volume mode value of ( parts [ 2 ] trim ( ) to upper case ( ) ) ; volume set mode ( mode ) set host path ( parts [ 0 ] ) set container path ( parts [ 1 ] ) ; break ; default : throw new illegal argument exception ( " volume specification is invalid , given : " + volume specification ) ; } volumes add ( volume build ( ) ) ; } } return volumes ; } }


starts the cluster within a testcase < p > note that the cluster is already started when the testcase method is invoked this method is useful if as part of the testcase the cluster has to be shutdown and restarted again < p > if the cluster is already running this method does nothing

protected synchronized void start cluster ( boolean reformat d f s , properties props ) throws exception { if ( dfs cluster = = null ) { job conf conf = new job conf ( ) ; if ( props ! = null ) { for ( map entry entry : props entry set ( ) ) { conf set ( ( string ) entry get key ( ) , ( string ) entry get value ( ) ) ; } } dfs cluster = new mini d f s cluster builder ( conf ) num data nodes ( 2 ) format ( reformat d f s ) racks ( null ) build ( ) ; configurable mini m r cluster set configuration ( props ) ; / / noinspection deprecation mr cluster = new configurable mini m r cluster ( 2 , get file system ( ) get uri ( ) to string ( ) , 1 , conf ) ; } }


creates a new async stub that supports all call types for the service

public static resource sink stub new stub ( io grpc channel channel ) { return new resource sink stub ( channel ) ; }


sets the reducer class to the chain job ' s job conf it has to be specified how key and values are passed from one element of the chain to the next , by value or by reference if a reducer leverages the assumed semantics that the key and values are not modified by the collector ' by value ' must be used if the reducer does not expect this semantics , as an optimization to avoid serialization and deserialization ' by reference ' can be used for the added reducer the configuration given for it , < code > reducer conf < code > , have precedence over the job ' s job conf this precedence is in effect when the task is running important : there is no need to specify the output keyvalue classes for the chain reducer , this is done by the set reducer or the add mapper for the last element in the chain

public static < k1 , v1 , k2 , v2 > void set reducer ( job conf job , class < ? extends reducer < k1 , v1 , k2 , v2 > > klass , class < ? extends k1 > input key class , class < ? extends v1 > input value class , class < ? extends k2 > output key class , class < ? extends v2 > output value class , boolean by value , job conf reducer conf ) { job set reducer class ( chain reducer class ) ; job set output key class ( output key class ) ; job set output value class ( output value class ) ; chain set reducer ( job , klass , input key class , input value class , output key class , output value class , by value , reducer conf ) ; }


provides notification when this hover component is popped - up


public void test disassembler multipath instruction conflict 1 ( ) throws exception { / / instr at 24 is tail of nfctx but we need to add to program builder to register / / instruction location for verification purpose only program builder add bytes fallthrough ( 24 ) ; program builder add bytes branch conditional ( 10 , 20 ) ; program builder add bytes branch conditional ( 12 , 30 ) ; program builder add bytes return ( 14 ) ; program builder add bytes fallthrough ( 20 ) ; program builder add bytes fallthrough set no flow context ( 22 , 2 , 18 ) ; / / overwrites instr bytes at 24 program builder add bytes branch ( 26 , 40 ) ; program builder add bytes fallthrough ( 30 ) ; program builder add bytes fallthrough set no flow context ( 32 , 2 , 18 ) ; program builder add bytes branch ( 36 , 40 ) ; program builder add bytes return ( 40 ) ; address set view dis addrs = disassembler disassemble ( addr ( 24 ) , null ) ; assert equals ( addrset ( range ( 24 , 27 ) , range ( 40 , 41 ) ) , dis addrs ) ; / / clear instruction at 40 to allow flow from 36 program get listing ( ) clear code units ( addr ( 40 ) , addr ( 40 ) , true ) ; dis addrs = disassembler disassemble ( addr ( 10 ) , null ) ; assert equals ( addrset ( range ( 10 , 15 ) , range ( 20 , 21 ) , range ( 30 , 37 ) , range ( 40 , 41 ) ) , dis addrs ) ; verify instruction presence ( collection utils as set ( addr ( 22 ) ) ) ; verify error bookmark ( addr ( 22 ) , " conflicting instruction " ) ; }


create a test { @ link class loader } that creates an index with the specified { @ link resource } instances

public static class loader index ( class loader class loader , resource resources ) { return new candidate components test class loader ( class loader , collections enumeration ( stream of ( resources ) map ( r - > { try { return r get u r l ( ) ; } catch ( exception ex ) { throw new illegal argument exception ( " invalid resource " + r , ex ) ; } } ) collect ( collectors to list ( ) ) ) ) ; }


set { @ link handler method argument resolver handler method argument resolvers } to use for resolving method argument values

public void set handler method argument resolvers ( handler method argument resolver composite argument resolvers ) { this resolvers = argument resolvers ; }


returns all descendant { @ link request manager } s relative to the context of the current { @ link request manager }

set < request manager > get descendants ( ) ;


returns true if the zoomable transform is identity matrix

public boolean is identity ( ) { return is matrix identity ( m active transform , 1e - 3f ) ; }


prepares python environment to start python process

static python environment prepare python environment ( readable config config , string entry point script , string tmp dir ) throws i o exception { python environment env = new python environment ( ) ; / / 1 set the path of python interpreter string python exec = config get optional ( python client executable ) or else ( system getenv ( pyflink client executable ) ) ; if ( python exec ! = null ) { env python exec = python exec ; } / / 2 setup temporary local directory for the user files tmp dir = new file ( tmp dir ) get absolute path ( ) ; path tmp dir path = new path ( tmp dir ) ; tmp dir path get file system ( ) mkdirs ( tmp dir path ) ; env temp directory = tmp dir ; / / 3 append the internal lib files to pythonpath if ( system getenv ( config constants env flink opt dir ) ! = null ) { string python lib dir = system getenv ( config constants env flink opt dir ) + file separator + " python " ; env python path = get lib files ( python lib dir ) stream ( ) map ( p - > p to file ( ) get absolute path ( ) ) collect ( collectors joining ( file path separator ) ) ; } / / 4 copy relevant python files to tmp dir and set them in pythonpath if ( config get optional ( python files ) is present ( ) ) { list < path > python files = arrays stream ( config get ( python files ) split ( file delimiter ) ) map ( path : : new ) collect ( collectors to list ( ) ) ; add to python path ( env , python files ) ; } if ( entry point script ! = null ) { add to python path ( env , collections singleton list ( new path ( entry point script ) ) ) ; } return env ; }


ensures the truth of an expression involving the state of the calling instance , but not involving any parameters to the calling method see { @ link # check state ( boolean , string , object ) } for details

public static void check state ( boolean b , @ nullable decl string error message template , long p 1 , char p 2 ) { if ( ! b ) { throw new illegal state exception ( lenient format ( error message template , p 1 , p 2 ) ) ; } }


set the bitmask indicating the presence of the six potential connecting edges

public void set bitmask ( byte value bitmask ) { this bitmask = bitmask ; }


calls { @ link # set text ( bitmap font , char sequence , int , int , color , float , int , boolean , string ) set text } with the whole string and no truncation

public void set text ( bitmap font font , char sequence str , color color , float target width , int halign , boolean wrap ) { set text ( font , str , 0 , str length ( ) , color , target width , halign , wrap , null ) ; }


adds an embedded server factory for the provided identifier

public static void add ( object identifier , embedded server factory factory ) { factories put ( identifier , factory ) ; }


sets the four columns of the matrix which correspond to the x - , y - and z - axis of the vector space this matrix creates as well as the 4th column representing the translation of any point that is multiplied by this matrix

public matrix 4 set ( vector 3 x axis , vector 3 y axis , vector 3 z axis , vector 3 pos ) { val [ m00 ] = x axis x ; val [ m01 ] = x axis y ; val [ m02 ] = x axis z ; val [ m10 ] = y axis x ; val [ m11 ] = y axis y ; val [ m12 ] = y axis z ; val [ m20 ] = z axis x ; val [ m21 ] = z axis y ; val [ m22 ] = z axis z ; val [ m03 ] = pos x ; val [ m13 ] = pos y ; val [ m23 ] = pos z ; val [ m30 ] = 0f ; val [ m31 ] = 0f ; val [ m32 ] = 0f ; val [ m33 ] = 1f ; return this ; }


public static map < string , enrich policy > get policies ( cluster state state ) { final map < string , enrich policy > policies ; final enrich metadata enrich metadata = state metadata ( ) custom ( enrich metadata type ) ; if ( enrich metadata ! = null ) { / / make a copy , because policies map inside custom metadata is read only : policies = new hash map < > ( enrich metadata get policies ( ) ) ; } else { policies = new hash map < > ( ) ; } return policies ; }


protected void set selected path now ( tree path path ) { tree selection model tree selection model = tree get selection model ( ) ; tree selection model set selection path ( path ) ; }


returns the type of the result of this operator

public type information < out > get result type ( ) { return get type ( ) ; }


set whether http servlet request attributes are allowed to override ( hide ) controller generated model attributes of the same name default is " false " , which causes an exception to be thrown if request attributes of the same name as model attributes are found

public void set allow request override ( boolean allow request override ) { this allow request override = allow request override ; }


create a { @ link compression output stream } that will write to the given { @ link output stream }

public compression output stream create output stream ( output stream out ) throws i o exception { return compression codec util create output stream with codec pool ( this , conf , out ) ; }


returns a future with a list of splits this method is assumed to be called in a single - threaded way it can be called by multiple threads , but only if the previous call finished

public completable future < connector split batch > get next batch ( connector partition handle partition handle , int max size ) { check argument ( partition handle equals ( not partitioned ) , " partition handle must be not partitioned " ) ; check state ( future get ( ) = = null | | future get ( ) is done ( ) , " previous batch not completed " ) ; check state ( has more data get ( ) , " this method cannot be invoked when there ' s no more data " ) ; presto thrift id current token = next token get ( ) ; listenable future < presto thrift split batch > splits future = client get splits ( schema table name , new presto thrift nullable column set ( column names or else ( null ) ) , constraint , max size , new presto thrift nullable token ( current token ) ) ; listenable future < connector split batch > result future = futures transform ( splits future , batch - > { require non null ( batch , " batch is null " ) ; list < connector split > splits = batch get splits ( ) stream ( ) map ( thrift split source : : to connector split ) collect ( to immutable list ( ) ) ; check state ( next token compare and set ( current token , batch get next token ( ) ) ) ; check state ( has more data compare and set ( true , next token get ( ) ! = null ) ) ; return new connector split batch ( splits , is finished ( ) ) ; } , direct executor ( ) ) ; result future = catching thrift exception ( result future ) ; future set ( result future ) ; return to completable future ( result future ) ; }


flush buffers for stdout and stderr return if either of them flushed a non - zero number of symbols

private synchronized boolean flush std out std err buffers ( ) { boolean did flush = false ; try { if ( stdout line buffer size ( ) > 0 ) { stdout line buffer write to ( out err get output stream ( ) ) ; out err get output stream ( ) flush ( ) ; / / re - initialize the stream not to retain allocated memory stdout line buffer = new byte array output stream ( ) ; did flush = true ; } if ( stderr line buffer size ( ) > 0 ) { stderr line buffer write to ( out err get error stream ( ) ) ; out err get error stream ( ) flush ( ) ; / / re - initialize the stream not to retain allocated memory stderr line buffer = new byte array output stream ( ) ; did flush = true ; } } catch ( i o exception e ) { logger at warning ( ) with cause ( e ) log ( " io error writing to output stream " ) ; } return did flush ; }


return the principal associated with the handshake http request

public mono < principal > get principal ( ) { return this principal mono ; }


public add pet oper resp spec ( consumer < response spec builder > resp spec customizer ) { resp spec customizer accept ( resp spec ) ; return this ; }


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

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


add a " max - age = " directive this directive is well suited for publicly caching resources , knowing that they won ' t change within the configured amount of time additional directives can be also used , in case resources shouldn ' t be cached ( { @ link # cache private ( ) } ) or transformed ( { @ link # no transform ( ) } ) by shared caches in order to prevent caches to reuse the cached response even when it has become stale ( i e the " max - age " delay is passed ) , the " must - revalidate " directive should be set ( { @ link # must revalidate ( ) }

public static cache control max age ( duration max age ) { cache control cc = new cache control ( ) ; cc max age = max age ; return cc ; }


a put operation that can be used in the fluent pattern

public builder < v type > f put ( int key , v type value ) { map put ( key , value ) ; return this ; }


sets the docked state of this viewer an undocked satellite viewer will be in its own window

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


check for the source having a next element if it does not , this object ' s close ( ) method is called and false returned

protected boolean source has next ( ) throws i o exception { boolean has next ; try { has next = get source ( ) has next ( ) ; } catch ( i o exception e ) { i o utils cleanup with logger ( log , this ) ; throw e ; } if ( ! has next ) { / / there is nothing less so automatically close close ( ) ; } return has next ; }


join records of this stream with another { @ code k stream } ' s records using windowed inner equi join using the { @ link stream joined } instance for configuration of the { @ link serde key serde } , { @ link serde this stream ' s value serde } , { @ link serde the other stream ' s value serde } , and used state stores 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 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 > < td > < tr > < tr > < td > & lt ; k2 : b & gt ; < td > < td > & lt ; k2 : b & gt ; < td > < td > & lt ; k2 : value joiner ( b , b ) & gt ; < td > < tr > < tr > < td > < td > < td > & lt ; k3 : c & gt ; < td > < td > < 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 , unless a name is provided via a { @ code materialized } instance 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 > join ( final k stream < k , vo > other stream , final value joiner < ? super v , ? super vo , ? extends vr > joiner , final join windows windows , final stream joined < k , v , vo > stream joined ) ;


returns a { @ code map joiner } using the given key - value separator , and the same configuration as this { @ code joiner } otherwise

public map joiner with key value separator ( string key value separator ) { return new map joiner ( this , key value separator ) ; }


private void create radix panel ( ) { row layout row layout 1 = new row layout ( ) ; / / row layout 1 margin height = 5 ; row layout 1 margin top = 2 ; row layout 1 margin bottom = 2 ; / / row layout 1 margin width = 5 ; row layout 1 type = swt vertical ; composite composite = new composite ( text composite , swt none ) ; composite set layout ( row layout 1 ) ; selection adapter hex text selection adapter = new selection adapter ( ) { @ override public void widget selected ( org eclipse swt events selection event e ) { text set text ( text get text ( ) ) ; / / generate event last hex button selected = e widget = = hex radio button ; } } ; / / besides the crashes : the user always knows which number is entering , don ' t need any automatic / / conversion what does sometimes happen is one enters the right number and the wrong binary or dec was / / selected in that case automatic conversion is the wrong thing to do and very annoying hex radio button = new button ( composite , swt radio ) ; hex radio button set text ( " hex " ) ; / / $ non - nls - 1 $ hex radio button add selection listener ( default selection adapter ) ; hex radio button add selection listener ( hex text selection adapter ) ; dec radio button = new button ( composite , swt radio ) ; dec radio button set text ( " dec " ) ; / / $ non - nls - 1 $ dec radio button add selection listener ( default selection adapter ) ; dec radio button add selection listener ( hex text selection adapter ) ; / / dec text selection adapter ) ; }


public static void set up resource manager ( ) throws i o exception , interrupted exception { configuration add default resource ( " config - with - security xml " ) ; configuration configuration = new yarn configuration ( ) ; resource manager = new resource manager ( ) { @ override protected void do secure login ( ) throws i o exception { } } ; / / a reliable way to wait for resource manager to fully start final count down latch rm started signal = new count down latch ( 1 ) ; service state change listener rm state change listener = new service state change listener ( ) { @ override public void state changed ( service service ) { if ( service get service state ( ) = = state started ) { rm started signal count down ( ) ; } } } ; resource manager register service listener ( rm state change listener ) ; resource manager init ( configuration ) ; new thread ( ) { public void run ( ) { resource manager start ( ) ; } } start ( ) ; boolean rm started = rm started signal await ( 60000l , time unit milliseconds ) ; assert assert true ( " resource manager failed to start up " , rm started ) ; log info ( " resource manager r m admin address : " + configuration get ( yarn configuration rm admin address ) ) ; client = new resource manager administration protocol p b client impl ( 1l , get protocol address ( configuration ) , configuration ) ; }


returns the raw operator state from the job manager , which represents the ground truth about what this state should represent this is the alternative with lowest priority

public state object collection < operator state handle > get job manager raw operator state ( ) { return last element ( prioritized raw operator state ) ; }


return the extensions portion of the preferences object

private preference state get extension preferences ( docking window manager docking window manager ) { preference state state = docking window manager get preference state ( extensions preference name ) ; if ( state = = null ) { state = new preference state ( ) ; } return state ; }


this implementation always returns { @ code null } , indicating that no jdbc connection can be provided

public connection handle get jdbc connection ( entity manager entity manager , boolean read only ) throws persistence exception , s q l exception { return null ; }


the value assigned to this element < code > optional aapt pb item item = 3 ; < code >

private void merge item ( com android aapt resources item value ) { if ( item ! = null & & item ! = com android aapt resources item get default instance ( ) ) { item = com android aapt resources item new builder ( item ) merge from ( value ) build partial ( ) ; } else { item = value ; } bit field 0 | = 0x 0 0 0 0 0 0 0 4 ; }


dump the filesystem statistics after the class

public static void dump file system i o statistics ( ) { log info ( " aggregate file system statistics { } " , io statistics to pretty string ( filesystem iostats ) ) ; }


filterer < ? extends probabilistic threat aware system , ? extends probable threat > filtered ( ) ;


recommend to use launch a m , or use send a m launched like : 1 , wait r m app attempt scheduled 2 , send node heartbeat 3 , send a m launched

public mock a m send a m launched ( application attempt id app attempt id ) throws exception { mock a m am = new mock a m ( get r m context ( ) , master service , app attempt id ) ; ( ( abstract yarn scheduler ) scheduler ) update ( ) ; wait for state ( app attempt id , r m app attempt state allocated ) ; / / create and set a m r m token token < a m r m token identifier > amrm token = this rm context get a m r m token secret manager ( ) create and get a m r m token ( app attempt id ) ; ( ( r m app attempt impl ) this rm context get r m apps ( ) get ( app attempt id get application id ( ) ) get r m app attempt ( app attempt id ) ) set a m r m token ( amrm token ) ; get r m context ( ) get dispatcher ( ) get event handler ( ) handle ( new r m app attempt event ( app attempt id , r m app attempt event type launched ) ) ; drain events implicitly ( ) ; return am ; }


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

public list < string > get return bytes ( ) { return return bytes ; }


returns the message template for the error code

public string get template ( ) { return msg ; }


inverse of { @ link # has visible drawable ( drawable ) }

public litho view assert does not have visible drawable ( drawable drawable ) { assert that view tree ( ) does not have visible drawable ( drawable ) ; return this ; }


add char filter setting that will be used on top of a tokenizer provided

public analyze request builder add char filter ( map < string , ? > char filter ) { request add char filter ( char filter ) ; return this ; }


attempt to handle character escape sequence note that only a single java character will be produced which limits the range of valid character value

private static boolean handle escape sequence ( string string , string escape sequence , int hex length , int index , string builder builder ) { int input length = string length ( ) ; int hex start = index + escape sequence length ( ) ; int hex end = hex start + hex length ; if ( hex end < = input length & & escape sequence equals ( string substring ( index , hex start ) ) ) { string hex str = string substring ( hex start , hex end ) ; int hex mask = - 1 > > > ( 4 * ( 8 - hex length ) ) ; try { int val = integer parse int ( hex str , 16 ) & hex mask ; if ( val > = 0 & & val < = character max value ) { builder append ( ( char ) val ) ; return true ; } } catch ( number format exception e ) { / / ignore } } return false ; }


reconstruct the parser context ' s internal packed context array and its list of global context set directives by walking a previously resolved construct state tree

private void reconstruct context ( sleigh parser context proto context , sleigh debug logger debug ) throws memory access exception { parser walker walker = new parser walker ( proto context ) ; walker base state ( ) ; while ( walker is state ( ) ) { constructor ct = walker get constructor ( ) ; if ( ct ! = null ) { int oper = walker get operand ( ) ; int numoper = ct get num operands ( ) ; if ( oper = = 0 ) / / upon first entry to this constructor ct apply context ( walker , debug ) ; / / apply its context changes if ( oper < numoper ) { walker push operand ( oper ) ; continue ; } } walker pop operand ( ) ; } }


return all data flavors that this class supports

public synchronized data flavor [ ] get transfer data flavors ( ) { return flavors ; }