Process-private Globals can be used as a data global in storage definition. That way, each process can have its own objects for the class with ppg storage. For example lets define a pool, which can:
- add elements to a pool (ignoring duplicates)
- check if an element exists in the pool
Here's the class:
/// Stores unique identifiers
Class Utils.Pool Extends %Persistent
{
Property Value As %String;
Index IDKEY On Value [ IdKey, PrimaryKey, Unique ];
Method %OnNew(Value As %String = "") As %Status [ Private, ServerOnly = 1 ]
{
Set .
But my attempts to set idToTokenArray have not yielded any positive results so far. How do I need to fill it?
