C# Class Spring.Retry.Retry.Policy.SoftReferenceMapRetryContextCache

Map-based implementation of IRetryContextCache. The map backing the cache of contexts is synchronized and its entries are soft-referenced, so may be garbage collected under pressure. MapRetryContextCache for non-soft referenced version.
Inheritance: IRetryContextCache
Datei anzeigen Open project: spring-projects/spring-net-retry

Public Properties

Property Type Description
DEFAULT_CAPACITY int

Public Methods

Method Description
ContainsKey ( object key ) : bool

The contains key.

Get ( object key ) : IRetryContext

The get.

Put ( object key, IRetryContext context ) : void

The put.

Remove ( object key ) : void

The remove.

SoftReferenceMapRetryContextCache ( ) : System

Initializes a new instance of the SoftReferenceMapRetryContextCache class with default capacity.

SoftReferenceMapRetryContextCache ( int defaultCapacity ) : System

Initializes a new instance of the SoftReferenceMapRetryContextCache class.

Method Details

ContainsKey() public method

The contains key.
public ContainsKey ( object key ) : bool
key object The key.
return bool

Get() public method

The get.
public Get ( object key ) : IRetryContext
key object The key.
return IRetryContext

Put() public method

The put.
public Put ( object key, IRetryContext context ) : void
key object The key.
context IRetryContext The context.
return void

Remove() public method

The remove.
public Remove ( object key ) : void
key object The key.
return void

SoftReferenceMapRetryContextCache() public method

Initializes a new instance of the SoftReferenceMapRetryContextCache class with default capacity.
public SoftReferenceMapRetryContextCache ( ) : System
return System

SoftReferenceMapRetryContextCache() public method

Initializes a new instance of the SoftReferenceMapRetryContextCache class.
public SoftReferenceMapRetryContextCache ( int defaultCapacity ) : System
defaultCapacity int The default capacity.
return System

Property Details

DEFAULT_CAPACITY public_oe static_oe property

Default value for maximum capacity of the cache. This is set to a reasonably low value (4096) to avoid users inadvertently filling the cache with item keys that are inconsistent.
public static int DEFAULT_CAPACITY
return int