: Sorry I've confused things a bit... The thread safeness have to be
: considered only on the Tokenizers, not on the factories. So are the
: Tokenizers thread safe?

nope ... they are constructed using Readers and mainting state about the
text they are processing ... the only api is a "next()" method.

: > But my question is: Do we need to create factories so frequently or the are
: > just create once and re-used (are they thread safe)? The term Factory made
: > me think of a class that is responsible for building others instance, so
: > usually they can be singletons... If they don't need to be created all the

just to be clear, the Factories are reused, but if we wanted one
"UberFactory" class to be able to return any arbitrary Tokenizer specfied
in the config, the reflection would have to be for the Tokenizer classes

the factories aren't singletons, becuase you might want to use them for
multiple fields with differnet configurations.



-Hoss

Reply via email to