Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support jackson buffer recycler #519

Merged
merged 4 commits into from
Mar 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update Jackson.java
  • Loading branch information
pjfanning committed Mar 27, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 3b777fb80c1a750a84ad9ffe0e12c23d50169c84
Original file line number Diff line number Diff line change
@@ -122,7 +122,8 @@ static ObjectMapper createMapper(final Config config) {
}

private static RecyclerPool<BufferRecycler> getBufferRecyclerPool(final Config cfg) {
switch (cfg.getString("buffer-recycler.pool-instance")) {
final String poolType = cfg.getString("buffer-recycler.pool-instance");
switch (poolType) {
case "thread-local":
return JsonRecyclerPools.threadLocalPool();
case "lock-free":
@@ -136,8 +137,7 @@ private static RecyclerPool<BufferRecycler> getBufferRecyclerPool(final Config c
case "bounded":
return JsonRecyclerPools.newBoundedPool(cfg.getInt("buffer-recycler.bounded-pool-size"));
default:
throw new IllegalArgumentException(
"Unknown recycler-pool: " + cfg.getString("buffer-recycler.pool-instance"));
throw new IllegalArgumentException("Unknown recycler-pool: " + poolType);
}
}
}
Loading