public abstract class AbstractStatelessClient<E extends net.openhft.chronicle.wire.ParameterizeWireKey> extends Object implements Closeable
| Modifier and Type | Field and Description |
|---|---|
protected String |
csp |
protected TcpChannelHub |
hub |
| Constructor and Description |
|---|
AbstractStatelessClient(TcpChannelHub hub,
long cid,
String csp) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkIsData(net.openhft.chronicle.wire.Wire wireIn) |
void |
close() |
protected boolean |
proxyReturnBoolean(net.openhft.chronicle.wire.WireKey eventId) |
protected boolean |
proxyReturnBooleanWithArgs(E eventId,
Object... args) |
protected boolean |
proxyReturnBooleanWithSequence(E eventId,
Collection sequence) |
protected byte |
proxyReturnByte(net.openhft.chronicle.wire.WireKey eventId) |
protected byte |
proxyReturnByte(net.openhft.chronicle.wire.WireKey reply,
net.openhft.chronicle.wire.WireKey eventId) |
protected int |
proxyReturnInt(net.openhft.chronicle.wire.WireKey eventId) |
protected long |
proxyReturnLong(net.openhft.chronicle.wire.WireKey eventId) |
protected <R> R |
proxyReturnTypedObject(E eventId,
R usingValue,
Class<R> resultType,
Object... args) |
protected int |
proxyReturnUint16(net.openhft.chronicle.wire.WireKey eventId) |
protected void |
proxyReturnVoid(net.openhft.chronicle.wire.WireKey eventId) |
protected void |
proxyReturnVoid(net.openhft.chronicle.wire.WireKey eventId,
java.util.function.Consumer<net.openhft.chronicle.wire.ValueOut> consumer) |
<T> T |
proxyReturnWireConsumer(net.openhft.chronicle.wire.WireKey eventId,
java.util.function.Function<net.openhft.chronicle.wire.ValueIn,T> consumer) |
<T> T |
proxyReturnWireConsumerInOut(net.openhft.chronicle.wire.WireKey eventId,
net.openhft.chronicle.wire.WireKey reply,
java.util.function.Consumer<net.openhft.chronicle.wire.ValueOut> consumerOut,
java.util.function.Function<net.openhft.chronicle.wire.ValueIn,T> consumerIn) |
protected boolean |
readBoolean(long tid,
long startTime) |
protected int |
readInt(long tid,
long startTime) |
protected <R> R |
readReply(net.openhft.chronicle.wire.WireIn wireIn,
net.openhft.chronicle.wire.WireKey replyId,
java.util.function.Function<net.openhft.chronicle.wire.ValueIn,R> function) |
protected void |
readReplyConsumer(net.openhft.chronicle.wire.WireIn wireIn,
net.openhft.chronicle.wire.WireKey replyId,
java.util.function.Consumer<net.openhft.chronicle.wire.ValueIn> consumer) |
protected long |
sendEvent(long startTime,
net.openhft.chronicle.wire.WireKey eventId,
java.util.function.Consumer<net.openhft.chronicle.wire.ValueOut> consumer) |
protected void |
sendEventAsync(net.openhft.chronicle.wire.WireKey eventId,
java.util.function.Consumer<net.openhft.chronicle.wire.ValueOut> consumer,
boolean blockTillTimeout) |
protected void |
sendEventAsyncWithoutLock(net.openhft.chronicle.wire.WireKey eventId,
java.util.function.Consumer<net.openhft.chronicle.wire.ValueOut> consumer) |
static <E extends net.openhft.chronicle.wire.ParameterizeWireKey> |
toParameters(E eventId,
Object... args) |
protected void |
writeAsyncMetaData(long startTime)
if async meta data is written, no response will be returned from the server
|
protected void |
writeMetaDataForKnownTID(long tid)
Useful for when you know the tid
|
protected long |
writeMetaDataStartTime(long startTime) |
@NotNull protected final TcpChannelHub hub
protected String csp
public AbstractStatelessClient(@NotNull
TcpChannelHub hub,
long cid,
@NotNull
String csp)
hub - for this connectioncid - used by proxies such as the entry-setcsp - the uri of the requestpublic static <E extends net.openhft.chronicle.wire.ParameterizeWireKey> java.util.function.Consumer<net.openhft.chronicle.wire.ValueOut> toParameters(@NotNull E eventId, @Nullable Object... args)
@Nullable
protected <R> R proxyReturnTypedObject(@NotNull
E eventId,
@Nullable
R usingValue,
@NotNull
Class<R> resultType,
@Nullable
Object... args)
protected long proxyReturnLong(@NotNull
net.openhft.chronicle.wire.WireKey eventId)
protected int proxyReturnInt(@NotNull
net.openhft.chronicle.wire.WireKey eventId)
protected byte proxyReturnByte(@NotNull
net.openhft.chronicle.wire.WireKey eventId)
protected byte proxyReturnByte(@NotNull
net.openhft.chronicle.wire.WireKey reply,
@NotNull
net.openhft.chronicle.wire.WireKey eventId)
protected int proxyReturnUint16(@NotNull
net.openhft.chronicle.wire.WireKey eventId)
public <T> T proxyReturnWireConsumer(@NotNull
net.openhft.chronicle.wire.WireKey eventId,
@NotNull
java.util.function.Function<net.openhft.chronicle.wire.ValueIn,T> consumer)
public <T> T proxyReturnWireConsumerInOut(@NotNull
net.openhft.chronicle.wire.WireKey eventId,
@NotNull
net.openhft.chronicle.wire.WireKey reply,
@Nullable
java.util.function.Consumer<net.openhft.chronicle.wire.ValueOut> consumerOut,
@NotNull
java.util.function.Function<net.openhft.chronicle.wire.ValueIn,T> consumerIn)
protected void proxyReturnVoid(@NotNull
net.openhft.chronicle.wire.WireKey eventId,
@Nullable
java.util.function.Consumer<net.openhft.chronicle.wire.ValueOut> consumer)
protected void proxyReturnVoid(@NotNull
net.openhft.chronicle.wire.WireKey eventId)
protected long sendEvent(long startTime,
@NotNull
net.openhft.chronicle.wire.WireKey eventId,
@Nullable
java.util.function.Consumer<net.openhft.chronicle.wire.ValueOut> consumer)
protected void sendEventAsync(@NotNull
net.openhft.chronicle.wire.WireKey eventId,
@Nullable
java.util.function.Consumer<net.openhft.chronicle.wire.ValueOut> consumer,
boolean blockTillTimeout)
eventId - consumer - blockTillTimeout - if false - will only be sent if the connection is validprotected void sendEventAsyncWithoutLock(@NotNull
net.openhft.chronicle.wire.WireKey eventId,
@Nullable
java.util.function.Consumer<net.openhft.chronicle.wire.ValueOut> consumer)
protected long writeMetaDataStartTime(long startTime)
startTime - the start time of this transactionprotected void writeMetaDataForKnownTID(long tid)
tid - the tid transactionprotected void writeAsyncMetaData(long startTime)
startTime - the start time of this transactionprotected void checkIsData(@NotNull
net.openhft.chronicle.wire.Wire wireIn)
protected boolean readBoolean(long tid,
long startTime)
protected <R> R readReply(@NotNull
net.openhft.chronicle.wire.WireIn wireIn,
@NotNull
net.openhft.chronicle.wire.WireKey replyId,
@NotNull
java.util.function.Function<net.openhft.chronicle.wire.ValueIn,R> function)
protected void readReplyConsumer(@NotNull
net.openhft.chronicle.wire.WireIn wireIn,
@NotNull
net.openhft.chronicle.wire.WireKey replyId,
@NotNull
java.util.function.Consumer<net.openhft.chronicle.wire.ValueIn> consumer)
protected boolean proxyReturnBooleanWithArgs(@NotNull
E eventId,
@NotNull
Object... args)
protected boolean proxyReturnBooleanWithSequence(@NotNull
E eventId,
@NotNull
Collection sequence)
protected boolean proxyReturnBoolean(@NotNull
net.openhft.chronicle.wire.WireKey eventId)
protected int readInt(long tid,
long startTime)
public void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2015. All rights reserved.