Managing partitions for a tenant group
- Last Updated: January 17, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
Tenant group partitioning is managed by various default settings
on the tenant group. The partitions for a tenant group can be accessed through
the Partitions property collection on the ITenantGroup interface.
Setting DefaultAllocation to "Immediate" causes
the partitioning to take place in the same transaction as the tenant
group creation using the default areas defined for the tenant group.
Setting the property to "Delayed" or "None" postpones
the allocation and allows the area to be edited before the allocation.
The "Delayed" setting allows the partitions
to be allocated in one operation by invoking the Allocate( ) method
on ITenantGroup, which sets the AllocationState property
for every tenant group partition (IPartition) to "Allocated".
However, the IsAllocated property on ITenantGroup returns FALSE when
any individual partition has an AllocationState setting
of "Delayed". The "None" setting
is considered a permanent setting, and partitions that have an AllocationState setting
of "None" do not affect a tenant group's IsAllocated property
setting. Also, allocating individual partitions do not affect the
tenant group's IsAllocated property setting. So,
while changing the AllocationState setting of a
partition from "None" to "Delayed" sets
the tenant group's IsAllocated property to FALSE,
changing the AllocationState setting of an individual
partition to "Allocated" does not set the tenant
group's IsAllocated property to TRUE.
IsAllocated property on ITenantGroup does
not necessarily reflect the state of all the tenant group partitions.
While it is always FALSE if one of the tenant group
partitions has an AllocationState setting of "Delayed", IsAllocated can
be set to TRUE only by invoking the Allocate( ) method
on ITenantGroup. It cannot be set to TRUE by
invoking the Allocate( ) method on the Partitions property
(an IPartitionMap) of ITenantGroup or
on any individual partition (IPartition). In other
words, for IsAllocated to be TRUE for
a tenant group, the Allocate( ) method
must be invoked on the tenant group itself, not on any one
or more of the partitions (in a collection) owned by the tenant
group.The following example creates a tenant group with DefaultAllocation set
to "None" to postpone the allocation and changes
the area on one index partition before allocating all partitions:
|
See also: