18#ifndef _ACTIVEMQ_TRANSPORT_FAILOVER_BACKUPTRANSPORTPOOL_H_
19#define _ACTIVEMQ_TRANSPORT_FAILOVER_BACKUPTRANSPORTPOOL_H_
36 using decaf::lang::Pointer;
37 using decaf::util::LinkedList;
38 using activemq::threads::CompositeTaskRunner;
40 class BackupTransportPoolImpl;
48 BackupTransportPoolImpl* impl;
56 volatile int backupPoolSize;
57 volatile bool enabled;
58 volatile int maxReconnectDelay;
108 return this->backupPoolSize;
116 this->backupPoolSize = size;
126 return this->enabled;
#define AMQCPP_API
Definition Config.h:30
Represents a single task that can be part of a set of Tasks that are contained in a CompositeTaskRunn...
Definition CompositeTask.h:33
void close()
Closes down the pool and destroys any Backups contained in the pool.
virtual ~BackupTransportPool()
void setEnabled(bool value)
Sets if this Backup Transport Pool is enabled.
BackupTransportPool(FailoverTransport *parent, int backupPoolSize, const Pointer< CompositeTaskRunner > taskRunner, const Pointer< CloseTransportsTask > closeTask, const Pointer< URIPool > uriPool, const Pointer< URIPool > updates, const Pointer< URIPool > priorityUriPool)
Pointer< BackupTransport > getBackup()
Get a Connected Transport from the pool of Backups if any are present, otherwise it return a NULL Poi...
BackupTransportPool(FailoverTransport *parent, const Pointer< CompositeTaskRunner > taskRunner, const Pointer< CloseTransportsTask > closeTask, const Pointer< URIPool > uriPool, const Pointer< URIPool > updates, const Pointer< URIPool > priorityUriPool)
virtual bool iterate()
Connect to a Backup Broker if we haven't already connected to the max number of Backups.
bool isEnabled() const
Gets if the backup Transport Pool has been enabled or not, when not enabled no backups are created an...
Definition BackupTransportPool.h:125
virtual bool isPending() const
Return true if we don't currently have enough Connected Transports.
int getBackupPoolSize() const
Gets the Max number of Backups this Task will create.
Definition BackupTransportPool.h:107
bool isPriorityBackupAvailable() const
Returns true if there is a Backup in the pool that's on the priority backups list.
friend class BackupTransport
Definition BackupTransportPool.h:46
void setBackupPoolSize(int size)
Sets the Max number of Backups this Task will create.
Definition BackupTransportPool.h:115
Definition FailoverTransport.h:49
Decaf's implementation of a Smart Pointer that is a template on a Type and is Thread Safe if the defa...
Definition Pointer.h:53
This class represents an instance of a URI as defined by RFC 2396.
Definition URI.h:37
Definition BackupTransport.h:31
Definition AbstractTransportFactory.h:30
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition CachedConsumer.h:24