Package cn.boboweike.carrot.server
Class BackgroundTaskServer
- java.lang.Object
-
- cn.boboweike.carrot.server.BackgroundTaskServer
-
- All Implemented Interfaces:
BackgroundTaskServerMBean
public class BackgroundTaskServer extends Object implements BackgroundTaskServerMBean
-
-
Field Summary
Fields Modifier and Type Field Description static IntegerNO_PARTITION
-
Constructor Summary
Constructors Constructor Description BackgroundTaskServer(PartitionedStorageProvider storageProvider)BackgroundTaskServer(PartitionedStorageProvider storageProvider, TaskActivator taskActivator)BackgroundTaskServer(PartitionedStorageProvider storageProvider, TaskActivator taskActivator, BackgroundTaskServerConfiguration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BackgroundTaskServerConfigurationgetConfiguration()DashboardNotificationManagergetDashboardNotificationManager()UUIDgetId()IntegergetPartition()BackgroundTaskServerStatusgetServerStatus()PartitionedStorageProvidergetStorageProvider()TaskDefaultFiltersgetTaskFilters()TaskZooKeepergetTaskZooKeeper()WorkDistributionStrategygetWorkDistributionStrategy()booleanisAnnounced()booleanisRunning()booleanisStoppingOrStopped()booleanisUnAnnounced()voidpauseProcessing()voidresumeProcessing()voidsetTaskFilters(List<TaskFilter> taskFilters)voidstart()voidstart(boolean guard)voidstop()
-
-
-
Field Detail
-
NO_PARTITION
public static final Integer NO_PARTITION
-
-
Constructor Detail
-
BackgroundTaskServer
public BackgroundTaskServer(PartitionedStorageProvider storageProvider)
-
BackgroundTaskServer
public BackgroundTaskServer(PartitionedStorageProvider storageProvider, TaskActivator taskActivator)
-
BackgroundTaskServer
public BackgroundTaskServer(PartitionedStorageProvider storageProvider, TaskActivator taskActivator, BackgroundTaskServerConfiguration configuration)
-
-
Method Detail
-
getId
public UUID getId()
- Specified by:
getIdin interfaceBackgroundTaskServerMBean
-
start
public void start()
- Specified by:
startin interfaceBackgroundTaskServerMBean
-
start
public void start(boolean guard)
-
pauseProcessing
public void pauseProcessing()
- Specified by:
pauseProcessingin interfaceBackgroundTaskServerMBean
-
resumeProcessing
public void resumeProcessing()
- Specified by:
resumeProcessingin interfaceBackgroundTaskServerMBean
-
stop
public void stop()
- Specified by:
stopin interfaceBackgroundTaskServerMBean
-
isAnnounced
public boolean isAnnounced()
-
isUnAnnounced
public boolean isUnAnnounced()
-
getPartition
public Integer getPartition()
-
isRunning
public boolean isRunning()
- Specified by:
isRunningin interfaceBackgroundTaskServerMBean
-
getServerStatus
public BackgroundTaskServerStatus getServerStatus()
- Specified by:
getServerStatusin interfaceBackgroundTaskServerMBean
-
getTaskZooKeeper
public TaskZooKeeper getTaskZooKeeper()
-
getStorageProvider
public PartitionedStorageProvider getStorageProvider()
-
getConfiguration
public BackgroundTaskServerConfiguration getConfiguration()
-
getDashboardNotificationManager
public DashboardNotificationManager getDashboardNotificationManager()
-
getWorkDistributionStrategy
public WorkDistributionStrategy getWorkDistributionStrategy()
-
setTaskFilters
public void setTaskFilters(List<TaskFilter> taskFilters)
-
getTaskFilters
public TaskDefaultFilters getTaskFilters()
-
isStoppingOrStopped
public boolean isStoppingOrStopped()
-
-