public interface Admin extends StatisticsMonitor, DumpProvider
AdminFactory
class.
Provides access to the main elements in the Admin API and in GigaSpaces such as the
GridServiceAgents
, LookupServices
,
GridServiceManagers
, GridServiceContainers
,
ProcessingUnits
, and Spaces
.
Also allows to change monitoring (not statistics) interval (works in a polling fashion) of state changing elements such as the processing unit, the Grid Service Agent, and the Space.
Implements the StatisticsMonitor
interface, allowing in one single
call (StatisticsMonitor.startStatisticsMonitor()
) to start statistics monitors on all the elements it manages (such as
the Spaces
, and VirtualMachines
.
Provides one stop shop for registering all event listeners that extend AdminEventListener
using the addEventListener(AdminEventListener)
and their removal removeEventListener(AdminEventListener)
.
The actual event listener interfaces will be automatically detected and added to the correct component.
DEFAULT_HISTORY_SIZE, DEFAULT_MONITOR_INTERVAL
Modifier and Type | Method and Description |
---|---|
void |
addEventListener(AdminEventListener eventListener)
Smart addition of event listeners.
|
void |
addEventListener(AdminEventListener eventListener,
boolean withStatisticsHistory)
Smart addition of event listeners.
|
void |
close()
Closes the Admin, releasing any resource and stops listening for events from the lookup service.
|
DumpResult |
generateDump(Set<DumpProvider> dumpProviders,
DumpGeneratedListener listener,
String cause,
Map<String,Object> context,
String... processor)
Generates dump for an explicit set of dump providers.
|
AlertManager |
getAlertManager()
Returns the alert manager through which alert strategies are managed, alerts are fired and
alert events are registered for.
|
Applications |
getApplications() |
ElasticServiceManagers |
getElasticServiceManagers()
Returns the elastic service managers discovered.
|
int |
getEventListenersCount()
Returns number of registered event listeners.
|
GatewayProcessingUnits |
getGatewayProcessingUnits()
Returns the Gateway Processing Units discovered.
|
Gateways |
getGateways()
Returns the gateways discovered.
|
GridComponent |
getGridComponentByUID(String uid)
Returns the Grid Component represented by this UID; e.g.
|
GridServiceAgents |
getGridServiceAgents()
Returns the grid service agents discovered.
|
GridServiceContainers |
getGridServiceContainers()
Returns the grid service containers discovered.
|
GridServiceManagers |
getGridServiceManagers()
Returns the grid service managers discovered.
|
String[] |
getGroups()
Returns the lookup groups this admin uses.
|
net.jini.core.discovery.LookupLocator[] |
getLocators()
Returns the lookup locators this admin uses.
|
LookupServices |
getLookupServices()
Returns the lookup services discovered.
|
Machines |
getMachines()
Returns the machines discovered.
|
OperatingSystems |
getOperatingSystems()
Returns the Operating Systems discovered.
|
ProcessingUnits |
getProcessingUnits()
Returns the Processing Units discovered.
|
Spaces |
getSpaces()
Returns the spaces discovered.
|
Transports |
getTransports()
Returns the transports discovered.
|
VirtualMachines |
getVirtualMachines()
Returns the Virtual Machines discovered.
|
Zones |
getZones()
Returns the zones discovered.
|
void |
removeEventListener(AdminEventListener eventListener)
Smart removal of event listeners.
|
void |
setAgentProcessessMonitorInterval(long interval,
TimeUnit timeUnit)
Sets the Grid Service Agent processes monitor (not statistics) interval.
|
void |
setDefaultTimeout(long timeout,
TimeUnit timeUnit)
The default timeout to be used for operations that have a wait for mechanism, i.e. operations
with overloaded methods containing (..., long timeout, TimeUnit timeUnit).
|
void |
setProcessingUnitMonitorInterval(long interval,
TimeUnit timeUnit)
Sets the processing unit monitor (not statistics) interval.
|
void |
setSchedulerCorePoolSize(int coreThreads)
The Admin API uses a shared scheduler thread pool to perform *all* scheduled operations (monitoring,
statistics monitoring).
|
void |
setSpaceMonitorInterval(long interval,
TimeUnit timeUnit)
Sets the Space monitor (not statistics) interval.
|
isMonitoring, setStatisticsHistorySize, setStatisticsInterval, startStatisticsMonitor, stopStatisticsMonitor
generateDump, generateDump
String[] getGroups()
AdminFactory.addGroup(String)
net.jini.core.discovery.LookupLocator[] getLocators()
AdminFactory.addLocator(String)
void setProcessingUnitMonitorInterval(long interval, TimeUnit timeUnit)
ProcessingUnit.getStatus()
among other things.
Defaults to 1 second.
interval
- The interval to use.timeUnit
- The time unit the interval is at.void setAgentProcessessMonitorInterval(long interval, TimeUnit timeUnit)
GridServiceAgent.getProcessesDetails()
.
Defaults to 5 seconds.
interval
- The interval to use.timeUnit
- The time unit the interval is at.void setSpaceMonitorInterval(long interval, TimeUnit timeUnit)
Defaults to 1 second.
interval
- The interval to use.timeUnit
- The time unit the interval is at.void setSchedulerCorePoolSize(int coreThreads)
Defaults to 10 threads.
coreThreads
- The number of threads the shared scheduler thread pool will use,void setDefaultTimeout(long timeout, TimeUnit timeUnit)
timeout
- The timeout value to be used as the default operation timeout if non was provided.timeUnit
- The time-unit corresponding to the timeout.void close()
GridServiceAgents getGridServiceAgents()
LookupServices getLookupServices()
GridServiceManagers getGridServiceManagers()
ElasticServiceManagers getElasticServiceManagers()
GridServiceContainers getGridServiceContainers()
Gateways getGateways()
GatewayProcessingUnits getGatewayProcessingUnits()
GridComponent getGridComponentByUID(String uid)
uid
- The UID of the service returned by GridComponent.getUid()
;
null
if no representation.GridComponent.getUid()
Machines getMachines()
Zones getZones()
Applications getApplications()
Transports getTransports()
VirtualMachines getVirtualMachines()
OperatingSystems getOperatingSystems()
ProcessingUnits getProcessingUnits()
Spaces getSpaces()
AlertManager getAlertManager()
void addEventListener(AdminEventListener eventListener)
AdminEventListener
interface.removeEventListener(AdminEventListener)
void addEventListener(AdminEventListener eventListener, boolean withStatisticsHistory)
AdminEventListener
interface.withStatisticsHistory
- if all statistics histories will be fired on registration statistics listenerremoveEventListener(AdminEventListener)
void removeEventListener(AdminEventListener eventListener)
AdminEventListener
interface.addEventListener(AdminEventListener)
int getEventListenersCount()
AdminEventListener
.
Only for calls issued by either addEventListener or removeEventListeneraddEventListener(AdminEventListener)
,
removeEventListener(AdminEventListener)
DumpResult generateDump(Set<DumpProvider> dumpProviders, DumpGeneratedListener listener, String cause, Map<String,Object> context, String... processor) throws AdminException
AdminException
Copyright © GigaSpaces.