[infinispan-dev] Long time no hear, or ISPN-78 continued
Olaf Bergner
olaf.bergner at gmx.de
Fri Oct 14 16:36:52 EDT 2011
Hi Ales,
yes, that sounds reasonable. In fact, I have been worrying about the
user relinquishing control over how Infinispan handles streaming large
objects. One quick question, though: I envisaged
OutputStream writeToKey(K key)
to be the "standard" way of streaming large objects into Infinispan.
Doesn't it fit your bill?
- Olaf
Am 14.10.11 22:29, schrieb Ales Justin:
> @Olaf:
>
> Looking at the API you proposed
> / public interface StreamingHandler<K> {//
> / / void writeToKey(K key, InputStream largeObject);//
> // OutputStream writeToKey(K key);//
> // InputStream readFromKey(K key);//
> // boolean removeKey(K key);//
> // StreamingHandler<K> //withFlags(Flag... flags//);
> // }/
>
> and what I actually need:
> *
> http://code.google.com/p/googleappengine/source/browse/trunk/java/src/main/com/google/appengine/api/files/FileService.java
> --> see openRecordWriteChannel and openRecordReadChannel
>
> Where the read has a way of jumping back&forth in the channel,
> and write can seal the written bytes with closeFinally.
> *
> 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/FileWriteChannel.java
>
> Hence I guess we could change it to
>
> Closeable writeToKey(K key, InputStream largeObject); -- returning a
> handle to seal off (making it immutable from then on)
>
> InputStream readFromKey (K key, long position); -- also taking
> position into consideration
>
> Wdyt?
>
> (unfortunately I also don't have the time to help with impl,
> but I'm definitely willing to test it (since I need it anyway, right :-)))
>
> -Ales
>
>
>
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20111014/e9a6a32b/attachment.html
More information about the infinispan-dev
mailing list