protocolSession的缓存改为同步caffeine,因为没有IO操作

This commit is contained in:
三丙
2024-10-09 10:08:32 +08:00
parent a1db728be5
commit c3295ce01c
11 changed files with 75 additions and 59 deletions

View File

@@ -148,5 +148,5 @@ queue:
thread-pool:
sharding:
hash_function_name: "${THREAD_POOL_SHARDING_HASH_FUNCTION_NAME:murmur3_128}" # murmur3_32, murmur3_128 or sha256
parallelism: "${THREAD_POOL_SHARDING_PARALLELISM:128}"
parallelism: "${THREAD_POOL_SHARDING_PARALLELISM:8}"
stats-print-interval-ms: "${THREAD_POOL_SHARDING_STATS_PRINT_INTERVAL_MS:10000}"

View File

@@ -109,7 +109,7 @@ class DownlinkControllerIT extends AbstractProtocolTestBase {
Thread.sleep(1000);
UUID messageId = UUID.randomUUID();
ProtocolSession protocolSession = sessionRegistryProvider.getSESSION_CACHE().asMap().values().stream().findFirst().get().get();
ProtocolSession protocolSession = sessionRegistryProvider.getSessionCache().asMap().values().stream().findFirst().get();
UUID sessionId = protocolSession.getId();
UUID requestId = UUID.randomUUID();