|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.core.journal.AbstractJournal
org.apache.jackrabbit.core.journal.DatabaseJournal
public class DatabaseJournal
Database-based journal implementation. Stores records inside a database table named
JOURNAL
, whereas the table GLOBAL_REVISION
contains the
highest available revision number. These tables are located inside the schema specified
in schemaObjectPrefix
.
revision
: the filename where the parent cluster node's revision
file should be written to; this is a required property with no default valuedriver
: the JDBC driver class name to use; this is a required
property with no default valueurl
: the JDBC connection url; this is a required property with
no default value schema
: the schema to be used; if not specified, this is the
second field inside the JDBC connection url, delimeted by colonsschemaObjectPrefix
: the schema object prefix to be used;
defaults to an empty stringuser
: username to specify when connectingpassword
: password to specify when connecting
Field Summary | |
---|---|
protected String |
schemaObjectPrefix
Schema object prefix, bean property. |
Constructor Summary | |
---|---|
DatabaseJournal()
|
Method Summary | |
---|---|
protected long |
append(String producerId,
InputStream in,
int length)
Append a record backed by a file. |
void |
close()
Close this journal. |
protected void |
doLock()
Lock the journal revision. |
protected void |
doUnlock(boolean successful)
Unlock the journal revision. |
String |
getDriver()
Bean getters |
String |
getPassword()
|
protected RecordIterator |
getRecords(long startRevision)
Return an iterator over all records after the specified revision. |
String |
getSchema()
|
String |
getSchemaObjectPrefix()
|
String |
getUrl()
|
String |
getUser()
|
void |
init(String id,
NamespaceResolver resolver)
Initialize journal. |
void |
setDriver(String driver)
Bean setters |
void |
setPassword(String password)
|
void |
setSchema(String schema)
|
void |
setSchemaObjectPrefix(String schemaObjectPrefix)
|
void |
setUrl(String url)
|
void |
setUser(String user)
|
Methods inherited from class org.apache.jackrabbit.core.journal.AbstractJournal |
---|
createProducer, doSync, getConsumer, getId, getProducer, getResolver, lockAndSync, register, sync, unlock, unregister |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String schemaObjectPrefix
Constructor Detail |
---|
public DatabaseJournal()
Method Detail |
---|
public void init(String id, NamespaceResolver resolver) throws JournalException
init
in interface Journal
init
in class AbstractJournal
id
- id this journal should use to write its own recordsresolver
- resolver used when reading/writing records
JournalException
- if an error occursprotected RecordIterator getRecords(long startRevision) throws JournalException
getRecords
in class AbstractJournal
startRevision
- start point (exlusive)
JournalException
- if an error occursprotected void doLock() throws JournalException
doLock
in class AbstractJournal
JournalException
- if an error occursprotected void doUnlock(boolean successful)
doUnlock
in class AbstractJournal
successful
- flag indicating whether the update process was
successfulprotected long append(String producerId, InputStream in, int length) throws JournalException
append
in class AbstractJournal
producerId
- producer identifierin
- input streamlength
- number of bytes in input stream
JournalException
- if an error occurspublic void close()
public String getDriver()
public String getUrl()
public String getSchema()
public String getSchemaObjectPrefix()
public String getUser()
public String getPassword()
public void setDriver(String driver)
public void setUrl(String url)
public void setSchema(String schema)
public void setSchemaObjectPrefix(String schemaObjectPrefix)
public void setUser(String user)
public void setPassword(String password)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |