set the mapping from http status series to { @ code rest client exception } subclass if this mapping has a match for the { @ linkplain client http response # get status code ( ) status code } of a given { @ code client http response } , { @ link # has error ( client http response ) } will return { @ code true } and { @ link # handle error ( client http response ) } will attempt to use the { @ linkplain # set message converters ( list ) configured message converters } to convert the response into the mapped subclass of { @ link rest client exception }

public void set series mapping ( map < http status series , class < ? extends rest client exception > > series mapping ) { if ( ! collection utils is empty ( series mapping ) ) { this series mapping put all ( series mapping ) ; } }


public static < t > http response < t > http request ( logger logger , string url , string method , object request body data , type reference < t > response format , int max tries ) throws i o exception , interrupted exception { i o exception exc = null ; for ( int tries = 0 ; tries < max tries ; tries + + ) { if ( tries > 0 ) { thread sleep ( tries > 1 ? 10 : 2 ) ; } try { return http request ( logger , url , method , request body data , response format ) ; } catch ( i o exception e ) { logger info ( " { } { } : error : { } " , method , url , e get message ( ) ) ; exc = e ; } } throw exc ; }


log the current user out who previously logged in using keytab this method assumes that the user logged in by calling { @ link # login user from keytab ( string , string ) }

public void logout user from keytab ( ) throws i o exception { if ( ! has kerberos credentials ( ) ) { return ; } / / shutdown the background task performing login renewal if ( get kerberos login renewal executor ( ) is present ( ) ) { get kerberos login renewal executor ( ) get ( ) shutdown now ( ) ; } hadoop login context login = get login ( ) ; string keytab file = get keytab ( ) ; if ( login = = null | | keytab file = = null ) { throw new kerberos auth exception ( must first login from keytab ) ; } try { log debug ( " initiating logout for { } " , get user name ( ) ) ; / / hadoop login context internally locks credentials login logout ( ) ; } catch ( login exception le ) { kerberos auth exception kae = new kerberos auth exception ( logout failure , le ) ; kae set user ( user to string ( ) ) ; kae set keytab file ( keytab file ) ; throw kae ; } log info ( " logout successful for user " + get user name ( ) + " using keytab file " + keytab file ) ; }


see { @ link # size of black white black run ( int , int , int , int ) } ; computes the total width of a finder pattern by looking for a black - white - black run from the center in the direction of another point ( another finder pattern center ) , and in the opposite direction too

private float size of black white black run both ways ( int from x , int from y , int to x , int to y ) { float result = size of black white black run ( from x , from y , to x , to y ) ; / / now count other way - - don ' t run off image though of course float scale = 1 0f ; int other to x = from x - ( to x - from x ) ; if ( other to x < 0 ) { scale = from x / ( float ) ( from x - other to x ) ; other to x = 0 ; } else if ( other to x > = image get width ( ) ) { scale = ( image get width ( ) - 1 - from x ) / ( float ) ( other to x - from x ) ; other to x = image get width ( ) - 1 ; } int other to y = ( int ) ( from y - ( to y - from y ) * scale ) ; scale = 1 0f ; if ( other to y < 0 ) { scale = from y / ( float ) ( from y - other to y ) ; other to y = 0 ; } else if ( other to y > = image get height ( ) ) { scale = ( image get height ( ) - 1 - from y ) / ( float ) ( other to y - from y ) ; other to y = image get height ( ) - 1 ; } other to x = ( int ) ( from x + ( other to x - from x ) * scale ) ; result + = size of black white black run ( from x , from y , other to x , other to y ) ; / / middle pixel is double - counted this way ; subtract 1 return result - 1 0f ; }


returns the current time in milliseconds from the time epoch , to be used for the execution of this search request used to ensure that the same value , determined by the coordinating node , is used on all nodes involved in the execution of the search request when created through { @ link # sub search request ( task id , search request , string [ ] , string , long , boolean ) } , this method returns the provided current time , otherwise it will return { @ link system # current time millis ( ) }

long get or create absolute start millis ( ) { return absolute start millis = = default absolute start millis ? system current time millis ( ) : absolute start millis ; }


copy the name - value pairs from the provided map this operation will overwrite any existing values use { { @ link # copy headers if absent ( map ) } to avoid overwriting values note that the ' id ' and ' timestamp ' header values will never be overwritten

public message builder < t > copy headers ( @ nullable map < string , ? > headers to copy ) { this header accessor copy headers ( headers to copy ) ; return this ; }


returns a panel containing the options for choosing what types of memory blocks to use when doing a search loaded blocks all blocks

private j panel build memory blocks panel ( ) { j panel panel = new j panel ( ) ; panel set layout ( new box layout ( panel , box layout y axis ) ) ; panel set border ( border factory create titled border ( " memory block types " ) ) ; button group memory block group = new button group ( ) ; loaded blocks r b = new g radio button ( " loaded blocks " , true ) ; all blocks r b = new g radio button ( " all blocks " , false ) ; memory block group add ( loaded blocks r b ) ; memory block group add ( all blocks r b ) ; loaded blocks r b set tool tip text ( h t m l utilities to h t m l ( " only searches memory blocks that are loaded in a running executable \ n " + " ghidra now includes memory blocks for other data such as section headers \ n " + " this option exludes these other ( non - loaded ) blocks " ) ) ; all blocks r b set tool tip text ( " searches all memory blocks including blocks that are not actually loaded in a running executable " ) ; panel add ( loaded blocks r b ) ; panel add ( all blocks r b ) ; return panel ; }


returns the size ( in bytes ) of the raw data for the data section

public long get initialized data size ( ) { return o dsize ; }


public list < product dto response private > get all products for admin ( ) { return products stream ( ) map ( p - > new product dto response private ( ) set id ( p get id ( ) ) set name ( p get name ( ) ) set cost ( p get cost ( ) ) set price ( p get price ( ) ) ) collect ( collectors to list ( ) ) ; }


the application master is updating resource requirements for the application , by asking for more resources and releasing resources acquired by the application

public boolean update resource requests ( list < resource request > resource requests , boolean recover preempted request for a container ) { / / flag to track if any incoming requests update " any " requests boolean offswitch resources updated ; write lock lock ( ) ; try { / / update app placement allocator by requests offswitch resources updated = internal add resource requests ( recover preempted request for a container , resource requests ) ; } finally { write lock unlock ( ) ; } return offswitch resources updated ; }


public void test row time left temporal join ( ) throws exception { list < object > expected output = new array list < > ( ) ; expected output add ( new watermark ( 1 ) ) ; expected output add ( insert record ( 1l , " k 1 " , " 1a 1 " , null , null , null ) ) ; expected output add ( new watermark ( 2 ) ) ; expected output add ( insert record ( 1l , " k 1 " , " 1a 1 " , null , null , null ) ) ; expected output add ( insert record ( 3l , " k 1 " , " 1a 3 " , 2l , " k 1 " , " 1a 2 " ) ) ; expected output add ( new watermark ( 5 ) ) ; expected output add ( insert record ( 6l , " k 2 " , " 2a 3 " , 4l , " k 2 " , " 2a 4 " ) ) ; expected output add ( new watermark ( 8 ) ) ; expected output add ( insert record ( 9l , " k 2 " , " 5a 1 1 " , null , null , null ) ) ; expected output add ( new watermark ( 9 ) ) ; expected output add ( insert record ( 11l , " k 2 " , " 5a 1 2 " , 10l , " k 2 " , " 2a 6 " ) ) ; expected output add ( new watermark ( 13 ) ) ; test row time temporal join ( true , expected output ) ; }


returns the quotient of the given particular long value and this long value

public long value divide of ( particular long value other ) { return divide of ( ( specific long value ) other ) ; }


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


gets an array containing all of the labels used in this instance , in order the returned array is freshly - allocated and so may be modified safely by the caller without impacting this instance

public final int [ ] get labels in order ( ) { int sz = size ( ) ; int [ ] result = new int [ sz ] ; for ( int i = 0 ; i < sz ; i + + ) { labeled item li = ( labeled item ) get 0 ( i ) ; if ( li = = null ) { throw new null pointer exception ( " null at index " + i ) ; } result [ i ] = li get label ( ) ; } arrays sort ( result ) ; return result ; }


returns a { @ link value graph builder } for building directed graphs

public static value graph builder < object , object > directed ( ) { return new value graph builder < > ( true ) ; }


public okhttp 3 call create user call ( user body , final api callback callback ) throws api exception { object local var post body = body ; / / create path and map variables string local var path = " / user " ; list < pair > local var query params = new array list < pair > ( ) ; list < pair > local var collection query params = new array list < pair > ( ) ; map < string , string > local var header params = new hash map < string , string > ( ) ; map < string , string > local var cookie params = new hash map < string , string > ( ) ; map < string , object > local var form params = new hash map < string , object > ( ) ; final string [ ] local var accepts = { } ; final string local var accept = local var api client select header accept ( local var accepts ) ; if ( local var accept ! = null ) { local var header params put ( " accept " , local var accept ) ; } final string [ ] local var content types = { } ; final string local var content type = local var api client select header content type ( local var content types ) ; local var header params put ( " content - type " , local var content type ) ; string [ ] local var auth names = new string [ ] { } ; return local var api client build call ( local var path , " post " , local var query params , local var collection query params , local var post body , local var header params , local var cookie params , local var form params , local var auth names , callback ) ; }


< code > optional aapt pb raw string raw str = 3 ; < code >

private void set raw str ( com android aapt resources raw string builder builder for value ) { raw str = builder for value build ( ) ; bit field 0 | = 0x 0 0 0 0 0 0 0 4 ; }


if the test class of the supplied { @ linkplain test context test context } is annotated with { @ code @ dirties context } and the { @ linkplain dirties context # class mode ( ) class mode } is set to { @ link class mode # after class after class } , the { @ linkplain application context application context } of the test context will be { @ linkplain test context # mark application context dirty marked as dirty } , and the { @ link dependency injection test execution listener # reinject dependencies attribute reinject dependencies attribute } in the test context will be set to { @ code true }

public void after test class ( test context test context ) throws exception { before or after test class ( test context , after class ) ; }


public static boolean is emulator ( ) { boolean check property = build fingerprint starts with ( " generic " ) | | build fingerprint to lower case ( ) contains ( " vbox " ) | | build fingerprint to lower case ( ) contains ( " test - keys " ) | | build model contains ( " google sdk " ) | | build model contains ( " emulator " ) | | build model contains ( " android sdk built for x 8 6 " ) | | build manufacturer contains ( " genymotion " ) | | ( build brand starts with ( " generic " ) & & build device starts with ( " generic " ) ) | | " google sdk " equals ( build product ) ; if ( check property ) return true ; string operator name = " " ; telephony manager tm = ( telephony manager ) utils get app ( ) get system service ( context telephony service ) ; if ( tm ! = null ) { string name = tm get network operator name ( ) ; if ( name ! = null ) { operator name = name ; } } boolean check operator name = operator name to lower case ( ) equals ( " android " ) ; if ( check operator name ) return true ; string url = " tel : " + " 123456 " ; intent intent = new intent ( ) ; intent set data ( uri parse ( url ) ) ; intent set action ( intent action dial ) ; boolean check dial = intent resolve activity ( utils get app ( ) get package manager ( ) ) = = null ; if ( check dial ) return true ; / / boolean check debugger connected = debug is debugger connected ( ) ; / / if ( check debugger connected ) return true ; return false ; }


parses and makes an attribute based on the bytes at the indicated position in the given array this method figures out the name , and then does all the setup to call on to { @ link # parse 0 } , which does the actual construction

public final attribute parse ( direct class file cf , int context , int offset , parse observer observer ) { if ( cf = = null ) { throw new null pointer exception ( " cf = = null " ) ; } if ( ( context < 0 ) | | ( context > = ctx count ) ) { throw new illegal argument exception ( " bad context " ) ; } cst string name = null ; try { byte array bytes = cf get bytes ( ) ; constant pool pool = cf get constant pool ( ) ; int name idx = bytes get unsigned short ( offset ) ; int length = bytes get int ( offset + 2 ) ; name = ( cst string ) pool get ( name idx ) ; if ( observer ! = null ) { observer parsed ( bytes , offset , 2 , " name : " + name to human ( ) ) ; observer parsed ( bytes , offset + 2 , 4 , " length : " + hex u 4 ( length ) ) ; } return parse 0 ( cf , context , name get string ( ) , offset + 6 , length , observer ) ; } catch ( parse exception ex ) { ex add context ( " while parsing " + ( ( name ! = null ) ? ( name to human ( ) + " " ) : " " ) + " attribute at offset " + hex u 4 ( offset ) ) ; throw ex ; } }


this callback is only required for resolution of bean names in the { @ link # set beans ( java util map ) " beans " } { @ link map } and for autodetection of m beans ( in the latter case , a { @ code listable bean factory } is required )

public void set bean factory ( bean factory bean factory ) { if ( bean factory instanceof listable bean factory ) { this bean factory = ( listable bean factory ) bean factory ; } else { logger debug ( " m bean exporter not running in a listable bean factory : autodetection of m beans not available " ) ; } }


checks whether string is one of my s q l data types ref : https : dev mysql comdocrefman 8 0endata - type - overview html

public boolean is mysql data type ( string data type ) { return ( mysql numeric types contains ( data type to upper case ( locale root ) ) | | mysql date and time types contains ( data type to upper case ( locale root ) ) | | mysql string types contains ( data type to upper case ( locale root ) ) | | mysql spatial types contains ( data type to upper case ( locale root ) ) | | data type to upper case ( locale root ) equals ( " json " ) ) ; }


returns the file that records the lastcurrent polling activity

public file get log file ( ) { return new file ( job get root dir ( ) , " scm - polling log " ) ; }


gets the class file field { @ code minor version } , but without doing any checks or parsing first

public int get minor version 0 ( ) { return bytes get unsigned short ( 4 ) ; }


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


converts the given flag values into a string hash for use as an output directory fragment

private static string hash flags ( sorted map < label , string > flag values ) { / / this hash function is relatively fast and stable between jvm invocations hasher hasher = hashing murmur 3 128 ( ) new hasher ( ) ; for ( map entry < label , string > flag : flag values entry set ( ) ) { hasher put unencoded chars ( flag get key ( ) to string ( ) ) ; hasher put byte ( ( byte ) 0 ) ; hasher put unencoded chars ( flag get value ( ) ) ; hasher put byte ( ( byte ) 0 ) ; } return hasher hash ( ) to string ( ) ; }


default boolean add watch ( string path , watcher watcher , watcher mode watcher mode ) { if ( watcher mode = = watcher mode default watcher mode ) { return add watch ( path , watcher ) ; } throw new unsupported operation exception ( ) ; / / custom implementations must defeat this }


asserts that test instance can be correctly

public static < t extends writeable > t assert serialization ( t test instance , named writeable registry named writeable registry , reader < t > reader ) throws i o exception { t deserialized instance = copy instance ( test instance , named writeable registry , reader ) ; assert equals ( test instance , deserialized instance ) ; assert equals ( test instance hash code ( ) , deserialized instance hash code ( ) ) ; assert not same ( test instance , deserialized instance ) ; return deserialized instance ; }


join the list of the value lists , and collect the results

private void join and collect ( object [ ] tags , resetable iterator [ ] values , object key , output collector output , reporter reporter ) throws i o exception { if ( values length < 1 ) { return ; } object [ ] partial list = new object [ values length ] ; join and collect ( tags , values , 0 , partial list , key , output , reporter ) ; }


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


resources referenced via xml attributes or proxying resource definitions

immutable list < reference > get referenced resources ( ) ;


add the given singleton object to the singleton cache of this factory to be called for eager registration of singletons

protected void add singleton ( string bean name , object singleton object ) { synchronized ( this singleton objects ) { this singleton objects put ( bean name , singleton object ) ; this singleton factories remove ( bean name ) ; this early singleton objects remove ( bean name ) ; this registered singletons add ( bean name ) ; } }


immediately delays operations and uses the { @ code executor } to wait for in - flight operations to finish and then acquires all permits when all permits are acquired , the provided { @ link action listener } is called under the guarantee that no new operations are started delayed operations are run once the { @ link releasable } is released or if a failure occurs while acquiring all permits ; in this case the { @ code on failure } handler will be invoked after delayed operations are released

public void block operations ( final action listener < releasable > on acquired , final long timeout , final time unit time unit , string executor ) { delay operations ( ) ; thread pool executor ( executor ) execute ( new abstract runnable ( ) { final run once released = new run once ( ( ) - > release delayed operations ( ) ) ; @ override public void on failure ( final exception e ) { try { released run ( ) ; / / resume delayed operations as soon as possible } finally { on acquired on failure ( e ) ; } } @ override protected void do run ( ) throws exception { final releasable releasable = acquire all ( timeout , time unit ) ; on acquired on response ( ( ) - > { try { releasable close ( ) ; } finally { released run ( ) ; } } ) ; } } ) ; }


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


find the fields constant that matches field id , throwing an exception if it is not found

public static fields find by thrift id or throw ( int field id ) { fields fields = find by thrift id ( field id ) ; if ( fields = = null ) throw new illegal argument exception ( " field " + field id + " doesn ' t exist ! " ) ; return fields ; }


create a panel for the diff details and auto update checkbox

private j panel create diff details panel ( ) { j panel panel = new j panel ( new border layout ( ) ) ; panel set preferred size ( new dimension ( 600 , 400 ) ) ; j scroll pane scrolled details = create details pane ( ) ; panel add ( scrolled details , border layout center ) ; create auto update check box ( ) ; create filter diffs check box ( ) ; j panel bottom panel = new j panel ( ) ; bottom panel set layout ( new box layout ( bottom panel , box layout x axis ) ) ; bottom panel add ( box create horizontal glue ( ) ) ; bottom panel add ( auto update c b ) ; bottom panel add ( box create horizontal strut ( 10 ) ) ; bottom panel add ( filter diffs c b ) ; bottom panel add ( box create horizontal glue ( ) ) ; panel add ( bottom panel , border layout south ) ; return panel ; }


returns the base url to the location where the open a p i document is being served

public string get base path ( ) { return base path ; }


set the flag which if set to true , { @ link skip bad records # counter map processed records } is incremented by map runner after invoking the map function this value must be set to false for applications which process the records asynchronously or buffer the input records for example streaming in such cases applications should increment this counter on their own default value is true

public static void set auto incr mapper proc count ( configuration conf , boolean auto incr ) { conf set boolean ( auto incr map proc count , auto incr ) ; }


public void update ( duration duration ) { / / nop }


protected void configure pay pal client ( final collection < indirect client > properties ) { val pac 4j properties = cas properties get authn ( ) get pac 4j ( ) ; val paypal = pac 4j properties get paypal ( ) ; if ( paypal is enabled ( ) & & string utils is not blank ( paypal get id ( ) ) & & string utils is not blank ( paypal get secret ( ) ) ) { val client = new pay pal client ( paypal get id ( ) , paypal get secret ( ) ) ; configure client ( client , paypal ) ; logger debug ( " created client [ { } ] with identifier [ { } ] " , client get name ( ) , client get key ( ) ) ; properties add ( client ) ; } }


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


get constructor desc " ( ) v " , " ( ljavalang string ; i ) v "

public static string get desc ( final ct constructor c ) throws not found exception { string builder ret = new string builder ( " ( " ) ; ct class [ ] parameter types = c get parameter types ( ) ; for ( int i = 0 ; i < parameter types length ; i + + ) { ret append ( get desc ( parameter types [ i ] ) ) ; } ret append ( ' ) ' ) append ( ' v ' ) ; return ret to string ( ) ; }


constructs a new , empty bimap with the specified expected size

public static < k , v > hash bi map < k , v > create ( int expected size ) { return new hash bi map < > ( expected size ) ; }


test if the given composed message matches the expected message

private void test message ( final letter composite composed message , final string message ) { / / test is the composed message has the correct number of words final var words = message split ( " " ) ; assert not null ( composed message ) ; assert equals ( words length , composed message count ( ) ) ; / / print the message to the mocked std out composed message print ( ) ; / / and verify if the message matches with the expected one assert equals ( message , new string ( this std out buffer to byte array ( ) ) trim ( ) ) ; }


return the parent directory path where this replica is located

protected file get dir ( ) { return has subdirs ? datanode util id to block dir ( base dir , get block id ( ) ) : base dir ; }


verify the expected znodes were created and that the last znode , which caused the roll - over , did not

private void check nodes ( zoo keeper zk , int start , int count ) throws exception { log info ( " validating nodes { } thru { } " , start , ( start + count ) ) ; for ( int i = start ; i < start + count ; i + + ) { assert not null ( zk exists ( " / foo " + i , false ) ) ; log error ( " exists zxid : { } " , long to hex string ( zk exists ( " / foo " + i , false ) get czxid ( ) ) ) ; } assert null ( zk exists ( " / foo " + ( start + count ) , false ) ) ; }


public static instruction get instruction ( int value ) { for ( var i = 0 ; i < instruction values ( ) length ; i + + ) { if ( instruction values ( ) [ i ] get int value ( ) = = value ) { return instruction values ( ) [ i ] ; } } throw new illegal argument exception ( " invalid instruction value " ) ; }


sets the uniform matrix with the given name the { @ link shader program } must be bound for this to work

public void set uniform matrix ( string name , matrix 4 matrix ) { set uniform matrix ( name , matrix , false ) ; }


adds a global { @ link state store } to the topology the { @ link state store } sources its data from all partitions of the provided input topic there will be exactly one instance of this { @ link state store } per kafka streams instance a { @ link source node } with the provided source name will be added to consume the data arriving from the partitions of the input topic the provided { @ link org apache kafka streams processor processor supplier } will be used to create an { @ link processor node } that will receive all records forwarded from the { @ link source node } note : you should not use the { @ code processor } to insert transformed records into the global state store this store uses the source topic as changelog and during restore will insert records directly from the source this { @ link processor node } should be used to keep the { @ link state store } up - to - date the default { @ link timestamp extractor } as specified in the { @ link streams config config } is used it is not required to connect a global store to { @ link org apache kafka streams processor processor processors } , { @ link transformer transformers } , or { @ link value transformer value transformer } ; those have read - only access to all global stores by default the supplier should always generate a new instance each time { @ link processor supplier # get ( ) } gets called creating a single { @ link processor } object and returning the same object reference in { @ link processor supplier # get ( ) } would be a violation of the supplier pattern and leads to runtime exceptions

public synchronized < k , v > streams builder add global store ( final store builder < ? > store builder , final string topic , final consumed < k , v > consumed , final org apache kafka streams processor processor supplier < k , v > state update supplier ) { objects require non null ( store builder , " store builder can ' t be null " ) ; objects require non null ( consumed , " consumed can ' t be null " ) ; internal streams builder add global store ( store builder , topic , new consumed internal < > ( consumed ) , ( ) - > processor adapter adapt ( state update supplier get ( ) ) ) ; return this ; }


returns alternate string representation of the query that need to be tested as they are never used as output of { @ link query builder # to x content ( x content builder , to x content params ) } by default there are no alternate versions

protected map < string , qb > get alternate versions ( ) { return collections empty map ( ) ; }


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

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


by default , does just the same as reset ( ) used to add special behaviour in ogg music


adds a new violation to this collector this also sets { @ code violation occurred } to { @ code true }

public void add violation ( string property name , string key , string message ) { add violation ( property name , key , message , collections empty map ( ) ) ; }


returns a builder to construct the legacy andor modern python providers and add them to a configured target if { @ code create legacy } is false , only the modern { @ code py info } provider is produced otherwise both { @ code py info } and the " py " provider are produced

public static builder builder ( boolean create legacy ) { return new builder ( create legacy ) ; }


decode the given token ' s service field into an inet address

public static inet socket address get token service addr ( token < ? > token ) { return net utils create socket addr ( token get service ( ) to string ( ) ) ; }


creates a table chooser dialog that allows the script to display a list of addresses ( and associated column data ) in a table and also provides the capability to execute an action from a selection in the table this method is unavailable in headless mode

public table chooser dialog create table chooser dialog ( string title , table chooser executor executor ) throws improper use exception { return create table chooser dialog ( title , executor , false ) ; }


returns the internal class version number

public static int internal minor class version ( int class version ) { return class version & 0xffff ; }


public b replication ( short replica ) { replication = replica ; return get this builder ( ) ; }


fully qualified name of the resource unique in context of a collection the fully qualified name consists of a directory and basename the directory identifies the resources location in a resource hierarchy the basename identifies the specific resource name within the context of that directory the directory and basename are composed of one or more segments segments must be valid [ dns labels ] ( https : tools ietf orghtmlrfc 1 1 2 3 ) " " is the delimiter between segments the rightmost segment is the basename all segments to the left of the basename form the directory segments moving towards the left represent higher positions in the resource hierarchy , similar to reverse dns notation e g & lt ; org & gt ; & lt ; team & gt ; & lt ; subteam & gt ; & lt ; resource basename & gt ; an empty directory indicates a resource that is located at the root of the hierarchy , e g & lt ; globally scoped resource & gt ; on kubernetes the resource hierarchy is two - levels : namespaces and cluster - scoped ( i e global ) namespace resources fully qualified name is of the form : " & lt ; k 8s namespace & gt ; & lt ; k 8s resource name & gt ; " cluster scoped resources are located at the root of the hierarchy and are of the form : " & lt ; k 8s resource name & gt ; " < code > string name = 1 ; < code >

public builder set name bytes ( com google protobuf byte string value ) { if ( value = = null ) { throw new null pointer exception ( ) ; } check byte string is utf 8 ( value ) ; name = value ; on changed ( ) ; return this ; }


creates the initial snapshot clone entry

public static entry start clone ( snapshot snapshot , snapshot id source , list < index id > indices , long start time , long repository state id , version version ) { return new snapshots in progress entry ( snapshot , true , false , state started , indices , collections empty list ( ) , start time , repository state id , immutable open map of ( ) , null , collections empty map ( ) , version , source , immutable open map of ( ) ) ; }


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


public scheduled events query builder from ( integer from ) { this from = from ; return this ; }


selects the item at the given zero - relative index in the receiver the current selection is first cleared , then the new item is selected < p > if cell selection is enabled , all cells within the item at the given index are selected

public void set selection ( int index ) { check widget ( ) ; if ( index > = 0 & & index < get item count ( ) ) { selected cells clear ( ) ; select cells ( get cells ( index ) ) ; } }


10 : callds 20 - - + 12 : or | 14 : ret | | 20 : or < - - - - - - + 22 : ret simple delay slot flow

public void test backward flow conditional delay slot branch ( ) throws exception { program builder add bytes call with delay slot ( 10 , 20 ) ; program builder add bytes return ( 14 ) ; program builder add bytes fallthrough ( 20 ) ; program builder add bytes return ( 22 ) ; program builder disassemble ( to hex ( 10 ) , 6 , false ) ; program builder disassemble ( to hex ( 20 ) , 4 , false ) ; address addr = address ( 22 ) ; address set address set = new address set ( addr ) ; flow type [ ] flows not to follow = new flow type [ ] { } ; follow flow follow flow = new follow flow ( program , address set , flows not to follow ) ; / / follow all flows address set flow addresses = follow flow get flow to address set ( task monitor adapter dummy monitor ) ; address set expected addresses = new address set ( ) ; expected addresses add ( address ( 10 ) , address ( 13 ) ) ; expected addresses add ( address ( 20 ) , address ( 23 ) ) ; assert equals ( new my selection ( expected addresses ) , new my selection ( flow addresses ) ) ; }


allows the extending class to provide a custom retry policy the default behavior is not to retry

public credentials endpoint retry policy get retry policy ( ) { return credentials endpoint retry policy no retry ; }


compute the storage address associated with a particular location

private address compute storage address ( program location location , function function ) { address storage address = null ; / / make sure what we are over can be mapped to decompiler / / param , local , etc if ( location instanceof variable location ) { variable location var loc = ( variable location ) location ; storage address = var loc get variable ( ) get variable storage ( ) get min address ( ) ; } else if ( location instanceof function parameter field location ) { function parameter field location func p f l = ( function parameter field location ) location ; storage address = func p f l get parameter ( ) get variable storage ( ) get min address ( ) ; } return storage address ; }


suitable for { @ link job # get nearest old build }

public final run t get nearest old build ( int n ) { return builds search ( n , abstract lazy load run map direction desc ) ; }


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


export the property with an incrementing numeric suffix

string export repeated property ( string name , string value ) ;


returns the next pseudorandom , uniformly distributed int value from the given < code > random < code > sequence

public static int next int ( random random ) { return random next int ( ) ; }


the desired minimum time between checks by the background login refresh thread , in seconds

public short login refresh min period seconds ( ) { return login refresh min period seconds ; }


public void menu group changed ( string [ ] menu path , string group ) { if ( menu path ! = null & & menu path length > 1 ) { menu manager mgr = get menu manager ( menu path [ 0 ] ) ; if ( mgr ! = null ) { mgr menu group changed ( menu path , 1 , group ) ; } } }


used to avoid http : bugs sun comview bug do ? bug id = 6558557

private static < t > sorted set < t > cast ( iterable < t > iterable ) { return ( sorted set < t > ) iterable ; }


returns the number of successful shards the search was executed on

public int get successful shards ( ) { return successful shards ; }


public void add rpc processing time ( long processing time ) { rpc processing time add ( processing time ) ; if ( rpc quantile enable ) { for ( mutable quantiles q : rpc processing time quantiles ) { q add ( processing time ) ; } } }


specify a custom prefix to use for json output default is none

public void set json prefix ( string json prefix ) { this json prefix = json prefix ; }


load 4 bytes from the provided array at the indicated offset

static int load 3 2 ( byte [ ] source , int offset ) { / / todo ( user ) : measure the benefit of delegating this to little endian bytes also return ( source [ offset ] & 0x f f ) | ( ( source [ offset + 1 ] & 0x f f ) < < 8 ) | ( ( source [ offset + 2 ] & 0x f f ) < < 16 ) | ( ( source [ offset + 3 ] & 0x f f ) < < 24 ) ; }


derives a default sql type from the corresponding property type

public int get sql type ( string param name ) { int sql type = super get sql type ( param name ) ; if ( sql type ! = type unknown ) { return sql type ; } class < ? > prop type = this bean wrapper get property type ( param name ) ; return statement creator utils java type to sql parameter type ( prop type ) ; }


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


get iterator which skips the stored ranges the iterator next ( ) call return the index starting from 0

synchronized skip range iterator skip range iterator ( ) { return new skip range iterator ( ranges iterator ( ) ) ; }


public void remove first ( ) { data list remove ( 0 ) ; }


return { @ code true } if the script needs { @ code score } calculated , or { @ code false } otherwise


public void add input split ( locatable input split with count split ) { int local count = split get local count ( ) ; if ( min local count = = - 1 ) { / / first split to add this min local count = local count ; this element cycle count = 1 ; this splits offer first ( split ) ; } else if ( local count < min local count ) { / / split with new min local count this next min local count = this min local count ; this min local count = local count ; / / all other splits have more local host than this one this element cycle count = 1 ; splits offer first ( split ) ; } else if ( local count = = min local count ) { this element cycle count + + ; this splits offer first ( split ) ; } else { if ( local count < next min local count ) { next min local count = local count ; } splits offer last ( split ) ; } }


public void test get host ( ) { assertions assert equals ( " 127 0 0 1 " , parameter parser get host ( ) ) ; }


specify a custom hessian remote resolver to use for resolving remote object references

public void set remote resolver ( hessian remote resolver remote resolver ) { this remote resolver = remote resolver ; }


public codegen type get tag ( ) { return codegen type client ; }


convert the given long to a pattern block ( having offset 0 and a full mask ) note : the result will be 8 bytes in length

public static assembly pattern block from long ( long value ) { byte [ ] mask = new byte [ 8 ] ; byte [ ] vals = new byte [ 8 ] ; for ( int i = vals length ; i > = 0 ; i - - ) { mask [ i ] = - 1 ; vals [ i ] = ( byte ) ( value & 0xff ) ; value > > = 8 ; } assembly pattern block res = new assembly pattern block ( 0 , mask , vals ) ; return res ; }


if true , when the maximum number of buttons are checked and an additional button is checked , the last button to be checked is unchecked so that the maximum is not exceeded if false , additional buttons beyond the maximum are not allowed to be checked default is true

public void set uncheck last ( boolean uncheck last ) { this uncheck last = uncheck last ; }


gets the declared output fields for the specified componentstream

public fields get component output fields ( string component id , string stream id ) { fields ret = component to stream to fields get ( component id ) get ( stream id ) ; if ( ret = = null ) { throw new illegal argument exception ( " no output fields defined for component : stream " + component id + " : " + stream id ) ; } return ret ; }


removes from the given string any invalid characters or replaces them with underscores for example : given " a : bc " , the return value would be " a b c "

public static string replace invalid chars ( string str , boolean replace with underscore ) { if ( str = = null ) { return null ; } int len = str length ( ) ; string buffer buf = new string buffer ( len ) ; for ( int i = 0 ; i < len ; + + i ) { char c = str char at ( i ) ; if ( is invalid char ( c ) ) { if ( replace with underscore ) { buf append ( underscore ) ; } } else { buf append ( c ) ; } } return buf to string ( ) ; }


returns the topic anchor name if known , otherwise null

public string get anchor ( ) { return anchor ; }


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

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


helper routine that instantiates a rule class with the given computed default and supporting attributes for the default to reference

private static rule class get rule class with computed default ( attribute computed default ) { return new rule class ( " rule class " , false , false , false , false , false , false , implicit outputs function from templates ( " empty " ) , null , dummy configured target factory , predicates with message < rule > always true ( ) , preferred dependency predicate , advertised provider set empty , null , immutable set < class < ? > > of ( ) , true , attr ( " condition " , boolean ) value ( false ) build ( ) , attr ( " declared 1 " , boolean ) value ( false ) build ( ) , attr ( " declared 2 " , boolean ) value ( false ) build ( ) , attr ( " nonconfigurable " , boolean ) nonconfigurable ( " test " ) value ( false ) build ( ) , computed default ) ; }


returns the key for the specified value , or < tt > not found < tt > if it is not in the map note this traverses the entire map and compares every value , which may be an expensive operation

public int find key ( @ null object value , boolean identity , int not found ) { v [ ] value table = this value table ; if ( value = = null ) { if ( has zero value & & zero value = = null ) return 0 ; int [ ] key table = this key table ; for ( int i = value table length - 1 ; i > = 0 ; i - - ) if ( key table [ i ] ! = 0 & & value table [ i ] = = null ) return key table [ i ] ; } else if ( identity ) { if ( value = = zero value ) return 0 ; for ( int i = value table length - 1 ; i > = 0 ; i - - ) if ( value table [ i ] = = value ) return key table [ i ] ; } else { if ( has zero value & & value equals ( zero value ) ) return 0 ; for ( int i = value table length - 1 ; i > = 0 ; i - - ) if ( value equals ( value table [ i ] ) ) return key table [ i ] ; } return not found ; }


public static double bandwidth m bs ( long bytes , long duration millis n s ) { return duration millis n s > 0 ? ( bytes / 1048576 0 * 1000 / duration millis n s ) : 0 ; }


callback after completion of request processing , that is , after rendering the view will be called on any outcome of handler execution , thus allows for proper resource cleanup note : will only be called if this interceptor ' s { @ code pre handle } method has successfully completed !

void after completion ( web request request , @ nullable exception ex ) throws exception ;


public data flavor get flavor ( ) { return flavor ; }


when the associations breaks between current model and associated models , clear all the associated models ' foreign key value if it exists

private void clear f k value in associated table ( lite pal support base obj ) { list < string > associated table names = base obj get list to clear associated f k ( ) ; for ( string associated table name : associated table names ) { string fk column name = get foreign key column name ( base obj get table name ( ) ) ; content values values = new content values ( ) ; values put null ( fk column name ) ; string where clause = fk column name + " = " + base obj get base obj id ( ) ; m database update ( associated table name , values , where clause , null ) ; } }


add a with redis sentinel hostport to the existing builder

public redis connection config builder with redis sentinel ( string host , int port ) { assert util assert state ( this host = = null , " cannot use with redis mode " ) ; assert util not empty ( host , " host must not be empty " ) ; assert util is true ( is valid port ( port ) , string format ( " port out of range : % s " , port ) ) ; redis sentinels add ( redis host and port of ( host , port ) ) ; return this ; }


called from { @ link # on intercept touch event ( motion event ) } to determine how touch events should be intercepted

result on intercept touch event ( recycler view recycler view , motion event ev ) ;


protected void insert x frame options header ( final http servlet response http servlet response , final http servlet request http servlet request ) { insert x frame options header ( http servlet response , http servlet request , this xframe options ) ; }


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


public synchronized lease allocate ( @ non null file path base , object context ) throws interrupted exception { for ( int i = 1 ; ; i + + ) { file path candidate = i = = 1 ? base : base with suffix ( combinator + i ) ; entry e = in use get ( candidate get remote ( ) ) ; if ( e ! = null & & ! e quick & & e context ! = context ) continue ; return acquire ( candidate , false , context ) ; } }


void handle ( http servlet request request , http servlet response response , block exception e ) throws exception ;


creates a model for a j unit 4 suite this can be expensive ; callers should consider memoizing the result

public test suite model get ( ) { description root = request get runner ( ) get description ( ) ; / / a test class annotated with @ ignore effectively has no test methods , / / which is what is suite ( ) tests for if ( ! root is suite ( ) ) { return builder build ( suite name ) ; } else { return builder build ( suite name , root ) ; } }


looks for files to compile in the given configured target and outputs the corresponding extra action if the filter evaluates to { @ code true }

private void gather actions for file ( configured target configured target , action filter filter , command environment env , action graph action graph , action key context action key context ) throws command line expansion exception , interrupted exception { nested set < artifact > artifacts = output group info get ( configured target ) get output group ( output group info files to compile ) ; if ( artifacts is empty ( ) ) { return ; } for ( artifact artifact : artifacts to list ( ) ) { action analysis metadata action = action graph get generating action ( artifact ) ; if ( filter should output ( action , configured target , env ) ) { if ( action instanceof action ) { detailed extra action info builder detail = detailed extra action info new builder ( ) ; detail set action ( ( ( action ) action ) get extra action info ( action key context ) ) ; summary builder add action ( detail ) ; } } } }


if the previous execution of this task run on a certain node and this task prefers to run on the same node , return that otherwise null

default node get last built on ( ) { return null ; }


public builder set container ( container container ) { this builder container = container ; return this ; }


public static < t > t set class field ( class < t > type , final t obj , final string field name , object field object ) throws exception { field field = type get declared field ( field name ) ; field set accessible ( true ) ; field modifiers field = field class get declared field ( " modifiers " ) ; modifiers field set accessible ( true ) ; modifiers field set int ( field , field get modifiers ( ) & ~ modifier final ) ; field set ( obj , field object ) ; return obj ; }


public void get pet by id ( long pet id , handler < async result < pet > > result handler ) { delegate get pet by id ( pet id , result handler ) ; }


returns how long after the last write to an entry the map will retain that entry

protected long expires after write nanos ( ) { throw new unsupported operation exception ( ) ; }


private void put field key record ( d b record record ) throws i o exception { / / boolean inserted = false ; try { / / ? ? do we need to validate record against schema / / establish root node + + mod count ; field key node root node = null ; if ( root buffer id < 0 ) { root node = schema use fixed key nodes ( ) ? fixed key record node create record node ( node mgr ) : new var key record node ( node mgr , schema get key field type ( ) ) ; } else { root node = get field key node ( root buffer id ) ; } / / put record and update root buffer id field rec key = record get key field ( ) ; field key record node leaf = root node get leaf node ( rec key ) ; root node = leaf put record ( record , is indexed ? this : null ) ; int id = root node get buffer id ( ) ; if ( root buffer id ! = id ) { root buffer id = id ; table record set root buffer id ( root buffer id ) ; } / / note : maximum key is not tracked } finally { / / release node buffers and update record count int delta = node mgr release nodes ( ) ; if ( delta ! = 0 ) { / / inserted = true ; record count + = delta ; table record set record count ( record count ) ; } } }


merges two adjacent runs in place , in a stable fashion the first element of the first run must be greater than the first element of the second run ( a [ base 1 ] > a [ base 2 ] ) , and the last element of the first run ( a [ base 1 + len 1 - 1 ] ) must be greater than all elements of the second run for performance , this method should be called only when len 1 < = len 2 ; its twin , merge hi should be called if len 1 > = len 2 ( either method may be called if len 1 = = len 2 )

private void merge lo ( int base 1 , int len 1 , int base 2 , int len 2 ) { if ( debug ) assert len 1 > 0 & & len 2 > 0 & & base 1 + len 1 = = base 2 ; / / copy first run into temp array t [ ] a = this a ; / / for performance t [ ] tmp = ensure capacity ( len 1 ) ; system arraycopy ( a , base 1 , tmp , 0 , len 1 ) ; int cursor 1 = 0 ; / / indexes into tmp array int cursor 2 = base 2 ; / / indexes int a int dest = base 1 ; / / indexes int a / / move first element of second run and deal with degenerate cases a [ dest + + ] = a [ cursor 2 + + ] ; if ( - - len 2 = = 0 ) { system arraycopy ( tmp , cursor 1 , a , dest , len 1 ) ; return ; } if ( len 1 = = 1 ) { system arraycopy ( a , cursor 2 , a , dest , len 2 ) ; a [ dest + len 2 ] = tmp [ cursor 1 ] ; / / last elt of run 1 to end of merge return ; } comparator < ? super t > c = this c ; / / use local variable for performance int min gallop = this min gallop ; / / " " " " " outer : while ( true ) { int count 1 = 0 ; / / number of times in a row that first run won int count 2 = 0 ; / / number of times in a row that second run won / * * do the straightforward thing until ( if ever ) one run starts winning consistently * / do { if ( debug ) assert len 1 > 1 & & len 2 > 0 ; if ( c compare ( a [ cursor 2 ] , tmp [ cursor 1 ] ) < 0 ) { a [ dest + + ] = a [ cursor 2 + + ] ; count 2 + + ; count 1 = 0 ; if ( - - len 2 = = 0 ) break outer ; } else { a [ dest + + ] = tmp [ cursor 1 + + ] ; count 1 + + ; count 2 = 0 ; if ( - - len 1 = = 1 ) break outer ; } } while ( ( count 1 | count 2 ) < min gallop ) ; / * * one run is winning so consistently that galloping may be a huge win so try that , and continue galloping until ( if * ever ) neither run appears to be winning consistently anymore * / do { if ( debug ) assert len 1 > 1 & & len 2 > 0 ; count 1 = gallop right ( a [ cursor 2 ] , tmp , cursor 1 , len 1 , 0 , c ) ; if ( count 1 ! = 0 ) { system arraycopy ( tmp , cursor 1 , a , dest , count 1 ) ; dest + = count 1 ; cursor 1 + = count 1 ; len 1 - = count 1 ; if ( len 1 < = 1 ) / / len 1 = = 1 | | len 1 = = 0 break outer ; } a [ dest + + ] = a [ cursor 2 + + ] ; if ( - - len 2 = = 0 ) break outer ; count 2 = gallop left ( tmp [ cursor 1 ] , a , cursor 2 , len 2 , 0 , c ) ; if ( count 2 ! = 0 ) { system arraycopy ( a , cursor 2 , a , dest , count 2 ) ; dest + = count 2 ; cursor 2 + = count 2 ; len 2 - = count 2 ; if ( len 2 = = 0 ) break outer ; } a [ dest + + ] = tmp [ cursor 1 + + ] ; if ( - - len 1 = = 1 ) break outer ; min gallop - - ; } while ( count 1 > = min gallop | count 2 > = min gallop ) ; if ( min gallop < 0 ) min gallop = 0 ; min gallop + = 2 ; / / penalize for leaving gallop mode } / / end of " outer " loop this min gallop = min gallop < 1 ? 1 : min gallop ; / / write back to field if ( len 1 = = 1 ) { if ( debug ) assert len 2 > 0 ; system arraycopy ( a , cursor 2 , a , dest , len 2 ) ; a [ dest + len 2 ] = tmp [ cursor 1 ] ; / / last elt of run 1 to end of merge } else if ( len 1 = = 0 ) { throw new illegal argument exception ( " comparison method violates its general contract ! " ) ; } else { if ( debug ) assert len 2 = = 0 ; if ( debug ) assert len 1 > 1 ; system arraycopy ( tmp , cursor 1 , a , dest , len 1 ) ; } }


verify failure on invalid ssl configuration

public void test invalid ssl configuration ( ) throws exception { netty protocol protocol = new no op protocol ( ) ; configuration config = create ssl config ( ) ; / / modify the keystore password to an incorrect one config set string ( security options ssl internal keystore password , " invalidpassword " ) ; netty config netty config = create netty config ( config ) ; netty test util netty server and client server and client = null ; try { server and client = netty test util init server and client ( protocol , netty config ) ; assert fail ( " created server and client from invalid configuration " ) ; } catch ( exception e ) { / / exception should be thrown as expected } netty test util shutdown ( server and client ) ; }


method to capture symbol type that was unexpected as a linker symbol

void witness linker symbol type ( abstract ms symbol symbol ) { if ( ! expected linker symbols contains ( symbol get pdb id ( ) ) ) { / / do nothing for now } }


test the property ' sc a e t h flow points '

public void sc a e t h flow points test ( ) { / / todo : test sc a e t h flow points }


enables integrating hamcrest matchers that match primitive < code > byte < code > arguments note that { @ link # arg that } will not work with primitive < code > byte < code > matchers due to < code > null pointer exception < code > auto - unboxing caveat < p > see examples in javadoc for { @ link mockito hamcrest } class

public static byte byte that ( matcher < byte > matcher ) { report matcher ( matcher ) ; return 0 ; }


public s q l type get type ( ) { return this type ; }


execute the command with the given arguments

int run ( string [ ] args ) throws exception ;


the total time warmer have been executed ( in milliseconds )

public long total time in millis ( ) { return this total time in millis ; }


each implementation of this method should wrap any exceptions in command action execution exception

abstract object execute ( ) throws command action execution exception ;


return a json adapter equal to this , but using { @ code indent } to control how the result is formatted the { @ code indent } string to be repeated for each level of indentation in the encoded document if { @ code indent is empty ( ) } the encoded document will be compact otherwise the encoded document will be more human - readable

public json adapter < t > indent ( final string indent ) { if ( indent = = null ) { throw new null pointer exception ( " indent = = null " ) ; } final json adapter < t > delegate = this ; return new json adapter < t > ( ) { @ override public @ nullable t from json ( json reader reader ) throws i o exception { return delegate from json ( reader ) ; } @ override public void to json ( json writer writer , @ nullable t value ) throws i o exception { string original indent = writer get indent ( ) ; writer set indent ( indent ) ; try { delegate to json ( writer , value ) ; } finally { writer set indent ( original indent ) ; } } @ override boolean is lenient ( ) { return delegate is lenient ( ) ; } @ override public string to string ( ) { return delegate + " indent ( \ " " + indent + " \ " ) " ; } } ; }


public module reference table get module reference table ( ) { return mod ref table ; }


private boolean choose proxy source ( ) { final datanode info target d n = target get datanode info ( ) ; / / if source and target are same nodes then no need of proxy if ( source get datanode info ( ) equals ( target d n ) & & add to ( source ) ) { return true ; } / / if node group is supported , first try add nodes in the same node group if ( cluster is node group aware ( ) ) { for ( storage group loc : reported block get locations ( ) ) { if ( cluster is on same node group ( loc get datanode info ( ) , target d n ) & & add to ( loc ) ) { return true ; } } } / / check if there is replica which is on the same rack with the target for ( storage group loc : reported block get locations ( ) ) { if ( cluster is on same rack ( loc get datanode info ( ) , target d n ) & & add to ( loc ) ) { return true ; } } / / find out a non - busy replica for ( storage group loc : reported block get locations ( ) ) { if ( add to ( loc ) ) { return true ; } } return false ; }


a test method to print out the current user ' s ugi

public static void main ( string [ ] args ) throws exception { system out println ( " getting ugi for current user " ) ; user group information ugi = get current user ( ) ; ugi print ( ) ; system out println ( " ugi : " + ugi ) ; system out println ( " auth method " + ugi user get authentication method ( ) ) ; system out println ( " keytab " + ugi is from keytab ( ) ) ; system out println ( " = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = " ) ; if ( args length = = 2 ) { system out println ( " getting ugi from keytab " ) ; login user from keytab ( args [ 0 ] , args [ 1 ] ) ; get current user ( ) print ( ) ; system out println ( " keytab : " + ugi ) ; user group information login ugi = get login user ( ) ; system out println ( " auth method " + login ugi get authentication method ( ) ) ; system out println ( " keytab " + login ugi is from keytab ( ) ) ; } }


public void remove datanode ( final datanode i d node ) throws unregistered node exception { namesystem write lock ( ) ; try { final datanode descriptor descriptor = get datanode ( node ) ; if ( descriptor ! = null ) { remove datanode ( descriptor , true ) ; } else { name node state change log warn ( " block * remove datanode : " + node + " does not exist " ) ; } } finally { namesystem write unlock ( ) ; } }


converts a list of checkpoints into an array of serialized checkpoint data

public static < t > serialized checkpoint data [ ] from deque ( array deque < tuple 2 < long , set < t > > > checkpoints , type serializer < t > serializer , data output serializer output buffer ) throws i o exception { serialized checkpoint data [ ] serialized checkpoints = new serialized checkpoint data [ checkpoints size ( ) ] ; int pos = 0 ; for ( tuple 2 < long , set < t > > checkpoint : checkpoints ) { output buffer clear ( ) ; set < t > checkpoint ids = checkpoint f 1 ; for ( t id : checkpoint ids ) { serializer serialize ( id , output buffer ) ; } serialized checkpoints [ pos + + ] = new serialized checkpoint data ( checkpoint f 0 , output buffer get copy of buffer ( ) , checkpoint ids size ( ) ) ; } return serialized checkpoints ; }


initializing the log parser , including loading solver parameters from configuration file

void init ( configuration config , history skyline store skyline store ) throws resource estimator exception ;


typo , switch to use { @ link # get dispatcher ( ) }

public string get dispather ( ) { return get dispatcher ( ) ; }


override with any special handling of response codes

protected api response find method response ( api responses responses ) { string code = null ; for ( string response code : responses key set ( ) ) { if ( response code starts with ( " 2 " ) | | response code equals ( " default " ) ) { if ( code = = null | | code compare to ( response code ) > 0 ) { code = response code ; } } } if ( code = = null ) { return null ; } return responses get ( code ) ; }


create a path under the test path provided by the fs contract

protected path path ( string filepath ) throws i o exception { return get file system ( ) make qualified ( new path ( get contract ( ) get test path ( ) , filepath ) ) ; }


returns the class to be invoked in order to send a notification after the job has completed ( successfailure )

public string get job end notification custom notifier class ( ) { return get ( job context mr job end notification custom notifier class ) ; }


{ @ link com alibaba csp sentinel command handler version command handler }

public void test version command ( ) { string http request str = " get / version http / 1 1 " + crlf + " host : localhost : 8719 " + crlf + crlf ; string expected body = constants sentinel version ; process success ( http request str , expected body ) ; }


concurrently add and remove watch , make sure the watches left + the watches removed are equal to the total added watches

public void test remove watcher on path ( string class name ) throws i o exception { i watch manager manager = get watch manager ( class name ) ; int paths = 10 ; int watchers = 10000 ; / / 1 start 5 workers to remove watchers on those path / / record the watchers have been removed atomic integer watches removed = new atomic integer ( ) ; list < remove watcher worker > remove workers = new array list < remove watcher worker > ( ) ; for ( int i = 0 ; i < 5 ; i + + ) { remove watcher worker worker = new remove watcher worker ( manager , paths , watchers , watches removed ) ; remove workers add ( worker ) ; worker start ( ) ; } / / 2 start 5 workers to add different watchers on different path / / record the watchers have been added atomic integer watches added = new atomic integer ( ) ; list < add watcher worker > add workers = new array list < add watcher worker > ( ) ; for ( int i = 0 ; i < 5 ; i + + ) { add watcher worker worker = new add watcher worker ( manager , paths , watchers , watches added ) ; add workers add ( worker ) ; worker start ( ) ; } while ( watches added get ( ) < 100000 ) { try { thread sleep ( 100 ) ; } catch ( interrupted exception e ) { } } / / 3 stop all workers for ( remove watcher worker worker : remove workers ) { worker shutdown ( ) ; } for ( add watcher worker worker : add workers ) { worker shutdown ( ) ; } / / 4 sleep for a while to make sure all the thread exited try { thread sleep ( 500 ) ; } catch ( interrupted exception e ) { } / / 5 make sure left watches + removed watches = added watches assert true ( watches added get ( ) > 0 ) ; assert true ( watches removed get ( ) > 0 ) ; assert true ( manager size ( ) > 0 ) ; assert equals ( watches added get ( ) , watches removed get ( ) + manager size ( ) ) ; }


gets a boolean at the specified absolute ( @ code index ) in this buffer this method does not modify the { @ code reader index } or { @ code writer index } of this buffer

public abstract boolean get boolean ( int index ) ;


regression test : error on clear maybe dirty value same as the previous test , but the second evaluation is keep going , which should cause an access of the children of top key

public void incomplete direct deps are cleared before keep going ( ) throws exception { initialize tester ( ) ; count down latch slow start = new count down latch ( 1 ) ; count down latch error finish = new count down latch ( 1 ) ; sky key error key = graph tester to sky key ( " error " ) ; tester get or create ( error key ) set builder ( new chained function ( / * notify start = * / null , / * wait to finish = * / slow start , / * notify finish = * / error finish , / * wait for exception = * / false , / * value = * / null , / * deps = * / immutable list < sky key > of ( ) ) ) ; sky key slow key = graph tester to sky key ( " slow " ) ; tester get or create ( slow key ) set builder ( new chained function ( / * notify start = * / slow start , / * wait to finish = * / error finish , / * notify finish = * / null , / * wait for exception = * / true , new string value ( " slow " ) , / * deps = * / immutable list < sky key > of ( ) ) ) ; sky key mid key = graph tester to sky key ( " mid " ) ; tester get or create ( mid key ) add dependency ( slow key ) set computed value ( copy ) ; sky key top key = graph tester to sky key ( " top " ) ; tester get or create ( top key ) add dependency ( mid key ) add dependency ( error key ) set computed value ( concatenate ) ; / / slow key starts - > error key finishes , written to graph - > slow key finishes & ( visitor aborts ) / / - > top key builds evaluation result < string value > result = tester eval ( / * keep going = * / false , top key ) ; assert that evaluation result ( result ) has singleton error that ( top key ) ; / / make sure mid key didn ' t finish building assert that ( tester get existing value ( mid key ) ) is null ( ) ; / / give slow key a nice ordinary builder tester get or create ( slow key , / * mark as modified = * / false ) set builder ( null ) set constant value ( new string value ( " slow " ) ) ; / / put mid key into the graph it won ' t have a reverse dependence on top key tester eval and get ( / * keep going = * / false , mid key ) ; / / top key should not access mid key as if it were already registered as a dependency / / we don ' t invalidate errors , but because top key wasn ' t actually written to the graph last / / build , it should be rebuilt here tester eval ( / * keep going = * / true , top key ) ; }


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


creates a replaying connectable observable with a time bound buffer

public static < t > connectable observable < t > create ( observable source < t > source , long max age , time unit unit , scheduler scheduler , boolean eager truncate ) { return create ( source , max age , unit , scheduler , integer max value , eager truncate ) ; }


finalizes the configuration and checks validity

public jdbc output format finish ( ) { return new jdbc output format ( new simple jdbc connection provider ( build connection options ( ) ) , query , types array , batch size ) ; }


accepts all visitors but honors only hayes visitor

public void accept ( modem visitor modem visitor ) { if ( modem visitor instanceof hayes visitor ) { ( ( hayes visitor ) modem visitor ) visit ( this ) ; } else { logger info ( " only hayes visitor is allowed to visit hayes modem " ) ; } }


returns the elements of the owning set sorted by their values of this attribute

public keyed object [ ] to sorted array ( ) { keyed object [ ] keyed objects = this owning set ( ) to array ( ) ; arrays sort ( keyed objects , new long comparator ( ) ) ; return keyed objects ; }


returns { @ code true } if this object is a child or descendant of the specified { @ code potential parent } parameter

public boolean is descendant of ( fsrl potential parent ) { if ( is equivalent ( potential parent ) ) { return false ; } list < fsrl > split = split ( ) ; for ( int i = split size ( ) - 1 ; i > = 0 ; i - - ) { fsrl my part = split get ( i ) ; if ( my part get f s ( ) equals ( potential parent get f s ( ) ) & & ( system utilities is equal ( my part get path ( ) , potential parent get path ( ) ) | | is parent path ( potential parent get path ( ) , my part get path ( ) ) ) ) { return true ; } } return false ; }


returns the lowest value ( exclusive ) of the leading source

comparable get lower value lead source ( ) { return after key is set ? arrays [ 0 ] get after ( ) : null ; }


public void add pet test ( ) { pet body = null ; / / api add pet ( body ) ; / / todo : test validations }


@ test public void delay response ( ) throws i o exception { test util assume not windows ( ) ; server enqueue ( new mock response ( ) set body ( " abcdef " ) set body delay ( 1 , seconds ) ) ; long start nanos = system nano time ( ) ; u r l connection connection = server url ( " / " ) url ( ) open connection ( ) ; input stream in = connection get input stream ( ) ; assert that ( in read ( ) ) is equal to ( ' a ' ) ; long elapsed nanos = system nano time ( ) - start nanos ; long elapsed millis = nanoseconds to millis ( elapsed nanos ) ; assert that ( elapsed millis ) is greater than or equal to ( 1000l ) ; in close ( ) ; }


sets or clears the reporter for outputting verbose info

synchronized void set reporter ( @ nullable event handler reporter ) { this reporter = reporter ; }


requests the namenode to tell all datanodes to use a new , non - persistent bandwidth value for dfs datanode balance bandwidth per sec the bandwidth parameter is the max number of bytes per second of network bandwidth to be used by a datanode during balancing

public void set balancer bandwidth ( long bandwidth ) throws i o exception { dfs set balancer bandwidth ( bandwidth ) ; }


decode { @ code } len bytes ( values and mask ) in big - endian format , beginning at { @ code start }

public masked long read bytes ( int start , int len ) { return masked long from mask and value ( read mask bytes ( start , len ) , read val bytes ( start , len ) ) ; }


calculates the crc 3 2 based on a byte [ ]

private byte [ ] calculate c r c 3 2 ( byte [ ] data ) { crc32 checksum = new crc32 ( ) ; checksum update ( data ) ; long result = checksum get value ( ) ; return byte buffer allocate ( 4 ) put int ( ( int ) result ) array ( ) ; }


public long get restart delay m s ( ) { if ( can restart ( ) ) { return restart delay m s ; } else { throw new illegal state exception ( " cannot get restart delay when the restarting is suppressed " ) ; } }


returns an ascii string of < code > length < code > bytes starting at < code > index < code > this method does not care about null - terminators

public string read ascii string ( long index , int length ) throws i o exception { string buffer buffer = new string buffer ( ) ; for ( int i = 0 ; i < length ; + + i ) { byte b = provider read byte ( index + + ) ; buffer append ( ( char ) ( b & 0x 0 0 f f ) ) ; } return buffer to string ( ) trim ( ) ; }


alter saslscram credentials for the given users this is a convenience method for { @ link # alter user scram credentials ( list , alter user scram credentials options ) }

default alter user scram credentials result alter user scram credentials ( list < user scram credential alteration > alterations ) { return alter user scram credentials ( alterations , new alter user scram credentials options ( ) ) ; }


adds the actions in < tt > new action list < tt > to < tt > action list < tt > while the size of < tt > action list < tt > is less than the given { @ link # max delete actions }

private void add actions to list ( list < docking action if > action list , list < docking action if > new action list , int max action count ) { for ( int i = 0 ; i < new action list size ( ) & & action list size ( ) < max action count ; i + + ) { action list add ( new action list get ( i ) ) ; } }


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


returns < tt > true < tt > if the two specified arrays contain the same object in every position unlike the { @ link arrays # equals ( object [ ] , object [ ] ) } method , this method compares using reference equals

static boolean array same ( object [ ] array 1 , object [ ] array 2 ) { if ( array 1 = = null | | array 2 = = null | | array 1 length ! = array 2 length ) { throw new illegal argument exception ( " array 1 and array 2 cannot be null and should have same length " ) ; } for ( int i = 0 ; i < array 1 length ; i + + ) { if ( array 1 [ i ] ! = array 2 [ i ] ) { return false ; } } return true ; }


set the listener that will be notified when changes are made and when the block move is completed

void set move block listener ( move block listener listener ) { this listener = listener ; }


tests safemode get with view f s overload scheme , but without any mount links configured the view f s overload scheme should consider initialized fs as fallback fs automatically

public void test get safemode without mount links configured ( ) throws exception { final d f s admin dfs admin = new d f s admin ( conf ) ; try { redirect stream ( ) ; int ret = tool runner run ( dfs admin , new string [ ] { " - fs " , default f s u r i to string ( ) , " - safemode " , " get " } ) ; assert out msg ( " safe mode is off " , 0 ) ; assert equals ( 0 , ret ) ; } finally { dfs admin close ( ) ; } }


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


helper method to determine a { @ link org apache calcite rel core calc } ' s collation

public static list < rel collation > calc ( rel metadata query mq , rel node input , rex program program ) { final list < rex node > projects = program get project list ( ) stream ( ) map ( program : : expand local ref ) collect ( collectors to list ( ) ) ; return project ( mq , input , projects ) ; }


returns a json containing all parameters in this params the json should be human - readable if possible

public string to json ( ) { assert mapper inited ( ) ; try { return mapper write value as string ( params ) ; } catch ( json processing exception e ) { throw new runtime exception ( " failed to serialize params to json " , e ) ; } }


turn a parameter name , operation name into an ada identifier ada programming standard avoid the camelcase syntax and prefer the underscore notation we also have to make sure the identifier is not a reserved keyword when this happens , we add the configurable prefix the function translates : body - p body pet id - pet id update pet with form - update pet with form

protected string to ada identifier ( string name , string prefix ) { / / we cannot use reserved keywords for identifiers if ( is reserved word ( name ) ) { logger warn ( " identifier ' " + name + " ' is a reserved word , renamed to " + prefix + name ) ; name = prefix + name ; } string builder result = new string builder ( ) ; boolean need upper case = true ; boolean prev upper case = false ; if ( name is empty ( ) | | character is digit ( name char at ( 0 ) ) | | name char at ( 0 ) = = ' ' ) { result append ( prefix ) ; } for ( int i = 0 ; i < name length ( ) ; i + + ) { char c = name char at ( i ) ; boolean is upper or digit = character is upper case ( c ) | | character is digit ( c ) ; if ( need upper case ) { need upper case = false ; prev upper case = is upper or digit ; result append ( character to upper case ( c ) ) ; } else if ( is upper or digit ) { if ( ! prev upper case ) { result append ( ' ' ) ; } result append ( c ) ; need upper case = false ; prev upper case = true ; } else { result append ( c ) ; prev upper case = is upper or digit ; if ( c = = ' ' ) { need upper case = true ; } } } return result to string ( ) ; }


returns true if this size of this accumulator is greater than or equal to the given maximum size

public boolean has reached size limit ( ) { return accumulator size ( ) > = max size ; }


returns the index of minimum value between { @ code index } and { @ code index + len } , or { @ code - 1 } if { @ code index } is greater than { @ code size }

int find min ( int index , int len ) { if ( index > = size ) { return - 1 ; } check state ( index > 0 ) ; int limit = math min ( index , size - len ) + len ; int min index = index ; for ( int i = index + 1 ; i < limit ; i + + ) { if ( compare elements ( i , min index ) < 0 ) { min index = i ; } } return min index ; }


{ @ link invocation listener } instances attached to this mock , see { @ link org mockito mock settings # invocation listeners ( invocation listener ) }

list < invocation listener > get invocation listeners ( ) ;


private void create version 3 ( ) throws i o exception { local managed buffer file vbf = null ; local managed buffer file save file = null ; try { / / open private file for version update vbf = new local managed buffer file ( versioned test file mgr , true , - 1 , versioned ) ; save file = ( local managed buffer file ) vbf get save file ( ) ; assert not null ( save file ) ; long pfile i d = vbf get file id ( ) ; assert true ( pfile i d ! = 0 ) ; / / write application level change file write app change file ( vbf ) ; / / modify save file byte [ ] data = new byte [ buffer size ] ; data buffer buf = new data buffer ( data ) ; arrays fill ( data , ( byte ) 0xf 2 ) ; / / modified empty buffer buf set id ( 12 ) ; save file put ( buf , 2 ) ; arrays fill ( data , ( byte ) 0xf 3 ) ; / / new buffer buf set id ( 13 ) ; save file put ( buf , 3 ) ; arrays fill ( data , ( byte ) 0xf 4 ) ; / / new buffer - added to free list below buf set id ( 14 ) ; save file put ( buf , 4 ) ; arrays fill ( data , ( byte ) 0xf 5 ) ; / / new buffer buf set id ( 13 ) ; save file put ( buf , 5 ) ; arrays fill ( data , ( byte ) 0xf 6 ) ; / / new buffer - added to free list below buf set id ( 16 ) ; save file put ( buf , 6 ) ; arrays fill ( data , ( byte ) 0xf 7 ) ; / / new buffer buf set id ( 17 ) ; save file put ( buf , 7 ) ; arrays fill ( data , ( byte ) 0xf 8 ) ; / / new buffer - added to free list below buf set id ( 18 ) ; save file put ( buf , 8 ) ; arrays fill ( data , ( byte ) 0xf 9 ) ; / / new buffer buf set id ( 19 ) ; save file put ( buf , 9 ) ; / / set free id list for output file int [ ] new free list = new int [ ] { 0 , 4 , 6 } ; save file set free indexes ( new free list ) ; / / copy / set file parameters save file set parameter ( " test parm 1 " , 0x 3 2 9 ) ; save file set parameter ( " test parm 2 " , 0x 5 4 9 ) ; save file set parameter ( " test parm 3 " , 0x 6 7 9 ) ; vbf save completed ( true ) ; vbf close ( ) ; vbf = null ; save file close ( ) ; save file = null ; assert equals ( 2 , private test file mgr get current version ( ) ) ; assert true ( private test file mgr get buffer file ( 2 ) exists ( ) ) ; assert true ( private test file mgr get change data file ( 2 ) exists ( ) ) ; } finally { if ( save file ! = null ) { try { vbf save completed ( false ) ; save file close ( ) ; } catch ( i o exception e ) { / / ignore } } if ( vbf ! = null ) { try { vbf close ( ) ; } catch ( i o exception e ) { / / ignore } } } }


set the selector that decides which node can run this request

public void set node selector ( node selector node selector ) { this node selector = node selector ; }


can be used to collect objects from the iterable is a terminating operation

public final fluent iterable < e > last ( int count ) { var remaining elements count = get remaining elements count ( ) ; var iterator = iterator ( ) ; var current index = 0 ; while ( iterator has next ( ) ) { iterator next ( ) ; if ( current index < remaining elements count - count ) { iterator remove ( ) ; } current index + + ; } return this ; }


returns true if per object debug info are specified and supported by the crosstool for the build implied by the given configuration , toolchain and feature configuration

public boolean should create per object debug info ( feature configuration feature configuration , cpp configuration cpp configuration ) { return cpp configuration fission is active for current compilation mode ( ) & & feature configuration is enabled ( cpp rule classes per object debug info ) ; }


get the angle in radians of the rotation around the specified axis the axis must be normalized

public float get angle around rad ( final float axis x , final float axis y , final float axis z ) { final float d = vector 3 dot ( this x , this y , this z , axis x , axis y , axis z ) ; final float l 2 = quaternion len 2 ( axis x * d , axis y * d , axis z * d , this w ) ; return math utils is zero ( l 2 ) ? 0f : ( float ) ( 2 0 * math acos ( math utils clamp ( ( float ) ( ( d < 0 ? - this w : this w ) / math sqrt ( l 2 ) ) , - 1f , 1f ) ) ) ; }


returns information for the current i d generator


< code > optional string value = 1 ; < code >

public java lang string get value ( ) { return value ; }


return true if the iterator has a previous index

public boolean has previous ( ) { if ( does have previous ) { return true ; } find previous ( ) ; return does have previous ; }


public fake data append read error ( i o exception exception ) { segments add ( new segment ( exception , get last segment ( ) ) ) ; return this ; }


sets the settings for filtering out terms

public term vectors request builder set filter settings ( term vectors request filter settings filter settings ) { request filter settings ( filter settings ) ; return this ; }


schema schema ( ) { if ( schema = = null ) { synchronized ( this ) { if ( schema = = null ) { schema = new schema ( datasource , context , strict trace id ) ; } } } return schema ; }


< code > optional aapt pb array array = 4 ; < code >

private void set array ( com android aapt resources array value ) { if ( value = = null ) { throw new null pointer exception ( ) ; } array = value ; bit field 0 | = 0x 0 0 0 0 0 0 0 8 ; }


public synchronized set < string > get children ( ) { if ( children = = null ) { return empty set ; } return collections unmodifiable set ( children ) ; }


merge from another component into this component without overwriting

public void merge from ( component that ) { if ( this get artifact ( ) = = null ) { this set artifact ( that get artifact ( ) ) ; } if ( this get resource ( ) = = null ) { this set resource ( that get resource ( ) ) ; } if ( this get number of containers ( ) = = null ) { this set number of containers ( that get number of containers ( ) ) ; } if ( this get launch command ( ) = = null ) { this set launch command ( that get launch command ( ) ) ; } this get configuration ( ) merge from ( that get configuration ( ) ) ; if ( this get quicklinks ( ) = = null ) { this set quicklinks ( that get quicklinks ( ) ) ; } if ( this get run privileged container ( ) = = null ) { this set run privileged container ( that get run privileged container ( ) ) ; } if ( this get dependencies ( ) = = null ) { this set dependencies ( that get dependencies ( ) ) ; } if ( this get placement policy ( ) = = null ) { this set placement policy ( that get placement policy ( ) ) ; } if ( this get readiness check ( ) = = null ) { this set readiness check ( that get readiness check ( ) ) ; } }


public void remove all ( ) { if ( elements ! = null ) { for ( list element element : elements ) { element dispose ( ) ; } } elements = elements empty ; selected element index = none ; widest label index = none ; top visible index = none ; bottom visible index = none ; }


sets the url of the icon the icon should look good even if scaled down to 1 6x 1 6 this is optional ; if not set , it will instead use the value passed to { @ link # set icon name ( string ) }

public builder set icon url ( string icon url ) { this icon url = icon url ; return this ; }


gets the default mime type , which is { @ code " applicationoctet - stream " }

public static string get default mime type ( ) { return default mime type ; }


public static void init ( ) { if ( named writeable registry = = null ) { named writeable registry = new named writeable registry ( geo shape type get shape writeables ( ) ) ; } }


adds the specified path to the end of the path search list

public static boolean add path ( string path ) { if ( path list index of ( path ) = = - 1 ) { path list add ( path ) ; return true ; } return false ; }


o auth 2 0 access token create ( service service , authentication authentication , collection < string > scopes , string client id , map < string , map < string , object > > request claims ) ;


returns the value nearest to { @ code value } which is within the closed range { @ code [ min max ] } if { @ code value } is within the range { @ code [ min max ] } , { @ code value } is returned unchanged if { @ code value } is less than { @ code min } , { @ code min } is returned , and if { @ code value } is greater than { @ code max } , { @ code max } is returned

public static long constrain to range ( long value , long min , long max ) { check argument ( min < = max , " min ( % s ) must be less than or equal to max ( % s ) " , min , max ) ; return math min ( math max ( value , min ) , max ) ; }


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


returns the weighted in - degree of this vertex the in - degree is the sum of weights of all enges entering this vertex

public double in degree ( vertex v ) { double degree = 0 0 ; edge [ ] edges = this incoming edges ( v ) ; int length = edges length ; for ( int i = 0 ; i < length ; i + + ) { try { degree + = weights ( ) get value ( edges [ i ] ) ; } catch ( no value exception exc ) { degree + = default value ; } } return degree ; }


return the { @ link configurable web binding initializer } to use for initializing all { @ link web data binder } instances

protected configurable web binding initializer get configurable web binding initializer ( formatting conversion service web flux conversion service , validator web flux validator ) { configurable web binding initializer initializer = new configurable web binding initializer ( ) ; initializer set conversion service ( web flux conversion service ) ; initializer set validator ( web flux validator ) ; message codes resolver message codes resolver = get message codes resolver ( ) ; if ( message codes resolver ! = null ) { initializer set message codes resolver ( message codes resolver ) ; } return initializer ; }


sets a delegate for handling the next callback to this listener cleared after invoked

public void set next event delegate ( web socket listener delegate ) { this delegate = delegate ; }


template method which can be overridden to add servlet - specific refresh work called after successful context refresh this implementation is empty

protected void on refresh ( application context context ) { / / for subclasses : do nothing by default }


create an instance for the given stomp command

public static stomp header accessor create ( stomp command command ) { return new stomp header accessor ( command , null ) ; }


returns whether the lines match between this instance and the one given

public boolean same line ( source position other ) { return ( line = = other line ) ; }


generate an indirect pcodeop operation representing an unknown state for an affected varnode resulting from a function call at the specified seq

private varnode operation get invalidated varnode ( sequence number seq , varnode affect varnode ) { pcode op op = new pcode op ( seq , pcode op indirect , 0 , affect varnode ) ; return new varnode operation ( op , op get inputs ( ) ) ; }


optionally hide this part of the command line from being printed to the log

public argument list builder add ( string a , boolean mask ) { if ( a ! = null ) { if ( mask ) { this mask set ( args size ( ) ) ; } args add ( a ) ; } return this ; }


unset erasure coding policy from the given directory

static file status unset erasure coding policy ( final f s namesystem fsn , final string src arg , final f s permission checker pc , final boolean log retry cache ) throws i o exception { assert fsn has write lock ( ) ; string src = src arg ; f s directory fsd = fsn get f s directory ( ) ; final i nodes in path iip ; list < x attr > x attrs ; fsd write lock ( ) ; try { iip = fsd resolve path ( pc , src , dir op write link ) ; / / write access is required to unset erasure coding policy if ( fsd is permission enabled ( ) ) { fsd check path access ( pc , iip , fs action write ) ; } src = iip get path ( ) ; x attrs = remove erasure coding policy x attr ( fsn , iip ) ; } finally { fsd write unlock ( ) ; } if ( x attrs ! = null ) { fsn get edit log ( ) log remove x attrs ( src , x attrs , log retry cache ) ; } else { throw new no e c policy set exception ( " no erasure coding policy explicitly set on " + src ) ; } return fsd get audit file info ( iip ) ; }


returns the distinct string that should be used in creating output directories for a configuration with this distinguisher

public string get file system name ( ) { return file system name ; }


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


public task attempt i d get task attempt i d ( ) { return ( task attempt i d ) super get task attempt i d ( ) ; }


public string get message ( ) { return this cause to string ( ) ; }


subtract { @ code rhs } from { @ code lhs } and reset any negative values to zero this call will modify { @ code lhs }

public static resource subtract from non negative ( resource lhs , resource rhs ) { subtract from ( lhs , rhs ) ; if ( lhs get memory size ( ) < 0 ) { lhs set memory size ( 0 ) ; } if ( lhs get virtual cores ( ) < 0 ) { lhs set virtual cores ( 0 ) ; } return lhs ; }


perform a commit or message acknowledgement , as appropriate

protected void commit if necessary ( session session , @ nullable message message ) throws j m s exception { / / commit session or acknowledge message if ( session get transacted ( ) ) { / / commit necessary - but avoid commit call within a jta transaction if ( is session locally transacted ( session ) ) { / / transacted session created by this container - > commit jms utils commit if necessary ( session ) ; } } else if ( message ! = null & & is client acknowledge ( session ) ) { message acknowledge ( ) ; } }


returns true if the file exists on android , a { @ link file type # classpath } or { @ link file type # internal } handle to a directory will always return false

public boolean exists ( ) { throw new gdx runtime exception ( " stub " ) ; }


public void array of string test ( ) { / / todo : test array of string }


returns a list of providers of the specified class , fetched from the given list of { @ link java info } s returns an empty list if no providers can be fetched returns a list of the same size as the given list if the requested providers are of type java compilation args provider

public static < t extends transitive info provider > immutable list < t > fetch providers from list ( iterable < java info > java providers , class < t > provider class ) { return stream providers ( java providers , provider class ) collect ( immutable list to immutable list ( ) ) ; }


marks the current position , so that the position may return to this point later by calling < code > reset ( ) < code >

public final buffer mark ( ) { mark = position ; return this ; }


process the entry point section of the xml file

void read ( xml pull parser parser , task monitor monitor ) throws s a x parse exception , cancelled exception { undefined register names = new hash set < string > ( ) ; xml element element = parser next ( ) ; if ( ! element is start ( ) | | ! element get name ( ) equals ( " register values " ) ) { throw new s a x parse exception ( " expected register values start tag " , null , null , parser get line number ( ) , parser get column number ( ) ) ; } element = parser next ( ) ; while ( element ! = null & & element is start ( ) & & element get name ( ) equals ( " register value range " ) ) { if ( monitor is cancelled ( ) ) { throw new cancelled exception ( ) ; } process register values ( element , parser ) ; element = parser next ( ) ; if ( element is start ( ) | | ! element get name ( ) equals ignore case ( " register value range " ) ) { throw new s a x parse exception ( " expected register value range end tag " , null , null , parser get line number ( ) , parser get column number ( ) ) ; } / / read next tag element = parser next ( ) ; } if ( element ! = null & & ! element get name ( ) equals ( " register values " ) ) { throw new s a x parse exception ( " expected register values end tag " , null , null , parser get line number ( ) , parser get column number ( ) ) ; } }


perform a { @ link r socket # fire and forget fire and forget } sending the provided data and metadata


public void test retry a w s connectivity ( ) throws throwable { final atomic integer counter = new atomic integer ( 0 ) ; invoker retry ( " test " , null , false , ( ) - > { if ( counter increment and get ( ) < active retry limit ) { throw client timeout exception ; } } ) ; assert equals ( active retry limit , counter get ( ) ) ; }


get compiler settings as a map this is used to inject compiler settings into augmented methods with the { @ code @ inject constant } annotation

public map < string , object > as map ( ) { int regex limit factor = this regex limit factor ; if ( regexes enabled = = regex enabled true ) { regex limit factor = augmentation unlimited pattern factor ; } else if ( regexes enabled = = regex enabled false ) { regex limit factor = augmentation disabled pattern factor ; } map < string , object > map = new hash map < > ( ) ; map put ( " regex limit factor " , regex limit factor ) ; / / for testing only map put ( " test inject 0 " , test inject 0 ) ; map put ( " test inject 1 " , test inject 1 ) ; map put ( " test inject 2 " , test inject 2 ) ; return map ; }


public date get date ( int column index ) throws s q l exception { return null ; }


measures the source , and sets the size based on them maintains aspect ratio of source , and ensures that screen is filled in at least one dimension adapted from com facebook cameracore common render util # calculate fit rect

private void scale ( int view port width , int view port height , int source width , int source height ) { float input ratio = ( ( float ) source width ) / source height ; float output ratio = ( ( float ) view port width ) / view port height ; int scaled width = view port width ; int scaled height = view port height ; if ( output ratio > input ratio ) { / / not enough width to fill the output ( black bars on left and right ) scaled width = ( int ) ( view port height * input ratio ) ; scaled height = view port height ; } else if ( output ratio < input ratio ) { / / not enough height to fill the output ( black bars on top and bottom ) scaled height = ( int ) ( view port width / input ratio ) ; scaled width = view port width ; } float scale = scaled width / ( float ) source width ; m mid x = ( ( view port width - scaled width ) / 2f ) / scale ; m mid y = ( ( view port height - scaled height ) / 2f ) / scale ; }


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

t visit from clause ( sql base parser from clause context ctx ) ;


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


try to mark the { @ link promise } as success and log if { @ code logger } is not { @ code null } in case this fails

public static < v > void try success ( promise < ? super v > p , v result , internal logger logger ) { if ( ! p try success ( result ) & & logger ! = null ) { throwable err = p cause ( ) ; if ( err = = null ) { logger warn ( " failed to mark a promise as success because it has succeeded already : { } " , p ) ; } else { logger warn ( " failed to mark a promise as success because it has failed already : { } , unnotified cause : " , p , err ) ; } } }


returns the original element list , unchanged

public list < string > order ( list < string > insertion order ) { return insertion order ; }


formats the location as { @ code " file : line : col " } if the column is zero , it is omitted if the line is also zero , it too is omitted

public string to string ( ) { string builder buf = new string builder ( ) ; buf append ( file ) ; if ( line ! = 0 ) { buf append ( ' : ' ) append ( line ) ; if ( column ! = 0 ) { buf append ( ' : ' ) append ( column ) ; } } return buf to string ( ) ; }


sets up python for the given java project

public static void setup python for project ( i java project java project , list < i classpath entry > classpath entries , string jython interpreter name , i progress monitor monitor ) throws core exception , no class def found error , no such method error { python nature remove nature ( java project get project ( ) , monitor ) ; if ( jython interpreter name ! = null ) { string libs = classpath entries stream ( ) map ( e - > e get path ( ) to o s string ( ) ) collect ( collectors joining ( " | " ) ) ; python nature add nature ( java project get project ( ) , monitor , i python nature jython version 2 7 , null , libs , jython interpreter name , null ) ; } }


tells a plugin to write any data - independent ( preferences ) properties to the output stream

public void write config state ( save state save state ) { / / do nothing by default ; subclasses should override as needed }


convenience version of { @ code get annotations from parent class ( class , method ) } that uses the declaring class of the method

public static starlark method get starlark method ( method method ) { return get starlark method ( method get declaring class ( ) , method ) ; }


displays a dialog for the user to enter a string value on a single line

public static string show input single line dialog ( component parent , string title , string label , string initial value ) { return swing run now ( ( ) - > { input dialog dialog = new input dialog ( title , label , initial value , true ) ; / / apply similar settings to that of the option dialog , for consistency dialog set remember location ( false ) ; dialog set remember size ( false ) ; docking window manager show dialog ( parent , dialog ) ; if ( dialog is canceled ( ) ) { return null ; } return dialog get value ( ) ; } ) ; }


a sensible definition of { @ link # sub set ( object , boolean , object , boolean ) } in terms of the { @ code head set } and { @ code tail set } methods in many cases , you may wish to override { @ link # sub set ( object , boolean , object , boolean ) } to forward to this implementation

protected navigable set < e > standard sub set ( e from element , boolean from inclusive , e to element , boolean to inclusive ) { return tail set ( from element , from inclusive ) head set ( to element , to inclusive ) ; }


print a collection of parse trees to the debug printer

protected static void dbg print trees ( collection < assembly parse result > trees ) { dbg println ( " got " + trees size ( ) + " tree ( s ) " ) ; set < string > suggestions = new tree set < > ( ) ; for ( assembly parse result result : trees ) { if ( ! result is error ( ) ) { assembly parse accept result acc = ( assembly parse accept result ) result ; assembly parse tree node tree = acc get tree ( ) ; tree print ( dbg ) ; } else { assembly parse error result err = ( assembly parse error result ) result ; dbg println ( err ) ; if ( err get buffer ( ) equals ( " " ) ) { suggestions add all ( err get suggestions ( ) ) ; } } } dbg println ( " proposals : " + suggestions ) ; }


runs the given runnable strictly after all runnables that were submitted before it , and using the { @ code executor } passed to the constructor

public void execute ( runnable r ) { run queue add ( check not null ( r , " ' r ' must not be null " ) ) ; schedule ( r ) ; }