void readIngress(Pipe<IngressMessages> ingessPipe, int listIdx) { int length = subscriberLists[listIdx]; if (length>0) { if (MessagePubSubImpl.enableTrace) { pubSubTrace.init(ingessPipe, IngressMessages.MSG_PUBLISH_103_FIELD_TOPIC_1, IngressMessages.MSG_PUBLISH_103_FIELD_PAYLOAD_3); MessagePubSubImpl.logger.info("new message to be routed, {}", pubSubTrace); } topicBacking = PipeReader.readBytesBackingArray(ingessPipe, IngressMessages.MSG_PUBLISH_103_FIELD_TOPIC_1); topicPos = PipeReader.readBytesPosition(ingessPipe, IngressMessages.MSG_PUBLISH_103_FIELD_TOPIC_1); topicLen = PipeReader.readBytesLength(ingessPipe, IngressMessages.MSG_PUBLISH_103_FIELD_TOPIC_1); topicMask = PipeReader.readBytesMask(ingessPipe, IngressMessages.MSG_PUBLISH_103_FIELD_TOPIC_1); payloadBacking = PipeReader.readBytesBackingArray(ingessPipe, IngressMessages.MSG_PUBLISH_103_FIELD_PAYLOAD_3); payloadPos = PipeReader.readBytesPosition(ingessPipe, IngressMessages.MSG_PUBLISH_103_FIELD_PAYLOAD_3); payloadLen = PipeReader.readBytesLength(ingessPipe, IngressMessages.MSG_PUBLISH_103_FIELD_PAYLOAD_3); payloadMask = PipeReader.readBytesMask(ingessPipe, IngressMessages.MSG_PUBLISH_103_FIELD_PAYLOAD_3); allPendingIngressMessages(listIdx+1, 1+listIdx+length, subscriberLists, ingessPipe); } }
public static void parseSetup(TrieParserReader trieReader, int loc, Pipe<?> input) { parseSetup(trieReader, PipeReader.readBytesBackingArray(input, loc), PipeReader.readBytesPosition(input, loc), PipeReader.readBytesLength(input, loc), PipeReader.readBytesMask(input, loc)); }
public static void parseSetup(TrieParserReader trieReader, int loc, Pipe<?> input) { parseSetup(trieReader, PipeReader.readBytesBackingArray(input, loc), PipeReader.readBytesPosition(input, loc), PipeReader.readBytesLength(input, loc), PipeReader.readBytesMask(input, loc)); }
/** * Writes field from data input in given pipe and location * @param pipe to write to * @param loc location to write field * @param dataInput data used to write field * @param byteCount max bytes in field */ public static void writeFieldFromDataInput(Pipe pipe, int loc, DataInput dataInput, final int byteCount) throws IOException { buildFieldFromDataInput(pipe, loc, dataInput, byteCount, PipeReader.readBytesPosition(pipe, loc), PipeReader.readBytesMask(pipe, loc), PipeReader.readBytesBackingArray(pipe, loc), pipe.sizeOfBlobRing, PipeReader.readBytesPosition(pipe, loc), byteCount, 0); }
/** * Writes field from data received in the input stream * @param pipe to write to * @param loc location to write field * @param inputStream to get data to write field * @param byteCount max bytes in field */ public static void writeFieldFromInputStream(Pipe pipe, int loc, InputStream inputStream, final int byteCount) throws IOException { buildFieldFromInputStream(pipe, loc, inputStream, byteCount, PipeReader.readBytesPosition(pipe, loc), PipeReader.readBytesMask(pipe, loc), PipeReader.readBytesBackingArray(pipe, loc), pipe.sizeOfBlobRing, PipeReader.readBytesPosition(pipe, loc), byteCount, 0); }
/** * Writes field from data input in given pipe and location * @param pipe to write to * @param loc location to write field * @param dataInput data used to write field * @param byteCount max bytes in field */ public static void writeFieldFromDataInput(Pipe pipe, int loc, DataInput dataInput, final int byteCount) throws IOException { buildFieldFromDataInput(pipe, loc, dataInput, byteCount, PipeReader.readBytesPosition(pipe, loc), PipeReader.readBytesMask(pipe, loc), PipeReader.readBytesBackingArray(pipe, loc), pipe.sizeOfBlobRing, PipeReader.readBytesPosition(pipe, loc), byteCount, 0); }
/** * Writes field from data input in given pipe and location * @param pipe to write to * @param loc location to write field * @param dataInput data used to write field * @param byteCount max bytes in field */ public static void writeFieldFromDataInput(Pipe pipe, int loc, DataInput dataInput, final int byteCount) throws IOException { buildFieldFromDataInput(pipe, loc, dataInput, byteCount, PipeReader.readBytesPosition(pipe, loc), PipeReader.readBytesMask(pipe, loc), PipeReader.readBytesBackingArray(pipe, loc), pipe.sizeOfBlobRing, PipeReader.readBytesPosition(pipe, loc), byteCount, 0); }
/** * Writes field from data received in the input stream * @param pipe to write to * @param loc location to write field * @param inputStream to get data to write field * @param byteCount max bytes in field */ public static void writeFieldFromInputStream(Pipe pipe, int loc, InputStream inputStream, final int byteCount) throws IOException { buildFieldFromInputStream(pipe, loc, inputStream, byteCount, PipeReader.readBytesPosition(pipe, loc), PipeReader.readBytesMask(pipe, loc), PipeReader.readBytesBackingArray(pipe, loc), pipe.sizeOfBlobRing, PipeReader.readBytesPosition(pipe, loc), byteCount, 0); }
public static void parseSetup(TrieParserReader trieReader, int loc, Pipe<?> input) { parseSetup(trieReader, PipeReader.readBytesBackingArray(input, loc), PipeReader.readBytesPosition(input, loc), PipeReader.readBytesLength(input, loc), PipeReader.readBytesMask(input, loc)); }
/** * Writes field from data received in the input stream * @param pipe to write to * @param loc location to write field * @param inputStream to get data to write field * @param byteCount max bytes in field */ public static void writeFieldFromInputStream(Pipe pipe, int loc, InputStream inputStream, final int byteCount) throws IOException { buildFieldFromInputStream(pipe, loc, inputStream, byteCount, PipeReader.readBytesPosition(pipe, loc), PipeReader.readBytesMask(pipe, loc), PipeReader.readBytesBackingArray(pipe, loc), pipe.sizeOfBlobRing, PipeReader.readBytesPosition(pipe, loc), byteCount, 0); }
int ingressCollectSubLists(Pipe<IngressMessages> ingessPipe) { foundWork=true; final byte[] backing = PipeReader.readBytesBackingArray(ingessPipe, IngressMessages.MSG_PUBLISH_103_FIELD_TOPIC_1); final int pos = PipeReader.readBytesPosition(ingessPipe, IngressMessages.MSG_PUBLISH_103_FIELD_TOPIC_1); final int len = PipeReader.readBytesLength(ingessPipe, IngressMessages.MSG_PUBLISH_103_FIELD_TOPIC_1); final int mask = PipeReader.readBytesMask(ingessPipe, IngressMessages.MSG_PUBLISH_103_FIELD_TOPIC_1); int listIdx = subscriptionListIdx(backing, pos, len, mask); collectAllSubscriptionLists(backing, pos, len, mask); return listIdx; }
void unsubscribe(Pipe<MessagePubSub> pipe) { int hash = PipeReader.readInt(pipe, MessagePubSub.MSG_UNSUBSCRIBE_101_FIELD_SUBSCRIBERIDENTITYHASH_4); final short pipeIdx = (short)IntHashTable.getItem(subscriptionPipeLookup, hash); assert(pipeIdx>=0) : "Must have valid pipe index"; final byte[] backing = PipeReader.readBytesBackingArray(pipe, MessagePubSub.MSG_UNSUBSCRIBE_101_FIELD_TOPIC_1); final int pos = PipeReader.readBytesPosition(pipe, MessagePubSub.MSG_UNSUBSCRIBE_101_FIELD_TOPIC_1); final int len = PipeReader.readBytesLength(pipe, MessagePubSub.MSG_UNSUBSCRIBE_101_FIELD_TOPIC_1); final int mask = PipeReader.readBytesMask(pipe, MessagePubSub.MSG_UNSUBSCRIBE_101_FIELD_TOPIC_1); unsubscribe(pipeIdx, backing, pos, len, mask); }
void addSubscription(Pipe<MessagePubSub> pipe) { //hash of the subscribing object int hash = PipeReader.readInt(pipe, MessagePubSub.MSG_SUBSCRIBE_100_FIELD_SUBSCRIBERIDENTITYHASH_4); //convert the hash into the specific outgoing pipe where this will go final short pipeIdx = (short)IntHashTable.getItem(subscriptionPipeLookup, hash); assert(pipeIdx>=0) : "Must have valid pipe index"; final byte[] backing = PipeReader.readBytesBackingArray(pipe, MessagePubSub.MSG_SUBSCRIBE_100_FIELD_TOPIC_1); final int pos = PipeReader.readBytesPosition(pipe, MessagePubSub.MSG_SUBSCRIBE_100_FIELD_TOPIC_1); final int len = PipeReader.readBytesLength(pipe, MessagePubSub.MSG_SUBSCRIBE_100_FIELD_TOPIC_1); final int mask = PipeReader.readBytesMask(pipe, MessagePubSub.MSG_SUBSCRIBE_100_FIELD_TOPIC_1); addSubscription(pipeIdx, backing, pos, len, mask); }
topicPos = PipeReader.readBytesPosition(pipe, MessagePubSub.MSG_PUBLISH_103_FIELD_TOPIC_1); topicLen = PipeReader.readBytesLength(pipe, MessagePubSub.MSG_PUBLISH_103_FIELD_TOPIC_1); topicMask = PipeReader.readBytesMask(pipe, MessagePubSub.MSG_PUBLISH_103_FIELD_TOPIC_1); payloadMask = PipeReader.readBytesMask(pipe, MessagePubSub.MSG_PUBLISH_103_FIELD_PAYLOAD_3);
int pos = PipeReader.readBytesPosition(input, varFieldLoc); int len = PipeReader.readBytesLength(input, varFieldLoc); int mask = PipeReader.readBytesMask(input, varFieldLoc);
int pos = PipeReader.readBytesPosition(input, varFieldLoc); int len = PipeReader.readBytesLength(input, varFieldLoc); int mask = PipeReader.readBytesMask(input, varFieldLoc);
final int pos = PipeReader.readBytesPosition(pipe, MessagePubSub.MSG_PUBLISH_103_FIELD_TOPIC_1); final int len = PipeReader.readBytesLength(pipe, MessagePubSub.MSG_PUBLISH_103_FIELD_TOPIC_1); final int mask = PipeReader.readBytesMask(pipe, MessagePubSub.MSG_PUBLISH_103_FIELD_TOPIC_1);