setBlockSize

setBlockSize(blockSize: Integer) updating;

The setBlockSize method of the Collection class enables you to specify or change the block size of the receiver in terms of entries in each block. When you use this method to change the collection block size, all collection blocks for the receiver are created with the specified size. For details about the behavior of and tuning collections, see Chapter 4 of the Developer's Reference.

A physical upper limit is enforced. (The maximum collection block size for a collection is 256K bytes; that is, the value defined by the MaximumCollectionBlockSize global constant in the SystemLimits category).

If the value of entries per block multiplied by the collection entry size causes the actual block size to exceed the Jade limit, an exception is raised.

If this method is invoked on a populated collection and the block size differs from that already in use by the receiver, an automatic upgrade is triggered, which restructures the collection to use the new size.

The time taken to reblock a collection increases with the collection size and could be quite lengthy for large collections. This reblock operation is similar to the type of upgrade that can occur during a reorganization, and the collection remains inaccessible until the process has completed.

To adjust the block size at the class level, use the Entries Per Block text box on the Tuning sheet of the Define Class dialog.