<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 14 Oct 2011, at 21:36, Olaf Bergner wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
  
    <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hi Ales,<br>
    <br>
    yes, that sounds reasonable. </div></blockquote>+1. Guess that would be an overloaded version of the existing method?<br><blockquote type="cite"><div bgcolor="#FFFFFF" text="#000000">In fact, I have been worrying about the
    user relinquishing control over how Infinispan handles streaming
    large objects. One quick question, though: I envisaged<br>
    <br>
    OutputStream writeToKey(K key)<br>
    <br>
    to be the "standard" way of streaming large objects into Infinispan.
    Doesn't it fit your bill?<br>
    <br>
    - Olaf<br>
    &nbsp;<br>
    Am 14.10.11 22:29, schrieb Ales Justin:
    <blockquote cite="mid:E34B9219-1F22-4AAE-9734-BDC964329738@gmail.com" type="cite">@Olaf:
      <div><br>
      </div>
      <div>Looking at the API you proposed</div>
      <div>
        <pre><i> public interface StreamingHandler&lt;K&gt;  {</i><i>
</i> <i>    void writeToKey(K key, InputStream largeObject);</i><i>
</i><i>     OutputStream writeToKey(K key);</i><i>
</i><i>     InputStream readFromKey(K key);</i><i>
</i><i>     boolean removeKey(K key);</i><i>
</i><i>     StreamingHandler&lt;K&gt; </i><i>withFlags(Flag... flags</i><i>);
</i><i> }</i></pre>
        <div><br>
        </div>
      </div>
      <div>and what I actually need:</div>
      <div>*&nbsp;<a moz-do-not-send="true" href="http://code.google.com/p/googleappengine/source/browse/trunk/java/src/main/com/google/appengine/api/files/FileService.java">http://code.google.com/p/googleappengine/source/browse/trunk/java/src/main/com/google/appengine/api/files/FileService.java</a></div>
      <div>--&gt; see&nbsp;<span class="Apple-style-span" style="font-family:
          monospace; white-space: pre; ">openRecordWriteChannel</span>&nbsp;and&nbsp;<span class="Apple-style-span" style="font-family: monospace;
          white-space: pre; ">openRecordReadChannel</span></div>
      <div><br>
      </div>
      <div>Where the read has a way of jumping back&amp;forth in the
        channel,</div>
      <div>and write can seal the written bytes with closeFinally.</div>
      <div>* <a moz-do-not-send="true" href="http://code.google.com/p/googleappengine/source/browse/trunk/java/src/main/com/google/appengine/api/files/FileReadChannel.java">http://code.google.com/p/googleappengine/source/browse/trunk/java/src/main/com/google/appengine/api/files/FileReadChannel.java</a></div>
      <div>*&nbsp;<a moz-do-not-send="true" href="http://code.google.com/p/googleappengine/source/browse/trunk/java/src/main/com/google/appengine/api/files/FileWriteChannel.java">http://code.google.com/p/googleappengine/source/browse/trunk/java/src/main/com/google/appengine/api/files/FileWriteChannel.java</a></div>
      <div><br>
      </div>
      <div>Hence I guess we could change it to</div>
      <div><br>
      </div>
      <div>Closeable writeToKey(K key, InputStream largeObject); --
        returning a handle to seal off (making it immutable from then
        on)</div>
      <div><br>
      </div>
      <div>InputStream readFromKey (K key, long position); -- also
        taking position into consideration</div>
      <div><br>
      </div>
      <div>Wdyt?</div>
      <div><br>
      </div>
      <div>(unfortunately I also don't have the time to help with impl,&nbsp;</div>
      <div>but I'm definitely willing to test it (since I need it
        anyway, right :-)))</div>
      <div><br>
      </div>
      <div>-Ales</div>
      <div><br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
infinispan-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/infinispan-dev">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a></pre>
    </blockquote>
    <br>
  </div>

_______________________________________________<br>infinispan-dev mailing list<br><a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/infinispan-dev</blockquote></div><br></body></html>