public final Future<V> putIfAbsentAsync(K key, V value, Flag... flags) {
return putIfAbsentAsync(key, value, MILLISECONDS.toMillis(defaultLifespan), MILLISECONDS, MILLISECONDS.toMillis(defaultMaxIdleTime), MILLISECONDS, flags);
}
public final Future<V> putIfAbsentAsync(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit, Flag... flags) {
InvocationContext ctx = getInvocationContext();
if (flags != null) ctx.setFlags(flags);
ctx.setUseFutureReturnType(true);
PutKeyValueCommand command = commandsFactory.buildPutKeyValueCommand(key, value, lifespanUnit.toMillis(lifespan), maxIdleTimeUnit.toMillis(maxIdleTime));
command.setPutIfAbsent(true);
return wrapInFuture(invoker.invoke(ctx, command));
}