This content has been marked as final.
Show 2 replies
-
1. Re: Getting the name of the cache in ReplicationQueueImpl
mircea.markus Dec 14, 2010 5:45 AM (in response to cbo_)You can have it inject it in your implementation by using @Inject annotation, e.g.:
@Injectprivate void injectDependencies(@ComponentName(KnownComponentNames.ASYNC_REPLICATION_QUEUE_EXECUTOR) ScheduledExecutorService executor,RpcManager rpcManager, Configuration configuration, CommandsFactory commandsFactory) {@Inject
private void injectDependencies(@ComponentName(KnownComponentNames.ASYNC_REPLICATION_QUEUE_EXECUTOR) ScheduledExecutorService executor,
RpcManager rpcManager, Configuration configuration, CommandsFactory commandsFactory)
This method will be called at startup, before anything gets queued. Just use as params whatever is relevant for you.
-
2. Re: Getting the name of the cache in ReplicationQueueImpl
manik Dec 14, 2010 6:48 AM (in response to cbo_)You should be able to declare your own method, e.g.,
@Inject
private void injectCache(Cache c) { .. }
and that will give you a reference to the Cache, after which you can call:
c.getName()