C# 클래스 Deveel.Data.Caching.Cache

A base implementation of a cache of objects.
상속: ICache
파일 보기 프로젝트 열기: deveel/deveeldb 1 사용 예제들

공개 메소드들

메소드 설명
Clear ( ) : void

Clear the cache of all the entries.

Dispose ( ) : void

Gets the closest prime number to the one specified.

A list of primes ordered from lowest to highest.

Remove ( object key ) : object

Removes a node for the given key from the cache.

This is useful for ensuring the cache does not contain out-dated information.

Set ( object key, object value ) : bool

Puts an object into the cache with the given key.

TryGet ( object key, object &value ) : bool

보호된 메소드들

메소드 설명
Cache ( ) : System
CheckClean ( ) : void

This is called whenever at object is put into the cache.

This method should determine if the cache should be cleaned and call the clean method if appropriate.

Clean ( ) : int

Cleans away some old elements in the cache.

This method walks from the end, back wipe count elements putting each object on the recycle stack.

Dispose ( bool disposing ) : void
OnAllCleared ( ) : void

Notifies that the cache has been entirely cleared of all elements.

OnGetWalks ( long totalWalks, long totalGetOps ) : void

Notifies that some statistical information about the hash map has updated.

This should be used to compile statistical information about the number of walks a get operation takes to retreive an entry from the hash.

This method is called every 8192 gets.

OnObjectAdded ( object key, object value ) : void

Notifies that the given object and key has been added to the cache.

OnObjectRemoved ( object key, Object value ) : void

Notifies that the given object and key has been removed from the cache.

OnWipingNode ( object value ) : void

Notifies that the given object has been wiped from the cache by the clean up procedure.

RemoveObject ( object key ) : object
SetObject ( object key, object value ) : bool

When overridden in a derived class, it sets the value for the key given.

TryGetObject ( object key, object &value ) : bool
WipeMoreNodes ( ) : bool

Checks if the clean-up method should clean up more elements from the cache.

메소드 상세

Cache() 보호된 메소드

protected Cache ( ) : System
리턴 System

CheckClean() 보호된 메소드

This is called whenever at object is put into the cache.
This method should determine if the cache should be cleaned and call the clean method if appropriate.
protected CheckClean ( ) : void
리턴 void

Clean() 보호된 메소드

Cleans away some old elements in the cache.
This method walks from the end, back wipe count elements putting each object on the recycle stack.
protected Clean ( ) : int
리턴 int

Clear() 공개 메소드

Clear the cache of all the entries.
public Clear ( ) : void
리턴 void

Dispose() 공개 메소드

Gets the closest prime number to the one specified. A list of primes ordered from lowest to highest.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

OnAllCleared() 보호된 메소드

Notifies that the cache has been entirely cleared of all elements.
protected OnAllCleared ( ) : void
리턴 void

OnGetWalks() 보호된 메소드

Notifies that some statistical information about the hash map has updated.
This should be used to compile statistical information about the number of walks a get operation takes to retreive an entry from the hash.

This method is called every 8192 gets.

protected OnGetWalks ( long totalWalks, long totalGetOps ) : void
totalWalks long
totalGetOps long
리턴 void

OnObjectAdded() 보호된 메소드

Notifies that the given object and key has been added to the cache.
protected OnObjectAdded ( object key, object value ) : void
key object
value object
리턴 void

OnObjectRemoved() 보호된 메소드

Notifies that the given object and key has been removed from the cache.
protected OnObjectRemoved ( object key, Object value ) : void
key object
value Object
리턴 void

OnWipingNode() 보호된 메소드

Notifies that the given object has been wiped from the cache by the clean up procedure.
protected OnWipingNode ( object value ) : void
value object The node value being wiped.
리턴 void

Remove() 공개 메소드

Removes a node for the given key from the cache.
This is useful for ensuring the cache does not contain out-dated information.
public Remove ( object key ) : object
key object
리턴 object

RemoveObject() 보호된 추상적인 메소드

protected abstract RemoveObject ( object key ) : object
key object
리턴 object

Set() 공개 메소드

Puts an object into the cache with the given key.
public Set ( object key, object value ) : bool
key object The key used to store the object.
value object The object to add to the cache.
리턴 bool

SetObject() 보호된 추상적인 메소드

When overridden in a derived class, it sets the value for the key given.
protected abstract SetObject ( object key, object value ) : bool
key object The key corresponding to the value to set.
value object the value to set into the cache.
리턴 bool

TryGet() 공개 메소드

public TryGet ( object key, object &value ) : bool
key object
value object
리턴 bool

TryGetObject() 보호된 추상적인 메소드

protected abstract TryGetObject ( object key, object &value ) : bool
key object
value object
리턴 bool

WipeMoreNodes() 보호된 메소드

Checks if the clean-up method should clean up more elements from the cache.
protected WipeMoreNodes ( ) : bool
리턴 bool