org.apache.activemq.kaha
Interface Store

All Known Implementing Classes:
KahaStore

public interface Store

A Store is holds persistent containers


Field Summary
static Marshaller BYTES_MARSHALLER
          Byte Marshaller
static Marshaller COMMAND_MARSHALLER
          Command Marshaller
static String DEFAULT_CONTAINER_NAME
          Defauly container name
static Marshaller MESSAGEID_MARSHALLER
          MessageId marshaller
static Marshaller OBJECT_MARSHALLER
          Object Marshaller
static Marshaller STRING_MARSHALLER
          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(ContainerId id)
          delete a list container
 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(ContainerId id)
          Delete Map 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 getDefaultContainerName()
           
 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, boolean persistentIndex)
          Get a ListContainer with the given id and creates it if it doesn't exist
 Set<ContainerId> 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, boolean persistentIndex)
          Get a MapContainer with the given id - the MapContainer is created if needed
 Set<ContainerId> getMapContainerIds()
          Get a Set of call MapContainer Ids
 long getMaxDataFileLength()
           
 void initialize()
          An explict call to initialize - this will also be called implicitly for any other operation on the store.
 boolean isInitialized()
           
 boolean isPersistentIndex()
           
 void setDefaultContainerName(String defaultContainerName)
          set the default container name
 void setMaxDataFileLength(long maxDataFileLength)
           
 void setPersistentIndex(boolean persistentIndex)
          Set a persistent index as the default if the parameter is true
 long size()
           
 

Field Detail

DEFAULT_CONTAINER_NAME

static final String DEFAULT_CONTAINER_NAME
Defauly container name

See Also:
Constant Field Values

BYTES_MARSHALLER

static final Marshaller BYTES_MARSHALLER
Byte Marshaller


OBJECT_MARSHALLER

static final Marshaller OBJECT_MARSHALLER
Object Marshaller


STRING_MARSHALLER

static final Marshaller STRING_MARSHALLER
String Marshaller


COMMAND_MARSHALLER

static final Marshaller COMMAND_MARSHALLER
Command Marshaller


MESSAGEID_MARSHALLER

static final Marshaller MESSAGEID_MARSHALLER
MessageId 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,
                             boolean persistentIndex)
                             throws IOException
Get a MapContainer with the given id - the MapContainer is created if needed

Parameters:
id -
containerName -
persistentIndex -
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

deleteMapContainer

void deleteMapContainer(ContainerId id)
                        throws IOException
Delete Map container

Parameters:
id -
Throws:
IOException

getMapContainerIds

Set<ContainerId> 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,
                               boolean persistentIndex)
                               throws IOException
Get a ListContainer with the given id and creates it if it doesn't exist

Parameters:
id -
containerName -
persistentIndex -
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

deleteListContainer

void deleteListContainer(ContainerId id)
                         throws IOException
delete a list container

Parameters:
id -
Throws:
IOException

getListContainerIds

Set<ContainerId> 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

isInitialized

boolean isInitialized()
Returns:
true if the store has been initialized

size

long size()
Returns:
the amount of disk space the store is occupying

isPersistentIndex

boolean isPersistentIndex()
Returns:
true if persistent indexes are used by default

setPersistentIndex

void setPersistentIndex(boolean persistentIndex)
Set a persistent index as the default if the parameter is true

Parameters:
persistentIndex -

getDefaultContainerName

String getDefaultContainerName()
Returns:
the default container name

setDefaultContainerName

void setDefaultContainerName(String defaultContainerName)
set the default container name

Parameters:
defaultContainerName -

initialize

void initialize()
                throws IOException
An explict call to initialize - this will also be called implicitly for any other operation on the store.

Throws:
IOException


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