public class DefaultGridServiceContainer extends AbstractAgentGridComponent implements InternalGridServiceContainer
admin
Constructor and Description |
---|
DefaultGridServiceContainer(ServiceID serviceID,
com.gigaspaces.grid.gsc.GSC gsc,
InternalAdmin admin,
int agentId,
String agentUid,
JVMDetails jvmDetails) |
Modifier and Type | Method and Description |
---|---|
void |
addProcessingUnitInstance(ProcessingUnitInstance processingUnitInstance) |
void |
addProcessingUnitInstanceLifecycleEventListener(ProcessingUnitInstanceLifecycleEventListener eventListener)
Adds a processing unit lifecycle listener to the container.
|
boolean |
contains(ProcessingUnitInstance processingUnitInstance)
Returns
true if the GSC contains the provided processing unit instance. |
void |
disableLRMIMonitoring() |
void |
enableLRMIMonitoring() |
boolean |
equals(Object o) |
LRMIMonitoringDetails |
fetchLRMIMonitoringDetails() |
DumpResult |
generateDump(String cause,
Map<String,Object> context)
Generates dump for all the provided dump processors.
|
DumpResult |
generateDump(String cause,
Map<String,Object> context,
String... processor)
Generates dump for the provided processors.
|
long |
getCurrentTimeInMillis() |
ExactZonesConfig |
getExactZones() |
com.gigaspaces.grid.gsc.GSC |
getGSC() |
JVMStatistics |
getJVMStatistics() |
NIODetails |
getNIODetails() |
NIOStatistics |
getNIOStatistics() |
OSDetails |
getOSDetails() |
OSStatistics |
getOSStatistics() |
ProcessingUnitInstanceAddedEventManager |
getProcessingUnitInstanceAdded()
Returns an event manager allowing to register for processing unit instance additions to the
container.
|
ProcessingUnitInstance |
getProcessingUnitInstanceByUID(String processingUnitInstanceUid)
Returns the processing unit instance that are currently deployed within the grid service
container according to its uid.
|
ProcessingUnitInstanceRemovedEventManager |
getProcessingUnitInstanceRemoved()
Returns an event manager allowing to register for processing unit instance removals from the
container.
|
ProcessingUnitInstance[] |
getProcessingUnitInstances()
Returns the processing unit instances that are currently deployed within the grid service
container.
|
ProcessingUnitInstance[] |
getProcessingUnitInstances(String processingUnitName)
Returns the processing unit instances of the specified name that are currently deployed
within the grid service container.
|
ServiceID |
getServiceID() |
String |
getUid()
Returns the unique id of the grid component.
|
String[] |
getUnconfirmedRemovedProcessingUnitInstancesUid() |
int |
hashCode() |
boolean |
hasProcessingUnitInstances() |
Iterator<ProcessingUnitInstance> |
iterator() |
LogEntries |
logEntries(LogEntryMatcher matcher)
Returns the log entries matching the given matcher for the specific grid component.
|
LogEntries |
logEntriesDirect(LogEntryMatcher matcher)
Same as
LogProviderGridComponent.logEntries(com.gigaspaces.log.LogEntryMatcher) , but does not try and get the
logs from the agent. |
void |
reloadMetricConfiguration() |
void |
removeProcessingUnitInstance(String uid) |
void |
removeProcessingUnitInstanceLifecycleEventListener(ProcessingUnitInstanceLifecycleEventListener eventListener)
Removes a processing unit lifecycle listener to the container.
|
void |
runGc() |
boolean |
waitFor(int numberOfProcessingUnitInstances)
Waits indefinitely for the given number of processing unit instances to run within the
container.
|
boolean |
waitFor(int numberOfProcessingUnitInstances,
long timeout,
TimeUnit timeUnit)
Waits for timeout value (in time unit) for the given number of processing unit instances to
run within the container.
|
boolean |
waitFor(String processingUnitName,
int numberOfProcessingUnitInstances)
Waits indefinitely for the given number of processing unit instances of the specified name to
run within the container.
|
boolean |
waitFor(String processingUnitName,
int numberOfProcessingUnitInstances,
long timeout,
TimeUnit timeUnit)
Waits for timeout value (in time unit) for the given number of processing unit instances of
the specified name to run within the container.
|
getAgentId, getAgentUid, getGridServiceAgent, kill, restart, setGridServiceAgent
addZone, assertStateChangesPermitted, getAdmin, getJVMDetails, getMachine, getOperatingSystem, getTransport, getVirtualMachine, getZones, isDiscovered, setDiscovered, setMachine, setOperatingSystem, setTransport, setVirtualMachine
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
getAgentUid, setGridServiceAgent
getAgentId, getGridServiceAgent, kill, restart
getAdmin
setDiscovered
isDiscovered
setMachine
getMachine
setTransport
getTransport
setOperatingSystem
getOperatingSystem
getJVMDetails
setVirtualMachine
getVirtualMachine
addZone
public DefaultGridServiceContainer(ServiceID serviceID, com.gigaspaces.grid.gsc.GSC gsc, InternalAdmin admin, int agentId, String agentUid, JVMDetails jvmDetails)
public String getUid()
GridComponent
getUid
in interface GridComponent
getUid
in interface InternalVirtualMachineInfoProvider
public ServiceID getServiceID()
getServiceID
in interface InternalGridServiceContainer
public com.gigaspaces.grid.gsc.GSC getGSC()
getGSC
in interface InternalGridServiceContainer
public Iterator<ProcessingUnitInstance> iterator()
iterator
in interface Iterable<ProcessingUnitInstance>
public ProcessingUnitInstance[] getProcessingUnitInstances()
GridServiceContainer
getProcessingUnitInstances
in interface GridServiceContainer
public ProcessingUnitInstance[] getProcessingUnitInstances(String processingUnitName)
GridServiceContainer
getProcessingUnitInstances
in interface GridServiceContainer
public ProcessingUnitInstance getProcessingUnitInstanceByUID(String processingUnitInstanceUid)
GridServiceContainer
getProcessingUnitInstanceByUID
in interface GridServiceContainer
public boolean contains(ProcessingUnitInstance processingUnitInstance)
GridServiceContainer
true
if the GSC contains the provided processing unit instance.contains
in interface GridServiceContainer
public boolean waitFor(int numberOfProcessingUnitInstances)
GridServiceContainer
waitFor
in interface GridServiceContainer
public boolean waitFor(int numberOfProcessingUnitInstances, long timeout, TimeUnit timeUnit)
GridServiceContainer
true
if the number was reached,
false
if the timeout expired.waitFor
in interface GridServiceContainer
public boolean waitFor(String processingUnitName, int numberOfProcessingUnitInstances)
GridServiceContainer
waitFor
in interface GridServiceContainer
public boolean waitFor(String processingUnitName, int numberOfProcessingUnitInstances, long timeout, TimeUnit timeUnit)
GridServiceContainer
true
if the number was
reached, false
if the timeout expired.waitFor
in interface GridServiceContainer
public void addProcessingUnitInstance(ProcessingUnitInstance processingUnitInstance)
addProcessingUnitInstance
in interface InternalGridServiceContainer
public void removeProcessingUnitInstance(String uid)
removeProcessingUnitInstance
in interface InternalGridServiceContainer
public ProcessingUnitInstanceAddedEventManager getProcessingUnitInstanceAdded()
GridServiceContainer
getProcessingUnitInstanceAdded
in interface GridServiceContainer
public ProcessingUnitInstanceRemovedEventManager getProcessingUnitInstanceRemoved()
GridServiceContainer
getProcessingUnitInstanceRemoved
in interface GridServiceContainer
public void addProcessingUnitInstanceLifecycleEventListener(ProcessingUnitInstanceLifecycleEventListener eventListener)
GridServiceContainer
addProcessingUnitInstanceLifecycleEventListener
in interface GridServiceContainer
public void removeProcessingUnitInstanceLifecycleEventListener(ProcessingUnitInstanceLifecycleEventListener eventListener)
GridServiceContainer
removeProcessingUnitInstanceLifecycleEventListener
in interface GridServiceContainer
public LogEntries logEntries(LogEntryMatcher matcher) throws AdminException
LogProviderGridComponent
GridServiceAgent
, will get the log through it
instead of creating a load on the actual grid component.logEntries
in interface LogProviderGridComponent
AdminException
public LogEntries logEntriesDirect(LogEntryMatcher matcher) throws AdminException
LogProviderGridComponent
LogProviderGridComponent.logEntries(com.gigaspaces.log.LogEntryMatcher)
, but does not try and get the
logs from the agent.logEntriesDirect
in interface LogProviderGridComponent
AdminException
public void reloadMetricConfiguration() throws AdminException
reloadMetricConfiguration
in interface MetricProvider
AdminException
public DumpResult generateDump(String cause, Map<String,Object> context) throws AdminException
DumpProvider
generateDump
in interface DumpProvider
cause
- The cause that this dump was generatedcontext
- Allows to provide specific parameters to specific processorsAdminException
public DumpResult generateDump(String cause, Map<String,Object> context, String... processor) throws AdminException
DumpProvider
generateDump
in interface DumpProvider
cause
- The cause this dump was generated.context
- Allows to provide specific parameters to specific processors.processor
- The list of processors to be used.AdminException
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 boolean hasProcessingUnitInstances()
hasProcessingUnitInstances
in interface InternalGridServiceContainer
- use this event to get an indication when
processing unit instance has started shutdown.
public String[] getUnconfirmedRemovedProcessingUnitInstancesUid()
getUnconfirmedRemovedProcessingUnitInstancesUid
in interface InternalGridServiceContainer
public ExactZonesConfig getExactZones()
getExactZones
in interface GridServiceContainer
ProcessingUnit#getRequiredContainerZones()}
Copyright © GigaSpaces.