public class DefaultSpaceInstance extends AbstractGridComponent implements InternalSpaceInstance, StatisticsMonitor
adminDEFAULT_HISTORY_SIZE, DEFAULT_MONITOR_INTERVAL| Constructor and Description |
|---|
DefaultSpaceInstance(PUServiceBean puService,
SpaceServiceDetails spaceServiceDetails,
InternalAdmin admin,
JVMDetails jvmDetails) |
DefaultSpaceInstance(ServiceID serviceID,
IJSpace directSpace,
IInternalRemoteJSpaceAdmin spaceAdmin,
InternalAdmin admin,
JVMDetails jvmDetails) |
| Modifier and Type | Method and Description |
|---|---|
Future<?> |
demote(long maxSuspendTime,
TimeUnit timeUnit)
Demote a primary space instance to backup
|
Future<?> |
demote(long maxSuspendTime,
TimeUnit timeUnit,
CredentialsProvider credentialsProvider)
Demote a primary space instance to backup with provided security credentials
|
void |
disableLRMIMonitoring() |
void |
enableLRMIMonitoring() |
LRMIMonitoringDetails |
fetchLRMIMonitoringDetails() |
int |
getBackupId()
Returns the backup id (if it is a topology with backups) of the space instance.
|
ClusterInfo |
getClusterInfo()
Returns the space cluster information.
|
String |
getClusterSchema() |
long |
getCurrentTimeInMillis() |
GigaSpace |
getGigaSpace()
Returns the direct proxy to the actual space instance.
|
String |
getId()
Returns the Space instance Identifier
|
IJSpace |
getIJSpace() |
int |
getInstanceId()
Returns the instance id of the space (starting from 1).
|
JVMStatistics |
getJVMStatistics() |
SpaceInstanceStatistics |
getLastStatistics() |
SpaceMode |
getMode()
Returns the space mode, indicating if the space is primary or backup.
|
NIODetails |
getNIODetails() |
NIOStatistics |
getNIOStatistics() |
int |
getNumberOfBackups() |
int |
getNumberOfInstances() |
OSDetails |
getOSDetails() |
OSStatistics |
getOSStatistics() |
SpacePartition |
getPartition()
Returns the partition this instance is part of.
|
PlatformLogicalVersion |
getPlatformLogicalVersion() |
ReplicationStatusChangedEventManager |
getReplicationStatusChanged()
Allows to register for
ReplicationStatusChangedEvents. |
ReplicationTarget[] |
getReplicationTargets()
Returns the replication targets this space instance is replicating to.
|
SpaceInstanceRuntimeDetails |
getRuntimeDetails()
Returns the space runtime information.
|
RuntimeHolder |
getRuntimeHolder() |
ServiceID |
getServiceID() |
Space |
getSpace()
Returns the space this instance is part of.
|
IInternalRemoteJSpaceAdmin |
getSpaceAdmin() |
SpaceConfig |
getSpaceConfig() |
String |
getSpaceInstanceName()
Get this Space instance String representation.
If the Space is part of a highly-available partition (i.e. |
SpaceInstanceRemoteClassLoaderInfo |
getSpaceInstanceRemoteClassLoaderInfo()
Returns information about the space class loaders
|
SpaceModeChangedEventManager |
getSpaceModeChanged()
Allows to register for
SpaceModeChangedEvents. |
String |
getSpaceName() |
SpaceSuspendTypeChangedEventManager |
getSpaceSuspendTypeChanged()
Allows to register for
SpaceSuspendTypeChangedEvents. |
SpaceURL |
getSpaceUrl() |
SpaceInstanceStatistics |
getStatistics()
Returns the space instance statistics.
|
SpaceInstanceStatisticsChangedEventManager |
getStatisticsChanged()
Allows to register for
SpaceInstanceStatisticsChangedEvents. |
StatisticsHolder |
getStatisticsHolder() |
SuspendInfo |
getSuspendInfo() |
String |
getUid()
Returns the unique id of the grid component.
|
boolean |
isMonitoring()
Returns
true if statistics are now being monitored. |
boolean |
isSecured() |
void |
runGc() |
protected void |
setIJSpace(ISpaceProxy spaceProxy) |
void |
setMode(SpaceMode spaceMode) |
void |
setPartition(SpacePartition spacePartition) |
void |
setReplicationTargets(ReplicationTarget[] replicationTargets) |
void |
setSpace(Space space) |
void |
setStatisticsHistorySize(int historySize)
Sets the history size of number of statistics stored.
|
void |
setStatisticsInterval(long interval,
TimeUnit timeUnit)
Sets the statistics interval, automatically updating the monitoring scheduled tasks if
monitoring is enabled.
|
void |
setSuspendInfo(SuspendInfo suspendInfo) |
void |
startStatisticsMonitor()
Starts the statistics monitor, starting a scheduled monitor that polls for statistics.
|
void |
stopStatisticsMonitor()
Stops the statistics monitor.
|
String |
toString() |
boolean |
waitForMode(SpaceMode requiredMode,
long timeout,
TimeUnit timeUnit)
Waits for the space instance to move to the provided space mode.
|
addZone, assertStateChangesPermitted, getAdmin, getJVMDetails, getMachine, getOperatingSystem, getTransport, getVirtualMachine, getZones, isDiscovered, setDiscovered, setMachine, setOperatingSystem, setTransport, setVirtualMachineclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAdminsetDiscoveredisDiscoveredsetMachinegetMachinesetTransportgetTransportsetOperatingSystemgetOperatingSystemgetJVMDetailssetVirtualMachinegetVirtualMachineaddZonepublic DefaultSpaceInstance(ServiceID serviceID, IJSpace directSpace, IInternalRemoteJSpaceAdmin spaceAdmin, InternalAdmin admin, JVMDetails jvmDetails)
public DefaultSpaceInstance(PUServiceBean puService, SpaceServiceDetails spaceServiceDetails, InternalAdmin admin, JVMDetails jvmDetails)
public String getId()
SpaceInstancegetId in interface SpaceInstancepublic String getUid()
GridComponentgetUid in interface GridComponentgetUid in interface InternalVirtualMachineInfoProviderpublic ServiceID getServiceID()
getServiceID in interface InternalSpaceInstancepublic GigaSpace getGigaSpace()
SpaceInstancegetGigaSpace in interface SpaceInstancepublic ClusterInfo getClusterInfo()
SpaceInstancegetClusterInfo in interface SpaceInstancepublic String getClusterSchema()
getClusterSchema in interface InternalSpaceInstancepublic int getNumberOfInstances()
getNumberOfInstances in interface InternalSpaceInstancepublic int getNumberOfBackups()
getNumberOfBackups in interface InternalSpaceInstancepublic SpaceURL getSpaceUrl()
getSpaceUrl in interface SpaceInstancepublic String getSpaceName()
getSpaceName in interface InternalSpaceInstancepublic SpaceModeChangedEventManager getSpaceModeChanged()
SpaceInstanceSpaceModeChangedEvents.getSpaceModeChanged in interface SpaceInstancepublic SpaceSuspendTypeChangedEventManager getSpaceSuspendTypeChanged()
SpaceInstanceSpaceSuspendTypeChangedEvents.getSpaceSuspendTypeChanged in interface SpaceInstancepublic ReplicationStatusChangedEventManager getReplicationStatusChanged()
SpaceInstanceReplicationStatusChangedEvents.getReplicationStatusChanged in interface SpaceInstancepublic SpaceInstanceStatisticsChangedEventManager getStatisticsChanged()
SpaceInstanceSpaceInstanceStatisticsChangedEvents.
Note, monitoring must be started using StatisticsMonitor.startStatisticsMonitor() for events to
occur.
getStatisticsChanged in interface SpaceInstancepublic String getSpaceInstanceName()
SpaceInstancegetSpaceInstanceName in interface SpaceInstancepublic int getInstanceId()
SpaceInstancegetInstanceId in interface SpaceInstancepublic int getBackupId()
SpaceInstancegetBackupId in interface SpaceInstancepublic IJSpace getIJSpace()
getIJSpace in interface InternalSpaceInstanceprotected void setIJSpace(ISpaceProxy spaceProxy)
public IInternalRemoteJSpaceAdmin getSpaceAdmin()
getSpaceAdmin in interface InternalSpaceInstancepublic RuntimeHolder getRuntimeHolder() throws RemoteException
getRuntimeHolder in interface InternalSpaceInstanceRemoteExceptionpublic void setMode(SpaceMode spaceMode)
setMode in interface InternalSpaceInstancepublic SpaceMode getMode()
SpaceInstancegetMode in interface SpaceInstancepublic boolean waitForMode(SpaceMode requiredMode, long timeout, TimeUnit timeUnit)
SpaceInstancetrue if
the mode was changed to the required one withing the timeout, or false
otherwise.waitForMode in interface SpaceInstancepublic SpaceInstanceStatistics getStatistics()
SpaceInstancegetStatistics in interface SpaceInstancepublic SpaceInstanceStatistics getLastStatistics()
getLastStatistics in interface InternalSpaceInstancepublic void setStatisticsInterval(long interval,
TimeUnit timeUnit)
StatisticsMonitorsetStatisticsInterval in interface StatisticsMonitorpublic void setStatisticsHistorySize(int historySize)
StatisticsMonitorsetStatisticsHistorySize in interface StatisticsMonitorpublic void startStatisticsMonitor()
StatisticsMonitorstartStatisticsMonitor in interface StatisticsMonitorpublic void stopStatisticsMonitor()
StatisticsMonitorstopStatisticsMonitor in interface StatisticsMonitorpublic boolean isMonitoring()
StatisticsMonitortrue if statistics are now being monitored.isMonitoring in interface StatisticsMonitorpublic SpaceInstanceRuntimeDetails getRuntimeDetails()
SpaceInstancegetRuntimeDetails in interface SpaceInstancepublic SpaceInstanceRemoteClassLoaderInfo getSpaceInstanceRemoteClassLoaderInfo()
SpaceInstancegetSpaceInstanceRemoteClassLoaderInfo in interface SpaceInstancepublic ReplicationTarget[] getReplicationTargets()
SpaceInstancegetReplicationTargets in interface SpaceInstancepublic void setReplicationTargets(ReplicationTarget[] replicationTargets)
setReplicationTargets in interface InternalSpaceInstancepublic Space getSpace()
SpaceInstancegetSpace in interface SpaceInstancepublic void setSpace(Space space)
setSpace in interface InternalSpaceInstancepublic void setPartition(SpacePartition spacePartition)
setPartition in interface InternalSpaceInstancepublic SpacePartition getPartition()
SpaceInstancegetPartition in interface SpaceInstancepublic NIODetails getNIODetails() throws RemoteException
getNIODetails in interface InternalTransportInfoProviderRemoteExceptionpublic NIOStatistics getNIOStatistics() throws RemoteException
getNIOStatistics in interface InternalTransportInfoProviderRemoteExceptionpublic void enableLRMIMonitoring()
throws RemoteException
enableLRMIMonitoring in interface InternalTransportInfoProviderRemoteExceptionpublic void disableLRMIMonitoring()
throws RemoteException
disableLRMIMonitoring in interface InternalTransportInfoProviderRemoteExceptionpublic LRMIMonitoringDetails fetchLRMIMonitoringDetails() throws RemoteException
fetchLRMIMonitoringDetails in interface InternalTransportInfoProviderRemoteExceptionpublic long getCurrentTimeInMillis()
throws RemoteException
getCurrentTimeInMillis in interface InternalOperatingSystemInfoProviderRemoteExceptionpublic OSDetails getOSDetails() throws RemoteException
getOSDetails in interface InternalOperatingSystemInfoProviderRemoteExceptionpublic OSStatistics getOSStatistics() throws RemoteException
getOSStatistics in interface InternalOperatingSystemInfoProviderRemoteExceptionpublic JVMStatistics getJVMStatistics() throws RemoteException
getJVMStatistics in interface InternalVirtualMachineInfoProviderRemoteExceptionpublic void runGc()
throws RemoteException
runGc in interface InternalVirtualMachineInfoProviderRemoteExceptionpublic StatisticsHolder getStatisticsHolder() throws RemoteException
getStatisticsHolder in interface InternalSpaceInstanceRemoteExceptionpublic PlatformLogicalVersion getPlatformLogicalVersion()
getPlatformLogicalVersion in interface InternalSpaceInstancepublic SpaceConfig getSpaceConfig()
getSpaceConfig in interface InternalSpaceInstancepublic Future<?> demote(long maxSuspendTime, TimeUnit timeUnit)
SpaceInstancedemote in interface SpaceInstancepublic Future<?> demote(long maxSuspendTime, TimeUnit timeUnit, CredentialsProvider credentialsProvider)
InternalSpaceInstancedemote in interface InternalSpaceInstanceSpaceInstance.demote(long, TimeUnit)public boolean isSecured()
isSecured in interface SpaceInstancepublic void setSuspendInfo(SuspendInfo suspendInfo)
setSuspendInfo in interface InternalSpaceInstancepublic SuspendInfo getSuspendInfo()
getSuspendInfo in interface SpaceInstanceCopyright © GigaSpaces.