mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
added async put
This commit is contained in:
@@ -31,19 +31,24 @@ public abstract class MapStatelessClient<E extends ParameterizeWireKey> extends
|
||||
@Nullable
|
||||
protected <R> R proxyReturnTypedObject(
|
||||
@NotNull final E eventId,
|
||||
R usingValue,
|
||||
@Nullable R usingValue,
|
||||
@NotNull final Class<R> resultType,
|
||||
@Nullable Object... args) {
|
||||
|
||||
Function<ValueIn, R> consumerIn = resultType == CharSequence.class && usingValue != null
|
||||
? f -> {
|
||||
final Function<ValueIn, R> valueInRFunction = f -> {
|
||||
f.text((StringBuilder) usingValue);
|
||||
return usingValue;
|
||||
}
|
||||
: f -> f.object(resultType);
|
||||
};
|
||||
|
||||
final Function<ValueIn, R> consumerIn =
|
||||
resultType == CharSequence.class && usingValue != null
|
||||
? valueInRFunction
|
||||
: f -> f.object(resultType);
|
||||
|
||||
return proxyReturnWireConsumerInOut(eventId,
|
||||
CoreFields.reply,
|
||||
toParameters(eventId, args),
|
||||
consumerIn);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user