[
https://issues.apache.org/jira/browse/LUCENE-151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shai Erera closed LUCENE-151.
-----------------------------
Resolution: Not A Problem
Assignee: (was: Lucene Developers)
RAMDirectory has a ctor which takes a Directory, which can be used for cloning.
> [PATCH] Clonable RAMDirectory
> -----------------------------
>
> Key: LUCENE-151
> URL: https://issues.apache.org/jira/browse/LUCENE-151
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Store
> Affects Versions: unspecified
> Environment: Operating System: other
> Platform: Other
> Reporter: Otis Gospodnetic
> Priority: Minor
> Attachments: ramdir.diff, RamDirectory-clonable.patch
>
>
> A patch for RAMDirectory that makes it clonable.
> May 22nd, 2003 contribution from "Nick Smith" <[email protected]>
> Original email:
> Hi Lucene Developers,
> Thanks for a great product!
>
> I need to be able to 'snapshot' our in-memory indices (RAMDirectory
> instances).
> I have been using :
> RAMDirectory activeDir = new RAMDirectory();
> // many inserts, deletes etc
> RAMDirectory cloneDir = new RAMDirectory(activeDir);
> but unfortunately this is rather slow for large indices.
> I have a suggestion - implement java.lang.Cloneable interface
> in RAMDirectory. I.e to be able to call :
> RAMDirectory cloneDir = (RAMDirectory)activeDir.clone();
> This bypasses the input/output stream handling of the
> copy constructor by cloneing the underlying buffers that
> form the directory and is much faster. (Diff attached).
> Any comments?
> Regards,
> Nick
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]