Package org.jivesoftware.openfire.muc
Class HistoryStrategy.Messages
- java.lang.Object
-
- org.jivesoftware.openfire.muc.HistoryStrategy.Messages
-
- All Implemented Interfaces:
Externalizable
,Serializable
,Cacheable
- Enclosing class:
- HistoryStrategy
public static class HistoryStrategy.Messages extends Object implements Cacheable, Externalizable
A wrapper for a collection of Message instances that is cached.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Messages()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(org.xmpp.packet.Message packet, HistoryStrategy.Type strategyType, int strategyMaxNumber)
Queue<org.xmpp.packet.Message>
asCollection()
boolean
equals(Object o)
int
getCachedSize()
Returns the approximate size of the Object in bytes.int
hashCode()
void
readExternal(ObjectInput in)
String
toString()
void
writeExternal(ObjectOutput out)
-
-
-
Method Detail
-
add
public void add(org.xmpp.packet.Message packet, HistoryStrategy.Type strategyType, int strategyMaxNumber)
-
asCollection
public Queue<org.xmpp.packet.Message> asCollection()
-
getCachedSize
public int getCachedSize() throws CannotCalculateSizeException
Description copied from interface:Cacheable
Returns the approximate size of the Object in bytes. The size should be considered to be a best estimate of how much memory the Object occupies and may be based on empirical trials or dynamic calculations.- Specified by:
getCachedSize
in interfaceCacheable
- Returns:
- the size of the Object in bytes.
- Throws:
CannotCalculateSizeException
- if the size cannot be calculated
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
-