📄 storemanager.java
字号:
// You can redistribute this software and/or modify it under the terms of
// the Ozone Core License version 1 published by ozone-db.org.
//
// The original code and portions created by SMB are
// Copyright (C) 1997-@year@ by SMB GmbH. All rights reserved.
//
// $Id: StoreManager.java,v 1.9 2003/08/12 15:11:10 leomekenkamp Exp $
package org.ozoneDB.core;
import java.io.*;
import org.ozoneDB.DxLib.*;
import org.ozoneDB.*;
/**
* Together with the {@link ObjectContainer} interface this is the StoreManager
* back-end API.<p>
*
*
* @author <a href="http://www.softwarebuero.de/">SMB</a>
* @version $Revision: 1.9 $Date: 2003/08/12 15:11:10 $
*/
public interface StoreManager {
/**
* Aid constructor, because a store is instantiated with 'newInstance',
* where we've got no arguments.
*/
public void init( Env env );
public void startup() throws Exception;
public void shutdown() throws Exception;
/**
* Creates a new object container and initializes it with the specified
* target object. The new container is immediatly accessible from the calling
* transaction via containerByID but it is not joined to this transaction.
* It needs to be joined and commited afterwards.
*
* Iff this method returns normally, the returned container is pinned and thus has to be unpinned.
* Iff this method returns normally, the returned container is locked with the given lock level.
*
* @param ta
* @param target
* @param objID
* @param permissions
* @param lockLevel
* @return An container-proxy for the created container.
*/
public ObjectContainer newContainerAndLock( Transaction ta, OzoneCompatible target, ObjectID objID,
Permissions permissions,int lockLevel) throws Exception;
/**
* Update lock level of the given container according to the leve of the
* containers lock object.
*/
public void updateLockLevel( Transaction ta, ObjectContainer container ) throws IOException;
/**
* Prepare the specified transaction for commit. All operations that may
* fail during the commit process should be done here. However, this method
* must not change any global data structures such as the idTable that
* are used by other transactions too.<p>
*
* The {@link TransactionManager} let this method run exclusivly. However,
* {@link #prepareCommitTransaction} and {@link #commitTransaction} are not
* an atomar operation.
*
*
* @param ta Transaction that will be commited.
*/
public void prepareCommitTransaction( Transaction ta ) throws IOException,ClassNotFoundException;
public void commitTransaction( Transaction ta ) throws IOException,ClassNotFoundException;
/**
* @param ta ID of the comitting transaction.
*/
public void abortTransaction( Transaction ta ) throws IOException,ClassNotFoundException;
/**
* @param ta the running transaction
* @return a String array of the all object names defined
*/
public DxSet objectNames(Transaction ta);
public ObjectContainer containerForID( Transaction ta, ObjectID id ) throws ObjectNotFoundException,IOException,ClassNotFoundException;
/**
* @param name The object name to search for.
* @param ta
* @return The object container for the name or null.
*/
public ObjectContainer containerForName( Transaction ta, String name ) throws Exception;
/**
* @param ta
* @param container
* @param name
*/
public void nameContainer( Transaction ta, ObjectContainer container, String name ) throws PermissionDeniedException;
/**
* Force the Store to make a guess which objects are used together with the
* container with the specified id.
* @param id The ObjectID if the container.
*/
public DxBag clusterOfID( ObjectID id ) throws Exception;
public DxIterator objectIDIterator();
/**
Tells this StoreManager to report every named object to the garbage collector.
*/
public void reportNamedObjectsToGarbageCollector();
/**
* Factory method for creating a new <code>Transaction</code>.
*/
public Transaction createTransaction(Env env, User user);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -