Package com.linkedin.venice.offsets
Class InMemoryStorageMetadataService
- java.lang.Object
-
- com.linkedin.venice.offsets.InMemoryOffsetManager
-
- com.linkedin.venice.offsets.InMemoryStorageMetadataService
-
- All Implemented Interfaces:
StorageMetadataService
,OffsetManager
public class InMemoryStorageMetadataService extends InMemoryOffsetManager implements StorageMetadataService
In memory implementation of StorageMetadataService, should really only be used for tests
-
-
Constructor Summary
Constructors Constructor Description InMemoryStorageMetadataService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearStoreVersionState(java.lang.String topicName)
This will clear all metadata, including store-version state and partition states, tied to {@param topicName}.void
computeStoreVersionState(java.lang.String topicName, java.util.function.Function<StoreVersionState,StoreVersionState> mapFunction)
StoreVersionState
getStoreVersionState(java.lang.String topicName)
Gets the currently-persistedStoreVersionState
for this topic.-
Methods inherited from class com.linkedin.venice.offsets.InMemoryOffsetManager
clearOffset, getLastOffset, put
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.linkedin.venice.offsets.OffsetManager
clearOffset, getLastOffset, put
-
Methods inherited from interface com.linkedin.davinci.storage.StorageMetadataService
getStoreVersionCompressionDictionary
-
-
-
-
Method Detail
-
computeStoreVersionState
public void computeStoreVersionState(java.lang.String topicName, java.util.function.Function<StoreVersionState,StoreVersionState> mapFunction) throws VeniceException
- Specified by:
computeStoreVersionState
in interfaceStorageMetadataService
- Throws:
VeniceException
-
clearStoreVersionState
public void clearStoreVersionState(java.lang.String topicName)
Description copied from interface:StorageMetadataService
This will clear all metadata, including store-version state and partition states, tied to {@param topicName}.- Specified by:
clearStoreVersionState
in interfaceStorageMetadataService
- Parameters:
topicName
- to be cleared
-
getStoreVersionState
public StoreVersionState getStoreVersionState(java.lang.String topicName) throws VeniceException
Description copied from interface:StorageMetadataService
Gets the currently-persistedStoreVersionState
for this topic.- Specified by:
getStoreVersionState
in interfaceStorageMetadataService
- Parameters:
topicName
- kafka topic to which the consumer thread is registered to.- Returns:
- an instance of
StoreVersionState
corresponding to this topic, or null if there isn't any. - Throws:
VeniceException
-
-