Class UniversalDB

java.lang.Object
org.teamapps.universaldb.UniversalDB
All Implemented Interfaces:
DataBaseMapper

public class UniversalDB
extends java.lang.Object
implements DataBaseMapper
  • Field Details

    • SKIP_DB_LOGGING

      public static final org.slf4j.Marker SKIP_DB_LOGGING
  • Constructor Details

    • UniversalDB

      public UniversalDB​(java.io.File storagePath, SchemaInfoProvider schemaInfo, java.lang.String clusterSecret, int port) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • UniversalDB

      public UniversalDB​(java.io.File storagePath, SchemaInfoProvider schemaInfo, java.lang.String clusterSecret, int port, org.teamapps.cluster.network.NodeAddress leaderNode) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • UniversalDB

      public UniversalDB​(java.io.File storagePath, LogIterator logIterator) throws java.lang.Exception
      Throws:
      java.lang.Exception
  • Method Details

    • getUserId

      public static int getUserId()
    • setUserId

      public static void setUserId​(int userId)
    • 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, SchemaInfoProvider schemaInfoProvider, FileStore fileStore) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • addAuxiliaryModel

      public void addAuxiliaryModel​(SchemaInfoProvider schemaInfo, java.lang.ClassLoader classLoader) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • getEntityClass

      public java.lang.Class getEntityClass​(TableIndex tableIndex)
    • getQueryClass

      public java.lang.Class getQueryClass​(TableIndex tableIndex)
    • getTableIndexByPath

      public TableIndex getTableIndexByPath​(java.lang.String path)
    • createTransactionRequest

      public TransactionRequest createTransactionRequest()
    • createModelUpdateTransactionRequest

      public TransactionRequest createModelUpdateTransactionRequest​(Schema schema)
    • createInitialTableTransactions

      public void createInitialTableTransactions​(TableIndex tableIndex) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • executeTransaction

      public ResolvedTransaction executeTransaction​(TransactionRequest transaction)
    • createDatabaseDump

      public void createDatabaseDump​(java.io.File dumpFolder) throws java.io.IOException
      Throws:
      java.io.IOException
    • getDatabaseById

      public DatabaseIndex getDatabaseById​(int mappingId)
      Specified by:
      getDatabaseById in interface DataBaseMapper
    • getTableIndexById

      public TableIndex getTableIndexById​(int mappingId)
      Specified by:
      getTableIndexById in interface DataBaseMapper
    • getColumnById

      public ColumnIndex getColumnById​(int mappingId)
      Specified by:
      getColumnById in interface DataBaseMapper
    • getSchemaIndex

      public SchemaIndex getSchemaIndex()
    • getTransactionIndex

      public TransactionIndex getTransactionIndex()
    • getUpdateEventQueue

      public java.util.concurrent.ArrayBlockingQueue<RecordUpdateEvent> getUpdateEventQueue()