Package org.symphonyoss.s2.fugue.pubsub
Class AbstractSubscriberAdmin.Builder<T extends AbstractSubscriberAdmin.Builder<T,B>,B extends AbstractSubscriberAdmin<B>>
- java.lang.Object
-
- org.symphonyoss.s2.common.fluent.Fluent<T>
-
- org.symphonyoss.s2.common.fluent.BaseAbstractBuilder<T,B>
-
- org.symphonyoss.s2.fugue.pubsub.AbstractSubscriberBase.Builder<Void,T,B>
-
- org.symphonyoss.s2.fugue.pubsub.AbstractSubscriberAdmin.Builder<T,B>
-
- Type Parameters:
T- The concrete type returned by fluent methods.B- The concrete type of the built object.
- All Implemented Interfaces:
org.symphonyoss.s2.common.fluent.IBuilder<T,B>,org.symphonyoss.s2.common.fluent.IFluent<T>,ISubscriberAdminBuilder<T,B>
- Enclosing class:
- AbstractSubscriberAdmin<T extends AbstractSubscriberAdmin<T>>
public abstract static class AbstractSubscriberAdmin.Builder<T extends AbstractSubscriberAdmin.Builder<T,B>,B extends AbstractSubscriberAdmin<B>> extends AbstractSubscriberBase.Builder<Void,T,B> implements ISubscriberAdminBuilder<T,B>
Builder.- Author:
- Bruce Skingle
-
-
Field Summary
Fields Modifier and Type Field Description protected List<SubscriptionImpl<?>>obsoleteSubscribers_-
Fields inherited from class org.symphonyoss.s2.fugue.pubsub.AbstractSubscriberBase.Builder
nameFactory_, subscribers_, taskList_, totalSubscriptionCnt_
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TwithObsoleteSubscription(String subscriptionId, String topicId, String... additionalTopicIds)Delete the given subscription on the given topics.TwithSubscription(String subscriptionId, String[] topicNames)Subscribe to the given subscription on the given topics.TwithSubscription(String subscriptionId, String topicId, String... additionalTopicIds)Subscribe to the given subscription on the given topics.TwithSubscription(String subscriptionId, Collection<org.symphonyoss.s2.fugue.naming.TopicName> topicNames)Subscribe to the given subscription on the given topics.TwithSubscription(Subscription subscription)-
Methods inherited from class org.symphonyoss.s2.fugue.pubsub.AbstractSubscriberBase.Builder
validate, withNameFactory, withSubscription, withSubscription, withSubscription, withSubscription
-
-
-
-
Field Detail
-
obsoleteSubscribers_
protected List<SubscriptionImpl<?>> obsoleteSubscribers_
-
-
Method Detail
-
withSubscription
public T withSubscription(Subscription subscription)
- Specified by:
withSubscriptionin interfaceISubscriberAdminBuilder<T extends AbstractSubscriberAdmin.Builder<T,B>,B extends AbstractSubscriberAdmin<B>>
-
withObsoleteSubscription
public T withObsoleteSubscription(String subscriptionId, String topicId, String... additionalTopicIds)
Description copied from interface:ISubscriberAdminBuilderDelete the given subscription on the given topics. This method allows for the deletion of subscriptions which are no longer required. It causes the subscription to be deleted during both deploy and undeploy operations. If currently running instances of the service are actively consuming from this subscription then they will experience errors. For this reason, subscriptions should normally be phased out in two stages (assuming a no downtime deployment is required). In the first stage the service would remove the withSubscription() call, once that version is deployed a subsequent deployment can be made including a call to this method, which will cause the subscription to be deleted. This does mean that messages will back up on the subscription during the period between the two releases which may cause montioring systems to alert.- Specified by:
withObsoleteSubscriptionin interfaceISubscriberAdminBuilder<T extends AbstractSubscriberAdmin.Builder<T,B>,B extends AbstractSubscriberAdmin<B>>- Parameters:
subscriptionId- A subscription name.topicId- A topic name.additionalTopicIds- An optional list of additional topic names.- Returns:
- this (fluent method)
-
withSubscription
public T withSubscription(String subscriptionId, String topicId, String... additionalTopicIds)
Description copied from interface:ISubscriberAdminBuilderSubscribe to the given subscription on the given topics. This method allows for the creation of the same subscription on one or more topics, the same consumer will receive messages received on the given subscription on any of the topics. The topics are all treated in the same way, the method is declared with topic and additionalTopics to ensure that at least one topic is provided. This method does the same thing as the other withSubscription methods, alternative signatures are provided as a convenience.- Specified by:
withSubscriptionin interfaceISubscriberAdminBuilder<T extends AbstractSubscriberAdmin.Builder<T,B>,B extends AbstractSubscriberAdmin<B>>- Parameters:
subscriptionId- A subscription name.topicId- A topic name.additionalTopicIds- An optional list of additional topic names.- Returns:
- this (fluent method)
-
withSubscription
public T withSubscription(String subscriptionId, Collection<org.symphonyoss.s2.fugue.naming.TopicName> topicNames)
Description copied from interface:ISubscriberAdminBuilderSubscribe to the given subscription on the given topics. This method allows for the creation of the same subscription on one or more topics, the same consumer will receive messages received on the given subscription on any of the topics. The topics are all treated in the same way, the method is declared with topic and additionalTopics to ensure that at least one topic is provided. This method does the same thing as the other withSubscription methods, alternative signatures are provided as a convenience.- Specified by:
withSubscriptionin interfaceISubscriberAdminBuilder<T extends AbstractSubscriberAdmin.Builder<T,B>,B extends AbstractSubscriberAdmin<B>>- Parameters:
subscriptionId- A subscription name.topicNames- A list of topic names.- Returns:
- this (fluent method)
-
withSubscription
public T withSubscription(String subscriptionId, String[] topicNames)
Description copied from interface:ISubscriberAdminBuilderSubscribe to the given subscription on the given topics. This method allows for the creation of the same subscription on one or more topics, the same consumer will receive messages received on the given subscription on any of the topics. The topics are all treated in the same way, the method is declared with topic and additionalTopics to ensure that at least one topic is provided. This method does the same thing as the other withSubscription methods, alternative signatures are provided as a convenience.- Specified by:
withSubscriptionin interfaceISubscriberAdminBuilder<T extends AbstractSubscriberAdmin.Builder<T,B>,B extends AbstractSubscriberAdmin<B>>- Parameters:
subscriptionId- A subscription name.topicNames- A list of topic names.- Returns:
- this (fluent method)
-
-