本文整理汇总了Java中com.ociweb.pronghorn.pipe.PipeReader.releaseReadLock方法的典型用法代码示例。如果您正苦于以下问题:Java PipeReader.releaseReadLock方法的具体用法?Java PipeReader.releaseReadLock怎么用?Java PipeReader.releaseReadLock使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.ociweb.pronghorn.pipe.PipeReader
的用法示例。
在下文中一共展示了PipeReader.releaseReadLock方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
}
示例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);
}
}
示例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);
}
}
示例4: 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;
}
}
}
示例5: consume
import com.ociweb.pronghorn.pipe.PipeReader; //导入方法依赖的package包/类
public static void consume(Pipe<GroveRequestSchema> input) {
while (PipeReader.tryReadFragment(input)) {
int msgIdx = PipeReader.getMsgIdx(input);
switch(msgIdx) {
case MSG_DIGITALSET_110:
consumeDigitalSet(input);
break;
case MSG_BLOCKCONNECTION_220:
consumeBlockConnection(input);
break;
case MSG_BLOCKCONNECTIONUNTIL_221:
consumeBlockConnectionUntil(input);
break;
case MSG_ANALOGSET_140:
consumeAnalogSet(input);
break;
case -1:
//requestShutdown();
break;
}
PipeReader.releaseReadLock(input);
}
}
示例6: consume
import com.ociweb.pronghorn.pipe.PipeReader; //导入方法依赖的package包/类
public static void consume(Pipe<BlockStorageXmitSchema> input) {
while (PipeReader.tryReadFragment(input)) {
int msgIdx = PipeReader.getMsgIdx(input);
switch(msgIdx) {
case MSG_WRITE_1:
consumeWrite(input);
break;
case MSG_READ_2:
consumeRead(input);
break;
case -1:
//requestShutdown();
break;
}
PipeReader.releaseReadLock(input);
}
}
示例7: consume
import com.ociweb.pronghorn.pipe.PipeReader; //导入方法依赖的package包/类
public static void consume(Pipe<NetResponseSchema> input) {
while (PipeReader.tryReadFragment(input)) {
int msgIdx = PipeReader.getMsgIdx(input);
switch(msgIdx) {
case MSG_RESPONSE_101:
consumeResponse(input);
break;
case MSG_CONTINUATION_102:
consumeContinuation(input);
break;
case MSG_CLOSED_10:
consumeClosed(input);
break;
case -1:
//requestShutdown();
break;
}
PipeReader.releaseReadLock(input);
}
}
示例8: consume
import com.ociweb.pronghorn.pipe.PipeReader; //导入方法依赖的package包/类
public static void consume(Pipe<I2CCommandSchema> input) {
while (PipeReader.tryReadFragment(input)) {
int msgIdx = PipeReader.getMsgIdx(input);
switch(msgIdx) {
case MSG_COMMAND_7:
consumeCommand(input);
break;
case MSG_BLOCKCONNECTION_20:
consumeBlockConnection(input);
break;
case MSG_BLOCKCONNECTIONUNTIL_21:
consumeBlockConnectionUntil(input);
break;
case MSG_BLOCKCHANNEL_22:
consumeBlockChannel(input);
break;
case MSG_BLOCKCHANNELUNTIL_23:
consumeBlockChannelUntil(input);
break;
case -1:
//requestShutdown();
break;
}
PipeReader.releaseReadLock(input);
}
}
示例9: 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);
}
}
示例10: consume
import com.ociweb.pronghorn.pipe.PipeReader; //导入方法依赖的package包/类
public static void consume(Pipe<BlockStorageReceiveSchema> input) {
while (PipeReader.tryReadFragment(input)) {
int msgIdx = PipeReader.getMsgIdx(input);
switch(msgIdx) {
case MSG_ERROR_3:
consumeError(input);
break;
case MSG_WRITEACK_2:
consumeWriteAck(input);
break;
case MSG_DATARESPONSE_1:
consumeDataResponse(input);
break;
case -1:
//requestShutdown();
break;
}
PipeReader.releaseReadLock(input);
}
}
示例11: consumeI2CMessage
import com.ociweb.pronghorn.pipe.PipeReader; //导入方法依赖的package包/类
protected void consumeI2CMessage(Object listener, Pipe<I2CResponseSchema> p) {
while (PipeReader.tryReadFragment(p)) {
int msgIdx = PipeReader.getMsgIdx(p);
switch (msgIdx) {
case I2CResponseSchema.MSG_RESPONSE_10:
processI2CMessage(listener, p);
break;
case -1:
requestShutdown();
PipeReader.releaseReadLock(p);
return;
default:
throw new UnsupportedOperationException("Unknown id: "+msgIdx);
}
//done reading message off pipe
PipeReader.releaseReadLock(p);
}
}
示例12: consume
import com.ociweb.pronghorn.pipe.PipeReader; //导入方法依赖的package包/类
public static void consume(Pipe<IngressMessages> input) {
while (PipeReader.tryReadFragment(input)) {
int msgIdx = PipeReader.getMsgIdx(input);
switch(msgIdx) {
case MSG_PUBLISH_103:
consumePublish(input);
break;
case -1:
//requestShutdown();
break;
}
PipeReader.releaseReadLock(input);
}
}
示例13: consume
import com.ociweb.pronghorn.pipe.PipeReader; //导入方法依赖的package包/类
public static void consume(Pipe<TrafficAckSchema> input) {
while (PipeReader.tryReadFragment(input)) {
int msgIdx = PipeReader.getMsgIdx(input);
switch(msgIdx) {
case MSG_DONE_10:
consumeDone(input);
break;
case -1:
//requestShutdown();
break;
}
PipeReader.releaseReadLock(input);
}
}
示例14: consume
import com.ociweb.pronghorn.pipe.PipeReader; //导入方法依赖的package包/类
public static void consume(Pipe<MessagePrivate> input) {
while (PipeReader.tryReadFragment(input)) {
int msgIdx = PipeReader.getMsgIdx(input);
switch(msgIdx) {
case MSG_PUBLISH_1:
consumePublish(input);
break;
case -1:
//requestShutdown();
break;
}
PipeReader.releaseReadLock(input);
}
}
示例15: consume
import com.ociweb.pronghorn.pipe.PipeReader; //导入方法依赖的package包/类
public static void consume(Pipe<TrafficReleaseSchema> input) {
while (PipeReader.tryReadFragment(input)) {
int msgIdx = PipeReader.getMsgIdx(input);
switch(msgIdx) {
case MSG_RELEASE_20:
consumeRelease(input);
break;
case -1:
//requestShutdown();
break;
}
PipeReader.releaseReadLock(input);
}
}