You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by ga...@apache.org on 2008/01/05 01:10:52 UTC

svn commit: r609060 - /incubator/pig/trunk/src/org/apache/pig/impl/util/Spillable.java

Author: gates
Date: Fri Jan  4 16:10:51 2008
New Revision: 609060

URL: http://svn.apache.org/viewvc?rev=609060&view=rev
Log:
PIG-30, should have been submitted as part of earlier checkin.


Added:
    incubator/pig/trunk/src/org/apache/pig/impl/util/Spillable.java

Added: incubator/pig/trunk/src/org/apache/pig/impl/util/Spillable.java
URL: http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/impl/util/Spillable.java?rev=609060&view=auto
==============================================================================
--- incubator/pig/trunk/src/org/apache/pig/impl/util/Spillable.java (added)
+++ incubator/pig/trunk/src/org/apache/pig/impl/util/Spillable.java Fri Jan  4 16:10:51 2008
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pig.impl.util;
+
+import java.io.IOException;
+
+public interface Spillable {
+    /**
+     * Instructs an object to spill whatever it can to disk and release
+     * references to any data structures it spills.
+     * @returns number of objects spilled.
+     */
+    long spill();
+    
+    /**
+     * Requests that an object return an estimate of its in memory size.
+     * @returns estimated in memory size. */
+    long getMemorySize();
+}
+
+