get the { @ link path } to the task ' s temporary output directory for the map - reduce job < b id = " side effect files " > tasks ' side - effect files < b > some applications need to createwrite - to side - files , which differ from the actual job - outputs in such cases there could be issues with 2 instances of the same tip ( running simultaneously e g speculative tasks ) trying to openwrite - to the same file ( path ) on hdfs hence the application - writer will have to pick unique names per task - attempt ( e g using the attemptid , say < tt > attempt 200709221812 0001 m 000000 0 < tt > ) , not just per tip to get around this the map - reduce framework helps the application - writer out by maintaining a special < tt > $ { mapreduce output fileoutputformat outputdir } temporary $ { taskid } < tt > sub - directory for each task - attempt on hdfs where the output of the task - attempt goes on successful completion of the task - attempt the files in the < tt > $ { mapreduce output fileoutputformat outputdir } temporary $ { taskid } < tt > ( only ) are promoted to < tt > $ { mapreduce output fileoutputformat outputdir } < tt > of course , the framework discards the sub - directory of unsuccessful task - attempts this is completely transparent to the application the application - writer can take advantage of this by creating any side - files required in a work directory during execution of his task i e via { @ link # get work output path ( task input output context ) } , and the framework will move them out similarly - thus she doesn ' t have to pick unique paths per task - attempt the entire discussion holds true for maps of jobs with reducer = none ( i e 0 reduces ) since output of the map , in that case , goes directly to hdfs

public static path get work output path ( task input output context < ? , ? , ? , ? > context ) throws i o exception , interrupted exception { path output committer committer = ( path output committer ) context get output committer ( ) ; path work path = committer get work path ( ) ; log debug ( " work path is { } " , work path ) ; return work path ; }


public static < t > map < string , t > wrap linked hash map ( final string key , final t source ) { val list = new linked hash map < string , t > ( map size ) ; list put ( key , source ) ; return list ; }


if set , a string representing that the segment is part of a merge , with the value representing the group of segments that represent this merge

public string get merge id ( ) { return this merge id ; }


public void int 3 2 test ( ) { / / todo : test int 3 2 }


sets the factory to create composite { @ link sequenceable loader } s for when this media source loads data from multiple streams ( video , audio etc ) the default is an instance of { @ link default composite sequenceable loader factory }

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


private void handle connections ( ) { for ( string node : this selector connected ( ) ) { / / we are now connected note that we might not still be able to send requests for instance , / / if ssl is enabled , the ssl handshake happens after the connection is established / / therefore , it is still necessary to check is channel ready before attempting to send on this / / connection if ( discover broker versions ) { this connection states checking api versions ( node ) ; nodes needing api versions fetch put ( node , new api versions request builder ( ) ) ; log debug ( " completed connection to node { } fetching api versions " , node ) ; } else { this connection states ready ( node ) ; log debug ( " completed connection to node { } ready " , node ) ; } } }


return the property editor for the property that this bind status is currently bound to

public property editor get editor ( ) { return this editor ; }


the optional analyzer used to analyze the query string note , if a field has search analyzer defined for it , then it will be used automatically defaults to the smart search analyzer

public query string query builder analyzer ( string analyzer ) { this analyzer = analyzer ; return this ; }


record the number of rows and amount of physical bytes that were read by an operator this metric is valid only for source operators

public void record raw input ( long size in bytes , long position count ) { raw input data size update ( size in bytes ) ; raw input positions update ( position count ) ; }


http request exception is a timeout exception

public static boolean is timeout exception ( throwable throwable ) { return throwable instanceof socket timeout exception | | throwable instanceof connect timeout exception | | throwable instanceof timeout exception | | throwable get cause ( ) instanceof timeout exception ; }


may be called in order to prepare publication of the given cluster state

public publish request handle client value ( cluster state cluster state ) { if ( election won = = false ) { logger debug ( " handle client value : ignored request as election not won " ) ; throw new coordination state rejected exception ( " election not won " ) ; } if ( last published version ! = get last accepted version ( ) ) { logger debug ( " handle client value : cannot start publishing next value before accepting previous one " ) ; throw new coordination state rejected exception ( " cannot start publishing next value before accepting previous one " ) ; } if ( cluster state term ( ) ! = get current term ( ) ) { logger debug ( " handle client value : ignored request due to term mismatch " + " ( expected : [ term { } version > { } ] , actual : [ term { } version { } ] ) " , get current term ( ) , last published version , cluster state term ( ) , cluster state version ( ) ) ; throw new coordination state rejected exception ( " incoming term " + cluster state term ( ) + " does not match current term " + get current term ( ) ) ; } if ( cluster state version ( ) < = last published version ) { logger debug ( " handle client value : ignored request due to version mismatch " + " ( expected : [ term { } version > { } ] , actual : [ term { } version { } ] ) " , get current term ( ) , last published version , cluster state term ( ) , cluster state version ( ) ) ; throw new coordination state rejected exception ( " incoming cluster state version " + cluster state version ( ) + " lower or equal to last published version " + last published version ) ; } if ( cluster state get last accepted configuration ( ) equals ( get last accepted configuration ( ) ) = = false & & get last committed configuration ( ) equals ( get last accepted configuration ( ) ) = = false ) { logger debug ( " handle client value : only allow reconfiguration while not already reconfiguring " ) ; throw new coordination state rejected exception ( " only allow reconfiguration while not already reconfiguring " ) ; } if ( join votes have quorum for ( cluster state get last accepted configuration ( ) ) = = false ) { logger debug ( " handle client value : only allow reconfiguration if join votes have quorum for new config " ) ; throw new coordination state rejected exception ( " only allow reconfiguration if join votes have quorum for new config " ) ; } assert cluster state get last committed configuration ( ) equals ( get last committed configuration ( ) ) : " last committed configuration should not change " ; last published version = cluster state version ( ) ; last published configuration = cluster state get last accepted configuration ( ) ; publish votes = new vote collection ( ) ; logger trace ( " handle client value : processing request for version [ { } ] and term [ { } ] " , last published version , get current term ( ) ) ; return new publish request ( cluster state ) ; }


gets the lag to use when calculating the serial difference


calculate the usable size of a shared memory segment we round down to a multiple of the slot size and do some validation

private static int get usable length ( file input stream stream ) throws i o exception { int int size = ints checked cast ( stream get channel ( ) size ( ) ) ; int slots = int size / bytes per slot ; if ( slots = = 0 ) { throw new i o exception ( " size of shared memory segment was " + int size + " , but that is not enough to hold even one slot " ) ; } return slots * bytes per slot ; }


emits one element from the source , without attaching a timestamp in most cases , this is the default way of emitting elements the timestamp that the element will get assigned depends on the time characteristic of the streaming program : on { @ link time characteristic # processing time } , the element has no timestamp on { @ link time characteristic # ingestion time } , the element gets the system ' s current time as the timestamp on { @ link time characteristic # event time } , the element will have no timestamp initially it needs to get a timestamp ( via a { @ link timestamp assigner } ) before any time - dependent operation ( like time windows )


public int bytes before zero ( ) { return byte buf bytes before ( ( byte ) 0 ) ; }


protected void handle resolved value ( @ nullable object arg , string name , method parameter parameter , @ nullable model and view container mav container , native web request web request ) { }


returns a slot profile that has no requirements

public static slot profile no requirements ( ) { return no requirements ; }


returns a comma separated list of the enabled { @ link agent protocol # get name ( ) } implementations so that clients can avoid creating additional work for the server attempting to connect with unsupported protocols

public string get agent protocol names ( ) { return string utils join ( jenkins get ( ) get agent protocols ( ) , " , " ) ; }


cleans up internal state for all existing mocks you may assume there won ' t be any interaction to mocks created previously after this is called


override this to provide your own offset on every frame

public point f get offset ( lottie frame info < point f > frame info ) { if ( value = = null ) { throw new illegal argument exception ( " you must provide a static value in the constructor " + " , call set value , or override get value " ) ; } return value ; }


public static boolean write file from bytes by stream ( final string file path , final byte [ ] bytes ) { return write file from bytes by stream ( utils bridge get file by path ( file path ) , bytes , false , null ) ; }


update the foreign keys in the associated model ' s table

private void update associated table with f k ( lite pal support base obj ) { map < string , set < long > > associated model map = base obj get associated models map with f k ( ) ; content values values = new content values ( ) ; for ( string associated table name : associated model map key set ( ) ) { values clear ( ) ; string fk name = get foreign key column name ( base obj get table name ( ) ) ; values put ( fk name , base obj get base obj id ( ) ) ; set < long > ids = associated model map get ( associated table name ) ; if ( ids ! = null & & ! ids is empty ( ) ) { m database update ( associated table name , values , get where of ids with or ( ids ) , null ) ; } } }


return true if this cat object is equal to o

public boolean equals ( object o ) { if ( this = = o ) { return true ; } if ( o = = null | | get class ( ) ! = o get class ( ) ) { return false ; } cat cat = ( cat ) o ; return objects equals ( this declawed , cat declawed ) & & objects equals ( this additional properties , cat additional properties ) & & super equals ( o ) ; }


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

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


public static < k , v > multimap < k , v > unmodifiable multimap ( immutable multimap < k , v > delegate ) { return check not null ( delegate ) ; }


retrieves the currently active singleton instance of { @ link confidential store }

public static @ non null confidential store get ( ) { if ( test ! = null ) return test get ( ) ; jenkins j = jenkins get instance or null ( ) ; if ( j = = null ) { return mock instance ; } lookup lookup = j lookup ; confidential store cs = lookup get ( confidential store class ) ; if ( cs = = null ) { try { iterator < confidential store > it = service loader load ( confidential store class , confidential store class get class loader ( ) ) iterator ( ) ; if ( it has next ( ) ) { cs = it next ( ) ; } } catch ( service configuration error e ) { logger log ( level warning , " failed to list up confidential store implementations " , e ) ; / / fall through } if ( cs = = null ) try { cs = new default confidential store ( ) ; } catch ( exception e ) { / / if it ' s still null , bail out throw new error ( e ) ; } cs = lookup set if null ( confidential store class , cs ) ; } return cs ; }


closes the connection if the graceful shutdown process has completed

private void check close connection ( channel future future ) { / / if this connection is closing and the graceful shutdown has completed , close the connection / / once this operation completes if ( close listener ! = null & & is graceful shutdown complete ( ) ) { channel future listener close listener = this close listener ; / / this method could be called multiple times / / and we don ' t want to notify the close listener multiple times this close listener = null ; try { close listener operation complete ( future ) ; } catch ( exception e ) { throw new illegal state exception ( " close listener threw an unexpected exception " , e ) ; } } }


public void set hierarchy ( dh hierarchy ) { m drawee holder set hierarchy ( hierarchy ) ; super set image drawable ( m drawee holder get top level drawable ( ) ) ; }


combines three iterators into a single iterator the returned iterator iterates across the elements in { @ code a } , followed by the elements in { @ code b } , followed by the elements in { @ code c } the source iterators are not polled until necessary the returned iterator supports { @ code remove ( ) } when the corresponding input iterator supports it

public static < t > iterator < t > concat ( iterator < ? extends t > a , iterator < ? extends t > b , iterator < ? extends t > c ) { check not null ( a ) ; check not null ( b ) ; check not null ( c ) ; return concat ( consuming for array ( a , b , c ) ) ; }


sort the given array with a default annotation aware order comparator optimized to skip sorting for lists with size 0 or 1 , in order to avoid unnecessary array extraction

public static void sort ( object [ ] array ) { if ( array length > 1 ) { arrays sort ( array , instance ) ; } }


define the datetime format with a { @ link simple date format } note : setting this property makes the exposed { @ link object mapper } non - thread - safe , according to jackson ' s thread safety rules

public void set simple date format ( string format ) { this builder simple date format ( format ) ; }


join a thread as uninterruptible the call continues to block until the result is available even when the caller thread is interrupted the method will log any { @ link interrupted exception } then will re - interrupt the thread

public static void join uninterruptibly ( thread to join ) { boolean interrupted = false ; try { while ( true ) { try { to join join ( ) ; return ; } catch ( interrupted exception e ) { interrupted = true ; log warn ( " interrupted while sleeping " , e ) ; } } } finally { if ( interrupted ) { thread current thread ( ) interrupt ( ) ; } } }


private void test app attempt new state ( ) { assert equals ( r m app attempt state new , application attempt get app attempt state ( ) ) ; assert equals ( 0 , application attempt get diagnostics ( ) length ( ) ) ; assert equals ( 0 , application attempt get just finished containers ( ) size ( ) ) ; assert null ( application attempt get master container ( ) ) ; assert equals ( 0 0 , ( double ) application attempt get progress ( ) , 0 0001 ) ; assert equals ( 0 , application get ran nodes ( ) size ( ) ) ; assert null ( application attempt get final application status ( ) ) ; assert not null ( application attempt get tracking url ( ) ) ; assert false ( " n / a " equals ( application attempt get tracking url ( ) ) ) ; }


returns the flags for the setting { @ code id } , or 0 if unset

int flags ( int id ) { int result = 0 ; if ( is persisted ( id ) ) result | = settings persisted ; if ( persist value ( id ) ) result | = settings persist value ; return result ; }


heading h 6 ( string selector , string cdata ) ;


public string get a t t n a m e ( ) { return att name ; }


returns true if any bit in the given array is ' on ' ( set to 1 )

public static boolean contains on bit ( byte [ ] bytearray ) { for ( byte element : bytearray ) { int value = element & 0xff ; if ( value ! = 0 ) { return true ; } } return false ; }


returns an instance for the given register number and type , with no variable info this method is allowed to return shared instances ( but doesn ' t necessarily do so )

public static register spec make ( int reg , type bearer type ) { return intern ( reg , type , null ) ; }


adds the given providers from starlark an error is thrown if to add is not an iterable of objc provider instances

void add providers from starlark ( object to add ) throws eval exception { if ( ! ( to add instanceof iterable ) ) { throw starlark errorf ( apple starlark common bad providers iter error , starlark type ( to add ) ) ; } else { iterable < object > to add iterable = ( iterable < object > ) to add ; for ( object to add object : to add iterable ) { if ( ! ( to add object instanceof objc provider ) ) { throw starlark errorf ( apple starlark common bad providers elem error , starlark type ( to add object ) ) ; } else { objc provider objc provider = ( objc provider ) to add object ; this add transitive and propagate ( objc provider ) ; cc compilation context builder merge dependent cc compilation context ( objc provider get cc compilation context ( ) ) ; } } } }


passes a white - space separated single - string command ( like " cat abc def " ) and parse them as a command argument this method also handles quotes

public proc starter cmd as single string ( string s ) { return cmds ( quoted string tokenizer tokenize ( s ) ) ; }


chooses the bit position that minimizes the number of false negative generated while maximizing the number of false positive removed

private int ratio remove ( int [ ] h ) { compute ratio ( ) ; int min index = integer max value ; double min value = double max value ; for ( int i = 0 ; i < nb hash ; i + + ) { if ( ratio [ h [ i ] ] < min value ) { min value = ratio [ h [ i ] ] ; min index = h [ i ] ; } } return min index ; }


set the current tabbed panel to be the component with the given name

public boolean set current tabbed component ( string name ) { j component component = tab name to component map get ( name ) ; if ( component ! = null ) { if ( tabbed pane get selected component ( ) = = component ) { tab changed ( ) ; } tabbed pane set selected component ( component ) ; } return component ! = null ; }


public void add contents ( dex file file ) { / / nothing to do here }


returns true if there is any scanner thread registered

public synchronized boolean has any registered scanner ( ) { return ! scanners is empty ( ) ; }


guaranteed to throw an exception and leave the collection unmodified

public final int set count ( e element , int count ) { throw new unsupported operation exception ( ) ; }


generates a test case verifying that calling any wait for xxx method when not occupying the monitor produces an illegal monitor state exception

private static test case generate wait for when not occupying test case ( final method method , final boolean fair ) { final boolean timed = is timed ( method ) ; / / not going to bother with all timeouts , just 0ms string test name = method get name ( ) + ( fair ? " ( fair ) " : " ( nonfair ) " ) + ( timed ? " ( 0ms ) " : " ( ) " ) + " / not occupying - > imse " ; return new test case ( test name ) { @ override protected void run test ( ) throws throwable { monitor monitor = new monitor ( fair ) ; flag guard guard = new flag guard ( monitor ) ; list < object > arguments = new array list < > ( ) ; arguments add ( guard ) ; if ( is duration based ( method ) ) { arguments add ( duration zero ) ; } if ( is long time unit based ( method ) ) { arguments add ( 0l ) ; arguments add ( time unit milliseconds ) ; } try { method invoke ( monitor , arguments to array ( ) ) ; fail ( " expected illegal monitor state exception " ) ; } catch ( invocation target exception e ) { assert equals ( illegal monitor state exception class , e get target exception ( ) get class ( ) ) ; } } } ; }


byte [ ] execute key request ( uuid uuid , key request request ) throws media drm callback exception ;


public int get prize amount ( ) { return prize amount ; }


sets the file chooser to allow multiple file selections

public void set multi selection enabled ( boolean b ) { multi selection enabled = b ; if ( b ) { directory list set selection mode ( list selection model multiple interval selection ) ; directory table set selection mode ( list selection model multiple interval selection ) ; } else { directory list set selection mode ( list selection model single selection ) ; directory table set selection mode ( list selection model single selection ) ; } }


wrap credentials into an authentication transaction , as a factory method , and return the final result

public static default authentication transaction of ( final credential credentials ) { return of ( null , credentials ) ; }


return a file path that ends with the file name the path will be used by { @ link file type } for matching an example valid implementation could return the full path of the file , or just the file name , depending on what can efficiently be provided

string file path for file type matcher ( ) ;


removes the data type with the given name from the conflict mapping structure if the mapping is currently not loaded then this method can safely do nothing this method is synchronized to provide thread safe accessmanipulate of the map

synchronized void remove data type name ( string data type name ) { map < string , map < string , data type > > map = get map ( ) ; if ( map = = null ) { return ; } string base name = get base name ( data type name ) ; map < string , data type > inner map = map get ( base name ) ; if ( inner map = = null ) { return ; } inner map remove ( data type name ) ; }


makes adjustments as necessary to any annotations in the given text

public static string fixup annoations ( string raw comment text , program program ) { if ( raw comment text = = null ) { return null ; } attributed string prototype = create prototype ( ) ; / / this function will take any given symbol annotations and change the text , replacing / / the symbol name with the address of the symbol function < annotation , annotation > symbol fixer = annotation - > { annotated string handler handler = annotation get handler ( ) ; if ( ! ( handler instanceof symbol annotated string handler ) ) { return annotation ; / / nothing to change } string raw text = annotation get annotation text ( ) ; string [ ] annotation parts = annotation get annotation parts ( ) ; string updated text = symbol annotated string handler convert annotation symbol to address ( annotation parts , raw text , program ) ; if ( updated text = = null ) { return annotation ; / / nothing to change } return new annotation ( updated text , prototype , program ) ; } ; string builder buffy = new string builder ( ) ; list < object > parts = do parse text into text and annotations ( raw comment text , symbol fixer , program , prototype ) ; for ( object part : parts ) { if ( part instanceof string ) { string s = ( string ) part ; buffy append ( s ) ; } else if ( part instanceof annotation ) { annotation a = ( annotation ) part ; buffy append ( a get annotation text ( ) ) ; } else { throw new assert exception ( " unhandled annotation piece : " + part ) ; } } return buffy to string ( ) ; }


initialize an instance this method will be invoked after it has set all properties


private static directory listing get reserved listing ( f s directory fsd ) { return new directory listing ( fsd get reserved statuses ( ) , 0 ) ; }


public void set reserved ( long reserved size ) { this reserved = reserved size ; }


groups the available set of key groups into key group partitions a key group partition is the set of key groups which is assigned to the same task each set of the returned list constitutes a key group partition < b > important < b > : the assignment of key groups to partitions has to be in sync with the key group stream partitioner

public static list < key group range > create key group partitions ( int number key groups , int parallelism ) { preconditions check argument ( number key groups > = parallelism ) ; list < key group range > result = new array list < > ( parallelism ) ; for ( int i = 0 ; i < parallelism ; + + i ) { result add ( key group range assignment compute key group range for operator index ( number key groups , parallelism , i ) ) ; } return result ; }


returns the time when an entry will be in a staled status when cache is accessed whgen the entry is in staled status , it will

long get stale age in millis ( ) { return stale age in millis ; }


returns additional mapper implementations added by this plugin the key of the returned { @ link map } is the unique name for the mapper which will be used as the mapping { @ code type } , and the value is a { @ link mapper type parser } to parse the mapper settings into a { @ link mapper }

default map < string , mapper type parser > get mappers ( ) { return collections empty map ( ) ; }


return a bean with the specified name and type used to resolve services that are referenced by name in a { @ link cache operation }

protected < t > t get bean ( string bean name , class < t > expected type ) { if ( this bean factory = = null ) { throw new illegal state exception ( " bean factory must be set on cache aspect for " + expected type get simple name ( ) + " retrieval " ) ; } return bean factory annotation utils qualified bean of type ( this bean factory , expected type , bean name ) ; }


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

void enter current date time function ( sql base parser current date time function context ctx ) ;


returns true if a file exists at the current path

boolean file exists ( string path string ) ;


the comment associated with the & lt ; public & gt ; tag < code > optional string comment = 3 ; < code >

public java lang string get comment ( ) { return instance get comment ( ) ; }


get the sum of all buckets in the rolling counter for the given { @ link hystrix rolling number event } type the { @ link hystrix rolling number event } must be a " counter " type < code > hystrix rolling number event is counter ( ) = = true < code >

public long get rolling sum ( hystrix rolling number event type ) { bucket last bucket = get current bucket ( ) ; if ( last bucket = = null ) return 0 ; long sum = 0 ; for ( bucket b : buckets ) { sum + = b get adder ( type ) sum ( ) ; } return sum ; }


link to another { @ link stream operator } link the < code > next < code > stream operator using this stream operator as its input for example : { @ code stream operator a = ; stream operator b = ; stream operator c = a link ( b ) } the stream operator < code > c < code > in the above code is the same instance as < code > b < code > which takes < code > a < code > as its input note that stream operator < code > b < code > will be changed to link from stream operator < code > a < code >

public < s extends stream operator < ? > > s link ( s next ) { next link from ( this ) ; return next ; }


web sphere won ' t shutdown a servlet until after a 60 second timeout if there is an instance of the servlet executing a request add this method to enable a hook to notify hystrix to shutdown you must invoke this method at shutdown , perhaps from some other servlet ' s destroy ( ) method

public static void shutdown ( ) { is destroyed = true ; }


true signals that the showing state of the placeholder is true this is used to re - show providers after restoring from xml

boolean wants to be showing ( ) { return is showing ; }


public void set source ( list < e > source ) { assert not null ( source , " source list must not be null " ) ; this source = source ; this refresh date = new date ( ) ; this sort used = null ; }


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

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


the nonce provides a way for incremental mesh config requests to uniquely reference an incremental mesh config response the nonce is required < code > string nonce = 4 ; < code >

com google protobuf byte string get nonce bytes ( ) ;


if any connection limit is configured , this option can be optionally set to define after which time ( in milliseconds ) inactive streams are reclaimed this option can help to prevent that inactive streams make up the full pool of limited connections , and no further connections can be established unlimited timeout be default

public static config option < long > file system connection limit stream inactivity timeout ( string scheme ) { return config options key ( " fs " + scheme + " limit stream - timeout " ) default value ( 0l ) ; }


open and read a file with the open file api

private byte [ ] read open file a p i ( s 3 a file system fs , path test file path , int len , file status status ) throws exception { future data input stream builder builder = fs open file ( test file path ) ; if ( status ! = null ) { builder with file status ( status ) ; } try ( f s data input stream in = builder build ( ) get ( ) ) { byte [ ] bytes = new byte [ len ] ; in read fully ( 0 , bytes ) ; return bytes ; } }


initializes gl state call this after the egl surface has been created and made current

void surface created ( ) throws transcoding exception { m program = create program ( vertex shader , fragment shader ) ; if ( m program = = 0 ) { throw new transcoding exception ( " failed creating program " ) ; } ma position handle = gles20 gl get attrib location ( m program , " a position " ) ; check gl error ( " gl get attrib location a position " ) ; if ( ma position handle = = - 1 ) { throw new transcoding exception ( " could not get attrib location for a position " ) ; } ma texture handle = gles20 gl get attrib location ( m program , " a texture coord " ) ; check gl error ( " gl get attrib location a texture coord " ) ; if ( ma texture handle = = - 1 ) { throw new transcoding exception ( " could not get attrib location for a texture coord " ) ; } mu m v p matrix handle = gles20 gl get uniform location ( m program , " u m v p matrix " ) ; check gl error ( " gl get uniform location u m v p matrix " ) ; if ( mu m v p matrix handle = = - 1 ) { throw new transcoding exception ( " could not get attrib location for u m v p matrix " ) ; } mu s t matrix handle = gles20 gl get uniform location ( m program , " u s t matrix " ) ; check gl error ( " gl get uniform location u s t matrix " ) ; if ( mu s t matrix handle = = - 1 ) { throw new transcoding exception ( " could not get attrib location for u s t matrix " ) ; } int [ ] textures = new int [ 1 ] ; gles20 gl gen textures ( 1 , textures , 0 ) ; m texture i d = textures [ 0 ] ; gles20 gl bind texture ( g l e s 1 1 ext gl texture external oes , m texture i d ) ; check gl error ( " gl bind texture m texture i d " ) ; gles20 gl tex parameterf ( g l e s 1 1 ext gl texture external oes , gles20 gl texture min filter , gles20 gl linear ) ; gles20 gl tex parameterf ( g l e s 1 1 ext gl texture external oes , gles20 gl texture mag filter , gles20 gl linear ) ; gles20 gl tex parameteri ( g l e s 1 1 ext gl texture external oes , gles20 gl texture wrap s , gles20 gl clamp to edge ) ; gles20 gl tex parameteri ( g l e s 1 1 ext gl texture external oes , gles20 gl texture wrap t , gles20 gl clamp to edge ) ; check gl error ( " gl tex parameter " ) ; }


< code > required string city = 2 ; < code >

public java lang string get city ( ) { java lang object ref = city ; if ( ref instanceof java lang string ) { return ( java lang string ) ref ; } else { com google protobuf byte string bs = ( com google protobuf byte string ) ref ; java lang string s = bs to string utf 8 ( ) ; if ( bs is valid utf 8 ( ) ) { city = s ; } return s ; } }


test that template can contain conditional clause in this case it is at the beginning of the string

public void test template query as escaped string starting with conditional clause ( ) throws exception { search request search request = new search request ( ) ; search request indices ( " all " ) ; string template string = " { " + " \ " source \ " : \ " { { { # use size } } \ \ \ " size \ \ \ " : \ \ \ " { { size } } \ \ \ " , { { / use size } } \ \ \ " query \ \ \ " : { \ \ \ " match all \ \ \ " : { } } } \ " , " + " \ " params \ " : { " + " \ " size \ " : 1 , " + " \ " use size \ " : true " + " } " + " } " ; search template request request = search template request from x content ( create parser ( json x content json x content , template string ) ) ; request set request ( search request ) ; search template response search response = client ( ) execute ( search template action instance , request ) get ( ) ; assert that ( search response get response ( ) get hits ( ) get hits ( ) length , equal to ( 1 ) ) ; }


private address get section load address ( elf section header elf section header ) { address space space = get section address space ( elf section header ) ; if ( ! space is loaded memory space ( ) ) { / / handle non - loaded sections into the other space long addr word offset = elf section header get address ( ) ; return space get truncated address ( addr word offset , true ) ; } return elf get load adapter ( ) get preferred section address ( this , elf section header ) ; }


public boolean is wrapper for ( class < ? > iface ) throws s q l exception { if ( throw exception ) { throw new s q l exception ( ) ; } return false ; }


extracts all the new entities mentioned by this statement this does not include the subject of the statement

public set < recon item id value > extract pointers ( statement statement ) { set < recon item id value > result = new hash set < > ( ) ; result add all ( extract pointers ( statement get claim ( ) get main snak ( ) ) ) ; result add all ( extract pointers ( statement get claim ( ) get qualifiers ( ) ) ) ; statement get references ( ) stream ( ) map ( l - > extract pointers ( l get snak groups ( ) ) ) for each ( s - > result add all ( s ) ) ; return result ; }


public void set quota ( path src , final long namespace quota , final long storagespace quota ) throws i o exception { method not supported ( ) ; }


return a window definition with the window size based on the given maximum time difference ( inclusive ) between records in the same window and given window grace period reject out - of - order events that arrive after { @ code grace } a window is closed when { @ code stream - time > window - end + grace - period }

public static sliding windows with time difference and grace ( final duration time difference , final duration grace ) throws illegal argument exception { final string msg prefix size = prepare millis check fail msg prefix ( time difference , " time difference " ) ; final long time difference ms = validate millisecond duration ( time difference , msg prefix size ) ; if ( time difference ms < 0 ) { throw new illegal argument exception ( " window time difference must not be negative " ) ; } final string msg prefix grace = prepare millis check fail msg prefix ( grace , " grace " ) ; final long grace ms = validate millisecond duration ( grace , msg prefix grace ) ; if ( grace ms < 0 ) { throw new illegal argument exception ( " window grace period must not be negative " ) ; } return new sliding windows ( time difference ms , grace ms ) ; }


tries to replay the buffer contents to all known observers

void replay final ( ) { @ suppress warnings ( " unchecked " ) inner disposable < t > [ ] a = observers get and set ( terminated ) ; for ( inner disposable < t > rp : a ) { buffer replay ( rp ) ; } }


retrieves the underlying error when { @ link # type } is { @ link # type out of memory }

public out of memory error get out of memory error ( ) { assertions check state ( type = = type out of memory ) ; return ( out of memory error ) assertions check not null ( cause ) ; }


test the leaf to parent queue conversion , excluding the default queue

public void test reload turns leaf queue into parent ( ) { update configured leaf queues ( queue manager , " queue 1 " ) ; / / when no apps are running in the leaf queue , should be fine turning it / / into a parent update configured leaf queues ( queue manager , " queue 1 queue 2 " ) ; assert null ( queue manager get leaf queue ( " queue 1 " , false ) ) ; assert not null ( queue manager get leaf queue ( " queue 1 queue 2 " , false ) ) ; / / when leaf queues are empty , should be ok deleting them and / / turning parent into a leaf update configured leaf queues ( queue manager , " queue 1 " ) ; assert null ( queue manager get leaf queue ( " queue 1 queue 2 " , false ) ) ; assert not null ( queue manager get leaf queue ( " queue 1 " , false ) ) ; / / when apps exist in leaf queue , we shouldn ' t be able to create / / children under it , but things should work otherwise f s leaf queue q 1 = queue manager get leaf queue ( " queue 1 " , false ) ; application id app id = application id new instance ( 0 , 0 ) ; q 1 add assigned app ( app id ) ; update configured leaf queues ( queue manager , " queue 1 queue 2 " ) ; assert null ( queue manager get leaf queue ( " queue 1 queue 2 " , false ) ) ; assert not null ( queue manager get leaf queue ( " queue 1 " , false ) ) ; / / when apps exist in leaf queues under a parent queue , shouldn ' t be / / able to turn it into a leaf queue , but things should work otherwise q 1 remove assigned app ( app id ) ; update configured leaf queues ( queue manager , " queue 1 queue 2 " ) ; f s leaf queue q 2 = queue manager get leaf queue ( " queue 1 queue 2 " , false ) ; q 2 add assigned app ( app id ) ; update configured leaf queues ( queue manager , " queue 1 " ) ; assert not null ( queue manager get leaf queue ( " queue 1 queue 2 " , false ) ) ; assert null ( queue manager get leaf queue ( " queue 1 " , false ) ) ; / / should never to be able to create a queue under the default queue update configured leaf queues ( queue manager , " default queue 3 " ) ; assert null ( queue manager get leaf queue ( " default queue 3 " , false ) ) ; assert not null ( queue manager get leaf queue ( " default " , false ) ) ; }


< code > optional string product = 2 ; < code >


convenience method to get the specified member as a json primitive element

public json primitive get as json primitive ( string member name ) { return ( json primitive ) members get ( member name ) ; }


the { @ link topic name extractor } class that this sink node uses to dynamically extract the topic name to write to could be { @ code null } if the topic name is not dynamically determined

topic name extractor topic name extractor ( ) ;


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


public final toast utils set top icon ( drawable drawable ) { m icons [ 1 ] = drawable ; return this ; }


， ， copy from commons lang 3 5 string utils

public static list < string > split ( @ nullable final string str , final char separator char ) { return split ( str , separator char , 10 ) ; }


r m d t secret manager call this to update the state of a delegation token and sequence number

public void update r m delegation token ( r m delegation token identifier rm d t identifier , long renew date ) { handle store event ( new r m state store r m d t event ( rm d t identifier , renew date , r m state store event type update delegation token ) ) ; }


few queries allow you to set the boost on the java api , although the corresponding parser doesn ' t parse it as it isn ' t supported this method allows to disable boost related tests for those queries those queries are easy to identify : their parsers don ' t parse { @ code boost } as they don ' t apply to the specific query : wrapper query and { @ code match none }

protected boolean supports boost ( ) { return true ; }


determine a default locale to fall back to : either a locally specified default locale or the system locale , or { @ code null } for no fallback locale at all

protected locale get default locale ( ) { if ( this default locale ! = null ) { return this default locale ; } if ( this fallback to system locale ) { return locale get default ( ) ; } return null ; }


testing internal private logic due to the complexity so i want to use tdd to test as a i build it rather than relying purely on the overall functionality expected by the public methods

public void aggregator simple ( ) { publish subject < string > r 1 = publish subject create ( ) ; publish subject < string > r 2 = publish subject create ( ) ; / * define an observer to receive aggregated events * / observer < string > observer = test helper mock observer ( ) ; observable zip ( r 1 , r 2 , zipr 2 ) subscribe ( observer ) ; / * simulate the observables pushing data into the aggregator * / r 1 on next ( " hello " ) ; r 2 on next ( " world " ) ; in order in order = in order ( observer ) ; verify ( observer , never ( ) ) on error ( any ( throwable class ) ) ; verify ( observer , never ( ) ) on complete ( ) ; in order verify ( observer , times ( 1 ) ) on next ( " helloworld " ) ; r 1 on next ( " hello " ) ; r 2 on next ( " again " ) ; verify ( observer , never ( ) ) on error ( any ( throwable class ) ) ; verify ( observer , never ( ) ) on complete ( ) ; in order verify ( observer , times ( 1 ) ) on next ( " hello again " ) ; r 1 on complete ( ) ; r 2 on complete ( ) ; in order verify ( observer , never ( ) ) on next ( any string ( ) ) ; verify ( observer , times ( 1 ) ) on complete ( ) ; }


public synchronized boolean is open ( ) { return is open ; }


task that lists a directory and expects to fail

private static callable < boolean > get content summary fail task ( file system fs , path path ) { return ( ) - > { try { fs get content summary ( path ) ; return false ; } catch ( remote exception re ) { return true ; } } ; }


parses the specified string as a single - precision floating point value the ascii character { @ code ' - ' } ( < code > ' & # 92 ; u 0 0 2 d ' < code > ) is recognized as the minus sign unlike { @ link float # parse float ( string ) } , this method returns { @ code null } instead of throwing an exception if parsing fails valid inputs are exactly those accepted by { @ link float # value of ( string ) } , except that leading and trailing whitespace is not permitted this implementation is likely to be faster than { @ code float parse float } if many failures are expected

public static float try parse ( string string ) { if ( doubles floating point pattern matcher ( string ) matches ( ) ) { / / todo ( lowasser ) : could be potentially optimized , but only with / / extensive testing try { return float parse float ( string ) ; } catch ( number format exception e ) { / / float parse float has changed specs several times , so fall through / / gracefully } } return null ; }


returns this unsigned long value , shifted right by the given particular integer value

public long value unsigned shift right ( particular integer value other ) { return unsigned shift right ( ( specific integer value ) other ) ; }


this function is only called when sender is closed forcefully it will fail all the incomplete batches and return

public void abort incomplete batches ( ) { / / we need to keep aborting the incomplete batch until no thread is trying to append to / / 1 avoid losing batches / / 2 free up memory in case appending threads are blocked on buffer full / / this is a tight loop but should be able to get through very quickly do { abort batches ( ) ; } while ( appends in progress ( ) ) ; / / after this point , no thread will append any messages because they will see the close / / flag set we need to do the last abort after no thread was appending in case there was a new / / batch appended by the last appending thread abort batches ( ) ; this batches clear ( ) ; }


add a property callback for the specified { @ link key path } this { @ link key path } can resolve to multiple contents in that case , the callback ' s value will apply to all of them internally , this will check if the { @ link key path } has already been resolved with { @ link # resolve key path ( key path ) } and will resolve it if it hasn ' t

public < t > void add value callback ( key path key path , t property , lottie value callback < t > callback ) { lottie drawable add value callback ( key path , property , callback ) ; }


creates a crash caused by the given { @ link throwable } the exit code is generated by { @ link crash failure details # detailed exit code for throwable }

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


returns the ( designated ) physical storage location of the blob with the given key

static file get storage location ( file storage dir , @ nullable job i d job id , blob key key ) throws i o exception { file file = new file ( get storage location path ( storage dir get absolute path ( ) , job id , key ) ) ; files create directories ( file get parent file ( ) to path ( ) ) ; return file ; }


return the { @ link http headers } backing header related accessor methods , allowing for populating selected header entries

public final http headers get headers ( ) { return this headers ; }


used by { @ link default priority queue } to maintain state for an element in the queue throwing exceptions from this method will result in undefined behavior

void priority queue index ( default priority queue < ? > queue , int i ) ;


returns true if there is a value for the given key in the cache

public synchronized boolean contains ( @ non null t key ) { return cache contains key ( key ) ; }


manages the creation and registration of service record generated dns records

public void manage d n s records ( registry d n s registry command command ) throws i o exception { for ( map entry < integer , list < record descriptor > > entry : type to descriptor map entry set ( ) ) { for ( record descriptor record descriptor : entry get value ( ) ) { for ( name name : record descriptor get names ( ) ) { record creator factory record creator record creator = record creator factory get record creator ( entry get key ( ) ) ; command exec ( zone selctor find best zone ( name ) , record creator create ( name , record descriptor get target ( ) ) ) ; } } } }


returns the next datetime < i > after < i > the given datetime which satisfies the cron expression

public long get next valid time after ( final long time ) { / / computation is based on gregorian year only calendar cl = new java util gregorian calendar ( utc , locale root ) ; / / move ahead one second , since we ' re computing the time * after * the / / given time final long after time = time + 1000 ; / / cron trigger does not deal with milliseconds cl set time in millis ( after time ) ; cl set ( calendar millisecond , 0 ) ; boolean got one = false ; / / loop until we ' ve computed the next time , or we ' ve past the end time while ( ! got one ) { if ( cl get ( calendar year ) > 2999 ) { / / prevent endless loop return - 1 ; } sorted set < integer > st = null ; int t = 0 ; int sec = cl get ( calendar second ) ; int min = cl get ( calendar minute ) ; / / get second st = seconds tail set ( sec ) ; if ( st ! = null & & st size ( ) ! = 0 ) { sec = st first ( ) ; } else { sec = seconds first ( ) ; min + + ; cl set ( calendar minute , min ) ; } cl set ( calendar second , sec ) ; min = cl get ( calendar minute ) ; int hr = cl get ( calendar hour of day ) ; t = - 1 ; / / get minute st = minutes tail set ( min ) ; if ( st ! = null & & st size ( ) ! = 0 ) { t = min ; min = st first ( ) ; } else { min = minutes first ( ) ; hr + + ; } if ( min ! = t ) { cl set ( calendar second , 0 ) ; cl set ( calendar minute , min ) ; set calendar hour ( cl , hr ) ; continue ; } cl set ( calendar minute , min ) ; hr = cl get ( calendar hour of day ) ; int day = cl get ( calendar day of month ) ; t = - 1 ; / / get hour st = hours tail set ( hr ) ; if ( st ! = null & & st size ( ) ! = 0 ) { t = hr ; hr = st first ( ) ; } else { hr = hours first ( ) ; day + + ; } if ( hr ! = t ) { cl set ( calendar second , 0 ) ; cl set ( calendar minute , 0 ) ; cl set ( calendar day of month , day ) ; set calendar hour ( cl , hr ) ; continue ; } cl set ( calendar hour of day , hr ) ; day = cl get ( calendar day of month ) ; int mon = cl get ( calendar month ) + 1 ; / / ' + 1 ' because calendar is 0 - based for this field , and we are / / 1 - based t = - 1 ; int tmon = mon ; / / get day boolean day of m spec = ! days of month contains ( no spec ) ; boolean day of w spec = ! days of week contains ( no spec ) ; if ( day of m spec & & ! day of w spec ) { / / get day by day of month rule st = days of month tail set ( day ) ; if ( lastday of month ) { if ( ! nearest weekday ) { t = day ; day = get last day of month ( mon , cl get ( calendar year ) ) ; day - = lastday offset ; if ( t > day ) { mon + + ; if ( mon > 12 ) { mon = 1 ; tmon = 3333 ; / / ensure test of mon ! = tmon further below fails cl add ( calendar year , 1 ) ; } day = 1 ; } } else { t = day ; day = get last day of month ( mon , cl get ( calendar year ) ) ; day - = lastday offset ; calendar tcal = calendar get instance ( utc , locale root ) ; tcal set ( calendar second , 0 ) ; tcal set ( calendar minute , 0 ) ; tcal set ( calendar hour of day , 0 ) ; tcal set ( calendar day of month , day ) ; tcal set ( calendar month , mon - 1 ) ; tcal set ( calendar year , cl get ( calendar year ) ) ; int ldom = get last day of month ( mon , cl get ( calendar year ) ) ; int dow = tcal get ( calendar day of week ) ; if ( dow = = calendar saturday & & day = = 1 ) { day + = 2 ; } else if ( dow = = calendar saturday ) { day - = 1 ; } else if ( dow = = calendar sunday & & day = = ldom ) { day - = 2 ; } else if ( dow = = calendar sunday ) { day + = 1 ; } tcal set ( calendar second , sec ) ; tcal set ( calendar minute , min ) ; tcal set ( calendar hour of day , hr ) ; tcal set ( calendar day of month , day ) ; tcal set ( calendar month , mon - 1 ) ; long n time = tcal get time in millis ( ) ; if ( n time < after time ) { day = 1 ; mon + + ; } } } else if ( nearest weekday ) { t = day ; day = days of month first ( ) ; calendar tcal = calendar get instance ( utc , locale root ) ; tcal set ( calendar second , 0 ) ; tcal set ( calendar minute , 0 ) ; tcal set ( calendar hour of day , 0 ) ; tcal set ( calendar day of month , day ) ; tcal set ( calendar month , mon - 1 ) ; tcal set ( calendar year , cl get ( calendar year ) ) ; int ldom = get last day of month ( mon , cl get ( calendar year ) ) ; int dow = tcal get ( calendar day of week ) ; if ( dow = = calendar saturday & & day = = 1 ) { day + = 2 ; } else if ( dow = = calendar saturday ) { day - = 1 ; } else if ( dow = = calendar sunday & & day = = ldom ) { day - = 2 ; } else if ( dow = = calendar sunday ) { day + = 1 ; } tcal set ( calendar second , sec ) ; tcal set ( calendar minute , min ) ; tcal set ( calendar hour of day , hr ) ; tcal set ( calendar day of month , day ) ; tcal set ( calendar month , mon - 1 ) ; long n time = tcal get time in millis ( ) ; if ( n time < after time ) { day = days of month first ( ) ; mon + + ; } } else if ( st ! = null & & st size ( ) ! = 0 ) { t = day ; day = st first ( ) ; / / make sure we don ' t over - run a short month , such as february int last day = get last day of month ( mon , cl get ( calendar year ) ) ; if ( day > last day ) { day = days of month first ( ) ; mon + + ; } } else { day = days of month first ( ) ; mon + + ; } if ( day ! = t | | mon ! = tmon ) { cl set ( calendar second , 0 ) ; cl set ( calendar minute , 0 ) ; cl set ( calendar hour of day , 0 ) ; cl set ( calendar day of month , day ) ; cl set ( calendar month , mon - 1 ) ; / / ' - 1 ' because calendar is 0 - based for this field , and we / / are 1 - based continue ; } } else if ( day of w spec & & ! day of m spec ) { / / get day by day of week rule if ( lastday of week ) { / / are we looking for the last xxx day of / / the month ? int dow = days of week first ( ) ; / / desired / / d - o - w int c dow = cl get ( calendar day of week ) ; / / current d - o - w int days to add = 0 ; if ( c dow < dow ) { days to add = dow - c dow ; } if ( c dow > dow ) { days to add = dow + ( 7 - c dow ) ; } int l day = get last day of month ( mon , cl get ( calendar year ) ) ; if ( day + days to add > l day ) { / / did we already miss the / / last one ? cl set ( calendar second , 0 ) ; cl set ( calendar minute , 0 ) ; cl set ( calendar hour of day , 0 ) ; cl set ( calendar day of month , 1 ) ; cl set ( calendar month , mon ) ; / / no ' - 1 ' here because we are promoting the month continue ; } / / find date of last occurrence of this day in this month while ( ( day + days to add + 7 ) < = l day ) { days to add + = 7 ; } day + = days to add ; if ( days to add > 0 ) { cl set ( calendar second , 0 ) ; cl set ( calendar minute , 0 ) ; cl set ( calendar hour of day , 0 ) ; cl set ( calendar day of month , day ) ; cl set ( calendar month , mon - 1 ) ; / / ' - 1 ' here because we are not promoting the month continue ; } } else if ( nthday of week ! = 0 ) { / / are we looking for the nth xxx day in the month ? int dow = days of week first ( ) ; / / desired / / d - o - w int c dow = cl get ( calendar day of week ) ; / / current d - o - w int days to add = 0 ; if ( c dow < dow ) { days to add = dow - c dow ; } else if ( c dow > dow ) { days to add = dow + ( 7 - c dow ) ; } boolean day shifted = false ; if ( days to add > 0 ) { day shifted = true ; } day + = days to add ; int week of month = day / 7 ; if ( day % 7 > 0 ) { week of month + + ; } days to add = ( nthday of week - week of month ) * 7 ; day + = days to add ; if ( days to add < 0 | | day > get last day of month ( mon , cl get ( calendar year ) ) ) { cl set ( calendar second , 0 ) ; cl set ( calendar minute , 0 ) ; cl set ( calendar hour of day , 0 ) ; cl set ( calendar day of month , 1 ) ; cl set ( calendar month , mon ) ; / / no ' - 1 ' here because we are promoting the month continue ; } else if ( days to add > 0 | | day shifted ) { cl set ( calendar second , 0 ) ; cl set ( calendar minute , 0 ) ; cl set ( calendar hour of day , 0 ) ; cl set ( calendar day of month , day ) ; cl set ( calendar month , mon - 1 ) ; / / ' - 1 ' here because we are not promoting the month continue ; } } else { int c dow = cl get ( calendar day of week ) ; / / current d - o - w int dow = days of week first ( ) ; / / desired / / d - o - w st = days of week tail set ( c dow ) ; if ( st ! = null & & st size ( ) > 0 ) { dow = st first ( ) ; } int days to add = 0 ; if ( c dow < dow ) { days to add = dow - c dow ; } if ( c dow > dow ) { days to add = dow + ( 7 - c dow ) ; } int l day = get last day of month ( mon , cl get ( calendar year ) ) ; if ( day + days to add > l day ) { / / will we pass the end of / / the month ? cl set ( calendar second , 0 ) ; cl set ( calendar minute , 0 ) ; cl set ( calendar hour of day , 0 ) ; cl set ( calendar day of month , 1 ) ; cl set ( calendar month , mon ) ; / / no ' - 1 ' here because we are promoting the month continue ; } else if ( days to add > 0 ) { / / are we swithing days ? cl set ( calendar second , 0 ) ; cl set ( calendar minute , 0 ) ; cl set ( calendar hour of day , 0 ) ; cl set ( calendar day of month , day + days to add ) ; cl set ( calendar month , mon - 1 ) ; / / ' - 1 ' because calendar is 0 - based for this field , / / and we are 1 - based continue ; } } } else { / / day of w spec & & ! day of m spec return - 1 ; / / throw new unsupported operation exception ( / / " support for specifying both a day - of - week and a day - of - month parameter is not implemented " ) ; } cl set ( calendar day of month , day ) ; mon = cl get ( calendar month ) + 1 ; / / ' + 1 ' because calendar is 0 - based for this field , and we are / / 1 - based int year = cl get ( calendar year ) ; t = - 1 ; / / test for expressions that never generate a valid fire date , / / but keep looping if ( year > max year ) { return - 1 ; / / throw new elasticsearch illegal argument exception ( " given time is not supported by cron [ " + formatter print ( time ) + " ] " ) ; } / / get month st = months tail set ( mon ) ; if ( st ! = null & & st size ( ) ! = 0 ) { t = mon ; mon = st first ( ) ; } else { mon = months first ( ) ; year + + ; } if ( mon ! = t ) { cl set ( calendar second , 0 ) ; cl set ( calendar minute , 0 ) ; cl set ( calendar hour of day , 0 ) ; cl set ( calendar day of month , 1 ) ; cl set ( calendar month , mon - 1 ) ; / / ' - 1 ' because calendar is 0 - based for this field , and we are / / 1 - based cl set ( calendar year , year ) ; continue ; } cl set ( calendar month , mon - 1 ) ; / / ' - 1 ' because calendar is 0 - based for this field , and we are / / 1 - based year = cl get ( calendar year ) ; t = - 1 ; / / get year st = years tail set ( year ) ; if ( st ! = null & & st size ( ) ! = 0 ) { t = year ; year = st first ( ) ; } else { return - 1 ; / / throw new elasticsearch illegal argument exception ( " given time is not supported by cron [ " + formatter print ( time ) + " ] " ) ; } if ( year ! = t ) { cl set ( calendar second , 0 ) ; cl set ( calendar minute , 0 ) ; cl set ( calendar hour of day , 0 ) ; cl set ( calendar day of month , 1 ) ; cl set ( calendar month , 0 ) ; / / ' - 1 ' because calendar is 0 - based for this field , and we are / / 1 - based cl set ( calendar year , year ) ; continue ; } cl set ( calendar year , year ) ; got one = true ; } / / while ( ! done ) return cl get time in millis ( ) ; }


public final request builder set parent task id ( task id task id ) { request set parent task id ( task id ) ; return ( request builder ) this ; }


public com google common util concurrent listenable future < io grpc benchmarks proto control void > quit worker ( io grpc benchmarks proto control void request ) { return io grpc stub client calls future unary call ( get channel ( ) new call ( get quit worker method ( ) , get call options ( ) ) , request ) ; }


indicates whether the given character is in the { @ code unreserved } set

protected boolean is unreserved ( int c ) { return ( is alpha ( c ) | | is digit ( c ) | | ' - ' = = c | | ' ' = = c | | ' ' = = c | | ' ~ ' = = c ) ; }


if we ' re asked by unit tests to not retry , set the retry policy factory in the client accordingly

private void suppress retry policy in client if needed ( ) { if ( suppress retry policy ) { storage interaction layer set retry policy factory ( new retry no retry ( ) ) ; } }


default byte [ ] get bytes ( big integer value , int size ) { byte [ ] bytes = new byte [ size ] ; put big integer ( bytes , 0 , size , value ) ; return bytes ; }


tests that reconfiguration correctly reorders subclass registrations to their previous order

public void test reconfigure different subclass registration order ( ) throws exception { execution config execution config = new execution config ( ) ; execution config register pojo type ( sub test user class a class ) ; execution config register pojo type ( sub test user class b class ) ; pojo serializer < test user class > pojo serializer = ( pojo serializer < test user class > ) type create serializer ( execution config ) ; / / get original registration ids int sub class a tag = pojo serializer get registered classes ( ) get ( sub test user class a class ) ; int sub class b tag = pojo serializer get registered classes ( ) get ( sub test user class b class ) ; / / snapshot configuration and serialize to bytes type serializer snapshot pojo serializer config snapshot = pojo serializer snapshot configuration ( ) ; byte [ ] serialized config ; try ( byte array output stream out = new byte array output stream ( ) ) { type serializer snapshot serialization util write serializer snapshot ( new data output view stream wrapper ( out ) , pojo serializer config snapshot , pojo serializer ) ; serialized config = out to byte array ( ) ; } / / use new config and instantiate new pojo serializer execution config = new execution config ( ) ; execution config register pojo type ( sub test user class b class ) ; / / test with b registered before a execution config register pojo type ( sub test user class a class ) ; pojo serializer = ( pojo serializer < test user class > ) type create serializer ( execution config ) ; / / read configuration from bytes try ( byte array input stream in = new byte array input stream ( serialized config ) ) { pojo serializer config snapshot = type serializer snapshot serialization util read serializer snapshot ( new data input view stream wrapper ( in ) , thread current thread ( ) get context class loader ( ) , pojo serializer ) ; } @ suppress warnings ( " unchecked " ) type serializer schema compatibility < test user class > compat result = pojo serializer config snapshot resolve schema compatibility ( pojo serializer ) ; assert true ( compat result is compatible with reconfigured serializer ( ) ) ; assert true ( compat result get reconfigured serializer ( ) instanceof pojo serializer ) ; / / reconfigure - check reconfiguration result and that registration ids remains the same / / assert equals ( reconfigure result compatible , / / pojo serializer reconfigure ( pojo serializer config snapshot ) ) ; pojo serializer < test user class > reconfigured pojo serializer = ( pojo serializer < test user class > ) compat result get reconfigured serializer ( ) ; assert equals ( sub class a tag , reconfigured pojo serializer get registered classes ( ) get ( sub test user class a class ) int value ( ) ) ; assert equals ( sub class b tag , reconfigured pojo serializer get registered classes ( ) get ( sub test user class b class ) int value ( ) ) ; }


sets the color drawing borders around the bars

public void set bar border color ( int color ) { m bar border color = color ; }


enum values can override for performance reasons

string convert ( case format format , string s ) { / / deal with camel conversion string builder out = null ; int i = 0 ; int j = - 1 ; while ( ( j = word boundary index in ( s , + + j ) ) ! = - 1 ) { if ( i = = 0 ) { / / include some extra space for separators out = new string builder ( s length ( ) + 4 * format word separator length ( ) ) ; out append ( format normalize first word ( s substring ( i , j ) ) ) ; } else { out append ( format normalize word ( s substring ( i , j ) ) ) ; } out append ( format word separator ) ; i = j + word separator length ( ) ; } return ( i = = 0 ) ? format normalize first word ( s ) : out append ( format normalize word ( s substring ( i ) ) ) to string ( ) ; }


return { @ code true } if this type resolves to a class that represents an array

public boolean is array ( ) { if ( this = = none ) { return false ; } return ( ( this type instanceof class & & ( ( class < ? > ) this type ) is array ( ) ) | | this type instanceof generic array type | | resolve type ( ) is array ( ) ) ; }


submits the given command for execution in the future in the mailbox thread and returns a future representing that command the future ' s { @ code get } method will return { @ code null } upon successful completion an optional description can ( and should ) be added to ease debugging and error - reporting the description may contain placeholder that refer to the provided description arguments using { @ link java util formatter } syntax the actual description is only formatted on demand

default @ nonnull future < void > submit ( @ nonnull runnable with exception command , string description format , object description args ) { future task with exception < void > future = new future task with exception < > ( command ) ; execute ( future , description format , description args ) ; return future ; }


return a { @ link resource http request handler } instance

protected resource http request handler get request handler ( ) { resource http request handler handler = new resource http request handler ( ) ; if ( this resource chain registration ! = null ) { handler set resource resolvers ( this resource chain registration get resource resolvers ( ) ) ; handler set resource transformers ( this resource chain registration get resource transformers ( ) ) ; } handler set location values ( this location values ) ; handler set locations ( this locations resources ) ; if ( this cache control ! = null ) { handler set cache control ( this cache control ) ; } else if ( this cache period ! = null ) { handler set cache seconds ( this cache period ) ; } handler set use last modified ( this use last modified ) ; return handler ; }


returns this unsigned long value , shifted left by the given integer value

public long value unsigned shift right ( integer value other ) { return other unsigned shift right of ( this ) ; }


stops a specific node in the cluster returns true if the node was found to stop , false otherwise

public synchronized boolean stop node ( string node name ) throws i o exception { ensure open ( ) ; optional < node and client > node to stop = nodes values ( ) stream ( ) filter ( n - > n get name ( ) equals ( node name ) ) find first ( ) ; if ( node to stop is present ( ) ) { logger info ( " closing node [ { } ] " , node to stop get ( ) name ) ; stop nodes and client ( node to stop get ( ) ) ; return true ; } return false ; }


create a memory block ( possible fragment if conflicts resolved ) for the specified loadable " section " if multiple blocks are created due to size restrictions only the first block will be returned the returned block ' s length can be checked to determine if this has occurred

protected abstract memory block create uninitialized block ( memory loadable key , boolean is overlay , string name , address start , long length , string comment , boolean r , boolean w , boolean x ) throws i o exception , address overflow exception , cancelled exception ;


public depset / * < symlink entry > * / get root symlinks for starlark ( ) { return depset of ( symlink entry type , root symlinks ) ; }


removes all the items from the cache whose key matches the specified predicate

public int remove all ( predicate < k > predicate ) { array list < entry < k , v > > old l f u exclusives ; array list < entry < k , v > > old m f u exclusives ; array list < entry < k , v > > old entries ; synchronized ( this ) { old l f u exclusives = m least frequently used exclusive entries remove all ( predicate ) ; old m f u exclusives = m most frequently used exclusive entries remove all ( predicate ) ; old entries = m cached entries remove all ( predicate ) ; make orphans ( old entries ) ; } maybe close ( old entries ) ; maybe notify exclusive entries removal ( old l f u exclusives , old m f u exclusives ) ; maybe update cache params ( ) ; maybe evict entries ( ) ; return old entries size ( ) ; }


public boolean is failed ( ) { return failure ! = null ; }


called when an output buffer is successfully processed

protected void on processed output buffer ( long presentation time us ) { while ( pending output stream offset count ! = 0 & & presentation time us > = pending output stream switch times us [ 0 ] ) { output stream start position us = pending output stream start positions us [ 0 ] ; output stream offset us = pending output stream offsets us [ 0 ] ; pending output stream offset count - - ; system arraycopy ( pending output stream start positions us , / * src pos = * / 1 , pending output stream start positions us , / * dest pos = * / 0 , pending output stream offset count ) ; system arraycopy ( pending output stream offsets us , / * src pos = * / 1 , pending output stream offsets us , / * dest pos = * / 0 , pending output stream offset count ) ; system arraycopy ( pending output stream switch times us , / * src pos = * / 1 , pending output stream switch times us , / * dest pos = * / 0 , pending output stream offset count ) ; on processed stream change ( ) ; } }


returns a class object that identifies the declared type for the field

public class get type ( ) { return field get type ( ) ; }


sets a regular expression pattern for prefixes to provide completions for

public completion suggestion builder regex ( string regex ) { super regex ( regex ) ; return this ; }


one or more endpoints associated with the service < code > repeated istio networking v 1alpha 3 service entry endpoint endpoints = 6 ; < code >

public com alibaba nacos istio model naming service entry endpoint builder get endpoints builder ( int index ) { return get endpoints field builder ( ) get builder ( index ) ; }


private put message result put back to half queue return result ( message ext message ext ) { put message result put message result = null ; try { message ext broker inner msg inner = transactional message bridge renew half message inner ( message ext ) ; put message result = transactional message bridge put message return result ( msg inner ) ; } catch ( exception e ) { log warn ( " put back to half queue return result error " , e ) ; } return put message result ; }


the version of the node on the other side of this stream

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


returns the configuration for how to work with metrics

protected metrics metrics ( ) { return ( metrics = = null ) ? ( metrics = new metrics ( ) ) : metrics ; }


decrypt the encrypted text with aes algorithm

public static string aes decrypt ( string encrypted text ) { if ( text utils is empty ( encrypted text ) ) { return encrypted text ; } try { return a e s crypt decrypt ( aes key , encrypted text ) ; } catch ( exception e ) { e print stack trace ( ) ; } return null ; }


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

public test after bind props view model on visibility state changed ( on model visibility state changed listener < test after bind props view model , test after bind props view > listener ) { on mutation ( ) ; this on model visibility state changed listener epoxy generated model = listener ; return this ; }


returns the next available http chunk the caller is responsible to test if this chunk is the last one ( is last ( ) ) , in order to stop calling this get method

public http content read chunk ( byte buf allocator allocator ) throws exception { if ( is last chunk sent ) { return null ; } else { http content next chunk = next chunk ( ) ; global progress + = next chunk content ( ) readable bytes ( ) ; return next chunk ; } }


test adding a listener and check if events are sent to it , for the types it was registered for also checks that after removal , no events are received

public void add and remove event listener typed ( ) throws exception { / / create a listener that just adds the events to a list test activiti event listener new listener = new test activiti event listener ( ) ; / / add event - listener to dispatcher dispatcher add event listener ( new listener , activiti event type entity created , activiti event type entity deleted ) ; activiti entity event impl event 1 = new activiti entity event impl ( process engine configuration get task entity manager ( ) create ( ) , activiti event type entity created ) ; activiti entity event impl event 2 = new activiti entity event impl ( process engine configuration get task entity manager ( ) create ( ) , activiti event type entity deleted ) ; activiti entity event impl event 3 = new activiti entity event impl ( process engine configuration get task entity manager ( ) create ( ) , activiti event type entity updated ) ; / / dispatch events , only 2 out of 3 should have entered the listener dispatcher dispatch event ( event 1 ) ; dispatcher dispatch event ( event 2 ) ; dispatcher dispatch event ( event 3 ) ; assert that ( new listener get events received ( ) ) has size ( 2 ) ; assert that ( new listener get events received ( ) get ( 0 ) ) is equal to ( event 1 ) ; assert that ( new listener get events received ( ) get ( 1 ) ) is equal to ( event 2 ) ; / / remove listener and dispatch events again , listener should not be / / invoked dispatcher remove event listener ( new listener ) ; new listener clear events received ( ) ; dispatcher dispatch event ( event 1 ) ; dispatcher dispatch event ( event 2 ) ; assert that ( new listener get events received ( ) is empty ( ) ) is true ( ) ; }


none of the blocks can be removed if all blocks are corrupt the test strategy : bring up cluster with 3 data nodes create a file of replication factor 3 corrupt all three replicas verify that all replicas are corrupt and 3 replicas are present set the replication factor to 1 verify that all replicas are corrupt and 3 replicas are present

public void test with all corrupt replicas ( ) throws exception { configuration conf = new hdfs configuration ( ) ; conf set long ( d f s config keys dfs blockreport interval msec key , 1000l ) ; conf set ( d f s config keys dfs namenode reconstruction pending timeout sec key , integer to string ( 2 ) ) ; mini d f s cluster cluster = new mini d f s cluster builder ( conf ) num data nodes ( 3 ) build ( ) ; file system fs = cluster get file system ( ) ; final f s namesystem namesystem = cluster get namesystem ( ) ; try { final path file name = new path ( " / foo 1 " ) ; d f s test util create file ( fs , file name , 2 , ( short ) 3 , 0l ) ; d f s test util wait replication ( fs , file name , ( short ) 3 ) ; extended block block = d f s test util get first block ( fs , file name ) ; corrupt block ( cluster , fs , file name , 0 , block ) ; corrupt block ( cluster , fs , file name , 1 , block ) ; corrupt block ( cluster , fs , file name , 2 , block ) ; / / wait for 3 seconds so that all block reports are processed try { thread sleep ( 3000 ) ; } catch ( interrupted exception ignored ) { } assert equals ( 0 , count replicas ( namesystem , block ) live replicas ( ) ) ; assert equals ( 3 , count replicas ( namesystem , block ) corrupt replicas ( ) ) ; namesystem set replication ( file name to string ( ) , ( short ) 1 ) ; / / wait for 3 seconds so that all block reports are processed try { thread sleep ( 3000 ) ; } catch ( interrupted exception ignored ) { } assert equals ( 0 , count replicas ( namesystem , block ) live replicas ( ) ) ; assert equals ( 3 , count replicas ( namesystem , block ) corrupt replicas ( ) ) ; } finally { cluster shutdown ( ) ; } }


public synchronized void stop ( ) throws privileged action exception { access controller do privileged ( new privileged exception action < void > ( ) { @ override @ suppress forbidden ( reason = " set or clear system property krb 5 debug in kerberos tests " ) public void run ( ) throws exception { if ( simple kdc ! = null ) { try { simple kdc stop ( ) ; } catch ( krb exception e ) { throw exceptions helper convert to runtime ( e ) ; } finally { system set property ( " sun security krb 5 debug " , boolean to string ( krb 5 debug backup config value ) ) ; } } if ( ldap server ! = null ) { ldap server shut down ( true ) ; } return null ; } } ) ; logger info ( " simple kdc server stoppped " ) ; }


configures the delimiter that separates fields in a row for the csv reader used to read the edges ( { @ code ' , ' } ) is used by default

public graph csv reader field delimiter edges ( string delimiter ) { this edge reader field delimiter ( delimiter ) ; return this ; }


count the number of records in this stream by the grouped key and defined windows records with { @ code null } key or value are ignored the result is written into a local { @ link window store } ( which is basically an ever - updating materialized view ) the default key serde from the config will be used for serializing the result if a different serde is required then you should use { @ link # count ( materialized ) } furthermore , updates to the store are sent downstream into a { @ link k table } changelog stream not all updates might get sent downstream , as an internal cache is used to deduplicate consecutive updates to the same window and key the rate of propagated updates depends on your input data rate , the number of distinct keys , the number of parallel running kafka streams instances , and the { @ link streams config configuration } parameters for { @ link streams config # cache max bytes buffering config cache size } , and { @ link streams config # commit interval ms config commit interval } for failure and recovery the store ( which always will be of type { @ link timestamped window store } ) will be backed by an internal changelog topic that will be created in kafka the changelog topic will be named " $ { application id } - $ { internal store name } - changelog " , where " application id " is user - specified in { @ link streams config streams config } via parameter { @ link streams config # application id config application id config } , " internal store name " is an internal name and " - changelog " is a fixed suffix note that the internal store name may not be queryable through interactive queries you can retrieve all generated internal topic names via { @ link topology # describe ( ) }

k table < windowed < k > , long > count ( ) ;


returns the { @ link channel group } which is associated with this future


get unsorted unmodifiable list of all processor context registers ( include base context register and children )

public list < register > get context registers ( ) { return context registers ; }


public polygon builder close ( ) { shell close ( ) ; return this ; }


writes an info log message containing the parameters only the first 4 elements of the state array are included in the message

void log ( string label , int num dirs , int test case num , boolean [ ] state ) { log info ( " = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = " ) ; log info ( " * * * test " + ( test counter + + ) + " * * * " + label + " : " + " num dirs = " + num dirs + " test case = " + test case num + " current = " + state [ current exists ] + " previous = " + state [ previous exists ] + " previous tmp = " + state [ previous tmp exists ] + " removed tmp = " + state [ removed tmp exists ] + " should recover = " + state [ should recover ] + " current exists after = " + state [ current should exist after recover ] + " previous exists after = " + state [ previous should exist after recover ] ) ; }


closes the remote side of the given stream if this causes the stream to be closed , adds a hook to close the channel after the given future completes

public void close stream remote ( http 2 stream stream , channel future future ) { switch ( stream state ( ) ) { case half closed remote : case open : stream close remote side ( ) ; break ; default : close stream ( stream , future ) ; break ; } }


returns configuration key for effective usergroups allowed for a superuser

public string get proxy superuser user conf key ( string user name ) { return config prefix + user name + conf users ; }


public void outer enum test ( ) { / / todo : test outer enum }


shuffles the current play queue this method first backs up the existing play queue and item being played then a newly shuffled play queue will be generated along with currently playing item placed at the beginning of the queue will emit a { @ link reorder event } in any context

public synchronized void shuffle ( ) { if ( backup = = null ) { backup = new array list < > ( streams ) ; } final int origin index = get index ( ) ; final play queue item current = get item ( ) ; collections shuffle ( streams ) ; final int new index = streams index of ( current ) ; if ( new index ! = - 1 ) { streams add ( 0 , streams remove ( new index ) ) ; } queue index set ( 0 ) ; if ( streams size ( ) > 0 ) { history add ( streams get ( 0 ) ) ; } broadcast ( new reorder event ( origin index , queue index get ( ) ) ) ; }


the java compatible android package name of the app < code > optional string package name = 2 ; < code >

public builder clear package name ( ) { copy on write ( ) ; instance clear package name ( ) ; return this ; }


encodes all of the provided data , starting at in pos , for in avail bytes must be called at least twice : once with the data to encode , and once with in avail set to " - 1 " to alert encoder that eof has been reached , so flush last remaining bytes ( if not multiple of 5 )

void encode ( final byte [ ] in , int in pos , final int in avail , final context context ) { / / package protected for access from i / o streams if ( context eof ) { return ; } / / in avail < 0 is how we ' re informed of eof in the underlying data we ' re / / encoding if ( in avail < 0 ) { context eof = true ; if ( 0 = = context modulus & & line length = = 0 ) { return ; / / no leftovers to process and not using chunking } final byte [ ] buffer = ensure buffer size ( encode size , context ) ; final int saved pos = context pos ; switch ( context modulus ) { / / % 5 case 0 : break ; case 1 : / / only 1 octet ; take top 5 bits then remainder buffer [ context pos + + ] = encode table [ ( int ) ( context lbit work area > > 3 ) & mask 5bits ] ; / / 8 - 1 * 5 = 3 buffer [ context pos + + ] = encode table [ ( int ) ( context lbit work area < < 2 ) & mask 5bits ] ; / / 5 - 3 = 2 buffer [ context pos + + ] = pad ; buffer [ context pos + + ] = pad ; buffer [ context pos + + ] = pad ; buffer [ context pos + + ] = pad ; buffer [ context pos + + ] = pad ; buffer [ context pos + + ] = pad ; break ; case 2 : / / 2 octets = 16 bits to use buffer [ context pos + + ] = encode table [ ( int ) ( context lbit work area > > 11 ) & mask 5bits ] ; / / 16 - 1 * 5 = 11 buffer [ context pos + + ] = encode table [ ( int ) ( context lbit work area > > 6 ) & mask 5bits ] ; / / 16 - 2 * 5 = 6 buffer [ context pos + + ] = encode table [ ( int ) ( context lbit work area > > 1 ) & mask 5bits ] ; / / 16 - 3 * 5 = 1 buffer [ context pos + + ] = encode table [ ( int ) ( context lbit work area < < 4 ) & mask 5bits ] ; / / 5 - 1 = 4 buffer [ context pos + + ] = pad ; buffer [ context pos + + ] = pad ; buffer [ context pos + + ] = pad ; buffer [ context pos + + ] = pad ; break ; case 3 : / / 3 octets = 24 bits to use buffer [ context pos + + ] = encode table [ ( int ) ( context lbit work area > > 19 ) & mask 5bits ] ; / / 24 - 1 * 5 = 19 buffer [ context pos + + ] = encode table [ ( int ) ( context lbit work area > > 14 ) & mask 5bits ] ; / / 24 - 2 * 5 = 14 buffer [ context pos + + ] = encode table [ ( int ) ( context lbit work area > > 9 ) & mask 5bits ] ; / / 24 - 3 * 5 = 9 buffer [ context pos + + ] = encode table [ ( int ) ( context lbit work area > > 4 ) & mask 5bits ] ; / / 24 - 4 * 5 = 4 buffer [ context pos + + ] = encode table [ ( int ) ( context lbit work area < < 1 ) & mask 5bits ] ; / / 5 - 4 = 1 buffer [ context pos + + ] = pad ; buffer [ context pos + + ] = pad ; buffer [ context pos + + ] = pad ; break ; case 4 : / / 4 octets = 32 bits to use buffer [ context pos + + ] = encode table [ ( int ) ( context lbit work area > > 27 ) & mask 5bits ] ; / / 32 - 1 * 5 = 27 buffer [ context pos + + ] = encode table [ ( int ) ( context lbit work area > > 22 ) & mask 5bits ] ; / / 32 - 2 * 5 = 22 buffer [ context pos + + ] = encode table [ ( int ) ( context lbit work area > > 17 ) & mask 5bits ] ; / / 32 - 3 * 5 = 17 buffer [ context pos + + ] = encode table [ ( int ) ( context lbit work area > > 12 ) & mask 5bits ] ; / / 32 - 4 * 5 = 12 buffer [ context pos + + ] = encode table [ ( int ) ( context lbit work area > > 7 ) & mask 5bits ] ; / / 32 - 5 * 5 = 7 buffer [ context pos + + ] = encode table [ ( int ) ( context lbit work area > > 2 ) & mask 5bits ] ; / / 32 - 6 * 5 = 2 buffer [ context pos + + ] = encode table [ ( int ) ( context lbit work area < < 3 ) & mask 5bits ] ; / / 5 - 2 = 3 buffer [ context pos + + ] = pad ; break ; default : throw new illegal state exception ( " impossible modulus " + context modulus ) ; } context current line pos + = context pos - saved pos ; / / keep track of current line position / / if current pos = = 0 we are at the start of a line , so don ' t add crlf if ( line length > 0 & & context current line pos > 0 ) { / / add chunk separator if required system arraycopy ( line separator , 0 , buffer , context pos , line separator length ) ; context pos + = line separator length ; } } else { for ( int i = 0 ; i < in avail ; i + + ) { final byte [ ] buffer = ensure buffer size ( encode size , context ) ; context modulus = ( context modulus + 1 ) % bytes per unencoded block ; int b = in [ in pos + + ] ; if ( b < 0 ) { b + = 256 ; } context lbit work area = ( context lbit work area < < 8 ) + b ; / / bits per byte if ( 0 = = context modulus ) { / / we have enough bytes to create our output buffer [ context pos + + ] = encode table [ ( int ) ( context lbit work area > > 35 ) & mask 5bits ] ; buffer [ context pos + + ] = encode table [ ( int ) ( context lbit work area > > 30 ) & mask 5bits ] ; buffer [ context pos + + ] = encode table [ ( int ) ( context lbit work area > > 25 ) & mask 5bits ] ; buffer [ context pos + + ] = encode table [ ( int ) ( context lbit work area > > 20 ) & mask 5bits ] ; buffer [ context pos + + ] = encode table [ ( int ) ( context lbit work area > > 15 ) & mask 5bits ] ; buffer [ context pos + + ] = encode table [ ( int ) ( context lbit work area > > 10 ) & mask 5bits ] ; buffer [ context pos + + ] = encode table [ ( int ) ( context lbit work area > > 5 ) & mask 5bits ] ; buffer [ context pos + + ] = encode table [ ( int ) context lbit work area & mask 5bits ] ; context current line pos + = bytes per encoded block ; if ( line length > 0 & & line length < = context current line pos ) { system arraycopy ( line separator , 0 , buffer , context pos , line separator length ) ; context pos + = line separator length ; context current line pos = 0 ; } } } } }


build name id if there are no explicitly defined name i d formats , include the default format see : http : saml 2int orgprofilecurrent # section 9 2

protected name i d build name id ( final request abstract type authn request , final object assertion , final saml registered service service , final saml registered service service provider metadata facade adaptor , final message context message context ) throws saml exception { val supported name formats = get supported name id formats ( service , adaptor ) ; val required name format = get required name id format if any ( authn request ) ; validate required name id format if any ( authn request , adaptor , supported name formats , required name format ) ; val nameid = determine name id ( authn request , assertion , supported name formats , service , adaptor ) ; return finalize name id ( nameid , authn request , assertion , supported name formats , service , adaptor ) ; }


sets the < code > just number < code > property

public number only just number ( big decimal just number ) { this just number = just number ; return this ; }


don ' t use this if false , turns off incremental mount for all subviews of this recycler

public builder incremental mount ( boolean incremental mount ) { this incremental mount = incremental mount ; return this ; }


get the list of all fixtures attached to this body do not modify the list !

public array < fixture > get fixture list ( ) { return fixtures ; }


determines whether the given crl is expired by comparing the next update field with a given date

public static boolean is expired ( final x509crl crl , final zoned date time reference ) { return reference is after ( date time utils zoned date time of ( crl get next update ( ) ) ) ; }


use { @ link # get annotations map ( ) } instead

public java util map < java lang string , java lang string > get annotations ( ) { return get annotations map ( ) ; }


sends the request headers to the remote end point

void write headers ( metadata metadata , @ nullable byte [ ] payload ) ;


required the ports associated with the external service if the endpoints are unix domain socket addresses , there must be exactly one port < code > repeated istio networking v 1alpha 3 port ports = 3 ; < code >

public builder set ports ( int index , com alibaba nacos istio model port value ) { if ( ports builder = = null ) { if ( value = = null ) { throw new null pointer exception ( ) ; } ensure ports is mutable ( ) ; ports set ( index , value ) ; on changed ( ) ; } else { ports builder set message ( index , value ) ; } return this ; }


deregister all { @ link file watcher } in this directory

public static synchronized boolean deregister all watcher ( final string path ) { watch dir job job = manager get ( path ) ; if ( job ! = null ) { job shutdown ( ) ; manager remove ( path ) ; now watch job cnt - - ; return true ; } return false ; }


turns a path ( relative or otherwise ) into an s3 key

public string path to key ( path path ) { return context accessors path to key ( path ) ; }


public void update recognizer test 3 ( ) { string sql = " update t 1 set name 1 = ' name 1 ' , name 2 = ' name 2 ' where id in ( ? , ? ) " ; s q l statement statement = get s q l statement ( sql ) ; my s q l update recognizer my s q l update recognizer = new my s q l update recognizer ( sql , statement ) ; assertions assert equals ( sql , my s q l update recognizer get original s q l ( ) ) ; assertions assert equals ( " t 1 " , my s q l update recognizer get table name ( ) ) ; assertions assert equals ( 2 , my s q l update recognizer get update columns ( ) size ( ) ) ; assertions assert equals ( " name 1 " , my s q l update recognizer get update columns ( ) get ( 0 ) ) ; assertions assert equals ( " name 1 " , my s q l update recognizer get update values ( ) get ( 0 ) ) ; assertions assert equals ( " name 2 " , my s q l update recognizer get update columns ( ) get ( 1 ) ) ; assertions assert equals ( " name 2 " , my s q l update recognizer get update values ( ) get ( 1 ) ) ; array list < list < object > > param appender list = new array list < > ( ) ; string where condition = my s q l update recognizer get where condition ( new parameters holder ( ) { @ override public map < integer , array list < object > > get parameters ( ) { array list < object > id 1 param = new array list < > ( ) ; id 1 param add ( " id 1 " ) ; array list < object > id 2 param = new array list < > ( ) ; id 2 param add ( " id 2 " ) ; map result = new hash map ( ) ; result put ( 1 , id 1 param ) ; result put ( 2 , id 2 param ) ; return result ; } } , param appender list ) ; assertions assert equals ( collections singleton list ( arrays as list ( " id 1 " , " id 2 " ) ) , param appender list ) ; assertions assert equals ( " id in ( ? , ? ) " , where condition ) ; }


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


returns < code > true < code > iff the given index exists otherwise < code > false < code >

public static boolean index exists ( string index , client client ) { get index response get index response = client admin ( ) indices ( ) prepare get index ( ) set indices ( index ) set indices options ( indices options lenient expand open closed ) execute ( ) action get ( ) ; return get index response get indices ( ) length > 0 ; }


checks if the state of the repository in the file system is consistent with the rule in the workspace file deletes the marker file if not so that no matter what happens after , the state of the file system stays consistent returns null if the file system is not up to date and a hash of the marker file if the file system is up to date we check the repository root for existence here , but we can ' t depend on the file value , because it ' s possible that we eventually create that directory in which case the file value and the state of the file system would be inconsistent

byte [ ] are repository and marker file consistent ( repository function handler , environment env ) throws repository function exception , interrupted exception { if ( ! marker path exists ( ) ) { return null ; } map < string , string > marker data = new tree map < > ( ) ; string content ; try { content = file system utils read content ( marker path , standard charsets utf 8 ) ; string marker rule key = read marker file ( content , marker data ) ; boolean verified = false ; if ( preconditions check not null ( rule key ) equals ( marker rule key ) & & objects equals ( marker data get ( managed directories marker ) , this marker data get ( managed directories marker ) ) ) { verified = handler verify marker data ( rule , marker data , env ) ; if ( env values missing ( ) ) { return null ; } } if ( verified ) { return new fingerprint ( ) add string ( content ) digest and reset ( ) ; } else { / / so that we are in a consistent state if something happens while fetching the repository marker path delete ( ) ; return null ; } } catch ( i o exception e ) { throw new repository function exception ( e , transience transient ) ; } }


transcodes webp image given by input stream into jpeg

public void transcode webp to jpeg ( input stream input stream , output stream output stream , int quality ) throws i o exception { static webp native loader ensure ( ) ; native transcode webp to jpeg ( preconditions check not null ( input stream ) , preconditions check not null ( output stream ) , quality ) ; }


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


returns the total number of items in the data set hold by the adapter

public int get item count ( ) { int header or footer = 0 ; if ( custom header view ! = null ) header or footer + + ; if ( custom load more view ! = null ) header or footer + + ; return get adapter item count ( ) + header or footer ; }


flushes the stream if the stream has saved any characters from the various write ( ) methods in a buffer , write them immediately to their intended destination then , if that destination is another character or byte stream , flush it thus one flush ( ) invocation will flush all the buffers in a chain of writers and output streams

public void flush ( ) throws i o exception { flush buffer ( ) ; output stream flush ( ) ; }


public string [ ] get pre comment ( ) { return pre comment ; }


method to invoke after upload has completed this can handle race conditions in setupteardown

public long upload completed ( ) { long delta = upload get progress ( ) get bytes transferred ( ) - last bytes transferred ; if ( delta > 0 ) { log debug ( " s3a write delta changed after finished : { } bytes " , delta ) ; fs increment put progress statistics ( key , delta ) ; } return delta ; }


reads the short at the current index and then increments the current index by < code > sizeof short < code >

public short read next short ( ) throws i o exception { short s = read short ( current index ) ; current index + = sizeof short ; return s ; }


returns an unmodifiable list containing the specified first and second element , and backed by the specified array of additional elements changes to the { @ code rest } array will be reflected in the returned list unlike { @ link arrays # as list } , the returned list is unmodifiable this is useful when a varargs method needs to use a signature such as { @ code ( foo first foo , foo second foo , foo more foos ) } , in order to avoid overload ambiguity or to enforce a minimum argument count the returned list is serializable and implements { @ link random access }

public static < e > list < e > as list ( @ nullable decl e first , @ nullable decl e second , e [ ] rest ) { return new two plus array list < > ( first , second , rest ) ; }


casts an object of type object to type t it is essential to emphasize , that it is an unsafe operation

private static < t > t unsafe cast ( object o ) throws class cast exception { return ( t ) o ; }


register special provider for different route

public static synchronized void register provider ( zuul block fallback provider provider ) { assert util not null ( provider , " fallback provider cannot be null " ) ; string route = provider get route ( ) ; if ( " * " equals ( route ) | | route = = null ) { default fallback provider = provider ; } else { fallback provider cache put ( route , provider ) ; } }


private int index last col ( final int [ ] width cache array ) { for ( int col index = width cache array length - 1 ; col index > = 0 ; col index - - ) { final int width = width cache array [ col index ] ; if ( width < = 0 ) { continue ; } return col index ; } return 0 ; }


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


public string name ( ) { class c = get class ( ) ; if ( c is anonymous class ( ) ) c = c get superclass ( ) ; return core bundle get ( " filter " + c get simple name ( ) to lower case ( ) replace ( " filter " , " " ) , c get simple name ( ) replace ( " filter " , " " ) ) ; }


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

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


locate or create an instance of the specified cache strategy { @ code type }

protected abstract < t > t get bean ( class < t > type ) ;


a list of routes handled by this rest handler that have had their { @ code path } andor { @ code method } changed the pre - existing { @ code route } will be registered as deprecated alongside the updated { @ code route }

default list < replaced route > replaced routes ( ) { return collections empty list ( ) ; }


explicitly detaches current root { @ link litho view }

public litho view rule detach from window ( ) { get litho view ( ) on detached from window for test ( ) ; return this ; }


called before { @ link org openqa selenium web driver navigation # forward navigate ( ) forward ( ) }

void before navigate forward ( web driver driver ) ;