DATAREDIS-612 - Polishing.
Introduce factory methods for ChannelTopic and PatternTopic. Original Pull Request: #295
This commit is contained in:
committed by
Christoph Strobl
parent
d356ade624
commit
a3b96add06
@@ -42,6 +42,17 @@ public class ChannelTopic implements Topic {
|
||||
this.channelName = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new {@link ChannelTopic} for channel subscriptions.
|
||||
*
|
||||
* @param name the channel name, must not be {@literal null} or empty.
|
||||
* @return the {@link ChannelTopic} for {@code channelName}.
|
||||
* @since 2.1
|
||||
*/
|
||||
public static ChannelTopic of(String name) {
|
||||
return new ChannelTopic(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return topic name.
|
||||
*/
|
||||
|
||||
@@ -42,6 +42,17 @@ public class PatternTopic implements Topic {
|
||||
this.channelPattern = pattern;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new {@link PatternTopic} for channel subscriptions based on a {@code pattern}.
|
||||
*
|
||||
* @param pattern the channel pattern, must not be {@literal null} or empty.
|
||||
* @return the {@link PatternTopic} for {@code pattern}.
|
||||
* @since 2.1
|
||||
*/
|
||||
static PatternTopic of(String pattern) {
|
||||
return new PatternTopic(pattern);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return channel pattern.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user