public class DefaultSpaceInstance extends AbstractGridComponent implements InternalSpaceInstance, StatisticsMonitor
admin
DEFAULT_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() |
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
ReplicationStatusChangedEvent s. |
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
SpaceModeChangedEvent s. |
String |
getSpaceName() |
SpaceSuspendTypeChangedEventManager |
getSpaceSuspendTypeChanged()
Allows to register for
SpaceSuspendTypeChangedEvent s. |
SpaceURL |
getSpaceUrl() |
SpaceInstanceStatistics |
getStatistics()
Returns the space instance statistics.
|
SpaceInstanceStatisticsChangedEventManager |
getStatisticsChanged()
Allows to register for
SpaceInstanceStatisticsChangedEvent s. |
StatisticsHolder |
getStatisticsHolder() |
SuspendInfo |
getSuspendInfo() |
String |
getUid()
Returns the unique id of the grid component.
|
boolean |
isMonitoring()
Returns
true if statistics are now being monitored. |
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, setVirtualMachine
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAdmin
setDiscovered
isDiscovered
setMachine
getMachine
setTransport
getTransport
setOperatingSystem
getOperatingSystem
getJVMDetails
setVirtualMachine
getVirtualMachine
addZone
public DefaultSpaceInstance(ServiceID serviceID, IJSpace directSpace, IInternalRemoteJSpaceAdmin spaceAdmin, InternalAdmin admin, JVMDetails jvmDetails)
public DefaultSpaceInstance(PUServiceBean puService, SpaceServiceDetails spaceServiceDetails, InternalAdmin admin, JVMDetails jvmDetails)
public String getId()
SpaceInstance
getId
in interface SpaceInstance
public String getUid()
GridComponent
getUid
in interface GridComponent
getUid
in interface InternalVirtualMachineInfoProvider
public ServiceID getServiceID()
getServiceID
in interface InternalSpaceInstance
public GigaSpace getGigaSpace()
SpaceInstance
getGigaSpace
in interface SpaceInstance
public ClusterInfo getClusterInfo()
SpaceInstance
getClusterInfo
in interface SpaceInstance
public String getClusterSchema()
getClusterSchema
in interface InternalSpaceInstance
public int getNumberOfInstances()
getNumberOfInstances
in interface InternalSpaceInstance
public int getNumberOfBackups()
getNumberOfBackups
in interface InternalSpaceInstance
public SpaceURL getSpaceUrl()
getSpaceUrl
in interface SpaceInstance
public String getSpaceName()
getSpaceName
in interface InternalSpaceInstance
public SpaceModeChangedEventManager getSpaceModeChanged()
SpaceInstance
SpaceModeChangedEvent
s.getSpaceModeChanged
in interface SpaceInstance
public SpaceSuspendTypeChangedEventManager getSpaceSuspendTypeChanged()
SpaceInstance
SpaceSuspendTypeChangedEvent
s.getSpaceSuspendTypeChanged
in interface SpaceInstance
public ReplicationStatusChangedEventManager getReplicationStatusChanged()
SpaceInstance
ReplicationStatusChangedEvent
s.getReplicationStatusChanged
in interface SpaceInstance
public SpaceInstanceStatisticsChangedEventManager getStatisticsChanged()
SpaceInstance
SpaceInstanceStatisticsChangedEvent
s.
Note, monitoring must be started using StatisticsMonitor.startStatisticsMonitor()
for events to
occur.
getStatisticsChanged
in interface SpaceInstance
public String getSpaceInstanceName()
SpaceInstance
getSpaceInstanceName
in interface SpaceInstance
public int getInstanceId()
SpaceInstance
getInstanceId
in interface SpaceInstance
public int getBackupId()
SpaceInstance
getBackupId
in interface SpaceInstance
public IJSpace getIJSpace()
getIJSpace
in interface InternalSpaceInstance
protected void setIJSpace(ISpaceProxy spaceProxy)
public IInternalRemoteJSpaceAdmin getSpaceAdmin()
getSpaceAdmin
in interface InternalSpaceInstance
public RuntimeHolder getRuntimeHolder() throws RemoteException
getRuntimeHolder
in interface InternalSpaceInstance
RemoteException
public void setMode(SpaceMode spaceMode)
setMode
in interface InternalSpaceInstance
public SpaceMode getMode()
SpaceInstance
getMode
in interface SpaceInstance
public boolean waitForMode(SpaceMode requiredMode, long timeout, TimeUnit timeUnit)
SpaceInstance
true
if
the mode was changed to the required one withing the timeout, or false
otherwise.waitForMode
in interface SpaceInstance
public SpaceInstanceStatistics getStatistics()
SpaceInstance
getStatistics
in interface SpaceInstance
public void setStatisticsInterval(long interval, TimeUnit timeUnit)
StatisticsMonitor
setStatisticsInterval
in interface StatisticsMonitor
public void setStatisticsHistorySize(int historySize)
StatisticsMonitor
setStatisticsHistorySize
in interface StatisticsMonitor
public void startStatisticsMonitor()
StatisticsMonitor
startStatisticsMonitor
in interface StatisticsMonitor
public void stopStatisticsMonitor()
StatisticsMonitor
stopStatisticsMonitor
in interface StatisticsMonitor
public boolean isMonitoring()
StatisticsMonitor
true
if statistics are now being monitored.isMonitoring
in interface StatisticsMonitor
public SpaceInstanceRuntimeDetails getRuntimeDetails()
SpaceInstance
getRuntimeDetails
in interface SpaceInstance
public SpaceInstanceRemoteClassLoaderInfo getSpaceInstanceRemoteClassLoaderInfo()
SpaceInstance
getSpaceInstanceRemoteClassLoaderInfo
in interface SpaceInstance
public ReplicationTarget[] getReplicationTargets()
SpaceInstance
getReplicationTargets
in interface SpaceInstance
public void setReplicationTargets(ReplicationTarget[] replicationTargets)
setReplicationTargets
in interface InternalSpaceInstance
public Space getSpace()
SpaceInstance
getSpace
in interface SpaceInstance
public void setSpace(Space space)
setSpace
in interface InternalSpaceInstance
public void setPartition(SpacePartition spacePartition)
setPartition
in interface InternalSpaceInstance
public SpacePartition getPartition()
SpaceInstance
getPartition
in interface SpaceInstance
public NIODetails getNIODetails() throws RemoteException
getNIODetails
in interface InternalTransportInfoProvider
RemoteException
public NIOStatistics getNIOStatistics() throws RemoteException
getNIOStatistics
in interface InternalTransportInfoProvider
RemoteException
public void enableLRMIMonitoring() throws RemoteException
enableLRMIMonitoring
in interface InternalTransportInfoProvider
RemoteException
public void disableLRMIMonitoring() throws RemoteException
disableLRMIMonitoring
in interface InternalTransportInfoProvider
RemoteException
public LRMIMonitoringDetails fetchLRMIMonitoringDetails() throws RemoteException
fetchLRMIMonitoringDetails
in interface InternalTransportInfoProvider
RemoteException
public long getCurrentTimeInMillis() throws RemoteException
getCurrentTimeInMillis
in interface InternalOperatingSystemInfoProvider
RemoteException
public OSDetails getOSDetails() throws RemoteException
getOSDetails
in interface InternalOperatingSystemInfoProvider
RemoteException
public OSStatistics getOSStatistics() throws RemoteException
getOSStatistics
in interface InternalOperatingSystemInfoProvider
RemoteException
public JVMStatistics getJVMStatistics() throws RemoteException
getJVMStatistics
in interface InternalVirtualMachineInfoProvider
RemoteException
public void runGc() throws RemoteException
runGc
in interface InternalVirtualMachineInfoProvider
RemoteException
public StatisticsHolder getStatisticsHolder() throws RemoteException
getStatisticsHolder
in interface InternalSpaceInstance
RemoteException
public PlatformLogicalVersion getPlatformLogicalVersion()
getPlatformLogicalVersion
in interface InternalSpaceInstance
public SpaceConfig getSpaceConfig()
getSpaceConfig
in interface InternalSpaceInstance
public Future<?> demote(long maxSuspendTime, TimeUnit timeUnit)
SpaceInstance
demote
in interface SpaceInstance
public Future<?> demote(long maxSuspendTime, TimeUnit timeUnit, CredentialsProvider credentialsProvider)
InternalSpaceInstance
demote
in interface InternalSpaceInstance
SpaceInstance.demote(long, TimeUnit)
public void setSuspendInfo(SuspendInfo suspendInfo)
setSuspendInfo
in interface InternalSpaceInstance
public SuspendInfo getSuspendInfo()
getSuspendInfo
in interface SpaceInstance
Copyright © GigaSpaces.