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

📄 ozoneiterator.java

📁 Java的面向对象数据库系统的源代码
💻 JAVA
字号:
// This file is// Copyright (C) 2002-@year@ Leo Mekenkamp. All rights reserved.// $Id: OzoneCollection.java,v 1.4 2003/10/28 13:01:42 leomekenkamp Exp $// // This file is part of the Ozone Collections package.// // Ozone Collections is free software; you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation; either version 2, or (at your option)// any later version.// // Ozone Collections is distributed in the hope that it will be useful, but// WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU// General Public License for more details.// // You should have received a copy of the GNU General Public License// along with GNU Classpath; see the file COPYING.  If not, write to the// Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA// 02111-1307 USA.// // Linking this library statically or dynamically with other modules is// making a combined work based on this library.  Thus, the terms and// conditions of the GNU General Public License cover the whole// combination.// // As a special exception, the copyright holders of this library give you// permission to link this library with independent modules to produce an// executable, regardless of the license terms of these independent// modules, and to copy and distribute the resulting executable under// terms of your choice, provided that you also meet, for each linked// independent module, the terms and conditions of the license of that// module.  An independent module is a module which is not derived from// or based on this library.  If you modify this library, you may extend// this exception to your version of the library, but you are not// obligated to do so.  If you do not wish to do so, delete this// exception statement from your version.package org.ozoneDB.collections;import java.util.Iterator;import org.ozoneDB.OzoneRemote;/** * <p>Used by implementations of <code>FullXxx</code> Ozone collections. <code>NodeXxx</code> * have no need for server side iterators. All <code>FullXxx</code> use non-Ozone * objects for 'nodes' inside, all <code>NodeXxx</code> <i>do</i> use Ozone * objects for their internal structure. As an <code>Iterator</code> has direct * links to these internal node objects, it is possible for <code>NodeXxx</code> * collections to have non-Ozone iterators, since they only reference Ozone objects. * This means these iterators can simply be serializable and can leave the * Ozone server. Iterators for <code>FullXxx</code> collections however can not * leave the server since they reference non-Ozone objects; simply serializing * them and sending them to the client would cause the internal node structure * to be copied and send to the client as well. Therefor <code>FullXxx</code> * collections need a server side iterator.</p> * <p>Because an <code>OzoneIterator</code> references non-Ozone objects that * 'belong' to an other Ozone object special precautions have to be taken to * assure that if the collection that an iterator is connected to is serialized, * that the iterator itself does not continue using the non-Ozone objects that * are serialized in the same container as the collection (or vice versa: the  * iterator is serialized but the collection is not). One such a precaution * can be throwing a <code>ConcurrentModificationException</code> when one of * the two have been serialized. This is slightly abusing the specs as layed out * by Sun, but there is no other workaround IMHO, at least not until Ozone * supports a way of storing 2 objects in 1 container or keeping objects forced * in main memory.</p> *  * @author <a href="mailto:ozoneATmekenkampD0Tcom">Leo Mekenkamp (mind the anti-sp@m)</a> */public interface OzoneIterator extends Iterator, OzoneRemote {        public Object next(); /*update*/        public void remove(); /*update*/    }

⌨️ 快捷键说明

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