Package com.github.ambry.notification
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 Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
onBlobCreated(java.lang.String blobId, BlobProperties blobProperties, Account account, Container container, NotificationBlobType notificationBlobType)
Notifies the underlying system when a new blob is createdvoid
onBlobDeleted(java.lang.String blobId, java.lang.String serviceId, Account account, Container container)
Notifies the underlying system when an existing blob is deletedvoid
onBlobReplicaCreated(java.lang.String sourceHost, int port, java.lang.String blobId, BlobReplicaSourceType sourceType)
Notifies the underlying system when a blob is replicated to a nodevoid
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 nodedefault 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.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 nodevoid
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 updateddefault void
onBlobUndeleted(java.lang.String blobId, java.lang.String serviceId, Account account, Container container)
Notifies the underlying system when the blob is undeleted.
-
-
-
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 createdblobProperties
- The blob properties for the blobaccount
- TheAccount
for the blobcontainer
- TheContainer
for the blobnotificationBlobType
- TheNotificationBlobType
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
-
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
-
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.
-
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 invokedport
- The port of the source host from where the notification is being invoked.blobId
- The id of the blob that has been replicatedsourceType
- 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 invokedport
- The port of the source host from where the notification is being invoked.blobId
- The id of the blob whose deleted state has been replicatedsourceType
- 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 invokedport
- The port of the source host from where the notification is being invoked.blobId
- The id of the blob whose updated state has been replicatedsourceType
- The source that updated the blob replicaupdateType
- the type of updateinfo
- theMessageInfo
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 invokedport
- The port of the source host from where the notification is being invoked.blobId
- The id of the blob whose undeleted state has been replicatedsourceType
- The source that undeleted the blob replica
-
-