Table of Contents

Class EvictionTimer

Namespace
CodeProject.ObjectPool
Assembly
CodeProject.ObjectPool.dll

Default implementation of IEvictionTimer.

public sealed class EvictionTimer : IEvictionTimer, IDisposable
Inheritance
EvictionTimer
Implements
Inherited Members

Methods

Cancel(Guid)

Cancels a scheduled eviction action using a ticket returned by Schedule(Action, TimeSpan, TimeSpan).

public void Cancel(Guid actionTicket)

Parameters

actionTicket Guid

An eviction action ticket, which has been returned by Schedule(Action, TimeSpan, TimeSpan).

Dispose()

Disposes the eviction timer, making it unusable.

public void Dispose()

~EvictionTimer()

Finalizer for EvictionTimer.

protected ~EvictionTimer()

Schedule(Action, TimeSpan, TimeSpan)

Schedules an eviction action.

public Guid Schedule(Action action, TimeSpan delay, TimeSpan period)

Parameters

action Action

Eviction action.

delay TimeSpan

Start delay.

period TimeSpan

Schedule period.

Returns

Guid

A ticket which identifies the scheduled eviction action, it can be used to cancel the scheduled action via Cancel(Guid) method.