Guys,
Is there a need to have additional 4 methods (thus in total 8 methods
for state transfer) in CacheLoader API in order to support both
streaming and byte based state transfer or can we cover both types of
state transfer by having only 4 InputStream/OutputStream based methods?
These 4 methods would be something like:
void storeEntireState(InputStream s);
void storeState(Fqn subtree,InputStream s);
void loadEntireState(OutputStream s);
void loadState(Fqn subtree,OutputStream s);
We ensure that byte state transfer is still supported but that doesn't
mean the CacheLoader needs to take/return byte[]! If byte state transfer
is used, the StateTransferIntegrator can be responsible for creating
ByteArrayInput(Output)Stream from the persistent state byte[] and pass
stream to the CacheLoader instead of byte[].
There will still be complexity in the integrator code to support both
flavors, but that complexity doesn't need to be pushed from jgroups
layer all the way through to the CacheLoader API.
Thoughts?
Show replies by date