org.apache.activemq.kaha.impl
Class KahaStore

java.lang.Object
  extended by org.apache.activemq.kaha.impl.KahaStore
All Implemented Interfaces:
Store

public class KahaStore
extends Object
implements Store

Store Implementation

Version:
$Revision: 1.1.1.1 $

Field Summary
 
Fields inherited from interface org.apache.activemq.kaha.Store
BytesMarshaller, ObjectMarshaller, StringMarshaller
 
Constructor Summary
KahaStore(String name, String mode)
           
 
Method Summary
 void clear()
          empty all the contents of the store
 void close()
          close the store
 boolean delete()
          delete the store
 void deleteListContainer(Object id)
          delete a ListContainer from the default container
 void deleteListContainer(Object id, String containerName)
          delete a ListContainer from the named container
 void deleteMapContainer(Object id)
          delete a container from the default container
 void deleteMapContainer(Object id, String containerName)
          delete a MapContainer from the name container
 boolean doesListContainerExist(Object id)
          Checks if a ListContainer exists in the default container
 boolean doesListContainerExist(Object id, String containerName)
          Checks if a ListContainer exists in the named container
 boolean doesMapContainerExist(Object id)
          Checks if a MapContainer exists in the default container
 boolean doesMapContainerExist(Object id, String containerName)
          Checks if a MapContainer exists in the named container
 void force()
          Force all writes to disk
 DataManager getDataManager(String name)
           
 IndexManager getIndexManager(DataManager dm, String name)
           
 String getIndexType()
           
 ListContainer getListContainer(Object id)
          Get a ListContainer with the given id and creates it if it doesn't exist
 ListContainer getListContainer(Object id, String containerName)
          Get a ListContainer with the given id and creates it if it doesn't exist
 ListContainer getListContainer(Object id, String containerName, String indexType)
          Get a ListContainer with the given id and creates it if it doesn't exist
 Set getListContainerIds()
          Get a Set of call ListContainer Ids
 org.apache.activemq.kaha.impl.IndexRootContainer getListsContainer()
           
 MapContainer getMapContainer(Object id)
          Get a MapContainer with the given id - the MapContainer is created if needed
 MapContainer getMapContainer(Object id, String containerName)
          Get a MapContainer with the given id - the MapContainer is created if needed
 MapContainer getMapContainer(Object id, String containerName, String indexType)
          Get a MapContainer with the given id - the MapContainer is created if needed
 Set getMapContainerIds()
          Get a Set of call MapContainer Ids
 org.apache.activemq.kaha.impl.IndexRootContainer getMapsContainer()
           
 long getMaxDataFileLength()
           
 void initialize()
           
 boolean isLogIndexChanges()
           
 void setIndexType(String type)
          Set the default index type
 void setLogIndexChanges(boolean logIndexChanges)
           
 void setMaxDataFileLength(long maxDataFileLength)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KahaStore

public KahaStore(String name,
                 String mode)
          throws IOException
Throws:
IOException
Method Detail

close

public void close()
           throws IOException
Description copied from interface: Store
close the store

Specified by:
close in interface Store
Throws:
IOException

force

public void force()
           throws IOException
Description copied from interface: Store
Force all writes to disk

Specified by:
force in interface Store
Throws:
IOException

clear

public void clear()
           throws IOException
Description copied from interface: Store
empty all the contents of the store

Specified by:
clear in interface Store
Throws:
IOException

delete

public boolean delete()
               throws IOException
Description copied from interface: Store
delete the store

Specified by:
delete in interface Store
Returns:
true if the delete was successful
Throws:
IOException

doesMapContainerExist

public boolean doesMapContainerExist(Object id)
                              throws IOException
Description copied from interface: Store
Checks if a MapContainer exists in the default container

Specified by:
doesMapContainerExist in interface Store
Returns:
new MapContainer
Throws:
IOException

doesMapContainerExist

public boolean doesMapContainerExist(Object id,
                                     String containerName)
                              throws IOException
Description copied from interface: Store
Checks if a MapContainer exists in the named container

Specified by:
doesMapContainerExist in interface Store
Returns:
new MapContainer
Throws:
IOException

getMapContainer

public MapContainer getMapContainer(Object id)
                             throws IOException
Description copied from interface: Store
Get a MapContainer with the given id - the MapContainer is created if needed

Specified by:
getMapContainer in interface Store
Returns:
container for the associated id or null if it doesn't exist
Throws:
IOException

getMapContainer

public MapContainer getMapContainer(Object id,
                                    String containerName)
                             throws IOException
Description copied from interface: Store
Get a MapContainer with the given id - the MapContainer is created if needed

Specified by:
getMapContainer in interface Store
Returns:
container for the associated id or null if it doesn't exist
Throws:
IOException

