• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java PipeWriter类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.ociweb.pronghorn.pipe.PipeWriter的典型用法代码示例。如果您正苦于以下问题:Java PipeWriter类的具体用法?Java PipeWriter怎么用?Java PipeWriter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PipeWriter类属于com.ociweb.pronghorn.pipe包,在下文中一共展示了PipeWriter类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: publishOnPrivateTopic

import com.ociweb.pronghorn.pipe.PipeWriter; //导入依赖的package包/类
private boolean publishOnPrivateTopic(int token, Writable writable) {
	//this is a private topic            
	Pipe<MessagePrivate> output = publishPrivateTopics.getPipe(token);
	if (PipeWriter.tryWriteFragment(output, MessagePrivate.MSG_PUBLISH_1)) {
				
		DataOutputBlobWriter<MessagePrivate> writer = PipeWriter.outputStream(output);
		DataOutputBlobWriter.openField(writer);
		writable.write(writer);
		DataOutputBlobWriter.closeHighLevelField(writer, MessagePrivate.MSG_PUBLISH_1_FIELD_PAYLOAD_3);
		
		PipeWriter.publishWrites(output);

		return true;
	} else {
		return false;
	}
}
 
开发者ID:oci-pronghorn,项目名称:GreenLightning,代码行数:18,代码来源:MsgCommandChannel.java


示例2: publishConnect

import com.ociweb.pronghorn.pipe.PipeWriter; //导入依赖的package包/类
private void publishConnect(Pipe<MQTTClientRequestSchema> output) {

		PipeWriter.presumeWriteFragment(output, MQTTClientRequestSchema.MSG_CONNECT_1);
			
	    PipeWriter.writeInt(output,MQTTClientRequestSchema.MSG_CONNECT_1_FIELD_KEEPALIVESEC_28, keepAliveSeconds);
	    PipeWriter.writeInt(output,MQTTClientRequestSchema.MSG_CONNECT_1_FIELD_FLAGS_29, flags);
	    PipeWriter.writeUTF8(output,MQTTClientRequestSchema.MSG_CONNECT_1_FIELD_CLIENTID_30, (CharSequence) clientId);
	    PipeWriter.writeUTF8(output,MQTTClientRequestSchema.MSG_CONNECT_1_FIELD_WILLTOPIC_31, (CharSequence) lastWillTopic);
	    
	    DataOutputBlobWriter<MQTTClientRequestSchema> writer = PipeWriter.outputStream(output);
	    DataOutputBlobWriter.openField(writer);	
	    if(null!= lastWillPayload) {
	    	lastWillPayload.write((MQTTWriter)writer);
	    }
	    DataOutputBlobWriter.closeHighLevelField(writer, MQTTClientRequestSchema.MSG_CONNECT_1_FIELD_WILLPAYLOAD_32);
	    
	    PipeWriter.writeUTF8(output,MQTTClientRequestSchema.MSG_CONNECT_1_FIELD_USER_33, (CharSequence) user);
	    PipeWriter.writeUTF8(output,MQTTClientRequestSchema.MSG_CONNECT_1_FIELD_PASS_34, (CharSequence) pass);
	    PipeWriter.publishWrites(output);
	}
 
开发者ID:oci-pronghorn,项目名称:GreenLightning,代码行数:21,代码来源:MQTTConfigImpl.java


示例3: copyToSubscriber

import com.ociweb.pronghorn.pipe.PipeWriter; //导入依赖的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


示例4: run

import com.ociweb.pronghorn.pipe.PipeWriter; //导入依赖的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: writeAndReadImpl

import com.ociweb.pronghorn.pipe.PipeWriter; //导入依赖的package包/类
private void writeAndReadImpl(boolean encryption, boolean telemetry) {
	Pipe<PersistedBlobStoreSchema> perStore = PersistedBlobStoreSchema.instance.newPipe(10, 1000);
	
	perStore.initBuffers();
	
	byte[] fieldByteArrayBacking = "hello".getBytes();
	int fieldByteArrayLength = fieldByteArrayBacking.length;
	
	PipeWriter.presumeWriteFragment(perStore, PersistedBlobStoreSchema.MSG_BLOCK_1);
	PipeWriter.writeLong(perStore,PersistedBlobStoreSchema.MSG_BLOCK_1_FIELD_BLOCKID_3, (long) 10);
	PipeWriter.writeBytes(perStore,PersistedBlobStoreSchema.MSG_BLOCK_1_FIELD_BYTEARRAY_2, fieldByteArrayBacking, 0, fieldByteArrayLength);
	PipeWriter.publishWrites(perStore);
	
	PipeWriter.presumeWriteFragment(perStore, PersistedBlobStoreSchema.MSG_REQUESTREPLAY_6);
	PipeWriter.publishWrites(perStore);
	
	PipeWriter.publishEOF(perStore); //ensure that the parts do not shut down before we are done
			
	String result = runGraph(perStore, encryption, telemetry);
				
	assertTrue(result, result.indexOf("AckWrite")>0);
	assertTrue(result, result.indexOf("{\"BlockId\":10}")>0);
	assertTrue(result, result.indexOf("0x68,0x65,0x6c,0x6c,0x6f")>0);
	assertTrue(result, result.indexOf("FinishReplay")>0);
}
 
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:26,代码来源:SequentialReplayerStageTest.java


示例6: run

import com.ociweb.pronghorn.pipe.PipeWriter; //导入依赖的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


示例7: publishUser

import com.ociweb.pronghorn.pipe.PipeWriter; //导入依赖的package包/类
public static void publishUser(Pipe<TwitterEventSchema> output, int fieldFlags, long fieldUserId, CharSequence fieldName, CharSequence fieldScreenName, int fieldFavouritesCount, int fieldFollowersCount, int fieldFriendsCount, CharSequence fieldCreatedAt, CharSequence fieldDescription, int fieldListedCount, CharSequence fieldLanguage, CharSequence fieldTimeZone, CharSequence fieldLocation) {
        PipeWriter.presumeWriteFragment(output, MSG_USER_100);
        PipeWriter.writeInt(output,MSG_USER_100_FIELD_FLAGS_31, fieldFlags);
        PipeWriter.writeLong(output,MSG_USER_100_FIELD_USERID_51, fieldUserId);
        PipeWriter.writeUTF8(output,MSG_USER_100_FIELD_NAME_52, fieldName);
        PipeWriter.writeUTF8(output,MSG_USER_100_FIELD_SCREENNAME_53, fieldScreenName);
        PipeWriter.writeInt(output,MSG_USER_100_FIELD_FAVOURITESCOUNT_54, fieldFavouritesCount);
        PipeWriter.writeInt(output,MSG_USER_100_FIELD_FOLLOWERSCOUNT_55, fieldFollowersCount);
        PipeWriter.writeInt(output,MSG_USER_100_FIELD_FRIENDSCOUNT_56, fieldFriendsCount);
        PipeWriter.writeUTF8(output,MSG_USER_100_FIELD_CREATEDAT_57, fieldCreatedAt);
        PipeWriter.writeUTF8(output,MSG_USER_100_FIELD_DESCRIPTION_58, fieldDescription);
        PipeWriter.writeInt(output,MSG_USER_100_FIELD_LISTEDCOUNT_59, fieldListedCount);
        PipeWriter.writeUTF8(output,MSG_USER_100_FIELD_LANGUAGE_60, fieldLanguage);
        PipeWriter.writeUTF8(output,MSG_USER_100_FIELD_TIMEZONE_61, fieldTimeZone);
        PipeWriter.writeUTF8(output,MSG_USER_100_FIELD_LOCATION_62, fieldLocation);
        PipeWriter.publishWrites(output);
}
 
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:18,代码来源:TwitterEventSchema.java


示例8: publish015

import com.ociweb.pronghorn.pipe.PipeWriter; //导入依赖的package包/类
public static void publish015(Pipe<PhastCodecSchema> output, long fieldvalue001, long fieldvalue002, long fieldvalue003, long fieldvalue004, long fieldvalue005, long fieldvalue006, long fieldvalue007, long fieldvalue008, long fieldvalue009, long fieldvalue010, long fieldvalue011, long fieldvalue012, long fieldvalue013, long fieldvalue014, long fieldvalue015) {
        PipeWriter.presumeWriteFragment(output, MSG_015_10015);
        PipeWriter.writeLong(output,MSG_015_10015_FIELD_VALUE001_1, fieldvalue001);
        PipeWriter.writeLong(output,MSG_015_10015_FIELD_VALUE002_2, fieldvalue002);
        PipeWriter.writeLong(output,MSG_015_10015_FIELD_VALUE003_3, fieldvalue003);
        PipeWriter.writeLong(output,MSG_015_10015_FIELD_VALUE004_4, fieldvalue004);
        PipeWriter.writeLong(output,MSG_015_10015_FIELD_VALUE005_5, fieldvalue005);
        PipeWriter.writeLong(output,MSG_015_10015_FIELD_VALUE006_6, fieldvalue006);
        PipeWriter.writeLong(output,MSG_015_10015_FIELD_VALUE007_7, fieldvalue007);
        PipeWriter.writeLong(output,MSG_015_10015_FIELD_VALUE008_8, fieldvalue008);
        PipeWriter.writeLong(output,MSG_015_10015_FIELD_VALUE009_9, fieldvalue009);
        PipeWriter.writeLong(output,MSG_015_10015_FIELD_VALUE010_10, fieldvalue010);
        PipeWriter.writeLong(output,MSG_015_10015_FIELD_VALUE011_11, fieldvalue011);
        PipeWriter.writeLong(output,MSG_015_10015_FIELD_VALUE012_12, fieldvalue012);
        PipeWriter.writeLong(output,MSG_015_10015_FIELD_VALUE013_13, fieldvalue013);
        PipeWriter.writeLong(output,MSG_015_10015_FIELD_VALUE014_14, fieldvalue014);
        PipeWriter.writeLong(output,MSG_015_10015_FIELD_VALUE015_15, fieldvalue015);
        PipeWriter.publishWrites(output);
}
 
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:20,代码来源:PhastCodecSchema.java


示例9: publish014

import com.ociweb.pronghorn.pipe.PipeWriter; //导入依赖的package包/类
public static void publish014(Pipe<PhastCodecSchema> output, long fieldvalue001, long fieldvalue002, long fieldvalue003, long fieldvalue004, long fieldvalue005, long fieldvalue006, long fieldvalue007, long fieldvalue008, long fieldvalue009, long fieldvalue010, long fieldvalue011, long fieldvalue012, long fieldvalue013, long fieldvalue014) {
        PipeWriter.presumeWriteFragment(output, MSG_014_10014);
        PipeWriter.writeLong(output,MSG_014_10014_FIELD_VALUE001_1, fieldvalue001);
        PipeWriter.writeLong(output,MSG_014_10014_FIELD_VALUE002_2, fieldvalue002);
        PipeWriter.writeLong(output,MSG_014_10014_FIELD_VALUE003_3, fieldvalue003);
        PipeWriter.writeLong(output,MSG_014_10014_FIELD_VALUE004_4, fieldvalue004);
        PipeWriter.writeLong(output,MSG_014_10014_FIELD_VALUE005_5, fieldvalue005);
        PipeWriter.writeLong(output,MSG_014_10014_FIELD_VALUE006_6, fieldvalue006);
        PipeWriter.writeLong(output,MSG_014_10014_FIELD_VALUE007_7, fieldvalue007);
        PipeWriter.writeLong(output,MSG_014_10014_FIELD_VALUE008_8, fieldvalue008);
        PipeWriter.writeLong(output,MSG_014_10014_FIELD_VALUE009_9, fieldvalue009);
        PipeWriter.writeLong(output,MSG_014_10014_FIELD_VALUE010_10, fieldvalue010);
        PipeWriter.writeLong(output,MSG_014_10014_FIELD_VALUE011_11, fieldvalue011);
        PipeWriter.writeLong(output,MSG_014_10014_FIELD_VALUE012_12, fieldvalue012);
        PipeWriter.writeLong(output,MSG_014_10014_FIELD_VALUE013_13, fieldvalue013);
        PipeWriter.writeLong(output,MSG_014_10014_FIELD_VALUE014_14, fieldvalue014);
        PipeWriter.publishWrites(output);
}
 
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:19,代码来源:PhastCodecSchema.java


示例10: populateRingBufferWithBytes

import com.ociweb.pronghorn.pipe.PipeWriter; //导入依赖的package包/类
private void populateRingBufferWithBytes(Pipe pipe, int blockSize, int testSize) {
	int j = testSize;
       while (true) {
       	
       	if (j == 0) {
       		return;//done
       	}

       	if (PipeWriter.tryWriteFragment(pipe,FRAG_LOC)) { //returns true if there is room to write this fragment
       	    Pipe.writeTrailingCountOfBytesConsumed(pipe, FRAG_LOC);
       		int arraySize = (--j*blockSize)/testSize;
       		byte[] arrayData = buildTestData(arraySize);
       		        		
       		PipeWriter.writeBytes(pipe, FRAG_FIELD, arrayData);
       		
       		//because there is only 1 template we do not write the template id it is assumed to be zero.
       		//now we write the data for the message        		
       		Pipe.publishWritesBatched(pipe); //must always publish the writes if message or fragment
       		
       	} else {
       		//Unable to write because there is no room so do something else while we are waiting.
       		Thread.yield();
       	}        	
       	
       }
}
 
开发者ID:oci-pronghorn,项目名称:PronghornPipes,代码行数:27,代码来源:PipeSingleTemplateTest.java


示例11: publish013

import com.ociweb.pronghorn.pipe.PipeWriter; //导入依赖的package包/类
public static void publish013(Pipe<PhastCodecSchema> output, long fieldvalue001, long fieldvalue002, long fieldvalue003, long fieldvalue004, long fieldvalue005, long fieldvalue006, long fieldvalue007, long fieldvalue008, long fieldvalue009, long fieldvalue010, long fieldvalue011, long fieldvalue012, long fieldvalue013) {
        PipeWriter.presumeWriteFragment(output, MSG_013_10013);
        PipeWriter.writeLong(output,MSG_013_10013_FIELD_VALUE001_1, fieldvalue001);
        PipeWriter.writeLong(output,MSG_013_10013_FIELD_VALUE002_2, fieldvalue002);
        PipeWriter.writeLong(output,MSG_013_10013_FIELD_VALUE003_3, fieldvalue003);
        PipeWriter.writeLong(output,MSG_013_10013_FIELD_VALUE004_4, fieldvalue004);
        PipeWriter.writeLong(output,MSG_013_10013_FIELD_VALUE005_5, fieldvalue005);
        PipeWriter.writeLong(output,MSG_013_10013_FIELD_VALUE006_6, fieldvalue006);
        PipeWriter.writeLong(output,MSG_013_10013_FIELD_VALUE007_7, fieldvalue007);
        PipeWriter.writeLong(output,MSG_013_10013_FIELD_VALUE008_8, fieldvalue008);
        PipeWriter.writeLong(output,MSG_013_10013_FIELD_VALUE009_9, fieldvalue009);
        PipeWriter.writeLong(output,MSG_013_10013_FIELD_VALUE010_10, fieldvalue010);
        PipeWriter.writeLong(output,MSG_013_10013_FIELD_VALUE011_11, fieldvalue011);
        PipeWriter.writeLong(output,MSG_013_10013_FIELD_VALUE012_12, fieldvalue012);
        PipeWriter.writeLong(output,MSG_013_10013_FIELD_VALUE013_13, fieldvalue013);
        PipeWriter.publishWrites(output);
}
 
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:18,代码来源:PhastCodecSchema.java


示例12: publish020

import com.ociweb.pronghorn.pipe.PipeWriter; //导入依赖的package包/类
public static void publish020(Pipe<PhastCodecSchema> output, long fieldvalue001, long fieldvalue002, long fieldvalue003, long fieldvalue004, long fieldvalue005, long fieldvalue006, long fieldvalue007, long fieldvalue008, long fieldvalue009, long fieldvalue010, long fieldvalue011, long fieldvalue012, long fieldvalue013, long fieldvalue014, long fieldvalue015, long fieldvalue016, long fieldvalue017, long fieldvalue018, long fieldvalue019, long fieldvalue020) {
        PipeWriter.presumeWriteFragment(output, MSG_020_10020);
        PipeWriter.writeLong(output,MSG_020_10020_FIELD_VALUE001_1, fieldvalue001);
        PipeWriter.writeLong(output,MSG_020_10020_FIELD_VALUE002_2, fieldvalue002);
        PipeWriter.writeLong(output,MSG_020_10020_FIELD_VALUE003_3, fieldvalue003);
        PipeWriter.writeLong(output,MSG_020_10020_FIELD_VALUE004_4, fieldvalue004);
        PipeWriter.writeLong(output,MSG_020_10020_FIELD_VALUE005_5, fieldvalue005);
        PipeWriter.writeLong(output,MSG_020_10020_FIELD_VALUE006_6, fieldvalue006);
        PipeWriter.writeLong(output,MSG_020_10020_FIELD_VALUE007_7, fieldvalue007);
        PipeWriter.writeLong(output,MSG_020_10020_FIELD_VALUE008_8, fieldvalue008);
        PipeWriter.writeLong(output,MSG_020_10020_FIELD_VALUE009_9, fieldvalue009);
        PipeWriter.writeLong(output,MSG_020_10020_FIELD_VALUE010_10, fieldvalue010);
        PipeWriter.writeLong(output,MSG_020_10020_FIELD_VALUE011_11, fieldvalue011);
        PipeWriter.writeLong(output,MSG_020_10020_FIELD_VALUE012_12, fieldvalue012);
        PipeWriter.writeLong(output,MSG_020_10020_FIELD_VALUE013_13, fieldvalue013);
        PipeWriter.writeLong(output,MSG_020_10020_FIELD_VALUE014_14, fieldvalue014);
        PipeWriter.writeLong(output,MSG_020_10020_FIELD_VALUE015_15, fieldvalue015);
        PipeWriter.writeLong(output,MSG_020_10020_FIELD_VALUE016_16, fieldvalue016);
        PipeWriter.writeLong(output,MSG_020_10020_FIELD_VALUE017_17, fieldvalue017);
        PipeWriter.writeLong(output,MSG_020_10020_FIELD_VALUE018_18, fieldvalue018);
        PipeWriter.writeLong(output,MSG_020_10020_FIELD_VALUE019_19, fieldvalue019);
        PipeWriter.writeLong(output,MSG_020_10020_FIELD_VALUE020_20, fieldvalue020);
        PipeWriter.publishWrites(output);
}
 
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:25,代码来源:PhastCodecSchema.java


示例13: publish012

import com.ociweb.pronghorn.pipe.PipeWriter; //导入依赖的package包/类
public static void publish012(Pipe<PhastCodecSchema> output, long fieldvalue001, long fieldvalue002, long fieldvalue003, long fieldvalue004, long fieldvalue005, long fieldvalue006, long fieldvalue007, long fieldvalue008, long fieldvalue009, long fieldvalue010, long fieldvalue011, long fieldvalue012) {
        PipeWriter.presumeWriteFragment(output, MSG_012_10012);
        PipeWriter.writeLong(output,MSG_012_10012_FIELD_VALUE001_1, fieldvalue001);
        PipeWriter.writeLong(output,MSG_012_10012_FIELD_VALUE002_2, fieldvalue002);
        PipeWriter.writeLong(output,MSG_012_10012_FIELD_VALUE003_3, fieldvalue003);
        PipeWriter.writeLong(output,MSG_012_10012_FIELD_VALUE004_4, fieldvalue004);
        PipeWriter.writeLong(output,MSG_012_10012_FIELD_VALUE005_5, fieldvalue005);
        PipeWriter.writeLong(output,MSG_012_10012_FIELD_VALUE006_6, fieldvalue006);
        PipeWriter.writeLong(output,MSG_012_10012_FIELD_VALUE007_7, fieldvalue007);
        PipeWriter.writeLong(output,MSG_012_10012_FIELD_VALUE008_8, fieldvalue008);
        PipeWriter.writeLong(output,MSG_012_10012_FIELD_VALUE009_9, fieldvalue009);
        PipeWriter.writeLong(output,MSG_012_10012_FIELD_VALUE010_10, fieldvalue010);
        PipeWriter.writeLong(output,MSG_012_10012_FIELD_VALUE011_11, fieldvalue011);
        PipeWriter.writeLong(output,MSG_012_10012_FIELD_VALUE012_12, fieldvalue012);
        PipeWriter.publishWrites(output);
}
 
开发者ID:oci-pronghorn,项目名称:Pronghorn,代码行数:17,代码来源:PhastCodecSchema.java


示例14: sentEOF

import com.ociweb.pronghorn.pipe.PipeWriter; //导入依赖的package包/类
protected boolean sentEOF(Pipe<?> pipe) {
	if (null!=pipe) {
		PipeWriter.publishEOF(pipe);
		return true;		
	} else {
		return false;
	}
}
 
开发者ID:oci-pronghorn,项目名称:GreenLightning,代码行数:9,代码来源:MsgCommandChannel.java


示例15: publishBlockChannel

import com.ociweb.pronghorn.pipe.PipeWriter; //导入依赖的package包/类
public static void publishBlockChannel(long durationNanos, MsgCommandChannel<?> gcc) {
	
	if (null != gcc.goPipe) {
		PipeWriter.presumeWriteFragment(gcc.goPipe, TrafficOrderSchema.MSG_BLOCKCHANNEL_22);
		PipeWriter.writeLong(gcc.goPipe,TrafficOrderSchema.MSG_BLOCKCHANNEL_22_FIELD_DURATIONNANOS_13, durationNanos);
		PipeWriter.publishWrites(gcc.goPipe);
	} else {
		logger.info("Unable to use block channel for ns without an additonal feature use or USE_DELAY can be added.");
	}
}
 
开发者ID:oci-pronghorn,项目名称:GreenLightning,代码行数:11,代码来源:MsgCommandChannel.java


示例16: publishBlockChannelUntil

import com.ociweb.pronghorn.pipe.PipeWriter; //导入依赖的package包/类
public static void publishBlockChannelUntil(long timeMS, MsgCommandChannel<?> gcc) {
	
	if (null != gcc.goPipe) {
		PipeWriter.presumeWriteFragment(gcc.goPipe, TrafficOrderSchema.MSG_BLOCKCHANNELUNTIL_23);
		PipeWriter.writeLong(gcc.goPipe,TrafficOrderSchema.MSG_BLOCKCHANNELUNTIL_23_FIELD_TIMEMS_14, timeMS);
		PipeWriter.publishWrites(gcc.goPipe);
	} else {
		logger.info("Unable to use block channel for ns without an additonal feature or USE_DELAY can be added.");
	}
}
 
开发者ID:oci-pronghorn,项目名称:GreenLightning,代码行数:11,代码来源:MsgCommandChannel.java


示例17: publish

import com.ociweb.pronghorn.pipe.PipeWriter; //导入依赖的package包/类
public boolean publish() {
    if (loc!=-1) {
     closeHighLevelField(loc);
     loc = -1;//clear field
     PipeWriter.publishWrites(p);     
     return true;	       
     
    }
    return false;
}
 
开发者ID:oci-pronghorn,项目名称:GreenLightning,代码行数:11,代码来源:PayloadWriter.java


示例18: publishPublish

import com.ociweb.pronghorn.pipe.PipeWriter; //导入依赖的package包/类
public static void publishPublish(Pipe<MessagePubSub> output, int fieldQOS, CharSequence fieldTopic, byte[] fieldPayloadBacking, int fieldPayloadPosition, int fieldPayloadLength) {
        PipeWriter.presumeWriteFragment(output, MSG_PUBLISH_103);
        PipeWriter.writeInt(output,MSG_PUBLISH_103_FIELD_QOS_5, fieldQOS);
        PipeWriter.writeUTF8(output,MSG_PUBLISH_103_FIELD_TOPIC_1, fieldTopic);
        PipeWriter.writeBytes(output,MSG_PUBLISH_103_FIELD_PAYLOAD_3, fieldPayloadBacking, fieldPayloadPosition, fieldPayloadLength);
        PipeWriter.publishWrites(output);
}
 
开发者ID:oci-pronghorn,项目名称:GreenLightning,代码行数:8,代码来源:MessagePubSub.java


示例19: publishBrokerConfig

import com.ociweb.pronghorn.pipe.PipeWriter; //导入依赖的package包/类
private void publishBrokerConfig(Pipe<MQTTClientRequestSchema> output) {
	PipeWriter.presumeWriteFragment(output, MQTTClientRequestSchema.MSG_BROKERCONFIG_100);
		
    PipeWriter.writeUTF8(output,MQTTClientRequestSchema.MSG_BROKERCONFIG_100_FIELD_HOST_26, (CharSequence) host);
    PipeWriter.writeInt(output,MQTTClientRequestSchema.MSG_BROKERCONFIG_100_FIELD_PORT_27, port);
    PipeWriter.publishWrites(output);
			
}
 
开发者ID:oci-pronghorn,项目名称:GreenLightning,代码行数:9,代码来源:MQTTConfigImpl.java


示例20: publish

import com.ociweb.pronghorn.pipe.PipeWriter; //导入依赖的package包/类
private void publish(Pipe<ValveSchema> output) {
	PipeWriter.presumeWriteFragment(output, msgIdx);
	PipeWriter.writeInt(output, stationFieldId, currentStationId);
	PipeWriter.writeLong(output, timestampFieldId, currentTimeStamp);
	//System.out.format("Wrote %d, %d, %d\n", msgIdx, currentStationId, currentTimeStamp);
	writeValue(output);
	PipeWriter.publishWrites(output);
}
 
开发者ID:oci-pronghorn,项目名称:FogLight-Examples,代码行数:9,代码来源:FilterStage.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java XSAttContainer类代码示例发布时间:2022-05-23
下一篇:
Java Constants类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap