sequenceValue = sequences.remove(0);
// copy remaining values to global cache.
getPreallocationHandler().setPreallocated(seqName, sequences);
logDebugPreallocation(seqName, sequenceValue, sequences);
} finally {
lock.release();
}
return sequenceValue;
} else {
// preallocation size is 1 - just return the first (and only) element of the allocated vector.
return sequence.getGeneratedVector(null, writeSession).firstElement();