Events can be purged from the data store by specifying groups, selectors, or both.
An event consumer or an administrative tool can purge events from the data store using the event access interface. You can purge all of the events from the data store, or you can limit the purge to event groups, event selectors, or both.
int purged = eventAccess.purgeEvents(eventGroup, eventSelector, transactionSize);
The purgeEvents method purges all of the events that match all of the criteria that you specify. If the eventGroup and eventSelector parameters are both null, all of the events in the data store are purged. Events that arrive after the purge operation starts are not purged. The returned value is an integer that specifies how many events were purged.
If the value of the transactionSize parameter exceeds the maximum purge transaction size defined in the data store profile, a PurgeThresholdExceededException exception is thrown and no events are purged. The default maximum purge transaction size is 100 000.
Related concepts
Writing event selectors