- LUCENE-601: RAMDirectory and RAMFile made Seriazable. Thanks Karl.

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@414739 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Otis Gospodnetic 2006-06-16 05:20:49 +00:00
parent 20ff5539db
commit af594700a0
3 changed files with 13 additions and 2 deletions

View File

@ -37,6 +37,9 @@ Bug fixes
(Chris Hostetter)
5. Fix to allow MatchAllDocsQuery to be used with RemoteSearcher (Yonik Seeley)
6. LUCENE-601: RAMDirectory and RAMFile made Serializable
(Karl Wettin via Otis Gospodnetic)
Optimizations

View File

@ -18,6 +18,7 @@ package org.apache.lucene.store;
import java.io.IOException;
import java.io.File;
import java.io.Serializable;
import java.util.Hashtable;
import java.util.Enumeration;
@ -30,7 +31,10 @@ import org.apache.lucene.store.IndexOutput;
*
* @version $Id$
*/
public final class RAMDirectory extends Directory {
public final class RAMDirectory extends Directory implements Serializable {
private static final long serialVersionUID = 1l;
Hashtable files = new Hashtable();
/** Constructs an empty {@link Directory}. */

View File

@ -17,8 +17,12 @@ package org.apache.lucene.store;
*/
import java.util.Vector;
import java.io.Serializable;
class RAMFile implements Serializable {
private static final long serialVersionUID = 1l;
class RAMFile {
Vector buffers = new Vector();
long length;
long lastModified = System.currentTimeMillis();