Skip to content

Commit

Permalink
Makes RedisObelixStore prefix customizable
Browse files Browse the repository at this point in the history
  • Loading branch information
frecar committed May 22, 2015
1 parent 965193a commit 1f5f29d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public static void main(String... args) {

(new Thread(new ObelixWebServer(graphDb, webPort, recommendationDepth, clientSettings()))).start();

(new Thread(new ObelixCache(graphDb, usersCacheQueue, new RedisObelixStore(),
(new Thread(new ObelixCache(graphDb, usersCacheQueue, new RedisObelixStore(redisQueuePrefix),
buildForAllUsersOnStartup, recommendationDepth, maxRelationships,
clientSettings()))).start();

Expand Down
1 change: 0 additions & 1 deletion src/main/java/obelix/ObelixFeeder.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public ObelixFeeder(GraphDatabaseService graphDb, int maxRelationships,
this.maxRelationships = maxRelationships;
this.graphDb = graphDb;
this.workerID = workerID;

}

public void run() {
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/store/impl/RedisObelixStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ public RedisObelixStore() {
this.redisPool = new RedisPool();
}

public RedisObelixStore(String prefix) {
this.prefix = prefix;
this.redisPool = new RedisPool();
}

@Override
public void set(String key, ObelixStoreElement value)
{
Expand Down

0 comments on commit 1f5f29d

Please sign in to comment.