Package org.jivesoftware.openfire.pubsub
Class PubSubSubscriptionMaintenance.Analysis
java.lang.Object
org.jivesoftware.openfire.pubsub.PubSubSubscriptionMaintenance.Analysis
- Enclosing class:
- PubSubSubscriptionMaintenance
Read-only assessment of the redundant-row situation. Immutable.
-
Method Summary
Modifier and TypeMethodDescriptionlongdoublelonglongboolean
-
Method Details
-
getTotalRows
public long getTotalRows()- Returns:
- the total number of rows currently in the table.
-
getDistinctSubscriptions
public long getDistinctSubscriptions()- Returns:
- the number of distinct logical subscriptions (rows remaining after cleanup).
-
getRemovableRows
public long getRemovableRows()- Returns:
- the number of rows that cleanup would remove.
-
isCleanupRecommended
public boolean isCleanupRecommended()- Returns:
- true if cleanup is worthwhile (there is at least one removable row). An admin page can use this to decide whether to show a maintenance alert.
-
getRedundancyRatio
public double getRedundancyRatio()- Returns:
- the fraction of the table that is redundant, in the range [0.0, 1.0]; 0.0 when the table is empty. Useful for phrasing the alert (e.g. "84% of rows are redundant").
-