org.openstreetmap.osmosis.core.customdb.v0_5.impl
Class RelationStorageContainer

java.lang.Object
  extended by org.openstreetmap.osmosis.core.customdb.v0_5.impl.RelationStorageContainer
All Implemented Interfaces:
Releasable

public class RelationStorageContainer
extends java.lang.Object
implements Releasable

Holds references to all of the node storage related classes.

Author:
Brett Henderson

Constructor Summary
RelationStorageContainer(RandomAccessObjectStoreReader<Relation> relationObjectReader, IndexStoreReader<java.lang.Long,LongLongIndexElement> relationObjectOffsetIndexReader, IndexStoreReader<java.lang.Long,LongLongIndexElement> relationRelationIndexReader)
          Creates a new instance.
 
Method Summary
 IndexStoreReader<java.lang.Long,LongLongIndexElement> getRelationObjectOffsetIndexReader()
          Gets the relation object offset reader.
 RandomAccessObjectStoreReader<Relation> getRelationObjectReader()
          Gets the raw relation reader.
 IndexStoreReader<java.lang.Long,LongLongIndexElement> getRelationRelationIndexReader()
          Gets the relation to relation index reader.
 void release()
          Performs resource cleanup tasks such as closing files, or database connections.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RelationStorageContainer

public RelationStorageContainer(RandomAccessObjectStoreReader<Relation> relationObjectReader,
                                IndexStoreReader<java.lang.Long,LongLongIndexElement> relationObjectOffsetIndexReader,
                                IndexStoreReader<java.lang.Long,LongLongIndexElement> relationRelationIndexReader)
Creates a new instance.

Parameters:
relationObjectReader - The raw relation objects.
relationObjectOffsetIndexReader - The relation object offsets.
relationRelationIndexReader - The relation to relation index.
Method Detail

getRelationObjectReader

public RandomAccessObjectStoreReader<Relation> getRelationObjectReader()
Gets the raw relation reader.

Returns:
The raw relation reader.

getRelationObjectOffsetIndexReader

public IndexStoreReader<java.lang.Long,LongLongIndexElement> getRelationObjectOffsetIndexReader()
Gets the relation object offset reader.

Returns:
The relation object offset reader.

getRelationRelationIndexReader

public IndexStoreReader<java.lang.Long,LongLongIndexElement> getRelationRelationIndexReader()
Gets the relation to relation index reader.

Returns:
The relation to relation index reader.

release

public void release()
Performs resource cleanup tasks such as closing files, or database connections. This must be called after all processing is complete and may be called multiple times. Implementations must call release on any nested Releasable objects. It should be called within a finally block to ensure it is called in exception scenarios.

Specified by:
release in interface Releasable