vertx / io.vertx.reactivex.core.shareddata / AsyncMap / rxPutIfAbsent

# rxPutIfAbsent

`open fun rxPutIfAbsent(k: K, v: V): Single<V>`

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.

### Parameters

`k` - the key

`v` - the value

Return

`open fun rxPutIfAbsent(k: K, v: V, ttl: Long): Single<V>`

Link `io.vertx.reactivex.core.shareddata.AsyncMap#putIfAbsent` but specifying a time to live for the entry. Entry will expire and get evicted after the ttl.

### Parameters

`k` - the key

`v` - the value

`ttl` - The time to live (in ms) for the entry

Return