- /**
- * Does a given stream contain any events?
- *
- * @param id
- * the stream ID
- * @return true if the stream has events.
- */
- public boolean hasEvents(Long id) {
- return eventDecs.containsKey(id);
- }
-
- /**
- * Add an event declaration map to the events map.
- *
- * @param id
- * the id of a stream
- * @return the hashmap containing events.
- * @since 2.0
- */
- public Map<Long, IEventDeclaration> createEvents(Long id) {
- HashMap<Long, IEventDeclaration> value = eventDecs.get(id);
- if (value == null) {
- value = new HashMap<Long, IEventDeclaration>();
- eventDecs.put(id, value);
- }
- return value;
- }
-