GigaSpaces XAP 7.0 API

org.openspaces.admin
Interface Admin

All Superinterfaces:
StatisticsMonitor

public interface Admin
extends StatisticsMonitor

The main interface for accessing Admin API. Created using the 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.

Author:
kimchy

Field Summary
 
Fields inherited from interface org.openspaces.admin.StatisticsMonitor
DEFAULT_HISTORY_SIZE, DEFAULT_MONITOR_INTERVAL
 
Method Summary
 void addEventListener(AdminEventListener eventListener)
          Smart addition of event listeners.
 void close()
          Closes the Admin, releasing any resource and stops listening for events from the lookup service.
 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 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.
 
Methods inherited from interface org.openspaces.admin.StatisticsMonitor
isMonitoring, setStatisticsHistorySize, setStatisticsInterval, startStatisticsMonitor, stopStatisticsMontior
 

Method Detail

getGroups

String[] getGroups()
Returns the lookup groups this admin uses.

See Also:
AdminFactory.addGroup(String)

getLocators

net.jini.core.discovery.LookupLocator[] getLocators()
Returns the lookup locators this admin uses.

See Also:
AdminFactory.addLocator(String)

setProcessingUnitMonitorInterval

void setProcessingUnitMonitorInterval(long interval,
                                      TimeUnit timeUnit)
Sets the processing unit monitor (not statistics) interval. The monitor basically checks the status of each processing unit (ProcessingUnit.getStatus() among other things.

Defaults to 1 second.

Parameters:
interval - The interval to use.
timeUnit - The time unit the interval is at.

setAgentProcessessMonitorInterval

void setAgentProcessessMonitorInterval(long interval,
                                       TimeUnit timeUnit)
Sets the Grid Service Agent processes monitor (not statistics) interval. The monitor basically updates the list of processes the agent manages (GridServiceAgent.getProcessesDetails().

Defaults to 5 seconds.

Parameters:
interval - The interval to use.
timeUnit - The time unit the interval is at.

setSpaceMonitorInterval

void setSpaceMonitorInterval(long interval,
                             TimeUnit timeUnit)
Sets the Space monitor (not statistics) interval. The monitor checks each space instance and updates its different status (such as the replication status).

Defaults to 1 second.

Parameters:
interval - The interval to use.
timeUnit - The time unit the interval is at.

setSchedulerCorePoolSize

void setSchedulerCorePoolSize(int coreThreads)
The Admin API uses a shared scheduler thread pool to perform *all* scheduled operations (monitoring, statistics monitoring). The number of threads used can be set here.

Defaults to 10 threads.

Parameters:
coreThreads - The number of threads the shared scheduler thread pool will use,

close

void close()
Closes the Admin, releasing any resource and stops listening for events from the lookup service.


getGridServiceAgents

GridServiceAgents getGridServiceAgents()
Returns the grid service agents discovered.


getLookupServices

LookupServices getLookupServices()
Returns the lookup services discovered.


getGridServiceManagers

GridServiceManagers getGridServiceManagers()
Returns the grid service managers discovered.


getGridServiceContainers

GridServiceContainers getGridServiceContainers()
Returns the grid service containers discovered.


getMachines

Machines getMachines()
Returns the machines discovered.


getZones

Zones getZones()
Returns the zones discovered.


getTransports

Transports getTransports()
Returns the transports discovered.


getVirtualMachines

VirtualMachines getVirtualMachines()
Returns the Virtual Machines discovered.


getOperatingSystems

OperatingSystems getOperatingSystems()
Returns the Operating Systems discovered.


getProcessingUnits

ProcessingUnits getProcessingUnits()
Returns the Processing Units discovered.


getSpaces

Spaces getSpaces()
Returns the spaces discovered.


addEventListener

void addEventListener(AdminEventListener eventListener)
Smart addition of event listeners. Will automatically add to the correct place any interface that extends the AdminEventListener interface.

See Also:
removeEventListener(AdminEventListener)

removeEventListener

void removeEventListener(AdminEventListener eventListener)
Smart removal of event listeners. Will automatically remove to the correct place any interface that extends the AdminEventListener interface.

See Also:
addEventListener(AdminEventListener)

GigaSpaces XAP 7.0 API

Copyright © GigaSpaces.