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 -
Method Summary
Modifier and TypeMethodDescriptionvoidclearStoreVersionState(String topicName) This will clear all metadata, including store-version state and partition states, tied to .computeStoreVersionState(String topicName, Function<StoreVersionState, StoreVersionState> mapFunction) getStoreVersionState(String topicName) Gets the currently-persistedStoreVersionStatefor this topic.Methods inherited from class com.linkedin.venice.offsets.InMemoryOffsetManager
clearOffset, getLastOffset, putMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.linkedin.venice.offsets.OffsetManager
clearOffset, getLastOffset, putMethods inherited from interface com.linkedin.davinci.storage.StorageMetadataService
getStoreVersionCompressionDictionary
-
Constructor Details
-
InMemoryStorageMetadataService
public InMemoryStorageMetadataService()
-
-
Method Details
-
computeStoreVersionState
public StoreVersionState computeStoreVersionState(String topicName, Function<StoreVersionState, StoreVersionState> mapFunction) throws VeniceException- Specified by:
computeStoreVersionStatein interfaceStorageMetadataService- Throws:
VeniceException
-
clearStoreVersionState
Description copied from interface:StorageMetadataServiceThis will clear all metadata, including store-version state and partition states, tied to .- Specified by:
clearStoreVersionStatein interfaceStorageMetadataService- Parameters:
topicName- to be cleared
-
getStoreVersionState
Description copied from interface:StorageMetadataServiceGets the currently-persistedStoreVersionStatefor this topic.- Specified by:
getStoreVersionStatein interfaceStorageMetadataService- Parameters:
topicName- kafka topic to which the consumer thread is registered to.- Returns:
- an instance of
StoreVersionStatecorresponding to this topic, or null if there isn't any. - Throws:
VeniceException
-