public abstract class MsgRepository<T> extends Object implements MsgRepositoryIfc
| Modifier and Type | Class and Description |
|---|---|
class |
MsgRepository.BroadcastMsg |
static class |
MsgRepository.MSG_TYPES |
protected class |
MsgRepository.MsgDBItem |
static interface |
MsgRepository.OfflineMessagesProcessor |
Repository.Meta| Modifier and Type | Field and Description |
|---|---|
protected Map<String,MsgRepository.BroadcastMsg> |
broadcastMessages |
protected long |
broadcastMessagesLastCleanup |
protected long |
earliestOffline |
protected DelayQueue<MsgRepository.MsgDBItem> |
expiredQueue |
protected static int |
MAX_QUEUE_SIZE |
static String |
MSGS_STORE_LIMIT_KEY |
static long |
MSGS_STORE_LIMIT_VAL |
protected tigase.xml.SimpleParser |
parser |
| Constructor and Description |
|---|
MsgRepository() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
deleteMessage(T db_id) |
abstract int |
deleteMessagesToJID(List<String> db_ids,
tigase.xmpp.JID to) |
String |
dumpBroadcastMessageKeys() |
protected abstract void |
ensureBroadcastMessageRecipient(String id,
tigase.xmpp.BareJID recipient) |
Collection<MsgRepository.BroadcastMsg> |
getBroadcastMessages() |
MsgRepository.BroadcastMsg |
getBroadcastMsg(String id) |
static MsgRepositoryIfc |
getInstance(String cls,
String id_string) |
tigase.xml.Element |
getMessageExpired(long time,
boolean delete)
Loads head of the payloads queue which holds items that would be expired after
stated time with an option to delete them from repository after being
retrieved.
|
abstract Map<MsgRepository.MSG_TYPES,Long> |
getMessagesCount(tigase.xmpp.JID to) |
abstract List<tigase.xml.Element> |
getMessagesList(tigase.xmpp.JID to) |
String |
getStanzaTo() |
protected abstract void |
insertBroadcastMessage(String id,
tigase.xml.Element msg,
Date expire,
tigase.xmpp.BareJID recipient) |
protected abstract void |
loadExpiredQueue(Date expired) |
protected abstract void |
loadExpiredQueue(int max) |
abstract void |
loadMessagesToBroadcast() |
abstract Queue<tigase.xml.Element> |
loadMessagesToJID(List<String> db_ids,
tigase.xmpp.JID to,
boolean delete,
MsgRepository.OfflineMessagesProcessor proc) |
boolean |
updateBroadcastMessage(String id,
tigase.xml.Element msg,
Date expire,
tigase.xmpp.BareJID recipient) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitloadMessagesToJID, storeMessageinitRepositorypublic static final long MSGS_STORE_LIMIT_VAL
public static final String MSGS_STORE_LIMIT_KEY
protected static final int MAX_QUEUE_SIZE
protected tigase.xml.SimpleParser parser
protected long earliestOffline
protected DelayQueue<MsgRepository.MsgDBItem> expiredQueue
protected long broadcastMessagesLastCleanup
protected Map<String,MsgRepository.BroadcastMsg> broadcastMessages
public static MsgRepositoryIfc getInstance(String cls, String id_string) throws TigaseDBException
TigaseDBExceptionprotected abstract void loadExpiredQueue(int max)
protected abstract void loadExpiredQueue(Date expired)
protected abstract void deleteMessage(T db_id)
public abstract void loadMessagesToBroadcast()
protected abstract void ensureBroadcastMessageRecipient(String id, tigase.xmpp.BareJID recipient)
protected abstract void insertBroadcastMessage(String id, tigase.xml.Element msg, Date expire, tigase.xmpp.BareJID recipient)
public abstract Map<MsgRepository.MSG_TYPES,Long> getMessagesCount(tigase.xmpp.JID to) throws UserNotFoundException
UserNotFoundExceptionpublic abstract List<tigase.xml.Element> getMessagesList(tigase.xmpp.JID to) throws UserNotFoundException
UserNotFoundExceptionpublic abstract Queue<tigase.xml.Element> loadMessagesToJID(List<String> db_ids, tigase.xmpp.JID to, boolean delete, MsgRepository.OfflineMessagesProcessor proc) throws UserNotFoundException
UserNotFoundExceptionpublic abstract int deleteMessagesToJID(List<String> db_ids, tigase.xmpp.JID to) throws UserNotFoundException
UserNotFoundExceptionpublic MsgRepository.BroadcastMsg getBroadcastMsg(String id)
public String dumpBroadcastMessageKeys()
public Collection<MsgRepository.BroadcastMsg> getBroadcastMessages()
public boolean updateBroadcastMessage(String id, tigase.xml.Element msg, Date expire, tigase.xmpp.BareJID recipient)
public tigase.xml.Element getMessageExpired(long time,
boolean delete)
MsgRepositoryIfcgetMessageExpired in interface MsgRepositoryIfctime - time in milliseconds representing time after which given
message would be considered as expireddelete - boolean parameter controlling whether messages should be
removed from repository after they retrieved.public String getStanzaTo()
Copyright © 2016 "Tigase, Inc.". All rights reserved.