@Override
        public void writeExternal(ObjectOutput out) throws IOException {
            ExternalizableUtil.getInstance().writeLong(out, history.size());
            for (final Message packet : history) {
                ExternalizableUtil.getInstance().writeSerializable(out, (DefaultElement) packet.getElement());
            }
        }
A wrapper for a collection of Message instances that is cached.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/HistoryStrategy.java