Adding JMCR-Stable version
[Benchmarks_CSolver.git] / JMCR-Stable / real-world application / derby-10.3.2.1 / java / engine / org / apache / derby / iapi / store / raw / StreamContainerHandle.java
diff --git a/JMCR-Stable/real-world application/derby-10.3.2.1/java/engine/org/apache/derby/iapi/store/raw/StreamContainerHandle.java b/JMCR-Stable/real-world application/derby-10.3.2.1/java/engine/org/apache/derby/iapi/store/raw/StreamContainerHandle.java
new file mode 100644 (file)
index 0000000..e7de1e3
--- /dev/null
@@ -0,0 +1,111 @@
+/*\r
+\r
+   Derby - Class org.apache.derby.iapi.store.raw.StreamContainerHandle\r
+\r
+   Licensed to the Apache Software Foundation (ASF) under one or more\r
+   contributor license agreements.  See the NOTICE file distributed with\r
+   this work for additional information regarding copyright ownership.\r
+   The ASF licenses this file to you under the Apache License, Version 2.0\r
+   (the "License"); you may not use this file except in compliance with\r
+   the License.  You may obtain a copy of the License at\r
+\r
+      http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+   Unless required by applicable law or agreed to in writing, software\r
+   distributed under the License is distributed on an "AS IS" BASIS,\r
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+   See the License for the specific language governing permissions and\r
+   limitations under the License.\r
+\r
+ */\r
+\r
+package org.apache.derby.iapi.store.raw;\r
+\r
+import org.apache.derby.iapi.error.StandardException;\r
+\r
+import org.apache.derby.iapi.types.DataValueDescriptor;\r
+\r
+import java.util.Properties;\r
+\r
+/**\r
+       A Stream Container handle\r
+*/\r
+\r
+public interface StreamContainerHandle {\r
+\r
+       public static final int TEMPORARY_SEGMENT = -1;\r
+\r
+       /**\r
+               Return my identifier.\r
+       */\r
+       public ContainerKey getId();\r
+\r
+    /**\r
+     * Request the system properties associated with a container. \r
+     * <p>\r
+     * Request the value of properties that are associated with a stream table.\r
+        * The following properties can be requested:\r
+     *     derby.storage.streamFileBufferSize \r
+     * <p>\r
+     * To get the value of a particular property add it to the property list,\r
+     * and on return the value of the property will be set to it's current \r
+     * value.  For example:\r
+     *\r
+     * get_prop(ConglomerateController cc)\r
+     * {\r
+     *     Properties prop = new Properties();\r
+     *     prop.put("derby.storage.streamFileBufferSize", "");\r
+     *     cc.getTableProperties(prop);\r
+     *\r
+     *     System.out.println(\r
+     *         "table's buffer size = " + \r
+     *         prop.getProperty("derby.storage.streamFileBufferSize");\r
+     * }\r
+     *\r
+     * @param prop   Property list to fill in.\r
+     *\r
+        * @exception  StandardException  Standard exception policy.\r
+     **/\r
+    void getContainerProperties(Properties prop)\r
+               throws StandardException;\r
+\r
+       /**\r
+               Fetch the next record.\r
+               Fills in the Storable columns within the passed in row if\r
+               row is not null, otherwise the record is not fetched.\r
+               If the row.length is less than the number of fields in the row,\r
+               then, will fill the row, and ignore the rest of the row.\r
+               <BR>\r
+               When no more row is found, then false is returned.\r
+\r
+               <P>\r
+               <B>Locking Policy</B>\r
+               <BR>\r
+               No locks.\r
+\r
+               @param row Row to be filled in with information from the record.\r
+\r
+               @exception StandardException    Standard Derby error policy\r
+       */\r
+       boolean fetchNext(DataValueDescriptor[] row) throws StandardException;\r
+\r
+       /**\r
+               Close me. After using this method the caller must throw away the\r
+               reference to the Container object, e.g.\r
+               <PRE>\r
+                       ref.close();\r
+                       ref = null;\r
+               </PRE>\r
+               <BR>\r
+               The container will be closed automatically at the commit or abort\r
+               of the transaction if this method is not called explictly.\r
+       */\r
+       public void close();\r
+\r
+       /**\r
+               remove the stream container\r
+\r
+               @exception StandardException Standard Derby error policy                \r
+        */\r
+       public void removeContainer() throws StandardException;\r
+}\r