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.
Datei anzeigen Open project: ThorTech/apache-nms Class Usage Examples

Public Methods

Method 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 method

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

EnqueueUsage() public method

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 ///
return void

IncreaseUsage() public method

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

IsFull() public method

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

MemoryUsage() public method

public MemoryUsage ( ) : System
return System

MemoryUsage() public method

public MemoryUsage ( long limit ) : System
limit long
return System

Stop() public method

public Stop ( ) : void
return void

WaitForSpace() public method

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

WaitForSpace() public method

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 ///
return void