Revision 1 as of 2014-01-07 17:58:56

Clear message

SAFplus::HandleT Clusterwide Unique Identifier

The Cluster-wide Unique Identifier is a handle that can be used to identify something anywhere within the cluster.

Special identifiers exist that can be constructed from other data (such as the Node's slot number). Other identifiers persist across restarts (well known). Some identifiers do not; they point directly to an object in memory.

#include <clHandleApi.hpp>

Data Format

4 bit identifier type

Identifier Type: Pointer (0)

64 bit pointer 32 bit process id 16 bit node id (slot number and messaging address) 12 bit cluster id 4 bit identifier type

Identifier Type: Transient Well Known (1)

Note, inside handle fields, "0" means NONE, 0xFFFF (all ones of whatever size) means THIS_ENTITY

The meaning of "NONE" might be "all" or "not applicable", depending on the handle. For example, a checkpoint would have a "node" and "process" field of 0 because a checkpoint is the same across all nodes or processes.

"THIS_ENTITY" is NOT a shortcut for the current process or node. If the handle is passed to another process on another node, the handle now refers to the process and node it was sent to. Therefore THIS_ENTITY should be used carefully.

Well Known System Ids

* Node:

Bit Length

4

12

16

32

64

Value

1

cluster Id

node id

0

0

* Process:

Bit Length

4

12

16

32

64

Value

1

cluster Id

node id

process id (pid)

0

Handles

Bit Length

4

12

16

32

64

Value

1

cluster id or 0

node id or 0

process id (pid) or 0

Handle

A handle is looked up in a Dictionary that is shared by all entities described in the handle. For example, a handle with:

1

0xffff

0

0

5

is entry 5 in a Dictionary shared by all nodes and processes in this cluster. But:

1

0xffff

1

2

5

is entry 5 in process 2 on node 1 on this cluster

Identifier Type: Persistent Well Known (2)

Same as Well Known (1), except node id and process id are numbers corresponding to SAF names. So must be looked up in a persistent cluster-wide Dictionary.