responses.add(new SyncResultsResponse(false, false, rpcMetadata)); responses.add(new SyncResultsResponse(false, true, rpcMetadata)); responses.add(new SyncResultsResponse(true, false, rpcMetadata));
responses.add(new SyncResultsResponse(false, false, rpcMetadata)); responses.add(new SyncResultsResponse(false, true, rpcMetadata)); responses.add(new SyncResultsResponse(true, false, rpcMetadata));
responses.add(new SyncResultsResponse(false, false, rpcMetadata)); responses.add(new SyncResultsResponse(false, true, rpcMetadata)); responses.add(new SyncResultsResponse(true, false, rpcMetadata));
public SyncResultsResponse apply(SyncResultsRequest request) { final Meta.StatementHandle h = new Meta.StatementHandle( request.connectionId, request.statementId, null); SyncResultsResponse response; try { // Set success on the cached statement response = new SyncResultsResponse(meta.syncResults(h, request.state, request.offset), false, serverLevelRpcMetadata); } catch (NoSuchStatementException e) { // Tried to sync results on a statement which wasn't cached response = new SyncResultsResponse(false, true, serverLevelRpcMetadata); } return response; }
public SyncResultsResponse apply(SyncResultsRequest request) { final Meta.StatementHandle h = new Meta.StatementHandle( request.connectionId, request.statementId, null); SyncResultsResponse response; try { // Set success on the cached statement response = new SyncResultsResponse(meta.syncResults(h, request.state, request.offset), false, serverLevelRpcMetadata); } catch (NoSuchStatementException e) { // Tried to sync results on a statement which wasn't cached response = new SyncResultsResponse(false, true, serverLevelRpcMetadata); } return response; }
public SyncResultsResponse apply(SyncResultsRequest request) { final Meta.StatementHandle h = new Meta.StatementHandle( request.connectionId, request.statementId, null); SyncResultsResponse response; try { // Set success on the cached statement response = new SyncResultsResponse(meta.syncResults(h, request.state, request.offset), false, serverLevelRpcMetadata); } catch (NoSuchStatementException e) { // Tried to sync results on a statement which wasn't cached response = new SyncResultsResponse(false, true, serverLevelRpcMetadata); } return response; }
SyncResultsResponse deserialize(Message genericMsg) { final Responses.SyncResultsResponse msg = ProtobufService.castProtobufMessage(genericMsg, Responses.SyncResultsResponse.class); RpcMetadataResponse metadata = null; if (msg.hasField(METADATA_DESCRIPTOR)) { metadata = RpcMetadataResponse.fromProto(msg.getMetadata()); } return new SyncResultsResponse(msg.getMoreResults(), msg.getMissingStatement(), metadata); }
SyncResultsResponse deserialize(Message genericMsg) { final Responses.SyncResultsResponse msg = ProtobufService.castProtobufMessage(genericMsg, Responses.SyncResultsResponse.class); final Descriptor desc = msg.getDescriptorForType(); RpcMetadataResponse metadata = null; if (ProtobufService.hasField(msg, desc, Responses.SyncResultsResponse.METADATA_FIELD_NUMBER)) { metadata = RpcMetadataResponse.fromProto(msg.getMetadata()); } return new SyncResultsResponse(msg.getMoreResults(), msg.getMissingStatement(), metadata); }
SyncResultsResponse deserialize(Message genericMsg) { final Responses.SyncResultsResponse msg = ProtobufService.castProtobufMessage(genericMsg, Responses.SyncResultsResponse.class); RpcMetadataResponse metadata = null; if (msg.hasField(METADATA_DESCRIPTOR)) { metadata = RpcMetadataResponse.fromProto(msg.getMetadata()); } return new SyncResultsResponse(msg.getMoreResults(), msg.getMissingStatement(), metadata); }