Class CDORevisionCrawler.OutputStreamHandler.IDMapper
java.lang.Object
org.eclipse.emf.cdo.common.revision.CDORevisionCrawler.OutputStreamHandler.IDMapper
- Direct Known Subclasses:
CDORevisionCrawler.OutputStreamHandler.IDMapper.InMemory
- Enclosing class:
CDORevisionCrawler.OutputStreamHandler
Abstract ID mapper for mapping real IDs to local IDs.
- Author:
- Eike Stepper
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classIn-memory implementation of IDMapper. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidIterates over all real IDs that have been mapped.protected CDOIDReturns the next available local ID.abstract CDOIDLooks up the mapped local ID for a real ID.Maps a real ID to a new local ID.protected abstract voidRegisters a mapping from real ID to local ID.
-
Constructor Details
-
IDMapper
public IDMapper()Constructs an IDMapper.
-
-
Method Details
-
map
Maps a real ID to a new local ID.- Parameters:
realID- the real ID- Returns:
- the mapped local ID
-
lookup
Looks up the mapped local ID for a real ID.- Parameters:
realID- the real ID- Returns:
- the mapped local ID
-
forEach
Iterates over all real IDs that have been mapped.- Parameters:
realIDConsumer- the consumer for real IDs
-
register
Registers a mapping from real ID to local ID.- Parameters:
realID- the real IDlocalID- the local ID
-
getNextMappedID
Returns the next available local ID.- Returns:
- the next local ID
-