Myna. Cluster

Static functions for interacting with cluster objects

Myna uses Hazelcast http://www.hazelcast.com for clustering.  These functions grant access to the underlying Hazelcast structures.

Myna automatically clusters based on a shared “myna_permissions: datasource.  However, you often want to limit messages/structures to instances that share the same purpose, so these functions limit scope by purpose and instance id by default.  This is done by appending “|purpose=,instance_id=” to resource names.

Hazelcast “Topics” are implemented in Myna.Event and work a little differently

See Also

Summary
Myna. ClusterStatic functions for interacting with cluster objects
Functions
getMapreturns a Hazelcast map object
getListreturns a Hazelcast list object
getQueuereturns a Hazelcast queue object

Functions

getMap

Myna.Cluster.getMap = function(name,
instance,
purpose)

returns a Hazelcast map object

Parameters

namename of the map
instanceOptional, default $server.instanceId This map will be limited to the specified instance id.  This is useful when you have identical instances running on multiple servers and want to share data.  Set to “ANY” to enable all instances
purposeOptional, default $server.purpose This map will be limited to the specified purpose.  Set to “ANY” to enable all purposes

Note

The returned object is an implementation of java.util.concurrent.ConcurrentMap

See

getList

Myna.Cluster.getList = function(name,
instance,
purpose)

returns a Hazelcast list object

Parameters

namename of the list
instanceOptional, default $server.instanceId This list will be limited to the specified instance id.  This is useful when you have identical instances running on multiple servers and want to share data.  Set to “ANY” to enable all instances
purposeOptional, default $server.purpose This list will be limited to the specified purpose.  Set to “ANY” to enable all purposes

Note

The returned object is an implementation of java.util.List

See

getQueue

Myna.Cluster.getQueue = function(name,
instance,
purpose)

returns a Hazelcast queue object

Parameters

namename of the queue
instanceOptional, default $server.instanceId This queue will be limited to the specified instance id.  This is useful when you have identical instances running on multiple servers and want to share data.  Set to “ANY” to enable all instances
purposeOptional, default $server.purpose This queue will be limited to the specified purpose.  Set to “ANY” to enable all purposes

Note

The returned object is an implementation of java.util.concurrent.BlockingQueue

See

Myna.Cluster.getMap = function(name,
instance,
purpose)
returns a Hazelcast map object
Myna.Cluster.getList = function(name,
instance,
purpose)
returns a Hazelcast list object
Myna.Cluster.getQueue = function(name,
instance,
purpose)
returns a Hazelcast queue object
Class for managing distributed events