Package org.teamapps.universaldb
Class UniversalDB
java.lang.Object
org.teamapps.universaldb.UniversalDB
- All Implemented Interfaces:
DataBaseMapper,TransactionHandler
public class UniversalDB extends java.lang.Object implements DataBaseMapper, TransactionHandler
-
Constructor Summary
Constructors Constructor Description UniversalDB(java.io.File storagePath, SchemaInfoProvider schemaInfo, FileStore fileStore, ClusterConfig clusterConfig) -
Method Summary
-
Constructor Details
-
UniversalDB
public UniversalDB(java.io.File storagePath, SchemaInfoProvider schemaInfo, FileStore fileStore, ClusterConfig clusterConfig) throws java.lang.Exception- Throws:
java.lang.Exception
-
-
Method Details
-
getUserId
public static int getUserId() -
setUserId
public static void setUserId(int userId) -
startThreadLocalTransaction
public static void startThreadLocalTransaction() -
getThreadLocalTransaction
-
executeThreadLocalTransaction
public static void executeThreadLocalTransaction() -
createStandalone
public static UniversalDB createStandalone(java.io.File storagePath, SchemaInfoProvider schemaInfoProvider) throws java.lang.Exception- Throws:
java.lang.Exception
-
createStandalone
public static UniversalDB createStandalone(java.io.File storagePath, Schema schema) throws java.io.IOException- Throws:
java.io.IOException
-
createClusterNode
public static UniversalDB createClusterNode(java.io.File storagePath, Schema schema, ClusterConfig clusterConfig) throws java.io.IOException- Throws:
java.io.IOException
-
createClusterNode
public static UniversalDB createClusterNode(java.io.File storagePath, ClusterConfig clusterConfig) throws java.io.IOException- Throws:
java.io.IOException
-
executeTransaction
- Throws:
java.io.IOException
-
synchronizeTransaction
- Throws:
java.io.IOException
-
getSchemaIndex
-
getDatabaseById
- Specified by:
getDatabaseByIdin interfaceDataBaseMapper
-
getCollectionIndexById
- Specified by:
getCollectionIndexByIdin interfaceDataBaseMapper
-
getColumnById
- Specified by:
getColumnByIdin interfaceDataBaseMapper
-
getCurrentTransactionId
public long getCurrentTransactionId()- Specified by:
getCurrentTransactionIdin interfaceTransactionHandler
-
getLastTransactionId
public long getLastTransactionId()- Specified by:
getLastTransactionIdin interfaceTransactionHandler
-
getTransactionCount
public long getTransactionCount()- Specified by:
getTransactionCountin interfaceTransactionHandler
-
getSchema
- Specified by:
getSchemain interfaceTransactionHandler
-
updateSchema
- Specified by:
updateSchemain interfaceTransactionHandler- Throws:
java.io.IOException
-
getTransactions
public java.util.Iterator<byte[]> getTransactions(long startTransaction, long lastTransaction)- Specified by:
getTransactionsin interfaceTransactionHandler
-
handleTransactionSynchronizationPacket
- Specified by:
handleTransactionSynchronizationPacketin interfaceTransactionHandler
-
getDatabaseMapper
- Specified by:
getDatabaseMapperin interfaceTransactionHandler
-
getTransactionIdProvider
- Specified by:
getTransactionIdProviderin interfaceTransactionHandler
-
executeTransactionRequest
public void executeTransactionRequest(TransactionRequest transactionRequest) throws java.io.IOException- Specified by:
executeTransactionRequestin interfaceTransactionHandler- Throws:
java.io.IOException
-