Class ClusterServiceImpl

    • Field Detail

      • KARAF_CELLAR_CLUSTER_NODE_CONFIGURATION

        public static final String KARAF_CELLAR_CLUSTER_NODE_CONFIGURATION
        See Also:
        Constant Field Values
      • KARAF_CLUSTER_CONFIGURATION_PUBLIC_ENDPOINTS

        public static final String KARAF_CLUSTER_CONFIGURATION_PUBLIC_ENDPOINTS
        See Also:
        Constant Field Values
      • KARAF_CLUSTER_CONFIGURATION_INTERNAL_ENDPOINTS

        public static final String KARAF_CLUSTER_CONFIGURATION_INTERNAL_ENDPOINTS
        See Also:
        Constant Field Values
    • Constructor Detail

      • ClusterServiceImpl

        public ClusterServiceImpl()
    • Method Detail

      • setPersistenceService

        public void setPersistenceService​(PersistenceService persistenceService)
      • setKarafCellarClusterManager

        public void setKarafCellarClusterManager​(org.apache.karaf.cellar.core.ClusterManager karafCellarClusterManager)
      • setKarafCellarEventProducer

        public void setKarafCellarEventProducer​(org.apache.karaf.cellar.core.event.EventProducer karafCellarEventProducer)
      • setKarafCellarGroupManager

        public void setKarafCellarGroupManager​(org.apache.karaf.cellar.core.GroupManager karafCellarGroupManager)
      • setKarafCellarGroupName

        public void setKarafCellarGroupName​(String karafCellarGroupName)
      • setOsgiConfigurationAdmin

        public void setOsgiConfigurationAdmin​(org.osgi.service.cm.ConfigurationAdmin osgiConfigurationAdmin)
      • setPublicAddress

        public void setPublicAddress​(String publicAddress)
      • setInternalAddress

        public void setInternalAddress​(String internalAddress)
      • setNodeStatisticsUpdateFrequency

        public void setNodeStatisticsUpdateFrequency​(long nodeStatisticsUpdateFrequency)
      • setSchedulerService

        public void setSchedulerService​(SchedulerService schedulerService)
      • init

        public void init()
      • destroy

        public void destroy()
      • purge

        public void purge​(Date date)
        Description copied from interface: ClusterService
        Removes all data before the specified date from the context server.
        Specified by:
        purge in interface ClusterService
        Parameters:
        date - the Date before which all data needs to be removed
      • purge

        public void purge​(String scope)
        Description copied from interface: ClusterService
        Removes all data associated with the provided scope.
        Specified by:
        purge in interface ClusterService
        Parameters:
        scope - the scope for which we want to remove data
      • sendEvent

        public void sendEvent​(Serializable eventObject)
        Description copied from interface: ClusterService
        This function will send an event to the nodes of the cluster The function takes a Serializable to avoid dependency on any clustering framework
        Specified by:
        sendEvent in interface ClusterService
        Parameters:
        eventObject - this object will be cast to a org.apache.karaf.cellar.core.event.Event object
      • isClusterConfigPIDAllowed

        public boolean isClusterConfigPIDAllowed​(org.apache.karaf.cellar.core.Group group,
                                                 String category,
                                                 String pid,
                                                 org.apache.karaf.cellar.core.event.EventType type)
        Check if a configuration is allowed.
        Parameters:
        group - the cluster group.
        category - the configuration category constant.
        pid - the configuration PID.
        type - the cluster event type.
        Returns:
        true if the cluster event type is allowed, false else.