当前位置: 首页>>代码示例>>Java>>正文


Java PipeReader.releaseReadLock方法代码示例

本文整理汇总了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);
    }
}
 
开发者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: 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

示例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);
    }
}
 
开发者ID:oci-pronghorn,项目名称:FogLight,代码行数:24,代码来源:GroveRequestSchema.java

示例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);
    }
}
 
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:18,代码来源:BlockStorageXmitSchema.java

示例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);
    }
}
 
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:21,代码来源:NetResponseSchema.java

示例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);
    }
}
 
开发者ID:oci-pronghorn,项目名称:FogLight,代码行数:27,代码来源:I2CCommandSchema.java

示例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);
    }
}
 
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:18,代码来源:TwitterEventSchema.java

示例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);
    }
}
 
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:21,代码来源:BlockStorageReceiveSchema.java

示例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);
        }
    }
 
开发者ID:oci-pronghorn,项目名称:FogLight,代码行数:24,代码来源:ReactiveIoTListenerStage.java

示例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);
    }
}
 
开发者ID:oci-pronghorn,项目名称:GreenLightning,代码行数:15,代码来源:IngressMessages.java

示例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);
    }
}
 
开发者ID:oci-pronghorn,项目名称:GreenLightning,代码行数:15,代码来源:TrafficAckSchema.java

示例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);
    }
}
 
开发者ID:oci-pronghorn,项目名称:GreenLightning,代码行数:15,代码来源:MessagePrivate.java

示例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);
    }
}
 
开发者ID:oci-pronghorn,项目名称:GreenLightning,代码行数:15,代码来源:TrafficReleaseSchema.java


注:本文中的com.ociweb.pronghorn.pipe.PipeReader.releaseReadLock方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。