ensure that the given request is coming from the correct writer and in - order

private synchronized void check request ( request info req info ) throws i o exception { / / invariant 25 from zab paper if ( req info get epoch ( ) < last promised epoch get ( ) ) { throw new i o exception ( " ipc ' s epoch " + req info get epoch ( ) + " is less than the last promised epoch " + last promised epoch get ( ) + " ; journal id : " + journal id ) ; } else if ( req info get epoch ( ) > last promised epoch get ( ) ) { / / a newer client has arrived fence any previous writers by updating / / the promise update last promised epoch ( req info get epoch ( ) ) ; } / / ensure that the i p cs are arriving in - order as expected check sync ( req info get ipc serial number ( ) > current epoch ipc serial , " ipc serial % s from client % s was not higher than prior highest " + " ipc serial % s ; journal id : % s " , req info get ipc serial number ( ) , server get remote ip ( ) , current epoch ipc serial , journal id ) ; current epoch ipc serial = req info get ipc serial number ( ) ; if ( req info has committed tx id ( ) ) { preconditions check argument ( req info get committed tx id ( ) > = committed txn id get ( ) , " client trying to move committed txid backward from " + committed txn id get ( ) + " to " + req info get committed tx id ( ) + " ; journal id : " + journal id ) ; committed txn id set ( req info get committed tx id ( ) ) ; } }


test setting the default metric explicitly

public void test explicit default metric ( ) throws exception { document mapper mapper = create document mapper ( field mapping ( b - > b field ( " type " , content type ) field ( metrics field , new string [ ] { " value count " , " sum " } ) field ( default metric , " sum " ) ) ) ; mapper field mapper = mapper mappers ( ) get mapper ( " field " ) ; assert that ( field mapper , instance of ( aggregate double metric field mapper class ) ) ; assert equals ( aggregate double metric field mapper metric sum , ( ( aggregate double metric field mapper ) field mapper ) default metric ( ) ) ; }


unregister the configured { @ link notification listener notification listeners } from the { @ link m bean server }

private void unregister notification listeners ( ) { if ( this server ! = null ) { this registered notification listeners for each ( ( bean , mapped object names ) - > { for ( object name mapped object name : mapped object names ) { try { this server remove notification listener ( mapped object name , bean get notification listener ( ) , bean get notification filter ( ) , bean get handback ( ) ) ; } catch ( throwable ex ) { if ( logger is debug enabled ( ) ) { logger debug ( " unable to unregister notification listener " , ex ) ; } } } } ) ; } this registered notification listeners clear ( ) ; }


manipulate this request ' s cookies with the given consumer the map provided to the consumer is " live " , so that the consumer can be used to { @ linkplain multi value map # set ( object , object ) overwrite } existing cookies , { @ linkplain multi value map # remove ( object ) remove } cookies , or use any of the other { @ link multi value map } methods

builder cookies ( consumer < multi value map < string , http cookie > > cookies consumer ) ;


public void test put get remove contains transform ( ) throws exception { final copy on write state map < integer , integer , array list < integer > > state map = new copy on write state map < > ( new array list serializer < > ( int serializer instance ) ) ; array list < integer > state 1 1 = new array list < > ( ) ; state 1 1 add ( 41 ) ; array list < integer > state 2 1 = new array list < > ( ) ; state 2 1 add ( 42 ) ; array list < integer > state 1 2 = new array list < > ( ) ; state 1 2 add ( 43 ) ; assert assert null ( state map put and get old ( 1 , 1 , state 1 1 ) ) ; assert assert equals ( state 1 1 , state map get ( 1 , 1 ) ) ; assert assert equals ( 1 , state map size ( ) ) ; assert assert null ( state map put and get old ( 2 , 1 , state 2 1 ) ) ; assert assert equals ( state 2 1 , state map get ( 2 , 1 ) ) ; assert assert equals ( 2 , state map size ( ) ) ; assert assert null ( state map put and get old ( 1 , 2 , state 1 2 ) ) ; assert assert equals ( state 1 2 , state map get ( 1 , 2 ) ) ; assert assert equals ( 3 , state map size ( ) ) ; assert assert true ( state map contains key ( 2 , 1 ) ) ; assert assert false ( state map contains key ( 3 , 1 ) ) ; assert assert false ( state map contains key ( 2 , 3 ) ) ; state map put ( 2 , 1 , null ) ; assert assert true ( state map contains key ( 2 , 1 ) ) ; assert assert equals ( 3 , state map size ( ) ) ; assert assert null ( state map get ( 2 , 1 ) ) ; state map put ( 2 , 1 , state 2 1 ) ; assert assert equals ( 3 , state map size ( ) ) ; assert assert equals ( state 2 1 , state map remove and get old ( 2 , 1 ) ) ; assert assert false ( state map contains key ( 2 , 1 ) ) ; assert assert equals ( 2 , state map size ( ) ) ; state map remove ( 1 , 2 ) ; assert assert false ( state map contains key ( 1 , 2 ) ) ; assert assert equals ( 1 , state map size ( ) ) ; assert assert null ( state map remove and get old ( 4 , 2 ) ) ; assert assert equals ( 1 , state map size ( ) ) ; state transformation function < array list < integer > , integer > function = ( previous state , value ) - > { previous state add ( value ) ; return previous state ; } ; final int value = 4711 ; state map transform ( 1 , 1 , value , function ) ; state 1 1 = function apply ( state 1 1 , value ) ; assert assert equals ( state 1 1 , state map get ( 1 , 1 ) ) ; }


index the given mutation , adding mutations to the index and metrics table like typical use of a batch writer , this method does not flush mutations to the underlying index table for higher throughput the modifications to the metrics table are tracked in memory and added to the metrics table when the indexer is flushed or closed

public void index ( mutation mutation ) { / / increment the cardinality for the number of rows in the table metrics get ( metrics table row count ) increment and get ( ) ; / / set the first and last row values of the table based on existing row i ds if ( first row = = null | | byte array comparator compare ( mutation get row ( ) , first row ) < 0 ) { first row = mutation get row ( ) ; } if ( last row = = null | | byte array comparator compare ( mutation get row ( ) , last row ) > 0 ) { last row = mutation get row ( ) ; } / / for each column update in this mutation for ( column update column update : mutation get updates ( ) ) { / / get the column qualifiers we want to index for this column family ( if any ) byte buffer family = wrap ( column update get column family ( ) ) ; collection < byte buffer > index qualifiers = index columns get ( family ) ; / / if we have column qualifiers we want to index for this column family if ( index qualifiers ! = null ) { / / check if we want to index this particular qualifier byte buffer qualifier = wrap ( column update get column qualifier ( ) ) ; if ( index qualifiers contains ( qualifier ) ) { / / if so , create a mutation using the following mapping : / / row id = column value / / column family = columnqualifier columnfamily / / column qualifier = row id / / value = empty byte buffer index family = get index column family ( column update get column family ( ) , column update get column qualifier ( ) ) ; type type = index column types get ( family ) get ( qualifier ) ; column visibility visibility = new column visibility ( column update get column visibility ( ) ) ; / / if this is an array type , then index each individual element in the array if ( types is array type ( type ) ) { type element type = types get element type ( type ) ; list < ? > elements = serializer decode ( type , column update get value ( ) ) ; for ( object element : elements ) { add index mutation ( wrap ( serializer encode ( element type , element ) ) , index family , visibility , mutation get row ( ) ) ; } } else { add index mutation ( wrap ( column update get value ( ) ) , index family , visibility , mutation get row ( ) ) ; } } } } }


runs a cluster state update that checks whether we have outstanding snapshot deletions that can be executed and executes them todo : optimize this to execute in a single cs update together with finalizing the latest snapshot

private void run ready deletions ( repository data repository data , string repository ) { cluster service submit state update task ( " run ready deletions " , new cluster state update task ( ) { private snapshot deletions in progress entry deletion to run ; @ override public cluster state execute ( cluster state current state ) { assert ready deletions ( current state ) v 1 ( ) = = current state : " deletes should have been set to ready by finished snapshot deletes and finalizations " ; for ( snapshot deletions in progress entry entry : current state custom ( snapshot deletions in progress type , snapshot deletions in progress empty ) get entries ( ) ) { if ( entry repository ( ) equals ( repository ) & & entry state ( ) = = snapshot deletions in progress state started ) { deletion to run = entry ; break ; } } return current state ; } @ override public void on failure ( string source , exception e ) { logger warn ( " failed to run ready delete operations " , e ) ; fail all listeners on master fail over ( e ) ; } @ override public void cluster state processed ( string source , cluster state old state , cluster state new state ) { if ( deletion to run = = null ) { run next queued operation ( repository data , repository , false ) ; } else { delete snapshots from repository ( deletion to run , repository data , new state nodes ( ) get min node version ( ) ) ; } } } ) ; }


public put repository request builder set settings ( map < string , object > source ) { request settings ( source ) ; return this ; }


private void swap choice state ( int position ) { int last count = get count selected ( ) ; boolean last checked = checked get ( position ) ; checked set ( position , ! last checked ) ; int count = last checked ? last count - 1 : last count + 1 ; if ( last count = = 0 & & count = = 1 ) { swipe list view on choice started ( ) ; close opened items ( ) ; set actions to ( swipe list view swipe action choice ) ; } if ( last count = = 1 & & count = = 0 ) { swipe list view on choice ended ( ) ; return old actions ( ) ; } / / if ( build version sdk int > = build version codes honeycomb ) { / / swipe list view set item checked ( position , ! last checked ) ; / / } swipe list view on choice changed ( position , ! last checked ) ; reload choice state in view ( front view , position ) ; }


test if datanode protocol # block received and deleted can correctly update the pending reconstruction also make sure the block received and deleted call is idempotent to the pending reconstruction

