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 voidadd(org.xmpp.packet.Message packet, HistoryStrategy.Type strategyType, int strategyMaxNumber)Queue<org.xmpp.packet.Message>asCollection()booleanequals(Object o)intgetCachedSize()Returns the approximate size of the Object in bytes.inthashCode()voidreadExternal(ObjectInput in)StringtoString()voidwriteExternal(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 CannotCalculateSizeExceptionDescription copied from interface:CacheableReturns 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:
getCachedSizein 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:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
-