Interface AttributeSubscriptionService
@PublicApi
public interface AttributeSubscriptionService
AttributeSubscriptionService manages attribute subscriptions. A subscription allows the client to "watch" a particular
set of values, identified by a set of rows and attributes, retrieve updates to this set of values in versioned manner, and perform
background loading.
Subscriptions are kept in a cache and may be deleted / closed if not used or if there are too many subscriptions.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionCreates a new empty subscription.voiddropSubscription(Long subscriptionId) Deletes the subscription.getSubscription(Long subscriptionId) Retrieves a previously created subscription.
-
Method Details
-
createSubscription
Creates a new empty subscription.
The subscription will be attached to the current user, and only that user will have the access to this subscription.
- Returns:
- a new subscription
- See Also:
-
getSubscription
@NotNull AttributeSubscription getSubscription(@Nullable Long subscriptionId) throws StructureException Retrieves a previously created subscription. The ID of the subscription should come from a previous call toAttributeSubscription.getSubscriptionId().- Parameters:
subscriptionId- subscription ID- Returns:
- the subscription
- Throws:
StructureException- if the current user is not the owner of the specified subscription, or if the subscription with this ID is not found
-
dropSubscription
Deletes the subscription. Any background loading is cancelled.- Parameters:
subscriptionId- subscription ID- Throws:
StructureException- if the current user is not the owner of the specified subscription, or if the subscription with this ID is not found
-