Documentation of 'org.apache.derby.impl.store.access.RAMAccessManager' Java class
RAMAccessManager
org.apache.derby.impl.store.access

Class RAMAccessManager

    • Constructor Summary

      Constructors 
      Constructor and Description
      RAMAccessManager()
      Constructors for This class:
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      Serviceable apply(java.lang.String key, java.io.Serializable value, java.util.Dictionary p)
      Apply a property change.
      void backup(java.lang.String backupDir, boolean wait)
      Backup the database to backupDir.
      void backupAndEnableLogArchiveMode(java.lang.String backupDir, boolean deleteOnlineArchivedLogFiles, boolean wait)
      Backup the database to a backup directory and enable the log archive mode that will keep the archived log files required for roll-forward from this version backup.
      void boot(boolean create, java.util.Properties startParams)
      Public Methods implementing ModuleControl Interface:
      void checkpoint()
      Checkpoints the database, that is, flushes all dirty data to disk.
      void createFinished()
      Database creation finished.
      void createReadMeFiles()
      DERBY-5996(Create readme files (cautioning users against modifying database files) at database hard upgrade time) This gets called during hard upgrade.
      void disableLogArchiveMode(boolean deleteOnlineArchivedLogFiles)
      disables the log archival process, i.e No old log files will be kept around for a roll-forward recovery.
      void failover(java.lang.String dbname)
      Start the failover for this database.
      MethodFactory findMethodFactoryByFormat(UUID format)
      Find an access method that implements a format type.
      MethodFactory findMethodFactoryByImpl(java.lang.String impltype)
      Find an access method that implements an implementation type.
      void freeze()
      Freeze the database temporarily so a backup can be taken.
      TransactionController getAndNameTransaction(ContextManager cm, java.lang.String transName)
      Get a transaction.
      LockFactory getLockFactory()
      Get the LockFactory to use with this store.
      TransactionController getTransaction(ContextManager cm)
      Get a transaction controller with which to manipulate data within the access manager.
      TransactionInfo[] getTransactionInfo()
      Return a snap shot of all transactions in the db.
      java.lang.Object getXAResourceManager()
      Return the XAResourceManager associated with this AccessFactory.
      void init(boolean dbOnly, java.util.Dictionary p)
      Initialize the properties for this callback.
      boolean isReadOnly()
      Is the store read-only.
      java.io.Serializable map(java.lang.String key, java.io.Serializable value, java.util.Dictionary p)
      Map a proposed new value for a property to an official value.
      Cacheable newCacheable(CacheManager cm) 
      void registerAccessMethod(MethodFactory factory)
      Register an access method that this access manager can use.
      void startReplicationMaster(java.lang.String dbmaster, java.lang.String host, int port, java.lang.String replicationMode)
      Start the replication master role for this database.
      java.lang.Object startXATransaction(ContextManager cm, int format_id, byte[] global_id, byte[] branch_id)
      Start a global transaction.
      void stop()
      Stop the module.
      void stopReplicationMaster()
      Stop the replication master role for this database.
      void unfreeze()
      Unfreeze the database after a backup has been taken.
      boolean validate(java.lang.String key, java.io.Serializable value, java.util.Dictionary p)
      Validate a property change.
      void waitForPostCommitToFinishWork() 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RAMAccessManager

        public RAMAccessManager()
        Constructors for This class:
    • Method Detail

      • getLockFactory

        public LockFactory getLockFactory()
        Description copied from interface: AccessFactory
        Get the LockFactory to use with this store.
        Specified by:
        getLockFactory in interface AccessFactory
        Returns:
        The lock factory to use with this store.
      • startXATransaction

        public java.lang.Object startXATransaction(ContextManager cm,
                                                   int format_id,
                                                   byte[] global_id,
                                                   byte[] branch_id)
                                            throws StandardException
        Start a global transaction.

        Get a transaction controller with which to manipulate data within the access manager. Implicitly creates an access context.

        Must only be called if no other transaction context exists in the current context manager. If another transaction exists in the context an exception will be thrown.

        The (format_id, global_id, branch_id) triplet is meant to come exactly from a javax.transaction.xa.Xid. We don't use Xid so that the system can be delivered on a non-1.2 vm system and not require the javax classes in the path.

        Specified by:
        startXATransaction in interface AccessFactory
        Parameters:
        cm - The context manager for the current context.
        format_id - the format id part of the Xid - ie. Xid.getFormatId().
        global_id - the global transaction identifier part of XID - ie. Xid.getGlobalTransactionId().
        branch_id - The branch qualifier of the Xid - ie. Xid.getBranchQaulifier()
        Throws:
        StandardException - Standard exception policy.
        See Also:
        TransactionController
      • getXAResourceManager

        public java.lang.Object getXAResourceManager()
                                              throws StandardException
        Return the XAResourceManager associated with this AccessFactory.

        Returns an object which can be used to implement the "offline" 2 phase commit interaction between the accessfactory and outstanding transaction managers taking care of in-doubt transactions.

        Specified by:
        getXAResourceManager in interface AccessFactory
        Returns:
        The XAResourceManager associated with this accessfactory.
        Throws:
        StandardException - Standard exception policy.
      • createReadMeFiles

        public void createReadMeFiles()
                               throws StandardException
        DERBY-5996(Create readme files (cautioning users against modifying database files) at database hard upgrade time) This gets called during hard upgrade. It will create 3 readme files one in database directory, one in "seg0" directory and one in log directory. These readme files warn users against touching any of files associated with derby database
        Specified by:
        createReadMeFiles in interface AccessFactory
        Throws:
        StandardException
      • getTransactionInfo

        public TransactionInfo[] getTransactionInfo()
        Description copied from interface: AccessFactory
        Return a snap shot of all transactions in the db.

        Take a snap shot of all transactions currently in the database and make a record of their information.

        Specified by:
        getTransactionInfo in interface AccessFactory
        Returns:
        an array of TransactionInfo, or null if there is no transaction in the database.
      • startReplicationMaster

        public void startReplicationMaster(java.lang.String dbmaster,
                                           java.lang.String host,
                                           int port,
                                           java.lang.String replicationMode)
                                    throws StandardException
        Start the replication master role for this database.
        Specified by:
        startReplicationMaster in interface AccessFactory
        Parameters:
        dbmaster - The master database that is being replicated.
        host - The hostname for the slave
        port - The port the slave is listening on
        replicationMode - The type of replication contract. Currently only asynchronous replication is supported, but 1-safe/2-safe/very-safe modes may be added later.
        Throws:
        StandardException - Standard Derby exception policy, thrown on error.
      • failover

        public void failover(java.lang.String dbname)
                      throws StandardException
        Description copied from interface: AccessFactory
        Start the failover for this database.
        Specified by:
        failover in interface AccessFactory
        Parameters:
        dbname - the replication database that is being failed over.
        Throws:
        StandardException - Standard Derby exception policy, 1) If the failover succeeds, an exception is thrown to indicate that the master database was shutdown after a successful failover 2) If a failure occurs during network communication with slave.
        See Also:
        AccessFactory.failover(String dbname).
      • backup

        public void backup(java.lang.String backupDir,
                           boolean wait)
                    throws StandardException
        Description copied from interface: AccessFactory
        Backup the database to backupDir.

        Please see Derby on line documentation on backup and restore.

        Specified by:
        backup in interface AccessFactory
        Parameters:
        backupDir - the name of the directory where the backup should be stored.
        wait - if true, waits for all the backup blocking operations in progress to finish.
        Throws:
        StandardException - Thrown on error
      • backupAndEnableLogArchiveMode

        public void backupAndEnableLogArchiveMode(java.lang.String backupDir,
                                                  boolean deleteOnlineArchivedLogFiles,
                                                  boolean wait)
                                           throws StandardException
        Description copied from interface: AccessFactory
        Backup the database to a backup directory and enable the log archive mode that will keep the archived log files required for roll-forward from this version backup.
        Specified by:
        backupAndEnableLogArchiveMode in interface AccessFactory
        Parameters:
        backupDir - the directory name where the database backup should go. This directory will be created if not it does not exist.
        deleteOnlineArchivedLogFiles - If true deletes online archived log files that exist before this backup, delete will occur only after backup is complete.
        wait - if true, waits for all the backup blocking operations in progress to finish.
        Throws:
        StandardException - Thrown on error
      • disableLogArchiveMode

        public void disableLogArchiveMode(boolean deleteOnlineArchivedLogFiles)
                                   throws StandardException
        Description copied from interface: AccessFactory
        disables the log archival process, i.e No old log files will be kept around for a roll-forward recovery.
        Specified by:
        disableLogArchiveMode in interface AccessFactory
        Parameters:
        deleteOnlineArchivedLogFiles - If true deletes all online archived log files that exist before this call immediately; Only restore that can be performed after disabling log archive mode is version recovery.
        Throws:
        StandardException - Thrown on error
      • stop

        public void stop()
        Description copied from interface: ModuleControl
        Stop the module. The module may be found via a findModule() method until some time after this method returns. Therefore the factory must be prepared to reject requests to it once it has been stopped. In addition other modules may cache a reference to the module and make requests of it after it has been stopped, these requests should be rejected as well.
        Specified by:
        stop in interface ModuleControl
        See Also:
        Monitor, ModuleFactory
      • init

        public void init(boolean dbOnly,
                         java.util.Dictionary p)
        Description copied from interface: PropertySetCallback
        Initialize the properties for this callback. Called when addPropertySetNotification() is called with a non-null transaction controller. This allows code to set read its initial property values at boot time.

        Code within an init() method should use the 3 argument PropertyUtil method getPropertyFromSet() to obtain a property's value.

        Specified by:
        init in interface PropertySetCallback
        Parameters:
        dbOnly - true if only per-database properties are to be looked at
        p - the complete set of per-database properties.
      • validate

        public boolean validate(java.lang.String key,
                                java.io.Serializable value,
                                java.util.Dictionary p)
                         throws StandardException
        Description copied from interface: PropertySetCallback
        Validate a property change.
        Specified by:
        validate in interface PropertySetCallback
        Parameters:
        key - Property key for the property being set
        value - proposed new value for the property being set or null if the property is being dropped.
        p - Property set before the change. SettingProperty may read but must never change p.
        Returns:
        true if this object was interested in this property, false otherwise.
        Throws:
        StandardException - Oh well.
      • apply

        public Serviceable apply(java.lang.String key,
                                 java.io.Serializable value,
                                 java.util.Dictionary p)
                          throws StandardException
        Description copied from interface: PropertySetCallback
        Apply a property change. Will only be called after validate has been called and only if validate returned true. If this method is called then the new value is the value to be used, ie. the property is not set in the overriding JVM system set.
        Specified by:
        apply in interface PropertySetCallback
        Parameters:
        key - Property key for the property being set
        value - proposed new value for the property being set or null if the property is being dropped.
        p - Property set before the change. SettingProperty may read but must never change p.
        Returns:
        post commit work for the property change.
        Throws:
        StandardException - Oh well.
      • map

        public java.io.Serializable map(java.lang.String key,
                                        java.io.Serializable value,
                                        java.util.Dictionary p)
                                 throws StandardException
        Description copied from interface: PropertySetCallback
        Map a proposed new value for a property to an official value. Will only be called after apply() has been called.
        Specified by:
        map in interface PropertySetCallback
        Parameters:
        key - Property key for the property being set
        value - proposed new value for the property being set or null if the property is being dropped.
        p - Property set before the change. SettingProperty may read but must never change p.
        Returns:
        new value for the change
        Throws:
        StandardException - Oh well.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.