xmlBlaster 2.2.0 API

org.xmlBlaster.util.admin
Interface I_AdminMap

All Superinterfaces:
I_AdminPlugin, I_AdminUsage
All Known Subinterfaces:
PersistenceCachePluginMBean
All Known Implementing Classes:
PersistenceCachePlugin

public interface I_AdminMap
extends I_AdminPlugin

Declares available methods of a map implementation for administration.

SNMP or telnet tools can access only the here declared properties.
This interface is implemented by I_Map.java implementations delivering the meat.

Since:
1.0.5
Author:
xmlBlaster@marcelruff.info

Don't invoke any operations on this interface, it will certainly destroy your running application!, xmlBlaster@marcelruff.info

See Also:
I_Map

Method Summary
 java.lang.String checkConsistency(java.lang.String fixIt, java.lang.String reportFileName)
          Check if all messages in the storage are referenced by queue entries (history and callback queue).
 long clear()
          Delete all entries
 java.lang.String dumpEmbeddedObjectsToFile(java.lang.String fileName)
          Dump all entries of this map to a file.
 long getMaxNumOfBytes()
          returns the capacity (maximum bytes) for this storage
 long getMaxNumOfBytesCache()
          returns the cache capacity (maximum bytes) for this storage
 long getMaxNumOfEntries()
          returns the maximum number of elements for this store
 long getMaxNumOfEntriesCache()
          returns the maximum number of cached elements for this store
 long getNumOfBytes()
          Returns the amount of bytes currently in the storage If the implementation of this interface is not able to return the correct number of entries (for example if the implementation must make a remote call to a DB which is temporarly not available) it will return -1.
 long getNumOfCachedBytes()
          Returns the amount of bytes currently in the RAM part of the storage
 long getNumOfCachedEntries()
          Returns the number of elements in the RAM part of this storage.
 long getNumOfEntries()
          Returns the number of elements in this storage.
 long getNumOfPersistentBytes()
          Returns the amount of bytes used by the persistent entries in the storage If the implementation of this interface is not able to return the correct number of entries (for example if the implementation must make a remote call to a DB which is temporarly not available) it will return -1.
 long getNumOfPersistentEntries()
          Returns the number of elements having the persistent flag set in this storage.
 java.lang.String getPropertyStr()
          Access the current queue configuration.
 java.lang.String getQueueName()
          Returns the unique ID of this queue as found in the database XB_ENTRIES.queueName column.
 boolean isShutdown()
          Is the storage available?
 int removeById(long uniqueId)
          Remove the specified storage entry.
 java.lang.String removeOldestEntry()
          Remove the oldest storage entry from cache.
 int removeTransientEntries()
          Removes all the transient entries (the ones which have the flag 'persistent' set to false.
 java.lang.String setMaxNumOfBytes(long max)
          Increase the max number of bytes persistently.
 java.lang.String setMaxNumOfBytesCache(long max)
          Increase the max number of bytes of the cached part persistently.
 java.lang.String setMaxNumOfEntries(long max)
          Increase the max number of entries persistently.
 java.lang.String setMaxNumOfEntriesCache(long max)
          Increase the max number of entries of the cached part persistently.
 void shutdown()
          Performs what has to be done when the Map Plugin shuts down.
 java.lang.String usage()
           
 
Methods inherited from interface org.xmlBlaster.util.admin.I_AdminPlugin
getType, getVersion
 
Methods inherited from interface org.xmlBlaster.util.admin.I_AdminUsage
getUsageUrl, setUsageUrl
 

Method Detail

getPropertyStr

java.lang.String getPropertyStr()
Access the current queue configuration.


getQueueName

java.lang.String getQueueName()
Returns the unique ID of this queue as found in the database XB_ENTRIES.queueName column.

Returns:
For example "topicStore_heron"

removeById

int removeById(long uniqueId)
               throws java.lang.Exception
Remove the specified storage entry.

Parameters:
uniqueId - The entry identifier
Returns:
the number of elements erased.
Throws:
java.lang.Exception

removeOldestEntry

java.lang.String removeOldestEntry()
                                   throws java.lang.Exception
Remove the oldest storage entry from cache.

Returns:
The entry removed
Throws:
java.lang.Exception

getNumOfEntries

long getNumOfEntries()
Returns the number of elements in this storage. If the implementation of this interface is not able to return the correct number of entries (for example if the implementation must make a remote call to a DB which is temporary not available) it will return -1.

Returns:
int the number of elements

getNumOfCachedEntries

long getNumOfCachedEntries()
Returns the number of elements in the RAM part of this storage. If no cache map is used and there is no RAM storage beneath we return -1

Returns:
int the number of elements or -1 if not applicable

getNumOfPersistentEntries

long getNumOfPersistentEntries()
Returns the number of elements having the persistent flag set in this storage. If the implementation of this interface is not able to return the correct number of entries (for example if the implementation must make a remote call to a DB which is temporarly not available) it will return -1.

Returns:
int the number of elements currently in the store

getMaxNumOfEntries

long getMaxNumOfEntries()
returns the maximum number of elements for this store

Returns:
int the maximum number of elements in the storage

getMaxNumOfEntriesCache

long getMaxNumOfEntriesCache()
returns the maximum number of cached elements for this store

Returns:
int the maximum number of elements in the storage

setMaxNumOfEntries

java.lang.String setMaxNumOfEntries(long max)
Increase the max number of entries persistently.

Parameters:
max -
Returns:

setMaxNumOfEntriesCache

java.lang.String setMaxNumOfEntriesCache(long max)
Increase the max number of entries of the cached part persistently.

Parameters:
max -
Returns:

getNumOfBytes

long getNumOfBytes()
Returns the amount of bytes currently in the storage If the implementation of this interface is not able to return the correct number of entries (for example if the implementation must make a remote call to a DB which is temporarly not available) it will return -1.

Returns:
The number of elements currently in the storage

getNumOfCachedBytes

long getNumOfCachedBytes()
Returns the amount of bytes currently in the RAM part of the storage

Returns:
The number of elements currently in the storage or -1

getNumOfPersistentBytes

long getNumOfPersistentBytes()
Returns the amount of bytes used by the persistent entries in the storage If the implementation of this interface is not able to return the correct number of entries (for example if the implementation must make a remote call to a DB which is temporarly not available) it will return -1.

Returns:
int the number of elements currently in the storage

getMaxNumOfBytes

long getMaxNumOfBytes()
returns the capacity (maximum bytes) for this storage

Returns:
int the maximum number of elements in the storage

getMaxNumOfBytesCache

long getMaxNumOfBytesCache()
returns the cache capacity (maximum bytes) for this storage

Returns:
int the maximum number of elements in the storage

setMaxNumOfBytes

java.lang.String setMaxNumOfBytes(long max)
Increase the max number of bytes persistently.

Parameters:
max -
Returns:

setMaxNumOfBytesCache

java.lang.String setMaxNumOfBytesCache(long max)
Increase the max number of bytes of the cached part persistently.

Parameters:
max -
Returns:

removeTransientEntries

int removeTransientEntries()
                           throws java.lang.Exception
Removes all the transient entries (the ones which have the flag 'persistent' set to false.

Returns:
Number of entries erased
Throws:
java.lang.Exception

clear

long clear()
Delete all entries

Returns:
Number of entries removed

shutdown

void shutdown()
Performs what has to be done when the Map Plugin shuts down.

Specified by:
shutdown in interface I_AdminPlugin

isShutdown

boolean isShutdown()
Is the storage available?

Specified by:
isShutdown in interface I_AdminPlugin
Returns:
true if shutdown

dumpEmbeddedObjectsToFile

java.lang.String dumpEmbeddedObjectsToFile(java.lang.String fileName)
                                           throws java.lang.Exception
Dump all entries of this map to a file. The messages are XML formatted.

Parameters:
fileName - The file name to dump, may contain a path.
Returns:
Status string
Throws:
java.lang.Exception

checkConsistency

java.lang.String checkConsistency(java.lang.String fixIt,
                                  java.lang.String reportFileName)
Check if all messages in the storage are referenced by queue entries (history and callback queue).
Caution: The check does not check queues from plugins which may reference the messageUnit, please set fixIt=true only if you know what you are doing!

Parameters:
fixIt - "true": Unreferenced entries are deleted (ignoring case); else check is readonly,
reportFileName - The file name to dump the details
Returns:
The status report

usage

java.lang.String usage()
Specified by:
usage in interface I_AdminUsage
Returns:
a human readable usage help string

xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.