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
-
Fields inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
lifecycle
-
-
Constructor Summary
Constructors Constructor Description RestoreOnlyRepository(java.lang.String indexName)
-
Method Summary
Modifier and Type Method Description void
deleteSnapshot(SnapshotId snapshotId, long repositoryStateId, ActionListener<java.lang.Void> listener)
protected void
doClose()
protected void
doStart()
protected void
doStop()
void
endVerification(java.lang.String verificationToken)
void
finalizeSnapshot(SnapshotId snapshotId, java.util.List<IndexId> indices, 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, ActionListener<SnapshotInfo> listener)
RepositoryMetaData
getMetadata()
RepositoryData
getRepositoryData()
long
getRestoreThrottleTimeInNanos()
IndexShardSnapshotStatus
getShardSnapshotStatus(SnapshotId snapshotId, Version version, 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, ActionListener<java.lang.Void> listener)
java.lang.String
startVerification()
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
-
Methods inherited from interface org.elasticsearch.common.lease.Releasable
close
-
Methods inherited from interface org.elasticsearch.repositories.Repository
restoreShard, restoreShard
-
-
-
-
Method Detail
-
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
public RepositoryMetaData getMetadata()
- Specified by:
getMetadata
in interfaceRepository
-
getSnapshotInfo
public SnapshotInfo getSnapshotInfo(SnapshotId snapshotId)
- Specified by:
getSnapshotInfo
in interfaceRepository
-
getSnapshotGlobalMetaData
public MetaData getSnapshotGlobalMetaData(SnapshotId snapshotId)
- 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
public RepositoryData 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, java.util.List<IndexId> indices, 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, ActionListener<SnapshotInfo> listener)
- Specified by:
finalizeSnapshot
in interfaceRepository
-
deleteSnapshot
public void deleteSnapshot(SnapshotId snapshotId, long repositoryStateId, 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, ActionListener<java.lang.Void> listener)
- Specified by:
snapshotShard
in interfaceRepository
-
getShardSnapshotStatus
public IndexShardSnapshotStatus getShardSnapshotStatus(SnapshotId snapshotId, Version version, IndexId indexId, ShardId shardId)
- Specified by:
getShardSnapshotStatus
in interfaceRepository
-
verify
public void verify(java.lang.String verificationToken, DiscoveryNode localNode)
- Specified by:
verify
in interfaceRepository
-
-