Manik Surtani commented on JBCACHE-1336:
FYI: The new streams would be something like:
MarshallableObjectOutputStream, MarshallableObjectInputStream - both of which are
resettable (and hence poolable) and which will expose a getBuffer() method which will
return a JGroups Buffer object which can be passed directly to JGroups after JGRP-796 is
This will also expose a @Marshallable annotation, and components which are annotated with
@Marshallable will have to provide a mandatory magic number. (E.g., @Marshallable
(magicNumber = 10))
The streams will then query the magic number, write it to the stream instead of usual
class information, and then use the standard readExternal/writeExternal methods to write
the contents of the object to the stream.
Objects not annotated with @Marshallable will fall back to JDK serialization.
The streams will not have public constructors, but will have to be created using a
MarshallableStreamFactory which could offer pooling support. The MSF would also hold a
table of magic numbers, initialized on construction. E.g.,
MarshallableStreamFactory msf = new
MarshallableStreamFactory msf = new PooledMarshallableStreamFactory(inStreamPoolSize,
outStreamPoolSize, MarshallableClass1.class, MarshallableClass2.class,
Pooling Object Streams
Project: JBoss Cache
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Reporter: Mircea Markus
Assignee: Manik Surtani
Fix For: 3.0.0.GA
ObjectStreams creation consumes a lot of time when it comes to marshalling commands (e.g.
> 5% of total command in case of put is in building the ObjectStream).
Pooling them would be an important performance enhancement.
We cannot pool the ones from JDK as these cache .class information which results in
Investigate the possibility of implementing own alternative ObjectStreams which would be
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see: http://www.atlassian.com/software/jira