StreamSubscriptionManager

com.netflix.atlas.lwcapi.StreamSubscriptionManager
class StreamSubscriptionManager(registry: Registry) extends SubscriptionManager[QueueHandler]

Subclass of SubscriptionManager that uses a source queue for the handler. In some cases with dependency injection erasure can cause problems with generic types. This class is just to avoid those issues for the main use-cases where we need to inject a version that needs a source queue.

Attributes

Graph
Supertypes
trait StrictLogging
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def unregister(streamId: String): Option[QueueHandler]

Overwritten to ensure that when using a queue it will be completed and resources for the stream will get cleaned up.

Overwritten to ensure that when using a queue it will be completed and resources for the stream will get cleaned up.

Attributes

Definition Classes

Inherited methods

def clear(): Unit

Attributes

Inherited from:
SubscriptionManager
def handlersForSubscription(subId: String): List[QueueHandler]

Return the set of handlers that should receive data for a given subscription id. This method should be assumed to be on a hot path that will be called regularly as data is flowing through.

Return the set of handlers that should receive data for a given subscription id. This method should be assumed to be on a hot path that will be called regularly as data is flowing through.

Attributes

Inherited from:
SubscriptionManager
def register(streamMeta: StreamMetadata, handler: QueueHandler): Boolean

Register a new stream with the provided id. The handler is used by the caller to interact with the stream. The caller can use handlersForSubscription() to get a list of handlers that should be called for a given subscription.

Register a new stream with the provided id. The handler is used by the caller to interact with the stream. The caller can use handlersForSubscription() to get a list of handlers that should be called for a given subscription.

Returns true if it is a new registration.

Attributes

Inherited from:
SubscriptionManager

Return a summary of information about all current streams.

Return a summary of information about all current streams.

Attributes

Inherited from:
SubscriptionManager
def streamSummary(streamId: String): Option[StreamSummary]

Return a summary of information about a particular stream.

Return a summary of information about a particular stream.

Attributes

Inherited from:
SubscriptionManager
def subscribe(streamId: String, subs: List[Subscription]): (QueueHandler, List[Subscription])

Start sending data for the subscription to the given stream id. Returns the handler along with a list of newly added subscriptions.

Start sending data for the subscription to the given stream id. Returns the handler along with a list of newly added subscriptions.

Attributes

Inherited from:
SubscriptionManager

Return the set of all current subscriptions across all streams.

Return the set of all current subscriptions across all streams.

Attributes

Inherited from:
SubscriptionManager
def subscriptionsForCluster(cluster: String): List[Subscription]

Return the set of subscriptions that can potentially match the provided cluster. This is typically used by clients running as part of a cluster to limit the set of expressions that are checked locally on the node.

Return the set of subscriptions that can potentially match the provided cluster. This is typically used by clients running as part of a cluster to limit the set of expressions that are checked locally on the node.

Attributes

Inherited from:
SubscriptionManager
def subscriptionsForStream(streamId: String): List[Subscription]

Return all of the subscriptions that are in use for a given stream.

Return all of the subscriptions that are in use for a given stream.

Attributes

Inherited from:
SubscriptionManager
def unsubscribe(streamId: String, subId: String): Unit

Stop sending data for the subscription to the given stream id.

Stop sending data for the subscription to the given stream id.

Attributes

Inherited from:
SubscriptionManager

Inherited fields

protected val logger: Logger

Attributes

Inherited from:
StrictLogging