Class MockRepository
java.lang.Object
org.elasticsearch.common.component.AbstractLifecycleComponent
org.elasticsearch.repositories.blobstore.BlobStoreRepository
org.elasticsearch.repositories.fs.FsRepository
org.elasticsearch.snapshots.mockstore.MockRepository
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,LifecycleComponent
,Releasable
,Repository
public class MockRepository extends FsRepository
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
MockRepository.MockBlobStore
static class
MockRepository.Plugin
Nested classes/interfaces inherited from interface org.elasticsearch.repositories.Repository
Repository.Factory
-
Field Summary
Fields inherited from class org.elasticsearch.repositories.fs.FsRepository
CHUNK_SIZE_SETTING, COMPRESS_SETTING, LOCATION_SETTING, REPOSITORIES_CHUNK_SIZE_SETTING, REPOSITORIES_COMPRESS_SETTING, REPOSITORIES_LOCATION_SETTING, TYPE
Fields inherited from class org.elasticsearch.repositories.blobstore.BlobStoreRepository
ALLOW_CONCURRENT_MODIFICATION, CACHE_REPOSITORY_DATA, INDEX_FILE_PREFIX, INDEX_LATEST_BLOB, metadata, METADATA_NAME_FORMAT, METADATA_PREFIX, namedXContentRegistry, SNAPSHOT_CODEC, SNAPSHOT_NAME_FORMAT, SNAPSHOT_PREFIX, snapshotFormat, threadPool
-
Constructor Summary
Constructors Constructor Description MockRepository(RepositoryMetaData metadata, Environment environment, NamedXContentRegistry namedXContentRegistry, ClusterService clusterService)
-
Method Summary
Modifier and Type Method Description boolean
blocked()
void
blockOnDataFiles(boolean blocked)
protected BlobStore
createBlobStore()
protected void
doStop()
long
getFailureCount()
RepositoryMetaData
getMetadata()
void
setBlockAndFailOnWriteSnapFiles(boolean blocked)
void
setBlockOnWriteIndexFile(boolean blocked)
void
unblock()
Methods inherited from class org.elasticsearch.repositories.blobstore.BlobStoreRepository
assertSnapshotOrGenericThread, blobContainer, blobStore, cleanup, deleteSnapshot, doClose, doStart, endVerification, finalizeSnapshot, getBlobStore, getRepositoryData, getRestoreThrottleTimeInNanos, getShardSnapshotStatus, getSnapshotGlobalMetaData, getSnapshotIndexMetaData, getSnapshotInfo, getSnapshotThrottleTimeInNanos, initializeSnapshot, isCompress, isReadOnly, restoreShard, snapshotShard, startVerification, threadPool, toString, updateState, verify, writeIndexGen
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, wait, wait, wait
Methods inherited from interface org.elasticsearch.common.component.LifecycleComponent
addLifecycleListener, lifecycleState, removeLifecycleListener, start, stop
-
Constructor Details
-
MockRepository
public MockRepository(RepositoryMetaData metadata, Environment environment, NamedXContentRegistry namedXContentRegistry, ClusterService clusterService)
-
-
Method Details
-
getFailureCount
public long getFailureCount() -
getMetadata
- Specified by:
getMetadata
in interfaceRepository
- Overrides:
getMetadata
in classBlobStoreRepository
-
doStop
protected void doStop()- Overrides:
doStop
in classBlobStoreRepository
-
createBlobStore
- Overrides:
createBlobStore
in classFsRepository
- Throws:
java.lang.Exception
-
unblock
public void unblock() -
blockOnDataFiles
public void blockOnDataFiles(boolean blocked) -
setBlockAndFailOnWriteSnapFiles
public void setBlockAndFailOnWriteSnapFiles(boolean blocked) -
setBlockOnWriteIndexFile
public void setBlockOnWriteIndexFile(boolean blocked) -
blocked
public boolean blocked()
-