Skip to content

Commit

Permalink
add non-recycling pool
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfanning committed Nov 9, 2024
1 parent 1610fad commit 466d312
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion serialization-jackson/src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pekko.serialization.jackson {
# https://javadoc.io/static/com.fasterxml.jackson.core/jackson-core/2.18.1/com/fasterxml/jackson/core/util/JsonRecyclerPools.html
# The default is "thread-local" which is the same as the default in Jackson 2.18.
buffer-recycler {
# the supported values are "thread-local", "concurrent-deque", "shared-concurrent-deque", "bounded"
# the supported values are "thread-local", "concurrent-deque", "shared-concurrent-deque", "bounded", "non-recycling"
pool-instance = "thread-local"
# the maximum size of bounded recycler pools - must be >=1 or an IllegalArgumentException will occur
# only applies to pool-instance type "bounded"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ object JacksonObjectMapperProvider extends ExtensionId[JacksonObjectMapperProvid
case "concurrent-deque" => JsonRecyclerPools.newConcurrentDequePool()
case "shared-concurrent-deque" => JsonRecyclerPools.sharedConcurrentDequePool()
case "bounded" => JsonRecyclerPools.newBoundedPool(cfg.getInt("buffer-recycler.bounded-pool-size"))
case "non-recycling" => JsonRecyclerPools.nonRecyclingPool()
case other => throw new IllegalArgumentException(s"Unknown recycler-pool: $other")
}
}
Expand Down

0 comments on commit 466d312

Please sign in to comment.