|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.neo4j.kernel.impl.transaction.xaframework.XaDataSource
org.neo4j.kernel.impl.transaction.xaframework.LogBackedXaDataSource
public abstract class LogBackedXaDataSource
| Constructor Summary | |
|---|---|
LogBackedXaDataSource(Map<?,?> params)
|
|
| Method Summary | |
|---|---|
boolean |
deleteLogicalLog(long version)
Deletes a log specific logical log. |
String |
getFileName(long version)
|
LogExtractor |
getLogExtractor(long startTxId,
long endTxIdHint)
|
ReadableByteChannel |
getLogicalLog(long version)
Returns a readable byte channel of the specified logical log. |
long |
getLogicalLogLength(long version)
|
Pair<Integer,Long> |
getMasterForCommittedTx(long txId)
|
ReadableByteChannel |
getPreparedTransaction(int identifier)
|
void |
getPreparedTransaction(int identifier,
LogBuffer targetBuffer)
|
boolean |
hasLogicalLog(long version)
Tests if a specific logical log exists. |
boolean |
isLogicalLogKept()
|
void |
keepLogicalLogs(boolean keepLogs)
Sets wether logical logs should be saved upon rotation or not. |
long |
rotateLogicalLog()
Rotates this logical log. |
void |
setAutoRotate(boolean rotate)
Turns off/on auto rotate of logical logs. |
protected void |
setKeepLogicalLogsIfSpecified(String configString,
String dataSourceName)
|
protected void |
setLogicalLogAtCreationTime(XaLogicalLog logicalLog)
Sets the XaLogicalLog at creation time (in constructor). |
void |
setLogicalLogTargetSize(long size)
Sets the target size of the logical log that will cause a rotation of the log if XaDataSource.setAutoRotate(boolean) is set to true. |
| Methods inherited from class org.neo4j.kernel.impl.transaction.xaframework.XaDataSource |
|---|
applyCommittedTransaction, applyPreparedTransaction, close, getBranchId, getCreationTime, getCurrentLogVersion, getLastCommittedTxId, getName, getRandomIdentifier, getXaConnection, getXaContainer, listStoreFiles, setBranchId, setLastCommittedTxId, setName, setRecovered, shouldKeepLog |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LogBackedXaDataSource(Map<?,?> params)
throws InstantiationException
InstantiationException| Method Detail |
|---|
protected void setLogicalLogAtCreationTime(XaLogicalLog logicalLog)
XaLogicalLog at creation time (in constructor). It is
done with this method because it can be so problematic in so many ways
to have a subclass pass in this to the constructor.
logicalLog - the XaLogicalLog to set.public boolean deleteLogicalLog(long version)
XaDataSource
deleteLogicalLog in class XaDataSourceversion - version of log to delete
public ReadableByteChannel getLogicalLog(long version)
throws IOException
XaDataSource
getLogicalLog in class XaDataSourceversion - version of the logical log
IOException - if no such log existpublic long getLogicalLogLength(long version)
getLogicalLogLength in class XaDataSourcepublic boolean hasLogicalLog(long version)
XaDataSource
hasLogicalLog in class XaDataSourceversion - the version of the logical log
true if the log existspublic boolean isLogicalLogKept()
isLogicalLogKept in class XaDataSourcepublic void keepLogicalLogs(boolean keepLogs)
XaDataSourcefalse.
keepLogicalLogs in class XaDataSourcekeepLogs - true means save, false means
delete
public long rotateLogicalLog()
throws IOException
XaDataSourceXaDataSource.keepLogicalLogs(boolean) is
configured to true the log will be saved and can be retrieved with the
XaDataSource.getLogicalLog(long) method. If not it will be deleted. Active
transactions get copied to a new logical log.
rotateLogicalLog in class XaDataSourceIOException - if unable to read old log or write to new onepublic void setAutoRotate(boolean rotate)
XaDataSourcetrue.
setAutoRotate in class XaDataSourcerotate - true to turn onpublic void setLogicalLogTargetSize(long size)
XaDataSourceXaDataSource.setAutoRotate(boolean) is set to true.
setLogicalLogTargetSize in class XaDataSourcesize - target size in bytespublic String getFileName(long version)
getFileName in class XaDataSource
public ReadableByteChannel getPreparedTransaction(int identifier)
throws IOException
getPreparedTransaction in class XaDataSourceIOException
public void getPreparedTransaction(int identifier,
LogBuffer targetBuffer)
throws IOException
getPreparedTransaction in class XaDataSourceIOException
public Pair<Integer,Long> getMasterForCommittedTx(long txId)
throws IOException
getMasterForCommittedTx in class XaDataSourceIOException
public LogExtractor getLogExtractor(long startTxId,
long endTxIdHint)
throws IOException
getLogExtractor in class XaDataSourceIOException
protected void setKeepLogicalLogsIfSpecified(String configString,
String dataSourceName)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||