public TransportConfiguration getB() { return connector.getB(); }
@Override public TransportConfiguration getBackup() { return connector.getB(); }
public void processReload() { if (loadList != null) { for (Pair<Long, Integer> incElement : loadList) { value.addAndGet(incElement.getB()); incrementRecords.add(incElement.getA()); } loadList.clear(); loadList = null; } }
public synchronized void commit() { if (lateDeliveries != null) { // This is to make sure deliveries that were touched before the commit arrived will be delivered for (Pair<PageSubscription, PagePosition> pos : lateDeliveries) { pos.getA().redeliver(pos.getB()); } lateDeliveries.clear(); } committed = true; lateDeliveries = null; }
public synchronized void commit() { if (lateDeliveries != null) { // This is to make sure deliveries that were touched before the commit arrived will be delivered for (Pair<PageSubscription, PagePosition> pos : lateDeliveries) { pos.getA().redeliver(pos.getB()); } lateDeliveries.clear(); } committed = true; lateDeliveries = null; }
public synchronized void rollback() { rolledback = true; committed = false; if (lateDeliveries != null) { for (Pair<PageSubscription, PagePosition> pos : lateDeliveries) { pos.getA().lateDeliveryRollback(pos.getB()); } lateDeliveries = null; } }
public synchronized void rollback() { rolledback = true; committed = false; if (lateDeliveries != null) { for (Pair<PageSubscription, PagePosition> pos : lateDeliveries) { pos.getA().lateDeliveryRollback(pos.getB()); } lateDeliveries = null; } }
public static void encodeConfigs(HornetQBuffer 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()); } } } }
/** * deploy an element * * @param node the element to deploy * @throws Exception . */ @Override public void deploy(final Node node) throws Exception { Pair<String, Set<Role>> securityMatch = parser.parseSecurityRoles(node); securityRepository.addMatch(securityMatch.getA(), securityMatch.getB()); }
/** * deploy an element * * @param node the element to deploy * @throws Exception */ @Override public void deploy(final Node node) throws Exception { Pair<String, AddressSettings> setting = parser.parseAddressSettings(node); addressSettingsRepository.addMatch(setting.getA(), setting.getB()); }
/** * deploy an element * @param node the element to deploy * @throws Exception . */ @Override public void deploy(final Node node) throws Exception { Pair<String, AddressSettings> setting = parser.parseAddressSettings(node); addressSettingsRepository.addMatch(setting.getA(), setting.getB()); }
public void acknowledge(String messageID) throws Exception { long id = Long.parseLong(messageID); Pair<Long, Integer> pair = messagesToAck.remove(id); if (pair != null) { long consumerID = pair.getA(); int credits = pair.getB(); if (this.consumerCredits != -1) { session.receiveConsumerCredits(consumerID, credits); } session.acknowledge(consumerID, id); session.commit(); } }
/** * deploy an element * * @param node the element to deploy * @throws Exception */ @Override public void deploy(final Node node) throws Exception { Pair<String, Set<Role>> securityMatch = parser.parseSecurityRoles(node); securityRepository.addMatch(securityMatch.getA(), securityMatch.getB()); }
@Override public void describeProducersInfo(JSONArray array) throws Exception { Map<SimpleString, Pair<UUID, AtomicLong>> targetCopy = cloneTargetAddresses(); for (Map.Entry<SimpleString, Pair<UUID, AtomicLong>> entry : targetCopy.entrySet()) { JSONObject producerInfo = new JSONObject(); producerInfo.put("connectionID", this.getConnectionID().toString()); producerInfo.put("sessionID", this.getName()); producerInfo.put("destination", entry.getKey().toString()); producerInfo.put("lastUUIDSent", entry.getValue().getA()); producerInfo.put("msgSent", entry.getValue().getB().longValue()); array.put(producerInfo); } }
public void describeProducersInfo(JSONArray array) throws Exception { Map<SimpleString, Pair<UUID, AtomicLong>> targetCopy = cloneTargetAddresses(); for (Map.Entry<SimpleString, Pair<UUID, AtomicLong>> entry : targetCopy.entrySet()) { JSONObject producerInfo = new JSONObject(); producerInfo.put("connectionID", this.getConnectionID().toString()); producerInfo.put("sessionID", this.getName()); producerInfo.put("destination", entry.getKey().toString()); producerInfo.put("lastUUIDSent", entry.getValue().getA()); producerInfo.put("msgSent", entry.getValue().getB().longValue()); array.put(producerInfo); } }
void delete(final JournalFile file) { file.incNegCount(addFile); addFile.decSize(size); if (updateFiles != null) { for (Pair<JournalFile, Integer> updFile : updateFiles) { file.incNegCount(updFile.getA()); updFile.getA().decSize(updFile.getB()); } } }
void delete(final JournalFile file) { file.incNegCount(addFile); addFile.decSize(size); if (updateFiles != null) { for (Pair<JournalFile, Integer> updFile : updateFiles) { file.incNegCount(updFile.getA()); updFile.getA().decSize(updFile.getB()); } } }
public void nodeUP(long eventUID, String nodeID, Pair<TransportConfiguration, TransportConfiguration> connectorPair, boolean last) { // There is a case where the backup announce itself, // we need to ignore a case where getA is null if (connectorPair.getA() != null) { HornetQRecoveryRegistry.getInstance().nodeUp(nodeID, new Pair<TransportConfiguration, TransportConfiguration>(connectorPair.getA(), connectorPair.getB()), config.getUsername(), config.getPassword()); } }
void delete(final JournalFile file) { file.incNegCount(addFile); addFile.decSize(size); if (updateFiles != null) { for (Pair<JournalFile, Integer> updFile : updateFiles) { file.incNegCount(updFile.getA()); updFile.getA().decSize(updFile.getB()); } } }