BYTES_MARSHALLER, COMMAND_MARSHALLER, DEFAULT_CONTAINER_NAME, MESSAGEID_MARSHALLER, OBJECT_MARSHALLER, STRING_MARSHALLER| Constructor and Description |
|---|
KahaStore(File directory,
String mode) |
KahaStore(File directory,
String mode,
AtomicLong storeSize) |
KahaStore(String name,
String mode) |
KahaStore(String name,
String mode,
AtomicLong storeSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
empty all the contents of the store
|
void |
close()
close the store
|
boolean |
delete()
delete the store
|
void |
deleteListContainer(ContainerId containerId)
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 containerId)
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
|
DataManager |
getDataManager(String name) |
String |
getDefaultContainerName() |
IndexManager |
getIndexManager(DataManager dm,
String name) |
String |
getIndexTypeAsString() |
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
|
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,
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
|
org.apache.activemq.kaha.impl.IndexRootContainer |
getMapsContainer() |
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 |
isLogIndexChanges() |
boolean |
isPersistentIndex() |
boolean |
isUseAsyncDataManager() |
void |
setDefaultContainerName(String defaultContainerName)
set the default container name
|
void |
setIndexTypeAsString(String type)
Set the default index type
|
void |
setLogIndexChanges(boolean logIndexChanges) |
void |
setMaxDataFileLength(long maxDataFileLength) |
void |
setPersistentIndex(boolean persistentIndex)
Set a persistent index as the default if the parameter is true
|
void |
setUseAsyncDataManager(boolean useAsyncWriter) |
long |
size() |
public KahaStore(String name, String mode) throws IOException
IOExceptionpublic KahaStore(File directory, String mode) throws IOException
IOExceptionpublic KahaStore(String name, String mode, AtomicLong storeSize) throws IOException
IOExceptionpublic KahaStore(File directory, String mode, AtomicLong storeSize) throws IOException
IOExceptionpublic void close() throws IOException
Storeclose in interface StoreIOExceptionpublic void force() throws IOException
Storeforce in interface StoreIOExceptionpublic void clear() throws IOException
Storeclear in interface StoreIOExceptionpublic boolean delete() throws IOException
Storedelete in interface StoreIOExceptionpublic boolean isInitialized()
isInitialized in interface Storepublic boolean doesMapContainerExist(Object id) throws IOException
StoredoesMapContainerExist in interface StoreIOExceptionpublic boolean doesMapContainerExist(Object id, String containerName) throws IOException
StoredoesMapContainerExist in interface StoreIOExceptionpublic MapContainer getMapContainer(Object id) throws IOException
StoregetMapContainer in interface StoreIOExceptionpublic MapContainer getMapContainer(Object id, String containerName) throws IOException
StoregetMapContainer in interface StoreIOExceptionpublic MapContainer getMapContainer(Object id, String containerName, boolean persistentIndex) throws IOException
StoregetMapContainer in interface StoreIOExceptionpublic void deleteMapContainer(Object id) throws IOException
StoredeleteMapContainer in interface StoreIOExceptionpublic void deleteMapContainer(Object id, String containerName) throws IOException
StoredeleteMapContainer in interface StoreIOExceptionpublic void deleteMapContainer(ContainerId containerId) throws IOException
StoredeleteMapContainer in interface StoreIOExceptionpublic Set<ContainerId> getMapContainerIds() throws IOException
StoregetMapContainerIds in interface StoreIOExceptionpublic boolean doesListContainerExist(Object id) throws IOException
StoredoesListContainerExist in interface StoreIOExceptionpublic boolean doesListContainerExist(Object id, String containerName) throws IOException
StoredoesListContainerExist in interface StoreIOExceptionpublic ListContainer getListContainer(Object id) throws IOException
StoregetListContainer in interface StoreIOExceptionpublic ListContainer getListContainer(Object id, String containerName) throws IOException
StoregetListContainer in interface StoreIOExceptionpublic ListContainer getListContainer(Object id, String containerName, boolean persistentIndex) throws IOException
StoregetListContainer in interface StoreIOExceptionpublic void deleteListContainer(Object id) throws IOException
StoredeleteListContainer in interface StoreIOExceptionpublic void deleteListContainer(Object id, String containerName) throws IOException
StoredeleteListContainer in interface StoreIOExceptionpublic void deleteListContainer(ContainerId containerId) throws IOException
StoredeleteListContainer in interface StoreIOExceptionpublic Set<ContainerId> getListContainerIds() throws IOException
StoregetListContainerIds in interface StoreIOExceptionpublic org.apache.activemq.kaha.impl.IndexRootContainer getListsContainer()
public org.apache.activemq.kaha.impl.IndexRootContainer getMapsContainer()
public DataManager getDataManager(String name) throws IOException
IOExceptionpublic IndexManager getIndexManager(DataManager dm, String name) throws IOException
IOExceptionpublic boolean isLogIndexChanges()
public void setLogIndexChanges(boolean logIndexChanges)
public long getMaxDataFileLength()
getMaxDataFileLength in interface Storepublic void setMaxDataFileLength(long maxDataFileLength)
setMaxDataFileLength in interface StoremaxDataFileLength - the maxDataFileLength to setpublic String getIndexTypeAsString()
public void setIndexTypeAsString(String type)
type - "PERSISTENT" or "VM"public boolean isPersistentIndex()
isPersistentIndex in interface Storepublic void setPersistentIndex(boolean persistentIndex)
StoresetPersistentIndex in interface Storepublic boolean isUseAsyncDataManager()
public void setUseAsyncDataManager(boolean useAsyncWriter)
public long size()
size in interface StoreStore.size()public String getDefaultContainerName()
getDefaultContainerName in interface Storepublic void setDefaultContainerName(String defaultContainerName)
StoresetDefaultContainerName in interface Storepublic void initialize() throws IOException
Storeinitialize in interface StoreIOExceptionCopyright © 2005–2017. All rights reserved.