Interface ODatabaseInternal<T>

All Superinterfaces:
AutoCloseable, Closeable, OBackupable, ODatabase<T>
All Known Subinterfaces:
ODatabaseDocumentInternal
All Known Implementing Classes:
ODatabaseDocumentAbstract, ODatabaseDocumentDistributed, ODatabaseDocumentDistributedPooled, ODatabaseDocumentEmbedded, ODatabaseDocumentEmbeddedPooled, ODatabaseDocumentRemote, ODatabaseDocumentRemotePooled, ODatabaseWrapperAbstract, OObjectDatabaseTx

public interface ODatabaseInternal<T> extends ODatabase<T>
  • Method Details

    • getStorage

      OStorage getStorage()
      Returns the underlying storage implementation.
      Returns:
      The underlying storage implementation
      See Also:
    • getStorageInfo

      OStorageInfo getStorageInfo()
    • setUser

      void setUser(OSecurityUser user)
      Set user for current database instance.
    • replaceStorage

      void replaceStorage(OStorage iNewStorage)
      Internal only: replace the storage with a new one.
      Parameters:
      iNewStorage - The new storage to use. Usually it's a wrapped instance of the current cluster.
    • resetInitialization

      void resetInitialization()
    • getDatabaseOwner

      ODatabaseInternal<?> getDatabaseOwner()
      Returns the database owner. Used in wrapped instances to know the up level ODatabase instance.
      Returns:
      Returns the database owner.
    • setDatabaseOwner

      ODatabaseInternal<?> setDatabaseOwner(ODatabaseInternal<?> iOwner)
      Internal. Sets the database owner.
    • getUnderlying

      <DB extends ODatabase> DB getUnderlying()
      Return the underlying database. Used in wrapper instances to know the down level ODatabase instance.
      Returns:
      The underlying ODatabase implementation.
    • setInternal

      void setInternal(ODatabase.ATTRIBUTES attribute, Object iValue)
      Internal method. Don't call it directly unless you're building an internal component.
    • getSharedContext

      OSharedContext getSharedContext()
    • getLocalNodeName

      default String getLocalNodeName()
      returns the cluster map for current deploy. The keys of the map are node names, the values contain names of clusters (data files) available on the single node.
      Returns:
      the cluster map for current deploy
    • getActiveDataCenterMap

      default Map<String,Set<String>> getActiveDataCenterMap()
      returns the data center map for current deploy. The keys are data center names, the values are node names per data center
      Returns:
      data center map for current deploy
    • isSharded

      default boolean isSharded()
      checks the cluster map and tells whether this is a sharded database (ie. a distributed DB where at least two nodes contain distinct subsets of data) or not
      Returns:
      true if the database is sharded, false otherwise
    • getEnterpriseEndpoint

      default OEnterpriseEndpoint getEnterpriseEndpoint()
      Returns:
      an endpoint for Enterprise features. Null in Community Edition
    • getStats

      default ODatabaseStats getStats()
    • resetRecordLoadStats

      default void resetRecordLoadStats()
    • addRidbagPrefetchStats

      default void addRidbagPrefetchStats(long execTimeMs)
    • createInterruptTimerTask

      default TimerTask createInterruptTimerTask()
      creates an interrupt timer task for this db instance (without scheduling it!)
      Returns:
      the timer task. Null if this operation is not supported for current db impl.
    • save

      <RET extends T> RET save(T iObject, String iClusterName, boolean forceCreate)
      Saves an entity in the specified cluster specifying the mode. If the entity is not dirty, then the operation will be ignored. For custom entity implementations assure to set the entity as dirty. If the cluster does not exist, an error will be thrown.
      Parameters:
      iObject - The entity to save
      iClusterName - Name of the cluster where to save
      iForceCreate - Flag that indicates that record should be created. If record with current rid already exists, exception is thrown