Package ch.rswk.meta.engine.test
Class BackupMockService
java.lang.Object
com.google.common.util.concurrent.AbstractIdleService
ch.rswk.meta.engine.test.BackupMockService
- All Implemented Interfaces:
BackupService
,com.google.common.util.concurrent.Service
@Singleton
public class BackupMockService
extends com.google.common.util.concurrent.AbstractIdleService
implements BackupService
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.rswk.meta.engine.BackupService
BackupService.AbstractBackupDelegate
Nested classes/interfaces inherited from interface com.google.common.util.concurrent.Service
com.google.common.util.concurrent.Service.Listener, com.google.common.util.concurrent.Service.State
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.util.concurrent.ListenableFuture
<BackupReply> backup
(BackupRequest request) com.google.common.util.concurrent.ListenableFuture
<BackupRestoreReply> backupRestore
(BackupRestoreRequest request) com.google.common.util.concurrent.ListenableFuture
<Void> Register delegate to handle backing up and restoring data to/from a file.protected void
shutDown()
protected void
startUp()
Methods inherited from class com.google.common.util.concurrent.AbstractIdleService
addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, executor, failureCause, isRunning, serviceName, startAsync, state, stopAsync, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.common.util.concurrent.Service
addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, failureCause, isRunning, startAsync, state, stopAsync
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG
-
-
Constructor Details
-
BackupMockService
-
-
Method Details
-
startUp
- Specified by:
startUp
in classcom.google.common.util.concurrent.AbstractIdleService
- Throws:
Exception
-
shutDown
- Specified by:
shutDown
in classcom.google.common.util.concurrent.AbstractIdleService
- Throws:
Exception
-
registerBackupDelegate
public com.google.common.util.concurrent.ListenableFuture<Void> registerBackupDelegate(BackupService.AbstractBackupDelegate delegate) Description copied from interface:BackupService
Register delegate to handle backing up and restoring data to/from a file.- Specified by:
registerBackupDelegate
in interfaceBackupService
- Returns:
- future completes when registration is done
-
backup
public com.google.common.util.concurrent.ListenableFuture<BackupReply> backup(BackupRequest request) - Specified by:
backup
in interfaceBackupService
-
backupRestore
public com.google.common.util.concurrent.ListenableFuture<BackupRestoreReply> backupRestore(BackupRestoreRequest request) - Specified by:
backupRestore
in interfaceBackupService
-