Class PepysActivityObserverConnector

All Implemented Interfaces:
AuditLoggingComponent, SecureConnectorExtension, VirtualConnectorExtension, CatalogTargetFactory, IntegrationConnector, OpenMetadataTopicListener

public class PepysActivityObserverConnector extends DynamicIntegrationConnectorBase implements OpenMetadataTopicListener
PepysActivityObserverConnector keeps a diary of the activity around the anchor elements (assets, digital products and glossary terms) in the open metadata ecosystem, in the manner of Samuel Pepys. Its catalog targets are the topics that the OMAG Servers write their audit logs to (registered by the OMAG Server Platform Cataloguer). It listens to each of them for the anchor element activity messages (METADATA-OBSERVABILITY-0002 to -0009 and -0011) and maintains the separate counts in the UsageActivity classification of the anchor element named in each message.

The activity is gathered in memory as the records arrive and written on each refresh, so an element that is busy costs one read and one update per refresh rather than one per record. Counts that could not be written are kept and tried again on the next refresh.

The connector's own reads and updates of the anchor elements are reported in the audit log too, and they are ignored - otherwise each update of a UsageActivity classification would be counted as more activity, without end.