Interface NotificationSystem

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable

    public interface NotificationSystem
    extends java.io.Closeable
    A pluggable notification interface that is used to notify any external system about the server operations. The implementation of the APIs should be fast and preferably non blocking
    • Method Detail

      • onBlobCreated

        void onBlobCreated​(java.lang.String blobId,
                           BlobProperties blobProperties,
                           Account account,
                           Container container,
                           NotificationBlobType notificationBlobType)
        Notifies the underlying system when a new blob is created
        Parameters:
        blobId - The id of the blob that was created
        blobProperties - The blob properties for the blob
        account - The Account for the blob
        container - The Container for the blob
        notificationBlobType - The NotificationBlobType of this blob.
      • onBlobTtlUpdated

        void onBlobTtlUpdated​(java.lang.String blobId,
                              java.lang.String serviceId,
                              long expiresAtMs,
                              Account account,
                              Container container)
        Notifies the underlying system when the ttl of an existing blob is updated
        Parameters:
        blobId - The id of the blob whose ttl was updated
        serviceId - The service ID of the service that updated the tll of the blob. This can be null if unknown
        expiresAtMs - The new expiry time (in ms) of the blob
        account - The Account for the blob
        container - The Container for the blob
      • onBlobDeleted

        void onBlobDeleted​(java.lang.String blobId,
                           java.lang.String serviceId,
                           Account account,
                           Container container)
        Notifies the underlying system when an existing blob is deleted
        Parameters:
        blobId - The id of the blob that was deleted
        serviceId - The service ID of the service deleting the blob. This can be null if unknown.
        account - The Account for the blob
        container - The Container for the blob
      • onBlobUndeleted

        default void onBlobUndeleted​(java.lang.String blobId,
                                     java.lang.String serviceId,
                                     Account account,
                                     Container container)
        Notifies the underlying system when the blob is undeleted.
        Parameters:
        blobId - The id of the blob whose undeleted state has been replicated
        serviceId - The service ID of the service undeleting the blob. This can be null if unknown.
        account - The Account for the blob
        container - The Container for the blob
      • onBlobReplicaCreated

        void onBlobReplicaCreated​(java.lang.String sourceHost,
                                  int port,
                                  java.lang.String blobId,
                                  BlobReplicaSourceType sourceType)
        Notifies the underlying system when a blob is replicated to a node
        Parameters:
        sourceHost - The source host from where the notification is being invoked
        port - The port of the source host from where the notification is being invoked.
        blobId - The id of the blob that has been replicated
        sourceType - The source that created the blob replica
      • onBlobReplicaDeleted

        void onBlobReplicaDeleted​(java.lang.String sourceHost,
                                  int port,
                                  java.lang.String blobId,
                                  BlobReplicaSourceType sourceType)
        Notifies the underlying system when a deleted state of a blob is replicated to a node
        Parameters:
        sourceHost - The source host from where the notification is being invoked
        port - The port of the source host from where the notification is being invoked.
        blobId - The id of the blob whose deleted state has been replicated
        sourceType - The source that deleted the blob replica
      • onBlobReplicaUpdated

        void onBlobReplicaUpdated​(java.lang.String sourceHost,
                                  int port,
                                  java.lang.String blobId,
                                  BlobReplicaSourceType sourceType,
                                  UpdateType updateType,
                                  MessageInfo info)
        Notifies the underlying system when a updated state of a blob is replicated to a node
        Parameters:
        sourceHost - The source host from where the notification is being invoked
        port - The port of the source host from where the notification is being invoked.
        blobId - The id of the blob whose updated state has been replicated
        sourceType - The source that updated the blob replica
        updateType - the type of update
        info - the MessageInfo associated with the update
      • onBlobReplicaUndeleted

        default void onBlobReplicaUndeleted​(java.lang.String sourceHost,
                                            int port,
                                            java.lang.String blobId,
                                            BlobReplicaSourceType sourceType)
        Notifies the underlying system when a undeleted state of a blob is replicated to a node.
        Parameters:
        sourceHost - The source host from where the notification is being invoked
        port - The port of the source host from where the notification is being invoked.
        blobId - The id of the blob whose undeleted state has been replicated
        sourceType - The source that undeleted the blob replica