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
INDEX_FILE_PREFIX, INDEX_LATEST_BLOB, latestKnownRepoGen, metadata, METADATA_NAME_FORMAT, METADATA_PREFIX, namedXContentRegistry, SNAPSHOT_CODEC, SNAPSHOT_NAME_FORMAT, SNAPSHOT_PREFIX, snapshotFormat, threadPool
-
Fields inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
lifecycle
-
-
Constructor Summary
Constructors Constructor Description MockRepository(RepositoryMetaData metadata, Environment environment, NamedXContentRegistry namedXContentRegistry, ThreadPool threadPool)
-
Method Summary
Modifier and Type Method Description boolean
blocked()
void
blockOnDataFiles(boolean blocked)
protected BlobStore
createBlobStore()
protected void
doStop()
long
getFailureCount()
void
setBlockAndFailOnWriteSnapFiles(boolean blocked)
void
setBlockOnWriteIndexFile(boolean blocked)
void
unblock()
-
Methods inherited from class org.elasticsearch.repositories.fs.FsRepository
basePath, chunkSize
-
Methods inherited from class org.elasticsearch.repositories.blobstore.BlobStoreRepository
assertSnapshotOrGenericThread, blobContainer, blobStore, cleanup, deleteSnapshot, doClose, doStart, endVerification, finalizeSnapshot, getBlobStore, getMetadata, getRepositoryData, getRestoreThrottleTimeInNanos, getShardSnapshotStatus, getSnapshotGlobalMetaData, getSnapshotIndexMetaData, getSnapshotInfo, getSnapshotThrottleTimeInNanos, initializeSnapshot, isCompress, isReadOnly, restoreShard, snapshotShard, startVerification, threadPool, toString, 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
-
Methods inherited from interface org.elasticsearch.common.lease.Releasable
close
-
Methods inherited from interface org.elasticsearch.repositories.Repository
restoreShard
-
-
-
-
Constructor Detail
-
MockRepository
public MockRepository(RepositoryMetaData metadata, Environment environment, NamedXContentRegistry namedXContentRegistry, ThreadPool threadPool)
-
-
Method Detail
-
getFailureCount
public long getFailureCount()
-
doStop
protected void doStop()
- Overrides:
doStop
in classBlobStoreRepository
-
createBlobStore
protected BlobStore createBlobStore() throws java.lang.Exception
- 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()
-
-