AsyncMap

An asynchronous map.

see

does not allow null to be used as a key or value.

package

Default

Methods

__construct

__construct() 

Clear all entries in the map

clear( $arg0) : void

Arguments

$arg0

callable

Get a value from the map, asynchronously.

get( $arg0,  $arg1) : void

Arguments

$arg0

mixed

$arg1

callable

Put a value in the map, asynchronously.

put( $arg0,  $arg1,  $arg2,  $arg3 = null) : void

param $k [mixed] the key param $v [mixed] the value param $completionHandler [callable] - this will be called some time later to signify the value has been put put($k, $v, $completionHandler)

Like @see \io\vertx\jphp\core\shareddata\AsyncMap::put but specifying a time to live for the entry. Entry will expire and get evicted after the ttl.

param $k [mixed] the key param $v [mixed] the value param $ttl [integer] The time to live (in ms) for the entry param $completionHandler [callable] the handler put($k, $v, $ttl, $completionHandler)

Arguments

$arg0

mixed

$arg1

mixed

$arg2

callable | integer

$arg3

callable

Put the entry only if there is no entry with the key already present. If key already present then the existing value will be returned to the handler, otherwise null.

putIfAbsent( $arg0,  $arg1,  $arg2,  $arg3 = null) : void

param $k [mixed] the key param $v [mixed] the value param $completionHandler [callable] the handler putIfAbsent($k, $v, $completionHandler)

Link @see \io\vertx\jphp\core\shareddata\AsyncMap::putIfAbsent but specifying a time to live for the entry. Entry will expire and get evicted after the ttl.

param $k [mixed] the key param $v [mixed] the value param $ttl [integer] The time to live (in ms) for the entry param $completionHandler [callable] the handler putIfAbsent($k, $v, $ttl, $completionHandler)

Arguments

$arg0

mixed

$arg1

mixed

$arg2

callable | integer

$arg3

callable

Remove a value from the map, asynchronously.

remove( $arg0,  $arg1) : void

Arguments

$arg0

mixed

$arg1

callable

Remove a value from the map, only if entry already exists with same value.

removeIfPresent( $arg0,  $arg1,  $arg2) : void

Arguments

$arg0

mixed

$arg1

mixed

$arg2

callable

Replace the entry only if it is currently mapped to some value

replace( $arg0,  $arg1,  $arg2) : void

Arguments

$arg0

mixed

$arg1

mixed

$arg2

callable

Replace the entry only if it is currently mapped to a specific value

replaceIfPresent( $arg0,  $arg1,  $arg2,  $arg3) : void

Arguments

$arg0

mixed

$arg1

mixed

$arg2

mixed

$arg3

callable

Provide the number of entries in the map

size( $arg0) : void

Arguments

$arg0

callable