public class RemoteUIStatsStorageRouter extends java.lang.Object implements StatsStorageRouter
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_BASE_RETR_DELAY_MS
Base delay for retries
|
static int |
DEFAULT_MAX_RETRIES
Default maximum number of (consecutive) retries on failure
|
static java.lang.String |
DEFAULT_PATH
Default path for posting data to the UI - i.e., http://localhost:9000/remoteReceive or similar
|
static double |
DEFAULT_RETRY_BACKOFF_FACTOR
Default backoff multiplicative factor for retrying
|
Constructor and Description |
---|
RemoteUIStatsStorageRouter(java.lang.String address)
Create remote UI with defaults for all values except address
|
RemoteUIStatsStorageRouter(java.lang.String address,
int maxRetryCount,
long retryDelayMS,
double retryBackoffFactor) |
RemoteUIStatsStorageRouter(java.lang.String address,
java.lang.String path,
int maxRetryCount,
long retryDelayMS,
double retryBackoffFactor) |
Modifier and Type | Method and Description |
---|---|
void |
putStaticInfo(java.util.Collection<? extends Persistable> staticInfo)
Static info: reported once per session, upon initialization
|
void |
putStaticInfo(Persistable staticInfo)
Static info: reported once per session, upon initialization
|
void |
putStorageMetaData(java.util.Collection<? extends StorageMetaData> storageMetaData) |
void |
putStorageMetaData(StorageMetaData storageMetaData)
Method to store some additional metadata for each session.
|
void |
putUpdate(java.util.Collection<? extends Persistable> updates)
Updates: stored multiple times per session (periodically, for example)
|
void |
putUpdate(Persistable update)
Updates: stored multiple times per session (periodically, for example)
|
public static final java.lang.String DEFAULT_PATH
public static final int DEFAULT_MAX_RETRIES
public static final long DEFAULT_BASE_RETR_DELAY_MS
public static final double DEFAULT_RETRY_BACKOFF_FACTOR
public RemoteUIStatsStorageRouter(java.lang.String address)
address
- Address of the remote UI: for example, "http://localhost:9000"public RemoteUIStatsStorageRouter(java.lang.String address, int maxRetryCount, long retryDelayMS, double retryBackoffFactor)
address
- Address of the remote UI: for example, "http://localhost:9000"maxRetryCount
- Maximum number of retries before failing. Set to -1 to always retryretryDelayMS
- Base delay before retrying, in millisecondsretryBackoffFactor
- Backoff factor for retrying: 2.0 for example gives delays of 1000, 2000, 4000, 8000,
etc milliseconds, with a base retry delay of 1000public RemoteUIStatsStorageRouter(java.lang.String address, java.lang.String path, int maxRetryCount, long retryDelayMS, double retryBackoffFactor)
address
- Address of the remote UI: for example, "http://localhost:9000"path
- Path/endpoint to post to: for example "remoteReceive" -> added to path to become like
"http://localhost:9000/remoteReceive"maxRetryCount
- Maximum number of retries before failing. Set to -1 to always retryretryDelayMS
- Base delay before retrying, in millisecondsretryBackoffFactor
- Backoff factor for retrying: 2.0 for example gives delays of 1000, 2000, 4000, 8000,
etc milliseconds, with a base retry delay of 1000public void putStorageMetaData(StorageMetaData storageMetaData)
StatsStorageRouter
putStorageMetaData
in interface StatsStorageRouter
storageMetaData
- Storage metadata to storepublic void putStorageMetaData(java.util.Collection<? extends StorageMetaData> storageMetaData)
putStorageMetaData
in interface StatsStorageRouter
public void putStaticInfo(Persistable staticInfo)
StatsStorageRouter
putStaticInfo
in interface StatsStorageRouter
staticInfo
- Static info to storepublic void putStaticInfo(java.util.Collection<? extends Persistable> staticInfo)
StatsStorageRouter
putStaticInfo
in interface StatsStorageRouter
staticInfo
- Static info to storepublic void putUpdate(Persistable update)
StatsStorageRouter
putUpdate
in interface StatsStorageRouter
update
- Update info to storepublic void putUpdate(java.util.Collection<? extends Persistable> updates)
StatsStorageRouter
putUpdate
in interface StatsStorageRouter
updates
- Update info to store