Back to index

nordugrid-arc-nox  1.1.0~rc6
Public Member Functions | Private Member Functions | Private Attributes | Friends
Arc::ExpirationReminder Class Reference

A class intended for internal use within counters. More...

#include <Counter.h>

List of all members.

Public Member Functions

bool operator< (const ExpirationReminder &other) const
 Less than operator, compares "soonness".
Glib::TimeVal getExpiryTime () const
 Returns the expiry time.
Counter::IDType getReservationID () const
 Returns the identification number of the reservation.

Private Member Functions

 ExpirationReminder (Glib::TimeVal expiryTime, Counter::IDType reservationID)
 The constructor.

Private Attributes

Glib::TimeVal expiryTime
 The expiry time of the corresponding reservation.
Counter::IDType reservationID
 The identification number of t he corresponding reservation.

Friends

class Counter
 The Counter class needs to be a friend.

Detailed Description

A class intended for internal use within counters.

This class is used for "reminder objects" that are used for automatic deallocation of self-expiring reservations.

Definition at line 418 of file Counter.h.


Constructor & Destructor Documentation

Arc::ExpirationReminder::ExpirationReminder ( Glib::TimeVal  expiryTime,
Counter::IDType  reservationID 
) [private]

The constructor.

This constructor creates an ExpirationReminder containing the specified expiry time and identity number of a reservation. In order to prevent unintended use, it is private. Because the Counter class must be able to use this constructor, it is declared to be a friend of this class.

Parameters:
expiryTimeThe expiry time of the reservation.
reservationIDThe identification number of the reservation.

Definition at line 91 of file Counter.cpp.

    : expiryTime(expiryTime),
      reservationID(reservationID) {
    // Nothing else needs to be done.
  }

Member Function Documentation

Glib::TimeVal Arc::ExpirationReminder::getExpiryTime ( ) const

Returns the expiry time.

This method returns the expiry time of the reservation that this ExpirationReminder is associated with.

Returns:
The expiry time.

Definition at line 103 of file Counter.cpp.

                                                      {
    return expiryTime;
  }

Returns the identification number of the reservation.

This method returns the identification number of the self-expiring reservation that this ExpirationReminder is associated with.

Returns:
The identification number.

Definition at line 107 of file Counter.cpp.

                                                           {
    return reservationID;
  }
bool Arc::ExpirationReminder::operator< ( const ExpirationReminder other) const

Less than operator, compares "soonness".

This is the less than operator for the ExpirationReminder class. It compares the priority of such objects with respect to which reservation expires first. It is used when reminder objects are inserted in a priority queue in order to allways place the next reservation to expire at the top.

Definition at line 98 of file Counter.cpp.

                                                                          {
    // Smaller time has higher priority!
    return expiryTime > other.expiryTime;
  }

Friends And Related Function Documentation

friend class Counter [friend]

The Counter class needs to be a friend.

Definition at line 467 of file Counter.h.


Member Data Documentation

Glib::TimeVal Arc::ExpirationReminder::expiryTime [private]

The expiry time of the corresponding reservation.

Definition at line 461 of file Counter.h.

The identification number of t he corresponding reservation.

Definition at line 464 of file Counter.h.


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