class RepositoryBuilder extends java.lang.Object implements IEventSinkFactory
Modifier and Type | Class and Description |
---|---|
private static class |
RepositoryBuilder.DurationEventTypeEntry |
(package private) static class |
RepositoryBuilder.EventTypeEntry |
private static class |
RepositoryBuilder.InstantEventTypeEntry |
Modifier and Type | Field and Description |
---|---|
private static DisjointBuilder.ArrayFactory<IItem> |
ARRAY_FACTORY |
private java.util.Map<java.lang.String,RepositoryBuilder.EventTypeEntry> |
eventTypes |
private static java.util.logging.Logger |
LOGGER |
Constructor and Description |
---|
RepositoryBuilder() |
Modifier and Type | Method and Description |
---|---|
IEventSink |
create(java.lang.String identifier,
java.lang.String label,
java.lang.String[] category,
java.lang.String description,
java.util.List<ValueField> dataStructure)
Create a new event sink for an event type.
|
private static RepositoryBuilder.EventTypeEntry |
createEventTypeEntry(java.lang.String identifier,
java.lang.String label,
java.lang.String[] category,
java.lang.String description,
java.util.List<ValueField> dataStructure) |
void |
flush()
Called when all events have been sent to the event sinks.
|
java.util.Iterator<RepositoryBuilder.EventTypeEntry> |
getEventTypes() |
private static final java.util.logging.Logger LOGGER
private final java.util.Map<java.lang.String,RepositoryBuilder.EventTypeEntry> eventTypes
private static final DisjointBuilder.ArrayFactory<IItem> ARRAY_FACTORY
public IEventSink create(java.lang.String identifier, java.lang.String label, java.lang.String[] category, java.lang.String description, java.util.List<ValueField> dataStructure)
IEventSinkFactory
The implementation should have a subfactory that has been saved during instantiation with the
IParserExtension.getEventSinkFactory
call.
The create call takes event type metadata which can optionally be modified before calling the
create method of the subfactory to get a subsink. Note that create
may be called
multiple times on the subfactory to set up a case where a single input event type can be
split into multiple output event types.
The returned event sink is used to receive and optionally modify event data. This data is then passed on to the subsink.
Implementations of this method must be thread safe.
create
in interface IEventSinkFactory
identifier
- event type IDlabel
- human readable name for the event typecategory
- a category path for the event typedescription
- human readable description of the event typedataStructure
- metadata for the event fieldsprivate static RepositoryBuilder.EventTypeEntry createEventTypeEntry(java.lang.String identifier, java.lang.String label, java.lang.String[] category, java.lang.String description, java.util.List<ValueField> dataStructure)
public void flush()
IEventSinkFactory
The implementation should have a subfactory. flush
must be called on that just before
returning.
If no flush operations need to be done, then simply call flush on the subfactory.
flush
in interface IEventSinkFactory
public java.util.Iterator<RepositoryBuilder.EventTypeEntry> getEventTypes()