FasterXML / jackson-core

Core part of Jackson that defines Streaming API as well as basic shared abstractions
Apache License 2.0
2.27k stars 793 forks source link

document JsonRecyclerPools.sharedBoundedPool() #1240

Open pjfanning opened 7 months ago

pjfanning commented 7 months ago
cowtowncoder commented 7 months ago

Ok so yes:

  1. When bound is reached, no more instances should be pooled (i.e. on returning a lease, buffer instance is just dropped)
  2. The whole idea of sharedBoundedPool() is to be global, non-configurable, instance -- so I am not sure how it'd work when multiple factories tried to get shared instance with different configuration.

I guess partly this is due to connotations of "shared" -- I went back and forth between "global" and "shared". It really means "global"; and not something constructed on-demand for sharing. It's a global singleton.