package eu.socialsensor.framework.client.search;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPoolConfig;

public class MediaSearcher {

	public static final String CHANNEL = "searchRequestsChannel";
	
	private Jedis publisherJedis;
	
	public MediaSearcher(String searcherHostname) {
		JedisPoolConfig poolConfig = new JedisPoolConfig();
        JedisPool jedisPool = new JedisPool(poolConfig, searcherHostname, 6379, 0);
        
        this.publisherJedis = jedisPool.getResource();
        
	}
	
	public void search(String dyscoId) {
		publisherJedis.publish(CHANNEL, dyscoId);
	}
	
	public void delete(String dyscoId){
		publisherJedis.publish(CHANNEL, dyscoId);
	}

}

@@ -580,23 +580,23 @@
 (String 
-dyscoId
+message
 ) %7B%0A%09%09pu
@@ -621,31 +621,31 @@
 sh(CHANNEL, 
-dyscoId
+message
 );%0A%09%7D%0A%09%0A%09pub
@@ -667,23 +667,23 @@
 (String 
-dyscoId
+message
 )%7B%0A%09%09pub
@@ -715,15 +715,15 @@
 EL, 
-dyscoId
+message
 );%0A%09

change name of dyscoId to message