Class VcrServer


  • public class VcrServer
    extends java.lang.Object
    Virtual Cloud Replicator server
    • Constructor Summary

      Constructors 
      Constructor Description
      VcrServer​(com.github.ambry.config.VerifiableProperties properties, com.github.ambry.clustermap.ClusterAgentsFactory clusterAgentsFactory, com.github.ambry.notification.NotificationSystem notificationSystem, java.util.function.Function<com.codahale.metrics.MetricRegistry,​com.codahale.metrics.jmx.JmxReporter> reporterFactory)
      VcrServer constructor.
    • Constructor Detail

      • VcrServer

        public VcrServer​(com.github.ambry.config.VerifiableProperties properties,
                         com.github.ambry.clustermap.ClusterAgentsFactory clusterAgentsFactory,
                         com.github.ambry.notification.NotificationSystem notificationSystem,
                         java.util.function.Function<com.codahale.metrics.MetricRegistry,​com.codahale.metrics.jmx.JmxReporter> reporterFactory)
        VcrServer constructor.
        Parameters:
        properties - the config properties to use.
        clusterAgentsFactory - the ClusterAgentsFactory to use.
        notificationSystem - the NotificationSystem to use.
        reporterFactory - if non-null, use this function to set up a JmxReporter with custom settings. If this option is null the default settings for the reporter will be used.
    • Method Detail

      • startup

        public void startup()
                     throws java.lang.InstantiationException
        Start the VCR Server.
        Throws:
        java.lang.InstantiationException - if an error was encountered during startup.
      • shutdown

        public void shutdown()
        This method is expected to be called in the exit path as long as the AmbryServer instance construction was successful. This is expected to be called even if startup() did not succeed.
      • awaitShutdown

        public boolean awaitShutdown​(int timeoutMs)
                              throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • getVirtualReplicatorCluster

        public com.github.ambry.clustermap.VirtualReplicatorCluster getVirtualReplicatorCluster()