plebble
us.gov.socket.send_queue Class Reference
Inheritance diagram for us.gov.socket.send_queue:
Collaboration diagram for us.gov.socket.send_queue:

Classes

class  ongoing_t
 
class  qi
 

Public Member Functions

 send_queue ()
 
void onwakeup ()
 
void clear ()
 
void dump (String prefix, PrintStream os)
 
void run_body ()
 
void await ()
 
void set_busy_handler (busyled_t.handler_t hsend)
 
- Public Member Functions inherited from us::gov::bgtask
 bgtask ()
 
 bgtask (function< void()> run, function< void()> onwakeup)
 
virtual ~bgtask ()
 
void set_run_function (function< void()> r)
 
virtual ko start ()
 
virtual ko wait_ready (const chrono::system_clock::time_point &deadline) const
 
virtual void stop ()
 
virtual void join ()
 
void wakeup ()
 
bool isup () const
 
bool isdown () const
 
bool resumed () const
 
void run_ ()
 
void reset ()
 
bool reset_wait ()
 
bool reset_resume ()
 
bool is_active () const
 
 bgtask ()
 
 bgtask (callback cb0)
 
void set_callback (callback r)
 
ko start ()
 
ko wait_ready (Date deadline)
 
void stop ()
 
void join ()
 
void run ()
 
boolean reset_wait ()
 
void wakeup ()
 
boolean reset_resume ()
 
boolean isup ()
 
boolean isdown ()
 
boolean resumed ()
 
void reset ()
 
boolean is_active ()
 

Public Attributes

busyled_t busyled =new busyled_t()
 

Static Public Attributes

static int wmh =CFG.SENDQ_WMH
 
static int schunk =CFG.SENDQ_SCHUNK
 
- Static Public Attributes inherited from us::gov::bgtask
static const char * KO_81021
 
static ko KO_81021 =new ko("KO 81021 Ready status never reached.")
 

Package Functions

int get_size ()
 
void flood (datagram d, client cli)
 
void send (datagram d, client cli, int pri)
 
void purge (client c)
 
qi next ()
 
qi next_ ()
 
qi replace (qi x)
 

Package Attributes

PriorityQueue< qiq =new PriorityQueue<qi>(CFG.SENDQ_SIZE)
 
Lock lock = new ReentrantLock()
 
Condition cv = lock.newCondition()
 
ongoing_t ongoing =new ongoing_t()
 

Additional Inherited Members

- Protected Attributes inherited from us::gov::bgtask
atomic< short > resume {0}
 
thread * th {nullptr}
 
bool active {false}
 
function< void()> run
 
function< void()> onwakeup
 
mutex mx_ready
 
bool ready {false}
 
condition_variable cv_ready
 
AtomicInteger resume =new AtomicInteger(0)
 
Thread th =null
 
boolean active =false
 
callback cb =null
 
ReentrantLock mx_ready = new ReentrantLock()
 
boolean ready =false
 
Condition cv_ready =mx_ready.newCondition()
 

Constructor & Destructor Documentation

◆ send_queue()

us.gov.socket.send_queue.send_queue ( )
inline

Member Function Documentation

◆ await()

void us.gov.socket.send_queue.await ( )
inline

◆ clear()

void us.gov.socket.send_queue.clear ( )
inline

◆ dump()

void us.gov.socket.send_queue.dump ( String  prefix,
PrintStream  os 
)
inline

◆ flood()

void us.gov.socket.send_queue.flood ( datagram  d,
client  cli 
)
inlinepackage

◆ get_size()

int us.gov.socket.send_queue.get_size ( )
inlinepackage

◆ next()

qi us.gov.socket.send_queue.next ( )
inlinepackage

◆ next_()

qi us.gov.socket.send_queue.next_ ( )
inlinepackage

◆ onwakeup()

void us.gov.socket.send_queue.onwakeup ( )
inline

◆ purge()

void us.gov.socket.send_queue.purge ( client  c)
inlinepackage

References us.gov.socket.send_queue.ongoing_t.reset(), and us.pair< f, s >.second.

Here is the call graph for this function:

◆ replace()

qi us.gov.socket.send_queue.replace ( qi  x)
inlinepackage

◆ run_body()

◆ send()

void us.gov.socket.send_queue.send ( datagram  d,
client  cli,
int  pri 
)
inlinepackage

◆ set_busy_handler()

void us.gov.socket.send_queue.set_busy_handler ( busyled_t.handler_t  hsend)
inline

References us::gov::socket::busyled_t.set_handler().

Here is the call graph for this function:

Member Data Documentation

◆ busyled

busyled_t us.gov.socket.send_queue.busyled =new busyled_t()

◆ cv

Condition us.gov.socket.send_queue.cv = lock.newCondition()
package

◆ lock

Lock us.gov.socket.send_queue.lock = new ReentrantLock()
package

◆ ongoing

ongoing_t us.gov.socket.send_queue.ongoing =new ongoing_t()
package

◆ q

PriorityQueue<qi> us.gov.socket.send_queue.q =new PriorityQueue<qi>(CFG.SENDQ_SIZE)
package

◆ schunk

int us.gov.socket.send_queue.schunk =CFG.SENDQ_SCHUNK
static

◆ wmh

int us.gov.socket.send_queue.wmh =CFG.SENDQ_WMH
static

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