|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rioproject.watch.WatchDataSourceImpl
public class WatchDataSourceImpl
The WatchDataSourceImpl provides support for the WatchDataSource
interface. The WatchDataSourceImpl supports the following configuration
entries; where
each configuration entry name is associated with the component name org.rioproject.watch
| Type:
|
Exporter |
| Default:
|
A new BasicJeriExporter
with
|
| Description:
|
The Exporter used to export the WatchDataSourceImpl server. A new exporter is obtained every time a WatchDataSourceImpl needs to export itself. |
| Type:
|
int |
| Default:
|
1000 |
| Description:
|
The size of the WatchDataSource history collection. |
| Field Summary | |
|---|---|
protected static String |
COMPONENT
Component for accessing configuration and getting a Logger |
static int |
DEFAULT_COLLECTION_SIZE
Defines the default history size |
protected static Logger |
logger
A suitable Logger |
static int |
MAX_COLLECTION_SIZE
Defines the default history max size |
| Constructor Summary | |
|---|---|
WatchDataSourceImpl()
Create a WatchDataSourceImpl |
|
WatchDataSourceImpl(String id,
Configuration config)
Constructs WatchDataSourceImpl object. |
|
| Method Summary | |
|---|---|
void |
addCalculable(Calculable calculable)
Add a Calculable record to the Calculable history |
boolean |
addWatchDataReplicator(WatchDataReplicator replicator)
Add a WatchDataReplicator, |
void |
clear()
Clears the history |
void |
close()
Closes the watch data source and unexports it from the runtime |
WatchDataSource |
export()
Export the WatchDataSourceImpl using a configured Exporter, defaulting to BasicJeriExporter |
protected void |
finalize()
Make sure the archival file is closed before garbage collection |
Calculable[] |
getCalculable()
Get all Calculable records from the Calculable history |
Calculable[] |
getCalculable(long from,
long to)
Get Calculable records from the Calculable history for the specified time range |
Calculable[] |
getCalculable(String id)
|
int |
getCurrentSize()
Get the current size for the Calculable history |
String |
getID()
Get the ID for the WatchDataSource |
Calculable |
getLastCalculable()
Gets the last Calculable from the history |
int |
getMaxSize()
Get the maximum size for the Calculable history |
WatchDataSource |
getProxy()
Get the WatchDataSource proxy |
TrustVerifier |
getProxyVerifier()
Returns a TrustVerifier which can be used to verify that a
given proxy to this WatchDataSource can be trusted |
ThresholdValues |
getThresholdValues()
Getter for property thresholdValues. |
String |
getView()
Getter for property view. |
WatchDataReplicator[] |
getWatchDataReplicators()
|
void |
initialize()
Initialize the WatchDataSource |
boolean |
removeWatchDataReplicator(WatchDataReplicator replicator)
Remove a WatchDataReplicator |
void |
setConfiguration(Configuration config)
Set the WatchDataSource configuration |
void |
setID(String id)
Setter for property id. |
void |
setMaxSize(int size)
Set the maximum size for the Calculable history |
void |
setThresholdValues(ThresholdValues tValues)
Set the ThresholdValues |
void |
setView(String viewClass)
Setter for property view. |
void |
unexport(boolean force)
Unexport the WatchDataSourceImpl |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_COLLECTION_SIZE
public static final int MAX_COLLECTION_SIZE
protected static final String COMPONENT
protected static Logger logger
| Constructor Detail |
|---|
public WatchDataSourceImpl()
public WatchDataSourceImpl(String id,
Configuration config)
id - The ID of the WatchDataSourceconfig - Configuration object for use| Method Detail |
|---|
public void initialize()
throws RemoteException
WatchDataSource
initialize in interface WatchDataSourceRemoteException - if the WatchDataSource cannot be exported
public WatchDataSource export()
throws RemoteException
RemoteException - if there are errors exporting the WatchDataSourcepublic WatchDataSource getProxy()
public void setConfiguration(Configuration config)
WatchDataSource
setConfiguration in interface WatchDataSourceconfig - The configurationpublic void unexport(boolean force)
force - If true, unexports the WatchDataSourceImpl even if there
are pending or in-progress calls; if false, only unexports the
WatchDataSourceImpl if there are no pending or in-progress callspublic String getID()
WatchDataSource
getID in interface WatchDataSourceWatchDataSource.getID()public void setID(String id)
setID in interface WatchDataSourceid - New value of property id.public void setMaxSize(int size)
WatchDataSource
setMaxSize in interface WatchDataSourcesize - The maximum size for the Calculable historyWatchDataSource.setMaxSize(int)public void clear()
WatchDataSource
clear in interface WatchDataSourceWatchDataSource.clear()public int getMaxSize()
WatchDataSource
getMaxSize in interface WatchDataSourceWatchDataSource.getMaxSize()public int getCurrentSize()
WatchDataSource
getCurrentSize in interface WatchDataSourceWatchDataSource.getCurrentSize()public void addCalculable(Calculable calculable)
WatchDataSource
addCalculable in interface WatchDataSourcecalculable - The Calculable recordWatchDataSource.addCalculable(org.rioproject.watch.Calculable)public Calculable[] getCalculable()
WatchDataSource
getCalculable in interface WatchDataSourceWatchDataSource.getCalculable()public Calculable[] getCalculable(String id)
WatchDataSource.getCalculable()
public Calculable[] getCalculable(long from,
long to)
WatchDataSource
getCalculable in interface WatchDataSourcefrom - The start timeto - The end time
WatchDataSource.getCalculable(long, long)public Calculable getLastCalculable()
WatchDataSource
getLastCalculable in interface WatchDataSourceWatchDataSource.getLastCalculable()
protected void finalize()
throws Throwable
finalize in class ObjectThrowablepublic ThresholdValues getThresholdValues()
WatchDataSource
getThresholdValues in interface WatchDataSourceWatchDataSource.getThresholdValues()public void setThresholdValues(ThresholdValues tValues)
WatchDataSource
setThresholdValues in interface WatchDataSourcetValues - The ThresholdValues to setWatchDataSource.setThresholdValues(org.rioproject.watch.ThresholdValues)public void close()
WatchDataSource
close in interface WatchDataSourceWatchDataSource.close()public void setView(String viewClass)
WatchDataSource
setView in interface WatchDataSourceviewClass - The view class name, suitable for Class.forNameWatchDataSource.setView(java.lang.String)public String getView()
WatchDataSource
getView in interface WatchDataSourceWatchDataSource.getView()public TrustVerifier getProxyVerifier()
TrustVerifier which can be used to verify that a
given proxy to this WatchDataSource can be trusted
getProxyVerifier in interface ServerProxyTrustpublic boolean addWatchDataReplicator(WatchDataReplicator replicator)
WatchDataSourceWatchDataReplicator,
addWatchDataReplicator in interface WatchDataSourcereplicator - The WatchDataReplicator to add.
public boolean removeWatchDataReplicator(WatchDataReplicator replicator)
WatchDataSourceWatchDataReplicator
removeWatchDataReplicator in interface WatchDataSourcereplicator - The WatchDataReplicator to remove.
public WatchDataReplicator[] getWatchDataReplicators()
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||