Skip to main content

%BigData.ShardableEntity

Subclass this class to implement a class encapsulating a storage model that can be sharded.

Method Inventory

Parameters

parameter %StorageModel;
Return the storage model code

Methods

method %ExecCUDOperation() as %Status
Execute a Create/Update/Delete operation locally on a shard
method %ExecMetadataOperation() as %Status
Execute a metadata operation (create/modify/drop entity) locally on a shard
method %ExecQry(pSendBackHandle As %String) as %Status
Execute a Query locally on a shard
method %ExecSendQryEnd() as %Status
Execute flagging the end of partial query results from a given shard
method %ExecStoreQryResult() as %Status
Execute storing a partial query result in a combining container
method %GetEntityName() as %String
Get the entity name
method %GetHashedShardKey() as %Integer
Get the (already hashed) shard key
method %GetId() as %String
Get the id
method %GetInstanceCount() as %Integer
Get the number of instances (e.g. rows, documents) affected by the most recent operation
method %GetMessage(pShardNumber As %Integer = 0, pShardOffset As %Integer = 0) as %String
Get the shardable-entity-specific portion of the message to send for this operation Optional parameter pShardNumber specifies the shard number of the target shard (i.e. its subscript in $$$SSShards()), to be passed in cases where the message needs to differ for each shard (for example, if each shard needs to be passed a distinct temp file name). Optional parameter pShardOffset is an amount to be subtracted from pShardNumber, to convert it to an ordinal ranging from 0 to shardCount-1.
method %GetMsgCode() as %String
Get the message code
method %GetResultSet() as %Library.String
Return result set
method %GetShardMapType() as %Integer
Get the type of shard map to create for this entity
method %GetShardNumber(pShardNumber As %Integer)
Get the shard number (for specifying a shard without hashing)
method %OnNew(pMessageCode As %String(MAXLEN=2), pMessage As %String(MAXLEN="")) as %Library.Status
Construct an instance of a ShardableEntity subclass from the message code and storage-model-specific portion of a message.
method %Reset(pMessageCode As %String(MAXLEN=2), pMessage As %String(MAXLEN="")) as %Library.Status
Reset an instance of a ShardableEntity subclass from the message code and storage-model-specific portion of a message. This should leave the instance in the same state it would be in after being constructed with the same arguments passed to %OnNew, for any aspects of state that affect shard-server-side %Execxxx methods.
method %SetHashedShardKey(pShardKey As %Integer)
Set the (already hashed) shard key
method %SetId(pId As %String)
Set the id
method %SetMsgCode(pMsgCode As %String(MAXLEN=2))
Set the message code
method %SetShardMapType(pType As %Integer)
Set the type of shard map to create for this entity
method %SetShardNumber(pShardNumber As %Integer)
Set the shard number (for specifying a shard without hashing)
method %SetShards(pShards As %Integer)
Set all/range/one shards

Inherited Members

Inherited Methods

FeedbackOpens in a new tab