Package org.eclipse.emf.cdo.common.revision

# Class CDORevisionCrawler.OutputStreamHandler.IDMapper.InMemory

java.lang.Object
org.eclipse.emf.cdo.common.revision.CDORevisionCrawler.OutputStreamHandler.IDMapper
org.eclipse.emf.cdo.common.revision.CDORevisionCrawler.OutputStreamHandler.IDMapper.InMemory

Enclosing class:
  `CDORevisionCrawler.OutputStreamHandler.IDMapper`

public static final class CDORevisionCrawler.OutputStreamHandler.IDMapper.InMemory extends CDORevisionCrawler.OutputStreamHandler.IDMapper
In-memory implementation of IDMapper.

Stores all mappings in memory using a LinkedHashMap to preserve insertion order.

Author:
  Eike Stepper

## Nested Class Summary

## Nested classes/interfaces inherited from class org.eclipse.emf.cdo.common.revision.CDORevisionCrawler.OutputStreamHandler.IDMapper

`CDORevisionCrawler.OutputStreamHandler.IDMapper.InMemory`

## Constructor Summary

Constructors
Constructor
Description
`InMemory()`
Constructs an in-memory IDMapper.

## Method Summary

Modifier and Type
Method
Description
`void`
`forEach(Consumer<? super CDOID> realIDConsumer)`
Iterates over all real IDs that have been mapped.
`CDOID`
`lookup(CDOID realID)`
Looks up the mapped local ID for a real ID.
`protected void`
`register(CDOID realID, CDOID mappedID)`
Registers a mapping from real ID to local ID.

### Methods inherited from class org.eclipse.emf.cdo.common.revision.CDORevisionCrawler.OutputStreamHandler.IDMapper

`getNextMappedID, map`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### InMemory

public InMemory()
Constructs an in-memory IDMapper.

## Method Details

### lookup

public CDOID lookup(CDOID realID)
Looks up the mapped local ID for a real ID.

Specified by:
  `lookup` in class `CDORevisionCrawler.OutputStreamHandler.IDMapper`
Parameters:
  `realID` - the real ID
Returns:
  the mapped local ID

### forEach

public void forEach(Consumer<? super CDOID> realIDConsumer)
Iterates over all real IDs that have been mapped.

Specified by:
  `forEach` in class `CDORevisionCrawler.OutputStreamHandler.IDMapper`
Parameters:
  `realIDConsumer` - the consumer for real IDs

### register

protected void register(CDOID realID, CDOID mappedID)
Registers a mapping from real ID to local ID.

Specified by:
  `register` in class `CDORevisionCrawler.OutputStreamHandler.IDMapper`
Parameters:
  `realID` - the real ID
  `mappedID` - the local ID