⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ozoneinterface.java

📁 Java的面向对象数据库系统的源代码
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
     * @param args The parameter that are passed to the constructor.
     * @return proxy A OzoneProxy object for the newly created object.
     * @throws OzoneRemoteException (or one of its sub-classes) to signal a
     * ozone related problem.
     * @throws RuntimeException To signal an implementation specific problem,
     * such as {@link java.io.IOException}
     */
    public OzoneProxy createObject(Class type, Class[] sig, Object[] args) throws RuntimeException, OzoneRemoteException;


    /**
     * Copy an object. The new objects gets its own object ID. The specified
     * object is an instance of OzoneProxy which you may have created by
     * createObject().
     *
     *
     * @param rObj
     * @return proxy for the newly created object
     * @throws OzoneRemoteException (or one of its sub-classes) to signal a
     * ozone related problem.
     * @throws Exception To signal an implementation specific problem,
     * such as {@link java.io.IOException}
     */
    public OzoneProxy copyObject(OzoneRemote rObj) throws Exception;


    /**
     * Deletes the specified database object. The specified object is an
     * instance of OzoneProxy which you may have created by createObject().
     *
     *
     * @param rObj
     * @throws OzoneRemoteException (or one of its sub-classes) to signal a
     * ozone related problem.
     * @throws RuntimeException To signal an implementation specific problem,
     * such as {@link java.io.IOException}
     */
    public void deleteObject(OzoneRemote rObj) throws RuntimeException, OzoneRemoteException;


    /**
     * Assigns the specified object with the specified name. This can
     * also be done at object creation time. The specified object is an
     * instance of OzoneProxy which you may have created by createObject().
     *
     *
     * @param rObj
     * @param name
     * @throws OzoneRemoteException (or one of its sub-classes) to signal a
     * ozone related problem.
     * @throws Exception To signal an implementation specific problem,
     * such as {@link java.io.IOException}
     */
    public void nameObject(OzoneRemote rObj, String name) throws Exception;


    /**
     * Returns the object for the specifies name or null if there is no such
     * object.
     *
     *
     * @param name The name name of the object.
     * @return A proxy object for the found object or null.
     * @throws OzoneRemoteException (or one of its sub-classes) to signal a
     * ozone related problem.
     * @throws Exception To signal an implementation specific problem,
     * such as {@link java.io.IOException}
     */
    public OzoneProxy objectForName(String name) throws Exception;

    /**
     * fetch an array of all named objects
     *
     *
     * @return a String array of all named objects
     * @throws OzoneRemoteException (or one of its sub-classes) to signal a
     * ozone related problem.
     * @throws Exception To signal an implementation specific problem,
     * such as {@link java.io.IOException}
     */
    public String[] objectNames() throws Exception;

    /**
     * Returns the object for the specified handle or null if there is no such
     * object.
     *
     *
     * @param handle The handle of the object.
     * @return A proxy object for the found object or null.
     * @throws OzoneRemoteException (or one of its sub-classes) to signal a
     * ozone related problem.
     * @throws Exception To signal an implementation specific problem,
     * such as {@link java.io.IOException}
     */
    public OzoneProxy objectForHandle(String handle) throws Exception;

    /**
     * Invokes a method on the specified object. This method is called by
     * proxy objects to route the call to the corresponding database object.
     * A client will never call this method explicitly.
     *
     *
     * @param rObj OzoneProxy on which to call the method
     * @param methodName
     * @param sig signature of the method as String
     * @param args array of arguments
     * @param lockLevel specifies wether this method changes the state of the object
     * @return regular object or proxy
     * @throws OzoneRemoteException (or one of its sub-classes) to signal a
     * ozone related problem.
     * @throws Exception To signal an implementation specific problem,
     * such as {@link java.io.IOException}
     */
    public Object invoke(OzoneProxy rObj, String methodName, String sig, Object[] args, int lockLevel) throws Exception;


    public Object invoke(OzoneProxy rObj, int methodIndex, Object[] args, int lockLevel) throws Exception;


    /**
     * Returns the actual target of the given proxy if the actual implementation
     * is able to do so. A client will never call this method explicitly.
     */
    public OzoneCompatible fetch(OzoneProxy rObj, int lockLevel) throws Exception,org.ozoneDB.ObjectNotFoundException, java.io.IOException, java.lang.ClassNotFoundException, org.ozoneDB.TransactionException, org.ozoneDB.core.TransactionError;


    /**
     * Force the database server to reload all classes which extend
     * OzoneObject. This is particularly useful while testing new classes.
     *
     * @throws OzoneRemoteException (or one of its sub-classes) to signal a
     * ozone related problem.
     * @throws Exception To signal an implementation specific problem,
     * such as {@link java.io.IOException}
     */
    public void reloadClasses() throws Exception;


    /**
     * Convert the specified object into XML. This method returns the
     * generated XML data as DOM tree. For performance reasons you should
     * try to use {@link #xmlForObject(OzoneRemote, ContentHandler)}, which
     * returns SAX events, instead of DOM.
     * See the doc directory of ozone for a detailed description (XML Schema)
     * of the XML output of this method.
     *
     * @param rObj The database object to be converted.
     * @param domFactory The factory for creating DOM nodes.
     *
     * @return The DOM node representing the converted object.
     */
    public Node xmlForObject(OzoneRemote rObj, Document domFactory)
            throws Exception;


    /**
     * Converts the specified object into XML. This method returns the generated
     * XML data as SAX events. See the doc directory of ozone for a detailed
     * description (XML Schema) of the XML output of this method.
     *
     * @param rObj The database object to be converted.
     * @param ch The SAX ContentHandler to which the result is sent.
     */
    public void xmlForObject(OzoneRemote rObj, ContentHandler ch)
            throws Exception;


    //    /** Service handle to be used with the {@link #service()} method.*/
    //    public final static int	SERVICE_HANDLE_XML = 1;
    //
    //
    //    public OzoneService service (int serviceHandle)
    //        throws Exception;


    /**
        Creates a unique ID. This ID is unique to all other IDs returned by this method (and by the way also unique
        to all IDs used within the database). Though, the uniqueness is limited to the amount of states a long
        can represent. If 1000 unique IDs were created each second, the time of non-uniqueness would begin after
        584'942'417 years. So it would happen after the Y10k problem, where we can revise the software using these
        unique IDs... ;-)
    */
    /*
        Currently, we do not implement this.
        This method is (for an ExternalDatabase) surely slower and much more expensive than just waiting a millisecond
        and using the new UNIX epoch millisecond as ID exclusively. However, this would depend on a current time which
        never falls.
    */
    /*
    public long createUniqueID();
    */

    /**
        Internal method. This method is called by {@link OzoneProxy}s when they are dying (during finalize()). This
        is required, as the database may track the references the database client has to objects within the database
        in order to properly support garbage collection. If this method is called from anyone else than from the
        {@link OzoneProxy}.finalize()-Method, data loss may occur!

        @param proxy the OzoneProxy object which is dying. It may call this method exactly once.
    */
    public void notifyProxyDeath(OzoneProxy proxy);

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -