activemq::transport::failover::BackupTransportPool Class Reference

#include <src/main/activemq/transport/failover/BackupTransportPool.h>

Inheritance diagram for activemq::transport::failover::BackupTransportPool:
Inheritance graph
[legend]

Public Member Functions

 BackupTransportPool (FailoverTransport *parent, const Pointer< CompositeTaskRunner > taskRunner, const Pointer< CloseTransportsTask > closeTask, const Pointer< URIPool > uriPool, const Pointer< URIPool > updates, const Pointer< URIPool > priorityUriPool)
 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)
virtual ~BackupTransportPool ()
void close ()
 Closes down the pool and destroys any Backups contained in the pool.
virtual bool isPending () const
 Return true if we don't currently have enough Connected Transports.
Pointer< BackupTransportgetBackup ()
 Get a Connected Transport from the pool of Backups if any are present, otherwise it return a NULL Pointer.
virtual bool iterate ()
 Connect to a Backup Broker if we haven't already connected to the max number of Backups.
int getBackupPoolSize () const
 Gets the Max number of Backups this Task will create.
void setBackupPoolSize (int size)
 Sets the Max number of Backups this Task will create.
bool isEnabled () const
 Gets if the backup Transport Pool has been enabled or not, when not enabled no backups are created and any that were are destroyed.
void setEnabled (bool value)
 Sets if this Backup Transport Pool is enabled.
bool isPriorityBackupAvailable () const
 Returns true if there is a Backup in the pool that's on the priority backups list.

Friends

class BackupTransport

Constructor & Destructor Documentation

activemq::transport::failover::BackupTransportPool::BackupTransportPool ( FailoverTransport parent,
const Pointer< CompositeTaskRunner taskRunner,
const Pointer< CloseTransportsTask closeTask,
const Pointer< URIPool uriPool,
const Pointer< URIPool updates,
const Pointer< URIPool priorityUriPool 
)
activemq::transport::failover::BackupTransportPool::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 
)
virtual activemq::transport::failover::BackupTransportPool::~BackupTransportPool (  )  [virtual]

Member Function Documentation

void activemq::transport::failover::BackupTransportPool::close (  ) 

Closes down the pool and destroys any Backups contained in the pool.

Pointer<BackupTransport> activemq::transport::failover::BackupTransportPool::getBackup (  ) 

Get a Connected Transport from the pool of Backups if any are present, otherwise it return a NULL Pointer.

Returns:
Pointer to a Connected Transport or NULL
int activemq::transport::failover::BackupTransportPool::getBackupPoolSize (  )  const [inline]

Gets the Max number of Backups this Task will create.

Returns:
the max number of active BackupTransports that will be created.
bool activemq::transport::failover::BackupTransportPool::isEnabled (  )  const [inline]

Gets if the backup Transport Pool has been enabled or not, when not enabled no backups are created and any that were are destroyed.

Returns:
true if enable.
virtual bool activemq::transport::failover::BackupTransportPool::isPending (  )  const [virtual]

Return true if we don't currently have enough Connected Transports.

Implements activemq::threads::CompositeTask.

bool activemq::transport::failover::BackupTransportPool::isPriorityBackupAvailable (  )  const

Returns true if there is a Backup in the pool that's on the priority backups list.

Returns:
true if there is a priority backup available.
virtual bool activemq::transport::failover::BackupTransportPool::iterate (  )  [virtual]

Connect to a Backup Broker if we haven't already connected to the max number of Backups.

Implements activemq::threads::Task.

void activemq::transport::failover::BackupTransportPool::setBackupPoolSize ( int  size  )  [inline]

Sets the Max number of Backups this Task will create.

Parameters:
size - the max number of active BackupTransports that will be created.
void activemq::transport::failover::BackupTransportPool::setEnabled ( bool  value  ) 

Sets if this Backup Transport Pool is enabled.

When not enabled no Backups are created and any that were are destroyed.

Parameters:
value - true to enable backup creation, false to disable.

Friends And Related Function Documentation

friend class BackupTransport [friend]

The documentation for this class was generated from the following file:

Generated on 1 Dec 2014 for activemq-cpp-3.8.2 by  doxygen 1.6.1