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


Java ActiveMQBuffer.readSimpleString方法代码示例

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


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

示例1: decodeRest

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void decodeRest(final ActiveMQBuffer buffer) {
   fileId = buffer.readLong();
   switch (FileType.getFileType(buffer.readByte())) {
      case JOURNAL: {
         journalType = AbstractJournalStorageManager.JournalContent.getType(buffer.readByte());
         fileType = FileType.JOURNAL;
         break;
      }
      case PAGE: {
         pageStoreName = buffer.readSimpleString();
         fileType = FileType.PAGE;
         break;
      }
      case LARGE_MESSAGE: {
         fileType = FileType.LARGE_MESSAGE;
         break;
      }
   }
   int size = buffer.readInt();
   if (size > 0) {
      byteArray = new byte[size];
      buffer.readBytes(byteArray);
   }
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:26,代码来源:ReplicationSyncFileMessage.java

示例2: decodeRest

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void decodeRest(final ActiveMQBuffer buffer) {
   address = buffer.readSimpleString();
   queueName = buffer.readSimpleString();
   filterString = buffer.readNullableSimpleString();
   durable = buffer.readBoolean();
   routingType = RoutingType.getType(buffer.readByte());
   requiresResponse = buffer.readBoolean();
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:10,代码来源:CreateSharedQueueMessage_V2.java

示例3: decodeRest

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void decodeRest(final ActiveMQBuffer buffer) {
   address = buffer.readSimpleString();
   queueName = buffer.readSimpleString();
   filterString = buffer.readNullableSimpleString();
   durable = buffer.readBoolean();
   temporary = buffer.readBoolean();
   requiresResponse = buffer.readBoolean();
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:10,代码来源:CreateQueueMessage.java

示例4: decodeRest

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void decodeRest(final ActiveMQBuffer buffer) {
   address = buffer.readSimpleString();
   queueName = buffer.readSimpleString();
   filterString = buffer.readNullableSimpleString();
   durable = buffer.readBoolean();
   requiresResponse = buffer.readBoolean();
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:9,代码来源:CreateSharedQueueMessage.java

示例5: decodeRest

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void decodeRest(final ActiveMQBuffer buffer) {
   address = buffer.readSimpleString();
   int routingTypeSetSize = buffer.readInt();
   routingTypes = new HashSet<>(routingTypeSetSize);
   for (int i = 0; i < routingTypeSetSize; i++) {
      routingTypes.add(RoutingType.getType(buffer.readByte()));
   }
   requiresResponse = buffer.readBoolean();
   autoCreated = buffer.readBoolean();
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:12,代码来源:CreateAddressMessage.java

示例6: reloadStores

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public synchronized List<PagingStore> reloadStores(final HierarchicalRepository<AddressSettings> addressSettingsRepository) throws Exception {
   // We assume the directory list < Integer.MAX_VALUE (this is only a list of addresses).
   JDBCSequentialFile directoryList = (JDBCSequentialFile) pagingFactoryFileFactory.createSequentialFile(DIRECTORY_NAME);
   directoryList.open();

   int size = ((Long) directoryList.size()).intValue();
   ActiveMQBuffer buffer = readActiveMQBuffer(directoryList, size);

   ArrayList<PagingStore> storesReturn = new ArrayList<>();

   while (buffer.readableBytes() > 0) {
      SimpleString table = buffer.readSimpleString();

      JDBCSequentialFileFactory factory = (JDBCSequentialFileFactory) newFileFactory(table.toString(), false);
      factory.start();

      JDBCSequentialFile addressFile = (JDBCSequentialFile) factory.createSequentialFile(ADDRESS_FILE);
      addressFile.open();

      size = ((Long) addressFile.size()).intValue();
      if (size == 0) {
         continue;
      }

      ActiveMQBuffer addrBuffer = readActiveMQBuffer(addressFile, size);
      SimpleString address = addrBuffer.readSimpleString();

      AddressSettings settings = addressSettingsRepository.getMatch(address.toString());

      PagingStore store = new PagingStoreImpl(address, scheduledExecutor, syncTimeout, pagingManager, storageManager, factory, this, address, settings, executorFactory.getExecutor(), syncNonTransactional);

      storesReturn.add(store);
   }
   directoryList.close();
   return storesReturn;
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:38,代码来源:PagingStoreFactoryDatabase.java

示例7: decode

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void decode(final ActiveMQBuffer buffer) {
   name = buffer.readSimpleString();
   address = buffer.readSimpleString();
   filterString = buffer.readNullableSimpleString();

   String metadata = buffer.readNullableSimpleString().toString();
   if (metadata != null) {
      String[] elements = metadata.split(";");
      for (String element : elements) {
         String[] keyValuePair = element.split("=");
         if (keyValuePair.length == 2) {
            if (keyValuePair[0].equals("user")) {
               user = SimpleString.toSimpleString(keyValuePair[1]);
            }
         }
      }
   }

   autoCreated = buffer.readBoolean();

   if (buffer.readableBytes() > 0) {
      maxConsumers = buffer.readInt();
      purgeOnNoConsumers = buffer.readBoolean();
      routingType = buffer.readByte();
   } else {
      maxConsumers = ActiveMQDefaultConfiguration.getDefaultMaxQueueConsumers();
      purgeOnNoConsumers = ActiveMQDefaultConfiguration.getDefaultPurgeOnNoConsumers();
      routingType = ActiveMQDefaultConfiguration.getDefaultRoutingType().getType();
   }
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:32,代码来源:PersistentQueueBindingEncoding.java

示例8: decodeRest

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void decodeRest(ActiveMQBuffer buffer) {
   super.decodeRest(buffer);
   handler = buffer.readSimpleString();
   voteBuffer = ActiveMQBuffers.fixedBuffer(buffer.readableBytes());
   buffer.readBytes(voteBuffer);
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:8,代码来源:QuorumVoteMessage.java

示例9: decode

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void decode(ActiveMQBuffer buffer) {
   addressMatch = buffer.readSimpleString();

   setting = new AddressSettings();
   setting.decode(buffer);
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:8,代码来源:PersistedAddressSetting.java

示例10: decode

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void decode(final ActiveMQBuffer buffer) {
   addressMatch = buffer.readSimpleString();
   sendRoles = buffer.readNullableSimpleString();
   consumeRoles = buffer.readNullableSimpleString();
   createDurableQueueRoles = buffer.readNullableSimpleString();
   deleteDurableQueueRoles = buffer.readNullableSimpleString();
   createNonDurableQueueRoles = buffer.readNullableSimpleString();
   deleteNonDurableQueueRoles = buffer.readNullableSimpleString();
   manageRoles = buffer.readNullableSimpleString();
   browseRoles = buffer.readNullableSimpleString();
   createAddressRoles = buffer.readNullableSimpleString();
   deleteAddressRoles = buffer.readNullableSimpleString();
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:15,代码来源:PersistedRoles.java

示例11: decode

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void decode(final ActiveMQBuffer buffer) {
   name = buffer.readSimpleString();
   int size = buffer.readInt();
   for (int i = 0; i < size; i++) {
      routingTypes.add(RoutingType.getType(buffer.readByte()));
   }
   autoCreated = buffer.readBoolean();
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:10,代码来源:PersistentAddressBindingEncoding.java

示例12: decodeRest

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

示例13: decodeRest

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

示例14: decodeRest

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

示例15: decodeRest

import org.apache.activemq.artemis.api.core.ActiveMQBuffer; //导入方法依赖的package包/类
@Override
public void decodeRest(final ActiveMQBuffer buffer) {
   storeName = buffer.readSimpleString();
   pageNumber = buffer.readInt();
   isDelete = buffer.readBoolean();
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:7,代码来源:ReplicationPageEventMessage.java


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