BEAST
eu.baltrad.beast.exchange.PooledFileRequestPublisher Class Reference

The publisher (manager) that keeps track of publishing file requests to different nodes. More...

Inheritance diagram for eu.baltrad.beast.exchange.PooledFileRequestPublisher:
eu.baltrad.beast.exchange.IPooledFileRequestPublisher

Classes

class  RejectedExecutionHandler
 When a job is rejected (switched out). More...
 

Public Member Functions

 PooledFileRequestPublisher ()
 Default construcor.
 
 PooledFileRequestPublisher (int queueSize, int corePoolSize, int maxPoolSize)
 Constructor.
 
void afterPropertiesSet ()
 Creates the actual executor.
 
void publish (SendFileRequest request, SendFileRequestCallback callback)
 Publishes a send file request on the thread pool.
 
int getQueueSize ()
 
void setQueueSize (int queueSize)
 
int getCorePoolSize ()
 
void setCorePoolSize (int corePoolSize)
 
int getMaxPoolSize ()
 
void setMaxPoolSize (int maxPoolSize)
 
IExchangeManager getExchangeManager ()
 
void setExchangeManager (IExchangeManager exchangeManager)
 

Protected Member Functions

Runnable createRunnable (SendFileRequest request, SendFileRequestCallback callback)
 Creates the runnable instance that should be placed in the executor queue.
 

Detailed Description

The publisher (manager) that keeps track of publishing file requests to different nodes.

There is one thread pool executor / node so that a slowly responding node doesn't lock everything for the other nodes.

Author
anders

Constructor & Destructor Documentation

◆ PooledFileRequestPublisher() [1/2]

eu.baltrad.beast.exchange.PooledFileRequestPublisher.PooledFileRequestPublisher ( )
inline

Default construcor.

◆ PooledFileRequestPublisher() [2/2]

eu.baltrad.beast.exchange.PooledFileRequestPublisher.PooledFileRequestPublisher ( int queueSize,
int corePoolSize,
int maxPoolSize )
inline

Constructor.

Parameters
queueSize
corePoolSize
maxPoolSize

Member Function Documentation

◆ afterPropertiesSet()

void eu.baltrad.beast.exchange.PooledFileRequestPublisher.afterPropertiesSet ( )
inline

Creates the actual executor.

Can be overriden by subclasses or tests.

◆ createRunnable()

Runnable eu.baltrad.beast.exchange.PooledFileRequestPublisher.createRunnable ( SendFileRequest request,
SendFileRequestCallback callback )
inlineprotected

Creates the runnable instance that should be placed in the executor queue.

Parameters
requestthe request
callbackthe callback that will get updates
Returns
the runnable

◆ getCorePoolSize()

int eu.baltrad.beast.exchange.PooledFileRequestPublisher.getCorePoolSize ( )
inline
Returns
the core thread executor pool size

◆ getExchangeManager()

IExchangeManager eu.baltrad.beast.exchange.PooledFileRequestPublisher.getExchangeManager ( )
inline
Returns
the exchange manager

◆ getMaxPoolSize()

int eu.baltrad.beast.exchange.PooledFileRequestPublisher.getMaxPoolSize ( )
inline
Returns
the max thread executor pool size

◆ getQueueSize()

int eu.baltrad.beast.exchange.PooledFileRequestPublisher.getQueueSize ( )
inline
Returns
the max number of entries in the queue

◆ publish()

void eu.baltrad.beast.exchange.PooledFileRequestPublisher.publish ( SendFileRequest request,
SendFileRequestCallback callback )
inline

Publishes a send file request on the thread pool.

Parameters
requestthe request
callbackthe callback that should be updated with progress information

Implements eu.baltrad.beast.exchange.IPooledFileRequestPublisher.

◆ setCorePoolSize()

void eu.baltrad.beast.exchange.PooledFileRequestPublisher.setCorePoolSize ( int corePoolSize)
inline
Parameters
corePoolSizethe min thread executor pool size

◆ setExchangeManager()

void eu.baltrad.beast.exchange.PooledFileRequestPublisher.setExchangeManager ( IExchangeManager exchangeManager)
inline
Parameters
exchangeManagerthe exchange manager

◆ setMaxPoolSize()

void eu.baltrad.beast.exchange.PooledFileRequestPublisher.setMaxPoolSize ( int maxPoolSize)
inline
Parameters
maxPoolSizethe max thread executor pool size

◆ setQueueSize()

void eu.baltrad.beast.exchange.PooledFileRequestPublisher.setQueueSize ( int queueSize)
inline
Parameters
queueSizethe max number of entries in the queue

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