Package org.nuxeo.ecm.core.event.impl
Class PostCommitEventExecutor
- java.lang.Object
-
- org.nuxeo.ecm.core.event.impl.PostCommitEventExecutor
-
public class PostCommitEventExecutor extends Object
Executor that passes an event bundle to post-commit asynchronous listeners (in a separated thread in order to manage transactions).Allows a bulk mode where transaction management is not per-listener done once for the whole set of listeners.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
PostCommitEventExecutor.EventBundleBulkRunner
Lets the listeners process the event bundle in bulk mode.protected static class
PostCommitEventExecutor.EventBundleRunner
Lets the listeners process the event bundle.
-
Field Summary
Fields Modifier and Type Field Description static String
BULK_TIMEOUT_PROP
static String
DEFAULT_BULK_TIMEOUT_S
static int
DEFAULT_TIMEOUT_MS
static int
DEFAULT_TIMEOUT_TEST_MS
protected ExecutorService
executor
static String
TIMEOUT_MS_PROP
-
Constructor Summary
Constructors Constructor Description PostCommitEventExecutor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
getDefaultTimeoutMs()
void
run(List<EventListenerDescriptor> listeners, EventBundle event)
void
run(List<EventListenerDescriptor> listeners, EventBundle bundle, long timeoutMillis, boolean bulk)
void
runBulk(List<EventListenerDescriptor> listeners, EventBundle event)
void
shutdown(long timeoutMillis)
-
-
-
Field Detail
-
TIMEOUT_MS_PROP
public static final String TIMEOUT_MS_PROP
- See Also:
- Constant Field Values
-
DEFAULT_TIMEOUT_MS
public static final int DEFAULT_TIMEOUT_MS
- See Also:
- Constant Field Values
-
DEFAULT_TIMEOUT_TEST_MS
public static final int DEFAULT_TIMEOUT_TEST_MS
- See Also:
- Constant Field Values
-
DEFAULT_BULK_TIMEOUT_S
public static final String DEFAULT_BULK_TIMEOUT_S
- See Also:
- Constant Field Values
-
BULK_TIMEOUT_PROP
public static final String BULK_TIMEOUT_PROP
- See Also:
- Constant Field Values
-
executor
protected final ExecutorService executor
-
-
Method Detail
-
getDefaultTimeoutMs
protected int getDefaultTimeoutMs()
-
shutdown
public void shutdown(long timeoutMillis) throws InterruptedException
- Throws:
InterruptedException
-
run
public void run(List<EventListenerDescriptor> listeners, EventBundle event)
-
runBulk
public void runBulk(List<EventListenerDescriptor> listeners, EventBundle event)
-
run
public void run(List<EventListenerDescriptor> listeners, EventBundle bundle, long timeoutMillis, boolean bulk)
-
-