Package cn.boboweike.carrot.storage
Class AbstractPartitionedStorageProvider
- java.lang.Object
-
- cn.boboweike.carrot.storage.AbstractPartitionedStorageProvider
-
- All Implemented Interfaces:
PartitionedStorageProvider,AutoCloseable
- Direct Known Subclasses:
InMemoryPartitionedStorageProvider,MongoDBPartitionedStorageProvider
public abstract class AbstractPartitionedStorageProvider extends Object implements PartitionedStorageProvider, AutoCloseable
-
-
Field Summary
-
Fields inherited from interface cn.boboweike.carrot.storage.PartitionedStorageProvider
BATCH_SIZE, DEFAULT_NUM_OF_PARTITIONS, PARTITION_HINT_KEY, PARTITION_PREFIX
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractPartitionedStorageProvider(RateLimiter changeListenerNotificationRateLimit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTaskStorageOnChangeListener(StorageProviderChangeListener listener)voidclose()StringgetName()protected voidnotifyMetadataChangeListeners()protected voidnotifyMetadataChangeListeners(boolean mustNotify)protected voidnotifyTaskStatsOnChangeListeners()protected voidnotifyTaskStatsOnChangeListenersIf(boolean mustNotify)voidremoveTaskStorageOnChangeListener(StorageProviderChangeListener listener)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface cn.boboweike.carrot.storage.PartitionedStorageProvider
announceBackgroundTaskServer, countRecurringTasksByPartition, deleteMetadata, deletePermanentlyByPartition, deleteRecurringTask, deleteTasksPermanentlyByPartition, existsByPartition, extendLockByPartition, getBackgroundTaskServers, getDistinctTaskSignatures, getLongestRunningBackgroundTaskServerId, getMetadata, getMetadata, getRecurringTasks, getRecurringTasksByPartition, getScheduledTasksByPartition, getTaskById, getTaskById, getTaskPageByPartition, getTasksByPartition, getTasksByPartition, getTaskStatsData, getTotalNumOfPartitions, lockByPartition, publishTotalAmountOfSucceededTasks, recurringTaskExistsByPartition, removeTimedOutBackgroundTaskServers, save, save, saveByPartition, saveByPartition, saveMetadata, saveRecurringTask, setPartitioner, setTaskMapper, setUpStorageProvider, signalBackgroundTaskServerAlive, signalBackgroundTaskServerStopped, unlockByPartition
-
-
-
-
Constructor Detail
-
AbstractPartitionedStorageProvider
protected AbstractPartitionedStorageProvider(RateLimiter changeListenerNotificationRateLimit)
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein interfacePartitionedStorageProvider
-
addTaskStorageOnChangeListener
public void addTaskStorageOnChangeListener(StorageProviderChangeListener listener)
- Specified by:
addTaskStorageOnChangeListenerin interfacePartitionedStorageProvider
-
removeTaskStorageOnChangeListener
public void removeTaskStorageOnChangeListener(StorageProviderChangeListener listener)
- Specified by:
removeTaskStorageOnChangeListenerin interfacePartitionedStorageProvider
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfacePartitionedStorageProvider
-
notifyTaskStatsOnChangeListenersIf
protected void notifyTaskStatsOnChangeListenersIf(boolean mustNotify)
-
notifyTaskStatsOnChangeListeners
protected void notifyTaskStatsOnChangeListeners()
-
notifyMetadataChangeListeners
protected void notifyMetadataChangeListeners(boolean mustNotify)
-
notifyMetadataChangeListeners
protected void notifyMetadataChangeListeners()
-
-