Package org.eclipse.mat.parser.index

# Class IndexManager

java.lang.Object
org.eclipse.mat.parser.index.IndexManager

public class IndexManager extends Object
Handles the indexes into the snapshot.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`IndexManager.Index`
The different index types.

## Field Summary

Fields
Modifier and Type
Field
Description
`IIndexReader.IOne2SizeIndex`
`a2s`
The index from object ID to its size, for arrays and variable sized objects
`IIndexReader.IOne2OneIndex`
`domIn`
The dominator tree index from an object to the object which dominates it.
`IIndexReader.IOne2ManyIndex`
`domOut`
The dominator tree index from an object to the objects it dominates
`RetainedSizeCache`
`i2sv2`
The cache for the retained size from the object ID
`IIndexReader.IOne2LongIndex`
`idx`
The index from object ID to its address
`IIndexReader.IOne2ManyObjectsIndex`
`inbound`
The index for objects which refer to each object
`IIndexReader.IOne2OneIndex`
`o2c`
The index from object ID to the type as a class ID
`IIndexReader.IOne2LongIndex`
`o2ret`
Index from object ID to its retained size
`IIndexReader.IOne2ManyIndex`
`outbound`
The index for objects showing what they refer to

## Constructor Summary

Constructors
Constructor
Description
`IndexManager()`

## Method Summary

Modifier and Type
Method
Description
`IIndexReader.IOne2SizeIndex`
`a2size()`
The index from array object ID and variable sized objects to the size in bytes.
`IIndexReader.IOne2ManyObjectsIndex`
`c2objects()`
The index from a class to its instances
`void`
`close()`
Closes all the index reader files
`void`
`delete()`
Delete all the index files
`IIndexReader.IOne2ManyIndex`
`dominated()`
The index reader from each object to the objects it dominates
`IIndexReader.IOne2OneIndex`
`dominator()`
The index reader for each object to the object which dominates it
`IIndexReader`
`getReader(IndexManager.Index index)`
Get the reader corresponding to the index
`IIndexReader.IOne2ManyIndex`
`inbound()`
The inbounds index for each object to its inbound references.
`void`
`init(String prefix)`
Populate all the index readers
`IIndexReader.IOne2LongIndex`
`o2address()`
The index from object ID to the object address
`IIndexReader.IOne2OneIndex`
`o2class()`
The index for each object to class.
`IIndexReader.IOne2LongIndex`
`o2retained()`
The index reader for each object to its retained size
`IIndexReader.IOne2ManyIndex`
`outbound()`
The inbounds index for each object to its outbound references.
`void`
`setReader(IndexManager.Index index, IIndexReader reader)`
Add index reader corresponding to the index to the index manager

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

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

## Field Details

### inbound

public IIndexReader.IOne2ManyObjectsIndex inbound
The index for objects which refer to each object

### outbound

public IIndexReader.IOne2ManyIndex outbound
The index for objects showing what they refer to

### o2c

public IIndexReader.IOne2OneIndex o2c
The index from object ID to the type as a class ID

### idx

public IIndexReader.IOne2LongIndex idx
The index from object ID to its address

### a2s

public IIndexReader.IOne2SizeIndex a2s
The index from object ID to its size, for arrays and variable sized objects

### domOut

public IIndexReader.IOne2ManyIndex domOut
The dominator tree index from an object to the objects it dominates

### o2ret

public IIndexReader.IOne2LongIndex o2ret
Index from object ID to its retained size

### domIn

public IIndexReader.IOne2OneIndex domIn
The dominator tree index from an object to the object which dominates it.

### i2sv2

public RetainedSizeCache i2sv2
The cache for the retained size from the object ID

No Reference:
  This field is not intended to be referenced by clients.

## Constructor Details

### IndexManager

public IndexManager()

## Method Details

### setReader

public void setReader(IndexManager.Index index, IIndexReader reader)
Add index reader corresponding to the index to the index manager

Parameters:
  `index` - the index to set
  `reader` - the source for the index

### getReader

public IIndexReader getReader(IndexManager.Index index)
Get the reader corresponding to the index

Parameters:
  `index` - the index
Returns:
  the reader

### init

public void init(String prefix) throws IOException
Populate all the index readers

Parameters:
  `prefix` - the prefix of the snapshot
Throws:
  `IOException` - if a problem occurred reading the indices

### inbound

public IIndexReader.IOne2ManyIndex inbound()
The inbounds index for each object to its inbound references.

Returns:
  the index reader

### outbound

public IIndexReader.IOne2ManyIndex outbound()
The inbounds index for each object to its outbound references.

Returns:
  the index reader

### o2class

public IIndexReader.IOne2OneIndex o2class()
The index for each object to class.

Returns:
  the index reader

### c2objects

public IIndexReader.IOne2ManyObjectsIndex c2objects()
The index from a class to its instances

Returns:
  the index reader

### o2address

public IIndexReader.IOne2LongIndex o2address()
The index from object ID to the object address

Returns:
  the index reader for the object address

### a2size

public IIndexReader.IOne2SizeIndex a2size()
The index from array object ID and variable sized objects to the size in bytes.

Since:
  1.0

### dominated

public IIndexReader.IOne2ManyIndex dominated()
The index reader from each object to the objects it dominates

Returns:
  the index reader

### o2retained

public IIndexReader.IOne2LongIndex o2retained()
The index reader for each object to its retained size

Returns:
  the index reader

### dominator

public IIndexReader.IOne2OneIndex dominator()
The index reader for each object to the object which dominates it

Returns:
  the index reader

### close

public void close() throws IOException
Closes all the index reader files

Throws:
  `IOException` - if there is a problem closing the files

### delete

public void delete() throws IOException
Delete all the index files

Throws:
  `IOException` - if there is a problem deleting the files