org.apache.activemq.kaha.impl.index
Class VMIndex

java.lang.Object
  extended by org.apache.activemq.kaha.impl.index.VMIndex
All Implemented Interfaces:
Index, IndexMBean

public class VMIndex
extends Object
implements Index, IndexMBean

Index implementation using a HashMap


Constructor Summary
VMIndex(IndexManager manager)
           
 
Method Summary
 void clear()
          clear the index
 boolean containsKey(Object key)
           
 void delete()
          delete all state associated with the index
 StoreEntry get(Object key)
           
 int getSize()
          return the size of the index
 boolean isTransient()
           
 void load()
          load indexes
 StoreEntry remove(Object key)
          remove the index key
 void setKeyMarshaller(Marshaller marshaller)
          Set the marshaller for key objects
 void store(Object key, StoreEntry entry)
          store the key, item
 void unload()
          unload indexes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VMIndex

public VMIndex(IndexManager manager)
Method Detail

clear

public void clear()
Description copied from interface: Index
clear the index

Specified by:
clear in interface Index
See Also:
Index.clear()

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Index
Parameters:
key -
Returns:
true if the index contains the key
See Also:
Index.containsKey(java.lang.Object)

remove

public StoreEntry remove(Object key)
Description copied from interface: Index
remove the index key

Specified by:
remove in interface Index
Parameters:
key -
Returns:
store entry
See Also:
org.apache.activemq.kaha.impl.index.Index#removeKey(java.lang.Object)

store

public void store(Object key,
                  StoreEntry entry)
Description copied from interface: Index
store the key, item

Specified by:
store in interface Index
Parameters:
key -
entry -
See Also:
org.apache.activemq.kaha.impl.index.Index#store(java.lang.Object, org.apache.activemq.kaha.impl.index.IndexItem)

get

public StoreEntry get(Object key)
Specified by:
get in interface Index
Parameters:
key -
Returns:
the entry

isTransient

public boolean isTransient()
Specified by:
isTransient in interface Index
Specified by:
isTransient in interface IndexMBean
Returns:
true if the index is transient

load

public void load()
load indexes

Specified by:
load in interface Index

unload

public void unload()
unload indexes

Specified by:
unload in interface Index

delete

public void delete()
            throws IOException
Description copied from interface: Index
delete all state associated with the index

Specified by:
delete in interface Index
Throws:
IOException

setKeyMarshaller

public void setKeyMarshaller(Marshaller marshaller)
Description copied from interface: Index
Set the marshaller for key objects

Specified by:
setKeyMarshaller in interface Index

getSize

public int getSize()
Description copied from interface: Index
return the size of the index

Specified by:
getSize in interface Index
Specified by:
getSize in interface IndexMBean


Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.