Class BmEvent


  • public final class BmEvent
    extends Object
    BM events contain information about all the modifications (represented by sub-events) performed within a transaction. Note that all the collections and maps returned by the methods of this class are for read-access only. In case of a modification attempt the behaviour is not defined.
    See Also:
    BmSubEvent
    • Constructor Detail

      • BmEvent

        public BmEvent​(long timestamp,
                       Object operationId,
                       Object serviceId,
                       BmAssociationEvent associationEvent,
                       IBmLongMap<BmChangeEvent> changeEvents,
                       List<BmResolvedEvent> resolvedEvents)
        Constructs a new instance with the given parameters.
        Parameters:
        timestamp - logical timestamp allowing at least partial ordering of events. Any two events can be ordered in case they were generated in transactions that affected overlapped sets of resources.
        operationId - The ID of the operation specified on the transaction creation. May be null.
        serviceId - The ID of the service specified on the transaction creation. May be null.
        associationEvent - The sub-event containing information about associated and deassociated objects. May be null.
        changeEvents - A map where keys are identifiers of the modified objects and the values are the sub-events representing the corresponding object changes. May be null.
        resolvedEvents - The sub-events containing information about resolved and unresolved URIs. May be null.
    • Method Detail

      • getTimestamp

        public long getTimestamp()
        Gets timestamp.
        Returns:
        logical timestamp allowing at least partial ordering of events. Any two events can be ordered in case they were generated in transactions that affected overlapped sets of resources.
      • getOperationId

        public Object getOperationId()
        Gets the ID of the operation specified on the transaction creation.
        Returns:
        the ID of the operation or null.
      • getServiceId

        public Object getServiceId()
        Gets the ID of the service specified on the transaction creation.
        Returns:
        the ID of the service or null.
      • getAssociationEvent

        public BmAssociationEvent getAssociationEvent()
        Gets a sub-event representing associations and deassociations.
        Returns:
        the sub-event or null.
      • getChangeEvents

        public IBmLongMap<BmChangeEvent> getChangeEvents()
        Gets sub-events representing changes.
        Returns:
        a map where keys are identifiers of the modified objects and the values are the sub-events representing the corresponding object changes or null.
      • getResolvedEvents

        public List<BmResolvedEvent> getResolvedEvents()
        Gets sub-events representing URI (un)resolutions.
        Returns:
        the sub-events or null.