Package org.infinispan.xsite
Class BackupReceiverRepositoryImpl
- java.lang.Object
-
- org.infinispan.xsite.BackupReceiverRepositoryImpl
-
- All Implemented Interfaces:
BackupReceiverRepository
public class BackupReceiverRepositoryImpl extends java.lang.Object implements BackupReceiverRepository
- Since:
- 5.2
- Author:
- Mircea Markus
-
-
Field Summary
Fields Modifier and Type Field Description EmbeddedCacheManagercacheManagerCacheManagerNotifiercacheManagerNotifier
-
Constructor Summary
Constructors Constructor Description BackupReceiverRepositoryImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcacheStopped(CacheStoppedEvent cse)BackupReceiverget(java.lang.String site, java.lang.String cache)BackupReceivergetBackupReceiver(java.lang.String remoteSite, java.lang.String remoteCache)Returns the local cache defined as backup for the provided remote (site, cache) combo, or throws an exception if no such site is defined.voidreplace(java.lang.String site, java.lang.String cache, BackupReceiver bcr)voidstart()voidstop()
-
-
-
Field Detail
-
cacheManager
public EmbeddedCacheManager cacheManager
-
cacheManagerNotifier
public CacheManagerNotifier cacheManagerNotifier
-
-
Method Detail
-
start
public void start()
-
stop
public void stop()
-
cacheStopped
public void cacheStopped(CacheStoppedEvent cse)
-
getBackupReceiver
public BackupReceiver getBackupReceiver(java.lang.String remoteSite, java.lang.String remoteCache)
Returns the local cache defined as backup for the provided remote (site, cache) combo, or throws an exception if no such site is defined. Also starts the cache if not already started; that is because the cache is needed for update after this method is invoked.- Specified by:
getBackupReceiverin interfaceBackupReceiverRepository
-
replace
public void replace(java.lang.String site, java.lang.String cache, BackupReceiver bcr)
-
get
public BackupReceiver get(java.lang.String site, java.lang.String cache)
-
-