public class SnapshotClient extends Object
Modifier and Type | Method and Description |
---|---|
ClientConfig |
getConfig() |
ClientEventHandler |
getEventHandler() |
void |
restore(File sourceFile,
QueryOptions queryOptions,
Callback<Void> callback)
Restores a snapshot stored in a file.
|
void |
save(File destinationFile,
QueryOptions queryOptions,
Callback<BigInteger> callback)
Requests a new snapshot and save it in a file.
|
protected final Http http
public void save(File destinationFile, QueryOptions queryOptions, Callback<BigInteger> callback)
destinationFile
- file in which the snapshot is to be saved.queryOptions
- query options. Only a subset of the QueryOptions is supported: datacenter, consistencymode, and token.callback
- callback called once the operation is over. It the save operation is successful, the X-Consul-Index is send.public void restore(File sourceFile, QueryOptions queryOptions, Callback<Void> callback)
sourceFile
- source file where the snapshot is stored.queryOptions
- query options. Only a subset of the QueryOptions is supported: datacenter, token.callback
- callback called once the operation is over.public ClientConfig getConfig()
public ClientEventHandler getEventHandler()
Copyright © 2018. All rights reserved.