Class VcrRequests

  • All Implemented Interfaces:
    com.github.ambry.protocol.RequestAPI

    public class VcrRequests
    extends com.github.ambry.protocol.AmbryRequests
    Request implementation class for Vcr. All requests to the vcr server are handled by this class.
    • Field Summary

      • Fields inherited from class com.github.ambry.protocol.AmbryRequests

        clusterMap, currentNode, findTokenHelper, messageFormatMetrics, metrics, notification, publicAccessLogger, replicationEngine, requestResponseChannel, storeKeyFactory, storeManager
    • Constructor Summary

      Constructors 
      Constructor Description
      VcrRequests​(com.github.ambry.server.StoreManager storeManager, com.github.ambry.network.RequestResponseChannel requestResponseChannel, com.github.ambry.clustermap.ClusterMap clusterMap, com.github.ambry.clustermap.DataNodeId currentNode, com.codahale.metrics.MetricRegistry registry, com.github.ambry.commons.ServerMetrics serverMetrics, com.github.ambry.replication.FindTokenHelper findTokenHelper, com.github.ambry.notification.NotificationSystem notification, com.github.ambry.replication.ReplicationEngine replicationEngine, com.github.ambry.store.StoreKeyFactory storageKeyFactory, com.github.ambry.store.StoreKeyConverterFactory storeKeyConverterFactory)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected long getRemoteReplicaLag​(com.github.ambry.store.Store store, long totalBytesRead)  
      void handleDeleteRequest​(com.github.ambry.network.NetworkRequest request)  
      void handlePutRequest​(com.github.ambry.network.NetworkRequest request)  
      void handleTtlUpdateRequest​(com.github.ambry.network.NetworkRequest request)  
      protected com.github.ambry.server.ServerErrorCode validateRequest​(com.github.ambry.clustermap.PartitionId partition, com.github.ambry.protocol.RequestOrResponseType requestType, boolean skipPartitionAvailableCheck)  
      • Methods inherited from class com.github.ambry.protocol.AmbryRequests

        getConvertedStoreKeys, handleGetRequest, handleReplicaMetadataRequest, handleRequests, handleUndeleteRequest
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.github.ambry.protocol.RequestAPI

        handleAdminRequest
    • Constructor Detail

      • VcrRequests

        public VcrRequests​(com.github.ambry.server.StoreManager storeManager,
                           com.github.ambry.network.RequestResponseChannel requestResponseChannel,
                           com.github.ambry.clustermap.ClusterMap clusterMap,
                           com.github.ambry.clustermap.DataNodeId currentNode,
                           com.codahale.metrics.MetricRegistry registry,
                           com.github.ambry.commons.ServerMetrics serverMetrics,
                           com.github.ambry.replication.FindTokenHelper findTokenHelper,
                           com.github.ambry.notification.NotificationSystem notification,
                           com.github.ambry.replication.ReplicationEngine replicationEngine,
                           com.github.ambry.store.StoreKeyFactory storageKeyFactory,
                           com.github.ambry.store.StoreKeyConverterFactory storeKeyConverterFactory)
    • Method Detail

      • handlePutRequest

        public void handlePutRequest​(com.github.ambry.network.NetworkRequest request)
                              throws java.io.IOException,
                                     java.lang.InterruptedException
        Specified by:
        handlePutRequest in interface com.github.ambry.protocol.RequestAPI
        Overrides:
        handlePutRequest in class com.github.ambry.protocol.AmbryRequests
        Throws:
        java.io.IOException
        java.lang.InterruptedException
      • handleDeleteRequest

        public void handleDeleteRequest​(com.github.ambry.network.NetworkRequest request)
                                 throws java.io.IOException,
                                        java.lang.InterruptedException
        Specified by:
        handleDeleteRequest in interface com.github.ambry.protocol.RequestAPI
        Overrides:
        handleDeleteRequest in class com.github.ambry.protocol.AmbryRequests
        Throws:
        java.io.IOException
        java.lang.InterruptedException
      • handleTtlUpdateRequest

        public void handleTtlUpdateRequest​(com.github.ambry.network.NetworkRequest request)
                                    throws java.io.IOException,
                                           java.lang.InterruptedException
        Specified by:
        handleTtlUpdateRequest in interface com.github.ambry.protocol.RequestAPI
        Overrides:
        handleTtlUpdateRequest in class com.github.ambry.protocol.AmbryRequests
        Throws:
        java.io.IOException
        java.lang.InterruptedException
      • validateRequest

        protected com.github.ambry.server.ServerErrorCode validateRequest​(com.github.ambry.clustermap.PartitionId partition,
                                                                          com.github.ambry.protocol.RequestOrResponseType requestType,
                                                                          boolean skipPartitionAvailableCheck)
        Overrides:
        validateRequest in class com.github.ambry.protocol.AmbryRequests
      • getRemoteReplicaLag

        protected long getRemoteReplicaLag​(com.github.ambry.store.Store store,
                                           long totalBytesRead)
        Overrides:
        getRemoteReplicaLag in class com.github.ambry.protocol.AmbryRequests