public abstract class RoutingWriteHandler extends java.lang.Object implements WriteHandler
Modifier and Type | Field and Description |
---|---|
protected boolean |
keepState |
protected com.carrotsearch.hppc.ObjectObjectHashMap<KVPair,KVPair> |
routedToBaseMutationMap |
Modifier | Constructor and Description |
---|---|
protected |
RoutingWriteHandler(byte[] destination,
boolean keepState) |
Modifier and Type | Method and Description |
---|---|
void |
close(WriteContext ctx)
This closes the writes with the given handler.
|
protected abstract void |
doClose(WriteContext ctx) |
protected abstract void |
doFlush(WriteContext ctx) |
protected void |
fail(KVPair mutation,
WriteContext ctx,
java.lang.Exception e) |
void |
flush(WriteContext ctx)
Flush the writes with the given handler.
|
protected CallBuffer<KVPair> |
getRoutedWriteBuffer(WriteContext ctx,
int expectedSize) |
protected abstract boolean |
isHandledMutationType(KVPair.Type type) |
void |
next(KVPair mutation,
WriteContext ctx)
Process the mutation with the given handler
|
protected abstract boolean |
route(KVPair mutation,
WriteContext ctx) |
protected final com.carrotsearch.hppc.ObjectObjectHashMap<KVPair,KVPair> routedToBaseMutationMap
protected final boolean keepState
protected RoutingWriteHandler(byte[] destination, boolean keepState)
public void next(KVPair mutation, WriteContext ctx)
WriteHandler
next
in interface WriteHandler
public void flush(WriteContext ctx) throws java.io.IOException
WriteHandler
flush
in interface WriteHandler
java.io.IOException
public void close(WriteContext ctx) throws java.io.IOException
WriteHandler
close
in interface WriteHandler
java.io.IOException
protected abstract boolean isHandledMutationType(KVPair.Type type)
protected abstract boolean route(KVPair mutation, WriteContext ctx)
protected abstract void doFlush(WriteContext ctx) throws java.lang.Exception
java.lang.Exception
protected abstract void doClose(WriteContext ctx) throws java.lang.Exception
java.lang.Exception
protected final CallBuffer<KVPair> getRoutedWriteBuffer(WriteContext ctx, int expectedSize) throws java.lang.Exception
java.lang.Exception
protected final void fail(KVPair mutation, WriteContext ctx, java.lang.Exception e)