@Test public void publishAndConsume() { Producer p = new Producer(new Jedis("localhost"), "foo"); Consumer c = new Consumer(new Jedis("localhost"), "a subscriber", "foo"); p.publish("hello world!"); assertEquals("hello world!", c.consume()); }
public void publish(final String message) { publish(message, 0); }
Producer { public void publish(final String message) { publish(message, 0); } }
Producer { public void publish(final String message) { publish(message, 0); } Producer(final Jedis jedis, final String topic); }
Producer { public void publish(final String message) { publish(message, 0); } Producer(final Jedis jedis, final String topic); void publish(final String message); void clean(); void publish(String message, int seconds); }
Producer { public void publish(final String message) { publish(message, 0); } Producer(final Jedis jedis, final String topic); void publish(final String message); void clean(); void publish(String message, int seconds);  }