dispatches { @ link # on upstream discarded ( int , media period id , media load data ) }

public void upstream discarded ( media load data media load data ) { media period id media period id = assertions check not null ( this media period id ) ; for ( listener and handler listener and handler : listener and handlers ) { media source event listener listener = listener and handler listener ; post or run ( listener and handler handler , ( ) - > listener on upstream discarded ( window index , media period id , media load data ) ) ; } }


private static void link ( member member 1 , member member 2 ) { / / get the last methods in the both chains member last member 1 = last member ( member 1 ) ; member last member 2 = last member ( member 2 ) ; / / check if both link chains aren ' t already ending in the same element if ( ! last member 1 equals ( last member 2 ) ) { / / merge the two chains , with the library members last if ( last member 2 instanceof library member ) { last member 1 set visitor info ( last member 2 ) ; } else { last member 2 set visitor info ( last member 1 ) ; } } }


returns the bootstrap method used to compute the value of this constant

public handle get bootstrap method ( ) { return bootstrap method ; }


tests that - pie is removed when - shared is also present ( http : b 5 6 1 1 8 9 1 # )

public void test pie option disabled for shared libraries ( ) throws exception { rule context rule context = create dummy rule context ( ) ; cpp link action link action = create link builder ( rule context , link target type dynamic library , " dummy rule context / out so " , immutable list of ( ) , immutable list of ( ) , get mock feature configuration ( / * env vars = * / immutable map of ( ) ) ) set linking mode ( link linking mode static ) add linkopts ( immutable list of ( " - pie " , " - other " , " - pie " ) ) set library identifier ( " foo " ) build ( ) ; list < string > argv = link action get link command line ( ) get raw link argv ( ) ; assert that ( argv ) does not contain ( " - pie " ) ; assert that ( argv ) contains ( " - other " ) ; }


get the text to insert when the item is activated

public string get text ( ) { return text ; }


oldest entries are evicted to support newer ones

@ test public void writer eviction ( ) throws i o exception { list < header > header block = header entries ( " custom - foo " , " custom - header " , " custom - bar " , " custom - header " , " custom - baz " , " custom - header " ) ; bytes in write byte ( 0x 4 0 ) ; / / literal indexed bytes in write byte ( 0x 0a ) ; / / literal name ( len = 10 ) bytes in write utf 8 ( " custom - foo " ) ; bytes in write byte ( 0x 0d ) ; / / literal value ( len = 13 ) bytes in write utf 8 ( " custom - header " ) ; bytes in write byte ( 0x 4 0 ) ; / / literal indexed bytes in write byte ( 0x 0a ) ; / / literal name ( len = 10 ) bytes in write utf 8 ( " custom - bar " ) ; bytes in write byte ( 0x 0d ) ; / / literal value ( len = 13 ) bytes in write utf 8 ( " custom - header " ) ; bytes in write byte ( 0x 4 0 ) ; / / literal indexed bytes in write byte ( 0x 0a ) ; / / literal name ( len = 10 ) bytes in write utf 8 ( " custom - baz " ) ; bytes in write byte ( 0x 0d ) ; / / literal value ( len = 13 ) bytes in write utf 8 ( " custom - header " ) ; / / set to only support 110 bytes ( enough for 2 headers ) / / use a new writer because we don ' t support change the dynamic table / / size after writer constructed hpack writer writer = new hpack writer ( 110 , false , bytes out ) ; writer write headers ( header block ) ; assert that ( bytes out ) is equal to ( bytes in ) ; assert that ( writer header count ) is equal to ( 2 ) ; int table length = writer dynamic table length ; header entry = writer dynamic table [ table length - 1 ] ; check entry ( entry , " custom - bar " , " custom - header " , 55 ) ; entry = writer dynamic table [ table length - 2 ] ; check entry ( entry , " custom - baz " , " custom - header " , 55 ) ; }


trying to rename a file onto itself should succeed ( it ' s a no - op )

public void test rename file to self ( ) throws throwable { if ( ! rename supported ( ) ) return ; path filepath = path ( " test / file " ) ; create file ( filepath ) ; / / hdfs expects rename src , src - > true rename ( filepath , filepath , true , true , true ) ; / / verify the file is still there assert is file ( filepath ) ; }


returns the count of { @ code node } ' s outgoing edges ( equal to { @ code successors ( node ) size ( ) } ) in a directed graph in an undirected graph , returns the { @ link # degree ( object ) } if the count is greater than { @ code integer max value } , returns { @ code integer max value }


asserts that the given node ' s pretty print with one indent matches the given string

private static void assert indented pretty matches ( node node , string expected ) { assert pretty matches ( node , 1 , expected ) ; }


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 int run ( string [ ] args ) throws exception { / / parse arguments if ( args length ! = parameters count + 2 ) return util print usage ( args , get class ( ) get name ( ) + " < name > < sigma > " + parameters list + " \ n < name > the name " + " \ n < sigma > the summation " + parameters description ) ; int i = 0 ; final string name = args [ i + + ] ; final summation sigma = summation value of ( args [ i + + ] ) ; set parameters ( dist sum parameters parse ( args , i ) ) ; util out println ( ) ; util out println ( " name = " + name ) ; util out println ( " sigma = " + sigma ) ; util out println ( parameters ) ; util out println ( ) ; / / run jobs final summation result = execute ( name , sigma ) ; if ( result equals ( sigma ) ) { sigma set value ( result get value ( ) ) ; timer tick ( " \ n \ n d o n e \ n \ nsigma = " + sigma ) ; return 0 ; } else { timer tick ( " \ n \ n d o n e with error \ n \ nresult = " + result ) ; return 1 ; } }


same as { @ link application # on configuration changed ( configuration newconfig ) }

void on configuration changed ( configuration new config ) ;


see { @ link gif drawable # get allocation byte count ( ) }

public long get allocation byte count ( ) { return m gif info handle get allocation byte count ( ) ; }


public string get ( short key ) { int index = indexer get ( key ) ; if ( index < 0 ) { return null ; } return values [ index ] ; }


set the name of the exported rmi service , i e { @ code rmi : host : port n a m e }

public void set service name ( string service name ) { this service name = service name ; }


when value position is outside slice , indicates length of second half of the line

public float get value line part 2 length ( ) { return m value line part 2 length ; }


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


encode " - stl - " in contexts where the ' t ' is silent also encode " - uscle - " in contexts where the ' c ' is silent

boolean encode stl ( ) { / / ' hustle ' , ' bustle ' , ' whistle ' if ( ( string at ( m current , 4 , " stle " , " stli " , " " ) & & ! string at ( ( m current + 2 ) , 4 , " less " , " like " , " line " , " " ) ) | | string at ( ( m current - 3 ) , 7 , " thistly " , " bristly " , " gristly " , " " ) / / e g " corpuscle " | | string at ( ( m current - 1 ) , 5 , " uscle " , " " ) ) { / / kristen , krystle , crystle , kristle all pronounce the ' t ' / / also , exceptions where " - ling " is a nominalizing suffix if ( string at ( 0 , 7 , " kristen " , " krystle " , " crystle " , " kristle " , " " ) | | string at ( 0 , 11 , " christensen " , " christenson " , " " ) | | string at ( ( m current - 3 ) , 9 , " firstling " , " " ) | | string at ( ( m current - 2 ) , 8 , " nestling " , " westling " , " " ) ) { metaph add ( " st " ) ; m current + = 2 ; } else { if ( m encode vowels & & ( char at ( m current + 3 ) = = ' e ' ) & & ( char at ( m current + 4 ) ! = ' r ' ) & & ! string at ( ( m current + 3 ) , 4 , " ette " , " etta " , " " ) & & ! string at ( ( m current + 3 ) , 2 , " ey " , " " ) ) { metaph add ( " sal " ) ; flag al inversion = true ; } else { metaph add ( " sl " ) ; } m current + = 3 ; } return true ; } return false ; }


returns an immutable sorted map containing the given entries , sorted by the natural ordering of their keys

public static < k extends comparable < ? super k > , v > immutable sorted map < k , v > of ( k k 1 , v v 1 , k k 2 , v v 2 , k k 3 , v v 3 , k k 4 , v v 4 ) { return of entries ( entry of ( k 1 , v 1 ) , entry of ( k 2 , v 2 ) , entry of ( k 3 , v 3 ) , entry of ( k 4 , v 4 ) ) ; }


public double miss penalty ( ) { return 0 ; }


removes the tiles container from this web application

public void destroy ( ) throws tiles exception { if ( this tiles initializer ! = null ) { this tiles initializer destroy ( ) ; } }


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

abstract int protected array offset ( ) ;


{ @ inherit doc } the default { @ link abstract future } implementation throws { @ code interrupted exception } if the current thread is interrupted before or during the call , even if the value is already available

public v get ( long timeout , time unit unit ) throws interrupted exception , timeout exception , execution exception { return sync get ( unit to nanos ( timeout ) ) ; } / * * improve the documentation of when interrupted exception is thrown our * behavior matches the jdk ' s , but the jdk ' s documentation is misleading * /


set a fixed locale that this resolver will return if no cookie found

public void set default locale ( @ nullable locale default locale ) { this default locale = default locale ; }


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


public static string pjoin ( object args ) { return path joiner join ( args ) ; }


pulls the remote ip from the current http servlet request , or grabs the value for the specified alternative attribute ( say , for proxied requests ) falls back to providing the " normal " remote address if no value can be retrieved from the specified alternative header value

private string get remote ip ( final request context context ) { val request = web utils get http servlet request from external webflow context ( context ) ; var user address = request get remote addr ( ) ; logger debug ( " remote address = [ { } ] " , user address ) ; if ( string utils is not blank ( this alternative remote host attribute ) ) { user address = request get header ( this alternative remote host attribute ) ; logger debug ( " header attribute [ { } ] = [ { } ] " , this alternative remote host attribute , user address ) ; if ( string utils is blank ( user address ) ) { user address = request get remote addr ( ) ; logger warn ( " no value could be retrieved from the header [ { } ] falling back to [ { } ] " , this alternative remote host attribute , user address ) ; } } return user address ; }


reads four code units , treating them as a little - endian { @ code long }

public long read long ( ) throws e o f exception ;


protected void set channel handlers ( final channel handler handlers ) { if ( handlers ! = null ) { channel handlers = handlers ; } }


public install state get install state ( string name ) { if ( name = = null ) { return null ; } return install state value of ( name ) ; }


returns the first region found with the specified name as a sprite if whitespace was stripped from the region when it was packed , the sprite is automatically positioned as if whitespace had not been stripped this method uses string comparison to find the region and constructs a new sprite , so the result should be cached rather than calling this method multiple times

public @ null sprite create sprite ( string name ) { for ( int i = 0 , n = regions size ; i < n ; i + + ) if ( regions get ( i ) name equals ( name ) ) return new sprite ( regions get ( i ) ) ; return null ; }


returns the vertex for the given id , creating it if it does not yet exist

private abstract test vertex vertex ( int id ) { / / / / first , find the exact instance of the vertex in the graph , as it may have state / / applied to it that we need to verify for testing / / abstract test vertex v = run swing ( ( ) - > { label test vertex label vertex = new label test vertex ( integer to string ( id ) ) ; collection < abstract test vertex > vertices = graph get vertices ( ) ; for ( abstract test vertex vertex : vertices ) { if ( label vertex equals ( vertex ) ) { return vertex ; } } return label vertex ; } ) ; graph add vertex ( v ) ; return v ; }


creates a new reference value that represents < code > null < code >

public reference value create reference value null ( ) { return reference value null ; }


{ @ inherit doc } to provide a { @ code request callback } or { @ code response extractor } only , but not both , consider using : { @ link # accept header request callback ( class ) } { @ link # http entity callback ( object ) } { @ link # http entity callback ( object , type ) } { @ link # response entity extractor ( type ) }

public < t > t execute ( string url , http method method , @ nullable request callback request callback , @ nullable response extractor < t > response extractor , map < string , ? > uri variables ) throws rest client exception { uri expanded = get uri template handler ( ) expand ( url , uri variables ) ; return do execute ( expanded , method , request callback , response extractor ) ; }


returns true if checkpointing is enabled for the running job

public boolean is checkpointing enabled ( ) { return stream config is checkpointing enabled ( ) ; }


creates the cie version field at the specified location

private address process version ( address addr ) throws memory access exception { / * * create a new cie version field at the specified address and sets an * appropriate comment for the new structure * / string comment = " ( cie ) version " ; create and comment data ( program , addr , new byte data type ( ) , comment , code unit eol comment ) ; version = gcc analysis utils read byte ( program , addr ) ; cur size + = byte len ; return addr add ( byte len ) ; }


gets the result of this step this method will throw { @ link illegal state exception } if this step is not completed yet

public response result ( ) { if ( delegate is done ( ) = = false ) { throw new illegal state exception ( " step is not completed yet " ) ; } return future utils get ( delegate , 0l , time unit nanoseconds ) ; / / this future is done already - use a non - blocking method }


clears the value , if it has been previously created by calling { @ code # get or compute ( ) } the < code > on reset < code > will be called on this value the next call to { @ code # get or compute ( ) } will recreate the value

public synchronized void reset ( ) { if ( value ! = null ) { on reset accept ( value ) ; value = null ; } }


the value assigned to this plural < code > optional aapt pb item item = 4 ; < code >

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


set the sizes of the instructions in the sequence

public void set sizes ( integer [ ] sizes ) { this sizes = sizes ; }


build a { @ link remote info } , defaulting values that we don ' t care about in this test to values that don ' t hurt anything

private remote info new remote info ( string username , string password , map < string , string > headers ) { return new remote info ( " http " , address get address ( ) , address get port ( ) , null , new bytes array ( " { \ " match all \ " : { } } " ) , username , password , headers , remote info default socket timeout , remote info default connect timeout ) ; }


compare the provided values and return the appropriate { @ link verification result }

private static verification result verify checksums ( string expected digest , string actual digest , boolean case sensitive ) { if ( expected digest = = null ) { return verification result not provided ; } if ( actual digest = = null ) { return verification result not computed ; } if ( case sensitive ) { if ( message digest is equal ( expected digest get bytes ( ) , actual digest get bytes ( ) ) ) { return verification result pass ; } } else { if ( message digest is equal ( expected digest to lower case ( ) get bytes ( ) , actual digest to lower case ( ) get bytes ( ) ) ) { return verification result pass ; } } return verification result fail ; }


test iterating through a bunch of blocks in a volume using a volume iterator < p > we will rewind the iterator when about halfway through the blocks

private void test volume iterator impl ( int num files , long max staleness ) throws exception { configuration conf = new configuration ( ) ; disable block scanner ( conf ) ; test context ctx = new test context ( conf , 1 ) ; ctx create files ( 0 , num files , 1 ) ; assert equals ( 1 , ctx volumes size ( ) ) ; fs volume spi volume = ctx volumes get ( 0 ) ; extended block saved block = null , loaded block = null ; boolean tested rewind = false , tested save = false , tested load = false ; int blocks processed = 0 , saved blocks processed = 0 ; try { list < b p offer service > bpos = ctx datanode get all bp os ( ) ; assert equals ( 1 , bpos size ( ) ) ; block iterator iter = volume new block iterator ( ctx bpids [ 0 ] , " test " ) ; assert equals ( ctx bpids [ 0 ] , iter get block pool id ( ) ) ; iter set max staleness ms ( max staleness ) ; while ( true ) { hash set < extended block > blocks = new hash set < extended block > ( ) ; for ( int block idx = 0 ; block idx < num files ; block idx + + ) { blocks add ( ctx get file block ( 0 , block idx ) ) ; } while ( true ) { extended block block = iter next block ( ) ; if ( block = = null ) { break ; } blocks processed + + ; log info ( " block iterator for { } found block { } , blocks processed = { } " , volume , block , blocks processed ) ; if ( tested save & & ( saved block = = null ) ) { saved block = block ; } if ( tested load & & ( loaded block = = null ) ) { loaded block = block ; / / the block that we get back right after loading the iterator / / should be the same block we got back right after saving / / the iterator assert equals ( saved block , loaded block ) ; } boolean block removed = blocks remove ( block ) ; assert true ( " found unknown block " + block , block removed ) ; if ( blocks processed > ( num files / 3 ) ) { if ( ! tested save ) { log info ( " processed { } blocks out of { } saving iterator " , blocks processed , num files ) ; iter save ( ) ; tested save = true ; saved blocks processed = blocks processed ; } } if ( blocks processed > ( num files / 2 ) ) { if ( ! tested rewind ) { log info ( " processed { } blocks out of { } rewinding iterator " , blocks processed , num files ) ; iter rewind ( ) ; break ; } } if ( blocks processed > ( ( 2 * num files ) / 3 ) ) { if ( ! tested load ) { log info ( " processed { } blocks out of { } loading iterator " , blocks processed , num files ) ; iter = volume load block iterator ( ctx bpids [ 0 ] , " test " ) ; iter set max staleness ms ( max staleness ) ; break ; } } } if ( ! tested rewind ) { tested rewind = true ; blocks processed = 0 ; log info ( " starting again at the beginning " ) ; continue ; } if ( ! tested load ) { tested load = true ; blocks processed = saved blocks processed ; log info ( " starting again at the load point " ) ; continue ; } assert equals ( num files , blocks processed ) ; break ; } } finally { ctx close ( ) ; } }


configures how to partition records from flink ' s partitions into kafka ' s partitions this strategy ensures that records will be distributed to kafka partitions in a round - robin fashion note : this strategy is useful to avoid an unbalanced partitioning however , it will cause a lot of network connections between all the flink instances and all the kafka brokers

public kafka sink partitioner round robin ( ) { sink partitioner type = connector sink partitioner value round robin ; sink partitioner class = null ; return this ; }


register a { @ link leaf reader } this is necessary so that the core cache key of this reader can be found later using { @ link # get core keys for index ( string ) }

public void add ( leaf reader reader ) { final shard id shard id = shard utils extract shard id ( reader ) ; if ( shard id = = null ) { throw new illegal argument exception ( " could not extract shard id from " + reader ) ; } final index reader cache helper cache helper = reader get core cache helper ( ) ; if ( cache helper = = null ) { throw new illegal argument exception ( " reader " + reader + " does not support caching " ) ; } final index reader cache key core key = cache helper get key ( ) ; if ( core key to shard contains key ( core key ) ) { / / do this check before entering the synchronized block in order to / / avoid taking the mutex if possible ( which should happen most of / / the time ) return ; } final string index = shard id get index name ( ) ; synchronized ( this ) { if ( core key to shard contains key ( core key ) = = false ) { set < index reader cache key > objects = index to core key get ( index ) ; if ( objects = = null ) { objects = new hash set < > ( ) ; index to core key put ( index , objects ) ; } final boolean added = objects add ( core key ) ; assert added ; index reader closed listener listener = owner core cache key - > { assert core key = = owner core cache key ; synchronized ( shard core key map this ) { core key to shard remove ( owner core cache key ) ; final set < index reader cache key > core keys = index to core key get ( index ) ; final boolean removed = core keys remove ( core key ) ; assert removed ; if ( core keys is empty ( ) ) { index to core key remove ( index ) ; } } } ; boolean added listener = false ; try { cache helper add closed listener ( listener ) ; added listener = true ; / / only add the core key to the map as a last operation so that / / if another thread sees that the core key is already in the / / map ( like the check just before this synchronized block ) , / / then it means that the closed listener has already been / / registered shard id previous = core key to shard put ( core key , shard id ) ; assert previous = = null ; } finally { if ( false = = added listener ) { try { listener on close ( core key ) ; } catch ( i o exception e ) { throw new runtime exception ( " blow up trying to recover from failure to add listener " , e ) ; } } } } } }


public static parameter < map < string , string > > meta param ( ) { return new parameter < > ( " meta " , true , collections : : empty map , ( n , c , o ) - > type parsers parse meta ( n , o ) , m - > m field type ( ) meta ( ) ) ; }


sets whether the fast forward button is shown

public void set show fast forward button ( boolean show fast forward button ) { assertions check state not null ( controller ) ; controller set show fast forward button ( show fast forward button ) ; }


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


get the actual instance , which can be the following : equilateral triangle , isosceles triangle , scalene triangle

public object get actual instance ( ) { return super get actual instance ( ) ; }


create an http get builder with the given string base uri template

public static headers builder < ? > get ( string uri template , object uri variables ) { return method ( http method get , uri template , uri variables ) ; }


void delete reference ( program program , reference ref ) { remove reference cmd cmd = new remove reference cmd ( ref ) ; tool execute ( cmd , program ) ; }


returns true if the map has one or more items

public boolean not empty ( ) { return size > 0 ; }


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

public generate default layout method parent layout $ with layout on visibility changed ( on model visibility changed listener < generate default layout method parent layout $ with layout , object > listener ) { on mutation ( ) ; this on model visibility changed listener epoxy generated model = listener ; return this ; }


null - safe equivalent of { @ code a equals ( b ) }

public static boolean equals ( object a , object b ) { return ( a = = null ) ? ( b = = null ) : a equals ( b ) ; }


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


{ @ link # pack ( ) packs } the dialog ( but doesn ' t set the position ) , adds it to the stage , sets it as the keyboard and scroll focus , clears any actions on the dialog , and adds the specified action to it the previous keyboard and scroll focus are remembered so they can be restored when the dialog is hidden

public dialog show ( stage stage , @ null action action ) { clear actions ( ) ; remove capture listener ( ignore touch down ) ; previous keyboard focus = null ; actor actor = stage get keyboard focus ( ) ; if ( actor ! = null & & ! actor is descendant of ( this ) ) previous keyboard focus = actor ; previous scroll focus = null ; actor = stage get scroll focus ( ) ; if ( actor ! = null & & ! actor is descendant of ( this ) ) previous scroll focus = actor ; stage add actor ( this ) ; pack ( ) ; stage cancel touch focus ( ) ; stage set keyboard focus ( this ) ; stage set scroll focus ( this ) ; if ( action ! = null ) add action ( action ) ; return this ; }


unsets the referenced value subsequent calls to { @ link # get } will return { @ code null }


sets the starting vertical position of this field

public void set start y ( int start y ) { this start y = start y ; }


returns the minimum zoom ratio for most cameras this should return a zoom ratio of 1 a zoom ratio of 1 corresponds to a non - zoomed image

public float get min zoom ratio ( ) { return m camera module get min zoom ratio ( ) ; }


finds pets by tags multiple tags can be provided with comma separated strings use tag 1 , tag 2 , tag 3 for testing

public set < pet > find pets by tags ( set < string > tags ) throws api exception { api response < set < pet > > local var response = find pets by tags with http info ( tags ) ; return local var response get data ( ) ; }


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


not supported < b > you are attempting to create a multiset that may contain a non - { @ code comparable } element < b > proper calls will resolve to the version in { @ code immutable sorted multiset } , not this dummy version

public static < e > immutable sorted multiset < e > of ( e e 1 , e e 2 , e e 3 , e e 4 , e e 5 ) { throw new unsupported operation exception ( ) ; }


customize the response for servlet request binding exception this method delegates to { @ link # handle exception internal }

protected response entity < object > handle servlet request binding exception ( servlet request binding exception ex , http headers headers , http status status , web request request ) { return handle exception internal ( ex , null , headers , status , request ) ; }


returns a handler for authentication failures , or null to use the default handler only one installed extension may have an authentication failure handler if more than one extension returns a non - null handler , an error is raised

default authentication failure handler get authentication failure handler ( security components components ) { return null ; }


return the jms exception listener implementation that should be registered with the single connection created by this factory , if any

protected exception listener get exception listener ( ) { return this exception listener ; }


called once just before the thread is shutdown sequence event processing will already have stopped before this method is called no events will be processed after this message


generates an integer containing the user - specified number of random bits ( right justified , with leading zeros )

final protected int next ( int num bits ) { preconditions check argument ( num bits > = 0 & & num bits < = 32 ) ; int num bytes = ( num bits + 7 ) / 8 ; byte b [ ] = new byte [ num bytes ] ; int next = 0 ; next bytes ( b ) ; for ( int i = 0 ; i < num bytes ; i + + ) { next = ( next < < 8 ) + ( b [ i ] & 0x f f ) ; } return next > > > ( num bytes * 8 - num bits ) ; }


disable initiating a gv1 - > gv2 auto - migration you can still recognize a group has been auto - migrated

public synchronized boolean disable gv 1 auto migrate initiation ( ) { return feature flags internal user ( ) & & get boolean ( gv2 disable automigrate initiation , false ) ; }


deprecated : change usages of this to { @ link # on fallback emit } if you want to write a hook that handles each emitted fallback value or to { @ link # on fallback success } if you want to write a hook that handles success of the fallback method invoked after successful execution of { @ link hystrix command # get fallback ( ) } with response value

public < t > t on fallback success ( hystrix invokable < t > command instance , t fallback response ) { / / pass - thru by default return fallback response ; }


gets a referenced repeatable comment as a ref repeat comment object

public ref repeat comment get referenced repeatable comments ( int index ) { return ( ref repeat comment ) display comment arrays [ ref repeatables ] [ index ] ; }


test that verifies headers can be up to 64k long the test adds a 63k header leaving 1k for other headers this is because the header buffer setting is for all headers , names and values included

public void test long header ( ) throws exception { url url = new url ( base url , servlet path longheader ) ; https u r l connection conn = ( https u r l connection ) url open connection ( ) ; conn set s s l socket factory ( client ssl factory create s s l socket factory ( ) ) ; test long header ( conn ) ; }


public void perform edit ( ) throws interrupted exception { if ( remaining edits ( ) = = 0 ) { return ; } if ( batch cursor = = current batch size ( ) ) { prepare new batch ( ) ; } item update update = current batch get ( batch cursor ) ; / / rewrite mentions to new items recon entity rewriter rewriter = new recon entity rewriter ( library , update get item id ( ) ) ; try { update = rewriter rewrite ( update ) ; } catch ( new item not created yet exception e ) { logger warn ( " failed to rewrite update on entity " + update get item id ( ) + " missing entity : " + e get missing entity ( ) + " skipping update " ) ; batch cursor + + ; return ; } try { / / new item if ( update is new ( ) ) { recon entity id value new cell = ( recon entity id value ) update get item id ( ) ; update = update normalize labels and aliases ( ) ; item document item document = datamodel make item document ( update get item id ( ) , update get labels ( ) stream ( ) collect ( collectors to list ( ) ) , update get descriptions ( ) stream ( ) collect ( collectors to list ( ) ) , update get aliases ( ) stream ( ) collect ( collectors to list ( ) ) , update get added statement groups ( ) , collections empty map ( ) ) ; item document created doc = editor create item document ( item document , summary , tags ) ; library set qid ( new cell get recon internal id ( ) , created doc get entity id ( ) get id ( ) ) ; } else { / / existing item item document current document = ( item document ) current docs get ( update get item id ( ) get id ( ) ) ; list < monolingual text value > labels = update get labels ( ) stream ( ) collect ( collectors to list ( ) ) ; labels add all ( update get labels if new ( ) stream ( ) filter ( label - > ! current document get labels ( ) contains key ( label get language code ( ) ) ) collect ( collectors to list ( ) ) ) ; list < monolingual text value > descriptions = update get descriptions ( ) stream ( ) collect ( collectors to list ( ) ) ; descriptions add all ( update get descriptions if new ( ) stream ( ) filter ( desc - > ! current document get descriptions ( ) contains key ( desc get language code ( ) ) ) collect ( collectors to list ( ) ) ) ; editor update terms statements ( current document , labels , descriptions , update get aliases ( ) stream ( ) collect ( collectors to list ( ) ) , new array list < monolingual text value > ( ) , update get added statements ( ) stream ( ) collect ( collectors to list ( ) ) , update get deleted statements ( ) stream ( ) collect ( collectors to list ( ) ) , summary , tags ) ; } } catch ( media wiki api error exception e ) { / / todo find a way to report these errors to the user in a nice way logger warn ( " media wiki error while editing [ " + e get error code ( ) + " ] : " + e get error message ( ) ) ; } catch ( i o exception e ) { logger warn ( " io error while editing : " + e get message ( ) ) ; } batch cursor + + ; }


returns a consumer that validate the initial join cluster state the validator , unless < code > null < code > is called exactly once per join attempt but might be called multiple times during the lifetime of a node validators are expected to throw a { @ link illegal state exception } if the node and the cluster - state are incompatible

default bi consumer < discovery node , cluster state > get join validator ( ) { 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 prop groups view model on visibility state changed ( on model visibility state changed listener < prop groups view model , prop groups view > listener ) { on mutation ( ) ; this on model visibility state changed listener epoxy generated model = listener ; return this ; }


public string get rack name ( ) { return rack name = = null ? null : rack name to string ( ) ; }


public void counter ( metrics info info , long value ) ;


indicate whether or not a listener is set


set the { @ link # next flush } variable to the initial flush time the initial flush will be an integer number of flush intervals past the beginning of the current hour and will have a random offset added , up to { @ link # roll offset interval millis } the initial flush will be a time in past that can be used from which to calculate future flush times

protected void set initial flush time ( date now ) { / / start with the beginning of the current hour next flush = calendar get instance ( ) ; next flush set time ( now ) ; next flush set ( calendar millisecond , 0 ) ; next flush set ( calendar second , 0 ) ; next flush set ( calendar minute , 0 ) ; / / in the first round , calculate the first flush as the largest number of / / intervals from the beginning of the current hour that ' s not in the / / future by : / / 1 subtract the beginning of the hour from the current time / / 2 divide by the roll interval and round down to get the number of whole / / intervals that have passed since the beginning of the hour / / 3 multiply by the roll interval to get the number of millis between / / the beginning of the current hour and the beginning of the current / / interval int millis = ( int ) ( ( ( now get time ( ) - next flush get time in millis ( ) ) / roll interval millis ) * roll interval millis ) ; / / then add some noise to help prevent all the nodes from / / closing their files at the same time if ( roll offset interval millis > 0 ) { millis + = thread local random current ( ) next long ( roll offset interval millis ) ; / / if the added time puts us into the future , step back one roll interval / / because the code to increment next flush to the next flush expects that / / next flush is the next flush from the previous interval there wasn ' t / / a previous interval , so we just fake it with the time in the past that / / would have been the previous interval if there had been one / / / / it ' s ok if millis comes out negative while ( next flush get time in millis ( ) + millis > now get time ( ) ) { millis - = roll interval millis ; } } / / adjust the next flush time by millis to get the time of our ficticious / / previous next flush next flush add ( calendar millisecond , millis ) ; }


stop counting , call this method right after you performed the task you want to keep track of call { @ link # start ( ) } again when you perform more of that task

public void stop ( ) { if ( start time > 0l ) { current + = ( time utils nano time ( ) - start time ) * nano 2seconds ; start time = 0l ; valid = true ; } }


basically checks if the the " shift " modifier is on and the " control " modifier is not note that " control " is operating system dependent it is < cont on windows , and < command > on mac

private boolean is add to contiguous selection activator ( mouse event e ) { return ( e is shift down ( ) & & ! docking utils is control modifier ( e ) ) ; }


set of ports associated with the endpoint the ports must be associated with a port name that was declared as part of the service do not use for ` unix : ` addresses < code > map & lt ; string , uint 3 2 & gt ; ports = 2 ; < code >

public int get ports or default ( java lang string key , int default value ) { if ( key = = null ) { throw new java lang null pointer exception ( ) ; } java util map < java lang string , java lang integer > map = internal get ports ( ) get map ( ) ; return map contains key ( key ) ? map get ( key ) : default value ; }


protected void paint text ( final graphics g , final j component c , final rectangle text rect , final string text ) { if ( u i util is help button ( c ) ) { return ; } final abstract button button = ( abstract button ) c ; final button model model = button get model ( ) ; color fg = is default button ( c ) ? primary button fg ( ) : button fg ( ) ; if ( fg instanceof u i resource & & button is selected ( ) ) { fg = selected button fg ( ) ; } else if ( model is rollover ( ) ) { fg = selected button fg ( ) ; } g set color ( fg ) ; final font metrics metrics = swing utilities 2 get font metrics ( c , g ) ; final string text to print = m t config get instance ( ) is upper case buttons ( ) ? text to upper case ( locale english ) : text ; final int text width = metrics string width ( text to print ) ; final int x = ( c get width ( ) - get text shift offset ( ) - text width ) / 2 ; final int y = text rect y + metrics get ascent ( ) ; final int mnemonic index = darcula laf is alt pressed ( ) ? button get displayed mnemonic index ( ) : - 1 ; if ( model is enabled ( ) ) { swing utilities 2 draw string underline char at ( c , g , text to print , mnemonic index , x , y ) ; } else { paint disabled text ( g , text , c , text rect , metrics ) ; } }


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


public api response < model api response > upload file with required file with http info ( long pet id , file required file , string additional metadata ) throws api exception { http request builder local var request builder = upload file with required file request builder ( pet id , required file , additional metadata ) ; try { http response < input stream > local var response = member var http client send ( local var request builder build ( ) , http response body handlers of input stream ( ) ) ; if ( member var response interceptor ! = null ) { member var response interceptor accept ( local var response ) ; } if ( local var response status code ( ) / 100 ! = 2 ) { throw new api exception ( local var response status code ( ) , " upload file with required file call received non - success response " , local var response headers ( ) , local var response body ( ) = = null ? null : new string ( local var response body ( ) read all bytes ( ) ) ) ; } return new api response < model api response > ( local var response status code ( ) , local var response headers ( ) map ( ) , member var object mapper read value ( local var response body ( ) , new type reference < model api response > ( ) { } ) ) ; } catch ( i o exception e ) { throw new api exception ( e ) ; } catch ( interrupted exception e ) { thread current thread ( ) interrupt ( ) ; throw new api exception ( e ) ; } }


the highlighted fragments { @ code null } if failed to highlight ( for example , the field is not stored )

public text [ ] get fragments ( ) { return fragments ( ) ; }


protected string digest encoded password ( final string encoded password , final map < string , object > values ) { val hash service = new default hash service ( ) ; if ( string utils is not blank ( this static salt ) ) { hash service set private salt ( byte source util bytes ( this static salt ) ) ; } hash service set hash algorithm name ( this algorithm name ) ; if ( values contains key ( this number of iterations field name ) ) { val long as str = values get ( this number of iterations field name ) to string ( ) ; hash service set hash iterations ( integer parse int ( long as str ) ) ; } else { hash service set hash iterations ( this number of iterations ) ; } if ( ! values contains key ( this salt field name ) ) { throw new illegal argument exception ( " specified field name for salt does not exist in the results " ) ; } val dyna salt = values get ( this salt field name ) to string ( ) ; val request = new hash request builder ( ) set salt ( dyna salt ) set source ( encoded password ) build ( ) ; return hash service compute hash ( request ) to hex ( ) ; }


{ @ inherit doc } given attribute values may be an extension of { @ link collection } , { @ link map } or an array the filtering operation is non - recursive multi - valued attributes such as those of type { @ link collection } and { @ link map } are expected to allow casting to { @ code map < string , string > } or { @ code collection < string > } values that are of type array are expected to allow casting to { @ code string [ ] } multi - valued attributes are always put back into the final released collection of attributes as { @ code string [ ] } if the final filtered collection is empty , it will not be put into the collection of attributes

public map < string , list < object > > filter ( final map < string , list < object > > given attributes ) { val attributes to release = new hash map < string , list < object > > ( ) ; given attributes entry set ( ) stream ( ) filter ( entry - > { val attribute name = entry get key ( ) ; val attribute value = entry get value ( ) ; logger debug ( " received attribute [ { } ] with value [ { } ] " , attribute name , attribute value ) ; return attribute value ! = null ; } ) for each ( entry - > { val attribute name = entry get key ( ) ; val attribute value = entry get value ( ) ; logger trace ( " attribute value [ { } ] is a collection " , attribute value ) ; val filtered attributes = filter attributes ( attribute value , attribute name ) ; if ( ! filtered attributes is empty ( ) ) { attributes to release put ( attribute name , filtered attributes ) ; } } ) ; logger debug ( " received [ { } ] attributes filtered and released [ { } ] " , given attributes size ( ) , attributes to release size ( ) ) ; return attributes to release ; }


returns a set of statistics about the cache contents and usage

public cache stats stats ( ) { return cache stats ( ) ; }


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

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


returns the { @ link validator set } instances for this process validator useful if some validation rules need to be disabled

list < validator set > get validator sets ( ) ;


adds a route to the given handler function that handles http { @ code put } requests

builder put ( handler function < server response > handler function ) ;


add a provided shard instance to shard map

public boolean add new shard ( final shard shard ) { var shard id = shard get id ( ) ; if ( ! shard map contains key ( shard id ) ) { shard map put ( shard id , shard ) ; return true ; } else { return false ; } }


conditionally schedules the asynchronous maintenance task after a write operation if the task status was idle or required then the maintenance task is scheduled immediately if it is already processing then it is set to transition to required upon completion so that a new execution is triggered by the next operation

void schedule after write ( ) { for ( ; ; ) { switch ( drain status ( ) ) { case idle : cas drain status ( idle , required ) ; schedule drain buffers ( ) ; return ; case required : schedule drain buffers ( ) ; return ; case processing to idle : if ( cas drain status ( processing to idle , processing to required ) ) { return ; } continue ; case processing to required : return ; default : throw new illegal state exception ( ) ; } } }


get the thread factory used to create threads

public thread factory get thread factory ( ) { return thread factory ; }


returns the parameter associated with this location this value can be null if the parameters are deleted from the function associated with the address of the parameter

public parameter get parameter ( ) { return parameter ; }


gets the include lower flag for this query

public boolean include lower ( ) { return this include lower ; }


public void read from ( file key file ) throws i o exception , general security exception { final string password = is pem encrypted ( key file ) ? ask for passwd ( key file get canonical path ( ) ) : null ; private keys add ( load key ( key file , password ) ) ; }


closes the given program , ignoring all changes , for each tool known to this test env

public void close ( program p ) { release ( p ) ; boolean ignore changes = true ; lazy tool ( ) fire plugin event ( new close program plugin event ( " test " , p , ignore changes ) ) ; extra tools for each ( t - > t fire plugin event ( new close program plugin event ( " test " , p , ignore changes ) ) ) ; }


enter a parse tree produced by { @ link sql base parser # join criteria }

void enter join criteria ( sql base parser join criteria context ctx ) ;


public void init ( ) throws servlet exception { / / retrieve the m bean server m bean server = management factory get platform m bean server ( ) ; json factory = new json factory ( ) ; }


set the time the resource was last changed , as specified by the { @ code last - modified } header the date should be specified as the number of milliseconds since january 1 , 1970 gmt

builder < t > last modified ( zoned date time last modified ) ;


public default bandwidth meter build ( ) { return new default bandwidth meter ( context , initial bitrate estimates , sliding window max weight , clock , reset on network type change ) ; }


called when one of the subscribed edges in the parent view has been touched by the user while no child view is currently captured

public void on edge touched ( int edge flags , int pointer id ) { }


returns http response headers that should be added to a cors preflight response an intermediary like a load balancer might require that a cors preflight request have certain headers set this enables such headers to be added

public < t > cors config builder preflight response header ( final char sequence name , final iterable < t > value ) { preflight headers put ( name , new constant value generator ( value ) ) ; return this ; }


private static configuration create s s l config ( s s l factory mode mode , string keystore , string password , string key password , string trust k s , string trust store pwd , string exclude ciphers ) { configuration ssl conf = new configuration ( false ) ; if ( keystore ! = null ) { ssl conf set ( file based key stores factory resolve property name ( mode , file based key stores factory ssl keystore location tpl key ) , keystore ) ; } if ( password ! = null ) { ssl conf set ( file based key stores factory resolve property name ( mode , file based key stores factory ssl keystore password tpl key ) , password ) ; } if ( key password ! = null ) { ssl conf set ( file based key stores factory resolve property name ( mode , file based key stores factory ssl keystore keypassword tpl key ) , key password ) ; } if ( trust k s ! = null ) { ssl conf set ( file based key stores factory resolve property name ( mode , file based key stores factory ssl truststore location tpl key ) , trust k s ) ; } if ( trust store pwd ! = null ) { ssl conf set ( file based key stores factory resolve property name ( mode , file based key stores factory ssl truststore password tpl key ) , trust store pwd ) ; } if ( null ! = exclude ciphers & & ! exclude ciphers is empty ( ) ) { ssl conf set ( file based key stores factory resolve property name ( mode , file based key stores factory ssl exclude cipher list ) , exclude ciphers ) ; } ssl conf set ( file based key stores factory resolve property name ( mode , file based key stores factory ssl truststore reload interval tpl key ) , " 1000 " ) ; return ssl conf ; }


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


leaves this monitor may be called only by a thread currently occupying this monitor

public void leave ( ) { final reentrant lock lock = this lock ; try { / / no need to signal if we will still be holding the lock when we return if ( lock get hold count ( ) = = 1 ) { signal next waiter ( ) ; } } finally { lock unlock ( ) ; / / will throw illegal monitor state exception if not held } }


if the string contains a single variable , return the expansion of that variable otherwise , return null

public static string expand single variable ( string expression , template context context ) throws expansion exception { string var = new template expander ( expression ) get single variable ( ) ; return ( var ! = null ) ? context lookup variable ( var ) : null ; }


called by { @ link job # rename to ( string ) } to update relevant data structure assumed to be synchronized on jenkins by the caller

public void on renamed ( top level item job , string old name , string new name ) throws i o exception { items remove ( old name ) ; items put ( new name , job ) ; / / for compatibility with old views : for ( view v : views ) v on job renamed ( job , old name , new name ) ; }


adjacency is defined by two markers being infinitesimally close to each other this means they must share the same value and have adjacent bounds

public boolean is adjacent ( marker other ) { check type compatibility ( other ) ; if ( is upper unbounded ( ) | | is lower unbounded ( ) | | other is upper unbounded ( ) | | other is lower unbounded ( ) ) { return false ; } if ( type compare to ( value block get ( ) , 0 , other value block get ( ) , 0 ) ! = 0 ) { return false ; } return ( bound = = bound exactly & & other bound ! = bound exactly ) | | ( bound ! = bound exactly & & other bound = = bound exactly ) ; }


helper method to set bearer token for the first bearer authentication

public api client set bearer token ( string bearer token ) { for ( authentication auth : authentications values ( ) ) { if ( auth instanceof http bearer auth ) { ( ( http bearer auth ) auth ) set bearer token ( bearer token ) ; return this ; } } throw new runtime exception ( " no bearer authentication configured ! " ) ; }


< code > optional bool sex = 5 ; < code >

public boolean get sex ( ) { return sex ; }


returns the set of active top level targets remaining , which is a subset of the top level targets we attempted to analyze

public collection < configured target > get top level targets ( ) { return top level targets ; }


checks whether the given { @ link logical type } has a well - defined string representation when calling { @ link object # to string ( ) } on the internal data structure the string representation would be similar in sql or in a programming language note : this method might not be necessary anymore , once we have implemented a utility that can convert any internal data structure to a well - defined string representation

public static boolean has well defined string ( logical type logical type ) { if ( logical type instanceof distinct type ) { return has well defined string ( ( ( distinct type ) logical type ) get source type ( ) ) ; } switch ( logical type get type root ( ) ) { case char : case varchar : case boolean : case tinyint : case smallint : case integer : case bigint : case float : case double : return true ; default : return false ; } }


get current layout version of the data node

public static int get current layout version ( ) { return current layout version ; }


public static int read unsigned int ( byte input in , int zwidth , boolean fill on right ) { int result = 0 ; if ( ! fill on right ) { for ( int i = zwidth ; i > = 0 ; i - - ) { result = ( result > > > 8 ) | ( ( in read byte ( ) & 0xff ) < < 24 ) ; } result > > > = ( 3 - zwidth ) * 8 ; } else { for ( int i = zwidth ; i > = 0 ; i - - ) { result = ( result > > > 8 ) | ( ( in read byte ( ) & 0xff ) < < 24 ) ; } } return result ; }


public void add ( dalv insn insn ) { insns add ( insn ) ; update info ( insn ) ; }


assert that a tag cloud contains label name and weight

public void assert that cloud label contains ( tag cloud < label atom > tag cloud , string expected label , int expected weight ) { assert that cloud label ( true , tag cloud , expected label , expected weight ) ; }


private byte buffer get buffer ( ) { byte buffer buffer = buffer pool poll ( ) ; if ( buffer = = null ) { buffer = byte buffer allocate direct ( buffer size ) ; } return buffer ; }


add the extra memory that will be utilized by the sort method

public long get memory utilized ( ) { / / this is memory that will be actually utilized ( considering the temp / / array that will be allocated by the sort ( ) method ( mergesort ) ) return super get memory utilized ( ) + super count * 4 ; }


adds a change listener that will be notified whenever the value changes

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


in continous reading mode , this read method starts from the start of the compressed stream and end at the end of file by emitting un - compressed data in this mode stream positioning is not announced and should be ignored in byblock reading mode , this read method informs about the end of a b zip 2 block by returning eob at this event , the compressed stream position is also announced this announcement tells that how much of the compressed stream has been de - compressed and read out of this class in between eob events , the stream position is not updated

public int read ( final byte [ ] dest , final int offs , final int len ) throws i o exception { if ( offs < 0 ) { throw new index out of bounds exception ( " offs ( " + offs + " ) < 0 " ) ; } if ( len < 0 ) { throw new index out of bounds exception ( " len ( " + len + " ) < 0 " ) ; } if ( offs + len > dest length ) { throw new index out of bounds exception ( " offs ( " + offs + " ) + len ( " + len + " ) > dest length ( " + dest length + " ) " ) ; } if ( this in = = null ) { throw new i o exception ( " stream closed " ) ; } if ( lazy initialization ) { this init ( ) ; this lazy initialization = false ; } if ( skip decompression ) { change state to process a block ( ) ; skip decompression = false ; } final int hi = offs + len ; int dest offs = offs ; int b = 0 ; for ( ; ( ( dest offs < hi ) & & ( ( b = read 0 ( ) ) ) > = 0 ) ; ) { dest [ dest offs + + ] = ( byte ) b ; } int result = dest offs - offs ; if ( result = = 0 ) { / / report ' end of block ' or ' end of stream ' result = b ; skip result = this skip to next marker ( c b zip 2 input stream block delimiter , delimiter bit length ) ; change state to process a block ( ) ; } return result ; }


replace all current parameters with the given list of parameters the { @ link variable utilities # check variable conflict ( function , variable , variable storage , boolean ) } method may be used to check and remove conflicting variables which already exist in the function

public void replace parameters ( function update type update type , boolean force , source type source , variable params ) throws duplicate name exception , invalid input exception ;


public float get scale x ( ) { if ( m view port handler = = null ) return 1f ; else return m view port handler get scale x ( ) ; }


instantiates the given options classes , parsing the given options as well

public iterable < fragment options > parse options ( iterable < ? extends class < ? extends fragment options > > options classes , string options ) throws exception { options parser options parser = options parser builder ( ) options classes ( options classes ) allow residue ( false ) build ( ) ; options parser parse ( options ) ; immutable list builder < fragment options > output = new immutable list builder < > ( ) ; for ( class < ? extends fragment options > options class : options classes ) { output add ( options parser get options ( options class ) ) ; } return output build ( ) ; }


build a { @ linkplain function definition } for a no - argument function that is not aware of time zone , does not support { @ code distinct } and needs the cluster name ( database ( ) ) or the user name ( user ( ) )

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


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

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


returns the maximum height in pixels across all legend labels

public float get maximum entry height ( paint p ) { float max = 0f ; for ( legend entry entry : m entries ) { string label = entry label ; if ( label = = null ) continue ; float length = ( float ) utils calc text height ( p , label ) ; if ( length > max ) max = length ; } return max ; }


how this request should handle warnings if null ( the default ) then this request will default to the behavior dictacted by { @ link rest client builder # set strict deprecation mode } this can be set to { @ link warnings handler # permissive } if the client should ignore all warnings which is the same behavior as setting strict deprecation mode to true it can be set to { @ link warnings handler # strict } if the client should fail if there are any warnings which is the same behavior as settings strict deprecation mode to false it can also be set to a custom implementation of { @ linkplain warnings handler } to permit only certain warnings or to fail the request if the warnings returned don ' t exactly match some set

public builder set warnings handler ( warnings handler warnings handler ) { this warnings handler = warnings handler ; return this ; }


increments a mutable counter and the matching instance i o statistics counter with the value of the atomic long no - op if the counter is not defined , or the count = = 0

public void increment counter ( statistic op , atomic long count ) { increment counter ( op , count get ( ) ) ; }


returns { @ code true } if a subsequent call to { @ link # next ( ) } returns a { @ link chunk } object ;

public boolean has next ( ) { return data ! = null | | ! initialized ; }


gets the start address of the prelink mach - o ' s in memory note : this method only works for pre i o s 12 binaries if called on an i o s 12 binary , it will fail and return 0 because the prelink text segment has a size of 0 in this case , some other means of computing the start address of the prelink mach - o ' s must be used

public static long get prelink start addr ( mach header header ) { segment command prelink text segment = header get segment ( segment names seg prelink text ) ; if ( prelink text segment ! = null & & prelink text segment get v msize ( ) > 0 ) { return prelink text segment get v maddress ( ) ; } return 0 ; }


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


when true , fields are sorted alphabetically when written , otherwise the source code order is used default is false

public void set sort fields ( boolean sort fields ) { this sort fields = sort fields ; }


sets the fuzzy rewrite parameter controlling how the fuzzy query will get rewritten

public match bool prefix query builder fuzzy rewrite ( string fuzzy rewrite ) { this fuzzy rewrite = fuzzy rewrite ; return this ; }


assume logical uri is used for old proxy provider implementations

public boolean use logical u r i ( ) { return true ; }


attempts to set the playback parameters the audio sink may override these parameters if they are not supported

void set playback parameters ( playback parameters playback parameters ) ;


configure code points to be stripped in conversion to { @ code java net uri } that class is more strict than the others

public url component encoding tester strip for uri ( int code points ) { uri stripped code points append ( new string ( code points , 0 , code points length ) ) ; return this ; }


sets the paging maximum paging max page search size that transform can use when pulling the data from the source index if oom is triggered , the paging max page search size is dynamically reduced so that the transform can continue to gather data

public builder set max page search size ( integer max page search size ) { this max page search size = max page search size = = null ? default max page search size : max page search size ; return this ; }


return the { @ link task scheduler } instance for this registrar ( may be { @ code null } )

public task scheduler get scheduler ( ) { return this task scheduler ; }


delete a snapshot that is taken before a directory deletion ( recursively ) , directory diff list should be combined correctly

public void test delete snapshot 2 ( ) throws exception { final path root = new path ( " / " ) ; path dir = new path ( " / dir 1 " ) ; path file 1 = new path ( dir , " file 1 " ) ; d f s test util create file ( hdfs , file 1 , blocksize , replication , seed ) ; hdfs allow snapshot ( root ) ; hdfs create snapshot ( root , " s 1 " ) ; path file 2 = new path ( dir , " file 2 " ) ; d f s test util create file ( hdfs , file 2 , blocksize , replication , seed ) ; i node file file 2 node = fsdir get i node ( file 2 to string ( ) ) as file ( ) ; long file 2 node id = file 2 node get id ( ) ; hdfs create snapshot ( root , " s 2 " ) ; / / delete directory recursively assert true ( hdfs delete ( dir , true ) ) ; assert not null ( fsdir get inode ( file 2 node id ) ) ; / / delete second snapshot hdfs delete snapshot ( root , " s 2 " ) ; assert true ( fsdir get inode ( file 2 node id ) = = null ) ; name node adapter enter safe mode ( cluster get name node ( ) , false ) ; name node adapter save namespace ( cluster get name node ( ) ) ; / / restart nn cluster restart name nodes ( ) ; }


called during initialization to allocate additional particles channels


either copy or share a subset of underlying sub - sequence of bytes

public ascii string sub sequence ( int start , int end , boolean copy ) { if ( is out of bounds ( start , end - start , length ( ) ) ) { throw new index out of bounds exception ( " expected : 0 < = start ( " + start + " ) < = end ( " + end + " ) < = length ( " + length ( ) + ' ) ' ) ; } if ( start = = 0 & & end = = length ( ) ) { return this ; } if ( end = = start ) { return empty string ; } return new ascii string ( value , start + offset , end - start , copy ) ; }


public void att n a m e test ( ) { / / todo : test att name }


attempt to bind to any existing dt , including unmarshalling its contents and creating the aws credential provider used to authenticate the client if successful : { @ link # bound d t } is set to the retrieved token { @ link # decoded identifier } is set to the extracted identifier { @ link # credential providers } is set to the credential provider ( s ) returned by the token binding if unsuccessful , { @ link # deploy unbonded ( ) } is called for the unbonded codepath instead , which will set { @ link # credential providers } to its value this means after this call ( and only after ) the token operations can be invoked this method is called from { @ link # service start ( ) } , so a check on the service state can be used to check things ; the state model prevents re - entrant calls

private void bind to any delegation token ( ) throws i o exception { check state ( ! credential providers is present ( ) , e already deployed ) ; token < abstract s 3 a token identifier > token = select token from f s owner ( ) ; if ( token ! = null ) { bind to delegation token ( token ) ; } else { deploy unbonded ( ) ; } if ( credential providers get ( ) size ( ) = = 0 ) { throw new delegation token i o exception ( " no aws credential providers " + " created by delegation token binding " + token binding get name ( ) ) ; } }


logs out current logged in user session < b > 0 < b > - successful operation

public response entity < void > logout user with http info ( ) throws rest client exception { object post body = null ; string path = api client expand path ( " / user / logout " , collections < string , object > empty map ( ) ) ; final multi value map < string , string > query params = new linked multi value map < string , string > ( ) ; final http headers header params = new http headers ( ) ; final multi value map < string , string > cookie params = new linked multi value map < string , string > ( ) ; final multi value map < string , object > form params = new linked multi value map < string , object > ( ) ; final string [ ] local var accepts = { } ; final list < media type > local var accept = api client select header accept ( local var accepts ) ; final string [ ] content types = { } ; final media type content type = api client select header content type ( content types ) ; string [ ] auth names = new string [ ] { } ; parameterized type reference < void > return type = new parameterized type reference < void > ( ) { } ; return api client invoke a p i ( path , http method get , query params , post body , header params , cookie params , form params , local var accept , content type , auth names , return type ) ; }


return the resource loader to use , if any this will be non - null in regular scenarios , also allowing access to the resource class loader

public final resource loader get resource loader ( ) { return this reader get resource loader ( ) ; }


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


sql < code > round < code > operator applied to big decimal values

public static big decimal sround ( big decimal b 0 ) { return sround ( b 0 , 0 ) ; }


through { @ link browser error log # get unique id ( ) } hash code

public boolean should sample ( int hash code ) { return hash code % 10000 < sample rate ; }


returns the type from super class ' s type parameter in { @ link $ gson $ types # canonicalize canonical form }

static type get superclass type parameter ( class < ? > subclass ) { type superclass = subclass get generic superclass ( ) ; if ( superclass instanceof class ) { throw new runtime exception ( " missing type parameter " ) ; } parameterized type parameterized = ( parameterized type ) superclass ; return $ gson $ types canonicalize ( parameterized get actual type arguments ( ) [ 0 ] ) ; }


sets sticky bit if this method is not called , then the builder assumes false

public builder sticky bit ( boolean sticky bit ) { this sticky bit = sticky bit ; return this ; }


invoke api by sending http request with the given options

public < t > api response < t > invoke a p i ( string operation , string path , string method , list < pair > query params , object body , map < string , string > header params , map < string , string > cookie params , map < string , object > form params , string accept , string content type , string [ ] auth names , generic type < t > return type , boolean is body nullable ) throws api exception { / / not using ` target ( target u r l ) path ( path ) ` below , / / to support ( constant ) query string in ` path ` , e g " / posts ? draft = 1 " string target u r l ; if ( server index ! = null & & operation servers contains key ( operation ) ) { integer index = operation server index contains key ( operation ) ? operation server index get ( operation ) : server index ; map < string , string > variables = operation server variables contains key ( operation ) ? operation server variables get ( operation ) : server variables ; list < server configuration > server configurations = operation servers get ( operation ) ; if ( index < 0 | | index > = server configurations size ( ) ) { throw new array index out of bounds exception ( string format ( " invalid index % d when selecting the host settings must be less than % d " , index , server configurations size ( ) ) ) ; } target u r l = server configurations get ( index ) url ( variables ) + path ; } else { target u r l = this base path + path ; } web target target = http client target ( target u r l ) ; if ( query params ! = null ) { for ( pair query param : query params ) { if ( query param get value ( ) ! = null ) { target = target query param ( query param get name ( ) , escape string ( query param get value ( ) ) ) ; } } } invocation builder invocation builder = target request ( ) accept ( accept ) ; for ( entry < string , string > entry : cookie params entry set ( ) ) { string value = entry get value ( ) ; if ( value ! = null ) { invocation builder = invocation builder cookie ( entry get key ( ) , value ) ; } } for ( entry < string , string > entry : default cookie map entry set ( ) ) { string value = entry get value ( ) ; if ( value ! = null ) { invocation builder = invocation builder cookie ( entry get key ( ) , value ) ; } } entity < ? > entity = serialize ( body , form params , content type , is body nullable ) ; / / put all headers in one place map < string , string > all header params = new hash map < > ( default header map ) ; all header params put all ( header params ) ; / / update different parameters ( e g headers ) for authentication update params for auth ( auth names , query params , all header params , cookie params , serialize to string ( body , form params , content type , is body nullable ) , method , target get uri ( ) ) ; for ( entry < string , string > entry : all header params entry set ( ) ) { string value = entry get value ( ) ; if ( value ! = null ) { invocation builder = invocation builder header ( entry get key ( ) , value ) ; } } response response = null ; try { response = send request ( method , invocation builder , entity ) ; / / if o auth is used and a status 401 is received , renew the access token and retry the request if ( response get status info ( ) = = status unauthorized ) { for ( string auth name : auth names ) { authentication authentication = authentications get ( auth name ) ; if ( authentication instanceof o auth ) { o auth 2 access token access token = ( ( o auth ) authentication ) renew access token ( ) ; if ( access token ! = null ) { invocation builder header ( " authorization " , null ) ; invocation builder header ( " authorization " , " bearer " + access token get access token ( ) ) ; response = send request ( method , invocation builder , entity ) ; } break ; } } } int status code = response get status info ( ) get status code ( ) ; map < string , list < string > > response headers = build response headers ( response ) ; if ( response get status info ( ) = = status no content ) { return new api response < t > ( status code , response headers ) ; } else if ( response get status info ( ) get family ( ) = = status family successful ) { if ( return type = = null ) { return new api response < t > ( status code , response headers ) ; } else { return new api response < t > ( status code , response headers , deserialize ( response , return type ) ) ; } } else { string message = " error " ; string resp body = null ; if ( response has entity ( ) ) { try { resp body = string value of ( response read entity ( string class ) ) ; message = resp body ; } catch ( runtime exception e ) { / / e print stack trace ( ) ; } } throw new api exception ( response get status ( ) , message , build response headers ( response ) , resp body ) ; } } finally { try { response close ( ) ; } catch ( exception e ) { / / it ' s not critical , since the response object is local in method invoke a p i ; that ' s fine , / / just continue } } }


public void basic echo ( ) throws exception { final int message size = 64 * 1024 ; final int transfer limit = message size * 16 ; final meter rate 1 = metrics new meter ( nio udt message rendezvous channel test class , " send rate " , " bytes " , time unit seconds ) ; final meter rate 2 = metrics new meter ( nio udt message rendezvous channel test class , " send rate " , " bytes " , time unit seconds ) ; final inet socket address addr 1 = unit help local socket address ( ) ; final inet socket address addr 2 = unit help local socket address ( ) ; final echo byte handler handler 1 = new echo byte handler ( rate 1 , message size ) ; final echo byte handler handler 2 = new echo byte handler ( rate 2 , message size ) ; final nio event loop group group 1 = new nio event loop group ( 1 , executors default thread factory ( ) , nio udt provider byte provider ) ; final nio event loop group group 2 = new nio event loop group ( 1 , executors default thread factory ( ) , nio udt provider byte provider ) ; final bootstrap boot 1 = new bootstrap ( ) ; boot 1 group ( group 1 ) channel factory ( nio udt provider byte rendezvous ) local address ( addr 1 ) remote address ( addr 2 ) handler ( handler 1 ) ; final bootstrap boot 2 = new bootstrap ( ) ; boot 2 group ( group 1 ) channel factory ( nio udt provider byte rendezvous ) local address ( addr 2 ) remote address ( addr 1 ) handler ( handler 2 ) ; final channel future connect future 1 = boot 1 connect ( ) ; final channel future connect future 2 = boot 2 connect ( ) ; while ( handler 1 meter ( ) count ( ) < transfer limit & & handler 2 meter ( ) count ( ) < transfer limit ) { log info ( " progress : { } { } " , handler 1 meter ( ) count ( ) , handler 2 meter ( ) count ( ) ) ; thread sleep ( 1000 ) ; } connect future 1 channel ( ) close ( ) sync ( ) ; connect future 2 channel ( ) close ( ) sync ( ) ; log info ( " handler 1 : { } " , handler 1 meter ( ) count ( ) ) ; log info ( " handler 2 : { } " , handler 2 meter ( ) count ( ) ) ; assert true ( handler 1 meter ( ) count ( ) > = transfer limit ) ; assert true ( handler 2 meter ( ) count ( ) > = transfer limit ) ; assert equals ( handler 1 meter ( ) count ( ) , handler 2 meter ( ) count ( ) ) ; group 1 shutdown gracefully ( ) ; group 2 shutdown gracefully ( ) ; group 1 termination future ( ) sync ( ) ; group 2 termination future ( ) sync ( ) ; }


configure a path prefix to apply to matching controller methods prefixes are used to enrich the mappings of every { @ code @ request mapping } method whose controller type is matched by the corresponding { @ code predicate } the prefix for the first matching predicate is used consider using { @ link org springframework web method handler type predicate handler type predicate } to group controllers

public path match configurer add path prefix ( string prefix , predicate < class < ? > > predicate ) { if ( this path prefixes = = null ) { this path prefixes = new linked hash map < > ( ) ; } this path prefixes put ( prefix , predicate ) ; return this ; }


todo in a future release , the front page should appear operable the interface to the derby operations query can only run select statements and is a direct query to the native derby database without any additional logic

public rest result < object > derby ops ( @ request param ( value = " sql " ) string sql ) { string select sign = " select " ; string limit sign = " rows fetch next " ; string limit = " offset 0 rows fetch next 1000 rows only " ; try { if ( property util is embedded storage ( ) ) { local data source service impl data source service = ( local data source service impl ) dynamic data source get instance ( ) get data source ( ) ; if ( string utils starts with ignore case ( sql , select sign ) ) { if ( ! string utils contains ignore case ( sql , limit sign ) ) { sql + = limit ; } jdbc template template = data source service get jdbc template ( ) ; list < map < string , object > > result = template query for list ( sql ) ; return rest result utils success ( result ) ; } return rest result utils failed ( " only query statements are allowed to be executed " ) ; } return rest result utils failed ( " the current storage mode is not derby " ) ; } catch ( exception e ) { return rest result utils failed ( e get message ( ) ) ; } }


returns whether the instruction at the given offset is a ' new ' instruction , in the code attribute that was visited most recently

public boolean is new ( int offset ) { return initialization offsets [ offset ] ! = none ; }


delegates to the { @ link log # is error enabled } method of the underlying { @ link log } instance

public boolean is error enabled ( ) { return logger is error enabled ( ) ; }


reads the 8 bits of the special corner condition 3 see iso 16022 : 2006 , figure f 5

private int read corner 3 ( int num rows , int num columns ) { int current byte = 0 ; if ( read module ( num rows - 1 , 0 , num rows , num columns ) ) { current byte | = 1 ; } current byte < < = 1 ; if ( read module ( num rows - 1 , num columns - 1 , num rows , num columns ) ) { current byte | = 1 ; } current byte < < = 1 ; if ( read module ( 0 , num columns - 3 , num rows , num columns ) ) { current byte | = 1 ; } current byte < < = 1 ; if ( read module ( 0 , num columns - 2 , num rows , num columns ) ) { current byte | = 1 ; } current byte < < = 1 ; if ( read module ( 0 , num columns - 1 , num rows , num columns ) ) { current byte | = 1 ; } current byte < < = 1 ; if ( read module ( 1 , num columns - 3 , num rows , num columns ) ) { current byte | = 1 ; } current byte < < = 1 ; if ( read module ( 1 , num columns - 2 , num rows , num columns ) ) { current byte | = 1 ; } current byte < < = 1 ; if ( read module ( 1 , num columns - 1 , num rows , num columns ) ) { current byte | = 1 ; } return current byte ; }


returns a new array based escaper map for creating array based char escaper or array based unicode escaper instances

public static array based escaper map create ( map < character , string > replacements ) { return new array based escaper map ( create replacement array ( replacements ) ) ; }


monitoring bulk test : this test uses the monitoring bulk request to index documents it then ensure that the documents were correctly indexed and have the expected information rest api tests ( like how this is really called ) are handled as part of the x pack rest tests

public void test monitoring bulk ( ) throws exception { when exporters are ready ( ( ) - > { final monitored system system = random system ( ) ; final time value interval = time value time value seconds ( random int between ( 1 , 20 ) ) ; final monitoring bulk response bulk response = new monitoring bulk request builder ( client ( ) ) add ( system , new bytes array ( create bulk entity ( ) get bytes ( " utf - 8 " ) ) , x content type json , system current time millis ( ) , interval millis ( ) ) get ( ) ; assert that ( bulk response status ( ) , is ( rest status ok ) ) ; assert that ( bulk response get error ( ) , null value ( ) ) ; final string monitoring index = " monitoring - " + system get system ( ) + " - " + template version + " - * " ; / / wait for the monitoring index to be created assert busy ( ( ) - > { / / monitoring uses auto expand replicas , so it should be green even without replicas ensure green ( monitoring index ) ; assert that ( client ( ) admin ( ) indices ( ) prepare refresh ( monitoring index ) get ( ) get status ( ) , is ( rest status ok ) ) ; final search response response = client ( ) prepare search ( " monitoring - " + system get system ( ) + " - " + template version + " - * " ) get ( ) ; / / exactly 3 results are expected assert that ( " no monitoring documents yet " , response get hits ( ) get total hits ( ) value , equal to ( 3l ) ) ; final list < map < string , object > > sources = arrays stream ( response get hits ( ) get hits ( ) ) map ( search hit : : get source as map ) collect ( collectors to list ( ) ) ; / / find distinct source timestamp fields assert that ( sources stream ( ) map ( source - > source get ( " timestamp " ) ) distinct ( ) count ( ) , is ( 1l ) ) ; / / find distinct source source node fields ( which is a map ) assert that ( sources stream ( ) map ( source - > source get ( " source node " ) ) distinct ( ) count ( ) , is ( 1l ) ) ; } ) ; final search response response = client ( ) prepare search ( monitoring index ) get ( ) ; final search hits hits = response get hits ( ) ; assert that ( response get hits ( ) get total hits ( ) value , equal to ( 3l ) ) ; assert that ( " monitoring documents must have the same timestamp " , arrays stream ( hits get hits ( ) ) map ( hit - > extract value ( " timestamp " , hit get source as map ( ) ) ) distinct ( ) count ( ) , equal to ( 1l ) ) ; assert that ( " monitoring documents must have the same source node timestamp " , arrays stream ( hits get hits ( ) ) map ( hit - > extract value ( " source node timestamp " , hit get source as map ( ) ) ) distinct ( ) count ( ) , equal to ( 1l ) ) ; for ( final search hit hit : hits get hits ( ) ) { assert monitoring doc ( to map ( hit ) , system , interval ) ; } } ) ; }


whether or not the memory at the indicated address appears to be a valid location for the indicated number of handler type data types

protected void validate model specific info ( ) throws invalid data type exception { program program = get program ( ) ; memory memory = program get memory ( ) ; address start address = get address ( ) ; data type rtti 1 dt = get data type ( ) ; data type base dt = data type utils get base data type ( rtti 1 dt ) ; structure rtti 1 struct = ( structure ) base dt ; int length = rtti 1 dt get length ( ) ; / / test that we can get the expected number of bytes m s data type utils get bytes ( memory , start address , length ) ; boolean validate referred to data = validation options should validate referred to data ( ) ; / / first component is either a direct reference or an image base offset address rtti 0 address = get referenced address ( program , start address ) ; if ( rtti 0 address = = null ) { invalid ( ) ; / / throws exception } rtti 0 model = new type descriptor model ( program , rtti 0 address , validation options ) ; if ( validate referred to data ) { try { rtti 0 model validate ( ) ; } catch ( exception e ) { invalid ( e ) ; / / throws exception } } else if ( ! rtti 0 model is loaded and initialized address ( ) ) { invalid ( " data referencing " + rtti 0 model get name ( ) + " data type isn ' t a loaded and initialized address " + rtti 0 address + " " ) ; } / / middle bytes are 5 dword numeric values try { / / num bases should be > = 0 int num bases = memory get int ( start address add ( num bases offset ) ) ; / / check for valid num bases ? if ( num bases < 0 ) { invalid ( ) ; / / throws exception } data type component pmd component = rtti 1 struct get component ( member disp ordinal ) ; data type pmd dt = pmd component get data type ( ) ; data type base data type = data type utils get base data type ( pmd dt ) ; structure pmd data type = ( structure ) base data type ; int pmd offset = pmd component get offset ( ) ; int mdisp offset = pmd data type get component ( mdisp ordinal ) get offset ( ) ; / / mdisp int pdisp offset = pmd data type get component ( pdisp ordinal ) get offset ( ) ; / / pdisp int vdisp offset = pmd data type get component ( vdisp ordinal ) get offset ( ) ; / / vdisp / / member displacement should be > = 0 int m disp = memory get int ( start address add ( pmd offset + mdisp offset ) ) ; if ( m disp < 0 ) { invalid ( ) ; / / throws exception } / / vbtable displacement should be > = - 1 int p disp = memory get int ( start address add ( pmd offset + pdisp offset ) ) ; if ( p disp < - 1 ) { invalid ( ) ; / / throws exception } / / displacement within vbtable should be > = 0 int v disp = memory get int ( start address add ( pmd offset + vdisp offset ) ) ; if ( v disp < 0 ) { invalid ( ) ; / / throws exception } / / attributes can be any bit mask number , so don ' t check it / / int attributes = memory get int ( start address add ( attributes offset ) ) ; } catch ( memory access exception | address out of bounds exception e ) { invalid ( ) ; / / throws exception } / / last component is either a direct reference or an image base offset address rtti 3 address = get referenced address ( program , start address add ( class hierarchy pointer offset ) ) ; if ( rtti 3 address = = null ) { invalid ( ) ; / / throws exception } / / make sure we don ' t follow flow or will get stuck in infinite loop data validation options dont follow options = new data validation options ( validation options ) ; dont follow options set validate referred to data ( false ) ; rtti 3 model = new rtti 3 model ( program , rtti 3 address , dont follow options ) ; if ( validate referred to data ) { try { rtti 3 model validate ( ) ; } catch ( exception e ) { invalid ( e ) ; / / throws exception } } else if ( ! rtti 3 model is loaded and initialized address ( ) ) { invalid ( " data referencing " + rtti 3 model get name ( ) + " data type isn ' t a loaded and initialized address " + rtti 3 address + " " ) ; } }


returns a { @ code collector } expecting the specified number of insertions , and yielding a { @ link bloom filter } with false positive probability 3 % note that if the { @ code collector } receives significantly more elements than specified , the resulting { @ code bloom filter } will suffer a sharp deterioration of its false positive probability the constructed { @ code bloom filter } will be serializable if the provided { @ code funnel < t > } is it is recommended that the funnel be implemented as a java enum this has the benefit of ensuring proper serialization and deserialization , which is important since { @ link # equals } also relies on object identity of funnels

public static < t > collector < t , ? , bloom filter < t > > to bloom filter ( funnel < ? super t > funnel , long expected insertions ) { return to bloom filter ( funnel , expected insertions , 0 03 ) ; }


given tag will be used as tag only once for this method call regardless of the tag that ' s been set during initialization after this invocation , the general tag that ' s been set will be used for the subsequent log calls

public static printer t ( @ nullable string tag ) { return printer t ( tag ) ; }


test the property ' array array number '

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


helper for { @ link # debug verify } which does most of the work

private static void debug verify 0 ( local list locals ) { int sz = locals size ( ) ; entry [ ] active = new entry [ 65536 ] ; for ( int i = 0 ; i < sz ; i + + ) { entry e = locals get ( i ) ; int reg = e get register ( ) ; if ( e is start ( ) ) { entry already = active [ reg ] ; if ( ( already ! = null ) & & e matches ( already ) ) { throw new runtime exception ( " redundant start at " + integer to hex string ( e get address ( ) ) + " : got " + e + " ; had " + already ) ; } active [ reg ] = e ; } else { if ( active [ reg ] = = null ) { throw new runtime exception ( " redundant end at " + integer to hex string ( e get address ( ) ) ) ; } int addr = e get address ( ) ; boolean found start = false ; for ( int j = i + 1 ; j < sz ; j + + ) { entry test = locals get ( j ) ; if ( test get address ( ) ! = addr ) { break ; } if ( test get register spec ( ) get reg ( ) = = reg ) { if ( test is start ( ) ) { if ( e get disposition ( ) ! = disposition end replaced ) { throw new runtime exception ( " improperly marked end at " + integer to hex string ( addr ) ) ; } found start = true ; } else { throw new runtime exception ( " redundant end at " + integer to hex string ( addr ) ) ; } } } if ( ! found start & & ( e get disposition ( ) = = disposition end replaced ) ) { throw new runtime exception ( " improper end replacement claim at " + integer to hex string ( addr ) ) ; } active [ reg ] = null ; } } }


swallow - result - > background - thread hand - off - > multiplex - > encoded cache - > disk cache - > ( webp transcode ) - > local file fetch

private synchronized producer < void > get local file fetch to encoded memory prefetch sequence ( ) { if ( fresco systrace is tracing ( ) ) { fresco systrace begin section ( " producer sequence factory # get local file fetch to encoded memory prefetch sequence " ) ; } if ( m local file fetch to encoded memory prefetch sequence = = null ) { if ( fresco systrace is tracing ( ) ) { fresco systrace begin section ( " producer sequence factory # get local file fetch to encoded memory prefetch sequence : init " ) ; } m local file fetch to encoded memory prefetch sequence = m producer factory new swallow result producer ( get background local file fetch to encode memory sequence ( ) ) ; if ( fresco systrace is tracing ( ) ) { fresco systrace end section ( ) ; } } if ( fresco systrace is tracing ( ) ) { fresco systrace end section ( ) ; } return m local file fetch to encoded memory prefetch sequence ; }


override of the to string method to just print the contents of the cell

public string to string ( ) { return this data ; }


returns true if this method is called during a layout state calculation and the layout state reference hasn ' t been nullified

boolean has layout state ( ) { return m layout state context ! = null & & m layout state context get layout state ( ) ! = null ; }


add comment history records for comments being deleted

private void add comment history records ( address start , address end ) throws i o exception { record iterator iter = comment adapter get records ( start , end , true ) ; while ( iter has next ( ) ) { d b record rec = iter next ( ) ; add comment history record ( rec , code unit pre comment ) ; add comment history record ( rec , code unit post comment ) ; add comment history record ( rec , code unit eol comment ) ; add comment history record ( rec , code unit plate comment ) ; add comment history record ( rec , code unit repeatable comment ) ; } }


public static drawable get drawable ( @ non null final string key , final drawable default value , @ non null final cache double utils cache double utils ) { return cache double utils get drawable ( key , default value ) ; } / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / about parcelable / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /


determine whether the given response is a gzip response default implementation checks whether the http " content - encoding " header contains " gzip " ( in any casing )

protected boolean is gzip response ( http u r l connection con ) { string encoding header = con get header field ( http header content encoding ) ; return ( encoding header ! = null & & encoding header to lower case ( ) contains ( encoding gzip ) ) ; }


returns task histograms this must be called between calls to { @ link # start } and { @ link # stop } , or the returned list is empty

public synchronized iterable < slow task > get slowest tasks ( ) { list < iterable < slow task > > slowest tasks by type = new array list < > ( ) ; for ( slowest task aggregator aggregator : slowest tasks ) { if ( aggregator ! = null ) { slowest tasks by type add ( aggregator get slowest tasks ( ) ) ; } } return iterables concat ( slowest tasks by type ) ; }


tests whether the given flag is off if the flag is not a power of 2 ( ie 3 ) this tests whether the combination of flags is off

private boolean is off ( long flag ) { return ( options & flag ) = = 0 ; }


mime types the selection constrains on types not included in the set will still be shown in the grid but can ' t be chosen

public selection creator choose ( set < mime type > mime types ) { return this choose ( mime types , true ) ; }


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


set to { @ code true } to force only creation , not an update of an index template if it already exists , it will fail with an { @ link illegal argument exception }

public request create ( boolean create ) { this create = create ; return this ; }


public string get capital camel ( ) { return capital camel ; }


get the log aggregation directory suffix

public string get remote root log dir suffix ( ) { return this remote root log dir suffix ; }


generate inputs ranging from - 10 to 10 for both input params and calculate the expected result

static stream < arguments > prepare parameters ( final int binary operator result calc ) { final var test data = new array list < arguments > ( ) ; for ( var i = - 10 ; i < 10 ; i + + ) { for ( var j = - 10 ; j < 10 ; j + + ) { test data add ( arguments of ( new number expression ( i ) , new number expression ( j ) , result calc apply as int ( i , j ) ) ) ; } } return test data stream ( ) ; }


resolve the given media type to a list of file extensions

list < string > resolve file extensions ( media type media type ) ;


merge hadoop configuration into configuration this is necessary for the hdfs configuration

public static void merge hadoop conf ( configuration hadoop config ) { / / we have to load the global configuration here , because the hadoop input format base does not / / have access to a flink configuration object org apache flink configuration configuration flink configuration = global configuration load configuration ( ) ; configuration hadoop conf = org apache flink api java hadoop mapred utils hadoop utils get hadoop configuration ( flink configuration ) ; for ( map entry < string , string > e : hadoop conf ) { if ( hadoop config get ( e get key ( ) ) = = null ) { hadoop config set ( e get key ( ) , e get value ( ) ) ; } } }


parses and validates that the source is not empty

public static void validate ( string source ) { if ( source = = null ) { throw new elasticsearch parse exception ( " template must not be null " ) ; } if ( strings is empty ( source ) ) { throw new elasticsearch parse exception ( " template must not be empty " ) ; } try { x content helper convert to map ( json x content json x content , source , false ) ; } catch ( exception e ) { throw new elasticsearch parse exception ( " invalid template " , e ) ; } }


returns { @ link list } & lt ; { @ link instruction annotation } & gt ;

public list < instruction annotation > get binary annotation opcode list ( ) { return binary annotation opcode list ; }


set date format for the { @ link log parser }

public void set date format ( final string date pattern ) { this format = new simple date format ( date pattern ) ; }


predicate : will this binding issue a dt if requested in a call to { @ link # get bound or new d t ( encryption secrets , text ) } ? that is : should the filesystem declare that it is issuing delegation tokens ?

public token issuing policy get token issuing policy ( ) { return is bound to d t ( ) ? token issuing policy return existing token : token binding get token issuing policy ( ) ; }


sets an application specific object for convenience

public void set user object ( @ null object user object ) { this user object = user object ; }


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


returns true iff this file is a block device

public boolean is block device ( ) { return ( st mode & s ifmt ) = = s ifblk ; }


set the end delimiter that identifies block comments within the sql scripts defaults to < code > " & # 47 ; " < code >

public void set block comment end delimiter ( string block comment end delimiter ) { assert has text ( block comment end delimiter , " ' block comment end delimiter ' must not be null or empty " ) ; this block comment end delimiter = block comment end delimiter ; }


public void add role ( string role , string user name ) { string sql = " insert into roles ( role , username ) values ( ? , ? ) " ; try { embedded storage context utils add sql context ( sql , role , user name ) ; database operate update ( embedded storage context utils get current sql context ( ) ) ; } finally { embedded storage context utils clean all context ( ) ; } }


returns the longest prefix from a given set of ' prefixes ' that are contained in ' path ' i e the closest ancestor directory containing path returns null if none found

static package identifier longest path prefix ( package identifier path , set < package identifier > prefixes ) { for ( int i = path get package fragment ( ) segment count ( ) ; i > = 0 ; i - - ) { package identifier prefix = create in repo ( path , path get package fragment ( ) sub fragment ( 0 , i ) ) ; if ( prefixes contains ( prefix ) ) { return prefix ; } } return null ; }


returns true if the topic names collide due to a period ( ' ' ) or underscore ( ' ' ) in the same position

public static boolean has collision ( string topic a , string topic b ) { return topic a replace ( ' ' , ' ' ) equals ( topic b replace ( ' ' , ' ' ) ) ; }