Class ObjectServerImpl

    • Method Detail

      • backup

        public void backup​(java.lang.String path)
                    throws java.io.IOException
        Description copied from interface: ExtObjectServer
        backs up the database file used by the ObjectServer.

        While the backup is running, the ObjectServer can continue to be used. Changes that are made while the backup is in progress, will be applied to the open ObjectServer and to the backup.

        While the backup is running, the ObjectContainer should not be closed.

        If a file already exists at the specified path, it will be overwritten.

        Specified by:
        backup in interface ExtObjectServer
        Parameters:
        path - a fully qualified path
        Throws:
        java.io.IOException
      • dispose

        public void dispose()
        System.IDisposable.Dispose()
      • close

        public boolean close()
        Description copied from interface: ObjectServer
        Closes the ObjectServer and writes all cached data.

        Specified by:
        close in interface ObjectServer
        Returns:
        true - denotes that the last instance connected to the used database file was closed.
      • iterateDispatchers

        public Iterator4 iterateDispatchers()
      • ext

        public ExtObjectServer ext()
        Description copied from interface: ObjectServer
        Returns an ExtObjectServer with extended functionality.

        Use this method to conveniently access extended methods.

        The functionality is split to two interfaces to allow newcomers to focus on the essential methods.
        Specified by:
        ext in interface ObjectServer
      • grantAccess

        public void grantAccess​(java.lang.String userName,
                                java.lang.String password)
        Description copied from interface: ObjectServer
        Grants client access to the specified user with the specified password.

        If the user already exists, the password is changed to the specified password.

        Specified by:
        grantAccess in interface ObjectServer
        Parameters:
        userName - the name of the user
        password - the password to be used
      • getUser

        public User getUser​(java.lang.String userName)
      • openClient

        public ObjectContainer openClient()
        Description copied from interface: ObjectServer
        Opens a client against this server.

        A client opened with this method operates within the same VM as the server. Since an embedded client use direct communication, without an in-between socket connection, performance will be better than a client opened with Db4oClientServer#openClient(java.lang.String, int, java.lang.String, java.lang.String)

        Every client has it's own transaction and uses it's own cache for it's own version of all persistent objects.
        Specified by:
        openClient in interface ObjectServer
      • revokeAccess

        public void revokeAccess​(java.lang.String userName)
        Description copied from interface: ExtObjectServer
        removes client access permissions for the specified user.

        Specified by:
        revokeAccess in interface ExtObjectServer
        Parameters:
        userName - the name of the user
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • addCommittedInfoMsg

        public void addCommittedInfoMsg​(MCommittedInfo message)
      • broadcastReplicationCommit

        public void broadcastReplicationCommit​(long timestamp,
                                               java.util.List concurrentTimestamps)
      • caresAboutCommitted

        public boolean caresAboutCommitted()
      • checkCaresAboutCommitted

        public void checkCaresAboutCommitted()
      • port

        public int port()
        Specified by:
        port in interface ExtObjectServer
        Returns:
        The local port this server uses, 0 if disconnected or in embedded mode
      • transactionCount

        public int transactionCount()