Class CDORevisionCrawler.OutputStreamHandler
java.lang.Object
org.eclipse.emf.cdo.common.revision.CDORevisionCrawler.OutputStreamHandler
- All Implemented Interfaces:
CDORevisionCrawler.Handler
- Direct Known Subclasses:
CDORevisionCrawler.MessageDigestHandler
- Enclosing class:
CDORevisionCrawler
public static class CDORevisionCrawler.OutputStreamHandler
extends Object
implements CDORevisionCrawler.Handler
Handler implementation that writes crawl data to an output stream.
- Author:
- Eike Stepper
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAbstract ID mapper for mapping real IDs to local IDs. -
Constructor Summary
ConstructorsModifierConstructorDescriptionOutputStreamHandler(OutputStream stream) Constructs an OutputStreamHandler with the given output stream.OutputStreamHandler(OutputStream stream, boolean localIDs, CDOLobLoader lobLoader) Constructs an OutputStreamHandler with local ID mapping and optional LOB loader.OutputStreamHandler(OutputStream stream, CDORevisionCrawler.OutputStreamHandler.IDMapper idMapper, CDOLobLoader lobLoader) Constructs an OutputStreamHandler with custom ID mapper and optional LOB loader.protectedConstructs an OutputStreamHandler with the given data output and ID mapper. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbegin(CDORevisionCrawler crawler) Called when crawling begins.final booleanbeginRevision(CDORevision revision) Called when a revision is about to be processed.protected booleandoBeginRevision(CDORevision revision) Performs finishing logic for the given revision.protected voiddoEndRevision(CDORevision revision) Performs ending logic for the given revision.protected voiddoHandleFeature(CDORevision revision, EStructuralFeature feature) Performs feature handling logic for the given revision and feature.final voidendRevision(CDORevision revision) Called when a revision has been processed.final voidPerforms the second phase for local ID mapping, writing features for all mapped revisions.Returns the local ID mapper used by this handler, if any.final voidhandleFeature(CDORevision revision, EStructuralFeature feature) Called for each feature to be handled.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.emf.cdo.common.revision.CDORevisionCrawler.Handler
finish
-
Constructor Details
-
OutputStreamHandler
Constructs an OutputStreamHandler with the given output stream.- Parameters:
stream- the output stream
-
OutputStreamHandler
Constructs an OutputStreamHandler with local ID mapping and optional LOB loader.- Parameters:
stream- the output streamlocalIDs- true to use local IDslobLoader- the LOB loader, may be null
-
OutputStreamHandler
public OutputStreamHandler(OutputStream stream, CDORevisionCrawler.OutputStreamHandler.IDMapper idMapper, CDOLobLoader lobLoader) Constructs an OutputStreamHandler with custom ID mapper and optional LOB loader.- Parameters:
stream- the output streamidMapper- the ID mapperlobLoader- the LOB loader, may be null
-
OutputStreamHandler
protected OutputStreamHandler(CDODataOutput out, CDORevisionCrawler.OutputStreamHandler.IDMapper idMapper) Constructs an OutputStreamHandler with the given data output and ID mapper.
-
-
Method Details
-
getLocalIDMapper
Returns the local ID mapper used by this handler, if any. -
begin
Description copied from interface:CDORevisionCrawler.HandlerCalled when crawling begins.- Specified by:
beginin interfaceCDORevisionCrawler.Handler- Parameters:
crawler- the crawler instance- Returns:
- true to continue crawling
-
beginRevision
Description copied from interface:CDORevisionCrawler.HandlerCalled when a revision is about to be processed.- Specified by:
beginRevisionin interfaceCDORevisionCrawler.Handler- Parameters:
revision- the revision- Returns:
- true to continue crawling
-
handleFeature
Description copied from interface:CDORevisionCrawler.HandlerCalled for each feature to be handled.- Specified by:
handleFeaturein interfaceCDORevisionCrawler.Handler- Parameters:
revision- the revisionfeature- the feature
-
endRevision
Description copied from interface:CDORevisionCrawler.HandlerCalled when a revision has been processed.- Specified by:
endRevisionin interfaceCDORevisionCrawler.Handler- Parameters:
revision- the revision
-
finishLocalIDs
public final void finishLocalIDs()Performs the second phase for local ID mapping, writing features for all mapped revisions. -
doBeginRevision
Performs finishing logic for the given revision. -
doHandleFeature
Performs feature handling logic for the given revision and feature. -
doEndRevision
Performs ending logic for the given revision.
-