Package org.nuxeo.ecm.core.event.impl
Class EventBundleImpl
java.lang.Object
org.nuxeo.ecm.core.event.impl.EventBundleImpl
- All Implemented Interfaces:
Serializable,Iterable<Event>,EventBundle
- Author:
- Bogdan Stefanescu
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsEventName(String eventName) Check is bundle contains the specified event.getName()Gets the bundle name.Returns the VMID of the JVM where the bundle was created.booleanTests whether or not this event bundle was created on a remote machine.booleanisEmpty()Tests whether or not this bundle is empty.iterator()peek()Gets the first event in that bundle.voidAdds an event in that bundle at the end of the list.intsize()Gets the size of that bundle.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
vmid
-
events
-
eventNames
-
-
Constructor Details
-
EventBundleImpl
-
EventBundleImpl
public EventBundleImpl()
-
-
Method Details
-
hasRemoteSource
public boolean hasRemoteSource()Description copied from interface:EventBundleTests whether or not this event bundle was created on a remote machine.- Specified by:
hasRemoteSourcein interfaceEventBundle- Returns:
- true if the event bundle was fired from a remote machine, false otherwise
-
getName
Description copied from interface:EventBundleGets the bundle name.This is usually the first event repository name in the bundle but the implementation may decide to change this behavior.
- Specified by:
getNamein interfaceEventBundle- Returns:
- the bundle name. Can be null only if the bundle is empty.
-
isEmpty
public boolean isEmpty()Description copied from interface:EventBundleTests whether or not this bundle is empty.- Specified by:
isEmptyin interfaceEventBundle
-
peek
Description copied from interface:EventBundleGets the first event in that bundle.- Specified by:
peekin interfaceEventBundle- Returns:
- the first event. Can be null if the bundle is empty
-
push
Description copied from interface:EventBundleAdds an event in that bundle at the end of the list.The bundle implementation must ignore redundant events and events marked as inline.
- Specified by:
pushin interfaceEventBundle- Parameters:
event- the event to append.
-
size
public int size()Description copied from interface:EventBundleGets the size of that bundle.- Specified by:
sizein interfaceEventBundle- Returns:
- the number of events in that bundle
-
iterator
-
getSourceVMID
Description copied from interface:EventBundleReturns the VMID of the JVM where the bundle was created.- Specified by:
getSourceVMIDin interfaceEventBundle
-
containsEventName
Description copied from interface:EventBundleCheck is bundle contains the specified event.- Specified by:
containsEventNamein interfaceEventBundle
-