|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.engine.persistence.MsgFileDumper
public final class MsgFileDumper
A very simple, file based dump of a message.
We store messages on the hard disk, one message to one file (plus a key and a qos file).
All methods are marked final, in hope to have some performance gain (could be changed to allow a customized driver)
Invoke (for testing only):
jaco org.xmlBlaster.engine.persistence.MsgFileDumper
Field Summary | |
---|---|
private Global |
glob
|
private static java.util.logging.Logger |
log
|
private static java.lang.String |
ME
|
private java.lang.String |
path
|
private java.lang.String |
XMLKEY_TOKEN
|
private java.lang.String |
XMLQOS_TOKEN
|
Constructor Summary | |
---|---|
MsgFileDumper()
|
Method Summary | |
---|---|
java.lang.String |
createFileName(java.lang.String oid,
long timestamp)
|
void |
erase(XmlKey xmlKey)
Allows a stored message to be deleted. |
MsgUnit |
fetch(java.lang.String oid,
long timestamp)
Allows to fetch one message by oid and timestamp from the persistence. |
java.util.Enumeration |
fetchAllOids()
Fetches all oid's of the messages from the persistence. |
java.lang.String |
getPersistenceFileName(java.lang.String fileName)
|
java.lang.String |
getPersistencePath()
|
void |
init(Global glob)
Initializes an instance, creates and checks harddisk path |
void |
init(Global glob,
java.lang.String path_)
Initializes an instance, creates and checks harddisk path |
static void |
main(java.lang.String[] args)
Invoke: java org.xmlBlaster.engine.persistence.MsgFileDumper |
void |
shutdown()
Closes the instance of the filedriver plugin |
java.lang.String |
store(MsgUnitWrapper msgUnitWrapper)
Allows a message to be stored. |
private java.lang.String |
store(MsgUnitWrapper msgUnitWrapper,
boolean updateOnly)
|
java.lang.String |
update(MsgUnitWrapper msgUnitWrapper)
Allows a stored message content to be updated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String ME
private Global glob
private static java.util.logging.Logger log
private java.lang.String path
private final java.lang.String XMLKEY_TOKEN
private final java.lang.String XMLQOS_TOKEN
Constructor Detail |
---|
public MsgFileDumper()
Method Detail |
---|
public void init(Global glob) throws XmlBlasterException
ServerScope
- Global object holding logging and property informations
XmlBlasterException
public void init(Global glob, java.lang.String path_) throws XmlBlasterException
glob
- Global object holding logging and property informationspath_
- The path were to dump or null/empty
XmlBlasterException
public void shutdown() throws XmlBlasterException
XmlBlasterException
public java.lang.String createFileName(java.lang.String oid, long timestamp)
public java.lang.String getPersistencePath()
public java.lang.String getPersistenceFileName(java.lang.String fileName)
public java.lang.String store(MsgUnitWrapper msgUnitWrapper) throws XmlBlasterException
msgUnitWrapper
- The container with all necessary message info.
XmlBlasterException
private java.lang.String store(MsgUnitWrapper msgUnitWrapper, boolean updateOnly) throws XmlBlasterException
XmlBlasterException
public java.lang.String update(MsgUnitWrapper msgUnitWrapper) throws XmlBlasterException
xmlKey
- To identify the messagecontent
- The data to storeqos
- The quality of service, may contain another publisher name
XmlBlasterException
public MsgUnit fetch(java.lang.String oid, long timestamp) throws XmlBlasterException
oid
- The message oid (key oid="...")
XmlBlasterException
public java.util.Enumeration fetchAllOids() throws XmlBlasterException
XmlBlasterException
public void erase(XmlKey xmlKey) throws XmlBlasterException
xmlKey
- To identify the message
XmlBlasterException
public static void main(java.lang.String[] args)
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |