Class NotificationHistoryStore
java.lang.Object
ecmwf.common.database.NotificationHistoryStore
Persistent notification history. The singleton state row serializes all writers and retention.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordstatic final record -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidappend(String destination, String target, String event, long retentionMillis, long maxBytes, NotificationOutboxStore.Request outbox) voidappendWithTransfer(DataTransfer transfer, DataTransfer expected, String event, long retentionMillis, long maxBytes, NotificationOutboxStore.Request outbox) Commit a staged transfer only if its persisted fields still match a separate, unchanged snapshot.voidappendWithTransfer(DataTransfer transfer, String event, long retentionMillis, long maxBytes) Commit a transfer update and notification atomically, without checking for stale transfer state.voidappendWithTransfer(DataTransfer transfer, String event, long retentionMillis, long maxBytes, NotificationOutboxStore.Request outbox) booleanappendWithTransferFenced(DataTransfer transfer, DataTransfer expected, String event, long retentionMillis, long maxBytes, NotificationOutboxStore.Request outbox) Commit a transfer update and notification atomically, guarded by its revision and an unchanged snapshot.booleanappendWithTransferFenced(DataTransfer transfer, String event, long retentionMillis, long maxBytes, NotificationOutboxStore.Request outbox) Commit a transfer update and notification atomically, guarded by its persisted revision.checkpoint(String user, String destination, String consumer, String operation, Long sequence, int maxConsumers, long retentionMillis) Read, acknowledge or delete one named checkpoint.longvoidprune(long retentionMillis, long maxBytes) voidpruneCheckpoints(long retentionMillis) Remove a bounded batch of expired checkpoint groups.replayAviso(String destination, long after, Long upper, Long fromTime, Long toTime, int limit, long retentionMillis) Reads one Aviso page in global sequence order with a fixed replay ceiling.void
-
Constructor Details
-
NotificationHistoryStore
-
-
Method Details
-
currentSequence
public long currentSequence() -
append
-
append
public void append(String destination, String target, String event, long retentionMillis, long maxBytes, NotificationOutboxStore.Request outbox) -
appendWithTransfer
public void appendWithTransfer(DataTransfer transfer, String event, long retentionMillis, long maxBytes) Commit a transfer update and notification atomically, without checking for stale transfer state. -
appendWithTransfer
public void appendWithTransfer(DataTransfer transfer, String event, long retentionMillis, long maxBytes, NotificationOutboxStore.Request outbox) -
appendWithTransfer
public void appendWithTransfer(DataTransfer transfer, DataTransfer expected, String event, long retentionMillis, long maxBytes, NotificationOutboxStore.Request outbox) Commit a staged transfer only if its persisted fields still match a separate, unchanged snapshot. This precondition does not fence writes made after this transaction. -
appendWithTransferFenced
public boolean appendWithTransferFenced(DataTransfer transfer, String event, long retentionMillis, long maxBytes, NotificationOutboxStore.Request outbox) Commit a transfer update and notification atomically, guarded by its persisted revision. -
appendWithTransferFenced
public boolean appendWithTransferFenced(DataTransfer transfer, DataTransfer expected, String event, long retentionMillis, long maxBytes, NotificationOutboxStore.Request outbox) Commit a transfer update and notification atomically, guarded by its revision and an unchanged snapshot. -
validateTransferRevisionSchema
public void validateTransferRevisionSchema() -
prune
public void prune(long retentionMillis, long maxBytes) -
checkpoint
-
pruneCheckpoints
public void pruneCheckpoints(long retentionMillis) Remove a bounded batch of expired checkpoint groups. -
replayAviso
public NotificationHistoryStore.Page replayAviso(String destination, long after, Long upper, Long fromTime, Long toTime, int limit, long retentionMillis) Reads one Aviso page in global sequence order with a fixed replay ceiling.
-