Package com.exedio.cope.pattern
Class Dispatcher
java.lang.Object
com.exedio.cope.Feature
com.exedio.cope.Pattern
com.exedio.cope.pattern.Dispatcher
- All Implemented Interfaces:
Serializable
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
static enum
static final class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondefaultPendingTo
(boolean defaultConstant) <P extends Item & Dispatchable>
intdispatch
(Class<P> parentClass, Dispatcher.Config config, Interrupter interrupter) Deprecated.<P extends Item & Dispatchable>
voiddispatch
(Class<P> parentClass, Dispatcher.Config config, JobContext ctx) <P extends Item & Dispatchable>
voiddispatch
(Class<P> parentClass, Dispatcher.Config config, Runnable probe, JobContext ctx) getFailures
(Item item) getLastSuccessDate
(Item item) getLastSuccessElapsed
(Item item) getRunParent
(Class<P> parentClass) PartOf<?>
boolean
boolean
protected void
onMount()
Here you can do additional initialization not yet done in the constructor.void
purge
(DispatcherPurgeProperties properties, Condition restriction, JobContext ctx) void
purge
(DispatcherPurgeProperties properties, JobContext ctx) void
setNoPurge
(Item item, boolean noPurge) void
setPending
(Item item, boolean pending) Disablespurge(DispatcherPurgeProperties, JobContext)
functionality.DisablesDispatcher.Run.getRemaining()
andDispatcher.Run.getLimit()
fields.Methods inherited from class com.exedio.cope.Pattern
addSource, addSource, addSource, addSource, addSourceFeature, addSourceFeature, addSourceFeature, annotationField, equals, getGeneratedTypes, getSourceFeatures, getSourceFeaturesGather, getSourceFields, getSources, getSourceTypes, getType, hashCode, initialize, newSourceType, newSourceType, newSourceType, newSourceType, newSourceType, newSourceType, newType, newType, registerSource
Methods inherited from class com.exedio.cope.Feature
afterModelCreated, getAbstractType, getAnnotation, getID, getLocalizationKeys, getName, getPattern, isAnnotationPresent, isSourceAlready, mount, readResolve, requireMounted, toString, toString, writeReplace
-
Constructor Details
-
Dispatcher
public Dispatcher()
-
-
Method Details
-
defaultPendingTo
-
withoutPurge
Disablespurge(DispatcherPurgeProperties, JobContext)
functionality. Avoids additional columns in database needed for purge functionality. Additionally disables resetting failureLimit on unpend. -
withoutRemaining
DisablesDispatcher.Run.getRemaining()
andDispatcher.Run.getLimit()
fields. Avoids additional columns in database. -
onMount
protected void onMount()Description copied from class:Pattern
Here you can do additional initialization not yet done in the constructor. In this method you can call methodsPattern.getType()
andFeature.getName()
for the first time. -
getPending
-
getNoPurge
-
getUnpendSuccess
-
getUnpendDate
-
getRunParent
-
getRunRuns
-
getRunDate
-
getRunElapsed
-
getRunRemaining
-
getRunLimit
-
getRunResult
-
getRunFailure
-
getRunType
-
dispatch
public <P extends Item & Dispatchable> void dispatch(@Nonnull Class<P> parentClass, @Nonnull Dispatcher.Config config, @Nonnull JobContext ctx) -
dispatch
public <P extends Item & Dispatchable> void dispatch(@Nonnull Class<P> parentClass, @Nonnull Dispatcher.Config config, @Nonnull Runnable probe, @Nonnull JobContext ctx) -
isPending
-
setPending
-
isNoPurge
-
setNoPurge
-
getLastSuccessDate
-
getLastSuccessElapsed
-
getRuns
-
getFailures
-
purge
- Throws:
IllegalArgumentException
- if purge is disabled bywithoutPurge()
.
-
purge
public void purge(@Nonnull DispatcherPurgeProperties properties, @Nonnull Condition restriction, @Nonnull JobContext ctx) - Throws:
IllegalArgumentException
- if purge is disabled bywithoutPurge()
.
-
dispatch
@Deprecated public <P extends Item & Dispatchable> int dispatch(@Nonnull Class<P> parentClass, @Nonnull Dispatcher.Config config, @Nullable Interrupter interrupter) Deprecated.Usedispatch(Class,Config,JobContext)
instead.- Returns:
- the number of successfully dispatched items
-
dispatch(Class,Config,JobContext)
instead.