class ClientCacheGetAndPutRequest extends ClientCacheKeyValueRequest {
    /**
     * Ctor.
     *
     * @param reader Reader.
     */
    public ClientCacheGetAndPutRequest(BinaryRawReaderEx reader) {
        super(reader);
    }

    /** {@inheritDoc} */
    @Override public ClientResponse process0(ClientConnectionContext ctx) {<FILL_FUNCTION_BODY>}

    /** {@inheritDoc} */
    @Override public IgniteInternalFuture<ClientResponse> processAsync0(ClientConnectionContext ctx) {
        return chainFuture(cache(ctx).getAndPutAsync(key(), val()), v -> new ClientObjectResponse(requestId(), v));
    }
}

        Object res = cache(ctx).getAndPut(key(), val());

        return new ClientObjectResponse(requestId(), res);
    
<methods>public java.lang.Object val() <variables>private final non-sealed java.lang.Object val