Overview | Namespace | Classifier | Tree | Index | Help
PREV NEXT | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | DESTR | METHOD | DETAIL: FIELD | CONSTR | DESTR | METHOD

## Namespace: OtlSync
Class TOmniResourceCount

    System.TInterfacedObject
      |
      +-- OtlSync.TOmniResourceCount

All Implemented Interfaces:
  IOmniResourceCount , IOmniHandleObject

public class TOmniResourceCount ( System.TInterfacedObject , IOmniResourceCount , IOmniHandleObject )

Sealed
  False

Abstract
  False

Persistent
  False

Property Summary
`public THandle` | `Handle`

Constructor Summary
`Create(initialCount: cardinal)`

Method Summary
`public function cardinal` | `Allocate()` Allocates resource and returns number of remaining resources. If the initial number of resources is 0, then the call will block until a resource becomes available. If there are no remaining resources (Result is 0), sets externally visible event.
`public Sub` | `Destroy()`
`public function cardinal` | `Release()` Releases resource and returns number of remaining resources. Resets the externally visible event if necessary.
`public function boolean` | `TryAllocate(resourceCount: cardinal; timeout_ms: cardinal)` Like Allocate, but with a timeout.

Property Detail

### Handle

    public Handle: THandle

Type
  THandle

Class
  False

Access
  read

Constructor Detail

### Create

    public constructor Create(initialCount: cardinal)

Final
  False

Reintroduce
  False

Virtual
  False

Override
  False

Abstract
  False

Method Detail

### Allocate

    public function Allocate(): cardinal

Final
  False

summary
  Allocates resource and returns number of remaining resources.
  If the initial number of resources is 0, then the call will block until a resource
  becomes available.
  If there are no remaining resources (Result is 0), sets externally visible event.

Reintroduce
  False

Abstract
  False

Returns
  cardinal

Override
  False

Virtual
  False

Class
  False

### Destroy

    public procedure Destroy()

Reintroduce
  False

Virtual
  False

Override
  True

Abstract
  False

Final
  False

### Release

    public function Release(): cardinal

Final
  False

summary
  Releases resource and returns number of remaining resources.
  Resets the externally visible event if necessary.

Reintroduce
  False

Abstract
  False

Returns
  cardinal

Override
  False

Virtual
  False

Class
  False

### TryAllocate

    public function TryAllocate(resourceCount: cardinal; timeout_ms: cardinal): boolean

Final
  False

summary
  Like Allocate, but with a timeout.

Reintroduce
  False

Abstract
  False

Returns
  boolean

Override
  False

Virtual
  False

Class
  False

Implementation Link

to Interface IOmniResourceCount

Client
  TOmniResourceCount

Supplier
  IOmniResourceCount

to Interface IOmniHandleObject

Client
  TOmniResourceCount

Supplier
  IOmniHandleObject

Association Link

to Struct TOmniCS

Supplier
  TOmniCS

Directed
  False

Client
  orcLock

Type
  association

to Struct TOmniAlignedInt32

Supplier
  TOmniAlignedInt32

Directed
  False

Client
  orcNumResources

Type
  association

Overview | Namespace | Classifier | Tree | Index | Help
PREV NEXT | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | DESTR | METHOD | DETAIL: FIELD | CONSTR | DESTR | METHOD