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
A wrapper for a collection of Message instances that is cached.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(org.xmpp.packet.Message packet, HistoryStrategy.Type strategyType, int strategyMaxNumber) Queue<org.xmpp.packet.Message>booleanintReturns the approximate size of the Object in bytes.inthashCode()voidtoString()void
-
Constructor Details
-
Messages
public Messages()
-
-
Method Details
-
add
public void add(org.xmpp.packet.Message packet, HistoryStrategy.Type strategyType, int strategyMaxNumber) -
asCollection
-
getCachedSize
Description 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
-
toString
-
equals
-
hashCode
public int hashCode() -
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-