public final class NodeVersionHistoryHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static int |
PURGE_HISTORY_CHUNK |
| Modifier and Type | Method and Description |
|---|---|
static OrphanedVersionHistoryCheckStatus |
checkOrphaned(long maxOrphans,
boolean deleteOrphans,
Writer statusOut)
Triggers the process of orphaned version histories check.
|
static UnusedVersionCheckStatus |
checkUnused(long maxUnused,
boolean deleteUnused,
long purgeOlderThanTimestamp,
Writer statusOut)
Triggers the process of unused versions check.
|
static void |
forceStopOrphanedCheck()
Forces stop of the orphaned version history check process if it is currently running.
|
static void |
forceStopUnusedCheck()
Forces stop of the unused versions check process if it is currently running.
|
static boolean |
isCheckingOrphans()
Returns
true if the process for checking orphans is currently running. |
static boolean |
isCheckingUnused()
Returns
true if the process for checking unused versions is currently running. |
static VersionHistoryCheckStatus |
purgeVersionHistoryForNodes(javax.jcr.NodeIterator nodes,
Writer statusOut)
Performs the removal of unused versions for the specified nodes.
|
static VersionHistoryCheckStatus |
purgeVersionHistoryForNodes(Set<String> nodeIdentifiers)
Performs the removal of unused versions for the specified nodes.
|
static VersionHistoryCheckStatus |
purgeVersionHistoryForNodes(Set<String> nodeIdentifiers,
Writer statusOut)
Performs the removal of unused versions for the specified nodes.
|
public static OrphanedVersionHistoryCheckStatus checkOrphaned(long maxOrphans, boolean deleteOrphans, Writer statusOut) throws javax.jcr.RepositoryException
deleteOrphans is set to true also performs
the purge of found orphaned version histories.
This method ensures that only one check process runs at a time.maxOrphans - the maximum number of orphaned histories found at which the process is stoppeddeleteOrphans - if set to true performs the purge of found orphaned version histories; in case of false only the
found orphaned version history count is reported, but no removal is donestatusOut - a writer to log current processing status intojavax.jcr.RepositoryException - in case of JCR errorspublic static UnusedVersionCheckStatus checkUnused(long maxUnused, boolean deleteUnused, long purgeOlderThanTimestamp, Writer statusOut) throws javax.jcr.RepositoryException
deleteUnused is set to true also performs the purge
of found unused versions.
This method ensures that only one check process runs at a time.maxUnused - the maximum number of unused versions found at which the process is stoppeddeleteUnused - if set to true performs the purge of found unused versions; in case of false only the found
unused versions count is reported, but no removal is donepurgeOlderThanTimestamp - if positive value is provided checks that the unused versions are older than the specified date (timestamp in milliseconds
UTC); if 0 value is provided all found unused versions are considered in the processstatusOut - a writer to log current processing status intojavax.jcr.RepositoryException - in case of JCR errorspublic static void forceStopOrphanedCheck()
public static void forceStopUnusedCheck()
public static boolean isCheckingOrphans()
true if the process for checking orphans is currently running.true if the process for checking orphans is currently running; false otherwisepublic static boolean isCheckingUnused()
true if the process for checking unused versions is currently running.true if the process for checking unused versions is currently running; false otherwisepublic static VersionHistoryCheckStatus purgeVersionHistoryForNodes(javax.jcr.NodeIterator nodes, Writer statusOut) throws javax.jcr.RepositoryException
nodes - an instance of NodeIterator for processing nodesstatusOut - a writer to log current processing status intojavax.jcr.RepositoryException - in case of JCR errorspublic static VersionHistoryCheckStatus purgeVersionHistoryForNodes(Set<String> nodeIdentifiers)
nodeIdentifiers - a set of node IDs to processpublic static VersionHistoryCheckStatus purgeVersionHistoryForNodes(Set<String> nodeIdentifiers, Writer statusOut)
nodeIdentifiers - a set of node IDs to processstatusOut - a writer to log current processing status intoCopyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.