Table of Contents

Interface IEvictionTimer

Namespace
CodeProject.ObjectPool
Assembly
CodeProject.ObjectPool.dll

Eviction timer interface, used to abstract over eviction jobs.

public interface IEvictionTimer : IDisposable
Inherited Members

Methods

Cancel(Guid)

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

void Cancel(Guid actionTicket)

Parameters

actionTicket Guid

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

Schedule(Action, TimeSpan, TimeSpan)

Schedules an eviction action.

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.