Creates a ClearableLinker from a function creating a Linker.
Creates a ClearableLinker from a function creating a Linker.
Every time clear()
is called, a new Linker is obtained from the
newLinker
function to ensure that all the previous state is discarded.
newLinker
must returned a new, independent instance of Linker every
time it is called.
If batchMode
is true, the returned ClearableLinker
clears itself
after every invocation of link
.