You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shai Erera (JIRA)" <ji...@apache.org> on 2011/01/25 17:31:43 UTC

[jira] Closed: (LUCENE-151) [PATCH] Clonable RAMDirectory

     [ 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" <ni...@techop.ch>
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org