// Buffer pool?
// Nodes can be writtern during reads.
// Make sure this operation is sync'ed.
int maxSize = nodec.maxSize(node) ;
Block block = file.allocWrite(maxSize) ;
try {
int len = nodec.encode(node, block.getByteBuffer(), null) ;
file.completeWrite(block) ;
return block.getId() ;
} catch (TDBException ex)
{
file.abortWrite(block) ;
throw ex ;
}