public void test block received ( ) throws exception { final configuration conf = new hdfs configuration ( ) ; conf set long ( d f s config keys dfs block size key , 1024 ) ; mini d f s cluster cluster = null ; try { cluster = new mini d f s cluster builder ( conf ) num data nodes ( datanode count ) build ( ) ; cluster wait active ( ) ; distributed file system hdfs = cluster get file system ( ) ; f s namesystem fsn = cluster get namesystem ( ) ; block manager blk manager = fsn get block manager ( ) ; final string file = " / tmp txt " ; final path file path = new path ( file ) ; short repl factor = 1 ; d f s test util create file ( hdfs , file path , 1024l , repl factor , 0 ) ; / / temporarily stop the heartbeat array list < data node > datanodes = cluster get data nodes ( ) ; for ( int i = 0 ; i < datanode count ; i + + ) { data node test utils set heartbeats disabled for tests ( datanodes get ( i ) , true ) ; } hdfs set replication ( file path , ( short ) datanode count ) ; block manager test util compute all pending work ( blk manager ) ; assert equals ( 1 , blk manager pending reconstruction size ( ) ) ; i node file file node = fsn get f s directory ( ) get i node 4 write ( file ) as file ( ) ; block info [ ] blocks = file node get blocks ( ) ; assert equals ( datanode count - 1 , blk manager pending reconstruction get num replicas ( blocks [ 0 ] ) ) ; located block located block = hdfs get client ( ) get located blocks ( file , 0 ) get ( 0 ) ; datanode info existing dn = ( located block get locations ( ) ) [ 0 ] ; int report dn num = 0 ; string pool id = cluster get namesystem ( ) get block pool id ( ) ; / / let two datanodes ( other than the one that already has the data ) to / / report to nn for ( int i = 0 ; i < datanode count & & report dn num < 2 ; i + + ) { if ( ! datanodes get ( i ) get datanode id ( ) equals ( existing dn ) ) { datanode registration dn r = datanodes get ( i ) get d n registration for b p ( pool id ) ; storage received deleted blocks [ ] report = { new storage received deleted blocks ( new datanode storage ( " fake - storage - id - ignored " ) , new received deleted block info [ ] { new received deleted block info ( blocks [ 0 ] , block status received block , " " ) } ) } ; cluster get name node rpc ( ) block received and deleted ( dn r , pool id , report ) ; report dn num + + ; } } / / i b rs are async , make sure the nn processes all of them cluster get namesystem ( ) get block manager ( ) flush block ops ( ) ; assert equals ( datanode count - 3 , blk manager pending reconstruction get num replicas ( blocks [ 0 ] ) ) ; / / let the same datanodes report again for ( int i = 0 ; i < datanode count & & report dn num < 2 ; i + + ) { if ( ! datanodes get ( i ) get datanode id ( ) equals ( existing dn ) ) { datanode registration dn r = datanodes get ( i ) get d n registration for b p ( pool id ) ; storage received deleted blocks [ ] report = { new storage received deleted blocks ( new datanode storage ( " fake - storage - id - ignored " ) , new received deleted block info [ ] { new received deleted block info ( blocks [ 0 ] , block status received block , " " ) } ) } ; cluster get name node rpc ( ) block received and deleted ( dn r , pool id , report ) ; report dn num + + ; } } cluster get namesystem ( ) get block manager ( ) flush block ops ( ) ; assert equals ( datanode count - 3 , blk manager pending reconstruction get num replicas ( blocks [ 0 ] ) ) ; / / re - enable heartbeat for the datanode that has data for ( int i = 0 ; i < datanode count ; i + + ) { data node test utils set heartbeats disabled for tests ( datanodes get ( i ) , false ) ; data node test utils trigger heartbeat ( datanodes get ( i ) ) ; } thread sleep ( 5000 ) ; assert equals ( 0 , blk manager pending reconstruction size ( ) ) ; } finally { if ( cluster ! = null ) { cluster shutdown ( ) ; } } }


set the configuration source { @ code object } for this metadata element the exact type of the object will depend on the configuration mechanism used

public void set source ( @ nullable object source ) { this source = source ; }


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

public java util list < ? extends com alibaba nacos istio model naming service entry endpoint or builder > get endpoints or builder list ( ) { if ( endpoints builder ! = null ) { return endpoints builder get message or builder list ( ) ; } else { return java util collections unmodifiable list ( endpoints ) ; } }


update the database with the specified bookmark record

void update record ( d b record rec ) throws i o exception { throw new unsupported operation exception ( " bookmarks are read - only and may not be modified " ) ; }


get an array of the data for tasks performed

public task info [ ] get task info ( ) { if ( ! this keep task list ) { throw new unsupported operation exception ( " task info is not being kept ! " ) ; } return this task list to array ( new task info [ 0 ] ) ; }


read a struct from the buffer if this schema is configured to tolerate missing optional fields at the end of the buffer , these fields are replaced with their default values ; otherwise , if the schema does not tolerate missing fields , or if missing fields don ' t have a default value , a { @ code schema exception } is thrown to signify that mandatory fields are missing

public struct read ( byte buffer buffer ) { if ( cached struct ! = null ) { return cached struct ; } object [ ] objects = new object [ fields length ] ; for ( int i = 0 ; i < fields length ; i + + ) { try { if ( tolerate missing fields with defaults ) { if ( buffer has remaining ( ) ) { objects [ i ] = fields [ i ] def type read ( buffer ) ; } else if ( fields [ i ] def has default value ) { objects [ i ] = fields [ i ] def default value ; } else { throw new schema exception ( " missing value for field ' " + fields [ i ] def name + " ' which has no default value " ) ; } } else { objects [ i ] = fields [ i ] def type read ( buffer ) ; } } catch ( exception e ) { throw new schema exception ( " error reading field ' " + fields [ i ] def name + " ' : " + ( e get message ( ) = = null ? e get class ( ) get name ( ) : e get message ( ) ) ) ; } } return new struct ( this , objects ) ; }


extension point for adding empty lines subclasses that do not wish to use the default empty text line can override this method

protected place holder line create place holder line ( validatable line opposite line ) { / / for now , base representations do not know how to create empty lines if it turns out / / that there is a need for one , then we can create a basic empty line to go here return null ; }


creates a specialized node for assigning watermarks

private void push watermark assigner ( flink context context , flink rel builder rel builder , table schema schema ) { final rel data type input rel data type = rel builder peek ( ) get row type ( ) ; final sql expr to rex converter factory factory = context get sql expr to rex converter factory ( ) ; final sql expr to rex converter converter = factory create ( input rel data type ) ; final watermark spec watermark spec = schema get watermark specs ( ) get ( 0 ) ; final string rowtime column = watermark spec get rowtime attribute ( ) ; final int rowtime column idx = input rel data type get field names ( ) index of ( rowtime column ) ; final rex node watermark rex node = converter convert to rex node ( watermark spec get watermark expr ( ) ) ; rel builder watermark ( rowtime column idx , watermark rex node ) ; }


return a string suitable for displaying to the user , containing any exceptions that have been received so far

private string get exception map string ( ) { string builder sb = new string builder ( ) ; boolean first = true ; for ( map entry < key , throwable > e : exceptions entry set ( ) ) { if ( ! first ) { sb append ( " , " ) ; } first = false ; sb append ( e get key ( ) ) append ( " : " ) append ( e get value ( ) get localized message ( ) ) ; } return sb to string ( ) ; }


this won ' t compile if superextends isn ' t done correctly on generics

public void covariance of zip ( ) { observable < horror movie > horrors = observable just ( new horror movie ( ) ) ; observable < cool rating > ratings = observable just ( new cool rating ( ) ) ; observable < movie , cool rating , result > zip ( horrors , ratings , combine ) blocking for each ( action ) ; observable < movie , cool rating , result > zip ( horrors , ratings , combine ) blocking for each ( action ) ; observable < media , rating , extended result > zip ( horrors , ratings , combine ) blocking for each ( extended action ) ; observable < media , rating , result > zip ( horrors , ratings , combine ) blocking for each ( action ) ; observable < media , rating , extended result > zip ( horrors , ratings , combine ) blocking for each ( action ) ; observable < movie , cool rating , result > zip ( horrors , ratings , combine ) ; }


takes ownership of the supplied array of class object [ ] class , and returns a new starlark list instance that initially wraps the array the caller must not subsequently modify the array , but the starlark list instance may do so

static < t > starlark list < t > wrap ( @ nullable mutability mutability , object [ ] elems ) { return new starlark list < > ( mutability , elems , elems length ) ; }


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


public static listener and text for file ( file f , task action context ) throws i o exception { return new listener and text ( new stream task listener ( f ) , new annotated large text < > ( f , charset default charset ( ) , false , context ) ) ; }


general assertion that security is turred on for a cluster

public static void assert security enabled ( ) { assert true ( " security is needed for this test " , user group information is security enabled ( ) ) ; }


given one or more sample records , find a timestamp field that is consistently present in them all to be returned the timestamp field : - must exist in every record - must have the same timestamp format in every record if multiple fields meet these criteria then the one that occurred first in the first sample record is chosen

static tuple < string , timestamp format finder > guess timestamp field ( list < string > explanation , list < map < string , ? > > sample records , file structure overrides overrides , timeout checker timeout checker ) { if ( sample records is empty ( ) ) { return null ; } string builder exception msg = null ; / / accept the first match from the first sample that is compatible with all the other samples for ( tuple < string , timestamp format finder > candidate : find candidates ( explanation , sample records , overrides , timeout checker ) ) { string field name = candidate v 1 ( ) ; timestamp format finder timestamp format finder = candidate v 2 ( ) ; boolean all good = true ; for ( map < string , ? > sample record : sample records sub list ( 1 , sample records size ( ) ) ) { object field value = sample record get ( field name ) ; if ( field value = = null ) { if ( overrides get timestamp field ( ) ! = null ) { throw new illegal argument exception ( " specified timestamp field [ " + overrides get timestamp field ( ) + " ] is not present in record [ " + sample record + " ] " ) ; } explanation add ( " first sample match [ " + field name + " ] ruled out because record [ " + sample record + " ] doesn ' t have field " ) ; all good = false ; break ; } timeout checker check ( " timestamp field determination " ) ; try { timestamp format finder add sample ( field value to string ( ) ) ; } catch ( illegal argument exception e ) { if ( overrides get timestamp format ( ) ! = null ) { if ( exception msg = = null ) { exception msg = new string builder ( " specified timestamp format [ " + overrides get timestamp format ( ) + " ] does not match " ) ; } else { exception msg append ( " , nor " ) ; } exception msg append ( " for record [ " ) append ( sample record ) append ( " ] in field [ " ) append ( field name ) append ( " ] " ) ; } explanation add ( " first sample match " + timestamp format finder get raw java timestamp formats ( ) + " ruled out because record [ " + sample record + " ] does not match " ) ; all good = false ; break ; } } if ( all good ) { explanation add ( ( ( overrides get timestamp field ( ) = = null ) ? " guessing timestamp " : " timestamp " ) + " field is [ " + field name + " ] with format " + timestamp format finder get java timestamp formats ( ) ) ; return candidate ; } } if ( exception msg ! = null ) { throw new illegal argument exception ( exception msg to string ( ) ) ; } return null ; }


return the current offset from the start of the file

public long get pos ( ) throws i o exception { return current pos ; }


the package id of this package , in the range [ 0x 0 0 , 0xff ] the id 0x 0 0 is reserved for shared libraries , or when the id is assigned at run - time the id 0x 0 1 is reserved for the ' android ' package ( framework ) the id range [ 0x 0 2 , 0x 7f ) is reserved for auto - assignment to shared libraries at run - time the id 0x 7f is reserved for the application package i ds & gt ; 0x 7f are reserved for the application as well and are treated as feature splits < code > optional uint 3 2 package id = 1 ; < code >

