template class Poco::AccessExpirationDecorator

Overview

AccessExpirationDecorator adds an expiration method to values so that they can be used with the UniqueAccessExpireCache. Moreā€¦

#include <AccessExpirationDecorator.h>

template <typename TArgs>
class AccessExpirationDecorator
{
public:
    // construction

    AccessExpirationDecorator();

    AccessExpirationDecorator(
        const TArgs& p,
        const Poco::Timespan::TimeDiff& diffInMs
        );

    AccessExpirationDecorator(
        const TArgs& p,
        const Poco::Timespan& timeSpan
        );

    // methods

    const Poco::Timespan&
    getTimeout() const;

    const TArgs&
    value() const;

    TArgs&
    value();
};

Detailed Documentation

AccessExpirationDecorator adds an expiration method to values so that they can be used with the UniqueAccessExpireCache.

Construction

AccessExpirationDecorator(
    const TArgs& p,
    const Poco::Timespan::TimeDiff& diffInMs
    )

Creates an element that will expire in diff milliseconds.

AccessExpirationDecorator(
    const TArgs& p,
    const Poco::Timespan& timeSpan
    )

Creates an element that will expire after the given timeSpan.