public class AdministrativeStatusManagerImpl extends Object implements AdministrativeStatusManager, CoreManagementService
AdministrativeStatusManager
service. For each Nuxeo Instance in the cluster one
instance of this class is created.Modifier and Type | Class and Description |
---|---|
class |
AdministrativeStatusManagerImpl.NotifyStatusesHandler |
Modifier and Type | Field and Description |
---|---|
protected GlobalAdministrativeStatusManager |
globalManager |
protected Notifier[] |
notifiers |
protected AdministrativeStatusPersister |
persister |
protected ScheduledExecutorService |
scheduler |
protected String |
serverInstanceName |
ACTIVATED_EVENT, ADMINISTRATIVE_EVENT_CATEGORY, ADMINISTRATIVE_EVENT_INSTANCE, ADMINISTRATIVE_EVENT_SERVICE, ADMINISTRATIVE_INSTANCE_ID, GLOBAL_INSTANCE_AVAILABILITY, PASSIVATED_EVENT
Constructor and Description |
---|
AdministrativeStatusManagerImpl(GlobalAdministrativeStatusManager globalManager,
AdministrativeStatusPersister persister) |
AdministrativeStatusManagerImpl(GlobalAdministrativeStatusManager globalManager,
AdministrativeStatusPersister persister,
String instanceIdentifier) |
Modifier and Type | Method and Description |
---|---|
AdministrativeStatus |
activate(String serviceIdentifier,
String message,
String login)
Mark a given resource as active.
|
AdministrativeStatus |
activateNuxeoInstance(String message,
String login)
Mark local Nuxeo instance as active.
|
protected AdministrativeStatus |
addLabelAndDescription(AdministrativeStatus status) |
AdministrativeStatus |
deactivate(String serviceIdentifier,
String message,
String login)
Mark a given resource as non active.
|
AdministrativeStatus |
deactivateNuxeoInstance(String message,
String login)
Mark local Nuxeo instance as non active.
|
protected void |
doNotifyAllStatuses() |
List<AdministrativeStatus> |
getAllStatuses()
List
AdministrativeStatus for all tracked resources (Servers or Services). |
AdministrativeStatus |
getNuxeoInstanceStatus()
Get the
AdministrativeStatus of a the local Nuxeo Instance. |
protected String |
getServerInstanceName() |
AdministrativeStatus |
getStatus(String serviceIdentifier)
Get the
AdministrativeStatus of a given resource. |
protected void |
notifyEvent(String eventName,
String instanceIdentifier,
String serviceIdentifier) |
protected void |
notifyOnStatus(AdministrativeStatus status) |
void |
onNuxeoServerShutdown() |
void |
onNuxeoServerStartup() |
AdministrativeStatus |
setNuxeoInstanceStatus(String state,
String message,
String login)
Sets the
AdministrativeStatus of the Local Nuxeo Instance. |
AdministrativeStatus |
setStatus(String serviceIdentifier,
String state,
String message,
String login)
Sets the
AdministrativeStatus of a given resource. |
protected final AdministrativeStatusPersister persister
protected final GlobalAdministrativeStatusManager globalManager
protected final String serverInstanceName
protected ScheduledExecutorService scheduler
public AdministrativeStatusManagerImpl(GlobalAdministrativeStatusManager globalManager, AdministrativeStatusPersister persister)
public AdministrativeStatusManagerImpl(GlobalAdministrativeStatusManager globalManager, AdministrativeStatusPersister persister, String instanceIdentifier)
protected String getServerInstanceName()
protected void notifyEvent(String eventName, String instanceIdentifier, String serviceIdentifier)
public void onNuxeoServerStartup()
protected void doNotifyAllStatuses()
public void onNuxeoServerShutdown()
protected void notifyOnStatus(AdministrativeStatus status)
public AdministrativeStatus activateNuxeoInstance(String message, String login)
AdministrativeStatusManager
activateNuxeoInstance
in interface AdministrativeStatusManager
public AdministrativeStatus deactivateNuxeoInstance(String message, String login)
AdministrativeStatusManager
deactivateNuxeoInstance
in interface AdministrativeStatusManager
public AdministrativeStatus getNuxeoInstanceStatus()
AdministrativeStatusManager
AdministrativeStatus
of a the local Nuxeo Instance.getNuxeoInstanceStatus
in interface AdministrativeStatusManager
public AdministrativeStatus setNuxeoInstanceStatus(String state, String message, String login)
AdministrativeStatusManager
AdministrativeStatus
of the Local Nuxeo Instance.setNuxeoInstanceStatus
in interface AdministrativeStatusManager
public AdministrativeStatus activate(String serviceIdentifier, String message, String login)
AdministrativeStatusManager
activate
in interface AdministrativeStatusManager
public AdministrativeStatus deactivate(String serviceIdentifier, String message, String login)
AdministrativeStatusManager
deactivate
in interface AdministrativeStatusManager
public AdministrativeStatus setStatus(String serviceIdentifier, String state, String message, String login)
AdministrativeStatusManager
AdministrativeStatus
of a given resource.setStatus
in interface AdministrativeStatusManager
public List<AdministrativeStatus> getAllStatuses()
AdministrativeStatusManager
AdministrativeStatus
for all tracked resources (Servers or Services).getAllStatuses
in interface AdministrativeStatusManager
protected AdministrativeStatus addLabelAndDescription(AdministrativeStatus status)
public AdministrativeStatus getStatus(String serviceIdentifier)
AdministrativeStatusManager
AdministrativeStatus
of a given resource.getStatus
in interface AdministrativeStatusManager
Copyright © 2018 Nuxeo. All rights reserved.