private void set package id ( int value ) { bit field 0 | = 0x 0 0 0 0 0 0 0 1 ; package id = value ; }


returns the { @ link job i d } which is associated with this job


find the relevant compression codec for the codec ' s canonical class name or by codec alias and returns its implemetation class codec aliases are case insensitive the code alias is the short class name ( without the package name ) if the short class name ends with ' codec ' , then there are two aliases for the codec , the complete short class name and the short class name without the ' codec ' ending for example for the ' gzip codec ' codec class name the alias are ' gzip ' and ' gzipcodec '

public class < ? extends compression codec > get codec class by name ( string codec name ) { compression codec codec = get codec by name ( codec name ) ; if ( codec = = null ) { return null ; } return codec get class ( ) ; }


returns true if { @ code a } and { @ code b } are equal

public static boolean equals ( type a , type b ) { if ( a = = b ) { / / also handles ( a = = null & & b = = null ) return true ; } else if ( a instanceof class ) { / / class already specifies equals ( ) return a equals ( b ) ; } else if ( a instanceof parameterized type ) { if ( ! ( b instanceof parameterized type ) ) { return false ; } / / todo : save a clone ( ) call parameterized type pa = ( parameterized type ) a ; parameterized type pb = ( parameterized type ) b ; return objects equals ( pa get owner type ( ) , pb get owner type ( ) ) & & pa get raw type ( ) equals ( pb get raw type ( ) ) & & arrays equals ( pa get actual type arguments ( ) , pb get actual type arguments ( ) ) ; } else if ( a instanceof generic array type ) { if ( ! ( b instanceof generic array type ) ) { return false ; } generic array type ga = ( generic array type ) a ; generic array type gb = ( generic array type ) b ; return equals ( ga get generic component type ( ) , gb get generic component type ( ) ) ; } else if ( a instanceof wildcard type ) { if ( ! ( b instanceof wildcard type ) ) { return false ; } wildcard type wa = ( wildcard type ) a ; wildcard type wb = ( wildcard type ) b ; return arrays equals ( wa get upper bounds ( ) , wb get upper bounds ( ) ) & & arrays equals ( wa get lower bounds ( ) , wb get lower bounds ( ) ) ; } else if ( a instanceof type variable ) { if ( ! ( b instanceof type variable ) ) { return false ; } type variable < ? > va = ( type variable ) a ; type variable < ? > vb = ( type variable ) b ; return va get generic declaration ( ) = = vb get generic declaration ( ) & & va get name ( ) equals ( vb get name ( ) ) ; } else { / / this isn ' t a type we support could be a generic array type , wildcard type , etc return false ; } }


sets the maximum number of query terms that will be included in any generated query defaults to { @ code 25 }

public more like this query builder max query terms ( int max query terms ) { if ( max query terms < = 0 ) { throw new illegal argument exception ( " requires ' max query terms ' to be greater than 0 " ) ; } this max query terms = max query terms ; return this ; }


set the matrix to a rotation matrix between two vectors

public matrix 4 set to rotation ( final vector 3 v 1 , final vector 3 v 2 ) { return set ( quat set from cross ( v 1 , v 2 ) ) ; }


public long get $ special property name ( ) { return $ special property name ; }


gets the string array for the given name

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


disposes this model once a model has been disposed , it cannot be reused

public void dispose ( ) { update manager dispose ( ) ; if ( worker ! = null ) { worker dispose ( ) ; } do clear data ( ) ; dispose dynamic column data ( ) ; }


returns the unix credentials ( uid , gid , pid ) of the peer < a href = https : man 7 orglinuxman - pagesman 7socket 7 html > so peercred

public peer credentials peer credentials ( ) throws i o exception { return socket get peer credentials ( ) ; }


to test enum parameters to test enum parameters

public void test enum parameters ( list < string > enum header string array , string enum header string , list < string > enum query string array , string enum query string , integer enum query integer , double enum query double , list < string > enum form string array , string enum form string , handler < async result < void > > result handler ) { test enum parameters ( enum header string array , enum header string , enum query string array , enum query string , enum query integer , enum query double , enum form string array , enum form string , null , result handler ) ; }


stores the given value at the given variable index

public void store ( int index , value value ) { if ( index < 0 | | index > = size ) { throw new index out of bounds exception ( " variable index [ " + index + " ] out of bounds [ " + size + " ] " ) ; } / / store the value values [ index ] = value ; / / account for the extra space required by category 2 values if ( value is category 2 ( ) ) { values [ index + 1 ] = top value ; } }


unless { @ link # is refused ( ) } is true , this method either returns the newly created item in the queue or the existing item that ' s already in the queue that matched the submitted task

public @ check for null item get item ( ) { return null ; }


compute the arguments the binary should be run with by concatenating the arguments in its { @ code args } attribute and the arguments on the blaze command line

private list < string > compute args ( configured target target to run , list < string > command line args ) throws interrupted exception , command line expansion exception { list < string > args = lists new array list ( ) ; files to run provider provider = target to run get provider ( files to run provider class ) ; runfiles support runfiles support = provider = = null ? null : provider get runfiles support ( ) ; if ( runfiles support ! = null & & runfiles support get args ( ) ! = null ) { command line target args = runfiles support get args ( ) ; iterables add all ( args , target args arguments ( ) ) ; } args add all ( command line args ) ; return args ; }


use { @ link # get initial resource versions map ( ) } instead

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


where the element was defined < code > optional aapt pb source source = 1 ; < code >

public com android aapt resources source get source ( ) { return source = = null ? com android aapt resources source get default instance ( ) : source ; }


instantiate and return the exception wrapped up by this remote exception this unwraps any < code > throwable < code > that has a constructor taking a < code > string < code > as a parameter otherwise it returns this

public i o exception unwrap remote exception ( ) { try { class < ? > real class = class for name ( get class name ( ) ) ; return instantiate exception ( real class as subclass ( i o exception class ) ) ; } catch ( exception e ) { / / cannot instantiate the original exception , just return this } return this ; }


an extra test for parsing dates from xcontent because we can ' t random into { @ link doc value format date time } because it doesn ' t implement { @ link object # equals ( object ) }

public void test from x content dates ( ) throws i o exception { internal top metrics aggregation = create test instance ( random alpha of length ( 3 ) , empty map ( ) , internal top metrics tests : : strict date time ) ; parsed aggregation parsed aggregation = parse and assert ( aggregation , random boolean ( ) , random boolean ( ) ) ; assert from x content ( aggregation , parsed aggregation ) ; }


returns the closest integer to the specified float this method will only properly round floats from - ( 2 ^ 14 ) to ( float max value - 2 ^ 14 )

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


returns the node at or adjacent to the given key , creating it if requested

node < k , v > find ( k key , boolean create ) { comparator < ? super k > comparator = this comparator ; node < k , v > nearest = root ; int comparison = 0 ; if ( nearest ! = null ) { / / micro - optimization : avoid polymorphic calls to comparator compare ( ) @ suppress warnings ( " unchecked " ) / / throws a class cast exception below if there ' s trouble comparable < object > comparable key = ( comparator = = natural order ) ? ( comparable < object > ) key : null ; while ( true ) { comparison = ( comparable key ! = null ) ? comparable key compare to ( nearest key ) : comparator compare ( key , nearest key ) ; / / we found the requested key if ( comparison = = 0 ) { return nearest ; } / / if it exists , the key is in a subtree go deeper node < k , v > child = ( comparison < 0 ) ? nearest left : nearest right ; if ( child = = null ) { break ; } nearest = child ; } } / / the key doesn ' t exist in this tree if ( ! create ) { return null ; } / / create the node and add it to the tree or the table node < k , v > header = this header ; node < k , v > created ; if ( nearest = = null ) { / / check that the value is comparable if we didn ' t do any comparisons if ( comparator = = natural order & & ! ( key instanceof comparable ) ) { throw new class cast exception ( key get class ( ) get name ( ) + " is not comparable " ) ; } created = new node < k , v > ( nearest , key , header , header prev ) ; root = created ; } else { created = new node < k , v > ( nearest , key , header , header prev ) ; if ( comparison < 0 ) { / / nearest key is higher nearest left = created ; } else { / / comparison > 0 , nearest key is lower nearest right = created ; } rebalance ( nearest , true ) ; } size + + ; mod count + + ; return created ; }


format url template using given variables

public string url ( map < string , string > variables ) { string url = this url ; / / go through variables and replace placeholders for ( map entry < string , server variable > variable : this variables entry set ( ) ) { string name = variable get key ( ) ; server variable server variable = variable get value ( ) ; string value = server variable default value ; if ( variables ! = null & & variables contains key ( name ) ) { value = variables get ( name ) ; if ( server variable enum values size ( ) > 0 & & ! server variable enum values contains ( value ) ) { throw new runtime exception ( " the variable " + name + " in the server url has invalid value " + value + " " ) ; } } url = url replace all ( " \ \ { " + name + " \ \ } " , value ) ; } return url ; }


parse the given value into a seconds { @ code bits cron field } , the first entry of a cron expression

public static bits cron field parse seconds ( string value ) { return parse field ( value , type second ) ; }


get the time in nanos passed since a previous time

public static long time since nanos ( long prev time ) { return nano time ( ) - prev time ; }


public void place order test ( ) { order order = null ; / / order response = api place order ( order ) ; / / todo : test validations }


convert the select clause if it contains invalid column names which conflict with s q lite keywords

public static string [ ] convert select clause to valid names ( string [ ] columns ) { if ( columns ! = null & & columns length > 0 ) { string [ ] converted columns = new string [ columns length ] ; for ( int i = 0 ; i < columns length ; i + + ) { converted columns [ i ] = convert to valid column name ( columns [ i ] ) ; } return converted columns ; } return null ; }


check that whether debugging is enabled for this api client

public boolean is debugging ( ) { return debugging ; }


transition the worker to a released state

public worker release worker ( ) { return new worker ( task i d , slave i d , hostname , worker state released ) ; }


same as { @ link span # annotations ( ) } , except each may be associated with { @ link span # local endpoint ( ) }

public list < v 1 annotation > annotations ( ) { return annotations ; }


calculate the node digest and tree digest after the change

private precalculated digest precalculate digest ( digest op code type , string path , byte [ ] data , stat persisted s ) throws keeper exception no node exception { if ( ! digest enabled ) { return null ; } long prev node digest ; long new node digest ; switch ( type ) { case add : prev node digest = 0 ; new node digest = digest calculator calculate digest ( path , data , s ) ; break ; case remove : prev node digest = get record for path ( path ) precalculated digest node digest ; new node digest = 0 ; break ; case update : prev node digest = get record for path ( path ) precalculated digest node digest ; new node digest = digest calculator calculate digest ( path , data , s ) ; break ; case noop : new node digest = prev node digest = 0 ; break ; default : return null ; } long tree digest = get current tree digest ( ) - prev node digest + new node digest ; return new precalculated digest ( new node digest , tree digest ) ; }


returns whether this data descriptor has the optional signature

public final boolean has marker ( ) { return has marker ; }


void do checkpoint ( ) throws i o exception { backup image bn image = get f s image ( ) ; n n storage bn storage = bn image get storage ( ) ; long start time = monotonic now ( ) ; bn image freeze namespace at next roll ( ) ; namenode command cmd = get remote namenode proxy ( ) start checkpoint ( backup node get registration ( ) ) ; checkpoint command cp cmd = null ; switch ( cmd get action ( ) ) { case namenode protocol act shutdown : shutdown ( ) ; throw new i o exception ( " name - node " + backup node nn rpc address + " requested shutdown " ) ; case namenode protocol act checkpoint : cp cmd = ( checkpoint command ) cmd ; break ; default : throw new i o exception ( " unsupported namenode command : " + cmd get action ( ) ) ; } bn image wait until namespace frozen ( ) ; checkpoint signature sig = cp cmd get signature ( ) ; / / make sure we ' re talking to the same nn ! sig validate storage info ( bn image ) ; long last applied = bn image get last applied tx id ( ) ; log debug ( " doing checkpoint last applied : " + last applied ) ; remote edit log manifest manifest = get remote namenode proxy ( ) get edit log manifest ( bn image get last applied tx id ( ) + 1 ) ; boolean need reload image = false ; if ( ! manifest get logs ( ) is empty ( ) ) { remote edit log first remote log = manifest get logs ( ) get ( 0 ) ; / / we don ' t have enough logs to roll forward using only logs need / / to download and load the image if ( first remote log get start tx id ( ) > last applied + 1 ) { log info ( " unable to roll forward using only logs downloading " + " image with txid " + sig most recent checkpoint tx id ) ; m d 5 hash downloaded hash = transfer fs image download image to storage ( backup node nn http address , sig most recent checkpoint tx id , bn storage , true , false ) ; bn image save digest and rename checkpoint image ( name node file image , sig most recent checkpoint tx id , downloaded hash ) ; last applied = sig most recent checkpoint tx id ; need reload image = true ; } if ( first remote log get start tx id ( ) > last applied + 1 ) { throw new i o exception ( " no logs to roll forward from " + last applied ) ; } / / get edits files for ( remote edit log log : manifest get logs ( ) ) { transfer fs image download edits to storage ( backup node nn http address , log , bn storage ) ; } if ( need reload image ) { log info ( " loading image with txid " + sig most recent checkpoint tx id ) ; file file = bn storage find image file ( name node file image , sig most recent checkpoint tx id ) ; bn image reload from image file ( file , backup node get namesystem ( ) ) ; } roll forward by applying logs ( manifest , bn image , backup node get namesystem ( ) ) ; } long txid = bn image get last applied tx id ( ) ; backup node namesystem write lock ( ) ; try { backup node namesystem set image loaded ( ) ; if ( backup node namesystem get blocks total ( ) > 0 ) { long complete blocks total = backup node namesystem get complete blocks total ( ) ; backup node namesystem get block manager ( ) set block total ( complete blocks total ) ; } bn image save f s image in all dirs ( backup node get namesystem ( ) , txid ) ; if ( ! backup node namenode is rolling upgrade ( ) ) { bn image update storage version ( ) ; } } finally { backup node namesystem write unlock ( " do checkpoint " ) ; } if ( cp cmd need to return image ( ) ) { transfer fs image upload image from storage ( backup node nn http address , conf , bn storage , name node file image , txid ) ; } get remote namenode proxy ( ) end checkpoint ( backup node get registration ( ) , sig ) ; if ( backup node get role ( ) = = namenode role backup ) { bn image converge journal spool ( ) ; } backup node set registration ( ) ; / / keep registration up to date long image size = bn image get storage ( ) get fs image name ( txid ) length ( ) ; log info ( " checkpoint completed in " + ( monotonic now ( ) - start time ) / 1000 + " seconds " + " new image size : " + image size ) ; }


returns the generic supertype for { @ code supertype } for example , given a class { @ code integer set } , the result for when supertype is { @ code set class } is { @ code set < integer > } and the result when the supertype is { @ code collection class } is { @ code collection < integer > }

static type get generic supertype ( type context , class < ? > raw type , class < ? > to resolve ) { if ( to resolve = = raw type ) return context ; / / we skip searching through interfaces if unknown is an interface if ( to resolve is interface ( ) ) { class < ? > [ ] interfaces = raw type get interfaces ( ) ; for ( int i = 0 , length = interfaces length ; i < length ; i + + ) { if ( interfaces [ i ] = = to resolve ) { return raw type get generic interfaces ( ) [ i ] ; } else if ( to resolve is assignable from ( interfaces [ i ] ) ) { return get generic supertype ( raw type get generic interfaces ( ) [ i ] , interfaces [ i ] , to resolve ) ; } } } / / check our supertypes if ( ! raw type is interface ( ) ) { while ( raw type ! = object class ) { class < ? > raw supertype = raw type get superclass ( ) ; if ( raw supertype = = to resolve ) { return raw type get generic superclass ( ) ; } else if ( to resolve is assignable from ( raw supertype ) ) { return get generic supertype ( raw type get generic superclass ( ) , raw supertype , to resolve ) ; } raw type = raw supertype ; } } / / we can ' t resolve this further return to resolve ; }


public long get renew date ( ) { return renew date ; }


private static m t themeable get active theme ( ) { return m t config get instance ( ) get selected theme ( ) get theme ( ) ; }


sets the offset for query results in combination with { @ link # limit ( int ) } the first { @ code offset } results are skipped and the total number of results will be limited by { @ code limit } you cannot use offset without limit

public query builder < t > offset ( int offset ) { this offset = offset ; return this ; }


matches a component host which is displaying text that matches { @ code text matcher }

public static matcher < view > component host with text ( final matcher < string > text matcher ) { return component host ( with text ( text matcher ) ) ; }


checks for ( and rejects ) chains of delegation in the provided realms a chain occurs when " realm a " delegates authorization to " realm b " , and realm b also delegates authorization ( to any realm ) since " realm b " does not handle its own authorization , it is not a valid target for delegated authorization

private void check for realm chains ( iterable < realm > delegated realms , settings global settings ) { for ( realm realm : delegated realms ) { setting < list < string > > realm authz setting = authz realms apply ( realm type ( ) ) get concrete setting for namespace ( realm name ( ) ) ; if ( realm authz setting exists ( global settings ) ) { throw new illegal argument exception ( " cannot use realm [ " + realm + " ] as an authorization realm - it is already delegating authorization to [ " + realm authz setting get ( global settings ) + " ] " ) ; } } }


return true if the given code unit follows directly after this code unit

public boolean is successor ( code unit code unit ) { address min = code unit get min address ( ) ; return this get max address ( ) is successor ( min ) ; }


returns datanode storages which has the given storage type

private list < storage details > get nodes with storages ( storage type type ) { return storage map get ( type ) ; }


declare that create operator will not be called any more for the specified lifespan , and release any resources associated with this factory this method will be called only once for each lifespan implementation doesn ' t need to worry about duplicate invocations it is guaranteed that this method will be invoked for all applicable driver groups before { @ link # no more operators ( ) } is invoked

default void no more operators ( lifespan lifespan ) { / / do nothing }


runs the given python script with the given initial state

private string run python script ( resource file script file , ghidra state state ) throws exception { run swing ( ( ) - > console clear messages ( ) ) ; python script provider script provider = new python script provider ( ) ; print writer writer = new print writer ( new byte array output stream ( ) ) ; python script script = ( python script ) script provider get script instance ( script file , writer ) ; script set ( state , task monitor dummy , writer ) ; script run ( ) ; atomic reference < string > ref = new atomic reference < > ( ) ; run swing ( ( ) - > { string text = console get text ( 0 , console get text length ( ) ) ; ref set ( text ) ; } ) ; string text = ref get ( ) ; return text ; }


set the default merge setting for the document that ' s currently parsed

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


create a builder with an { @ linkplain http status # accepted 202 accepted } status

static body builder accepted ( ) { return status ( http status accepted ) ; }


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


final protected j panel build main panel ( ) { j panel inner = new j panel ( ) ; grid bag layout gl = new grid bag layout ( ) ; inner set layout ( gl ) ; grid bag constraints gbc = new grid bag constraints ( ) ; gbc fill = grid bag constraints both ; gbc anchor = grid bag constraints west ; gbc weightx = 1 ; gbc gridwidth = 2 ; gbc insets = new insets ( 5 , 5 , 5 , 5 ) ; hyperlink = new hyperlink component ( " < html > enter an address , label or " + " < a href = \ " " + anchor name + " \ " > expression < / a > : & nbsp ; & nbsp ; & nbsp ; & nbsp ; & nbsp ; & nbsp ; & nbsp ; " ) ; docking window manager set help location ( hyperlink , new help location ( help topics navigation , " gotoexpression " ) ) ; hyperlink add hyperlink listener ( anchor name , new hyperlink listener ( ) { @ override public void hyperlink update ( hyperlink event e ) { if ( e get event type ( ) ! = hyperlink event event type activated ) { return ; } show expression help ( ) ; } } ) ; inner add ( hyperlink ) ; inner add ( hyperlink , gbc ) ; combo box = new ghidra combo box < > ( ) ; combo box set editable ( true ) ; combo box add action listener ( new action listener ( ) { @ override public void action performed ( action event e ) { ok callback ( ) ; } } ) ; gbc insets = new insets ( 2 , 5 , 2 , 0 ) ; gbc gridx = 0 ; gbc gridy = 1 ; gbc gridwidth = 2 ; inner add ( combo box , gbc ) ; case sensitive box = new g check box ( " case sensitive " , false ) ; gbc gridy = 2 ; gbc gridwidth = 1 ; inner add ( case sensitive box , gbc ) ; include dynamic box = new g check box ( " dynamic labels " , true ) ; include dynamic box set tool tip text ( " include dynamic lables in the search ( slower ) " ) ; gbc gridx = 1 ; inner add ( include dynamic box , gbc ) ; main panel = new j panel ( new border layout ( ) ) ; border empty border = border factory create empty border ( 5 , 5 , 0 , 5 ) ; main panel set border ( empty border ) ; main panel add ( inner , border layout north ) ; return main panel ; }


check if the current register value and word offset are off by just the low - bit

private boolean check off by one ( register reg , long word offset ) { if ( reg = = null ) { return false ; } big integer val = context get value ( reg , false ) ; if ( val = = null ) { return false ; } long lval = val long value ( ) & pointer mask ; return ( lval = = word offset | | ( lval ^ word offset ) = = 1 ) ; }


compares two char sequences , returning { @ code true } if they represent equal sequences of characters { @ code null } s are handled without exceptions two { @ code null } references are considered to be equal the comparison is case sensitive string utils equals ( null , null ) = true string utils equals ( null , " abc " ) = false string utils equals ( " abc " , null ) = false string utils equals ( " abc " , " abc " ) = true string utils equals ( " abc " , " abc " ) = false

public static boolean equals ( final char sequence cs 1 , final char sequence cs 2 ) { if ( cs 1 = = cs 2 ) { return true ; } if ( cs 1 = = null | | cs 2 = = null ) { return false ; } if ( cs 1 instanceof string & & cs 2 instanceof string ) { return cs 1 equals ( cs 2 ) ; } return string utils region matches ( cs 1 , false , 0 , cs 2 , 0 , math max ( cs 1 length ( ) , cs 2 length ( ) ) ) ; }


executes the latency benchmark with the given number of records

public void execute benchmark ( long records , boolean flush after last emit ) throws exception { final long value value = new long value ( ) ; value set value ( 0 ) ; completable future < ? > records received = receiver set expected record ( records ) ; for ( int i = 1 ; i < records ; i + + ) { record writer emit ( value ) ; } value set value ( records ) ; record writer broadcast emit ( value ) ; if ( flush after last emit ) { record writer flush all ( ) ; } records received get ( receiver timeout , time unit milliseconds ) ; }


compute the value of an expression given a ( possibly - intermediate ) resolution

public masked long value for resolution ( pattern expression exp , assembly resolved constructor rc ) { return get registered ( exp get class ( ) ) value for resolution ( exp , rc ) ; }


get the resource owner for this { @ link http resource }

public string get resource owner name ( ) { return resource owner name ; }


parse a string into a consumer group state

public static consumer group state parse ( string name ) { consumer group state state = name to enum get ( name ) ; return state = = null ? unknown : state ; }


to test the collection format in query parameters

public void test query parameter collection format test ( ) { list < string > pipe = null ; list < string > ioutil = null ; list < string > http = null ; list < string > url = null ; list < string > context = null ; api test query parameter collection format ( pipe , ioutil , http , url , context ) ; / / todo : test validations }


creates a new { @ code hash multiset } containing the specified elements this implementation is highly efficient when { @ code elements } is itself a { @ link multiset }

public static < e > hash multiset < e > create ( iterable < ? extends e > elements ) { hash multiset < e > multiset = create ( multisets infer distinct elements ( elements ) ) ; iterables add all ( multiset , elements ) ; return multiset ; }


get the instance of the held job manager

public job manager get job manager ( ) { if ( instance = = null ) { throw new elasticsearch exception ( " tried to get job manager although machine learning is disabled " ) ; } return instance ; }


determine whether the given class has a public method with the given signature essentially translates { @ code no such method exception } to " false "

public static boolean has method ( class < ? > clazz , string method name , class < ? > param types ) { return ( get method if available ( clazz , method name , param types ) ! = null ) ; }


delegate to the parent implementation for creating the test instance and then allow the { @ link # get test context manager ( ) test context manager } to prepare the test instance before returning it

protected object create test ( ) throws exception { object test instance = super create test ( ) ; get test context manager ( ) prepare test instance ( test instance ) ; return test instance ; }


get the full path to a relative template file

public string get full template path ( string relative template file ) { return paths get ( " templating " , " templates " , relative template file ) to string ( ) ; }


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


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


the set of attribute declarations < code > repeated aapt pb styleable entry entry = 1 ; < code >

private void add entry ( int index , com android aapt resources styleable entry value ) { if ( value = = null ) { throw new null pointer exception ( ) ; } ensure entry is mutable ( ) ; entry add ( index , value ) ; }


load the created list in a directory diff

private list < i node > load created list ( input stream in , i node directory dir , int size ) throws i o exception { list < i node > clist = new array list < i node > ( size ) ; for ( long c = 0 ; c < size ; c + + ) { created list entry entry = created list entry parse delimited from ( in ) ; i node created = snapshot f s image format load created ( entry get name ( ) to byte array ( ) , dir ) ; clist add ( created ) ; } return clist ; }


path to an externalembedded script that allows for triggering of mfa


returns the { @ link image section header } line numbers pointer

public long get line numbers pointer ( ) { return line numbers pointer ; }


returns a spawn action that takes input tree file artifact as input and generates output tree file artifact

private spawn action create action ( tree file artifact input tree file artifact , tree file artifact output tree file artifact ) { spawn action builder action builder = new spawn action builder ( spawn action builder ) ; action builder add input ( input tree file artifact ) ; action builder add output ( output tree file artifact ) ; command line command line = command line template evaluate tree file artifacts ( immutable list of ( input tree file artifact , output tree file artifact ) ) ; action builder add command line ( command line ) ; / / note that we pass in nulls below because spawn action template does not support param file , and / / it does not use any default value for executable or shell environment they must be set / / explicitly via builder method # set executable and # set environment return action builder build for action template ( get owner ( ) ) ; }


return whether the charset of file is utf 8

public static boolean is utf 8 ( final string file path ) { return is utf 8 ( get file by path ( file path ) ) ; }


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


convert the value from one storage unit to another

private double convert storage unit ( double value , storage unit source unit , storage unit target unit ) { double byte value = source unit to bytes ( value ) ; return target unit from bytes ( byte value ) ; }


this match method will go through all the provided matchers and call their match method , if any of them match we return true

public boolean match ( variable context variables ) { for ( mapping rule matcher matcher : matchers ) { if ( matcher match ( variables ) ) { return true ; } } return false ; }


retrieves the payload value for the next heartbeat message

o retrieve payload ( resource i d resource i d ) ;


perform the given callback operation on all matching methods of the given class and superclasses the same named method occurring on subclass and superclass will appear twice , unless excluded by a { @ link method filter }

public static void do with methods ( class < ? > clazz , method callback mc ) { do with methods ( clazz , mc , null ) ; }


returns true if the toolchain defines an artifact name pattern for the given category

boolean has pattern for artifact category ( artifact category artifact category ) { for ( artifact name pattern artifact name pattern : artifact name patterns ) { if ( artifact name pattern get artifact category ( ) = = artifact category ) { return true ; } } return false ; }


process all of the keys and values start up the application if we haven ' t started it yet

public void reduce ( k2 key , iterator < v2 > values , output collector < k3 , v3 > output , reporter reporter ) throws i o exception { is ok = false ; start application ( output , reporter ) ; downlink reduce key ( key ) ; while ( values has next ( ) ) { downlink reduce value ( values next ( ) ) ; } if ( skipping ) { / / flush the streams on every record input if running in skip mode / / so that we don ' t buffer other records surrounding a bad record downlink flush ( ) ; } is ok = true ; }


return the arguments for the method invocation

public object [ ] get arguments ( ) { return ( this arguments ! = null ? this arguments : empty arguments ) ; }


returns a static library archive with dead codeobjects removed by j 2 obj c dead code removal , given the original unpruned static library containing j 2 obj c - translated code

public artifact j 2objc pruned archive ( artifact unpruned archive ) { path fragment pruned source artifact path = file system utils append without extension ( unpruned archive get root relative path ( ) , " pruned " ) ; return rule context get unique directory artifact ( " j 2objc pruned " , pruned source artifact path , build configuration get bin directory ( rule context get rule ( ) get repository ( ) ) ) ; }


tests that an expired execution graph is removed from the execution graph store

public void test execution graph expiration ( ) throws exception { final file root dir = temporary folder new folder ( ) ; final time expiration time = time milliseconds ( 1l ) ; final manually triggered scheduled executor scheduled executor = new manually triggered scheduled executor ( ) ; final manual ticker manual ticker = new manual ticker ( ) ; try ( final file archived execution graph store execution graph store = new file archived execution graph store ( root dir , expiration time , integer max value , 10000l , scheduled executor , manual ticker ) ) { final archived execution graph execution graph = new archived execution graph builder ( ) set state ( job status finished ) build ( ) ; execution graph store put ( execution graph ) ; / / there should one execution graph assert that ( execution graph store size ( ) , matchers equal to ( 1 ) ) ; manual ticker advance time ( expiration time to milliseconds ( ) , time unit milliseconds ) ; / / this should trigger the cleanup after expiration scheduled executor trigger scheduled tasks ( ) ; assert that ( execution graph store size ( ) , matchers equal to ( 0 ) ) ; assert that ( execution graph store get ( execution graph get job i d ( ) ) , matchers null value ( ) ) ; final file storage directory = execution graph store get storage dir ( ) ; / / check that the persisted file has been deleted assert that ( storage directory list files ( ) length , matchers equal to ( 0 ) ) ; } }


expands the size of the control by 1 pixel in each direction

public void relocate ( cell editor celleditor ) { border border = figure get border ( ) ; / / insets insets = border get insets ( figure ) ; dimension border size = border get preferred size ( figure ) ; text text = ( text ) celleditor get control ( ) ; rectangle rect = figure get bounds ( ) get copy ( ) ; figure translate to absolute ( rect ) ; text set background ( figure get background color ( ) ) ; text set bounds ( rect x + border size width , rect y + border size height , rect width - border size width * 2 , rect height - border size height * 2 ) ; }


returns the necessary parameters array to use for query in parallel a table

serializable [ ] [ ] get parameter values ( ) ;


creates a new random event this method randomly pick either one of its currently running state machines , or start a new state machine for a random ip address with { @ link # error prob } probability , the generated event will be from an illegal state transition of one of the currently running state machines

public event next ( int min ip , int max ip ) { final double p = rnd next double ( ) ; if ( p * 1000 > = states size ( ) ) { / / create a new state machine final int next i p = rnd next int ( max ip - min ip ) + min ip ; if ( ! states contains key ( next i p ) ) { event type and state event and state = state initial random transition ( rnd ) ; states put ( next i p , event and state state ) ; return new event ( event and state event type , next i p ) ; } else { / / collision on ip address , try again return next ( min ip , max ip ) ; } } else { / / pick an existing state machine / / skip over some elements in the linked map , then take the next / / update it , and insert it at the end int num to skip = math min ( 20 , rnd next int ( states size ( ) ) ) ; iterator < entry < integer , state > > iter = states entry set ( ) iterator ( ) ; for ( int i = num to skip ; i > 0 ; - - i ) { iter next ( ) ; } entry < integer , state > entry = iter next ( ) ; state current state = entry get value ( ) ; int address = entry get key ( ) ; iter remove ( ) ; if ( p < error prob ) { event type event = current state random invalid transition ( rnd ) ; return new event ( event , address ) ; } else { event type and state event and state = current state random transition ( rnd ) ; if ( ! event and state state is terminal ( ) ) { / / reinsert states put ( address , event and state state ) ; } return new event ( event and state event type , address ) ; } } }


set the name to use for the join processor and the repartition topic ( s ) if required

public stream joined < k , v1 , v2 > with name ( final string name ) { return new stream joined < > ( key serde , value serde , other value serde , this store supplier , other store supplier , name , store name , logging enabled , topic config ) ; }


determine if additional instruction sets may be produced if true is returned , this queue will be ready to produce instruction set blocks

boolean continue producing instruction sets ( task monitor monitor ) { current branch queue clear ( ) ; processed branch flows clear ( ) ; last block = null ; last block addr = null ; last flow from = null ; if ( monitor ! = null & & monitor is cancelled ( ) ) { return false ; } if ( ! priority queue is empty ( ) ) { return true ; } if ( ordered seed queue is empty ( ) ) { return false ; } instruction block flow flow = ordered seed queue first ( ) ; ordered seed queue remove ( flow ) ; priority queue add ( flow ) ; return true ; }


convert the given hibernate exception to an appropriate exception from the { @ code org springframework dao } hierarchy will automatically apply a specified s q l exception translator to a hibernate j d b c exception , otherwise rely on hibernate ' s default translation

protected data access exception convert hibernate access exception ( hibernate exception ex ) { if ( this jdbc exception translator ! = null & & ex instanceof j d b c exception ) { j d b c exception jdbc ex = ( j d b c exception ) ex ; data access exception dae = this jdbc exception translator translate ( " hibernate operation : " + jdbc ex get message ( ) , jdbc ex get s q l ( ) , jdbc ex get s q l exception ( ) ) ; if ( dae ! = null ) { throw dae ; } } return session factory utils convert hibernate access exception ( ex ) ; }


low - level access to decoding ascii characters in the form of a byte array ignores gunzip option , if it ' s set this is not generally a recommended method , although it is used internally as part of the decoding process special case : if len = 0 , an empty array is returned still , if you need more speed and reduced memory footprint ( and aren ' t gzipping ) , consider this method

public static byte [ ] decode ( byte [ ] source ) { byte [ ] decoded = null ; try { decoded = decode ( source , 0 , source length , base 6 4 no options ) ; } catch ( java io i o exception ex ) { assert false : " i o exceptions only come from g zipping , which is turned off : " + ex get message ( ) ; } return decoded ; }


a shortcut for { @ code bind to ( async rest template ) build ( ) }

public static mock rest service server create server ( org springframework web client async rest template async rest template ) { return bind to ( async rest template ) build ( ) ; }


call to check if the query is cancelled or timed - out if so a { @ link runtime exception } is thrown


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


the real dialog cancel ( ) will be invoked async - ly after the animation finishes

public void cancel ( ) { dismiss with animation ( true ) ; }


returns the application root directory an application root directory is a directory containing one or more modules in development mode there may be multiple application root directories , which can be retrieved via { @ link # get application root directories ( ) } in an installation of the application , there will only be one application root directory < b > note : be sure you understand that there may be multiple application root directories in development mode < b > in general you should not be using this method for searching for files yourself , but instead using the various < code > find < code > methods of this class

public static resource file get application root directory ( ) { check app initialized ( ) ; return app layout get application root dirs ( ) iterator ( ) next ( ) ; }


trigger a new checkpoint on the task of this execution

public void trigger synchronous savepoint ( long checkpoint id , long timestamp , checkpoint options checkpoint options , boolean advance to end of event time ) { trigger checkpoint helper ( checkpoint id , timestamp , checkpoint options , advance to end of event time ) ; }


create a new { @ link decompressor } for use by this { @ link compression codec }

public decompressor create decompressor ( ) { check native code loaded ( ) ; return new z standard decompressor ( get decompression buffer size ( conf ) ) ; }


public void write ( long [ ] data ) { for ( long l : data ) { write long ( l ) ; } }


attempt to identify variable varnodes which correspond to this variable reference

private varnode [ ] get varnodes ( variable offset var offset ) { if ( var offset is indirect ( ) ) { return null ; } boolean data access = var offset is data access ( ) ; variable variable = var offset get variable ( ) ; long offset = var offset get offset ( ) ; long abs offset = offset < 0 ? - offset : offset ; if ( abs offset > integer max value ) { return null ; } variable storage variable storage = variable get variable storage ( ) ; if ( variable storage size ( ) < = 0 ) { return null ; / / invalid storage } data type dt = variable get data type ( ) ; int varnode offset = 0 ; int varnode size = 0 ; if ( dt instanceof type def ) { dt = ( ( type def ) dt ) get base data type ( ) ; } int int off = ( int ) abs offset ; while ( int off > 0 | | ( data access & & int off = = 0 ) ) { if ( dt instanceof type def ) { dt = ( ( type def ) dt ) get base data type ( ) ; } if ( dt instanceof structure ) { data type component cdt = ( ( structure ) dt ) get component at ( int off ) ; if ( cdt = = null ) { break ; } varnode offset + = cdt get offset ( ) ; int off - = cdt get offset ( ) ; dt = cdt get data type ( ) ; } else { / / primitives , unions and arrays are treated as single varnode break ; } } varnode size = dt get length ( ) ; if ( varnode size < = 0 | | int off > varnode size ) { return null ; } varnode size - = int off ; varnode offset + = int off ; list < varnode > varnodes = new array list < varnode > ( ) ; for ( varnode v : variable storage get varnodes ( ) ) { if ( varnode offset > = v get size ( ) ) { varnode offset - = v get size ( ) ; continue ; } int size = math min ( v get size ( ) , varnode size ) ; varnode size - = size ; varnodes add ( new varnode ( v get address ( ) add ( varnode offset ) , size ) ) ; if ( varnode size = = 0 ) { break ; } varnode offset = 0 ; } return varnodes to array ( new varnode [ varnodes size ( ) ] ) ; }


pick a good estimate of the buffer size needed to contain the rows

int estimate size ( int rows ) { / * each column has either a ' | ' or a ' \ n ' after it * so initialize size to number of columns then add * up the actual widths of each column * / int row width estimate = width length ; for ( int w : width ) { row width estimate + = w ; } return row width estimate * rows ; }


forcibly terminates the currently running java virtual machine

public static void halt ( int status , throwable t ) throws halt exception { if ( t instanceof halt exception ) { halt ( ( halt exception ) t ) ; } else { halt ( new halt exception ( status , t ) ) ; } }


registers a relational expression and the relational expression it became after decorrelation

frame register ( rel node rel , rel node new rel , map < integer , integer > old to new outputs , sorted map < cor def , integer > cor def outputs ) { final frame frame = new frame ( rel , new rel , cor def outputs , old to new outputs ) ; map put ( rel , frame ) ; return frame ; }


get { @ link entry type } of this wrapper

public entry type get entry type ( ) { return entry type ; }


enter a parse tree produced by { @ link eql base parser # join term }

void enter join term ( eql base parser join term context ctx ) ;


this is called up - front providing the actual low level { @ link async sender } that performs the low level send request the returned sender is used to send all requests that come in via { @ link transport service # send request ( discovery node , string , transport request , transport response handler ) } or { @ link transport service # send request ( discovery node , string , transport request , transport request options , transport response handler ) } this allows plugins to perform actions on each send request including modifying the request context etc

default async sender intercept sender ( async sender sender ) { return sender ; }


test inline additional properties < b > 200 < b > - successful operation

public mono < void > test inline additional properties ( map < string , string > param ) throws web client response exception { object post body = param ; / / verify the required parameter ' param ' is set if ( param = = null ) { throw new web client response exception ( " missing the required parameter ' param ' when calling test inline additional properties " , http status bad request value ( ) , http status bad request get reason phrase ( ) , null , null , null ) ; } / / create path and map variables final map < string , object > path params = new hash map < string , object > ( ) ; 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 [ ] local var content types = { " application / json " } ; final media type local var content type = api client select header content type ( local var content types ) ; string [ ] local var auth names = new string [ ] { } ; parameterized type reference < void > local var return type = new parameterized type reference < void > ( ) { } ; return api client invoke a p i ( " / fake / inline - additional properties " , http method post , path params , query params , post body , header params , cookie params , form params , local var accept , local var content type , local var auth names , local var return type ) ; }


public static long aggregate gauges ( long l , long r ) { return l + r ; }


exclusive buffer is recycled to this channel manager directly and it may trigger return extra floating buffer based on < tt > num required buffers < tt >

public void recycle ( memory segment segment ) { int num added buffers = 0 ; synchronized ( buffer queue ) { try { / / similar to notify buffer available ( ) , make sure that we never add a buffer / / after channel released all buffers via release all resources ( ) if ( input channel is released ( ) ) { global pool recycle memory segments ( collections singleton list ( segment ) ) ; } else { num added buffers = buffer queue add exclusive buffer ( new network buffer ( segment , this ) , num required buffers ) ; } } catch ( throwable t ) { exception utils rethrow ( t ) ; } finally { buffer queue notify all ( ) ; } } try { input channel notify buffer available ( num added buffers ) ; } catch ( throwable t ) { exception utils rethrow ( t ) ; } }


this unit test case ensures that { @ link file region encoder } indeed wraps { @ link file region } to { @ link byte buf }

public void test encode ( ) throws i o exception { file region encoder file region encoder = new file region encoder ( ) ; embedded channel channel = new embedded channel ( file region encoder ) ; file file = file create temp file ( uuid random u u i d ( ) to string ( ) , " data " ) ; file delete on exit ( ) ; random random = new random ( system current time millis ( ) ) ; int data length = 1 < < 10 ; byte [ ] data = new byte [ data length ] ; random next bytes ( data ) ; write ( file , data ) ; file region file region = new default file region ( file , 0 , data length ) ; assert assert equals ( 0 , file region transfered ( ) ) ; assert assert equals ( data length , file region count ( ) ) ; assert assert true ( channel write outbound ( file region ) ) ; byte buf out = ( byte buf ) channel read outbound ( ) ; byte [ ] arr = new byte [ out readable bytes ( ) ] ; out get bytes ( 0 , arr ) ; assert assert array equals ( " data should be identical " , data , arr ) ; }


if { @ code status code } is non - null , it will be used instead of the http 2 error code mapping

private status status from h 2 error ( status code status code , string context , long error code , byte [ ] debug data ) { status status = grpc util http 2 error status for code ( ( int ) error code ) ; if ( status code = = null ) { status code = status get code ( ) ; } string debug string = " " ; if ( debug data ! = null & & debug data length > 0 ) { / / if a debug message was provided , use it debug string = " , debug data : " + new string ( debug data , utf 8 ) ; } return status code to status ( ) with description ( context + " " + status get description ( ) + debug string ) ; }


returns true if field corresponding to field i d is set ( has been assigned a value ) and false otherwise

public boolean is set ( fields field ) { if ( field = = null ) { throw new illegal argument exception ( ) ; } switch ( field ) { case msg : return is set msg ( ) ; } throw new illegal state exception ( ) ; }


< code > optional bytes msg = 7 ; < code >

public com google protobuf byte string get msg ( ) { return msg ; }


asynchronous version of { @ link abstract dao # delete in tx ( iterable ) }

public < e > async operation delete in tx ( class < e > entity class , iterable < e > entities ) { return delete in tx ( entity class , entities , 0 ) ; }


@ check for null string owner of ( class < ? > clazz ) ;


return whether to reject cookies with invalid content ( e g invalid format )

public boolean is reject invalid cookies ( ) { return this reject invalid cookies ; }


gets the program ' s memory buffer for this model based on the model ' s address

protected final mem buffer get mem buffer ( ) { return mem buffer ; }


makes a blocking rpc call that publishes a { @ code lifecycle event }

void publish ( publish lifecycle event request lifecycle event ) throws status exception , interrupted exception ;


tests if the data at the given address is open

public boolean is open ( address address ) { return is open ( address , null ) ; }


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


indicates there is another installation job for this plugin

protected boolean was installed ( ) { synchronized ( update center this ) { for ( update center job job : get jobs ( ) ) { if ( job = = this ) { / / oldest entries first , if we reach this instance , / / we need it to continue installing return false ; } if ( job instanceof installation job ) { installation job ij = ( installation job ) job ; if ( ij plugin equals ( plugin ) & & ij plugin version equals ( plugin version ) ) { / / wait until other install is completed synchronized ( ij ) { if ( ij status instanceof installing | | ij status instanceof pending ) { try { logger fine ( " waiting for other plugin install of : " + plugin get display name ( ) + " @ " + plugin version ) ; ij wait ( ) ; } catch ( interrupted exception e ) { throw new runtime exception ( e ) ; } } / / must check for success , otherwise may have failed installation if ( ij status instanceof success ) { return true ; } } } } } return false ; } }


public static void update dex statistics ( dalv code non opt code , dalv code code ) { if ( debug ) { system err println ( " dex insns ( old / new ) " + non opt code get insns ( ) code size ( ) + " / " + code get insns ( ) code size ( ) + " regs ( o / n ) " + non opt code get insns ( ) get registers size ( ) + " / " + code get insns ( ) get registers size ( ) ) ; } dex running delta insns + = ( code get insns ( ) code size ( ) - non opt code get insns ( ) code size ( ) ) ; dex running delta registers + = ( code get insns ( ) get registers size ( ) - non opt code get insns ( ) get registers size ( ) ) ; dex running total insns + = code get insns ( ) code size ( ) ; }


logs the duration of the asynchronous snapshot part from the given start time

public void log async completed ( @ nonnull object checkpoint out description , long start time ) { log completed internal ( log async completed template , checkpoint out description , start time ) ; }


static void terminate bits ( int num data bytes , bit array bits ) throws writer exception { int capacity = num data bytes * 8 ; if ( bits get size ( ) > capacity ) { throw new writer exception ( " data bits cannot fit in the qr code " + bits get size ( ) + " > " + capacity ) ; } for ( int i = 0 ; i < 4 & & bits get size ( ) < capacity ; + + i ) { bits append bit ( false ) ; } / / append termination bits see 8 4 8 of jisx0510 : 2004 ( p 24 ) for details / / if the last byte isn ' t 8 - bit aligned , we ' ll add padding bits int num bits in last byte = bits get size ( ) & 0x 0 7 ; if ( num bits in last byte > 0 ) { for ( int i = num bits in last byte ; i < 8 ; i + + ) { bits append bit ( false ) ; } } / / if we have more space , we ' ll fill the space with padding patterns defined in 8 4 9 ( p 24 ) int num padding bytes = num data bytes - bits get size in bytes ( ) ; for ( int i = 0 ; i < num padding bytes ; + + i ) { bits append bits ( ( i & 0x 0 1 ) = = 0 ? 0x e c : 0x 1 1 , 8 ) ; } if ( bits get size ( ) ! = capacity ) { throw new writer exception ( " bits size does not equal capacity " ) ; } }


checks if the user can access a path the mode specifies which access checks to perform if the requested permissions are granted , then the method returns normally if access is denied , then the method throws an { @ link access control exception } the default implementation of this method calls { @ link # get file status ( path ) } and checks the returned permissions against the requested permissions note that the get file status call will be subject to authorization checks typically , this requires search ( execute ) permissions on each directory in the path ' s prefix , but this is implementation - defined any file system that provides a richer authorization model ( such as a c ls ) may override the default implementation so that it checks against that model instead in general , applications should avoid using this method , due to the risk of time - of - checktime - of - use race conditions the permissions on a file may change immediately after the access call returns most applications should prefer running specific file system actions as the desired user represented by a { @ link user group information }

public void access ( final path path , final fs action mode ) throws access control exception , file not found exception , unsupported file system exception , i o exception { final path abs path = fix relative part ( path ) ; new f s link resolver < void > ( ) { @ override public void next ( abstract file system fs , path p ) throws i o exception , unresolved link exception { fs access ( p , mode ) ; return null ; } } resolve ( this , abs path ) ; }


set a view object to be used by the dispatcher servlet will override any pre - existing view name or view

public void set view ( @ nullable object view ) { this view = view ; }


make sure that a request using a deterministic script or not using a script get cached ensure requests using nondeterministic scripts do not get cached

public void test script caching ( ) throws exception { assert acked ( prepare create ( " cache test idx " ) set mapping ( " i " , " type = integer " ) set settings ( settings builder ( ) put ( " requests cache enable " , true ) put ( " number of shards " , 1 ) put ( " number of replicas " , 1 ) ) get ( ) ) ; index random ( true , client ( ) prepare index ( " cache test idx " ) set id ( " 1 " ) set source ( json builder ( ) start object ( ) field ( " i " , 1 ) end object ( ) ) , client ( ) prepare index ( " cache test idx " ) set id ( " 2 " ) set source ( json builder ( ) start object ( ) field ( " i " , 2 ) end object ( ) ) ) ; / / make sure we are starting with a clear cache assert that ( client ( ) admin ( ) indices ( ) prepare stats ( " cache test idx " ) set request cache ( true ) get ( ) get total ( ) get request cache ( ) get hit count ( ) , equal to ( 0l ) ) ; assert that ( client ( ) admin ( ) indices ( ) prepare stats ( " cache test idx " ) set request cache ( true ) get ( ) get total ( ) get request cache ( ) get miss count ( ) , equal to ( 0l ) ) ; / / test that a request using a nondeterministic script does not get cached map < string , object > params = new hash map < > ( ) ; params put ( " fieldname " , " date " ) ; search response r = client ( ) prepare search ( " cache test idx " ) set size ( 0 ) add aggregation ( range ( " foo " ) field ( " i " ) script ( new script ( script type inline , custom script plugin name , " math random ( ) " , collections empty map ( ) ) ) add range ( 0 , 10 ) ) get ( ) ; assert search response ( r ) ; assert that ( client ( ) admin ( ) indices ( ) prepare stats ( " cache test idx " ) set request cache ( true ) get ( ) get total ( ) get request cache ( ) get hit count ( ) , equal to ( 0l ) ) ; assert that ( client ( ) admin ( ) indices ( ) prepare stats ( " cache test idx " ) set request cache ( true ) get ( ) get total ( ) get request cache ( ) get miss count ( ) , equal to ( 0l ) ) ; / / test that a request using a deterministic script gets cached r = client ( ) prepare search ( " cache test idx " ) set size ( 0 ) add aggregation ( range ( " foo " ) field ( " i " ) script ( new script ( script type inline , custom script plugin name , " value + 1 " , collections empty map ( ) ) ) add range ( 0 , 10 ) ) get ( ) ; assert search response ( r ) ; assert that ( client ( ) admin ( ) indices ( ) prepare stats ( " cache test idx " ) set request cache ( true ) get ( ) get total ( ) get request cache ( ) get hit count ( ) , equal to ( 0l ) ) ; assert that ( client ( ) admin ( ) indices ( ) prepare stats ( " cache test idx " ) set request cache ( true ) get ( ) get total ( ) get request cache ( ) get miss count ( ) , equal to ( 1l ) ) ; / / ensure that non - scripted requests are cached as normal r = client ( ) prepare search ( " cache test idx " ) set size ( 0 ) add aggregation ( range ( " foo " ) field ( " i " ) add range ( 0 , 10 ) ) get ( ) ; assert search response ( r ) ; assert that ( client ( ) admin ( ) indices ( ) prepare stats ( " cache test idx " ) set request cache ( true ) get ( ) get total ( ) get request cache ( ) get hit count ( ) , equal to ( 0l ) ) ; assert that ( client ( ) admin ( ) indices ( ) prepare stats ( " cache test idx " ) set request cache ( true ) get ( ) get total ( ) get request cache ( ) get miss count ( ) , equal to ( 2l ) ) ; }


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


the number of threads blocked waiting on memory

public int queued ( ) { lock lock ( ) ; try { return this waiters size ( ) ; } finally { lock unlock ( ) ; } }


return the chinese zodiac the pattern is { @ code yyyy - mm - dd hh : mm : ss }

public static string get chinese zodiac ( final string time ) { return get chinese zodiac ( string 2 date ( time , get default format ( ) ) ) ; }


gets a string representation of a collection of ranges

public static string to string ( protos value ranges ranges ) { check not null ( ranges ) ; return ranges get range list ( ) stream ( ) map ( utils : : to string ) collect ( collectors joining ( " , " , " [ " , " ] " ) ) ; }


public format test integer ( integer integer ) { this integer = integer ; return this ; }


sets the final output jar ; if this is not set , then the { @ link # build } method throws an { @ link illegal state exception } note that this class may generate not just the output itself , but also a number of additional intermediate files and outputs

public java library helper set output ( artifact output ) { this output = output ; return this ; }


returns an address set indicating where the user defined property differs between the diff ' s two programs within the specified address set

synchronized public address set view get user defined diffs ( string property , address set view addrs , task monitor monitor ) throws cancelled exception { / / handle case where the class for a saveable property is missing if ( ( listing 1 get property map ( property ) instanceof unsupported map d b ) | | ( listing 2 get property map ( property ) instanceof unsupported map d b ) ) { return new address set ( ) ; / / ignore property that isn ' t supported } return get cui diffs ( property , addrs , new user defined comparator ( program 1 , program 2 , property ) , monitor ) ; }


returns type information for a java { @ link java util list } a list must not be null null values in elements are not supported by default , lists are untyped and treated as a generic type in flink ; therefore , it is useful to pass type information whenever a list is used note : flink does not preserve the concrete { @ link list } type it converts a list into { @ link array list } when copying or deserializing

public static < e > type information < list < e > > list ( type information < e > element type ) { return new list type info < > ( element type ) ; }


public void test array merger illegal argument exception ( ) { string [ ] string array = { " 1 " , " 2 " , " 3 " } ; integer [ ] integer array = { 3 , 4 , 5 } ; try { object result = array merger instance merge ( string array , null , integer array ) ; assertions fail ( " expected illegal argument exception for different arguments ' types " ) ; } catch ( illegal argument exception exception ) { assertions assert equals ( " arguments ' types are different " , exception get message ( ) ) ; } }


sets the < code > category < code > property

public pet category ( category category ) { this category = category ; return this ; }


test case where there is no existing file

public void test write new file ( ) throws i o exception { output stream fos = new atomic file output stream ( dst file ) ; assert false ( dst file exists ( ) ) ; fos write ( test string get bytes ( ) ) ; fos flush ( ) ; assert false ( dst file exists ( ) ) ; fos close ( ) ; assert true ( dst file exists ( ) ) ; string read back data = new string ( files read all bytes ( dst file to path ( ) ) , utf 8 ) ; assert equals ( test string , read back data ) ; }


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


verifies that { @ code method } produces a { @ link null pointer exception } or { @ link unsupported operation exception } when the parameter in position { @ code param index } is null if this parameter is marked nullable , this method does nothing

public void test method parameter ( @ nullable final object instance , final method method , int param index ) { method set accessible ( true ) ; test parameter ( instance , invokable ( instance , method ) , param index , method get declaring class ( ) ) ; }


overridden to avoid generating events when nothing changed

protected void sort ( list < bundle status > data , table sorting context < bundle status > sorting context ) { / / notify accesses listeners , must be done on swing thread system utilities assert this is the swing thread ( " must be called on the swing thread " ) ; if ( sorting context is unsorted ( ) ) { / / this is the ' no sort ' state sort completed ( sorting context ) ; notify model sorted ( false ) ; return ; } has ever sorted = true ; / / signal that we have sorted at least one time / / wrap the assigned comparator to detect if the order changes atomic boolean changed = new atomic boolean ( false ) ; comparator < bundle status > wrapper = new comparator < bundle status > ( ) { comparator < bundle status > comparator = sorting context get comparator ( ) ; @ override public int compare ( bundle status o 1 , bundle status o 2 ) { int result = comparator compare ( o 1 , o 2 ) ; if ( result < 0 ) { changed set ( true ) ; } return result ; } } ; collections sort ( data , wrapper ) ; sort completed ( sorting context ) ; if ( changed get ( ) ) { notify model sorted ( false ) ; } }


return a missing value that is understandable by { @ link sort field # set missing value ( object ) } most implementations return null because they already replace the value at the fielddata level however this can ' t work in case of strings since there is no such thing as a string which compares greater than any other string , so in that case we need to return { @ link sort field # string first } or { @ link sort field # string last } so that the coordinating node knows how to deal with null values

public object missing value ( boolean reversed ) { return null ; }


convert an array of method into an array of hash codes

private static int [ ] get fingerprints ( method [ ] methods ) { if ( methods = = null ) { return null ; } int [ ] hash codes = new int [ methods length ] ; for ( int i = 0 ; i < methods length ; i + + ) { hash codes [ i ] = get fingerprint ( methods [ i ] ) ; } return hash codes ; }


make sure it ' s backward compatible , and also we can rollback this feature without corrupt the database

public void test backward compatible ( ) throws exception { test compatible helper ( false , true ) ; test compatible helper ( true , false ) ; }


helper method to update the chown allowed users in tests

void update chown allowed users ( list < string > chown allowed users ) { this chown allowed users = chown allowed users ; }


sign the array by first turning it into a base 6 4 encoded string

protected byte [ ] sign ( final byte [ ] value ) { if ( this signing key = = null ) { return value ; } return sign with ( value , " rsa " equals ignore case ( this signing key get algorithm ( ) ) ? algorithm identifiers rsa using sha512 : algorithm identifiers hmac sha512 ) ; }


returns the { @ link h a proxy proxied protocol } represented by the specified byte

public static h a proxy proxied protocol value of ( byte tpaf byte ) { switch ( tpaf byte ) { case tpaf tcp4 byte : return tcp4 ; case tpaf tcp6 byte : return tcp6 ; case tpaf unknown byte : return unknown ; case tpaf udp4 byte : return udp4 ; case tpaf udp6 byte : return udp6 ; case tpaf unix stream byte : return unix stream ; case tpaf unix dgram byte : return unix dgram ; default : throw new illegal argument exception ( " unknown transport protocol + address family : " + ( tpaf byte & 0x f f ) ) ; } }


sets the < code > map array anytype < code > property

public additional properties class map array anytype ( map < string , list < object > > map array anytype ) { this map array anytype = map array anytype ; return this ; }


if currently running in asynchronous mode , returns that handle

public @ check for null asynchronous execution get asynchronous execution ( ) { lock read lock ( ) lock ( ) ; try { return asynchronous execution ; } finally { lock read lock ( ) unlock ( ) ; } }


this uses the public api collect which uses scan under the covers

public void seed factory ( ) { observable < list < integer > > o = observable range ( 1 , 10 ) collect ( new supplier < list < integer > > ( ) { @ override public list < integer > get ( ) { return new array list < > ( ) ; } } , new bi consumer < list < integer > , integer > ( ) { @ override public void accept ( list < integer > list , integer t 2 ) { list add ( t 2 ) ; } } ) to observable ( ) take last ( 1 ) ; assert equals ( arrays as list ( 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 ) , o blocking single ( ) ) ; assert equals ( arrays as list ( 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 ) , o blocking single ( ) ) ; }


protected int get current backoff ( ) { return current backoff < = 0 ? 0 : current backoff ; }


if ` message ` is defined , return it otherwise fallback to the default error message associated with the error code

public string message with fallback ( ) { if ( message = = null ) return error message ( ) ; return message ; }


returns the current value from a compute if absent invocation

@ nullable v do compute if absent ( k key , object key ref , function < ? super k , ? extends v > mapping function , long [ / * 1 * / ] now , boolean record stats ) { @ suppress warnings ( " unchecked " ) v [ ] old value = ( v [ ] ) new object [ 1 ] ; @ suppress warnings ( " unchecked " ) v [ ] new value = ( v [ ] ) new object [ 1 ] ; @ suppress warnings ( " unchecked " ) k [ ] node key = ( k [ ] ) new object [ 1 ] ; @ suppress warnings ( { " unchecked " , " rawtypes " } ) node < k , v > [ ] removed = new node [ 1 ] ; int [ ] weight = new int [ 2 ] ; / / old , new removal cause [ ] cause = new removal cause [ 1 ] ; node < k , v > node = data compute ( key ref , ( k , n ) - > { if ( n = = null ) { new value [ 0 ] = mapping function apply ( key ) ; if ( new value [ 0 ] = = null ) { return null ; } now [ 0 ] = expiration ticker ( ) read ( ) ; weight [ 1 ] = weigher weigh ( key , new value [ 0 ] ) ; n = node factory new node ( key , key reference queue ( ) , new value [ 0 ] , value reference queue ( ) , weight [ 1 ] , now [ 0 ] ) ; set variable time ( n , expire after create ( key , new value [ 0 ] , expiry ( ) , now [ 0 ] ) ) ; return n ; } synchronized ( n ) { node key [ 0 ] = n get key ( ) ; weight [ 0 ] = n get weight ( ) ; old value [ 0 ] = n get value ( ) ; if ( ( node key [ 0 ] = = null ) | | ( old value [ 0 ] = = null ) ) { cause [ 0 ] = removal cause collected ; } else if ( has expired ( n , now [ 0 ] ) ) { cause [ 0 ] = removal cause expired ; } else { return n ; } writer delete ( node key [ 0 ] , old value [ 0 ] , cause [ 0 ] ) ; new value [ 0 ] = mapping function apply ( key ) ; if ( new value [ 0 ] = = null ) { removed [ 0 ] = n ; n retire ( ) ; return null ; } weight [ 1 ] = weigher weigh ( key , new value [ 0 ] ) ; n set value ( new value [ 0 ] , value reference queue ( ) ) ; n set weight ( weight [ 1 ] ) ; now [ 0 ] = expiration ticker ( ) read ( ) ; set variable time ( n , expire after create ( key , new value [ 0 ] , expiry ( ) , now [ 0 ] ) ) ; set access time ( n , now [ 0 ] ) ; set write time ( n , now [ 0 ] ) ; return n ; } } ) ; if ( node = = null ) { if ( removed [ 0 ] ! = null ) { after write ( new removal task ( removed [ 0 ] ) ) ; } return null ; } if ( cause [ 0 ] ! = null ) { if ( has removal listener ( ) ) { notify removal ( node key [ 0 ] , old value [ 0 ] , cause [ 0 ] ) ; } stats counter ( ) record eviction ( weight [ 0 ] , cause [ 0 ] ) ; } if ( new value [ 0 ] = = null ) { if ( ! is computing async ( node ) ) { try expire after read ( node , key , old value [ 0 ] , expiry ( ) , now [ 0 ] ) ; set access time ( node , now [ 0 ] ) ; } after read ( node , now [ 0 ] , / * record hit * / record stats ) ; return old value [ 0 ] ; } if ( ( old value [ 0 ] = = null ) & & ( cause [ 0 ] = = null ) ) { after write ( new add task ( node , weight [ 1 ] ) ) ; } else { int weighted difference = ( weight [ 1 ] - weight [ 0 ] ) ; after write ( new update task ( node , weighted difference ) ) ; } return new value [ 0 ] ; }


method to invoke whenever the decompiler token highlights have changed

public void token highlights changed ( ) ;


get a crumb from multipart form data and validate it against other data in the current request the salt and request parameter that is used is defined by the current configuration

public boolean validate crumb ( servlet request request , multipart form data parser parser ) { crumb issuer descriptor < crumb issuer > desc = get descriptor ( ) ; string crumb field = desc get crumb request field ( ) ; string crumb salt = desc get crumb salt ( ) ; return validate crumb ( request , crumb salt , parser get ( crumb field ) ) ; }


renders the mesh using the given primitive type offset specifies the offset into either the vertex buffer or the index buffer depending on whether indices are defined count specifies the number of vertices or indices to use thus count # vertices per primitive primitives are rendered this method will automatically bind each vertex attribute as specified at construction time via { @ link vertex attributes } to the respective shader attributes the binding is based on the alias defined for each vertex attribute this method must only be called after the { @ link shader program # bind ( ) } method has been called ! this method is intended for use with open g l es 2 0 and will throw an illegal state exception when open g l es 1 x is used

public void render ( shader program shader , int primitive type , int offset , int count ) { render ( shader , primitive type , offset , count , auto bind ) ; }