Class JedisPubSubService
java.lang.Object
org.eblocker.server.common.pubsub.JedisPubSubService
- All Implemented Interfaces:
PubSubService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidPublish a message in a channelvoidsubscribeAndLoop(String channel, Subscriber subscriber) Subscribe to a channel.voidunsubscribe(Subscriber subscriber)
-
Constructor Details
-
JedisPubSubService
@Inject public JedisPubSubService(redis.clients.jedis.JedisPool pool, int retryDelay)
-
-
Method Details
-
publish
Description copied from interface:PubSubServicePublish a message in a channel- Specified by:
publishin interfacePubSubService
-
subscribeAndLoop
Description copied from interface:PubSubServiceSubscribe to a channel. This method never returns, so it should be run in a background thread.- Specified by:
subscribeAndLoopin interfacePubSubService
-
unsubscribe
- Specified by:
unsubscribein interfacePubSubService
-