org.apache.activemq.kaha
Interface Store

All Known Implementing Classes:
KahaStore

public interface Store

A Store is holds persistent containers

Version:
$Revision: 1.2 $

Field Summary
static Marshaller BytesMarshaller
          Byte Marshaller
static Marshaller ObjectMarshaller
          Object Marshaller
static Marshaller StringMarshaller
          String Marshaller
 
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
 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
 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
 long getMaxDataFileLength()
           
 void setIndexType(String type)
          Set the default index type
 void setMaxDataFileLength(long maxDataFileLength)
           
 

Field Detail

BytesMarshaller

static final Marshaller BytesMarshaller
Byte Marshaller


ObjectMarshaller

static final Marshaller ObjectMarshaller
Object Marshaller


StringMarshaller

static final Marshaller StringMarshaller
String Marshaller

Method Detail

close

void close()
           throws IOException
close the store

Throws:
IOException

force

void force()
           throws IOException
Force all writes to disk

Throws:
IOException

clear

void clear()
           throws IOException
empty all the contents of the store

Throws:
IOException

delete

boolean delete()
               throws IOException
delete the store

Returns:
true if the delete was successful
Throws:
IOException

doesMapContainerExist

boolean doesMapContainerExist(Object id)
                              throws IOException
Checks if a MapContainer exists in the default container

Parameters:
id -
Returns:
new MapContainer
Throws:
IOException

doesMapContainerExist

boolean doesMapContainerExist(Object id,
                              String containerName)
                              throws IOException
Checks if a MapContainer exists in the named container

Parameters:
id -
containerName -
Returns:
new MapContainer
Throws:
IOException

getMapContainer

MapContainer getMapContainer(Object id)
                             throws IOException
Get a MapContainer with the given id - the MapContainer is created if needed

Parameters:
id -
Returns:
container for the associated id or null if it doesn't exist
Throws:
IOException

getMapContainer

MapContainer getMapContainer(Object id,
                             String containerName)
                             throws IOException
Get a MapContainer with the given id - the MapContainer is created if needed

Parameters:
id -
containerName -
Returns:
container for the associated id or null if it doesn't exist
Throws:
IOException

getMapContainer

MapContainer getMapContainer(Object id,
                             String containerName,
                             String indexType)
                             throws IOException
Get a MapContainer with the given id - the MapContainer is created if needed

Parameters:
id -
containerName -
indexType -
Returns:
container for the associated id or null if it doesn't exist
Throws:
IOException

deleteMapContainer

void deleteMapContainer(Object id)
                        throws IOException
delete a container from the default container

Parameters:
id -
Throws:
IOException

deleteMapContainer

void deleteMapContainer(Object id,
                        String containerName)
                        throws IOException
delete a MapContainer from the name container

Parameters:
id -
containerName -
Throws:
IOException

getMapContainerIds

Set getMapContainerIds()
                       throws IOException
Get a Set of call MapContainer Ids

Returns:
the set of ids
Throws:
IOException

doesListContainerExist

boolean doesListContainerExist(Object id)
                               throws IOException
Checks if a ListContainer exists in the default container

Parameters:
id -
Returns:
new MapContainer
Throws:
IOException

doesListContainerExist

boolean doesListContainerExist(Object id,
                               String containerName)
                               throws IOException
Checks if a ListContainer exists in the named container

Parameters:
id -
containerName -
Returns:
new MapContainer
Throws:
IOException

getListContainer

ListContainer getListContainer(Object id)
                               throws IOException
Get a ListContainer with the given id and creates it if it doesn't exist

Parameters:
id -
Returns:
container for the associated id or null if it doesn't exist
Throws:
IOException

getListContainer

ListContainer getListContainer(Object id,
                               String containerName)
                               throws IOException
Get a ListContainer with the given id and creates it if it doesn't exist

Parameters:
id -
containerName -
Returns:
container for the associated id or null if it doesn't exist
Throws:
IOException

getListContainer

ListContainer getListContainer(Object id,
                               String containerName,
                               String indexType)
                               throws IOException
Get a ListContainer with the given id and creates it if it doesn't exist

Parameters:
id -
containerName -
indexType -
Returns:
container for the associated id or null if it doesn't exist
Throws:
IOException

deleteListContainer

void deleteListContainer(Object id)
                         throws IOException
delete a ListContainer from the default container

Parameters:
id -
Throws:
IOException

deleteListContainer

void deleteListContainer(Object id,
                         String containerName)
                         throws IOException
delete a ListContainer from the named container

Parameters:
id -
containerName -
Throws:
IOException

getListContainerIds

Set getListContainerIds()
                        throws IOException
Get a Set of call ListContainer Ids

Returns:
the set of ids
Throws:
IOException

getMaxDataFileLength

long getMaxDataFileLength()
Returns:
the maxDataFileLength

setMaxDataFileLength

void setMaxDataFileLength(long maxDataFileLength)
Parameters:
maxDataFileLength - the maxDataFileLength to set

getIndexType

String getIndexType()
Returns:
the default index type
See Also:
IndexTypes

setIndexType

void setIndexType(String type)
Set the default index type

Parameters:
type -
See Also:
IndexTypes


Copyright © 2011 Apache Software Foundation. All Rights Reserved.