C# Class Apache.NMS.ActiveMQ.Util.MemoryUsage

Utility class for Tracking Memory Usage with an imposed limit on the amount available. Provides methods for objects to wait on more space to become available if the memory limit is reached.
Afficher le fichier Open project: ThorTech/apache-nms Class Usage Examples

Méthodes publiques

Méthode Description
DecreaseUsage ( long value ) : void

Decrease the level of Usage.

EnqueueUsage ( long usage ) : void

Attempts to increase the amount of Memory Used, if non is available to fill then this method blocks until more is freed.

IncreaseUsage ( long value ) : void

Increase the level of Usage.

IsFull ( ) : bool

Checks if the Usage Windows has become full, is so returns true otherwise returns false.

MemoryUsage ( ) : System
MemoryUsage ( long limit ) : System
Stop ( ) : void
WaitForSpace ( ) : void

If no space is available then this method blocks until more becomes available.

WaitForSpace ( System.TimeSpan timeout ) : void

If no space is available then this method blocks until more becomes available or until the specified timeout expires.

Method Details

DecreaseUsage() public méthode

Decrease the level of Usage.
public DecreaseUsage ( long value ) : void
value long /// A ///
Résultat void

EnqueueUsage() public méthode

Attempts to increase the amount of Memory Used, if non is available to fill then this method blocks until more is freed.
public EnqueueUsage ( long usage ) : void
usage long /// A ///
Résultat void

IncreaseUsage() public méthode

Increase the level of Usage.
public IncreaseUsage ( long value ) : void
value long /// A ///
Résultat void

IsFull() public méthode

Checks if the Usage Windows has become full, is so returns true otherwise returns false.
public IsFull ( ) : bool
Résultat bool

MemoryUsage() public méthode

public MemoryUsage ( ) : System
Résultat System

MemoryUsage() public méthode

public MemoryUsage ( long limit ) : System
limit long
Résultat System

Stop() public méthode

public Stop ( ) : void
Résultat void

WaitForSpace() public méthode

If no space is available then this method blocks until more becomes available.
public WaitForSpace ( ) : void
Résultat void

WaitForSpace() public méthode

If no space is available then this method blocks until more becomes available or until the specified timeout expires.
public WaitForSpace ( System.TimeSpan timeout ) : void
timeout System.TimeSpan /// A ///
Résultat void