-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
Description
Currently we have the Java's TreeMap as the repository. This is the fastest possible solution,since no network IO is involved .
We can also have Redis as the backend store.
How I think we should do it :
final Jedis jedis = new Jedis(); //Blah blah,however you want to configure Jedis.
//Pass it to the constructor.Now the DbIpClient knows that Redis is the primary storage.
final DbIpClient dbIpClient = new DbIpClient(PATH_TO_DB_IP_FILE,jedis);
//Retrieves from Redis
final GeoEntity geoEntity = dbIpClient.lookup("11.22.11.11);