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 TypeMethodDescriptionvoid
add
(org.xmpp.packet.Message packet, HistoryStrategy.Type strategyType, int strategyMaxNumber) Queue<org.xmpp.packet.Message>
boolean
int
Returns the approximate size of the Object in bytes.int
hashCode()
void
toString()
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: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
-
toString
-
equals
-
hashCode
public int hashCode() -
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-