Package org.elasticsearch.index.shard
Class RestoreOnlyRepository
java.lang.Object
org.elasticsearch.common.component.AbstractLifecycleComponent
org.elasticsearch.index.shard.RestoreOnlyRepository
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,LifecycleComponent
,Releasable
,Repository
public abstract class RestoreOnlyRepository extends AbstractLifecycleComponent implements Repository
A dummy repository for testing which just needs restore overridden
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.repositories.Repository
Repository.Factory
-
Field Summary
-
Constructor Summary
Constructors Constructor Description RestoreOnlyRepository(java.lang.String indexName)
-
Method Summary
Modifier and Type Method Description void
deleteSnapshot(SnapshotId snapshotId, long repositoryStateId, boolean writeShardGens, ActionListener<java.lang.Void> listener)
protected void
doClose()
protected void
doStart()
protected void
doStop()
void
endVerification(java.lang.String verificationToken)
void
finalizeSnapshot(SnapshotId snapshotId, ShardGenerations shardGenerations, long startTime, java.lang.String failure, int totalShards, java.util.List<SnapshotShardFailure> shardFailures, long repositoryStateId, boolean includeGlobalState, MetaData metaData, java.util.Map<java.lang.String,java.lang.Object> userMetadata, boolean writeShardGens, ActionListener<SnapshotInfo> listener)
RepositoryMetaData
getMetadata()
void
getRepositoryData(ActionListener<RepositoryData> listener)
long
getRestoreThrottleTimeInNanos()
IndexShardSnapshotStatus
getShardSnapshotStatus(SnapshotId snapshotId, IndexId indexId, ShardId shardId)
MetaData
getSnapshotGlobalMetaData(SnapshotId snapshotId)
IndexMetaData
getSnapshotIndexMetaData(SnapshotId snapshotId, IndexId index)
SnapshotInfo
getSnapshotInfo(SnapshotId snapshotId)
long
getSnapshotThrottleTimeInNanos()
void
initializeSnapshot(SnapshotId snapshotId, java.util.List<IndexId> indices, MetaData metaData)
boolean
isReadOnly()
void
snapshotShard(Store store, MapperService mapperService, SnapshotId snapshotId, IndexId indexId, IndexCommit snapshotIndexCommit, IndexShardSnapshotStatus snapshotStatus, boolean writeShardGens, ActionListener<java.lang.String> listener)
java.lang.String
startVerification()
void
updateState(ClusterState state)
void
verify(java.lang.String verificationToken, DiscoveryNode localNode)
Methods inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stop
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.common.component.LifecycleComponent
addLifecycleListener, lifecycleState, removeLifecycleListener, start, stop
-
Constructor Details
-
RestoreOnlyRepository
public RestoreOnlyRepository(java.lang.String indexName)
-
-
Method Details
-
doStart
protected void doStart()- Specified by:
doStart
in classAbstractLifecycleComponent
-
doStop
protected void doStop()- Specified by:
doStop
in classAbstractLifecycleComponent
-
doClose
protected void doClose()- Specified by:
doClose
in classAbstractLifecycleComponent
-
getMetadata
- Specified by:
getMetadata
in interfaceRepository
-
getSnapshotInfo
- Specified by:
getSnapshotInfo
in interfaceRepository
-
getSnapshotGlobalMetaData
- Specified by:
getSnapshotGlobalMetaData
in interfaceRepository
-
getSnapshotIndexMetaData
public IndexMetaData getSnapshotIndexMetaData(SnapshotId snapshotId, IndexId index) throws java.io.IOException- Specified by:
getSnapshotIndexMetaData
in interfaceRepository
- Throws:
java.io.IOException
-
getRepositoryData
- Specified by:
getRepositoryData
in interfaceRepository
-
initializeSnapshot
public void initializeSnapshot(SnapshotId snapshotId, java.util.List<IndexId> indices, MetaData metaData)- Specified by:
initializeSnapshot
in interfaceRepository
-
finalizeSnapshot
public void finalizeSnapshot(SnapshotId snapshotId, ShardGenerations shardGenerations, long startTime, java.lang.String failure, int totalShards, java.util.List<SnapshotShardFailure> shardFailures, long repositoryStateId, boolean includeGlobalState, MetaData metaData, java.util.Map<java.lang.String,java.lang.Object> userMetadata, boolean writeShardGens, ActionListener<SnapshotInfo> listener)- Specified by:
finalizeSnapshot
in interfaceRepository
-
deleteSnapshot
public void deleteSnapshot(SnapshotId snapshotId, long repositoryStateId, boolean writeShardGens, ActionListener<java.lang.Void> listener)- Specified by:
deleteSnapshot
in interfaceRepository
-
getSnapshotThrottleTimeInNanos
public long getSnapshotThrottleTimeInNanos()- Specified by:
getSnapshotThrottleTimeInNanos
in interfaceRepository
-
getRestoreThrottleTimeInNanos
public long getRestoreThrottleTimeInNanos()- Specified by:
getRestoreThrottleTimeInNanos
in interfaceRepository
-
startVerification
public java.lang.String startVerification()- Specified by:
startVerification
in interfaceRepository
-
endVerification
public void endVerification(java.lang.String verificationToken)- Specified by:
endVerification
in interfaceRepository
-
isReadOnly
public boolean isReadOnly()- Specified by:
isReadOnly
in interfaceRepository
-
snapshotShard
public void snapshotShard(Store store, MapperService mapperService, SnapshotId snapshotId, IndexId indexId, IndexCommit snapshotIndexCommit, IndexShardSnapshotStatus snapshotStatus, boolean writeShardGens, ActionListener<java.lang.String> listener)- Specified by:
snapshotShard
in interfaceRepository
-
getShardSnapshotStatus
public IndexShardSnapshotStatus getShardSnapshotStatus(SnapshotId snapshotId, IndexId indexId, ShardId shardId)- Specified by:
getShardSnapshotStatus
in interfaceRepository
-
verify
- Specified by:
verify
in interfaceRepository
-
updateState
- Specified by:
updateState
in interfaceRepository
-