Klasse CDORevisionCrawler
java.lang.Object
org.eclipse.net4j.util.event.Notifier
org.eclipse.net4j.util.lifecycle.Lifecycle
org.eclipse.emf.cdo.common.revision.CDORevisionCrawler
- Alle implementierten Schnittstellen:
org.eclipse.net4j.util.event.INotifier,org.eclipse.net4j.util.event.INotifier.INotifier2,org.eclipse.net4j.util.lifecycle.IDeactivateable,org.eclipse.net4j.util.lifecycle.ILifecycle,org.eclipse.net4j.util.lifecycle.ILifecycle.DeferrableActivation
public final class CDORevisionCrawler
extends org.eclipse.net4j.util.lifecycle.Lifecycle
A crawler that visits CDO revisions and their features according to a
feature strategy
and passes them to a handler.
Example usage:
MessageDigest digest = MessageDigest.getInstance("SHA-256");
new CDORevisionCrawler()
.handler(new CDORevisionCrawler.MessageDigestHandler(digest))
.revisionProvider(revisionProvider)
.featureStrategy(CDORevisionCrawler.FeatureStrategy.TREE)
.containmentProxyStrategy(CDORevisionCrawler.ContainmentProxyStrategy.Physical)
.begin()
.addRevision(rootRevision)
.finish();
byte[] hash = digest.digest();
- Seit:
- 4.26
- Autor:
- Eike Stepper
- Siehe auch:
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic enumStrategy for handling containment proxies during crawling.static interfaceStrategy for deciding how to handle features during crawling.static interfaceHandler interface for receiving crawl events.static classHandler implementation that calculates a message digest over crawled data.static classHandler implementation that writes crawl data to an output stream.Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen org.eclipse.net4j.util.lifecycle.ILifecycle
org.eclipse.net4j.util.lifecycle.ILifecycle.DeferrableActivationVon Schnittstelle geerbte verschachtelte Klassen/Schnittstellen org.eclipse.net4j.util.event.INotifier
org.eclipse.net4j.util.event.INotifier.INotifier2 -
Feldübersicht
Von Klasse geerbte Felder org.eclipse.net4j.util.lifecycle.Lifecycle
USE_LABEL -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungaddRevision(CDORevision revision) Adds a revision to the crawl queue and processes reachable revisions.begin()Activates the crawler and prepares it for crawling.Returns the current containment proxy strategy.containmentProxyStrategy(CDORevisionCrawler.ContainmentProxyStrategy containmentProxyStrategy) Sets the containment proxy strategy.protected voidPerforms activation logic.protected voidChecks the state of required fields before activation.protected voidPerforms deactivation logic.Returns the current feature strategy.featureStrategy(CDORevisionCrawler.FeatureStrategy featureStrategy) Sets the feature strategy.finish()Deactivates the crawler and finalizes crawling.handler()Returns the current handler used by this crawler.handler(CDORevisionCrawler.Handler handler) Sets the handler to be used by this crawler.longReturns the number of revisions crawled so far.Returns the current revision provider.revisionProvider(CDORevisionProvider revisionProvider) Sets the revision provider.Von Klasse geerbte Methoden org.eclipse.net4j.util.lifecycle.Lifecycle
activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doAfterActivate, doBeforeDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toStringVon Klasse geerbte Methoden org.eclipse.net4j.util.event.Notifier
addListener, addUniqueListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListener, hasListeners, lastListenerRemoved, listenerAdded, listenerRemoved, removeListenerVon Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitVon Schnittstelle geerbte Methoden org.eclipse.net4j.util.event.INotifier
addListener, getListeners, hasListeners, removeListener
-
Konstruktordetails
-
CDORevisionCrawler
public CDORevisionCrawler()Creates a new CDO revision crawler.
-
-
Methodendetails
-
handler
Returns the current handler used by this crawler. -
handler
Sets the handler to be used by this crawler.- Parameter:
handler- the handler implementation- Gibt zurück:
- this crawler instance for chaining
-
containmentProxyStrategy
Returns the current containment proxy strategy. -
containmentProxyStrategy
public CDORevisionCrawler containmentProxyStrategy(CDORevisionCrawler.ContainmentProxyStrategy containmentProxyStrategy) Sets the containment proxy strategy.- Parameter:
containmentProxyStrategy- the strategy to use- Gibt zurück:
- this crawler instance for chaining
-
featureStrategy
Returns the current feature strategy. -
featureStrategy
Sets the feature strategy.- Parameter:
featureStrategy- the strategy to use- Gibt zurück:
- this crawler instance for chaining
-
revisionProvider
Returns the current revision provider. -
revisionProvider
Sets the revision provider.- Parameter:
revisionProvider- the provider to use- Gibt zurück:
- this crawler instance for chaining
-
revisionCount
public long revisionCount()Returns the number of revisions crawled so far. -
addRevision
Adds a revision to the crawl queue and processes reachable revisions.- Parameter:
revision- the root revision to start crawling from- Gibt zurück:
- this crawler instance for chaining
-
begin
Activates the crawler and prepares it for crawling.- Gibt zurück:
- this crawler instance for chaining
-
finish
Deactivates the crawler and finalizes crawling.- Gibt zurück:
- this crawler instance for chaining
-
doBeforeActivate
Checks the state of required fields before activation.- Setzt außer Kraft:
doBeforeActivatein Klasseorg.eclipse.net4j.util.lifecycle.Lifecycle- Löst aus:
Exception
-
doActivate
Performs activation logic.- Setzt außer Kraft:
doActivatein Klasseorg.eclipse.net4j.util.lifecycle.Lifecycle- Löst aus:
Exception
-
doDeactivate
Performs deactivation logic.- Setzt außer Kraft:
doDeactivatein Klasseorg.eclipse.net4j.util.lifecycle.Lifecycle- Löst aus:
Exception
-