getMapContainer

public MapContainer getMapContainer(Object id,
                                    String containerName,
                                    String indexType)
                             throws IOException
Description copied from interface: Store
Get a MapContainer with the given id - the MapContainer is created if needed

Specified by:
getMapContainer in interface Store
Returns:
container for the associated id or null if it doesn't exist
Throws:
IOException

deleteMapContainer

public void deleteMapContainer(Object id)
                        throws IOException
Description copied from interface: Store
delete a container from the default container

Specified by:
deleteMapContainer in interface Store
Throws:
IOException

deleteMapContainer

public void deleteMapContainer(Object id,
                               String containerName)
                        throws IOException
Description copied from interface: Store
delete a MapContainer from the name container

Specified by:
deleteMapContainer in interface Store
Throws:
IOException

getMapContainerIds

public Set getMapContainerIds()
                       throws IOException
Description copied from interface: Store
Get a Set of call MapContainer Ids

Specified by:
getMapContainerIds in interface Store
Returns:
the set of ids
Throws:
IOException

doesListContainerExist

public boolean doesListContainerExist(Object id)
                               throws IOException
Description copied from interface: Store
Checks if a ListContainer exists in the default container

Specified by:
doesListContainerExist in interface Store
Returns:
new MapContainer
Throws:
IOException

doesListContainerExist

public boolean doesListContainerExist(Object id,
                                      String containerName)
                               throws IOException
Description copied from interface: Store
Checks if a ListContainer exists in the named container

Specified by:
doesListContainerExist in interface Store
Returns:
new MapContainer
Throws:
IOException

getListContainer

public ListContainer getListContainer(Object id)
                               throws IOException
Description copied from interface: Store
Get a ListContainer with the given id and creates it if it doesn't exist

Specified by:
getListContainer in interface Store
Returns:
container for the associated id or null if it doesn't exist
Throws:
IOException

getListContainer

public ListContainer getListContainer(Object id,
                                      String containerName)
                               throws IOException
Description copied from interface: Store
Get a ListContainer with the given id and creates it if it doesn't exist

Specified by:
getListContainer in interface Store
Returns:
container for the associated id or null if it doesn't exist
Throws:
IOException

getListContainer

public ListContainer getListContainer(Object id,
                                      String containerName,
                                      String indexType)
                               throws IOException
Description copied from interface: Store
Get a ListContainer with the given id and creates it if it doesn't exist

Specified by:
getListContainer in interface Store
Returns:
container for the associated id or null if it doesn't exist
Throws:
IOException

deleteListContainer

public void deleteListContainer(Object id)
                         throws IOException
Description copied from interface: Store
delete a ListContainer from the default container

Specified by:
deleteListContainer in interface Store
Throws:
IOException

deleteListContainer

public void deleteListContainer(Object id,
                                String containerName)
                         throws IOException
Description copied from interface: Store
delete a ListContainer from the named container

Specified by:
deleteListContainer in interface Store
Throws:
IOException

getListContainerIds

public Set getListContainerIds()
                        throws IOException
Description copied from interface: Store
Get a Set of call ListContainer Ids

Specified by:
getListContainerIds in interface Store
Returns:
the set of ids
Throws:
IOException

getListsContainer

public org.apache.activemq.kaha.impl.IndexRootContainer getListsContainer()
Returns:
the listsContainer

getMapsContainer

public org.apache.activemq.kaha.impl.IndexRootContainer getMapsContainer()
Returns:
the mapsContainer

getDataManager

public DataManager getDataManager(String name)
                           throws IOException
Throws:
IOException

getIndexManager

public IndexManager getIndexManager(DataManager dm,
                                    String name)
                             throws IOException
Throws:
IOException

isLogIndexChanges

public boolean isLogIndexChanges()

setLogIndexChanges

public void setLogIndexChanges(boolean logIndexChanges)

getMaxDataFileLength

public long getMaxDataFileLength()
Specified by:
getMaxDataFileLength in interface Store
Returns:
the maxDataFileLength

setMaxDataFileLength

public void setMaxDataFileLength(long maxDataFileLength)
Specified by:
setMaxDataFileLength in interface Store
Parameters:
maxDataFileLength - the maxDataFileLength to set

getIndexType

public String getIndexType()
Specified by:
getIndexType in interface Store
Returns:
the default index type
See Also:
IndexTypes

setIndexType

public void setIndexType(String type)
Set the default index type

Specified by:
setIndexType in interface Store
Parameters:
type -
See Also:
IndexTypes

initialize

public void initialize()
                throws IOException
Throws:
IOException


Copyright © 2011 Apache Software Foundation. All Rights Reserved.