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 voiddeleteSnapshot(SnapshotId snapshotId, long repositoryStateId)protected voiddoClose()protected voiddoStart()protected voiddoStop()voidendVerification(java.lang.String verificationToken)SnapshotInfofinalizeSnapshot(SnapshotId snapshotId, java.util.List<IndexId> indices, long startTime, java.lang.String failure, int totalShards, java.util.List<SnapshotShardFailure> shardFailures, long repositoryStateId, boolean includeGlobalState)RepositoryMetaDatagetMetadata()RepositoryDatagetRepositoryData()longgetRestoreThrottleTimeInNanos()IndexShardSnapshotStatusgetShardSnapshotStatus(SnapshotId snapshotId, Version version, IndexId indexId, ShardId shardId)MetaDatagetSnapshotGlobalMetaData(SnapshotId snapshotId)IndexMetaDatagetSnapshotIndexMetaData(SnapshotId snapshotId, IndexId index)SnapshotInfogetSnapshotInfo(SnapshotId snapshotId)longgetSnapshotThrottleTimeInNanos()voidinitializeSnapshot(SnapshotId snapshotId, java.util.List<IndexId> indices, MetaData metaData)booleanisReadOnly()voidsnapshotShard(IndexShard shard, Store store, SnapshotId snapshotId, IndexId indexId, IndexCommit snapshotIndexCommit, IndexShardSnapshotStatus snapshotStatus)java.lang.StringstartVerification()voidverify(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
-
-
-
-
Method Detail
-
doStart
protected void doStart()
- Specified by:
doStartin classAbstractLifecycleComponent
-
doStop
protected void doStop()
- Specified by:
doStopin classAbstractLifecycleComponent
-
doClose
protected void doClose()
- Specified by:
doClosein classAbstractLifecycleComponent
-
getMetadata
public RepositoryMetaData getMetadata()
- Specified by:
getMetadatain interfaceRepository
-
getSnapshotInfo
public SnapshotInfo getSnapshotInfo(SnapshotId snapshotId)
- Specified by:
getSnapshotInfoin interfaceRepository
-
getSnapshotGlobalMetaData
public MetaData getSnapshotGlobalMetaData(SnapshotId snapshotId)
- Specified by:
getSnapshotGlobalMetaDatain interfaceRepository
-
getSnapshotIndexMetaData
public IndexMetaData getSnapshotIndexMetaData(SnapshotId snapshotId, IndexId index) throws java.io.IOException
- Specified by:
getSnapshotIndexMetaDatain interfaceRepository- Throws:
java.io.IOException
-
getRepositoryData
public RepositoryData getRepositoryData()
- Specified by:
getRepositoryDatain interfaceRepository
-
initializeSnapshot
public void initializeSnapshot(SnapshotId snapshotId, java.util.List<IndexId> indices, MetaData metaData)
- Specified by:
initializeSnapshotin interfaceRepository
-
finalizeSnapshot
public SnapshotInfo 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)
- Specified by:
finalizeSnapshotin interfaceRepository
-
deleteSnapshot
public void deleteSnapshot(SnapshotId snapshotId, long repositoryStateId)
- Specified by:
deleteSnapshotin interfaceRepository
-
getSnapshotThrottleTimeInNanos
public long getSnapshotThrottleTimeInNanos()
- Specified by:
getSnapshotThrottleTimeInNanosin interfaceRepository
-
getRestoreThrottleTimeInNanos
public long getRestoreThrottleTimeInNanos()
- Specified by:
getRestoreThrottleTimeInNanosin interfaceRepository
-
startVerification
public java.lang.String startVerification()
- Specified by:
startVerificationin interfaceRepository
-
endVerification
public void endVerification(java.lang.String verificationToken)
- Specified by:
endVerificationin interfaceRepository
-
isReadOnly
public boolean isReadOnly()
- Specified by:
isReadOnlyin interfaceRepository
-
snapshotShard
public void snapshotShard(IndexShard shard, Store store, SnapshotId snapshotId, IndexId indexId, IndexCommit snapshotIndexCommit, IndexShardSnapshotStatus snapshotStatus)
- Specified by:
snapshotShardin interfaceRepository
-
getShardSnapshotStatus
public IndexShardSnapshotStatus getShardSnapshotStatus(SnapshotId snapshotId, Version version, IndexId indexId, ShardId shardId)
- Specified by:
getShardSnapshotStatusin interfaceRepository
-
verify
public void verify(java.lang.String verificationToken, DiscoveryNode localNode)- Specified by:
verifyin interfaceRepository
-
-