public class ClusterServiceImpl extends Object implements ClusterService
Modifier and Type | Field and Description |
---|---|
static String |
KARAF_CELLAR_CLUSTER_NODE_CONFIGURATION |
static String |
KARAF_CLUSTER_CONFIGURATION_INTERNAL_ENDPOINTS |
static String |
KARAF_CLUSTER_CONFIGURATION_PUBLIC_ENDPOINTS |
Constructor and Description |
---|
ClusterServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
List<ClusterNode> |
getClusterNodes()
Retrieves the list of available nodes for this context server instance.
|
Map<String,Map<String,Serializable>> |
getNodeSystemStatistics() |
void |
init() |
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.
|
void |
purge(Date date)
Removes all data before the specified date from the context server.
|
void |
purge(String scope)
Removes all data associated with the provided scope.
|
void |
sendEvent(Serializable eventObject)
This function will send an event to the nodes of the cluster
The function takes a Serializable to avoid dependency on any clustering framework
|
void |
setInternalAddress(String internalAddress) |
void |
setKarafCellarClusterManager(org.apache.karaf.cellar.core.ClusterManager karafCellarClusterManager) |
void |
setKarafCellarEventProducer(org.apache.karaf.cellar.core.event.EventProducer karafCellarEventProducer) |
void |
setKarafCellarGroupManager(org.apache.karaf.cellar.core.GroupManager karafCellarGroupManager) |
void |
setKarafCellarGroupName(String karafCellarGroupName) |
void |
setNodeStatisticsUpdateFrequency(long nodeStatisticsUpdateFrequency) |
void |
setOsgiConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin osgiConfigurationAdmin) |
void |
setPersistenceService(PersistenceService persistenceService) |
void |
setPublicAddress(String publicAddress) |
void |
setSchedulerService(SchedulerService schedulerService) |
public static final String KARAF_CELLAR_CLUSTER_NODE_CONFIGURATION
public static final String KARAF_CLUSTER_CONFIGURATION_PUBLIC_ENDPOINTS
public static final String KARAF_CLUSTER_CONFIGURATION_INTERNAL_ENDPOINTS
public void setPersistenceService(PersistenceService persistenceService)
public void setKarafCellarClusterManager(org.apache.karaf.cellar.core.ClusterManager karafCellarClusterManager)
public void setKarafCellarEventProducer(org.apache.karaf.cellar.core.event.EventProducer karafCellarEventProducer)
public void setKarafCellarGroupManager(org.apache.karaf.cellar.core.GroupManager karafCellarGroupManager)
public void setKarafCellarGroupName(String karafCellarGroupName)
public void setOsgiConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin osgiConfigurationAdmin)
public void setPublicAddress(String publicAddress)
public void setInternalAddress(String internalAddress)
public void setNodeStatisticsUpdateFrequency(long nodeStatisticsUpdateFrequency)
public void setSchedulerService(SchedulerService schedulerService)
public Map<String,Map<String,Serializable>> getNodeSystemStatistics()
public void init()
public void destroy()
public List<ClusterNode> getClusterNodes()
ClusterService
getClusterNodes
in interface ClusterService
ClusterNode
public void purge(Date date)
ClusterService
purge
in interface ClusterService
date
- the Date before which all data needs to be removedpublic void purge(String scope)
ClusterService
purge
in interface ClusterService
scope
- the scope for which we want to remove datapublic void sendEvent(Serializable eventObject)
ClusterService
sendEvent
in interface ClusterService
eventObject
- this object will be cast to a org.apache.karaf.cellar.core.event.Event objectpublic boolean isClusterConfigPIDAllowed(org.apache.karaf.cellar.core.Group group, String category, String pid, org.apache.karaf.cellar.core.event.EventType type)
group
- the cluster group.category
- the configuration category constant.pid
- the configuration PID.type
- the cluster event type.Copyright © 2014–2023 Apache Software Foundation. All rights reserved.