Package com.tangosol.net
Interface PagedTopicService
- All Superinterfaces:
CacheService,ClassLoaderAware,Controllable,DistributedCacheService,PartitionedService,Service,Service,TopicService
A
TopicService which provides globally ordered topics.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.tangosol.net.CacheService
CacheService.CacheActionNested classes/interfaces inherited from interface com.tangosol.net.PartitionedService
PartitionedService.PartitionedAction, PartitionedService.PartitionRecoveryActionNested classes/interfaces inherited from interface com.tangosol.net.Service
Service.MemberJoinAction -
Field Summary
Fields inherited from interface com.tangosol.net.CacheService
TYPE_DISTRIBUTED, TYPE_LOCAL, TYPE_OPTIMISTIC, TYPE_PAGED_TOPIC, TYPE_REMOTE, TYPE_REMOTE_GRPC, TYPE_REPLICATEDFields inherited from interface com.tangosol.net.TopicService
TYPE_PAGED_TOPIC, TYPE_REMOTE, TYPE_REMOTE_GRPC -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSubscriptionListener(com.tangosol.internal.net.topic.impl.paged.model.PagedTopicSubscription.Listener listener) Add a listener that will be notified when changes are made to topic subscriptions.voiddestroySubscription(long lSubscriptionId) Remove an existing subscriber group.voiddestroySubscription(long lSubscriptionId, Subscriber.Id subscriberId) Remove an existing subscriber from a subscriber group.voidensureSubscription(String sTopicName, long lSubscription, Subscriber.Id subscriberId) Ensure the specified subscriber is subscribed to a subscription.voidensureSubscription(String sTopicName, long lSubscription, Subscriber.Id subscriberId, boolean fForceReconnect) Ensure the specified subscriber is subscribed to a subscription.voidensureSubscription(String sTopicName, long lSubscription, Subscriber.Id subscriberId, boolean fForceReconnect, int[] anChannel) Ensure the specified subscriber is subscribed to a subscription.longensureSubscription(String sTopicName, com.tangosol.internal.net.topic.impl.paged.model.SubscriberGroupId groupId, Subscriber.Id subscriberId, Filter<?> filter, ValueExtractor<?, ?> extractor) Ensure the specified subscriber is created in a subscription.longensureSubscription(String sTopicName, com.tangosol.internal.net.topic.impl.paged.model.SubscriberGroupId groupId, Subscriber.Id subscriberId, Filter<?> filter, ValueExtractor<?, ?> extractor, int[] anChannel) Ensure the specified subscriber is created in a subscription.Set<com.tangosol.internal.net.topic.impl.paged.model.SubscriberId> getSubscribers(String sTopicName, com.tangosol.internal.net.topic.impl.paged.model.SubscriberGroupId groupId) Returns thesubscriber idsknown to this service and subscribed to a subscriber group for a topic .com.tangosol.internal.net.topic.impl.paged.model.PagedTopicSubscriptiongetSubscription(long lSubscriptionId) Return aPagedTopicSubscription.longgetSubscriptionCount(String sTopicName) Returns the count of subscriptions for the specified topic.longgetSubscriptionId(String sTopicName, com.tangosol.internal.net.topic.impl.paged.model.SubscriberGroupId groupId) Return the subscription id for a subscriber group.com.tangosol.internal.net.topic.impl.paged.statistics.PagedTopicStatisticsgetTopicStatistics(String sTopicName) Returns thePagedTopicStatisticsfor a topic.booleanhasSubscribers(String sTopicName) Returnstrueif the specified topic has subscribers or subscriber groups.booleanhasSubscription(long lSubscriptionId) Determine whether a subscriber group exists.booleanisSubscriptionDestroyed(long lSubscriptionId) Determine whether a subscriber group has been destroyed.voidremoveSubscriptionListener(com.tangosol.internal.net.topic.impl.paged.model.PagedTopicSubscription.Listener listener) Remove a listener that was being notified when changes are made to topic subscriptions.Methods inherited from interface com.tangosol.net.CacheService
destroyCache, ensureCache, getBackingMapManager, getCacheNames, releaseCache, setBackingMapManagerMethods inherited from interface com.tangosol.io.ClassLoaderAware
getContextClassLoader, setContextClassLoaderMethods inherited from interface com.tangosol.util.Controllable
configure, isRunning, shutdown, start, stopMethods inherited from interface com.tangosol.net.DistributedCacheService
getStorageEnabledMembers, isLocalStorageEnabledMethods inherited from interface com.tangosol.net.PartitionedService
addPartitionListener, getBackupCount, getBackupOwner, getBackupStrength, getBackupStrengthName, getKeyAssociator, getKeyOwner, getKeyPartitioningStrategy, getOwnedPartitions, getOwnedPartitions, getOwnershipEnabledMembers, getOwnershipSenior, getOwnershipVersion, getPartitionAssignmentStrategy, getPartitionCount, getPartitionOwner, getPersistenceMode, instantiateKeyToBinaryConverter, removePartitionListenerMethods inherited from interface com.tangosol.net.Service
addMemberListener, getCluster, getDependencies, getInfo, getMinimumServiceVersion, getResourceRegistry, getSerializer, getUserContext, isSuspended, isVersionCompatible, isVersionCompatible, isVersionCompatible, isVersionCompatible, removeMemberListener, setDependencies, setUserContextMethods inherited from interface com.tangosol.util.Service
addServiceListener, removeServiceListenerMethods inherited from interface com.tangosol.net.TopicService
destroyTopic, ensureChannelCount, ensureChannelCount, ensureTopic, getChannelCount, getSubscriberGroups, getTopicBackingMapManager, getTopicNames, releaseTopic, setTopicBackingMapManager
-
Method Details
-
ensureSubscription
long ensureSubscription(String sTopicName, com.tangosol.internal.net.topic.impl.paged.model.SubscriberGroupId groupId, Subscriber.Id subscriberId, Filter<?> filter, ValueExtractor<?, ?> extractor) Ensure the specified subscriber is created in a subscription.- Parameters:
sTopicName- the name of the topicgroupId- theidof the subscriber groupsubscriberId- theSubscriber.Idfilter- theFilterto use to filter messages sent to subscribersextractor- theValueExtractorto use to convert messages sent to subscribers- Returns:
- the unique identifier of the subscriber group the
Subscriberis subscribed to, of-1if the cluster is not version compatible and cannot create subscriptions
-
ensureSubscription
long ensureSubscription(String sTopicName, com.tangosol.internal.net.topic.impl.paged.model.SubscriberGroupId groupId, Subscriber.Id subscriberId, Filter<?> filter, ValueExtractor<?, ?> extractor, int[] anChannel) Ensure the specified subscriber is created in a subscription.- Parameters:
sTopicName- the name of the topicgroupId- theidof the subscriber groupsubscriberId- theSubscriber.Idfilter- theFilterto use to filter messages sent to subscribersextractor- theValueExtractorto use to convert messages sent to subscribersanChannel- the channels to manually allocate to the subscriber- Returns:
- the unique identifier of the subscriber group the
Subscriberis subscribed to, of-1if the cluster is not version compatible and cannot create subscriptions
-
ensureSubscription
Ensure the specified subscriber is subscribed to a subscription.- Parameters:
sTopicName- the name of the topiclSubscription- the unique id of the subscriber groupsubscriberId- theSubscriber.Id
-
ensureSubscription
void ensureSubscription(String sTopicName, long lSubscription, Subscriber.Id subscriberId, boolean fForceReconnect) Ensure the specified subscriber is subscribed to a subscription.- Parameters:
sTopicName- the name of the topiclSubscription- the unique id of the subscriber groupsubscriberId- theSubscriber.IdfForceReconnect- force a reconnection even if the subscriber is known to the service
-
ensureSubscription
void ensureSubscription(String sTopicName, long lSubscription, Subscriber.Id subscriberId, boolean fForceReconnect, int[] anChannel) Ensure the specified subscriber is subscribed to a subscription.- Parameters:
sTopicName- the name of the topiclSubscription- the unique id of the subscriber groupsubscriberId- theSubscriber.IdfForceReconnect- force a reconnection even if the subscriber is known to the service
-
destroySubscription
Remove an existing subscriber from a subscriber group.- Parameters:
lSubscriptionId- the subscription identifiersubscriberId- theSubscriber.Id
-
destroySubscription
void destroySubscription(long lSubscriptionId) Remove an existing subscriber group.- Parameters:
lSubscriptionId- the subscription identifier
-
hasSubscription
boolean hasSubscription(long lSubscriptionId) Determine whether a subscriber group exists.- Parameters:
lSubscriptionId- the id of the subscription to return- Returns:
trueif the group exists
-
isSubscriptionDestroyed
boolean isSubscriptionDestroyed(long lSubscriptionId) Determine whether a subscriber group has been destroyed.- Parameters:
lSubscriptionId- the unique identifier of the subscriber group- Returns:
trueif the group has been destroyed
-
getSubscription
com.tangosol.internal.net.topic.impl.paged.model.PagedTopicSubscription getSubscription(long lSubscriptionId) Return aPagedTopicSubscription.- Parameters:
lSubscriptionId- the id of the subscription to return- Returns:
- the specified
PagedTopicSubscriptionornullif the subscription does not exist.
-
getSubscriptionId
long getSubscriptionId(String sTopicName, com.tangosol.internal.net.topic.impl.paged.model.SubscriberGroupId groupId) Return the subscription id for a subscriber group.- Parameters:
sTopicName- the name of the topicgroupId- theidentifierfor the subscriber group- Returns:
- the subscription id for a subscriber group or zero if the subscription does not exist.
-
getTopicStatistics
com.tangosol.internal.net.topic.impl.paged.statistics.PagedTopicStatistics getTopicStatistics(String sTopicName) Returns thePagedTopicStatisticsfor a topic.- Parameters:
sTopicName- the name of the topic- Returns:
- the
PagedTopicStatisticsfor the topic ornullif no statistics exist for the topic
-
getSubscribers
Set<com.tangosol.internal.net.topic.impl.paged.model.SubscriberId> getSubscribers(String sTopicName, com.tangosol.internal.net.topic.impl.paged.model.SubscriberGroupId groupId) Returns thesubscriber idsknown to this service and subscribed to a subscriber group for a topic .- Returns:
- the
subscriber idsknown to this service and subscribed to a subscriber group for a topic
-
hasSubscribers
Returnstrueif the specified topic has subscribers or subscriber groups.- Parameters:
sTopicName- the name of the topic- Returns:
trueif the specified topic has subscribers or subscriber groups
-
getSubscriptionCount
Returns the count of subscriptions for the specified topic.- Parameters:
sTopicName- the name of the topic- Returns:
- the count of subscriptions for the specified topic
-
addSubscriptionListener
void addSubscriptionListener(com.tangosol.internal.net.topic.impl.paged.model.PagedTopicSubscription.Listener listener) Add a listener that will be notified when changes are made to topic subscriptions.- Parameters:
listener- the listener to add
-
removeSubscriptionListener
void removeSubscriptionListener(com.tangosol.internal.net.topic.impl.paged.model.PagedTopicSubscription.Listener listener) Remove a listener that was being notified when changes are made to topic subscriptions.- Parameters:
listener- the listener to remove
-