@Test public void validateRequestTest() { Assert.assertEquals(vcrRequests.validateRequest(null, null, false), ServerErrorCode.Bad_Request); Assert.assertEquals(vcrRequests.validateRequest(null, null, true), ServerErrorCode.Bad_Request); MockPartitionId unavailablePartitionId = new MockPartitionId(); Assert.assertEquals(vcrRequests.validateRequest(unavailablePartitionId, null, false), ServerErrorCode.No_Error); Assert.assertEquals(vcrRequests.validateRequest(unavailablePartitionId, null, true), ServerErrorCode.No_Error); Assert.assertEquals(vcrRequests.validateRequest(availablePartitionId, null, false), ServerErrorCode.No_Error); Assert.assertEquals(vcrRequests.validateRequest(availablePartitionId, null, true), ServerErrorCode.No_Error); }
@Override protected ServerErrorCode validateRequest(PartitionId partition, RequestOrResponseType requestType, boolean skipPartitionAvailableCheck) { if (partition == null) { metrics.badRequestError.inc(); return ServerErrorCode.Bad_Request; } return ServerErrorCode.No_Error; }
VcrRequests extends AmbryRequests { @Override protected ServerErrorCode validateRequest(PartitionId partition, RequestOrResponseType requestType, boolean skipPartitionAvailableCheck) { if (partition == null) { metrics.badRequestError.inc(); return ServerErrorCode.Bad_Request; } return ServerErrorCode.No_Error; } }
VcrRequests extends AmbryRequests { @Override protected ServerErrorCode validateRequest(PartitionId partition, RequestOrResponseType requestType, boolean skipPartitionAvailableCheck) { if (partition == null) { metrics.badRequestError.inc(); return ServerErrorCode.Bad_Request; } return ServerErrorCode.No_Error; } VcrRequests(StoreManager storeManager, RequestResponseChannel requestResponseChannel, ClusterMap clusterMap,
      DataNodeId currentNode, MetricRegistry registry, ServerMetrics serverMetrics, FindTokenHelper findTokenHelper,
      NotificationSystem notification, ReplicationEngine replicationEngine, StoreKeyFactory storageKeyFactory,
      StoreKeyConverterFactory storeKeyConverterFactory); }
VcrRequests extends AmbryRequests { @Override protected ServerErrorCode validateRequest(PartitionId partition, RequestOrResponseType requestType, boolean skipPartitionAvailableCheck) { if (partition == null) { metrics.badRequestError.inc(); return ServerErrorCode.Bad_Request; } return ServerErrorCode.No_Error; } VcrRequests(StoreManager storeManager, RequestResponseChannel requestResponseChannel, ClusterMap clusterMap,
      DataNodeId currentNode, MetricRegistry registry, ServerMetrics serverMetrics, FindTokenHelper findTokenHelper,
      NotificationSystem notification, ReplicationEngine replicationEngine, StoreKeyFactory storageKeyFactory,
      StoreKeyConverterFactory storeKeyConverterFactory); @Override void handlePutRequest(NetworkRequest request); @Override void handleDeleteRequest(NetworkRequest request); @Override void handleTtlUpdateRequest(NetworkRequest request); }
VcrRequests extends AmbryRequests { @Override protected ServerErrorCode validateRequest(PartitionId partition, RequestOrResponseType requestType, boolean skipPartitionAvailableCheck) { if (partition == null) { metrics.badRequestError.inc(); return ServerErrorCode.Bad_Request; } return ServerErrorCode.No_Error; } VcrRequests(StoreManager storeManager, RequestResponseChannel requestResponseChannel, ClusterMap clusterMap,
      DataNodeId currentNode, MetricRegistry registry, ServerMetrics serverMetrics, FindTokenHelper findTokenHelper,
      NotificationSystem notification, ReplicationEngine replicationEngine, StoreKeyFactory storageKeyFactory,
      StoreKeyConverterFactory storeKeyConverterFactory); @Override void handlePutRequest(NetworkRequest request); @Override void handleDeleteRequest(NetworkRequest request); @Override void handleTtlUpdateRequest(NetworkRequest request);  }