dump all the bytes in the given data buffer , and returns them as a byte array note that this method reads the entire buffer into the heap , which might consume a lot of memory

public static byte [ ] dump bytes ( data buffer buffer ) { assert not null ( buffer , " ' buffer ' must not be null " ) ; byte [ ] bytes = new byte [ buffer readable byte count ( ) ] ; buffer read ( bytes ) ; return bytes ; }


public string get old value ( ) { return old value ; }


returns a map like { @ link # new map } that does not accept < code > null < code > keys

public static < k , v > object object hash map < k , v > new no null keys map ( ) { return new no null keys map ( 16 ) ; }


subtracts the given values from this color ' s component values

public color sub ( float r , float g , float b , float a ) { this r - = r ; this g - = g ; this b - = b ; this a - = a ; return clamp ( ) ; }


public void set ( injectable injectable , t value ) { injectable inject ( key , new precomputed value ( value ) ) ; }


style the specified value according to default conventions

public static string style ( object value ) { return default value styler style ( value ) ; }


public < t > future < t > submit ( runnable task , t result ) { submitted mark ( ) ; return delegate submit ( new instrumented runnable ( task ) , result ) ; }


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


public static void print bit skipped ( final long b ) { out println ( ) ; out println ( " b = " + long 2string ( b ) + " ( " + ( b < 2 ? " bit " : " bits " ) + " skipped ) " ) ; }


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


public void add subchannel ( internal instrumented < channel stats > subchannel ) { add ( subchannels , subchannel ) ; }


set indicator color ( 0x f f 0 0 f f 0 0 ) or set indicator color ( color blue ) or set indicator color ( color parse color ( " # ff4081 " ) ) or set indicator color ( 0x f f 0 0 f f 0 0 ) or set indicator color ( get resources ( ) get color ( android r color black ) )

public void set indicator color ( int color ) { this m indicator color = color ; m indicator set color ( color ) ; }


returns the directory that the nodes are stored in

private file get nodes dir ( ) throws i o exception { final file nodes dir = new file ( jenkins get root dir ( ) , " nodes " ) ; if ( ! nodes dir is directory ( ) & & ! nodes dir mkdirs ( ) ) { throw new i o exception ( string format ( " could not mkdirs % s " , nodes dir ) ) ; } return nodes dir ; }


removes the indicated range of values from the list this will remove any ranges or portion of ranges that overlap the indicated range

public void remove range ( int min , int max ) { range key = new range ( min , min ) ; sorted set < range > head set = set head set ( key ) ; if ( ! head set is empty ( ) ) { range last = head set last ( ) ; if ( last max > = min ) { if ( max < last max ) { set add ( new range ( max + 1 , last max ) ) ; last max = math min ( last max , min - 1 ) ; return ; } last max = math min ( last max , min - 1 ) ; } } iterator < range > it = set tail set ( key ) iterator ( ) ; while ( it has next ( ) ) { range next = it next ( ) ; if ( next min > max ) { break ; } else if ( next max > max ) { next min = max + 1 ; break ; } it remove ( ) ; } }


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


the extra interfaces the mock object should implement

set < class < ? > > get extra interfaces ( ) ;


returns the common prefix of variables for enum naming if two or more variables are present

public string find common prefix of vars ( list < object > vars ) { if ( vars size ( ) > 1 ) { try { string [ ] list str = vars to array ( new string [ vars size ( ) ] ) ; string prefix = string utils get common prefix ( list str ) ; / / exclude trailing characters that should be part of a valid variable / / e g [ " status - on " , " status - off " ] = > " status - " ( not " status - o " ) return prefix replace all ( " [ a - z a - z0 - 9 ] + \ \ z " , " " ) ; } catch ( array store exception e ) { / / do nothing , just return default value } } return " " ; }


public list < big decimal > get array number ( ) { return array number ; }


called when building executables or packages to fill in missing empty init py files if the - - incompatible default to explicit init py has not yet been enabled this usually returns a public static final reference , code is free to use that directly on specific implementations instead of making this call

runfiles empty files supplier get empty runfiles supplier ( ) ;


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


resets all custom offsets set via set view port offsets ( ) method allows the chart to again calculate all offsets automatically

public void reset view port offsets ( ) { m custom view port enabled = false ; calculate offsets ( ) ; }


returns the ttl values ( in milliseconds ) returned from the config provider instances for a given set of paths

public map < string , long > ttls ( ) { return ttls ; }


return the configured { @ link high availability mode }

public static high availability mode from config ( configuration config ) { string ha mode = config get value ( high availability options ha mode ) ; if ( ha mode = = null ) { return high availability mode none ; } else if ( ha mode equals ignore case ( config constants default recovery mode ) ) { / / map old default to new default return high availability mode none ; } else { try { return high availability mode value of ( ha mode to upper case ( ) ) ; } catch ( illegal argument exception e ) { return factory class ; } } }


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


post - process the given object that has been obtained from the factory bean the resulting object will get exposed for bean references the default implementation simply returns the given object as - is subclasses may override this , for example , to apply post - processors

protected object post process object from factory bean ( object object , string bean name ) throws beans exception { return object ; }


adds a nested set to the internal collection the nested set will become wrapped in stable order only use this when the set of artifacts will not have conflicting root relative paths , or the wrong artifact will end up in the runfiles tree

public builder add transitive artifacts wrapped in stable order ( nested set < artifact > artifacts ) { nested set < artifact > wrapped artifacts = nested set builder < artifact > stable order ( ) add transitive ( artifacts ) build ( ) ; artifacts builder add transitive ( wrapped artifacts ) ; return this ; }


calculates the size of output for this task

private long calculate output size ( ) throws i o exception { if ( ! is map or reduce ( ) ) { return - 1 ; } if ( is map task ( ) & & conf get num reduce tasks ( ) > 0 ) { try { path map output = map output file get output file ( ) ; file system local f s = file system get local ( conf ) ; return local f s get file status ( map output ) get len ( ) ; } catch ( i o exception e ) { log warn ( " could not find output size " , e ) ; } } return - 1 ; }


returns true if field port is set ( has been assigned a value ) and false otherwise

public boolean is set port ( ) { return isset bit vector get ( port isset id ) ; }


sets the cassandra hostport to connect to

public cassandra sink builder < in > set host ( final string host , final int port ) { if ( this builder ! = null ) { throw new illegal argument exception ( " builder was already set you must use either set host ( ) or set cluster builder ( ) " ) ; } this builder = new cluster builder ( ) { @ override protected cluster build cluster ( cluster builder builder ) { return builder add contact point ( host ) with port ( port ) build ( ) ; } } ; return this ; }


public test classname oper req spec ( consumer < request spec builder > req spec customizer ) { req spec customizer accept ( req spec ) ; return this ; }


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


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


invoke the default rewrite logic explicitly specifically , it skips the invocation of the expression rewriter for the provided node

public < t extends row expression > t default rewrite ( t node , c context ) { return ( t ) node accept ( visitor , new context < > ( context , true ) ) ; }


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

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


gets the spec of a local variable assignment that occurs at this instruction , or null if no local variable assignment occurs this may be the result register , or for { @ code mark - local } insns it may be the source

public register spec get local assignment ( ) { if ( result ! = null & & result get local item ( ) ! = null ) { return result ; } return null ; }


notifies the tracker that the current playback has been interrupted for ad playback

public void on interrupted by ad ( event time event time ) { is interrupted by ad = true ; is seeking = false ; maybe update playback state ( event time , / * belongs to playback = * / true ) ; }


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


show the component that is used to resolve conflicts this method is called by the merge resolvers when user input is required if the component is not null , this method blocks until the user either cancels the merge process or resolves a conflict if comp is null , then the default component is displayed , and the method does not wait for user input

public void show component ( final j component comp , final string component i d , help location help loc ) { help service help = help get help service ( ) ; if ( help loc ! = null & & comp ! = null ) { help register help ( comp , help loc ) ; } swing utilities invoke later ( ( ) - > { show merge tool ( ) ; dimension old size = merge tool get size ( ) ; if ( comp = = null ) { merge plugin show default component ( ) ; } else { merge plugin set merge component ( comp , component i d ) ; } dimension new size = merge tool get size ( ) ; if ( ! new size equals ( old size ) ) { point center loc = window utilities center on screen ( merge tool get size ( ) ) ; merge tool set location ( center loc x , center loc y ) ; } } ) ; if ( comp ! = null ) { input received = false ; / / block until the user takes action wait for input ( ) ; } }


public void print ( string message ) { logger info ( " hp printer : { } " , message ) ; }


private int find key ( int key ) { int hashcode = ( key & 0x 7fffffff ) % capacity ; int p = indexer first ( hashcode ) ; while ( p ! = - 1 ) { if ( keys [ p ] = = key ) { return p ; } p = indexer next ( p ) ; } return - 1 ; }


turns a keyvalue pair into a javac annotation processor flag received by data binding

private static string create processor flag ( string flag , artifact value ) { return create processor flag ( flag , value get exec path string ( ) ) ; }


creates a crash caused by the given { @ link throwable } with a specified { @ link exit code }

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


public void test attempts block ( ) { app context ctx = mock ( app context class ) ; app for test app = new app for test ( ctx ) ; task task = get task ( 0 ) ; map < task attempt id , task attempt > attempts = new hash map < task attempt id , task attempt > ( ) ; task attempt attempt = mock ( task attempt class ) ; task attempt id ta id = new task attempt id p b impl ( ) ; ta id set id ( 0 ) ; ta id set task id ( task get i d ( ) ) ; when ( attempt get i d ( ) ) then return ( ta id ) ; when ( attempt get node http address ( ) ) then return ( " node address " ) ; application id app id = application id p b impl new instance ( 0 , 5 ) ; application attempt id app attempt id = application attempt id p b impl new instance ( app id , 1 ) ; container id container id = container id p b impl new container id ( app attempt id , 1 ) ; when ( attempt get assigned container i d ( ) ) then return ( container id ) ; when ( attempt get assigned container mgr address ( ) ) then return ( " assigned container mgr address " ) ; when ( attempt get node rack name ( ) ) then return ( " node rack name " ) ; final long ta start time = 100002l ; final long ta finish time = 100012l ; final long ta shuffle finish time = 100010l ; final long ta sort finish time = 100011l ; final task attempt state ta state = task attempt state succeeded ; when ( attempt get launch time ( ) ) then return ( ta start time ) ; when ( attempt get finish time ( ) ) then return ( ta finish time ) ; when ( attempt get shuffle finish time ( ) ) then return ( ta shuffle finish time ) ; when ( attempt get sort finish time ( ) ) then return ( ta sort finish time ) ; when ( attempt get state ( ) ) then return ( ta state ) ; task attempt report ta report = mock ( task attempt report class ) ; when ( ta report get start time ( ) ) then return ( ta start time ) ; when ( ta report get finish time ( ) ) then return ( ta finish time ) ; when ( ta report get shuffle finish time ( ) ) then return ( ta shuffle finish time ) ; when ( ta report get sort finish time ( ) ) then return ( ta sort finish time ) ; when ( ta report get container id ( ) ) then return ( container id ) ; when ( ta report get progress ( ) ) then return ( 1 0f ) ; when ( ta report get state string ( ) ) then return ( " processed 128 / 128 records < p > \ n " ) ; when ( ta report get task attempt state ( ) ) then return ( ta state ) ; when ( ta report get diagnostic info ( ) ) then return ( " " ) ; when ( attempt get report ( ) ) then return ( ta report ) ; attempts put ( ta id , attempt ) ; when ( task get attempts ( ) ) then return ( attempts ) ; app set task ( task ) ; job job = mock ( job class ) ; when ( job get user name ( ) ) then return ( " user " ) ; app set job ( job ) ; configuration conf = new configuration ( ) ; conf set boolean ( yarn configuration log aggregation enabled , true ) ; attempts block for test block = new attempts block for test ( app , conf ) ; block add parameter ( a m params task type , " r " ) ; print writer p writer = new print writer ( data ) ; block html = new block for test ( new html block for test ( ) , p writer , 0 , false ) ; block render ( html ) ; p writer flush ( ) ; / / should be printed information about attempts assert true ( data to string ( ) contains ( " attempt 0 0001 r 000000 0 " ) ) ; assert true ( data to string ( ) contains ( " succeeded " ) ) ; assert false ( data to string ( ) contains ( " processed 128 / 128 records < p > \ n " ) ) ; assert true ( data to string ( ) contains ( " processed 128 \ \ / 128 records & lt ; p & gt ; \ \ n " ) ) ; assert true ( data to string ( ) contains ( " 0005 01 000001 : attempt 0 0001 r 000000 0 : user : " ) ) ; assert true ( data to string ( ) contains ( " 100002 " ) ) ; assert true ( data to string ( ) contains ( " 100010 " ) ) ; assert true ( data to string ( ) contains ( " 100011 " ) ) ; assert true ( data to string ( ) contains ( " 100012 " ) ) ; data reset ( ) ; conf set boolean ( yarn configuration log aggregation enabled , false ) ; block = new attempts block for test ( app , conf ) ; block add parameter ( a m params task type , " r " ) ; p writer = new print writer ( data ) ; html = new block for test ( new html block for test ( ) , p writer , 0 , false ) ; block render ( html ) ; p writer flush ( ) ; / / should be printed information about attempts assert true ( data to string ( ) contains ( " attempt 0 0001 r 000000 0 " ) ) ; assert true ( data to string ( ) contains ( " succeeded " ) ) ; assert false ( data to string ( ) contains ( " processed 128 / 128 records < p > \ n " ) ) ; assert true ( data to string ( ) contains ( " processed 128 \ \ / 128 records & lt ; p & gt ; \ \ n " ) ) ; assert true ( data to string ( ) contains ( " node address : node : containerlogs : container 0 0005 01 000001 : user : " ) ) ; assert true ( data to string ( ) contains ( " 100002 " ) ) ; assert true ( data to string ( ) contains ( " 100010 " ) ) ; assert true ( data to string ( ) contains ( " 100011 " ) ) ; assert true ( data to string ( ) contains ( " 100012 " ) ) ; }


add listener for specific type of message by its id don ' t forget to call { @ link # remove listener ( ui message callback ) } or { @ link # remove listeners ( int ) }

public void add listener ( int id , @ non null final ui message callback listener ) { synchronized ( m listeners specific ) { list < ui message callback > id listeners = m listeners specific get ( id ) ; if ( id listeners = = null ) { id listeners = new array list < > ( ) ; m listeners specific put ( id , id listeners ) ; } if ( ! id listeners contains ( listener ) ) { id listeners add ( listener ) ; } } }


protected void do validate ( object bean ) { assert state ( this validator ! = null , " no validator set " ) ; object object to validate = aop proxy utils get singleton target ( bean ) ; if ( object to validate = = null ) { object to validate = bean ; } set < constraint violation < object > > result = this validator validate ( object to validate ) ; if ( ! result is empty ( ) ) { string builder sb = new string builder ( " bean state is invalid : " ) ; for ( iterator < constraint violation < object > > it = result iterator ( ) ; it has next ( ) ; ) { constraint violation < object > violation = it next ( ) ; sb append ( violation get property path ( ) ) append ( " - " ) append ( violation get message ( ) ) ; if ( it has next ( ) ) { sb append ( " ; " ) ; } } throw new bean initialization exception ( sb to string ( ) ) ; } }


test rename where src has snapshottable descendant directories and dst is a descent of a snapshottable directory such case will cause nested snapshot which hdfs currently not fully supported

public void test rename with nested snapshottable dirs ( ) throws exception { final path sdir 1 = new path ( " / dir 1 " ) ; final path sdir 2 = new path ( " / dir 2 " ) ; final path foo = new path ( sdir 1 , " foo " ) ; final path bar = new path ( sdir 2 , " bar " ) ; hdfs mkdirs ( foo ) ; hdfs mkdirs ( bar ) ; hdfs allow snapshot ( foo ) ; hdfs allow snapshot ( sdir 2 ) ; try { hdfs rename ( foo , bar , rename overwrite ) ; fail ( " except exception since " + " unable to rename because " + foo to string ( ) + " has snapshottable descendant directories and " + sdir 2 to string ( ) + " is a descent of a snapshottable directory , " + " and hdfs does not support nested snapshottable directory " ) ; } catch ( i o exception e ) { generic test utils assert exception contains ( " unable to rename because " + foo to string ( ) + " has snapshottable descendant directories and " + sdir 2 to string ( ) + " is a descent of a snapshottable directory , " + " and hdfs does not support nested snapshottable directory " , e ) ; } hdfs disallow snapshot ( foo ) ; hdfs rename ( foo , bar , rename overwrite ) ; snapshottable directory status [ ] dirs = fsn get snapshottable dir listing ( ) ; assert equals ( 1 , dirs length ) ; assert equals ( sdir 2 , dirs [ 0 ] get full path ( ) ) ; }


set a click listener that will provide the parent view , model , and adapter position of the clicked view this will clear the normal view on click listener if one has been set

public all types model view model on click listener ( @ non null final on model click listener < all types model view model , all types model view > on click listener ) { assigned attributes epoxy generated model set ( 11 ) ; on mutation ( ) ; if ( on click listener = = null ) { this on click listener on click listener = null ; } else { this on click listener on click listener = new wrapped epoxy model click listener ( on click listener ) ; } return this ; }


returns a basic formatter for a two digit hour of day , two digit minute of hour , two digit second of minute , and time zone offset ( h hmmss z ) the time zone offset is ' z ' for zero , and of the form ' ± h hmm ' for non - zero the parser is strict by default , thus time string { @ code 24 : 00 } cannot be parsed the returned formatter prints and parses only this format , which excludes milliseconds

public static date time formatter basic time no millis ( ) { return constants btx ; }


public synchronized void remove app from registry ( application id app id ) { map < string , token < a m r m token identifier > > sub cluster token map = this app sub cluster token map get ( app id ) ; log info ( " removing all registry entries for { } " , app id ) ; if ( sub cluster token map = = null | | sub cluster token map size ( ) = = 0 ) { return ; } / / lastly remove the application directory string key = get registry key ( app id , null ) ; try { remove key registry ( this registry , this user , key , true , true ) ; sub cluster token map clear ( ) ; } catch ( yarn exception e ) { log error ( " failed removing registry directory key " + key , e ) ; } }


get the progress heartbeat interval configuration for mapreduce tasks by default , the value of progress heartbeat interval is a proportion of that of task timeout

public static long get task progress report interval ( final configuration conf ) { long task heartbeat time out = conf get long ( m r job config task timeout , m r job config default task timeout millis ) ; return conf get long ( m r job config task progress report interval , ( long ) ( task report interval to timeout ratio * task heartbeat time out ) ) ; }


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


update index or offset mapping in { @ code sparse index map }

protected void update index or offset ( sparse index map sparse index map , int old index , int old offset , int new index , int new offset ) { / / should override by subclass if needed }


flushes this output stream @ exception i o exception if an io error occurs

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


whether the given { @ linkplain method parameter method parameter } is supported by this resolver

boolean supports parameter ( method parameter parameter ) ;


connect to the specified hostnameip by default uses port 1883 if you want to change the port number , see { @ link # connect ( string , int ) }

public future < mqtt connect result > connect ( string host ) { return connect ( host , 1883 ) ; }


creates a new music instance from the provided file descriptor it is the caller ' s responsibility to close the file descriptor it is safe to do so as soon as this call returns

public music new music ( file descriptor fd ) { if ( sound pool = = null ) { throw new gdx runtime exception ( " android audio is not enabled by the application config " ) ; } media player media player = new media player ( ) ; try { media player set data source ( fd ) ; media player prepare ( ) ; android music music = new android music ( this , media player ) ; synchronized ( musics ) { musics add ( music ) ; } return music ; } catch ( exception ex ) { throw new gdx runtime exception ( " error loading audio from file descriptor " , ex ) ; } }


returns the commons - cli < code > command line < code > object to process the parsed arguments note : if the object is created with { @ link # generic options parser ( configuration , string [ ] ) } , then returned object will only contain parsed generic options

public command line get command line ( ) { return command line ; }


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

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


get the { @ link map } of { @ link data source data sources } maintained by this object the returned { @ link map } is { @ link collections # unmodifiable map ( java util map ) unmodifiable }

public map < string , data source > get data sources ( ) { return collections unmodifiable map ( this data sources ) ; }


this tests the overload of the method that uses a map for query parameters instead of listing them out individually

public void test body with query params test query map ( ) { user body = null ; fake api test body with query params query params query params = new fake api test body with query params query params ( ) query ( null ) ; / / api test body with query params ( body , query params ) ; / / todo : test validations }


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


static watcher service no op ( ) { return new watcher service ( ) { } ; }


return { @ code true } if this method is a meta method otherwise , return { @ code false }

public static boolean is meta method ( method method ) { string name = method get name ( ) ; if ( ! ( name starts with ( " get " ) | | name starts with ( " is " ) ) ) { return false ; } if ( " get " equals ( name ) ) { return false ; } if ( " get class " equals ( name ) ) { return false ; } if ( ! modifier is public ( method get modifiers ( ) ) ) { return false ; } if ( method get parameter types ( ) length ! = 0 ) { return false ; } if ( ! class utils is primitive ( method get return type ( ) ) ) { return false ; } return true ; }


projects a { @ link tuple } { @ link data stream } to the previously selected fields

public < t0 , t1 , t2 , t3 , t4 , t5 , t6 , t7 , t8 , t9 , t10 , t11 > single output stream operator < tuple 1 2 < t0 , t1 , t2 , t3 , t4 , t5 , t6 , t7 , t8 , t9 , t10 , t11 > > project tuple 1 2 ( ) { type information < ? > [ ] f types = extract field types ( field indexes , data stream get type ( ) ) ; tuple type info < tuple 1 2 < t0 , t1 , t2 , t3 , t4 , t5 , t6 , t7 , t8 , t9 , t10 , t11 > > t type = new tuple type info < tuple 1 2 < t0 , t1 , t2 , t3 , t4 , t5 , t6 , t7 , t8 , t9 , t10 , t11 > > ( f types ) ; return data stream transform ( " projection " , t type , new stream project < in , tuple 1 2 < t0 , t1 , t2 , t3 , t4 , t5 , t6 , t7 , t8 , t9 , t10 , t11 > > ( field indexes , t type create serializer ( data stream get execution config ( ) ) ) ) ; }


validate a test where each result has the same values

private static < t extends comparable < t > & copyable value < t > > void validate ( graph < t , null value , null value > graph , long count , long degree , long triangle count ) throws exception { data set < result < t > > cc = graph run ( new local clustering coefficient < > ( ) ) ; list < result < t > > results = cc collect ( ) ; assert equals ( count , results size ( ) ) ; for ( result < t > result : results ) { assert equals ( degree , result get degree ( ) get value ( ) ) ; assert equals ( triangle count , result get triangle count ( ) get value ( ) ) ; } }


extractor that returns the raw { @ link data buffer data buffers } note : the data buffers should be { @ link org springframework core io buffer data buffer utils # release ( data buffer ) released } after being used

public static body extractor < flux < data buffer > , reactive http input message > to data buffers ( ) { return ( input message , context ) - > input message get body ( ) ; }


creates a heartbeat manager which actively sends heartbeats to monitoring targets

public < i , o > heartbeat manager < i , o > create heartbeat manager sender ( resource i d resource id , heartbeat listener < i , o > heartbeat listener , scheduled executor main thread executor , logger log ) { return new heartbeat manager sender impl < > ( heartbeat interval , heartbeat timeout , resource id , heartbeat listener , main thread executor , log ) ; }


sets the number of minimal prefix characters that must match in order be a candidate suggestion defaults to 1 increasing this number improves suggest performance usually misspellings don ' t occur in the beginning of terms

public term suggestion builder prefix length ( int prefix length ) { if ( prefix length < 0 ) { throw new illegal argument exception ( " prefix length must be positive " ) ; } this prefix length = prefix length ; return this ; }


public string fuzzy rewrite ( ) { return this fuzzy rewrite ; }


add the sink operators to the stream graph

private void internal translate ( sink transformation < input t , comm t , writer state t , global comm t > sink transformation , int writer parallelism , @ suppress warnings ( " same parameter value " ) @ nullable string previous sink state name , one input stream operator factory < comm t , comm t > committer factory , int committer parallelism , int committer max parallelism , one input stream operator factory < comm t , global comm t > global committer factory , context context ) throws i o exception { stream graph utils validate transformation uid ( context get stream graph ( ) , sink transformation ) ; final int writer id = add writer ( sink transformation , writer parallelism , previous sink state name , context ) ; final int committer id = add committer ( writer id , sink transformation , committer factory , committer parallelism , committer max parallelism , context ) ; add global committer ( committer id > 0 ? committer id : writer id , sink transformation , global committer factory , context ) ; }


public event type get event type ( ) { return event type map attempt finished ; }


perform a binary search to locate the specified key and derive an index into the buffer id storage this method is intended to find the insertion index or exact match for a child key a negative value will be returned when an exact match is not found and may be transformed into an insertion index ( inset index = - returned index - 1 )

private int get key index ( long key ) { int min = 0 ; int max = key count - 1 ; while ( min < = max ) { int i = ( min + max ) / 2 ; long k = get key ( i ) ; if ( k = = key ) { return i ; } else if ( k < key ) { min = i + 1 ; } else { max = i - 1 ; } } return - ( min + 1 ) ; }


if the value is a compound value , this is set < code > optional aapt pb compound value compound value = 5 ; < code >

private void set compound value ( com android aapt resources compound value builder builder for value ) { compound value = builder for value build ( ) ; bit field 0 | = 0x 0 0 0 0 0 0 1 0 ; }


type url for resources wrapped in the provided resources ( s ) this must be consistent with the type url in the wrapper messages if resources is non - empty < code > string type url = 3 ; < code >

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


set an offset in dp that allows the user to drag the chart over it ' s bounds on the y - axis

public void set drag offset y ( float offset ) { m trans offset y = utils convert dp to pixel ( offset ) ; }


assign the long value to the given property name

public void put long ( string property name , long value ) { map put ( property name , new pair < property entry type , string > ( property entry type long type , long to string ( value ) ) ) ; }


is delegated client authorized for boolean

public boolean is delegated client authorized for ( final string client name , final service service ) { if ( service = = null | | string utils is blank ( service get id ( ) ) ) { logger debug ( " can not evaluate delegated authentication policy without a service " ) ; return true ; } if ( string utils is blank ( client name ) ) { logger debug ( " no client is provided to enforce authorization for delegated authentication sso session " + " may have been established without delegated authentication " ) ; return true ; } val registered service = this services manager find service by ( service ) ; if ( registered service = = null | | ! registered service get access strategy ( ) is service access allowed ( ) ) { logger warn ( " service access for [ { } ] is denied " , registered service ) ; return false ; } logger trace ( " located registered service definition [ { } ] matching [ { } ] " , registered service , service ) ; val context = auditable context builder ( ) registered service ( registered service ) properties ( collection utils wrap ( client class get simple name ( ) , client name ) ) build ( ) ; val result = delegated authentication policy enforcer execute ( context ) ; if ( ! result is execution failure ( ) ) { logger debug ( " delegated authentication policy for [ { } ] allows for using client [ { } ] " , registered service , client name ) ; return true ; } logger warn ( " delegated authentication policy for [ { } ] refuses access to client [ { } ] " , registered service get service id ( ) , client name ) ; return false ; }


public list < object > get array items nullable ( ) { return array items nullable ; }


returns a newly - created immutable bimap the iteration order of the returned bimap is the order in which entries were inserted into the builder , unless { @ link # order entries by value } was called , in which case entries are sorted by value

public immutable bi map < k , v > build ( ) { switch ( size ) { case 0 : return of ( ) ; case 1 : return of ( entries [ 0 ] get key ( ) , entries [ 0 ] get value ( ) ) ; default : / * * if entries is full , or if hash flooding is detected , then this implementation may end * up using the entries array directly and writing over the entry objects with * non - terminal entries , but this is safe ; if this builder is used further , it will grow * the entries array ( so it can ' t affect the original array ) , and future build ( ) calls * will always copy any entry objects that cannot be safely reused * / if ( value comparator ! = null ) { if ( entries used ) { entries = arrays copy of ( entries , size ) ; } arrays sort ( entries , 0 , size , ordering from ( value comparator ) on result of ( maps < v > value function ( ) ) ) ; } entries used = true ; return regular immutable bi map from entry array ( size , entries ) ; } }


tests that track selector will prefer tracks that are within renderer ' s capabilities over track that have both language matching preferred audio given by { @ link parameters } and { @ link c # selection flag default } , but exceed renderer ' s capabilities

public void select tracks prefer track within capabilities over selection flag and preferred language ( ) throws exception { format builder format builder = audio format build upon ( ) ; format exceeded default selection en format = format builder set id ( " exceeded format " ) set selection flags ( c selection flag default ) set language ( " eng " ) build ( ) ; format supported fr format = format builder set id ( " supported format " ) set selection flags ( 0 ) set language ( " fra " ) build ( ) ; track group array track groups = wrap formats ( exceeded default selection en format , supported fr format ) ; map < string , integer > mapped capabilities = new hash map < > ( ) ; mapped capabilities put ( exceeded default selection en format id , format exceeds capabilities ) ; mapped capabilities put ( supported fr format id , format handled ) ; renderer capabilities mapped audio renderer capabilities = new fake mapped renderer capabilities ( c track type audio , mapped capabilities ) ; track selector set parameters ( default parameters build upon ( ) set preferred audio language ( " eng " ) ) ; track selector result result = track selector select tracks ( new renderer capabilities [ ] { mapped audio renderer capabilities } , track groups , period id , timeline ) ; assert fixed selection ( result selections get ( 0 ) , track groups , supported fr format ) ; }


the < b > first < b > provider instance with a class equal to that of the given class

public < t extends component provider > t get component provider ( class < t > clazz ) { list < t > all providers = get component providers ( clazz ) ; return collection utils any ( all providers ) ; }


builds a connection profile that is dedicated to a single channel type allows passing connection and handshake timeouts and compression settings

public static connection profile build single channel profile ( transport request options type channel type , @ nullable time value connect timeout , @ nullable time value handshake timeout , @ nullable time value ping interval , @ nullable boolean compression enabled ) { builder builder = new builder ( ) ; builder add connections ( 1 , channel type ) ; final enum set < transport request options type > other types = enum set all of ( transport request options type class ) ; other types remove ( channel type ) ; builder add connections ( 0 , other types to array ( new transport request options type [ 0 ] ) ) ; if ( connect timeout ! = null ) { builder set connect timeout ( connect timeout ) ; } if ( handshake timeout ! = null ) { builder set handshake timeout ( handshake timeout ) ; } if ( ping interval ! = null ) { builder set ping interval ( ping interval ) ; } if ( compression enabled ! = null ) { builder set compression enabled ( compression enabled ) ; } return builder build ( ) ; }


public void execute ( file system fs ) throws i o exception { fs set owner ( path , owner , group ) ; return null ; }


probe for hdfs encryption being enabled ; this uses the value of the option { @ link common configuration keys public # hadoop security key provider path } , returning true if that property contains a non - empty , non - whitespace string

public static boolean is h d f s encryption enabled ( configuration conf ) { return ! ( conf get trimmed ( common configuration keys public hadoop security key provider path , " " ) is empty ( ) ) ; }


sets this matrix to an orthographic projection matrix with the origin at ( x , y ) extending by width and height , having a near and far plane

public matrix 4 set to ortho 2 d ( float x , float y , float width , float height , float near , float far ) { set to ortho ( x , x + width , y , y + height , near , far ) ; return this ; }


find the fields constant that matches field id , or null if its not found

public static fields find by thrift id ( int field id ) { switch ( field id ) { case 1 : / / id return id ; default : return null ; } }


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


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


public int get exported names size ( ) { return exported names size ; }


returns the default value of a register at a given address

public register value get default value ( register register , address address ) ;


retrieve the set of data nodes that look significantly slower than their peers

public map < string , double > get outliers ( ) { / / this maps the metric name to the aggregate latency / / the metric name is the datanode id final map < string , double > stats = send packet downstream rolling averages get stats ( min outlier detection samples ) ; log trace ( " data node peer metrics : got stats : { } " , stats ) ; return slow node detector get outliers ( stats ) ; }


public builder clear compound value ( ) { copy on write ( ) ; instance clear compound value ( ) ; return this ; }


logs user into the system < b > 200 < b > - successful operation < b > 400 < b > - invalid usernamepassword supplied

public string login user ( string username , string password ) throws rest client exception { return login user with http info ( username , password ) get body ( ) ; }


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


setup the flink job with the graph input , algorithm , and output to then execute the job call { @ link # execute }

public runner run ( ) throws exception { / / set up the execution environment env = execution environment get execution environment ( ) ; execution config config = env get config ( ) ; / / should not have any non - flink data types config disable force avro ( ) ; config disable force kryo ( ) ; config set global job parameters ( parameters ) ; parameterize ( this ) ; / / configure local parameters and throw proper exception on error try { this configure ( parameters ) ; } catch ( runtime exception ex ) { throw new program parametrization exception ( ex get message ( ) ) ; } / / integration tests run with with object reuse both disabled and enabled if ( disable object reuse get value ( ) ) { config disable object reuse ( ) ; } else { config enable object reuse ( ) ; } / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - / / usage and configuration / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - / / algorithm and usage if ( ! parameters has ( algorithm ) ) { throw new program parametrization exception ( get algorithms listing ( ) ) ; } string algorithm name = parameters get ( algorithm ) ; algorithm = driver factory get ( algorithm name ) ; if ( algorithm = = null ) { throw new program parametrization exception ( " unknown algorithm name : " + algorithm name ) ; } / / input and usage if ( ! parameters has ( input ) ) { if ( ! parameters has ( output ) ) { / / if neither input nor output is given then print algorithm usage throw new program parametrization exception ( get algorithm usage ( algorithm name ) ) ; } throw new program parametrization exception ( " no input given " ) ; } parameterize ( algorithm ) ; string input name = parameters get ( input ) ; input input = input factory get ( input name ) ; if ( input = = null ) { throw new program parametrization exception ( " unknown input type : " + input name ) ; } parameterize ( input ) ; / / output and usage if ( ! parameters has ( output ) ) { throw new program parametrization exception ( " no output given " ) ; } string output name = parameters get ( output ) ; output = output factory get ( output name ) ; if ( output = = null ) { throw new program parametrization exception ( " unknown output type : " + output name ) ; } parameterize ( output ) ; / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - / / create list of input and algorithm transforms / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - list < transform > transforms = new array list < > ( ) ; if ( input instanceof transformable ) { transforms add all ( ( ( transformable ) input ) get transformers ( ) ) ; } if ( algorithm instanceof transformable ) { transforms add all ( ( ( transformable ) algorithm ) get transformers ( ) ) ; } for ( transform transform : transforms ) { parameterize ( transform ) ; } / / unused parameters if ( parameters get unrequested parameters ( ) size ( ) > 0 ) { throw new program parametrization exception ( " unrequested parameters : " + parameters get unrequested parameters ( ) ) ; } / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - / / execute / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - / / create input graph graph = input create ( env ) ; / / transform input for ( transform transform : transforms ) { graph = ( graph ) transform transform input ( graph ) ; } / / run algorithm result = algorithm plan ( graph ) ; / / output execution name = job name get value ( ) ! = null ? job name get value ( ) + " : " : " " ; execution name + = input get identity ( ) + " ⇨ " + algorithm name + " ⇨ " + output get name ( ) ; if ( transforms size ( ) > 0 ) { / / append identifiers to job name string buffer buffer = new string buffer ( execution name ) append ( " [ " ) ; for ( transform transform : transforms ) { buffer append ( transform get identity ( ) ) ; } execution name = buffer append ( " ] " ) to string ( ) ; } if ( output = = null ) { throw new program parametrization exception ( " unknown output type : " + output name ) ; } try { output configure ( parameters ) ; } catch ( runtime exception ex ) { throw new program parametrization exception ( ex get message ( ) ) ; } if ( result ! = null ) { / / transform output if algorithm returned result data set if ( transforms size ( ) > 0 ) { collections reverse ( transforms ) ; for ( transform transform : transforms ) { result = ( data set ) transform transform result ( result ) ; } } } return this ; }


execute the given sql script using default settings for statement separators , comment delimiters , and exception handling flags statement separators and comments will be removed before executing individual statements within the supplied script warning : this method does not release the provided { @ link connection }

public static mono < void > execute sql script ( connection connection , encoded resource resource ) throws script exception { return execute sql script ( connection , resource , default data buffer factory shared instance , false , false , default comment prefix , default statement separator , default block comment start delimiter , default block comment end delimiter ) ; }


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

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


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


create a lsda type table from the bytes between < code > bottom < code > and < code > top < code > this table is built from bottom - to - top < br > note : this method must get called before any of the " get " methods

public void create ( address bottom , address top ) { if ( bottom = = null | | top = = null | | monitor is cancelled ( ) ) { return ; } monitor set message ( " creating lsda type table " ) ; int encoding = region get l s d a table ( ) get header ( ) get t type encoding ( ) ; dwarf e h decoder decoder = dwarf decoder factory get decoder ( encoding ) ; data type encoded dt = decoder get data type ( program ) ; int stride = decoder get decode size ( program ) ; string comment = " type reference " ; top = align 4 ( top ) ; address addr = bottom subtract ( stride - 1 ) ; while ( addr compare to ( top ) > = 0 ) { dwarf decode context ctx = new dwarf decode context ( program , addr ) ; try { address type ref = decoder decode address ( ctx ) ; type info addrs add ( type ref ) ; create and comment data ( program , addr , encoded dt , comment , code unit eol comment ) ; if ( type ref get offset ( ) ! = 0 ) { program get reference manager ( ) add memory reference ( addr , type ref , ref type data , source type analysis , 0 ) ; } } catch ( memory access exception mae ) { set comment cmd comment cmd = new set comment cmd ( addr , code unit eol comment , " unable to resolve pointer " ) ; comment cmd apply to ( program ) ; } addr = addr subtract ( stride ) ; } set comment cmd comment cmd = new set comment cmd ( top , code unit plate comment , " ( lsda ) type table " ) ; comment cmd apply to ( program ) ; next address = bottom add ( 1 ) ; }


more verbose version of { @ link # create channel for ( context , recipient ) }

public static synchronized @ nullable string create channel for ( @ non null context context , @ non null string channel id , @ non null string display name , @ nullable uri message sound , boolean vibration enabled ) { if ( ! supported ( ) ) { return null ; } notification channel channel = new notification channel ( channel id , display name , notification manager importance high ) ; set led preference ( channel , text secure preferences get notification led color ( context ) ) ; channel set group ( category messages ) ; channel enable vibration ( vibration enabled ) ; if ( message sound ! = null ) { channel set sound ( message sound , new audio attributes builder ( ) set content type ( audio attributes content type unknown ) set usage ( audio attributes usage notification communication instant ) build ( ) ) ; } notification manager notification manager = service util get notification manager ( context ) ; notification manager create notification channel ( channel ) ; return channel id ; }


public void remove status item ( j component c ) { root remove status item ( c ) ; }


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

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


register the given list of transaction synchronizations with the existing transaction invoked when the control of the spring transaction manager and thus all spring transaction synchronizations end , without the transaction being completed yet this is for example the case when participating in an existing jta or ejb cmt transaction the default implementation simply invokes the { @ code after completion } methods immediately , passing in " status unknown " this is the best we can do if there ' s no chance to determine the actual outcome of the outer transaction

protected mono < void > register after completion with existing transaction ( transaction synchronization manager synchronization manager , object transaction , list < transaction synchronization > synchronizations ) throws transaction exception { logger debug ( " cannot register spring after - completion synchronization with existing transaction - " + " processing spring after - completion callbacks immediately , with outcome status ' unknown ' " ) ; return invoke after completion ( synchronization manager , synchronizations , transaction synchronization status unknown ) ; }


a sensible default implementation of { @ link # list iterator ( int ) } , in terms of { @ link # size } , { @ link # get ( int ) } , { @ link # set ( int , object ) } , { @ link # add ( int , object ) } , and { @ link # remove ( int ) } if you override any of these methods , you may wish to override { @ link # list iterator ( int ) } to forward to this implementation

protected list iterator < e > standard list iterator ( int start ) { return lists list iterator impl ( this , start ) ; }


the method returns true if the result queue should be created when it does not exist yet

public boolean is create allowed ( ) { return allow create ; }


verifies that a dependency on a { @ link factory bean } can be autowired by type , specifically addressing the jira issue raised in < a href = " https : opensource atlassian comprojectsspringbrowse s p r - 4040 " target = " blank " > spr - 4040

void autowire bean with factory bean by type ( ) { root bean definition bd = new root bean definition ( lazy init factory class ) ; lbf register bean definition ( " factory bean " , bd ) ; lazy init factory factory bean = ( lazy init factory ) lbf get bean ( " & factory bean " ) ; assert that ( factory bean ) as ( " the factory bean should have been registered " ) is not null ( ) ; factory bean dependent bean bean = ( factory bean dependent bean ) lbf autowire ( factory bean dependent bean class , autowire capable bean factory autowire by type , true ) ; assert that ( bean get factory bean ( ) ) as ( " the factory bean dependent bean should have been autowired ' by type ' with the lazy init factory " ) is equal to ( factory bean ) ; }


stores the contents of a multimap in an output stream , as part of serialization it does not support concurrent multimaps whose content may change while the method is running the { @ link multimap # as map } view determines the ordering in which data is written to the stream the serialized output consists of the number of distinct keys , and then for each distinct key : the key , the number of values for that key , and the key ' s values

static < k , v > void write multimap ( multimap < k , v > multimap , object output stream stream ) throws i o exception { stream write int ( multimap as map ( ) size ( ) ) ; for ( map entry < k , collection < v > > entry : multimap as map ( ) entry set ( ) ) { stream write object ( entry get key ( ) ) ; stream write int ( entry get value ( ) size ( ) ) ; for ( v value : entry get value ( ) ) { stream write object ( value ) ; } } }


< code > optional aapt pb style style = 2 ; < code >

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


gets the number of words of parameters required by this method ' s descriptor since instances of this class have no way to know if they will be used in a { @ code static } or instance context , one has to indicate this explicitly as an argument this method is just a convenient shorthand for { @ code get prototype ( ) get parameter types ( ) get word count ( ) } , plus { @ code 1 } if the method is to be treated as an instance method

public final int get parameter word count ( boolean is static ) { return get prototype ( is static ) get parameter types ( ) get word count ( ) ; }


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


public static void main ( string [ ] args ) throws exception { var asfc = new app shipping fail cases ( ) ; / / asfc item unavailable case ( ) ; / / asfc shipping not possible case ( ) ; / / asfc shipping database unavailable case ( ) ; asfc shipping success case ( ) ; }


indicates whether { @ code c } is one of the twenty - six uppercase ascii alphabetic characters between { @ code ' a ' } and { @ code ' z ' } inclusive all others ( including non - ascii characters ) return { @ code false }

public static boolean is upper case ( char c ) { return ( c > = ' a ' ) & & ( c < = ' z ' ) ; }


content type depending on the request might be used by some formatters ( like csv ) to specify certain metadata like whether the header is returned or not

string content type ( rest request request ) { return content type ( ) ; }


package initialization : part 2 of 3 : sets this package ' s default header strictness checking this is needed to support c + + - related rule classes which accesses { @ link # get default hdrs check } from the still - under - construction package

private void set default hdrs check ( string default hdrs check ) { this default hdrs check = default hdrs check ; }


public double get one minute rate ( ) { return 0d ; }


set the method to invoke for processing a message managed by this endpoint

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


apply the current transaction timeout , if any , to the given jpa query object this method sets the jpa 2 0 query hint " javax persistence query timeout " accordingly

public static void apply transaction timeout ( query query , entity manager factory emf ) { entity manager holder em holder = ( entity manager holder ) transaction synchronization manager get resource ( emf ) ; if ( em holder ! = null & & em holder has timeout ( ) ) { int timeout value = ( int ) em holder get time to live in millis ( ) ; try { query set hint ( " javax persistence query timeout " , timeout value ) ; } catch ( illegal argument exception ex ) { / / oh well , at least we tried } } }


gets the threshold below which state is stored as part of the metadata , rather than in files this threshold ensures that the backend does not create a large amount of very small files , where potentially the file pointers are larger than the state itself if not explicitly configured , this is the default value of { @ link checkpointing options # fs small file threshold }

public int get min file size threshold ( ) { return file state threshold > = 0 ? file state threshold : math utils checked down cast ( fs small file threshold default value ( ) get bytes ( ) ) ; }


public string type name ( ) { return " array " ; }


reads an signed integer from { @ code in }

public static int read signed leb 1 2 8 ( byte input in ) { int result = 0 ; int cur ; int count = 0 ; int sign bits = - 1 ; do { cur = in read byte ( ) & 0xff ; result | = ( cur & 0x 7f ) < < ( count * 7 ) ; sign bits < < = 7 ; count + + ; } while ( ( ( cur & 0x 8 0 ) = = 0x 8 0 ) & & count < 5 ) ; if ( ( cur & 0x 8 0 ) = = 0x 8 0 ) { throw new dex exception 2 ( " invalid leb128 sequence " ) ; } / / sign extend if appropriate if ( ( ( sign bits > > 1 ) & result ) ! = 0 ) { result | = sign bits ; } return result ; }


void on progress update ( float progress ) ;


public static void put ( @ non null final string key , final j s o n array value , final int save time , @ non null final cache disk utils cache disk utils ) { cache disk utils put ( key , value , save time ) ; }


returns a new object with rotated image data by 45 degrees counterclockwise only callable if { @ link # is rotate supported ( ) } is true

public luminance source rotate counter clockwise 4 5 ( ) { throw new unsupported operation exception ( " this luminance source does not support rotation by 45 degrees " ) ; }


public final @ non null string get absolute url ( ) { return project get absolute url ( ) + get number ( ) + ' / ' ; }


counters get counters ( ) { return counters ; }


returns an immutable array containing the given values , in order

public static immutable long array of ( long e 0 , long e 1 , long e 2 , long e 3 ) { return new immutable long array ( new long [ ] { e 0 , e 1 , e 2 , e 3 } ) ; }


build the next status batch from a listing

private boolean build next status batch ( final object listing objects ) { / / counters for debug logs int added = 0 ; int ignored = 0 ; / / list to fill in with results initial size will be list maximum list < file status > stats = new array list < > ( objects get objects ( ) size ( ) + objects get common prefixes ( ) size ( ) ) ; / / objects for ( obs object summary : objects get objects ( ) ) { string key = summary get object key ( ) ; path key path = o b s common utils key to qualified path ( owner , key ) ; if ( log is debug enabled ( ) ) { log debug ( " { } : { } " , key path , o b s common utils stringify ( summary ) ) ; } / / skip over keys that are ourselves and old obs $ folder $ files if ( acceptor accept ( key path , summary ) & & filter accept ( key path ) ) { file status status = o b s common utils create file status ( key path , summary , owner get default block size ( key path ) , owner get username ( ) ) ; log debug ( " adding : { } " , status ) ; stats add ( status ) ; added + + ; } else { log debug ( " ignoring : { } " , key path ) ; ignored + + ; } } / / prefixes : always directories for ( obs object prefix : objects get extened common prefixes ( ) ) { string key = prefix get object key ( ) ; path key path = o b s common utils key to qualified path ( owner , key ) ; if ( acceptor accept ( key path , key ) & & filter accept ( key path ) ) { long last modified = prefix get metadata ( ) get last modified ( ) = = null ? system current time millis ( ) : o b s common utils date to long ( prefix get metadata ( ) get last modified ( ) ) ; file status status = new o b s file status ( key path , last modified , last modified , owner get username ( ) ) ; log debug ( " adding directory : { } " , status ) ; added + + ; stats add ( status ) ; } else { log debug ( " ignoring directory : { } " , key path ) ; ignored + + ; } } / / finish up batch size = stats size ( ) ; status batch iterator = stats list iterator ( ) ; boolean has next = status batch iterator has next ( ) ; log debug ( " added { } entries ; ignored { } ; has next = { } ; has more objects = { } " , added , ignored , has next , objects is truncated ( ) ) ; return has next ; }


{ @ inherit doc } the default implementation does nothing

@ override public void exit string literal ( eql base parser string literal context ctx ) { }


whether to fingerprint the artifacts after we archive them

@ data bound setter public void set fingerprint ( boolean fingerprint ) { this fingerprint = fingerprint ; }


public int read ( byte [ ] b ) throws i o exception { throttle ( ) ; int read len = raw stream read ( b ) ; if ( read len ! = - 1 ) { bytes read + = read len ; } return read len ; }


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


store 8 bytes into the provided array at the indicated offset , using the value provided

static void store 6 4 ( byte [ ] sink , int offset , long value ) { / / we don ' t want to assert in production code assert offset > = 0 & & offset + 8 < = sink length ; / / delegates to the fast ( unsafe ) version or the fallback byte array put long little endian ( sink , offset , value ) ; }


tests that xattrs should be cleaned if satisfy storage policy called on ec file with unsuitable storage policy set

public void test s p s should not leak xattr if satisfy storage policy call on e c files ( ) throws exception { storage type [ ] [ ] disk types = new storage type [ ] [ ] { { storage type ssd , storage type disk } , { storage type ssd , storage type disk } , { storage type ssd , storage type disk } , { storage type ssd , storage type disk } , { storage type ssd , storage type disk } , { storage type disk , storage type ssd } , { storage type disk , storage type ssd } , { storage type disk , storage type ssd } , { storage type disk , storage type ssd } , { storage type disk , storage type ssd } } ; int default striped block size = striped file test util get default e c policy ( ) get cell size ( ) * 4 ; config set long ( d f s config keys dfs block size key , default striped block size ) ; config set long ( d f s config keys dfs heartbeat interval key , 1l ) ; config set long ( d f s config keys dfs namenode redundancy interval seconds key , 1l ) ; config set boolean ( d f s config keys dfs namenode redundancy considerload key , false ) ; try { hdfs cluster = start cluster ( config , disk types , disk types length , storages per datanode , capacity ) ; dfs = hdfs cluster get file system ( ) ; dfs enable erasure coding policy ( striped file test util get default e c policy ( ) get name ( ) ) ; / / set " / foo " directory with one ssd storage policy client protocol client = name node proxies create proxy ( config , hdfs cluster get file system ( 0 ) get uri ( ) , client protocol class ) get proxy ( ) ; string foo dir = " / foo " ; client mkdirs ( foo dir , new fs permission ( ( short ) 777 ) , true ) ; / / set an ec policy on " / foo " directory client set erasure coding policy ( foo dir , striped file test util get default e c policy ( ) get name ( ) ) ; / / write file to foo dir final string test file = " / foo / bar " ; long file len = 20 * default striped block size ; d f s test util create file ( dfs , new path ( test file ) , file len , ( short ) 3 , 0 ) ; / / onessd is unsuitable storage policy on ec files client set storage policy ( foo dir , hdfs constants onessd storage policy name ) ; dfs satisfy storage policy ( new path ( test file ) ) ; / / thread sleep ( 9000 ) ; / / to make sure sps triggered / / verify storage types and locations located blocks located blocks = client get block locations ( test file , 0 , file len ) ; for ( located block lb : located blocks get located blocks ( ) ) { for ( storage type type : lb get storage types ( ) ) { assert assert equals ( storage type disk , type ) ; } } / / make sure satisfy xattr has been removed d f s test util wait for xattr removed ( test file , xattr satisfy storage policy , hdfs cluster get namesystem ( ) , 30000 ) ; } finally { shutdown cluster ( ) ; } }


reads the number of cpu cores from the first available information from { @ code sysdevicessystemcpupossible } , { @ code sysdevicessystemcpupresent } , then { @ code sysdevicessystemcpu }

public static int get number of c p u cores ( ) { if ( s num cores ! = num cores not set ) { return s num cores ; } if ( build version sdk int < = build version codes gingerbread mr1 ) { / / gingerbread doesn ' t support giving a single application access to both cores , but a / / handful of devices ( atrix 4g and droid x2 for example ) were released with a dual - core / / chipset and gingerbread ; that can let an app in the background run without impacting / / the foreground application but for our purposes , it makes them single core return 1 ; } int cores ; try { cores = get cores from file info ( " / sys / devices / system / cpu / possible " ) ; if ( cores = = deviceinfo unknown ) { cores = get cores from file info ( " / sys / devices / system / cpu / present " ) ; } if ( cores = = deviceinfo unknown ) { cores = get cores from c p u file list ( ) ; } } catch ( security exception e ) { cores = deviceinfo unknown ; } catch ( null pointer exception e ) { cores = deviceinfo unknown ; } s num cores = cores ; return cores ; }


return the additional ( undeclared ) property

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


while in insert mode , deletes the selection

public void do delete ( ) { hex edit control delete selected ( ) ; }


the actual invocation mockito will match against


int get parameter ( string name ) throws no such element exception { return cache file get parameter ( name ) ; }


return the type of the constructor argument

public string get type ( ) { return this type ; }


constructs an immutable instance which is the combination of the given instance with the given additional annotation the latter ' s type must not already appear in the former

public static annotations combine ( annotations annotations , annotation annotation ) { annotations result = new annotations ( ) ; result add all ( annotations ) ; result add ( annotation ) ; result set immutable ( ) ; return result ; }


returns the { @ link request manager tree node } that provides tree traversal methods relative to the associated { @ link request manager }

public request manager tree node get request manager tree node ( ) { return request manager tree node ; }


public ticket get token ( @ selector final string token ) { try { val ticket id = extract access token from ( token ) ; return central authentication service get ticket ( ticket id , ticket class ) ; } catch ( final exception e ) { logger debug ( " ticket [ { } ] is has expired or cannot be found " , token ) ; return null ; } }


gets a reference to the storage location this reference is sent to the target storage location via checkpoint rpc messages and checkpoint barriers , in a format avoiding backend - specific classes if there is no custom location information that needs to be communicated , this method can simply return { @ link checkpoint storage location reference # get default ( ) }

checkpoint storage location reference get location reference ( ) ;


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

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


the raw text of the string < code > optional string value = 1 ; < code >

private void set value bytes ( com google protobuf byte string value ) { if ( value = = null ) { throw new null pointer exception ( ) ; } bit field 0 | = 0x 0 0 0 0 0 0 0 1 ; value = value to string utf 8 ( ) ; }


added to verify http : code google compgoogle - gsonissuesdetail ? id = 68

public void test null wrapped primitive member serialization ( ) { gson gson = gson builder serialize nulls ( ) create ( ) ; class with null wrapped primitive target = new class with null wrapped primitive ( ) ; string json = gson to json ( target ) ; assert true ( json contains ( " \ " value \ " : null " ) ) ; }


configure encoders or writers for use with { @ link org springframework http codec multipart multipart http message writer multipart http message writer }


the successor of this node within a sub - topology note , sinks do not have any successors will never be { @ code null }


returns the list of selected items or null if the dialog was cancelled

public list < t > get selection items ( ) { return selected items ; }


sets the value of the ' { @ code readonly } ' attribute

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


protected abstract s 3 a committer create committer ( task attempt context context ) throws i o exception { return create committer ( get out dir ( ) , context ) ; }


first data source failed with intermediate results , second succeeded with intermediate results

public void test lifecycle i1 f1 i2 s2 c ( ) { data source < object > data source = get and subscribe ( ) ; data subscriber < object > subscriber 1 = verify get and subscribe ( m data source supplier 1 , m src 1 ) ; object val 1 = mock ( object class ) ; set state ( m src 1 , not closed , not finished , with result , val 1 , not failed , null ) ; subscriber 1 on new result ( m src 1 ) ; verify subscriber ( data source , m src 1 , on new result ) ; verify state ( data source , m src 1 , not closed , not finished , with result , val 1 , not failed , null ) ; set state ( m src 1 , not closed , finished , with result , val 1 , failed , mock ( throwable class ) ) ; subscriber 1 on failure ( m src 1 ) ; data subscriber < object > subscriber 2 = verify get and subscribe ( m data source supplier 2 , m src 2 ) ; verify state ( data source , m src 1 , not closed , not finished , with result , val 1 , not failed , null ) ; / / i2 gets ignored because we already have i1 object val 2 = mock ( object class ) ; set state ( m src 2 , not closed , not finished , with result , val 2 , not failed , null ) ; subscriber 2 on new result ( m src 2 ) ; verify subscriber ( data source , m src 2 , no interactions ) ; verify state ( data source , m src 1 , not closed , not finished , with result , val 1 , not failed , null ) ; object val = mock ( object class ) ; set state ( m src 2 , not closed , finished , with result , val , not failed , null ) ; subscriber 2 on new result ( m src 2 ) ; m in order verify ( m src 1 ) close ( ) ; verify subscriber ( data source , m src 2 , on new result ) ; verify state ( data source , m src 2 , not closed , finished , with result , val , not failed , null ) ; test close ( data source , m src 2 ) ; verify state ( data source , null , closed , finished , without result , null , not failed , null ) ; }


obtain the target { @ code connection factory } for actual use ( never { @ code null } )

protected connection factory obtain target connection factory ( ) { connection factory connection factory = get target connection factory ( ) ; assert state ( connection factory ! = null , " no ' target connection factory ' set " ) ; return connection factory ; }


public client build ( string name ) { if ( ( environment = = null ) & & ( ( executor service = = null ) | | ( object mapper = = null ) ) ) { throw new illegal state exception ( " must have either an environment or both " + " an executor service and an object mapper " ) ; } if ( executor service = = null ) { / / create an executor service based on the provided / / configuration the disposable executor service decorator / / is used to ensure that the service is shut down if the / / jersey client disposes of it executor service = require non null ( environment ) lifecycle ( ) executor service ( " jersey - client - " + name + " - % d " ) min threads ( configuration get min threads ( ) ) max threads ( configuration get max threads ( ) ) work queue ( new array blocking queue < > ( configuration get work queue size ( ) ) ) build ( ) ; } if ( object mapper = = null ) { object mapper = require non null ( environment ) get object mapper ( ) ; } if ( environment ! = null ) { validator = environment get validator ( ) ; } return build ( name , executor service , object mapper , validator ) ; }


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

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


release this emsg handler it should not be reused after this call

public void release ( ) { released = true ; handler remove callbacks and messages ( null ) ; }


checks that the threads do not terminate within the given millisecond delay

void assert threads stay alive ( long millis , thread threads ) { try { / / no need to optimize the failing case via thread join delay ( millis ) ; for ( thread thread : threads ) assert true ( thread is alive ( ) ) ; } catch ( interrupted exception ie ) { fail ( " unexpected interrupted exception " ) ; } }


wait until the cached live nodes value is updated

private static void wait update live nodes ( final string old value , final namenode bean metrics metrics ) throws exception { wait for ( new supplier < boolean > ( ) { @ override public boolean get ( ) { return ! old value equals ( metrics get live nodes ( ) ) ; } } , 500 , 5 * 1000 ) ; }


create { @ link test output topic } to be used for reading records from topic

public final < k , v > test output topic < k , v > create output topic ( final string topic name , final deserializer < k > key deserializer , final deserializer < v > value deserializer ) { return new test output topic < > ( this , topic name , key deserializer , value deserializer ) ; }


save away the user ' s original partitioner before we override it

static void set java partitioner ( job conf conf , class cls ) { conf set ( submitter partitioner , cls get name ( ) ) ; }


public int get size ( ) { return table = = null ? 0 : table get size ( ) ; }


public static void main ( string [ ] args ) { / / db seeding logger info ( " db seeding : " + " 1 user : { \ " ignite 1 7 7 1 \ " , amount = 1000 0 } , " + " 2 products : { \ " computer \ " : price = 800 0 , \ " car \ " : price = 20000 0 } " ) ; db get instance ( ) seed user ( " ignite 1 7 7 1 " , 1000 0 ) ; db get instance ( ) seed item ( " computer " , 800 0 ) ; db get instance ( ) seed item ( " car " , 20000 0 ) ; final var application services = new application services impl ( ) ; receipt view model receipt ; logger info ( " [ request ] user : " + " abc 1 2 3 " + " buy product : " + " tv " ) ; receipt = application services logged in user purchase ( " abc 1 2 3 " , " tv " ) ; receipt show ( ) ; maintenance lock get instance ( ) set lock ( false ) ; logger info ( " [ request ] user : " + " abc 1 2 3 " + " buy product : " + " tv " ) ; receipt = application services logged in user purchase ( " abc 1 2 3 " , " tv " ) ; receipt show ( ) ; logger info ( " [ request ] user : " + " ignite 1 7 7 1 " + " buy product : " + " tv " ) ; receipt = application services logged in user purchase ( " ignite 1 7 7 1 " , " tv " ) ; receipt show ( ) ; logger info ( " [ request ] user : " + " ignite 1 7 7 1 " + " buy product : " + " car " ) ; receipt = application services logged in user purchase ( " ignite 1 7 7 1 " , " car " ) ; receipt show ( ) ; logger info ( " [ request ] user : " + " ignite 1 7 7 1 " + " buy product : " + " computer " ) ; receipt = application services logged in user purchase ( " ignite 1 7 7 1 " , " computer " ) ; receipt show ( ) ; }


gets the original image bounds , in view - absolute coordinates the original image bounds are those reported by the hierarchy the hierarchy itself may apply scaling on its own ( e g due to scale type ) so the reported bounds are not necessarily the same as the actual bitmap dimensions in other words , the original image bounds correspond to the image bounds within this view when no zoomable transformation is applied , but including the potential scaling of the hierarchy having the actual bitmap dimensions abstracted away from this view greatly simplifies implementation because the actual bitmap may change ( e g when a high - res image arrives and replaces the previously set low - res image ) with proper hierarchy scaling ( e g fit center ) , this underlying change will not affect this view nor the zoomable transformation in any way

protected void get image bounds ( rect f out bounds ) { get hierarchy ( ) get actual image bounds ( out bounds ) ; }


check for a { @ code big integer } { @ code big decimal } long overflow before returning the given number as a long value

private static long checked long value ( number number , class < ? extends number > target class ) { big integer big int = null ; if ( number instanceof big integer ) { big int = ( big integer ) number ; } else if ( number instanceof big decimal ) { big int = ( ( big decimal ) number ) to big integer ( ) ; } / / effectively analogous to jdk 8 ' s big integer long value exact ( ) if ( big int ! = null & & ( big int compare to ( long min ) < 0 | | big int compare to ( long max ) > 0 ) ) { raise overflow exception ( number , target class ) ; } return number long value ( ) ; }


generate a sample of data set by the probability fraction of each element

public static < t > map partition operator < t , t > sample ( data set < t > input , final boolean with replacement , final double fraction , final long seed ) { return input map partition ( new sample with fraction < t > ( with replacement , fraction , seed ) ) ; }


if false , the widgets are arranged in a single column and the preferred height is the widget heights plus spacing if true , the widgets will wrap using the height of the vertical group the preferred height of the group will be 0 as it is expected that something external will set the height of the group widgets are sized to their preferred height unless it is larger than the group ' s height , in which case they are sized to the group ' s height but not less than their minimum height default is false when wrap is enabled , the group ' s preferred width depends on the height of the group in some cases the parent of the group will need to layout twice : once to set the height of the group and a second time to adjust to the group ' s new preferred width

public vertical group wrap ( ) { wrap = true ; return this ; }


checks if any of the contained media type expressions match the given request ' content - type ' header and returns an instance that is guaranteed to contain matching expressions only the match is performed via { @ link media type # includes ( media type ) }

public consumes request condition get matching condition ( http servlet request request ) { if ( cors utils is pre flight request ( request ) ) { return empty condition ; } if ( is empty ( ) ) { return this ; } if ( ! has body ( request ) & & ! this body required ) { return empty condition ; } / / common media types are cached at the level of mime type utils media type content type ; try { content type = string utils has length ( request get content type ( ) ) ? media type parse media type ( request get content type ( ) ) : media type application octet stream ; } catch ( invalid media type exception ex ) { return null ; } list < consume media type expression > result = get matching expressions ( content type ) ; return ! collection utils is empty ( result ) ? new consumes request condition ( result ) : null ; }


determine if the { @ code response } contains a watch whose value this expects a response like : < code > { " metadata " : { " xpack " : { " version " : 6000002 } } } < code >

boolean should replace cluster alert ( final response response , final x content x content , final int minimum version ) throws i o exception { / / no named content used ; so empty is fine final map < string , object > resources = x content helper convert to map ( x content , response get entity ( ) get content ( ) , false ) ; / / if it ' s empty , then there ' s no version in the response thanks to filter path if ( resources is empty ( ) = = false ) { @ suppress warnings ( " unchecked " ) final map < string , object > metadata = ( map < string , object > ) resources get ( " metadata " ) ; @ suppress warnings ( " unchecked " ) final map < string , object > xpack = metadata ! = null ? ( map < string , object > ) metadata get ( " xpack " ) : null ; final object version = xpack ! = null ? xpack get ( " version created " ) : null ; / / if we don ' t have it ( perhaps more fields were returned ) , then we need to replace it if ( version instanceof number ) { / / the version in the cluster alert is expected to include the alpha / beta / rc codes as well return ( ( number ) version ) int value ( ) < minimum version ; } } return true ; }


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


number of bytes consumed = 2 return decoded result

private static int decode msb lsb ( byte buf buffer ) { int min = 0 ; int max = 65535 ; short msb size = buffer read unsigned byte ( ) ; short lsb size = buffer read unsigned byte ( ) ; int result = msb size < < 8 | lsb size ; if ( result < min | | result > max ) { result = - 1 ; } return result ; }


duplicates this { @ link byte buf holder } be aware that this will not automatically call { @ link # retain ( ) }


returns the one - line summary of the docstring

public string get summary ( ) { return summary ; }


visits a conditional expression checks : type validation

public void visit conditional ( e conditional user conditional node , semantic scope semantic scope ) { if ( semantic scope get condition ( user conditional node , write class ) ) { throw user conditional node create error ( new illegal argument exception ( " invalid assignment : cannot assign a value to conditional operation [ ? : ] " ) ) ; } if ( semantic scope get condition ( user conditional node , read class ) = = false ) { throw user conditional node create error ( new illegal argument exception ( " not a statement : result not used from conditional operation [ ? : ] " ) ) ; } a expression user condition node = user conditional node get condition node ( ) ; semantic scope set condition ( user condition node , read class ) ; semantic scope put decoration ( user condition node , new target type ( boolean class ) ) ; checked visit ( user condition node , semantic scope ) ; decorate with cast ( user condition node , semantic scope ) ; a expression user true node = user conditional node get true node ( ) ; semantic scope set condition ( user true node , read class ) ; semantic scope copy decoration ( user conditional node , user true node , target type class ) ; semantic scope replicate condition ( user conditional node , user true node , explicit class ) ; semantic scope replicate condition ( user conditional node , user true node , internal class ) ; checked visit ( user true node , semantic scope ) ; class < ? > left value type = semantic scope get decoration ( user true node , value type class ) get value type ( ) ; a expression user false node = user conditional node get false node ( ) ; semantic scope set condition ( user false node , read class ) ; semantic scope copy decoration ( user conditional node , user false node , target type class ) ; semantic scope replicate condition ( user conditional node , user false node , explicit class ) ; semantic scope replicate condition ( user conditional node , user false node , internal class ) ; checked visit ( user false node , semantic scope ) ; class < ? > right value type = semantic scope get decoration ( user false node , value type class ) get value type ( ) ; target type target type = semantic scope get decoration ( user conditional node , target type class ) ; class < ? > value type ; if ( target type = = null ) { class < ? > promote = analyzer caster promote conditional ( left value type , right value type ) ; if ( promote = = null ) { throw user conditional node create error ( new class cast exception ( " cannot apply the conditional operator [ ? : ] to the types " + " [ " + painless lookup utility type to canonical type name ( left value type ) + " ] and " + " [ " + painless lookup utility type to canonical type name ( right value type ) + " ] " ) ) ; } semantic scope put decoration ( user true node , new target type ( promote ) ) ; semantic scope put decoration ( user false node , new target type ( promote ) ) ; value type = promote ; } else { value type = target type get target type ( ) ; } decorate with cast ( user true node , semantic scope ) ; decorate with cast ( user false node , semantic scope ) ; semantic scope put decoration ( user conditional node , new value type ( value type ) ) ; }


public void post ( string path , template view route route , template engine engine ) { add route ( http method post , template view route impl create ( path , route , engine ) ) ; }


resolve the given location pattern into resource objects overlapping resource entries that point to the same physical resource should be avoided , as far as possible the result should have set semantics

resource [ ] get resources ( string location pattern ) throws i o exception ;


in this test , we block a and also give it an empty data frame to send all bytes should be delegated to by c and d here ' s a view of the tree ( stream a is blocked ) 0 \ [ a ] ( 0 ) b \ c d

public void blocked stream with data and not allowed to send should spread data to children ( ) throws http 2 exception { / / a cannot stream init state ( stream a , 0 , true , false ) ; blocked stream should spread data to children ( false ) ; }


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


execute the given single statement , and return the execution result the statement can be ddldmldqlshowdescribeexplainuse for dml and dql , this method returns table result once the job has been submitted for ddl and dcl statements , table result is returned once the operation has finished

table result execute sql ( string statement ) ;


set the sort definition for this holder typically an instance of mutable sort definition

public void set sort ( @ nullable sort definition sort ) { this sort = sort ; }


retrieves the data contained in the regular files named by { @ code keys } in the directory given by { @ code path } non - regular files ( such as directories ) in the given directory are silently ignored

public config data get ( string path , set < string > keys ) { return get ( path , pathname - > files is regular file ( pathname ) & & keys contains ( pathname get file name ( ) to string ( ) ) ) ; }


indicate to the { @ link pdb address manager } that a new symbol with the given name has the associated address this allows the pdb address manager to create and organize the re - mapped address and supply them also returns the address of the pre - existing symbol of the same name if the name was unique , otherwise null if it didn ' t exist or wasn ' t unique

address witness symbol name at address ( string name , address address ) { return pdb address manager witness symbol name at address ( name , address ) ; }


protected model and view generate access token response and get model and view ( final o auth registered service registered service , final authentication authentication , final o auth 2 0 grant types grant type ) { val mock request = new mock http servlet request ( http method get name ( ) , context + o auth 2 0 constants access token url ) ; val mock response = new mock http servlet response ( ) ; val service = registered service test utils get service ( " example " ) ; val holder = access token request data holder builder ( ) client id ( registered service get client id ( ) ) service ( service ) authentication ( authentication ) registered service ( registered service ) grant type ( grant type ) response type ( o auth 2 0 response types code ) ticket granting ticket ( new mock ticket granting ticket ( " casuser " ) ) build ( ) ; val generated token = oauth token generator generate ( holder ) ; val builder = o auth 2 0 access token response result builder ( ) ; val result = builder registered service ( registered service ) response type ( o auth 2 0 response types code ) service ( service ) generated token ( generated token ) build ( ) ; return access token response generator generate ( mock request , mock response , result ) ; }


ingest level statistics see { @ link ingest stats # to x content ( x content builder , params ) } for fields and format if there are no ingest pipelines referencing the model , then the ingest statistics could be null

public map < string , object > get ingest stats ( ) { return ingest stats ; }


invalidates the update center json data for all the sites and force re - retrieval

public http response do invalidate data ( ) { for ( update site site : sites ) { site do invalidate data ( ) ; } return http responses ok ( ) ; }


converts a dynamo d b item to a { @ link d d b path metadata }

static d d b path metadata item to path metadata ( item item , string username ) { if ( item = = null ) { return null ; } string parent str = item get string ( parent ) ; preconditions check not null ( parent str , " no parent entry in item % s " , item ) ; string child str = item get string ( child ) ; preconditions check not null ( child str , " no child entry in item % s " , item ) ; / / skip table version markers , which are only non - absolute paths stored path raw path = new path ( parent str , child str ) ; if ( ! raw path is absolute and scheme authority null ( ) ) { return null ; } path parent = new path ( constants fs s3a + " : / " + parent str + " / " ) ; path path = new path ( parent , child str ) ; boolean is dir = item has attribute ( is dir ) & & item get boolean ( is dir ) ; boolean is authoritative dir = false ; final s 3 a file status file status ; long last updated = 0 ; if ( is dir ) { is authoritative dir = ! ignored fields contains ( is authoritative ) & & item has attribute ( is authoritative ) & & item get boolean ( is authoritative ) ; file status = dynamo d b metadata store make dir status ( path , username ) ; } else { long len = item has attribute ( file length ) ? item get long ( file length ) : 0 ; long mod time = item has attribute ( mod time ) ? item get long ( mod time ) : 0 ; long block = item has attribute ( block size ) ? item get long ( block size ) : 0 ; string e tag = item get string ( etag ) ; string version id = item get string ( version id ) ; file status = new s 3 a file status ( len , mod time , path , block , username , e tag , version id ) ; } last updated = ! ignored fields contains ( last updated ) & & item has attribute ( last updated ) ? item get long ( last updated ) : 0 ; boolean is deleted = item has attribute ( is deleted ) & & item get boolean ( is deleted ) ; return new d d b path metadata ( file status , tristate unknown , is deleted , is authoritative dir , last updated ) ; }


{ @ 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 ) ; }


return a map from topic names to futures which can be used to check the status of individual topics

public map < string , kafka future < topic description > > values ( ) { return futures ; }


round down to the beginning of the month of the year of the specified time

public static long round month of year ( final long utc millis ) { int year = get year ( utc millis ) ; int month = get month of year ( utc millis , year ) ; return date utils of ( year , month ) ; }


public open a p i get open a p i ( ) { return specification ; }


add the given { @ link byte buf } on the specific index be aware that this method does not increase the { @ code writer index } of the { @ link composite byte buf } if you need to have it increased use { @ link # add component ( boolean , int , byte buf ) } { @ link byte buf # release ( ) } ownership of { @ code buffer } is transferred to this { @ link composite byte buf }

public composite byte buf add component ( int c index , byte buf buffer ) { return add component ( false , c index , buffer ) ; }


used for synchronous execution if { @ link scope # request } is being used then synchronous execution will only result in collapsing if other threads are running within the same scope

public response type execute ( ) { try { return queue ( ) get ( ) ; } catch ( throwable e ) { if ( e instanceof hystrix runtime exception ) { throw ( hystrix runtime exception ) e ; } / / if we have an exception we know about we ' ll throw it directly without the threading wrapper exception if ( e get cause ( ) instanceof hystrix runtime exception ) { throw ( hystrix runtime exception ) e get cause ( ) ; } / / we don ' t know what kind of exception this is so create a generic message and throw a new hystrix runtime exception string message = get class ( ) get simple name ( ) + " hystrix collapser failed while executing " ; logger debug ( message , e ) ; / / debug only since we ' re throwing the exception and someone higher will do something with it / / todo should this be made a hystrix runtime exception ? throw new runtime exception ( message , e ) ; } }


emits a note to build log during annotation processing for debugging

private void note ( string note ) { env get messager ( ) print message ( diagnostic kind note , note ) ; }


public object get target ( ) { jenkins get ( ) check permission ( jenkins administer ) ; return this ; }


set the value of the singleton property governs whether this factory should always return the same proxy instance ( which implies the same target ) or whether it should return a new prototype instance , which implies that the target and interceptors may be new instances also , if they are obtained from prototype bean definitions this allows for fine control of independenceuniqueness in the object graph

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


calls the wrapped configure ( ) method , then sets timeouts

public http u r l connection configure ( http u r l connection conn ) throws i o exception { if ( cc ! = null ) { conn = cc configure ( conn ) ; } conn set connect timeout ( timeout * 1000 ) ; / / conversion to milliseconds conn set read timeout ( timeout * 1000 ) ; return conn ; }


parses the given { @ link executable element } for any < code > return < code > information and adds it to the json object

private void add return ( executable element exec element , json object obj ) { type mirror return type = exec element get return type ( ) ; json object return obj = new json object ( ) ; return obj add property ( " type long " , get type long ( return type ) ) ; return obj add property ( " type short " , get type short ( return type ) ) ; string comment = " " ; doc comment tree comment tree = doc trees get doc comment tree ( exec element ) ; if ( comment tree ! = null ) { for ( doc tree block tag : comment tree get block tags ( ) ) { if ( block tag get kind ( ) equals ( doc tree kind return ) ) { comment = get comment ( block tag ) ; } } } return obj add property ( " comment " , comment ) ; obj add ( " return " , return obj ) ; }


， " bread " & " butter " & quot ; bread & quot ; & amp ; & quot ; butter & quot ;

public static string escape html ( string html ) { return string escape utils escape html 4 ( html ) ; }


creates a table source andor table sink from a descriptor descriptors allow for declaring the communication to external systems in an implementation - agnostic way the classpath is scanned for suitable table factories that match the desired configuration the following example shows how to read from a kafka connector using a json format and registering a table source " my table " in append mode : { @ code table env connect ( new kafka ( ) version ( " 0 11 " ) topic ( " clicks " ) property ( " group id " , " click - group " ) start from earliest ( ) ) with format ( new json ( ) json schema ( " { } " ) fail on missing field ( false ) ) with schema ( new schema ( ) field ( " user - name " , " varchar " ) from ( " u name " ) field ( " count " , " decimal " ) field ( " proc - time " , " timestamp " ) proctime ( ) ) in append mode ( ) create temporary table ( " my table " ) }

stream table descriptor connect ( connector descriptor connector descriptor ) ;


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


sets { @ link format # encoder padding } the default value is 0

public builder set encoder padding ( int encoder padding ) { this encoder padding = encoder padding ; return this ; } / / text specific


restart ide if necessary ( ex : material design components )

private void restart ide if necessary ( final m t base config < m t form , m t config > mt config , final m t form form ) { / / restart the ide if changed if ( mt config needs restart ( form ) ) { final string title = material theme bundle message ( " m t form restart dialog title " ) ; final string message = material theme bundle message ( " m t form restart dialog content " ) ; final int answer = messages show yes no dialog ( message , title , messages get question icon ( ) ) ; if ( answer = = messages yes ) { will restart ide = true ; } } }


public long elapsed time ( ) { return now ( ) - start time ; }


return the arguments for the method invocation

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


specifies the types for the csv fields this method parses the csv data to a 25 - tuple which has fields of the specified types this method is overloaded for each possible length of the tuples to support type safe creation of data sets through csv parsing


a callback method that should never be invoked directly

public void on load failed ( glide exception e ) { on load failed ( e , log warn ) ; }


encodes the byte array into a newly created hex char array , without allocating any other temporary variables

public static char [ ] to hex char array ( byte [ ] bytes ) { objects require non null ( bytes ) ; final char [ ] result = new char [ 2 * bytes length ] ; for ( int i = 0 ; i < bytes length ; i + + ) { byte b = bytes [ i ] ; result [ 2 * i ] = hex digits [ b > > 4 & 0xf ] ; result [ 2 * i + 1 ] = hex digits [ b & 0xf ] ; } return result ; }