@Beta
public interface UsageManager
Modifier and Type | Interface and Description |
---|---|
static interface |
UsageManager.UsageListener
Deprecated.
since 0.7.0; use
UsageListener ; see UsageManager.UsageListener.UsageListenerAdapter |
Modifier and Type | Field and Description |
---|---|
static ConfigKey<Duration> |
USAGE_LISTENER_TERMINATION_TIMEOUT |
static ConfigKey<java.util.List<UsageListener>> |
USAGE_LISTENERS |
Modifier and Type | Method and Description |
---|---|
void |
addUsageListener(UsageListener listener)
Adds the given listener, to be notified on recording of application/location events.
|
void |
addUsageListener(UsageManager.UsageListener listener)
Deprecated.
|
java.util.Set<ApplicationUsage> |
getApplicationUsage(com.google.common.base.Predicate<? super ApplicationUsage> filter)
Returns the usage info that matches the given predicate.
|
ApplicationUsage |
getApplicationUsage(java.lang.String appId)
Returns the usage info for the application with the given id, or null if unknown.
|
java.util.Set<LocationUsage> |
getLocationUsage(com.google.common.base.Predicate<? super LocationUsage> filter)
Returns the usage info that matches the given predicate.
|
LocationUsage |
getLocationUsage(java.lang.String locationId)
Returns the usage info for the location with the given id, or null if unknown.
|
void |
recordApplicationEvent(Application app,
Lifecycle state)
Adds this application event to the usage record for the given app (creating the usage
record if one does not already exist).
|
void |
recordLocationEvent(Location loc,
Lifecycle state)
Adds this location event to the usage record for the given location (creating the usage
record if one does not already exist).
|
void |
removeUsageListener(UsageListener listener)
Removes the given listener.
|
void |
removeUsageListener(UsageManager.UsageListener listener)
Deprecated.
since 0.7.0; use
removeUsageListener(brooklyn.management.internal.UsageListener) |
static final ConfigKey<java.util.List<UsageListener>> USAGE_LISTENERS
void recordApplicationEvent(Application app, Lifecycle state)
void recordLocationEvent(Location loc, Lifecycle state)
LocationUsage getLocationUsage(java.lang.String locationId)
java.util.Set<LocationUsage> getLocationUsage(com.google.common.base.Predicate<? super LocationUsage> filter)
ApplicationUsage getApplicationUsage(java.lang.String appId)
java.util.Set<ApplicationUsage> getApplicationUsage(com.google.common.base.Predicate<? super ApplicationUsage> filter)
void addUsageListener(UsageManager.UsageListener listener)
removeUsageListener(brooklyn.management.internal.UsageListener)
;
see UsageManager.UsageListener.UsageListenerAdapter
@Deprecated void removeUsageListener(UsageManager.UsageListener listener)
removeUsageListener(brooklyn.management.internal.UsageListener)
void addUsageListener(UsageListener listener)
void removeUsageListener(UsageListener listener)