*/
private Sequence registerSequence(AbstractSequence sequence) throws DuplicateSequenceException {
try {
dataLock.writeLock().lock();
if (sequences.containsKey(sequence.getId())) {
throw new DuplicateSequenceException(sequence.getId());
} else {
sequences.put(sequence.getId(), sequence);
}
return sequence;