-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: wirering IoC with TaskRepository #1626
- Loading branch information
Showing
15 changed files
with
71 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
datashare-app/src/main/java/org/icij/datashare/tasks/TaskRepositoryRedis.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.icij.datashare.tasks; | ||
|
||
import com.google.inject.Inject; | ||
import com.google.inject.Singleton; | ||
import org.redisson.api.RedissonClient; | ||
|
||
@Singleton | ||
public class TaskRepositoryRedis extends org.icij.datashare.asynctasks.TaskRepositoryRedis{ | ||
@Inject | ||
public TaskRepositoryRedis(RedissonClient redisson) { | ||
super(redisson); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
datashare-tasks/src/main/java/org/icij/datashare/asynctasks/TaskRepositoryMemory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package org.icij.datashare.asynctasks; | ||
|
||
import java.util.concurrent.ConcurrentHashMap; | ||
|
||
public class TaskRepositoryMemory extends ConcurrentHashMap<String, Task<?>> implements TaskRepository { } |
18 changes: 18 additions & 0 deletions
18
datashare-tasks/src/main/java/org/icij/datashare/asynctasks/TaskRepositoryRedis.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.icij.datashare.asynctasks; | ||
|
||
import org.redisson.Redisson; | ||
import org.redisson.RedissonMap; | ||
import org.redisson.api.RedissonClient; | ||
import org.redisson.command.CommandSyncService; | ||
import org.redisson.liveobject.core.RedissonObjectBuilder; | ||
|
||
public class TaskRepositoryRedis extends RedissonMap<String, Task<?>> implements TaskRepository { | ||
public TaskRepositoryRedis(RedissonClient redisson) { | ||
this(redisson, "ds:task:manager"); | ||
} | ||
|
||
public TaskRepositoryRedis(RedissonClient redisson, String name) { | ||
super(new TaskManagerRedis.TaskViewCodec(), new CommandSyncService(((Redisson) redisson).getConnectionManager(), new RedissonObjectBuilder(redisson)), | ||
name, redisson, null, null); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters