本文整理汇总了Java中org.apache.activemq.artemis.api.core.ActiveMQBuffer.writeLong方法的典型用法代码示例。如果您正苦于以下问题:Java ActiveMQBuffer.writeLong方法的具体用法?Java ActiveMQBuffer.writeLong怎么用?Java ActiveMQBuffer.writeLong使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.activemq.artemis.api.core.ActiveMQBuffer
的用法示例。
在下文中一共展示了ActiveMQBuffer.writeLong方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: encodeRest
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void encodeRest(final ActiveMQBuffer buffer) {
buffer.writeString(nodeID);
buffer.writeNullableString(backupGroupName);
buffer.writeBoolean(backup);
buffer.writeLong(currentEventID);
if (connector != null) {
buffer.writeBoolean(true);
connector.encode(buffer);
} else {
buffer.writeBoolean(false);
}
if (backupConnector != null) {
buffer.writeBoolean(true);
backupConnector.encode(buffer);
} else {
buffer.writeBoolean(false);
}
buffer.writeNullableString(scaleDownGroupName);
}
示例2: randomBuffer
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
public static ActiveMQBuffer randomBuffer(final int size, final long... data) {
ActiveMQBuffer buffer = ActiveMQBuffers.fixedBuffer(size + 8 * data.length);
for (long d : data) {
buffer.writeLong(d);
}
for (int i = 0; i < size; i++) {
buffer.writeByte(randomByte());
}
return buffer;
}
示例3: encodeRest
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void encodeRest(final ActiveMQBuffer buffer) {
buffer.writeByte(journalID);
buffer.writeLong(txId);
buffer.writeLong(id);
buffer.writeInt(encodingData.getEncodeSize());
encodingData.encode(buffer);
}
示例4: encodeRest
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void encodeRest(final ActiveMQBuffer buffer) {
buffer.writeByte(journalID);
buffer.writeLong(txId);
buffer.writeInt(encodingData.getEncodeSize());
encodingData.encode(buffer);
}
示例5: encodeRest
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void encodeRest(final ActiveMQBuffer buffer) {
buffer.writeByte(journalID);
buffer.writeBoolean(operation.toBoolean());
buffer.writeLong(txId);
buffer.writeLong(id);
buffer.writeByte(recordType);
buffer.writeInt(persister.getEncodeSize(encodingData));
persister.encode(buffer, encodingData);
}
示例6: encodeRest
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void encodeRest(final ActiveMQBuffer buffer) {
buffer.writeLong(fileId);
if (fileId == -1)
return;
buffer.writeByte(fileType.code);
switch (fileType) {
case JOURNAL: {
buffer.writeByte(journalType.typeByte);
break;
}
case PAGE: {
buffer.writeSimpleString(pageStoreName);
break;
}
case LARGE_MESSAGE:
default:
// no-op
}
buffer.writeInt(dataSize);
/*
* sending -1 will close the file in case of a journal, but not in case of a largeMessage
* (which might receive appends)
*/
if (dataSize > 0) {
buffer.writeBytes(byteBuffer, 0, byteBuffer.writerIndex());
}
release();
}
示例7: encodeRest
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void encodeRest(final ActiveMQBuffer buffer) {
buffer.writeBoolean(synchronizationIsFinished);
buffer.writeBoolean(allowsAutoFailBack);
buffer.writeString(nodeID);
if (synchronizationIsFinished)
return;
buffer.writeByte(dataType.code);
buffer.writeInt(ids.length);
for (long id : ids) {
buffer.writeLong(id);
}
}
示例8: encodeRest
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void encodeRest(final ActiveMQBuffer buffer) {
buffer.writeLong(consumerID);
buffer.writeInt(deliveryCount);
buffer.writeLong(largeMessageSize);
if (message != null) {
((CoreMessage)message).encodeHeadersAndProperties(buffer.byteBuf());
}
}
示例9: encode
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void encode(ActiveMQBuffer buffer) {
buffer.writeByte(recordType);
buffer.writeLong(id);
}
示例10: encodeRest
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void encodeRest(final ActiveMQBuffer buffer) {
buffer.writeLong(consumerID);
}
示例11: encodeRest
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void encodeRest(final ActiveMQBuffer buffer) {
buffer.writeLong(messageId);
}
示例12: encodeRest
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void encodeRest(final ActiveMQBuffer buffer) {
buffer.writeLong(messageId);
buffer.writeInt(body.length);
buffer.writeBytes(body);
}
示例13: bytesWriteLong
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
public static void bytesWriteLong(ActiveMQBuffer message, long value) {
message.writeLong(value);
}
示例14: encode
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void encode(final ActiveMQBuffer buffer) {
buffer.writeLong(queueID);
}
示例15: encode
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void encode(ActiveMQBuffer buffer) {
buffer.writeLong(queueID);
buffer.writeLong(value);
}