SemaphoreUtils

Inclusion code:

Service Deployment
Port NameLocationProtocolInterfaces
SemaphoreUtils documentation:
SemaphoreUtils--SemaphoreUtilsInterface

List of Available Interfaces

SemaphoreUtilsInterface

Interface documentation:

Operation NameInput TypeOutput TypeFaults
releaseSemaphoreRequestbool
acquireSemaphoreRequestbool

Operation Description

release

Operation documentation: Releases permits to a semaphore. If there exists no semaphore with the given ".name", "release" creates a new semaphore with that name and as many permits as indicated in ".permits". The default behaviour when value ".permits" is absent is to release one permit.

Invocation template:

release@SemaphoreUtils( request )( response )

Request type

Type: SemaphoreRequest

type SemaphoreRequest: void {
    .permits?: int
    .name: string
}

SemaphoreRequest : void

  • permits : int : the optional number of permits to release/acquire
  • name : string

Response type

Type: bool

bool : bool

acquire

Operation documentation: Acquires permits from a semaphore. If there exists no semaphore with the given ".name", "acquire" creates a new semaphore with 0 permits with that name. The operation returns a response when a new permit is released (see operation "release"). The default behaviour when value ".permits" is absent is to acquire one permit.

Invocation template:

acquire@SemaphoreUtils( request )( response )

Request type

Type: SemaphoreRequest

type SemaphoreRequest: void {
    .permits?: int
    .name: string
}

SemaphoreRequest : void

  • permits : int : the optional number of permits to release/acquire
  • name : string

Response type

Type: bool

bool : bool