|
||||||||||
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
org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource
public class NeoStoreXaDataSource
A NeoStoreXaDataSource
is a factory for
NeoStoreXaConnections
.
The NioNeoDbPersistenceSource
will create a NeoStoreXaDataSoruce
and then Neo4j kernel will use it to create XaConnections
and
XaResources
when running transactions and performing
operations on the node space.
Field Summary | |
---|---|
static byte[] |
BRANCH_ID
|
static String |
LOGICAL_LOG_DEFAULT_NAME
|
Constructor Summary | |
---|---|
NeoStoreXaDataSource(Map<Object,Object> config)
Creates a NeoStoreXaDataSource using configuration from
params . |
Method Summary | |
---|---|
void |
close()
Closes this data source. |
long |
getCreationTime()
Returns a timestamp when this data source was created. |
long |
getCurrentLogVersion()
Returns the current version of this data source. |
long |
getHighestPossibleIdInUse(Class<?> clazz)
|
long |
getLastCommittedTxId()
|
StringLogger |
getMsgLog()
|
NeoStore |
getNeoStore()
Creates a data source with minimum (no memory mapped) configuration. |
long |
getNumberOfIdsInUse(Class<?> clazz)
|
long |
getRandomIdentifier()
Returns a random identifier that gets generated when the data source is created. |
String |
getStoreDir()
|
StoreId |
getStoreId()
|
List<WindowPoolStats> |
getWindowPoolStats()
|
XaConnection |
getXaConnection()
Creates a XA connection to the resource this data source represents. |
XaContainer |
getXaContainer()
|
long |
incrementAndGetLogVersion()
|
boolean |
isReadOnly()
|
ClosableIterable<File> |
listStoreFiles(boolean includeLogicalLogs)
|
void |
logIdUsage()
|
void |
logStoreVersions()
|
long |
nextId(Class<?> clazz)
|
void |
setCurrentLogVersion(long version)
|
void |
setLastCommittedTxId(long txId)
|
boolean |
setRecovered(boolean recovered)
Returns previous value |
Methods inherited from class org.neo4j.kernel.impl.transaction.xaframework.LogBackedXaDataSource |
---|
deleteLogicalLog, getFileName, getLogExtractor, getLogicalLog, getLogicalLogLength, getMasterForCommittedTx, getPreparedTransaction, getPreparedTransaction, hasLogicalLog, isLogicalLogKept, keepLogicalLogs, rotateLogicalLog, setAutoRotate, setKeepLogicalLogsIfSpecified, setLogicalLogAtCreationTime, setLogicalLogTargetSize |
Methods inherited from class org.neo4j.kernel.impl.transaction.xaframework.XaDataSource |
---|
applyCommittedTransaction, applyPreparedTransaction, getBranchId, getName, setBranchId, setName, shouldKeepLog |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final byte[] BRANCH_ID
public static final String LOGICAL_LOG_DEFAULT_NAME
Constructor Detail |
---|
public NeoStoreXaDataSource(Map<Object,Object> config) throws IOException, InstantiationException
NeoStoreXaDataSource
using configuration from
params
. First the map is checked for the parameter
config
.
If that parameter exists a config file with that value is loaded (via
Properties.load(java.io.Reader)
). Any parameter that exist in the config file
and in the map passed into this constructor will take the value from the
map.
If config
parameter is set but file doesn't exist an
IOException
is thrown. If any problem is found with that
configuration file or Neo4j store can't be loaded an IOException is
thrown
.
params
- A map containing configuration parameters and/or configuration
file.
IOException
- If unable to create data source
InstantiationException
Method Detail |
---|
public NeoStore getNeoStore()
neoStoreFileName
- The file name of the storelogicalLogPath
- The file name of the logical log
IOException
- If unable to open storepublic void close()
XaDataSource
getXaConnection
after
this method has been invoked is illegal.
close
in class XaDataSource
public StoreId getStoreId()
public XaConnection getXaConnection()
XaDataSource
getXaConnection
in class XaDataSource
public long nextId(Class<?> clazz)
public long getHighestPossibleIdInUse(Class<?> clazz)
public long getNumberOfIdsInUse(Class<?> clazz)
public String getStoreDir()
public long getCreationTime()
XaDataSource
Creation time together with random identifier can be used to uniqley identify a data source (since it is possible to have multiple sources of same type).
getCreationTime
in class XaDataSource
public long getRandomIdentifier()
XaDataSource
Creation time together with the random identifier can be used to uniquely identify a data source (since it is possible to have multiple sources of the same type).
getRandomIdentifier
in class XaDataSource
public long getCurrentLogVersion()
XaDataSource
XaDataSource.rotateLogicalLog()
when XaDataSource.keepLogicalLogs(boolean)
is
set to true
will result in a log with that version created.
getCurrentLogVersion
in class XaDataSource
public long incrementAndGetLogVersion()
public void setCurrentLogVersion(long version)
public void setLastCommittedTxId(long txId)
setLastCommittedTxId
in class XaDataSource
public boolean isReadOnly()
public List<WindowPoolStats> getWindowPoolStats()
public long getLastCommittedTxId()
getLastCommittedTxId
in class XaDataSource
public XaContainer getXaContainer()
getXaContainer
in class XaDataSource
public boolean setRecovered(boolean recovered)
XaDataSource
setRecovered
in class XaDataSource
public ClosableIterable<File> listStoreFiles(boolean includeLogicalLogs)
listStoreFiles
in class XaDataSource
public StringLogger getMsgLog()
public void logStoreVersions()
public void logIdUsage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |