public abstract class MessagePersistence
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
MessagePersistence()
Base class constructor for implementations
|
Modifier and Type | Method and Description |
---|---|
abstract void |
delete(java.util.Collection<Message> m)
Delete the given collection of messages from persistent storage.
|
static MessagePersistence |
getInstance()
Get the message persistence instance.
|
static MessagePersistence |
initMessagePersistence(java.lang.Object context)
Initialize the message persistence instance.
|
abstract java.util.List<Message> |
load(java.lang.String endpointId)
Loads the set of persisted messages from disk that belongs to the subsystem identified by endpointId.
|
abstract void |
save(java.util.Collection<Message> m,
java.lang.String endpointId)
Save the given collection of messages to persistent storage.
|
protected MessagePersistence()
public static MessagePersistence initMessagePersistence(java.lang.Object context)
context
- an application context, or null
public static MessagePersistence getInstance()
public abstract void save(java.util.Collection<Message> m, java.lang.String endpointId)
m
- The messages to saveendpointId
- Id of the subsystem that the messages belongs topublic abstract void delete(java.util.Collection<Message> m)
m
- The messages to deletepublic abstract java.util.List<Message> load(java.lang.String endpointId)
endpointId
- Id of the subsystem that the caller want to load messages for