|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbrooklyn.management.internal.LocalSubscriptionManager
public class LocalSubscriptionManager
A SubscriptionManager that stores subscription details locally.
Nested Class Summary | |
---|---|
static class |
LocalSubscriptionManager.EntitySensorToken
|
Field Summary | |
---|---|
protected java.util.concurrent.ConcurrentMap |
allSubscriptions
|
protected ExecutionManager |
em
|
protected java.util.concurrent.ConcurrentMap |
subscriptionsBySubscriber
|
protected java.util.concurrent.ConcurrentMap |
subscriptionsByToken
|
Method Summary | |
---|---|
java.lang.Object
|
LocalSubscriptionManager(ExecutionManager m)
|
long
|
getNumSubscriptions()
|
java.util.Set
|
getSubscriptionsForEntitySensor(Entity source, Sensor sensor)
|
java.util.Set
|
getSubscriptionsForSubscriber(java.lang.Object subscriber)
|
long
|
getTotalEventsDelivered()
|
long
|
getTotalEventsPublished()
|
void
|
publish(SensorEvent event)
|
SubscriptionHandle
|
subscribe(Entity producer, Sensor sensor, SensorEventListener listener)
@see SubscriptionManager#subscribe(Map, Entity, Sensor, SensorEventListener) |
SubscriptionHandle
|
subscribe(java.util.Map flags, Entity producer, Sensor sensor, SensorEventListener listener)
This implementation handles the following flags, in addition to those described in the SubscriptionManager interface:
|
SubscriptionHandle
|
subscribeToChildren(Entity parent, Sensor sensor, SensorEventListener listener)
@see SubscriptionManager#subscribeToChildren(Map, Entity, Sensor, SensorEventListener) |
SubscriptionHandle
|
subscribeToChildren(java.util.Map flags, Entity parent, Sensor sensor, SensorEventListener listener)
@see SubscriptionManager#subscribe(Map, Entity, Sensor, SensorEventListener) |
SubscriptionHandle
|
subscribeToMembers(Group parent, Sensor sensor, SensorEventListener listener)
@see SubscriptionManager#subscribeToChildren(Map, Entity, Sensor, SensorEventListener) |
SubscriptionHandle
|
subscribeToMembers(java.util.Map flags, Group parent, Sensor sensor, SensorEventListener listener)
@see SubscriptionManager#subscribe(Map, Entity, Sensor, SensorEventListener) |
java.lang.String
|
toString()
|
boolean
|
unsubscribe(SubscriptionHandle sh)
Unsubscribe the given subscription id. |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Field Detail |
---|
protected final java.util.concurrent.ConcurrentMap allSubscriptions
protected final ExecutionManager em
protected final java.util.concurrent.ConcurrentMap subscriptionsBySubscriber
protected final java.util.concurrent.ConcurrentMap subscriptionsByToken
Method Detail |
---|
public java.lang.Object LocalSubscriptionManager(ExecutionManager m)
public long getNumSubscriptions()
public java.util.Set getSubscriptionsForEntitySensor(Entity source, Sensor sensor)
@SuppressWarnings("unchecked") public java.util.Set getSubscriptionsForSubscriber(java.lang.Object subscriber)
public long getTotalEventsDelivered()
public long getTotalEventsPublished()
public void publish(SensorEvent event)
public SubscriptionHandle subscribe(Entity producer, Sensor sensor, SensorEventListener listener)
public SubscriptionHandle subscribe(java.util.Map flags, Entity producer, Sensor sensor, SensorEventListener listener)
public SubscriptionHandle subscribeToChildren(Entity parent, Sensor sensor, SensorEventListener listener)
public SubscriptionHandle subscribeToChildren(java.util.Map flags, Entity parent, Sensor sensor, SensorEventListener listener)
public SubscriptionHandle subscribeToMembers(Group parent, Sensor sensor, SensorEventListener listener)
public SubscriptionHandle subscribeToMembers(java.util.Map flags, Group parent, Sensor sensor, SensorEventListener listener)
@Override public java.lang.String toString()
public boolean unsubscribe(SubscriptionHandle sh)
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.