本文整理汇总了Java中com.ociweb.pronghorn.pipe.PipeReader类的典型用法代码示例。如果您正苦于以下问题:Java PipeReader类的具体用法?Java PipeReader怎么用?Java PipeReader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PipeReader类属于com.ociweb.pronghorn.pipe包,在下文中一共展示了PipeReader类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: consume
import com.ociweb.pronghorn.pipe.PipeReader; //导入依赖的package包/类
public static void consume(Pipe<MessagePubSub> input) {
while (PipeReader.tryReadFragment(input)) {
int msgIdx = PipeReader.getMsgIdx(input);
switch(msgIdx) {
case MSG_SUBSCRIBE_100:
consumeSubscribe(input);
break;
case MSG_UNSUBSCRIBE_101:
consumeUnsubscribe(input);
break;
case MSG_PUBLISH_103:
consumePublish(input);
break;
case MSG_CHANGESTATE_70:
consumeChangeState(input);
break;
case -1:
//requestShutdown();
break;
}
PipeReader.releaseReadLock(input);
}
}
开发者ID:oci-pronghorn,项目名称:GreenLightning,代码行数:24,代码来源:MessagePubSub.java
示例2: consume
import com.ociweb.pronghorn.pipe.PipeReader; //导入依赖的package包/类
public static void consume(Pipe<TrafficOrderSchema> input) {
while (PipeReader.tryReadFragment(input)) {
int msgIdx = PipeReader.getMsgIdx(input);
switch(msgIdx) {
case MSG_GO_10:
consumeGo(input);
break;
case MSG_BLOCKCHANNEL_22:
consumeBlockChannel(input);
break;
case MSG_BLOCKCHANNELUNTIL_23:
consumeBlockChannelUntil(input);
break;
case -1:
//requestShutdown();
break;
}
PipeReader.releaseReadLock(input);
}
}
开发者ID:oci-pronghorn,项目名称:GreenLightning,代码行数:21,代码来源:TrafficOrderSchema.java
示例3: consume
import com.ociweb.pronghorn.pipe.PipeReader; //导入依赖的package包/类
public static void consume(Pipe<MessageSubscription> input) {
while (PipeReader.tryReadFragment(input)) {
int msgIdx = PipeReader.getMsgIdx(input);
switch(msgIdx) {
case MSG_PUBLISH_103:
consumePublish(input);
break;
case MSG_STATECHANGED_71:
consumeStateChanged(input);
break;
case -1:
//requestShutdown();
break;
}
PipeReader.releaseReadLock(input);
}
}
开发者ID:oci-pronghorn,项目名称:GreenLightning,代码行数:18,代码来源:MessageSubscription.java
示例4: copyToSubscriber
import com.ociweb.pronghorn.pipe.PipeReader; //导入依赖的package包/类
private void copyToSubscriber(Pipe<?> pipe, int pipeIdx, long[] targetMarks, int topicLOC, int payloadLOC) {
Pipe<MessageSubscription> outPipe = outgoingMessagePipes[pipeIdx];
if (PipeWriter.tryWriteFragment(outPipe, MessageSubscription.MSG_PUBLISH_103)) {
PipeReader.copyBytes(pipe, outPipe, topicLOC, MessageSubscription.MSG_PUBLISH_103_FIELD_TOPIC_1);
PipeReader.copyBytes(pipe, outPipe, payloadLOC, MessageSubscription.MSG_PUBLISH_103_FIELD_PAYLOAD_3);
//due to batching this may not become the head position upon publish but it will do so eventually.
//so to track this position we use workingHeadPosition not headPosition
targetMarks[pipeIdx] = Pipe.workingHeadPosition(outPipe);
PipeWriter.publishWrites(outPipe);
} else {
//add this one back to the list so we can send again later
pendingPublish[pendingPublishCount++] = pipeIdx;
pendingIngress = false;
}
}
开发者ID:oci-pronghorn,项目名称:GreenLightning,代码行数:19,代码来源:MessagePubSubStage.java
示例5: toString
import com.ociweb.pronghorn.pipe.PipeReader; //导入依赖的package包/类
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("topic: ");
PipeReader.readUTF8(pipe, topic, builder);
builder.append(" payload: ");
DataInputBlobReader<?> stream = PipeReader.inputStream(pipe, payload);
while (stream.hasRemainingBytes()) {
Appendables.appendFixedHexDigits(builder, (0xFF&stream.readByte()), 8);
if (stream.hasRemainingBytes()) {
builder.append(',');
}
}
return builder.toString();
}
开发者ID:oci-pronghorn,项目名称:GreenLightning,代码行数:21,代码来源:MessagePubSubTrace.java
示例6: run
import com.ociweb.pronghorn.pipe.PipeReader; //导入依赖的package包/类
@Override
public void run() {
while (PipeWriter.hasRoomForWrite(output) && PipeReader.tryReadFragment(input)) {
int msgIdx = PipeReader.getMsgIdx(input);
//System.out.format("\nMessage Idx %d %d %d\n", msgIdx, Pipe.tailPosition(input), input.sizeOfSlabRing);
if (msgIdx >= 0) {
MessageProcessor msg = messages[msgIdx];
if (msg != null) {
msg.readAndWrite(input, output);
}
//else {
//System.out.format("Not Found %d", msgIdx);
//}
PipeReader.releaseReadLock(input);
}
else {
PipeReader.releaseReadLock(input);
PipeWriter.publishEOF(output);
requestShutdown();
//System.out.format("End of the line");
return;
}
}
}
开发者ID:oci-pronghorn,项目名称:FogLight-Examples,代码行数:25,代码来源:FilterStage.java
示例7: consume
import com.ociweb.pronghorn.pipe.PipeReader; //导入依赖的package包/类
public static void consume(Pipe<PersistedBlobLoadSchema> input) {
while (PipeReader.tryReadFragment(input)) {
int msgIdx = PipeReader.getMsgIdx(input);
switch(msgIdx) {
case MSG_BLOCK_1:
consumeBlock(input);
break;
case MSG_BEGINREPLAY_8:
consumeBeginReplay(input);
break;
case MSG_FINISHREPLAY_9:
consumeFinishReplay(input);
break;
case MSG_ACKRELEASE_10:
consumeAckRelease(input);
break;
case MSG_ACKWRITE_11:
consumeAckWrite(input);
break;
case -1:
//requestShutdown();
break;
}
PipeReader.releaseReadLock(input);
}
}
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:27,代码来源:PersistedBlobLoadSchema.java
示例8: consume014
import com.ociweb.pronghorn.pipe.PipeReader; //导入依赖的package包/类
public static void consume014(Pipe<PhastCodecSchema> input) {
long fieldvalue001 = PipeReader.readLong(input,MSG_014_10014_FIELD_VALUE001_1);
long fieldvalue002 = PipeReader.readLong(input,MSG_014_10014_FIELD_VALUE002_2);
long fieldvalue003 = PipeReader.readLong(input,MSG_014_10014_FIELD_VALUE003_3);
long fieldvalue004 = PipeReader.readLong(input,MSG_014_10014_FIELD_VALUE004_4);
long fieldvalue005 = PipeReader.readLong(input,MSG_014_10014_FIELD_VALUE005_5);
long fieldvalue006 = PipeReader.readLong(input,MSG_014_10014_FIELD_VALUE006_6);
long fieldvalue007 = PipeReader.readLong(input,MSG_014_10014_FIELD_VALUE007_7);
long fieldvalue008 = PipeReader.readLong(input,MSG_014_10014_FIELD_VALUE008_8);
long fieldvalue009 = PipeReader.readLong(input,MSG_014_10014_FIELD_VALUE009_9);
long fieldvalue010 = PipeReader.readLong(input,MSG_014_10014_FIELD_VALUE010_10);
long fieldvalue011 = PipeReader.readLong(input,MSG_014_10014_FIELD_VALUE011_11);
long fieldvalue012 = PipeReader.readLong(input,MSG_014_10014_FIELD_VALUE012_12);
long fieldvalue013 = PipeReader.readLong(input,MSG_014_10014_FIELD_VALUE013_13);
long fieldvalue014 = PipeReader.readLong(input,MSG_014_10014_FIELD_VALUE014_14);
}
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:17,代码来源:PhastCodecSchema.java
示例9: consume
import com.ociweb.pronghorn.pipe.PipeReader; //导入依赖的package包/类
public static void consume(Pipe<ServerResponseSchema> input) {
while (PipeReader.tryReadFragment(input)) {
int msgIdx = PipeReader.getMsgIdx(input);
switch(msgIdx) {
case MSG_TOCHANNEL_100:
consumeToChannel(input);
break;
case MSG_TOSUBSCRIPTION_200:
consumeToSubscription(input);
break;
case MSG_SKIP_300:
consumeSkip(input);
break;
case -1:
//requestShutdown();
break;
}
PipeReader.releaseReadLock(input);
}
}
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:21,代码来源:ServerResponseSchema.java
示例10: consume
import com.ociweb.pronghorn.pipe.PipeReader; //导入依赖的package包/类
public static void consume(Pipe<SequentialRespSchema> input) {
while (PipeReader.tryReadFragment(input)) {
int msgIdx = PipeReader.getMsgIdx(input);
switch(msgIdx) {
case MSG_CLEARACK_1:
consumeClearAck(input);
break;
case MSG_METARESPONSE_2:
consumeMetaResponse(input);
break;
case MSG_WRITEACK_3:
consumeWriteAck(input);
break;
case -1:
//requestShutdown();
break;
}
PipeReader.releaseReadLock(input);
}
}
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:21,代码来源:SequentialRespSchema.java
示例11: run
import com.ociweb.pronghorn.pipe.PipeReader; //导入依赖的package包/类
@Override
public void run() {
int activePipe = pipeIdx;
if (activePipe>=0) {
//never start new work until old work is finished
if (pumpData(activePipe)) {
PipeReader.releaseReadLock(fromCommandChannels[activePipe]);
//only do now after we know its not blocked and was completed
decReleaseCount(activePipe);
pipeIdx = -1;
} else {
return;//try again later.
}
}
super.run();
}
开发者ID:oci-pronghorn,项目名称:FogLight,代码行数:17,代码来源:SerialDataWriterStage.java
示例12: consume
import com.ociweb.pronghorn.pipe.PipeReader; //导入依赖的package包/类
public static void consume(Pipe<HTTPRequestSchema> input) {
while (PipeReader.tryReadFragment(input)) {
int msgIdx = PipeReader.getMsgIdx(input);
switch(msgIdx) {
case MSG_RESTREQUEST_300:
consumeRestRequest(input);
break;
case MSG_WEBSOCKETFRAME_100:
consumeWebSocketFrame(input);
break;
case -1:
//requestShutdown();
break;
}
PipeReader.releaseReadLock(input);
}
}
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:18,代码来源:HTTPRequestSchema.java
示例13: consume024
import com.ociweb.pronghorn.pipe.PipeReader; //导入依赖的package包/类
public static void consume024(Pipe<PhastCodecSchema> input) {
long fieldvalue001 = PipeReader.readLong(input,MSG_024_10024_FIELD_VALUE001_1);
long fieldvalue002 = PipeReader.readLong(input,MSG_024_10024_FIELD_VALUE002_2);
long fieldvalue003 = PipeReader.readLong(input,MSG_024_10024_FIELD_VALUE003_3);
long fieldvalue004 = PipeReader.readLong(input,MSG_024_10024_FIELD_VALUE004_4);
long fieldvalue005 = PipeReader.readLong(input,MSG_024_10024_FIELD_VALUE005_5);
long fieldvalue006 = PipeReader.readLong(input,MSG_024_10024_FIELD_VALUE006_6);
long fieldvalue007 = PipeReader.readLong(input,MSG_024_10024_FIELD_VALUE007_7);
long fieldvalue008 = PipeReader.readLong(input,MSG_024_10024_FIELD_VALUE008_8);
long fieldvalue009 = PipeReader.readLong(input,MSG_024_10024_FIELD_VALUE009_9);
long fieldvalue010 = PipeReader.readLong(input,MSG_024_10024_FIELD_VALUE010_10);
long fieldvalue011 = PipeReader.readLong(input,MSG_024_10024_FIELD_VALUE011_11);
long fieldvalue012 = PipeReader.readLong(input,MSG_024_10024_FIELD_VALUE012_12);
long fieldvalue013 = PipeReader.readLong(input,MSG_024_10024_FIELD_VALUE013_13);
long fieldvalue014 = PipeReader.readLong(input,MSG_024_10024_FIELD_VALUE014_14);
long fieldvalue015 = PipeReader.readLong(input,MSG_024_10024_FIELD_VALUE015_15);
long fieldvalue016 = PipeReader.readLong(input,MSG_024_10024_FIELD_VALUE016_16);
long fieldvalue017 = PipeReader.readLong(input,MSG_024_10024_FIELD_VALUE017_17);
long fieldvalue018 = PipeReader.readLong(input,MSG_024_10024_FIELD_VALUE018_18);
long fieldvalue019 = PipeReader.readLong(input,MSG_024_10024_FIELD_VALUE019_19);
long fieldvalue020 = PipeReader.readLong(input,MSG_024_10024_FIELD_VALUE020_20);
long fieldvalue021 = PipeReader.readLong(input,MSG_024_10024_FIELD_VALUE021_21);
long fieldvalue022 = PipeReader.readLong(input,MSG_024_10024_FIELD_VALUE022_22);
long fieldvalue023 = PipeReader.readLong(input,MSG_024_10024_FIELD_VALUE023_23);
long fieldvalue024 = PipeReader.readLong(input,MSG_024_10024_FIELD_VALUE024_24);
}
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:27,代码来源:PhastCodecSchema.java
示例14: run
import com.ociweb.pronghorn.pipe.PipeReader; //导入依赖的package包/类
@Override
public void run() {
if (moveInProgress) {
if (!PipeReader.tryMoveSingleMessage(input, output)) {
return;
} else {
moveInProgress = false;
PipeReader.releaseReadLock(input);
}
}
while (PipeWriter.hasRoomForWrite(output) && PipeReader.tryReadFragment(input)) {
count++;
int value = PipeReader.readInt(input, varFieldLoc);
if (0 != (mask&value)) {
if (!PipeReader.tryMoveSingleMessage(input, output)) {
moveInProgress = true;
return;
}
}
PipeReader.releaseReadLock(input);
}
}
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:27,代码来源:FlagFilterStage.java
示例15: consume
import com.ociweb.pronghorn.pipe.PipeReader; //导入依赖的package包/类
public static void consume(Pipe<TwitterEventSchema> input) {
while (PipeReader.tryReadFragment(input)) {
int msgIdx = PipeReader.getMsgIdx(input);
switch(msgIdx) {
case MSG_USER_100:
consumeUser(input);
break;
case MSG_USERPOST_101:
consumeUserPost(input);
break;
case -1:
//requestShutdown();
break;
}
PipeReader.releaseReadLock(input);
}
}
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:18,代码来源:TwitterEventSchema.java
示例16: consume
import com.ociweb.pronghorn.pipe.PipeReader; //导入依赖的package包/类
public static void consume(Pipe<ReleaseSchema> input) {
while (PipeReader.tryReadFragment(input)) {
int msgIdx = PipeReader.getMsgIdx(input);
switch(msgIdx) {
case MSG_RELEASE_100:
consumeRelease(input);
break;
case MSG_RELEASEWITHSEQ_101:
consumeReleaseWithSeq(input);
break;
case -1:
//requestShutdown();
break;
}
PipeReader.releaseReadLock(input);
}
}
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:18,代码来源:ReleaseSchema.java
示例17: consume
import com.ociweb.pronghorn.pipe.PipeReader; //导入依赖的package包/类
public static void consume(Pipe<MQTTIdRangeControllerSchema> input) {
while (PipeReader.tryReadFragment(input)) {
int msgIdx = PipeReader.getMsgIdx(input);
switch(msgIdx) {
case MSG_CLEARALL_2:
consumeClearAll(input);
break;
case MSG_IDRANGE_1:
consumeIdRange(input);
break;
case MSG_READY_3:
consumeReady(input);
break;
case -1:
//requestShutdown();
break;
}
PipeReader.releaseReadLock(input);
}
}
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:21,代码来源:MQTTIdRangeControllerSchema.java
示例18: consume020
import com.ociweb.pronghorn.pipe.PipeReader; //导入依赖的package包/类
public static void consume020(Pipe<PhastCodecSchema> input) {
long fieldvalue001 = PipeReader.readLong(input,MSG_020_10020_FIELD_VALUE001_1);
long fieldvalue002 = PipeReader.readLong(input,MSG_020_10020_FIELD_VALUE002_2);
long fieldvalue003 = PipeReader.readLong(input,MSG_020_10020_FIELD_VALUE003_3);
long fieldvalue004 = PipeReader.readLong(input,MSG_020_10020_FIELD_VALUE004_4);
long fieldvalue005 = PipeReader.readLong(input,MSG_020_10020_FIELD_VALUE005_5);
long fieldvalue006 = PipeReader.readLong(input,MSG_020_10020_FIELD_VALUE006_6);
long fieldvalue007 = PipeReader.readLong(input,MSG_020_10020_FIELD_VALUE007_7);
long fieldvalue008 = PipeReader.readLong(input,MSG_020_10020_FIELD_VALUE008_8);
long fieldvalue009 = PipeReader.readLong(input,MSG_020_10020_FIELD_VALUE009_9);
long fieldvalue010 = PipeReader.readLong(input,MSG_020_10020_FIELD_VALUE010_10);
long fieldvalue011 = PipeReader.readLong(input,MSG_020_10020_FIELD_VALUE011_11);
long fieldvalue012 = PipeReader.readLong(input,MSG_020_10020_FIELD_VALUE012_12);
long fieldvalue013 = PipeReader.readLong(input,MSG_020_10020_FIELD_VALUE013_13);
long fieldvalue014 = PipeReader.readLong(input,MSG_020_10020_FIELD_VALUE014_14);
long fieldvalue015 = PipeReader.readLong(input,MSG_020_10020_FIELD_VALUE015_15);
long fieldvalue016 = PipeReader.readLong(input,MSG_020_10020_FIELD_VALUE016_16);
long fieldvalue017 = PipeReader.readLong(input,MSG_020_10020_FIELD_VALUE017_17);
long fieldvalue018 = PipeReader.readLong(input,MSG_020_10020_FIELD_VALUE018_18);
long fieldvalue019 = PipeReader.readLong(input,MSG_020_10020_FIELD_VALUE019_19);
long fieldvalue020 = PipeReader.readLong(input,MSG_020_10020_FIELD_VALUE020_20);
}
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:23,代码来源:PhastCodecSchema.java
示例19: consume017
import com.ociweb.pronghorn.pipe.PipeReader; //导入依赖的package包/类
public static void consume017(Pipe<PhastCodecSchema> input) {
long fieldvalue001 = PipeReader.readLong(input,MSG_017_10017_FIELD_VALUE001_1);
long fieldvalue002 = PipeReader.readLong(input,MSG_017_10017_FIELD_VALUE002_2);
long fieldvalue003 = PipeReader.readLong(input,MSG_017_10017_FIELD_VALUE003_3);
long fieldvalue004 = PipeReader.readLong(input,MSG_017_10017_FIELD_VALUE004_4);
long fieldvalue005 = PipeReader.readLong(input,MSG_017_10017_FIELD_VALUE005_5);
long fieldvalue006 = PipeReader.readLong(input,MSG_017_10017_FIELD_VALUE006_6);
long fieldvalue007 = PipeReader.readLong(input,MSG_017_10017_FIELD_VALUE007_7);
long fieldvalue008 = PipeReader.readLong(input,MSG_017_10017_FIELD_VALUE008_8);
long fieldvalue009 = PipeReader.readLong(input,MSG_017_10017_FIELD_VALUE009_9);
long fieldvalue010 = PipeReader.readLong(input,MSG_017_10017_FIELD_VALUE010_10);
long fieldvalue011 = PipeReader.readLong(input,MSG_017_10017_FIELD_VALUE011_11);
long fieldvalue012 = PipeReader.readLong(input,MSG_017_10017_FIELD_VALUE012_12);
long fieldvalue013 = PipeReader.readLong(input,MSG_017_10017_FIELD_VALUE013_13);
long fieldvalue014 = PipeReader.readLong(input,MSG_017_10017_FIELD_VALUE014_14);
long fieldvalue015 = PipeReader.readLong(input,MSG_017_10017_FIELD_VALUE015_15);
long fieldvalue016 = PipeReader.readLong(input,MSG_017_10017_FIELD_VALUE016_16);
long fieldvalue017 = PipeReader.readLong(input,MSG_017_10017_FIELD_VALUE017_17);
}
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:20,代码来源:PhastCodecSchema.java
示例20: consume021
import com.ociweb.pronghorn.pipe.PipeReader; //导入依赖的package包/类
public static void consume021(Pipe<PhastCodecSchema> input) {
long fieldvalue001 = PipeReader.readLong(input,MSG_021_10021_FIELD_VALUE001_1);
long fieldvalue002 = PipeReader.readLong(input,MSG_021_10021_FIELD_VALUE002_2);
long fieldvalue003 = PipeReader.readLong(input,MSG_021_10021_FIELD_VALUE003_3);
long fieldvalue004 = PipeReader.readLong(input,MSG_021_10021_FIELD_VALUE004_4);
long fieldvalue005 = PipeReader.readLong(input,MSG_021_10021_FIELD_VALUE005_5);
long fieldvalue006 = PipeReader.readLong(input,MSG_021_10021_FIELD_VALUE006_6);
long fieldvalue007 = PipeReader.readLong(input,MSG_021_10021_FIELD_VALUE007_7);
long fieldvalue008 = PipeReader.readLong(input,MSG_021_10021_FIELD_VALUE008_8);
long fieldvalue009 = PipeReader.readLong(input,MSG_021_10021_FIELD_VALUE009_9);
long fieldvalue010 = PipeReader.readLong(input,MSG_021_10021_FIELD_VALUE010_10);
long fieldvalue011 = PipeReader.readLong(input,MSG_021_10021_FIELD_VALUE011_11);
long fieldvalue012 = PipeReader.readLong(input,MSG_021_10021_FIELD_VALUE012_12);
long fieldvalue013 = PipeReader.readLong(input,MSG_021_10021_FIELD_VALUE013_13);
long fieldvalue014 = PipeReader.readLong(input,MSG_021_10021_FIELD_VALUE014_14);
long fieldvalue015 = PipeReader.readLong(input,MSG_021_10021_FIELD_VALUE015_15);
long fieldvalue016 = PipeReader.readLong(input,MSG_021_10021_FIELD_VALUE016_16);
long fieldvalue017 = PipeReader.readLong(input,MSG_021_10021_FIELD_VALUE017_17);
long fieldvalue018 = PipeReader.readLong(input,MSG_021_10021_FIELD_VALUE018_18);
long fieldvalue019 = PipeReader.readLong(input,MSG_021_10021_FIELD_VALUE019_19);
long fieldvalue020 = PipeReader.readLong(input,MSG_021_10021_FIELD_VALUE020_20);
long fieldvalue021 = PipeReader.readLong(input,MSG_021_10021_FIELD_VALUE021_21);
}
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:24,代码来源:PhastCodecSchema.java
注:本文中的com.ociweb.pronghorn.pipe.PipeReader类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论