@Override
            public void run() {
                try {
                    if (ClusterManager.isClusteringStarted())
                    {
                        if (ClusterManager.isSeniorClusterMember())
                        {
                            if (deleteOldOfflineMessagesFromDB())
                            {
                                readSizeForAllUsers();
                            }
                        }
                    }
                    else
                    {
                        if (deleteOldOfflineMessagesFromDB())
                        {
                            readSizeForAllUsers();
                        }
                    }
                } catch (Exception e) {
                    Log.error("Offline message cleaning - Could not set timer for check interval!", e);
                }
            }
Decide whether a message should be stored offline according to XEP-0160 and XEP-0334.

@param message The message to evaluate. Cannot be null.
@return <code>true</code> if the message should be stored offline, <code>false</code> otherwise.
xmppserver/src/main/java/org/jivesoftware/openfire/OfflineMessageStore.java