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


Java ActiveMQBuffer.writeInt方法代码示例

本文整理汇总了Java中org.apache.activemq.artemis.api.core.ActiveMQBuffer.writeInt方法的典型用法代码示例。如果您正苦于以下问题:Java ActiveMQBuffer.writeInt方法的具体用法?Java ActiveMQBuffer.writeInt怎么用?Java ActiveMQBuffer.writeInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.activemq.artemis.api.core.ActiveMQBuffer的用法示例。


在下文中一共展示了ActiveMQBuffer.writeInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: broadcastConnectors

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public synchronized void broadcastConnectors() throws Exception {
   ActiveMQBuffer buff = ActiveMQBuffers.dynamicBuffer(4096);

   buff.writeString(nodeManager.getNodeId().toString());

   buff.writeString(uniqueID);

   buff.writeInt(connectors.size());

   for (TransportConfiguration tcConfig : connectors) {
      tcConfig.encode(buff);
   }

   // Only send as many bytes as we need.
   byte[] data = new byte[buff.readableBytes()];
   buff.getBytes(buff.readerIndex(), data);

   endpoint.broadcast(data);
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:21,代码来源:BroadcastGroupImpl.java

示例2: 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());
   }
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:10,代码来源:SessionReceiveLargeMessage.java

示例3: encodeConfigs

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
public static void encodeConfigs(ActiveMQBuffer buffer,
                                 List<Pair<TransportConfiguration, TransportConfiguration>> configs) {
   buffer.writeInt(configs == null ? 0 : configs.size());
   if (configs != null) {
      for (Pair<TransportConfiguration, TransportConfiguration> pair : configs) {
         encode(buffer, pair.getA());
         boolean backup = (pair.getB() != null);
         buffer.writeBoolean(backup);
         if (backup) {
            encode(buffer, pair.getB());
         }
      }
   }
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:15,代码来源:TransportConfigurationEncodingSupport.java

示例4: encode

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void encode(final ActiveMQBuffer buffer) {
   buffer.writeSimpleString(name);
   buffer.writeSimpleString(address);
   buffer.writeNullableSimpleString(filterString);
   buffer.writeNullableSimpleString(createMetadata());
   buffer.writeBoolean(autoCreated);
   buffer.writeInt(maxConsumers);
   buffer.writeBoolean(purgeOnNoConsumers);
   buffer.writeByte(routingType);
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:12,代码来源:PersistentQueueBindingEncoding.java

示例5: encodeRest

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void encodeRest(ActiveMQBuffer buffer) {
   super.encodeRest(buffer);
   buffer.writeInt(backupSize);
   buffer.writeNullableString(journalDirectory);
   buffer.writeNullableString(bindingsDirectory);
   buffer.writeNullableString(largeMessagesDirectory);
   buffer.writeNullableString(pagingDirectory);
   buffer.writeNullableSimpleString(nodeID);
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:11,代码来源:BackupRequestMessage.java

示例6: encode

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void encode(final ActiveMQBuffer buffer) {
   buffer.writeByte(JournalImpl.ROLLBACK_RECORD);
   buffer.writeInt(fileID);
   buffer.writeByte(compactCount);
   buffer.writeLong(txID);
   buffer.writeInt(JournalImpl.SIZE_ROLLBACK_RECORD + 1);

}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:10,代码来源:JournalRollbackRecordTX.java

示例7: writeHeader

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
/**
 * @param buffer
 * @param userVersion
 * @param fileID
 */
public static void writeHeader(final ActiveMQBuffer buffer, final int userVersion, final long fileID) {
   buffer.writeInt(JournalImpl.FORMAT_VERSION);

   buffer.writeInt(userVersion);

   buffer.writeLong(fileID);
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:13,代码来源:JournalImpl.java

示例8: encodeXid

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
public static void encodeXid(final Xid xid, final ActiveMQBuffer out) {
   out.writeInt(xid.getFormatId());
   out.writeInt(xid.getBranchQualifier().length);
   out.writeBytes(xid.getBranchQualifier());
   out.writeInt(xid.getGlobalTransactionId().length);
   out.writeBytes(xid.getGlobalTransactionId());
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:8,代码来源:XidCodecSupport.java

示例9: writeNullableInteger

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
/**
 * @param buffer
 */
public static void writeNullableInteger(ActiveMQBuffer buffer, Integer value) {
   buffer.writeBoolean(value != null);

   if (value != null) {
      buffer.writeInt(value.intValue());
   }
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:11,代码来源:BufferHelper.java

示例10: encodeRest

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void encodeRest(final ActiveMQBuffer buffer) {
   buffer.writeInt(credits);
   buffer.writeSimpleString(address);
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:6,代码来源:SessionProducerCreditsMessage.java

示例11: encodeRest

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void encodeRest(final ActiveMQBuffer buffer) {
   buffer.writeInt(commandID);
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:5,代码来源:PacketsConfirmedMessage.java

示例12: encode

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void encode(final ActiveMQBuffer buffer) {
   if (add) {
      buffer.writeByte(JournalImpl.ADD_RECORD_TX);
   } else {
      buffer.writeByte(JournalImpl.UPDATE_RECORD_TX);
   }

   buffer.writeInt(fileID);

   buffer.writeByte(compactCount);

   buffer.writeLong(txID);

   buffer.writeLong(id);

   buffer.writeInt(persister.getEncodeSize(record));

   buffer.writeByte(recordType);

   persister.encode(buffer, record);

   buffer.writeInt(getEncodeSize());
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:25,代码来源:JournalAddRecordTX.java

示例13: encodeRest

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void encodeRest(final ActiveMQBuffer buffer) {
   buffer.writeInt(pageNumber);
   pagedMessage.encode(buffer);
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:6,代码来源:ReplicationPageWriteMessage.java

示例14: encodeRest

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void encodeRest(final ActiveMQBuffer buffer) {
   buffer.writeString(name);
   buffer.writeInt(lastConfirmedCommandID);
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:6,代码来源:ReattachSessionMessage.java

示例15: persist

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void persist(ActiveMQBuffer targetRecord) {
   checkBuffer();
   targetRecord.writeInt(internalPersistSize());
   targetRecord.writeBytes(data.array(), 0, data.array().length );
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:7,代码来源:AMQPMessage.java


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