public void truncate() throws PersistitException {
if (isReadOnly()) {
throw new ReadOnlyVolumeException();
}
if (!isTemporary() && !getSpecification().isCreate() && !getSpecification().isCreateOnly()) {
throw new TruncateVolumeException();
}
for (;;) {
//
// Prevents read/write operations from starting while the
// volume is being closed.