org.apache.activemq.kaha.impl.index
Interface Index

All Known Implementing Classes:
HashIndex, TreeIndex, VMIndex

public interface Index

Simplier than a Map


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
 

Method Detail

clear

void clear()
           throws IOException
clear the index

Throws:
IOException

containsKey

boolean containsKey(Object key)
                    throws IOException
Parameters:
key -
Returns:
true if it contains the key
Throws:
IOException

remove

StoreEntry remove(Object key)
                  throws IOException
remove the index key

Parameters:
key -
Returns:
StoreEntry removed
Throws:
IOException

store

void store(Object key,
           StoreEntry entry)
           throws IOException
store the key, item

Parameters:
key -
entry -
Throws:
IOException

get

StoreEntry get(Object key)
               throws IOException
Parameters:
key -
Returns:
the entry
Throws:
IOException

isTransient

boolean isTransient()
Returns:
true if the index is transient

load

void load()
load indexes


unload

void unload()
            throws IOException
unload indexes

Throws:
IOException

setKeyMarshaller

void setKeyMarshaller(Marshaller marshaller)
Set the marshaller for key objects

Parameters:
marshaller -

getSize

int getSize()
return the size of the index

Returns:

delete

void delete()
            throws IOException
delete all state associated with the index

Throws:
IOException


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