@celerispay/hazelcast-client 3.12.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.nvmrc +1 -0
- package/CHANGELOG.md +116 -0
- package/CONFIG.md +503 -0
- package/FAILOVER_FIXES.md +284 -0
- package/LICENSE +202 -0
- package/QUICK_START.md +143 -0
- package/README.md +178 -0
- package/RELEASE_SUMMARY.md +180 -0
- package/config-schema.json +343 -0
- package/hazelcast-client-default.json +56 -0
- package/hazelcast-client-full.json +137 -0
- package/lib/Address.d.ts +17 -0
- package/lib/Address.js +65 -0
- package/lib/BitsUtil.d.ts +69 -0
- package/lib/BitsUtil.js +202 -0
- package/lib/BuildInfo.d.ts +9 -0
- package/lib/BuildInfo.js +53 -0
- package/lib/ClientInfo.d.ts +15 -0
- package/lib/ClientInfo.js +27 -0
- package/lib/ClientMessage.d.ts +52 -0
- package/lib/ClientMessage.js +217 -0
- package/lib/ClusterDataFactory.d.ts +4 -0
- package/lib/ClusterDataFactory.js +31 -0
- package/lib/ClusterDataFactoryHelper.d.ts +5 -0
- package/lib/ClusterDataFactoryHelper.js +26 -0
- package/lib/DataStoreHashMap.d.ts +20 -0
- package/lib/DataStoreHashMap.js +112 -0
- package/lib/DistributedObject.d.ts +22 -0
- package/lib/DistributedObject.js +17 -0
- package/lib/HazelcastClient.d.ts +201 -0
- package/lib/HazelcastClient.js +370 -0
- package/lib/HazelcastError.d.ts +114 -0
- package/lib/HazelcastError.js +389 -0
- package/lib/HeartbeatService.d.ts +30 -0
- package/lib/HeartbeatService.js +108 -0
- package/lib/LifecycleService.d.ts +32 -0
- package/lib/LifecycleService.js +105 -0
- package/lib/ListenerMessageCodec.d.ts +6 -0
- package/lib/ListenerMessageCodec.js +17 -0
- package/lib/ListenerService.d.ts +35 -0
- package/lib/ListenerService.js +233 -0
- package/lib/LockReferenceIdGenerator.d.ts +6 -0
- package/lib/LockReferenceIdGenerator.js +29 -0
- package/lib/PartitionService.d.ts +38 -0
- package/lib/PartitionService.js +118 -0
- package/lib/Util.d.ts +47 -0
- package/lib/Util.js +351 -0
- package/lib/aggregation/Aggregator.d.ts +74 -0
- package/lib/aggregation/Aggregator.js +277 -0
- package/lib/aggregation/AggregatorFactory.d.ts +26 -0
- package/lib/aggregation/AggregatorFactory.js +66 -0
- package/lib/aggregation/Aggregators.d.ts +96 -0
- package/lib/aggregation/Aggregators.js +149 -0
- package/lib/codec/AddressCodec.d.ts +6 -0
- package/lib/codec/AddressCodec.js +33 -0
- package/lib/codec/AtomicLongAddAndGetCodec.d.ts +7 -0
- package/lib/codec/AtomicLongAddAndGetCodec.js +56 -0
- package/lib/codec/AtomicLongCompareAndSetCodec.d.ts +7 -0
- package/lib/codec/AtomicLongCompareAndSetCodec.js +58 -0
- package/lib/codec/AtomicLongDecrementAndGetCodec.d.ts +7 -0
- package/lib/codec/AtomicLongDecrementAndGetCodec.js +54 -0
- package/lib/codec/AtomicLongGetAndAddCodec.d.ts +7 -0
- package/lib/codec/AtomicLongGetAndAddCodec.js +56 -0
- package/lib/codec/AtomicLongGetAndIncrementCodec.d.ts +7 -0
- package/lib/codec/AtomicLongGetAndIncrementCodec.js +54 -0
- package/lib/codec/AtomicLongGetAndSetCodec.d.ts +7 -0
- package/lib/codec/AtomicLongGetAndSetCodec.js +56 -0
- package/lib/codec/AtomicLongGetCodec.d.ts +7 -0
- package/lib/codec/AtomicLongGetCodec.js +54 -0
- package/lib/codec/AtomicLongIncrementAndGetCodec.d.ts +7 -0
- package/lib/codec/AtomicLongIncrementAndGetCodec.js +54 -0
- package/lib/codec/AtomicLongMessageType.d.ts +15 -0
- package/lib/codec/AtomicLongMessageType.js +37 -0
- package/lib/codec/AtomicLongSetCodec.d.ts +5 -0
- package/lib/codec/AtomicLongSetCodec.js +47 -0
- package/lib/codec/ClientAddDistributedObjectListenerCodec.d.ts +8 -0
- package/lib/codec/ClientAddDistributedObjectListenerCodec.js +74 -0
- package/lib/codec/ClientAddMembershipListenerCodec.d.ts +8 -0
- package/lib/codec/ClientAddMembershipListenerCodec.js +107 -0
- package/lib/codec/ClientAuthenticationCodec.d.ts +7 -0
- package/lib/codec/ClientAuthenticationCodec.js +114 -0
- package/lib/codec/ClientAuthenticationCustomCodec.d.ts +7 -0
- package/lib/codec/ClientAuthenticationCustomCodec.js +112 -0
- package/lib/codec/ClientCreateProxyCodec.d.ts +6 -0
- package/lib/codec/ClientCreateProxyCodec.js +50 -0
- package/lib/codec/ClientDestroyProxyCodec.d.ts +5 -0
- package/lib/codec/ClientDestroyProxyCodec.js +47 -0
- package/lib/codec/ClientGetDistributedObjectsCodec.d.ts +7 -0
- package/lib/codec/ClientGetDistributedObjectsCodec.js +59 -0
- package/lib/codec/ClientMessageType.d.ts +18 -0
- package/lib/codec/ClientMessageType.js +40 -0
- package/lib/codec/ClientPingCodec.d.ts +5 -0
- package/lib/codec/ClientPingCodec.js +42 -0
- package/lib/codec/ClientRemoveDistributedObjectListenerCodec.d.ts +7 -0
- package/lib/codec/ClientRemoveDistributedObjectListenerCodec.js +54 -0
- package/lib/codec/ClientStatisticsCodec.d.ts +5 -0
- package/lib/codec/ClientStatisticsCodec.js +42 -0
- package/lib/codec/DistributedObjectInfoCodec.d.ts +5 -0
- package/lib/codec/DistributedObjectInfoCodec.js +27 -0
- package/lib/codec/EntryViewCodec.d.ts +7 -0
- package/lib/codec/EntryViewCodec.js +56 -0
- package/lib/codec/FlakeIdGeneratorMessageType.d.ts +3 -0
- package/lib/codec/FlakeIdGeneratorMessageType.js +25 -0
- package/lib/codec/FlakeIdGeneratorNewIdBatchCodec.d.ts +7 -0
- package/lib/codec/FlakeIdGeneratorNewIdBatchCodec.js +60 -0
- package/lib/codec/GetPartitionsCodec.d.ts +9 -0
- package/lib/codec/GetPartitionsCodec.js +45 -0
- package/lib/codec/ListAddAllCodec.d.ts +7 -0
- package/lib/codec/ListAddAllCodec.js +62 -0
- package/lib/codec/ListAddAllWithIndexCodec.d.ts +7 -0
- package/lib/codec/ListAddAllWithIndexCodec.js +64 -0
- package/lib/codec/ListAddCodec.d.ts +7 -0
- package/lib/codec/ListAddCodec.js +56 -0
- package/lib/codec/ListAddListenerCodec.d.ts +8 -0
- package/lib/codec/ListAddListenerCodec.js +80 -0
- package/lib/codec/ListAddWithIndexCodec.d.ts +6 -0
- package/lib/codec/ListAddWithIndexCodec.js +49 -0
- package/lib/codec/ListClearCodec.d.ts +5 -0
- package/lib/codec/ListClearCodec.js +45 -0
- package/lib/codec/ListCompareAndRemoveAllCodec.d.ts +7 -0
- package/lib/codec/ListCompareAndRemoveAllCodec.js +62 -0
- package/lib/codec/ListCompareAndRetainAllCodec.d.ts +7 -0
- package/lib/codec/ListCompareAndRetainAllCodec.js +62 -0
- package/lib/codec/ListContainsAllCodec.d.ts +7 -0
- package/lib/codec/ListContainsAllCodec.js +62 -0
- package/lib/codec/ListContainsCodec.d.ts +7 -0
- package/lib/codec/ListContainsCodec.js +56 -0
- package/lib/codec/ListGetAllCodec.d.ts +7 -0
- package/lib/codec/ListGetAllCodec.js +61 -0
- package/lib/codec/ListGetCodec.d.ts +7 -0
- package/lib/codec/ListGetCodec.js +58 -0
- package/lib/codec/ListIndexOfCodec.d.ts +7 -0
- package/lib/codec/ListIndexOfCodec.js +56 -0
- package/lib/codec/ListIsEmptyCodec.d.ts +7 -0
- package/lib/codec/ListIsEmptyCodec.js +54 -0
- package/lib/codec/ListLastIndexOfCodec.d.ts +7 -0
- package/lib/codec/ListLastIndexOfCodec.js +56 -0
- package/lib/codec/ListMessageType.d.ts +25 -0
- package/lib/codec/ListMessageType.js +47 -0
- package/lib/codec/ListRemoveCodec.d.ts +7 -0
- package/lib/codec/ListRemoveCodec.js +56 -0
- package/lib/codec/ListRemoveListenerCodec.d.ts +7 -0
- package/lib/codec/ListRemoveListenerCodec.js +56 -0
- package/lib/codec/ListRemoveWithIndexCodec.d.ts +7 -0
- package/lib/codec/ListRemoveWithIndexCodec.js +58 -0
- package/lib/codec/ListSetCodec.d.ts +7 -0
- package/lib/codec/ListSetCodec.js +60 -0
- package/lib/codec/ListSizeCodec.d.ts +7 -0
- package/lib/codec/ListSizeCodec.js +54 -0
- package/lib/codec/ListSubCodec.d.ts +7 -0
- package/lib/codec/ListSubCodec.js +65 -0
- package/lib/codec/LockForceUnlockCodec.d.ts +5 -0
- package/lib/codec/LockForceUnlockCodec.js +47 -0
- package/lib/codec/LockGetLockCountCodec.d.ts +7 -0
- package/lib/codec/LockGetLockCountCodec.js +54 -0
- package/lib/codec/LockGetRemainingLeaseTimeCodec.d.ts +7 -0
- package/lib/codec/LockGetRemainingLeaseTimeCodec.js +54 -0
- package/lib/codec/LockIsLockedByCurrentThreadCodec.d.ts +7 -0
- package/lib/codec/LockIsLockedByCurrentThreadCodec.js +56 -0
- package/lib/codec/LockIsLockedCodec.d.ts +7 -0
- package/lib/codec/LockIsLockedCodec.js +54 -0
- package/lib/codec/LockLockCodec.d.ts +5 -0
- package/lib/codec/LockLockCodec.js +51 -0
- package/lib/codec/LockMessageType.d.ts +10 -0
- package/lib/codec/LockMessageType.js +32 -0
- package/lib/codec/LockTryLockCodec.d.ts +7 -0
- package/lib/codec/LockTryLockCodec.js +62 -0
- package/lib/codec/LockUnlockCodec.d.ts +5 -0
- package/lib/codec/LockUnlockCodec.js +49 -0
- package/lib/codec/MapAddEntryListenerCodec.d.ts +8 -0
- package/lib/codec/MapAddEntryListenerCodec.js +104 -0
- package/lib/codec/MapAddEntryListenerToKeyCodec.d.ts +8 -0
- package/lib/codec/MapAddEntryListenerToKeyCodec.js +106 -0
- package/lib/codec/MapAddEntryListenerToKeyWithPredicateCodec.d.ts +8 -0
- package/lib/codec/MapAddEntryListenerToKeyWithPredicateCodec.js +108 -0
- package/lib/codec/MapAddEntryListenerWithPredicateCodec.d.ts +8 -0
- package/lib/codec/MapAddEntryListenerWithPredicateCodec.js +106 -0
- package/lib/codec/MapAddIndexCodec.d.ts +5 -0
- package/lib/codec/MapAddIndexCodec.js +49 -0
- package/lib/codec/MapAddNearCacheEntryListenerCodec.d.ts +8 -0
- package/lib/codec/MapAddNearCacheEntryListenerCodec.js +135 -0
- package/lib/codec/MapAddNearCacheInvalidationListenerCodec.d.ts +8 -0
- package/lib/codec/MapAddNearCacheInvalidationListenerCodec.js +138 -0
- package/lib/codec/MapAggregateCodec.d.ts +7 -0
- package/lib/codec/MapAggregateCodec.js +61 -0
- package/lib/codec/MapAggregateWithPredicateCodec.d.ts +7 -0
- package/lib/codec/MapAggregateWithPredicateCodec.js +63 -0
- package/lib/codec/MapClearCodec.d.ts +5 -0
- package/lib/codec/MapClearCodec.js +45 -0
- package/lib/codec/MapContainsKeyCodec.d.ts +7 -0
- package/lib/codec/MapContainsKeyCodec.js +58 -0
- package/lib/codec/MapContainsValueCodec.d.ts +7 -0
- package/lib/codec/MapContainsValueCodec.js +56 -0
- package/lib/codec/MapDeleteCodec.d.ts +6 -0
- package/lib/codec/MapDeleteCodec.js +49 -0
- package/lib/codec/MapEntriesWithPredicateCodec.d.ts +7 -0
- package/lib/codec/MapEntriesWithPredicateCodec.js +67 -0
- package/lib/codec/MapEntrySetCodec.d.ts +7 -0
- package/lib/codec/MapEntrySetCodec.js +65 -0
- package/lib/codec/MapEvictAllCodec.d.ts +5 -0
- package/lib/codec/MapEvictAllCodec.js +45 -0
- package/lib/codec/MapEvictCodec.d.ts +7 -0
- package/lib/codec/MapEvictCodec.js +58 -0
- package/lib/codec/MapExecuteOnAllKeysCodec.d.ts +7 -0
- package/lib/codec/MapExecuteOnAllKeysCodec.js +67 -0
- package/lib/codec/MapExecuteOnKeyCodec.d.ts +7 -0
- package/lib/codec/MapExecuteOnKeyCodec.js +62 -0
- package/lib/codec/MapExecuteOnKeysCodec.d.ts +7 -0
- package/lib/codec/MapExecuteOnKeysCodec.js +75 -0
- package/lib/codec/MapExecuteWithPredicateCodec.d.ts +7 -0
- package/lib/codec/MapExecuteWithPredicateCodec.js +69 -0
- package/lib/codec/MapFetchNearCacheInvalidationMetadataCodec.d.ts +8 -0
- package/lib/codec/MapFetchNearCacheInvalidationMetadataCodec.js +101 -0
- package/lib/codec/MapFlushCodec.d.ts +5 -0
- package/lib/codec/MapFlushCodec.js +45 -0
- package/lib/codec/MapForceUnlockCodec.d.ts +6 -0
- package/lib/codec/MapForceUnlockCodec.js +49 -0
- package/lib/codec/MapGetAllCodec.d.ts +7 -0
- package/lib/codec/MapGetAllCodec.js +73 -0
- package/lib/codec/MapGetCodec.d.ts +7 -0
- package/lib/codec/MapGetCodec.js +60 -0
- package/lib/codec/MapGetEntryViewCodec.d.ts +7 -0
- package/lib/codec/MapGetEntryViewCodec.js +61 -0
- package/lib/codec/MapIsEmptyCodec.d.ts +7 -0
- package/lib/codec/MapIsEmptyCodec.js +54 -0
- package/lib/codec/MapIsLockedCodec.d.ts +7 -0
- package/lib/codec/MapIsLockedCodec.js +56 -0
- package/lib/codec/MapKeySetCodec.d.ts +7 -0
- package/lib/codec/MapKeySetCodec.js +61 -0
- package/lib/codec/MapKeySetWithPagingPredicateCodec.d.ts +7 -0
- package/lib/codec/MapKeySetWithPagingPredicateCodec.js +63 -0
- package/lib/codec/MapKeySetWithPredicateCodec.d.ts +7 -0
- package/lib/codec/MapKeySetWithPredicateCodec.js +63 -0
- package/lib/codec/MapLoadAllCodec.d.ts +5 -0
- package/lib/codec/MapLoadAllCodec.js +47 -0
- package/lib/codec/MapLoadGivenKeysCodec.d.ts +5 -0
- package/lib/codec/MapLoadGivenKeysCodec.js +55 -0
- package/lib/codec/MapLockCodec.d.ts +6 -0
- package/lib/codec/MapLockCodec.js +53 -0
- package/lib/codec/MapMessageType.d.ts +71 -0
- package/lib/codec/MapMessageType.js +93 -0
- package/lib/codec/MapPutAllCodec.d.ts +5 -0
- package/lib/codec/MapPutAllCodec.js +59 -0
- package/lib/codec/MapPutCodec.d.ts +7 -0
- package/lib/codec/MapPutCodec.js +64 -0
- package/lib/codec/MapPutIfAbsentCodec.d.ts +7 -0
- package/lib/codec/MapPutIfAbsentCodec.js +64 -0
- package/lib/codec/MapPutTransientCodec.d.ts +6 -0
- package/lib/codec/MapPutTransientCodec.js +53 -0
- package/lib/codec/MapRemoveCodec.d.ts +7 -0
- package/lib/codec/MapRemoveCodec.js +60 -0
- package/lib/codec/MapRemoveEntryListenerCodec.d.ts +7 -0
- package/lib/codec/MapRemoveEntryListenerCodec.js +56 -0
- package/lib/codec/MapRemoveIfSameCodec.d.ts +7 -0
- package/lib/codec/MapRemoveIfSameCodec.js +60 -0
- package/lib/codec/MapReplaceCodec.d.ts +7 -0
- package/lib/codec/MapReplaceCodec.js +62 -0
- package/lib/codec/MapReplaceIfSameCodec.d.ts +7 -0
- package/lib/codec/MapReplaceIfSameCodec.js +62 -0
- package/lib/codec/MapSetCodec.d.ts +6 -0
- package/lib/codec/MapSetCodec.js +53 -0
- package/lib/codec/MapSizeCodec.d.ts +7 -0
- package/lib/codec/MapSizeCodec.js +54 -0
- package/lib/codec/MapTryLockCodec.d.ts +7 -0
- package/lib/codec/MapTryLockCodec.js +64 -0
- package/lib/codec/MapTryPutCodec.d.ts +7 -0
- package/lib/codec/MapTryPutCodec.js +62 -0
- package/lib/codec/MapTryRemoveCodec.d.ts +7 -0
- package/lib/codec/MapTryRemoveCodec.js +60 -0
- package/lib/codec/MapUnlockCodec.d.ts +6 -0
- package/lib/codec/MapUnlockCodec.js +51 -0
- package/lib/codec/MapValuesCodec.d.ts +7 -0
- package/lib/codec/MapValuesCodec.js +61 -0
- package/lib/codec/MapValuesWithPagingPredicateCodec.d.ts +7 -0
- package/lib/codec/MapValuesWithPagingPredicateCodec.js +67 -0
- package/lib/codec/MapValuesWithPredicateCodec.d.ts +7 -0
- package/lib/codec/MapValuesWithPredicateCodec.js +63 -0
- package/lib/codec/MemberCodec.d.ts +6 -0
- package/lib/codec/MemberCodec.js +49 -0
- package/lib/codec/MultiMapAddEntryListenerCodec.d.ts +8 -0
- package/lib/codec/MultiMapAddEntryListenerCodec.js +102 -0
- package/lib/codec/MultiMapAddEntryListenerToKeyCodec.d.ts +8 -0
- package/lib/codec/MultiMapAddEntryListenerToKeyCodec.js +104 -0
- package/lib/codec/MultiMapClearCodec.d.ts +5 -0
- package/lib/codec/MultiMapClearCodec.js +45 -0
- package/lib/codec/MultiMapContainsEntryCodec.d.ts +7 -0
- package/lib/codec/MultiMapContainsEntryCodec.js +60 -0
- package/lib/codec/MultiMapContainsKeyCodec.d.ts +7 -0
- package/lib/codec/MultiMapContainsKeyCodec.js +58 -0
- package/lib/codec/MultiMapContainsValueCodec.d.ts +7 -0
- package/lib/codec/MultiMapContainsValueCodec.js +56 -0
- package/lib/codec/MultiMapEntrySetCodec.d.ts +7 -0
- package/lib/codec/MultiMapEntrySetCodec.js +65 -0
- package/lib/codec/MultiMapForceUnlockCodec.d.ts +6 -0
- package/lib/codec/MultiMapForceUnlockCodec.js +49 -0
- package/lib/codec/MultiMapGetCodec.d.ts +7 -0
- package/lib/codec/MultiMapGetCodec.js +65 -0
- package/lib/codec/MultiMapIsLockedCodec.d.ts +7 -0
- package/lib/codec/MultiMapIsLockedCodec.js +56 -0
- package/lib/codec/MultiMapKeySetCodec.d.ts +7 -0
- package/lib/codec/MultiMapKeySetCodec.js +61 -0
- package/lib/codec/MultiMapLockCodec.d.ts +6 -0
- package/lib/codec/MultiMapLockCodec.js +53 -0
- package/lib/codec/MultiMapMessageType.d.ts +23 -0
- package/lib/codec/MultiMapMessageType.js +45 -0
- package/lib/codec/MultiMapPutCodec.d.ts +7 -0
- package/lib/codec/MultiMapPutCodec.js +60 -0
- package/lib/codec/MultiMapRemoveCodec.d.ts +7 -0
- package/lib/codec/MultiMapRemoveCodec.js +65 -0
- package/lib/codec/MultiMapRemoveEntryCodec.d.ts +7 -0
- package/lib/codec/MultiMapRemoveEntryCodec.js +60 -0
- package/lib/codec/MultiMapRemoveEntryListenerCodec.d.ts +7 -0
- package/lib/codec/MultiMapRemoveEntryListenerCodec.js +56 -0
- package/lib/codec/MultiMapSizeCodec.d.ts +7 -0
- package/lib/codec/MultiMapSizeCodec.js +54 -0
- package/lib/codec/MultiMapTryLockCodec.d.ts +7 -0
- package/lib/codec/MultiMapTryLockCodec.js +64 -0
- package/lib/codec/MultiMapUnlockCodec.d.ts +6 -0
- package/lib/codec/MultiMapUnlockCodec.js +51 -0
- package/lib/codec/MultiMapValueCountCodec.d.ts +7 -0
- package/lib/codec/MultiMapValueCountCodec.js +58 -0
- package/lib/codec/MultiMapValuesCodec.d.ts +7 -0
- package/lib/codec/MultiMapValuesCodec.js +61 -0
- package/lib/codec/PNCounterAddCodec.d.ts +8 -0
- package/lib/codec/PNCounterAddCodec.js +90 -0
- package/lib/codec/PNCounterGetCodec.d.ts +8 -0
- package/lib/codec/PNCounterGetCodec.js +86 -0
- package/lib/codec/PNCounterGetConfiguredReplicaCountCodec.d.ts +7 -0
- package/lib/codec/PNCounterGetConfiguredReplicaCountCodec.js +54 -0
- package/lib/codec/PNCounterMessageType.d.ts +5 -0
- package/lib/codec/PNCounterMessageType.js +27 -0
- package/lib/codec/QueueAddAllCodec.d.ts +7 -0
- package/lib/codec/QueueAddAllCodec.js +62 -0
- package/lib/codec/QueueAddListenerCodec.d.ts +8 -0
- package/lib/codec/QueueAddListenerCodec.js +80 -0
- package/lib/codec/QueueClearCodec.d.ts +5 -0
- package/lib/codec/QueueClearCodec.js +45 -0
- package/lib/codec/QueueCompareAndRemoveAllCodec.d.ts +7 -0
- package/lib/codec/QueueCompareAndRemoveAllCodec.js +62 -0
- package/lib/codec/QueueCompareAndRetainAllCodec.d.ts +7 -0
- package/lib/codec/QueueCompareAndRetainAllCodec.js +62 -0
- package/lib/codec/QueueContainsAllCodec.d.ts +7 -0
- package/lib/codec/QueueContainsAllCodec.js +62 -0
- package/lib/codec/QueueContainsCodec.d.ts +7 -0
- package/lib/codec/QueueContainsCodec.js +56 -0
- package/lib/codec/QueueDrainToCodec.d.ts +7 -0
- package/lib/codec/QueueDrainToCodec.js +61 -0
- package/lib/codec/QueueDrainToMaxSizeCodec.d.ts +7 -0
- package/lib/codec/QueueDrainToMaxSizeCodec.js +63 -0
- package/lib/codec/QueueIsEmptyCodec.d.ts +7 -0
- package/lib/codec/QueueIsEmptyCodec.js +54 -0
- package/lib/codec/QueueIteratorCodec.d.ts +7 -0
- package/lib/codec/QueueIteratorCodec.js +61 -0
- package/lib/codec/QueueMessageType.d.ts +22 -0
- package/lib/codec/QueueMessageType.js +44 -0
- package/lib/codec/QueueOfferCodec.d.ts +7 -0
- package/lib/codec/QueueOfferCodec.js +58 -0
- package/lib/codec/QueuePeekCodec.d.ts +7 -0
- package/lib/codec/QueuePeekCodec.js +56 -0
- package/lib/codec/QueuePollCodec.d.ts +7 -0
- package/lib/codec/QueuePollCodec.js +58 -0
- package/lib/codec/QueuePutCodec.d.ts +6 -0
- package/lib/codec/QueuePutCodec.js +47 -0
- package/lib/codec/QueueRemainingCapacityCodec.d.ts +7 -0
- package/lib/codec/QueueRemainingCapacityCodec.js +54 -0
- package/lib/codec/QueueRemoveCodec.d.ts +7 -0
- package/lib/codec/QueueRemoveCodec.js +56 -0
- package/lib/codec/QueueRemoveListenerCodec.d.ts +7 -0
- package/lib/codec/QueueRemoveListenerCodec.js +56 -0
- package/lib/codec/QueueSizeCodec.d.ts +7 -0
- package/lib/codec/QueueSizeCodec.js +54 -0
- package/lib/codec/QueueTakeCodec.d.ts +7 -0
- package/lib/codec/QueueTakeCodec.js +56 -0
- package/lib/codec/ReplicatedMapAddEntryListenerCodec.d.ts +8 -0
- package/lib/codec/ReplicatedMapAddEntryListenerCodec.js +100 -0
- package/lib/codec/ReplicatedMapAddEntryListenerToKeyCodec.d.ts +8 -0
- package/lib/codec/ReplicatedMapAddEntryListenerToKeyCodec.js +102 -0
- package/lib/codec/ReplicatedMapAddEntryListenerToKeyWithPredicateCodec.d.ts +8 -0
- package/lib/codec/ReplicatedMapAddEntryListenerToKeyWithPredicateCodec.js +104 -0
- package/lib/codec/ReplicatedMapAddEntryListenerWithPredicateCodec.d.ts +8 -0
- package/lib/codec/ReplicatedMapAddEntryListenerWithPredicateCodec.js +102 -0
- package/lib/codec/ReplicatedMapClearCodec.d.ts +5 -0
- package/lib/codec/ReplicatedMapClearCodec.js +45 -0
- package/lib/codec/ReplicatedMapContainsKeyCodec.d.ts +7 -0
- package/lib/codec/ReplicatedMapContainsKeyCodec.js +56 -0
- package/lib/codec/ReplicatedMapContainsValueCodec.d.ts +7 -0
- package/lib/codec/ReplicatedMapContainsValueCodec.js +56 -0
- package/lib/codec/ReplicatedMapEntrySetCodec.d.ts +7 -0
- package/lib/codec/ReplicatedMapEntrySetCodec.js +65 -0
- package/lib/codec/ReplicatedMapGetCodec.d.ts +7 -0
- package/lib/codec/ReplicatedMapGetCodec.js +58 -0
- package/lib/codec/ReplicatedMapIsEmptyCodec.d.ts +7 -0
- package/lib/codec/ReplicatedMapIsEmptyCodec.js +54 -0
- package/lib/codec/ReplicatedMapKeySetCodec.d.ts +7 -0
- package/lib/codec/ReplicatedMapKeySetCodec.js +61 -0
- package/lib/codec/ReplicatedMapMessageType.d.ts +20 -0
- package/lib/codec/ReplicatedMapMessageType.js +42 -0
- package/lib/codec/ReplicatedMapPutAllCodec.d.ts +5 -0
- package/lib/codec/ReplicatedMapPutAllCodec.js +59 -0
- package/lib/codec/ReplicatedMapPutCodec.d.ts +7 -0
- package/lib/codec/ReplicatedMapPutCodec.js +62 -0
- package/lib/codec/ReplicatedMapRemoveCodec.d.ts +7 -0
- package/lib/codec/ReplicatedMapRemoveCodec.js +58 -0
- package/lib/codec/ReplicatedMapRemoveEntryListenerCodec.d.ts +7 -0
- package/lib/codec/ReplicatedMapRemoveEntryListenerCodec.js +56 -0
- package/lib/codec/ReplicatedMapSizeCodec.d.ts +7 -0
- package/lib/codec/ReplicatedMapSizeCodec.js +54 -0
- package/lib/codec/ReplicatedMapValuesCodec.d.ts +7 -0
- package/lib/codec/ReplicatedMapValuesCodec.js +61 -0
- package/lib/codec/RingbufferAddAllCodec.d.ts +7 -0
- package/lib/codec/RingbufferAddAllCodec.js +64 -0
- package/lib/codec/RingbufferAddCodec.d.ts +7 -0
- package/lib/codec/RingbufferAddCodec.js +58 -0
- package/lib/codec/RingbufferCapacityCodec.d.ts +7 -0
- package/lib/codec/RingbufferCapacityCodec.js +54 -0
- package/lib/codec/RingbufferHeadSequenceCodec.d.ts +7 -0
- package/lib/codec/RingbufferHeadSequenceCodec.js +54 -0
- package/lib/codec/RingbufferMessageType.d.ts +11 -0
- package/lib/codec/RingbufferMessageType.js +33 -0
- package/lib/codec/RingbufferReadManyCodec.d.ts +7 -0
- package/lib/codec/RingbufferReadManyCodec.js +92 -0
- package/lib/codec/RingbufferReadOneCodec.d.ts +7 -0
- package/lib/codec/RingbufferReadOneCodec.js +58 -0
- package/lib/codec/RingbufferRemainingCapacityCodec.d.ts +7 -0
- package/lib/codec/RingbufferRemainingCapacityCodec.js +54 -0
- package/lib/codec/RingbufferSizeCodec.d.ts +7 -0
- package/lib/codec/RingbufferSizeCodec.js +54 -0
- package/lib/codec/RingbufferTailSequenceCodec.d.ts +7 -0
- package/lib/codec/RingbufferTailSequenceCodec.js +54 -0
- package/lib/codec/SemaphoreAcquireCodec.d.ts +5 -0
- package/lib/codec/SemaphoreAcquireCodec.js +47 -0
- package/lib/codec/SemaphoreAvailablePermitsCodec.d.ts +7 -0
- package/lib/codec/SemaphoreAvailablePermitsCodec.js +54 -0
- package/lib/codec/SemaphoreDrainPermitsCodec.d.ts +7 -0
- package/lib/codec/SemaphoreDrainPermitsCodec.js +54 -0
- package/lib/codec/SemaphoreInitCodec.d.ts +7 -0
- package/lib/codec/SemaphoreInitCodec.js +56 -0
- package/lib/codec/SemaphoreMessageType.d.ts +9 -0
- package/lib/codec/SemaphoreMessageType.js +31 -0
- package/lib/codec/SemaphoreReducePermitsCodec.d.ts +5 -0
- package/lib/codec/SemaphoreReducePermitsCodec.js +47 -0
- package/lib/codec/SemaphoreReleaseCodec.d.ts +5 -0
- package/lib/codec/SemaphoreReleaseCodec.js +47 -0
- package/lib/codec/SemaphoreTryAcquireCodec.d.ts +7 -0
- package/lib/codec/SemaphoreTryAcquireCodec.js +58 -0
- package/lib/codec/SetAddAllCodec.d.ts +7 -0
- package/lib/codec/SetAddAllCodec.js +62 -0
- package/lib/codec/SetAddCodec.d.ts +7 -0
- package/lib/codec/SetAddCodec.js +56 -0
- package/lib/codec/SetAddListenerCodec.d.ts +8 -0
- package/lib/codec/SetAddListenerCodec.js +80 -0
- package/lib/codec/SetClearCodec.d.ts +5 -0
- package/lib/codec/SetClearCodec.js +45 -0
- package/lib/codec/SetCompareAndRemoveAllCodec.d.ts +7 -0
- package/lib/codec/SetCompareAndRemoveAllCodec.js +62 -0
- package/lib/codec/SetCompareAndRetainAllCodec.d.ts +7 -0
- package/lib/codec/SetCompareAndRetainAllCodec.js +62 -0
- package/lib/codec/SetContainsAllCodec.d.ts +7 -0
- package/lib/codec/SetContainsAllCodec.js +62 -0
- package/lib/codec/SetContainsCodec.d.ts +7 -0
- package/lib/codec/SetContainsCodec.js +56 -0
- package/lib/codec/SetGetAllCodec.d.ts +7 -0
- package/lib/codec/SetGetAllCodec.js +61 -0
- package/lib/codec/SetIsEmptyCodec.d.ts +7 -0
- package/lib/codec/SetIsEmptyCodec.js +54 -0
- package/lib/codec/SetMessageType.d.ts +15 -0
- package/lib/codec/SetMessageType.js +37 -0
- package/lib/codec/SetRemoveCodec.d.ts +7 -0
- package/lib/codec/SetRemoveCodec.js +56 -0
- package/lib/codec/SetRemoveListenerCodec.d.ts +7 -0
- package/lib/codec/SetRemoveListenerCodec.js +56 -0
- package/lib/codec/SetSizeCodec.d.ts +7 -0
- package/lib/codec/SetSizeCodec.js +54 -0
- package/lib/codec/UUIDCodec.d.ts +5 -0
- package/lib/codec/UUIDCodec.js +29 -0
- package/lib/config/ClientCloudConfig.d.ts +13 -0
- package/lib/config/ClientCloudConfig.js +34 -0
- package/lib/config/ClientNetworkConfig.d.ts +43 -0
- package/lib/config/ClientNetworkConfig.js +64 -0
- package/lib/config/Config.d.ts +61 -0
- package/lib/config/Config.js +138 -0
- package/lib/config/ConfigBuilder.d.ts +26 -0
- package/lib/config/ConfigBuilder.js +322 -0
- package/lib/config/ConfigPatternMatcher.d.ts +12 -0
- package/lib/config/ConfigPatternMatcher.js +70 -0
- package/lib/config/EvictionPolicy.d.ts +9 -0
- package/lib/config/EvictionPolicy.js +27 -0
- package/lib/config/FlakeIdGeneratorConfig.d.ts +26 -0
- package/lib/config/FlakeIdGeneratorConfig.js +56 -0
- package/lib/config/GroupConfig.d.ts +14 -0
- package/lib/config/GroupConfig.js +35 -0
- package/lib/config/ImportConfig.d.ts +4 -0
- package/lib/config/ImportConfig.js +17 -0
- package/lib/config/InMemoryFormat.d.ts +10 -0
- package/lib/config/InMemoryFormat.js +28 -0
- package/lib/config/JsonConfigLocator.d.ts +16 -0
- package/lib/config/JsonConfigLocator.js +103 -0
- package/lib/config/JsonStringDeserializationPolicy.d.ts +17 -0
- package/lib/config/JsonStringDeserializationPolicy.js +35 -0
- package/lib/config/ListenerConfig.d.ts +8 -0
- package/lib/config/ListenerConfig.js +33 -0
- package/lib/config/NearCacheConfig.d.ts +25 -0
- package/lib/config/NearCacheConfig.js +59 -0
- package/lib/config/Properties.d.ts +5 -0
- package/lib/config/Properties.js +17 -0
- package/lib/config/ReliableTopicConfig.d.ts +8 -0
- package/lib/config/ReliableTopicConfig.js +38 -0
- package/lib/config/SSLConfig.d.ts +34 -0
- package/lib/config/SSLConfig.js +51 -0
- package/lib/config/SerializationConfig.d.ts +29 -0
- package/lib/config/SerializationConfig.js +38 -0
- package/lib/config/StringSerializationPolicy.d.ts +22 -0
- package/lib/config/StringSerializationPolicy.js +40 -0
- package/lib/connection/AddressProvider.d.ts +11 -0
- package/lib/connection/AddressProvider.js +17 -0
- package/lib/connection/AddressTranslator.d.ts +21 -0
- package/lib/connection/AddressTranslator.js +17 -0
- package/lib/connection/BasicSSLOptionsFactory.d.ts +14 -0
- package/lib/connection/BasicSSLOptionsFactory.js +67 -0
- package/lib/connection/DefaultAddressProvider.d.ts +15 -0
- package/lib/connection/DefaultAddressProvider.js +38 -0
- package/lib/connection/DefaultAddressTranslator.d.ts +11 -0
- package/lib/connection/DefaultAddressTranslator.js +33 -0
- package/lib/connection/SSLOptionsFactory.d.ts +7 -0
- package/lib/connection/SSLOptionsFactory.js +17 -0
- package/lib/core/Comparator.d.ts +21 -0
- package/lib/core/Comparator.js +17 -0
- package/lib/core/ConnectionHeartbeatListener.d.ts +16 -0
- package/lib/core/ConnectionHeartbeatListener.js +17 -0
- package/lib/core/DistributedObjectListener.d.ts +24 -0
- package/lib/core/DistributedObjectListener.js +30 -0
- package/lib/core/EntryListener.d.ts +51 -0
- package/lib/core/EntryListener.js +32 -0
- package/lib/core/EntryView.d.ts +16 -0
- package/lib/core/EntryView.js +23 -0
- package/lib/core/EventType.d.ts +12 -0
- package/lib/core/EventType.js +31 -0
- package/lib/core/HazelcastJsonValue.d.ts +32 -0
- package/lib/core/HazelcastJsonValue.js +56 -0
- package/lib/core/ItemListener.d.ts +38 -0
- package/lib/core/ItemListener.js +35 -0
- package/lib/core/MapListener.d.ts +29 -0
- package/lib/core/MapListener.js +29 -0
- package/lib/core/Member.d.ts +23 -0
- package/lib/core/Member.js +44 -0
- package/lib/core/MemberAttributeEvent.d.ts +37 -0
- package/lib/core/MemberAttributeEvent.js +45 -0
- package/lib/core/MemberSelector.d.ts +4 -0
- package/lib/core/MemberSelector.js +17 -0
- package/lib/core/MemberSelectors.d.ts +8 -0
- package/lib/core/MemberSelectors.js +33 -0
- package/lib/core/MembershipEvent.d.ts +20 -0
- package/lib/core/MembershipEvent.js +30 -0
- package/lib/core/MembershipListener.d.ts +22 -0
- package/lib/core/MembershipListener.js +17 -0
- package/lib/core/OverflowPolicy.d.ts +4 -0
- package/lib/core/OverflowPolicy.js +22 -0
- package/lib/core/Predicate.d.ts +28 -0
- package/lib/core/Predicate.js +113 -0
- package/lib/core/ReadOnlyLazyList.d.ts +12 -0
- package/lib/core/ReadOnlyLazyList.js +74 -0
- package/lib/core/RestValue.d.ts +15 -0
- package/lib/core/RestValue.js +51 -0
- package/lib/core/UUID.d.ts +9 -0
- package/lib/core/UUID.js +44 -0
- package/lib/core/VectorClock.d.ts +7 -0
- package/lib/core/VectorClock.js +48 -0
- package/lib/discovery/HazelcastCloudAddressProvider.d.ts +10 -0
- package/lib/discovery/HazelcastCloudAddressProvider.js +35 -0
- package/lib/discovery/HazelcastCloudAddressTranslator.d.ts +13 -0
- package/lib/discovery/HazelcastCloudAddressTranslator.js +54 -0
- package/lib/discovery/HazelcastCloudDiscovery.d.ts +25 -0
- package/lib/discovery/HazelcastCloudDiscovery.js +85 -0
- package/lib/index.d.ts +26 -0
- package/lib/index.js +64 -0
- package/lib/invocation/ClientConnection.d.ts +82 -0
- package/lib/invocation/ClientConnection.js +307 -0
- package/lib/invocation/ClientConnectionManager.d.ts +56 -0
- package/lib/invocation/ClientConnectionManager.js +298 -0
- package/lib/invocation/ClientEventRegistration.d.ts +10 -0
- package/lib/invocation/ClientEventRegistration.js +30 -0
- package/lib/invocation/ClusterService.d.ts +99 -0
- package/lib/invocation/ClusterService.js +417 -0
- package/lib/invocation/ConnectionAuthenticator.d.ts +14 -0
- package/lib/invocation/ConnectionAuthenticator.js +88 -0
- package/lib/invocation/InvocationService.d.ts +138 -0
- package/lib/invocation/InvocationService.js +387 -0
- package/lib/invocation/Murmur.d.ts +2 -0
- package/lib/invocation/Murmur.js +65 -0
- package/lib/invocation/RegistrationKey.d.ts +16 -0
- package/lib/invocation/RegistrationKey.js +48 -0
- package/lib/logging/DefaultLogger.d.ts +12 -0
- package/lib/logging/DefaultLogger.js +48 -0
- package/lib/logging/ILogger.d.ts +49 -0
- package/lib/logging/ILogger.js +17 -0
- package/lib/logging/LoggingService.d.ts +16 -0
- package/lib/logging/LoggingService.js +50 -0
- package/lib/nearcache/AlwaysFreshStaleReadDetectorImpl.d.ts +10 -0
- package/lib/nearcache/AlwaysFreshStaleReadDetectorImpl.js +34 -0
- package/lib/nearcache/DataRecord.d.ts +33 -0
- package/lib/nearcache/DataRecord.js +109 -0
- package/lib/nearcache/MetadataContainer.d.ts +18 -0
- package/lib/nearcache/MetadataContainer.js +56 -0
- package/lib/nearcache/MetadataFetcher.d.ts +20 -0
- package/lib/nearcache/MetadataFetcher.js +92 -0
- package/lib/nearcache/NearCache.d.ts +89 -0
- package/lib/nearcache/NearCache.js +250 -0
- package/lib/nearcache/NearCacheManager.d.ts +13 -0
- package/lib/nearcache/NearCacheManager.js +50 -0
- package/lib/nearcache/RepairingHandler.d.ts +26 -0
- package/lib/nearcache/RepairingHandler.js +114 -0
- package/lib/nearcache/RepairingTask.d.ts +26 -0
- package/lib/nearcache/RepairingTask.js +117 -0
- package/lib/nearcache/StaleReadDetector.d.ts +7 -0
- package/lib/nearcache/StaleReadDetector.js +2 -0
- package/lib/nearcache/StaleReadDetectorImpl.d.ts +13 -0
- package/lib/nearcache/StaleReadDetectorImpl.js +35 -0
- package/lib/protocol/ClientProtocolErrorCodes.d.ts +91 -0
- package/lib/protocol/ClientProtocolErrorCodes.js +112 -0
- package/lib/protocol/ErrorCodec.d.ts +11 -0
- package/lib/protocol/ErrorCodec.js +50 -0
- package/lib/protocol/ErrorFactory.d.ts +8 -0
- package/lib/protocol/ErrorFactory.js +92 -0
- package/lib/protocol/StackTraceElementCodec.d.ts +8 -0
- package/lib/protocol/StackTraceElementCodec.js +38 -0
- package/lib/proxy/AtomicLongProxy.d.ts +17 -0
- package/lib/proxy/AtomicLongProxy.js +72 -0
- package/lib/proxy/BaseProxy.d.ts +89 -0
- package/lib/proxy/BaseProxy.js +191 -0
- package/lib/proxy/FlakeIdGenerator.d.ts +47 -0
- package/lib/proxy/FlakeIdGenerator.js +17 -0
- package/lib/proxy/FlakeIdGeneratorProxy.d.ts +13 -0
- package/lib/proxy/FlakeIdGeneratorProxy.js +48 -0
- package/lib/proxy/IAtomicLong.d.ts +16 -0
- package/lib/proxy/IAtomicLong.js +17 -0
- package/lib/proxy/IList.d.ts +132 -0
- package/lib/proxy/IList.js +17 -0
- package/lib/proxy/ILock.d.ts +54 -0
- package/lib/proxy/ILock.js +17 -0
- package/lib/proxy/IMap.d.ts +328 -0
- package/lib/proxy/IMap.js +17 -0
- package/lib/proxy/IQueue.d.ts +128 -0
- package/lib/proxy/IQueue.js +17 -0
- package/lib/proxy/ISemaphore.d.ts +53 -0
- package/lib/proxy/ISemaphore.js +17 -0
- package/lib/proxy/ISet.d.ts +89 -0
- package/lib/proxy/ISet.js +17 -0
- package/lib/proxy/ListProxy.d.ts +31 -0
- package/lib/proxy/ListProxy.js +165 -0
- package/lib/proxy/LockProxy.d.ts +16 -0
- package/lib/proxy/LockProxy.js +78 -0
- package/lib/proxy/MapProxy.d.ts +82 -0
- package/lib/proxy/MapProxy.js +651 -0
- package/lib/proxy/MultiMap.d.ts +153 -0
- package/lib/proxy/MultiMap.js +17 -0
- package/lib/proxy/MultiMapProxy.d.ts +33 -0
- package/lib/proxy/MultiMapProxy.js +238 -0
- package/lib/proxy/NearCachedMapProxy.d.ts +41 -0
- package/lib/proxy/NearCachedMapProxy.js +284 -0
- package/lib/proxy/PNCounter.d.ts +162 -0
- package/lib/proxy/PNCounter.js +17 -0
- package/lib/proxy/PNCounterProxy.d.ts +30 -0
- package/lib/proxy/PNCounterProxy.js +181 -0
- package/lib/proxy/PartitionSpecificProxy.d.ts +10 -0
- package/lib/proxy/PartitionSpecificProxy.js +52 -0
- package/lib/proxy/ProxyManager.d.ts +40 -0
- package/lib/proxy/ProxyManager.js +202 -0
- package/lib/proxy/QueueProxy.d.ts +28 -0
- package/lib/proxy/QueueProxy.js +198 -0
- package/lib/proxy/ReplicatedMap.d.ts +149 -0
- package/lib/proxy/ReplicatedMap.js +17 -0
- package/lib/proxy/ReplicatedMapProxy.d.ts +34 -0
- package/lib/proxy/ReplicatedMapProxy.js +256 -0
- package/lib/proxy/Ringbuffer.d.ts +115 -0
- package/lib/proxy/Ringbuffer.js +17 -0
- package/lib/proxy/SemaphoreProxy.d.ts +15 -0
- package/lib/proxy/SemaphoreProxy.js +73 -0
- package/lib/proxy/SetProxy.d.ts +22 -0
- package/lib/proxy/SetProxy.js +130 -0
- package/lib/proxy/flakeid/AutoBatcher.d.ts +30 -0
- package/lib/proxy/flakeid/AutoBatcher.js +104 -0
- package/lib/proxy/ringbuffer/LazyReadResultSet.d.ts +16 -0
- package/lib/proxy/ringbuffer/LazyReadResultSet.js +54 -0
- package/lib/proxy/ringbuffer/ReadResultSet.d.ts +41 -0
- package/lib/proxy/ringbuffer/ReadResultSet.js +17 -0
- package/lib/proxy/ringbuffer/RingbufferProxy.d.ts +19 -0
- package/lib/proxy/ringbuffer/RingbufferProxy.js +98 -0
- package/lib/proxy/topic/ITopic.d.ts +9 -0
- package/lib/proxy/topic/ITopic.js +17 -0
- package/lib/proxy/topic/Message.d.ts +8 -0
- package/lib/proxy/topic/Message.js +23 -0
- package/lib/proxy/topic/MessageListener.d.ts +2 -0
- package/lib/proxy/topic/MessageListener.js +2 -0
- package/lib/proxy/topic/ReliableTopicListenerRunner.d.ts +20 -0
- package/lib/proxy/topic/ReliableTopicListenerRunner.js +73 -0
- package/lib/proxy/topic/ReliableTopicMessage.d.ts +19 -0
- package/lib/proxy/topic/ReliableTopicMessage.js +53 -0
- package/lib/proxy/topic/ReliableTopicProxy.d.ts +31 -0
- package/lib/proxy/topic/ReliableTopicProxy.js +151 -0
- package/lib/proxy/topic/TopicOverloadPolicy.d.ts +23 -0
- package/lib/proxy/topic/TopicOverloadPolicy.js +41 -0
- package/lib/serialization/Data.d.ts +114 -0
- package/lib/serialization/Data.js +17 -0
- package/lib/serialization/DefaultPredicates.d.ts +131 -0
- package/lib/serialization/DefaultPredicates.js +465 -0
- package/lib/serialization/DefaultSerializer.d.ts +134 -0
- package/lib/serialization/DefaultSerializer.js +442 -0
- package/lib/serialization/HeapData.d.ts +44 -0
- package/lib/serialization/HeapData.js +104 -0
- package/lib/serialization/ObjectData.d.ts +102 -0
- package/lib/serialization/ObjectData.js +566 -0
- package/lib/serialization/PredicateFactory.d.ts +15 -0
- package/lib/serialization/PredicateFactory.js +46 -0
- package/lib/serialization/Serializable.d.ts +23 -0
- package/lib/serialization/Serializable.js +17 -0
- package/lib/serialization/SerializationService.d.ts +60 -0
- package/lib/serialization/SerializationService.js +312 -0
- package/lib/serialization/SerializationUtil.d.ts +3 -0
- package/lib/serialization/SerializationUtil.js +31 -0
- package/lib/serialization/portable/ClassDefinition.d.ts +54 -0
- package/lib/serialization/portable/ClassDefinition.js +140 -0
- package/lib/serialization/portable/ClassDefinitionBuilder.d.ts +35 -0
- package/lib/serialization/portable/ClassDefinitionBuilder.js +126 -0
- package/lib/serialization/portable/ClassDefinitionContext.d.ts +9 -0
- package/lib/serialization/portable/ClassDefinitionContext.js +51 -0
- package/lib/serialization/portable/ClassDefinitionWriter.d.ts +35 -0
- package/lib/serialization/portable/ClassDefinitionWriter.js +123 -0
- package/lib/serialization/portable/DefaultPortableReader.d.ts +43 -0
- package/lib/serialization/portable/DefaultPortableReader.js +188 -0
- package/lib/serialization/portable/DefaultPortableWriter.d.ts +37 -0
- package/lib/serialization/portable/DefaultPortableWriter.js +156 -0
- package/lib/serialization/portable/MorphingPortableReader.d.ts +31 -0
- package/lib/serialization/portable/MorphingPortableReader.js +189 -0
- package/lib/serialization/portable/PortableContext.d.ts +16 -0
- package/lib/serialization/portable/PortableContext.js +126 -0
- package/lib/serialization/portable/PortableSerializer.d.ts +68 -0
- package/lib/serialization/portable/PortableSerializer.js +94 -0
- package/lib/statistics/Statistics.d.ts +50 -0
- package/lib/statistics/Statistics.js +232 -0
- package/lib/util/ArrayComparator.d.ts +1 -0
- package/lib/util/ArrayComparator.js +17 -0
- package/lib/util/UuidUtil.d.ts +4 -0
- package/lib/util/UuidUtil.js +35 -0
- package/lib.es6.d.ts +18650 -0
- package/package.json +64 -0
- package/tsconfig.json +20 -0
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2008-2021, Hazelcast, Inc. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
var Promise = require("bluebird");
|
|
19
|
+
var ClientAddMembershipListenerCodec_1 = require("../codec/ClientAddMembershipListenerCodec");
|
|
20
|
+
var ClientInfo_1 = require("../ClientInfo");
|
|
21
|
+
var HazelcastError_1 = require("../HazelcastError");
|
|
22
|
+
var assert = require("assert");
|
|
23
|
+
var Util_1 = require("../Util");
|
|
24
|
+
var MemberAttributeEvent_1 = require("../core/MemberAttributeEvent");
|
|
25
|
+
var MembershipEvent_1 = require("../core/MembershipEvent");
|
|
26
|
+
var UuidUtil_1 = require("../util/UuidUtil");
|
|
27
|
+
var MemberEvent;
|
|
28
|
+
(function (MemberEvent) {
|
|
29
|
+
MemberEvent[MemberEvent["ADDED"] = 1] = "ADDED";
|
|
30
|
+
MemberEvent[MemberEvent["REMOVED"] = 2] = "REMOVED";
|
|
31
|
+
})(MemberEvent = exports.MemberEvent || (exports.MemberEvent = {}));
|
|
32
|
+
/**
|
|
33
|
+
* Manages the relationship of this client with the cluster.
|
|
34
|
+
*/
|
|
35
|
+
var ClusterService = /** @class */ (function () {
|
|
36
|
+
function ClusterService(client) {
|
|
37
|
+
/**
|
|
38
|
+
* The unique identifier of the owner server node. This node is responsible for resource cleanup
|
|
39
|
+
*/
|
|
40
|
+
this.ownerUuid = null;
|
|
41
|
+
/**
|
|
42
|
+
* The unique identifier of this client instance. Assigned by owner node on authentication
|
|
43
|
+
*/
|
|
44
|
+
this.uuid = null;
|
|
45
|
+
this.knownAddresses = [];
|
|
46
|
+
this.members = [];
|
|
47
|
+
this.membershipListeners = new Map();
|
|
48
|
+
this.failoverInProgress = false;
|
|
49
|
+
this.lastFailoverAttempt = 0;
|
|
50
|
+
this.failoverCooldown = 5000; // 5 seconds cooldown between failover attempts
|
|
51
|
+
this.downAddresses = new Map(); // address -> timestamp when marked down
|
|
52
|
+
this.addressBlockDuration = 30000; // 30 seconds block duration for down addresses
|
|
53
|
+
this.client = client;
|
|
54
|
+
this.logger = this.client.getLoggingService().getLogger();
|
|
55
|
+
this.members = [];
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Starts cluster service.
|
|
59
|
+
* @returns
|
|
60
|
+
*/
|
|
61
|
+
ClusterService.prototype.start = function () {
|
|
62
|
+
this.initHeartbeatListener();
|
|
63
|
+
this.initConnectionListener();
|
|
64
|
+
return this.connectToCluster();
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Connects to cluster. It uses the addresses provided in the configuration.
|
|
68
|
+
* @returns
|
|
69
|
+
*/
|
|
70
|
+
ClusterService.prototype.connectToCluster = function () {
|
|
71
|
+
var _this = this;
|
|
72
|
+
return this.getPossibleMemberAddresses().then(function (res) {
|
|
73
|
+
_this.knownAddresses = [];
|
|
74
|
+
res.forEach(function (value) {
|
|
75
|
+
_this.knownAddresses = _this.knownAddresses.concat(Util_1.AddressHelper.getSocketAddresses(value));
|
|
76
|
+
});
|
|
77
|
+
var attemptLimit = _this.client.getConfig().networkConfig.connectionAttemptLimit;
|
|
78
|
+
var attemptPeriod = _this.client.getConfig().networkConfig.connectionAttemptPeriod;
|
|
79
|
+
return _this.tryConnectingToAddresses(0, attemptLimit, attemptPeriod);
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
ClusterService.prototype.getPossibleMemberAddresses = function () {
|
|
83
|
+
var _this = this;
|
|
84
|
+
var addresses = new Set();
|
|
85
|
+
this.getMembers().forEach(function (member) {
|
|
86
|
+
addresses.add(member.address.toString());
|
|
87
|
+
});
|
|
88
|
+
var providerAddresses = new Set();
|
|
89
|
+
var promises = [];
|
|
90
|
+
this.client.getConnectionManager().addressProviders.forEach(function (addressProvider) {
|
|
91
|
+
promises.push(addressProvider.loadAddresses().then(function (res) {
|
|
92
|
+
providerAddresses = new Set(Array.from(providerAddresses).concat(res));
|
|
93
|
+
}).catch(function (err) {
|
|
94
|
+
_this.logger.warn('Error from AddressProvider: ' + addressProvider, err);
|
|
95
|
+
}));
|
|
96
|
+
});
|
|
97
|
+
return Promise.all(promises).then(function () {
|
|
98
|
+
return Array.from(new Set(Array.from(addresses).concat(Array.from(providerAddresses))));
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* Returns the list of members in the cluster.
|
|
103
|
+
* @returns
|
|
104
|
+
*/
|
|
105
|
+
ClusterService.prototype.getMembers = function (selector) {
|
|
106
|
+
if (selector === undefined) {
|
|
107
|
+
return this.members;
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
var members_1 = [];
|
|
111
|
+
this.members.forEach(function (member) {
|
|
112
|
+
if (selector.select(member)) {
|
|
113
|
+
members_1.push(member);
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
return members_1;
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
ClusterService.prototype.getMember = function (uuid) {
|
|
120
|
+
for (var _i = 0, _a = this.members; _i < _a.length; _i++) {
|
|
121
|
+
var member = _a[_i];
|
|
122
|
+
if (member.uuid === uuid) {
|
|
123
|
+
return member;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return null;
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Returns the number of nodes in cluster.
|
|
130
|
+
* @returns {number}
|
|
131
|
+
*/
|
|
132
|
+
ClusterService.prototype.getSize = function () {
|
|
133
|
+
return this.members.length;
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* Returns information about this client.
|
|
137
|
+
* @returns {ClientInfo}
|
|
138
|
+
*/
|
|
139
|
+
ClusterService.prototype.getClientInfo = function () {
|
|
140
|
+
var info = new ClientInfo_1.ClientInfo();
|
|
141
|
+
info.uuid = this.uuid;
|
|
142
|
+
info.localAddress = this.getOwnerConnection().getLocalAddress();
|
|
143
|
+
return info;
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* Returns the connection associated with owner node of this client.
|
|
147
|
+
* @returns {ClientConnection}
|
|
148
|
+
*/
|
|
149
|
+
ClusterService.prototype.getOwnerConnection = function () {
|
|
150
|
+
return this.ownerConnection;
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* Adds MembershipListener to listen for membership updates. There is no check for duplicate registrations,
|
|
154
|
+
* so if you register the listener twice, it will get events twice.
|
|
155
|
+
* @param {MembershipListener} The listener to be registered
|
|
156
|
+
* @return The registration ID
|
|
157
|
+
*/
|
|
158
|
+
ClusterService.prototype.addMembershipListener = function (membershipListener) {
|
|
159
|
+
var registrationId = UuidUtil_1.UuidUtil.generate().toString();
|
|
160
|
+
this.membershipListeners.set(registrationId, membershipListener);
|
|
161
|
+
return registrationId;
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* Removes registered MembershipListener.
|
|
165
|
+
* @param {string} The registration ID
|
|
166
|
+
* @return {boolean} true if successfully removed, false otherwise
|
|
167
|
+
*/
|
|
168
|
+
ClusterService.prototype.removeMembershipListener = function (registrationId) {
|
|
169
|
+
if (registrationId === null) {
|
|
170
|
+
throw new RangeError('registrationId cannot be null');
|
|
171
|
+
}
|
|
172
|
+
return this.membershipListeners.delete(registrationId);
|
|
173
|
+
};
|
|
174
|
+
ClusterService.prototype.initMembershipListener = function () {
|
|
175
|
+
var _this = this;
|
|
176
|
+
var request = ClientAddMembershipListenerCodec_1.ClientAddMembershipListenerCodec.encodeRequest(false);
|
|
177
|
+
var handler = function (m) {
|
|
178
|
+
var handleMember = _this.handleMember.bind(_this);
|
|
179
|
+
var handleMemberList = _this.handleMemberList.bind(_this);
|
|
180
|
+
var handleAttributeChange = _this.handleMemberAttributeChange.bind(_this);
|
|
181
|
+
ClientAddMembershipListenerCodec_1.ClientAddMembershipListenerCodec.handle(m, handleMember, handleMemberList, handleAttributeChange, null);
|
|
182
|
+
};
|
|
183
|
+
return this.client.getInvocationService().invokeOnConnection(this.getOwnerConnection(), request, handler)
|
|
184
|
+
.then(function (resp) {
|
|
185
|
+
_this.logger.trace('ClusterService', 'Registered listener with id '
|
|
186
|
+
+ ClientAddMembershipListenerCodec_1.ClientAddMembershipListenerCodec.decodeResponse(resp).response);
|
|
187
|
+
});
|
|
188
|
+
};
|
|
189
|
+
ClusterService.prototype.initHeartbeatListener = function () {
|
|
190
|
+
this.client.getHeartbeat().addListener({
|
|
191
|
+
onHeartbeatStopped: this.onHeartbeatStopped.bind(this),
|
|
192
|
+
});
|
|
193
|
+
};
|
|
194
|
+
ClusterService.prototype.initConnectionListener = function () {
|
|
195
|
+
this.client.getConnectionManager().on('connectionClosed', this.onConnectionClosed.bind(this));
|
|
196
|
+
};
|
|
197
|
+
ClusterService.prototype.onConnectionClosed = function (connection) {
|
|
198
|
+
this.logger.warn('ClusterService', 'Connection closed to ' + connection.toString());
|
|
199
|
+
if (connection.isAuthenticatedAsOwner()) {
|
|
200
|
+
this.ownerConnection = null;
|
|
201
|
+
this.triggerFailover();
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
ClusterService.prototype.onHeartbeatStopped = function (connection) {
|
|
205
|
+
this.logger.warn('ClusterService', connection.toString() + ' stopped heartbeating.');
|
|
206
|
+
if (connection.isAuthenticatedAsOwner()) {
|
|
207
|
+
this.client.getConnectionManager().destroyConnection(connection.getAddress());
|
|
208
|
+
this.ownerConnection = null;
|
|
209
|
+
this.triggerFailover();
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
ClusterService.prototype.triggerFailover = function () {
|
|
213
|
+
var _this = this;
|
|
214
|
+
var now = Date.now();
|
|
215
|
+
if (this.failoverInProgress || (now - this.lastFailoverAttempt) < this.failoverCooldown) {
|
|
216
|
+
this.logger.debug('ClusterService', 'Failover already in progress or too soon since last attempt');
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
this.failoverInProgress = true;
|
|
220
|
+
this.lastFailoverAttempt = now;
|
|
221
|
+
this.logger.info('ClusterService', 'Starting failover process...');
|
|
222
|
+
// Clear any stale partition information
|
|
223
|
+
this.client.getPartitionService().clearPartitionTable();
|
|
224
|
+
// Attempt to reconnect to cluster
|
|
225
|
+
this.connectToCluster()
|
|
226
|
+
.then(function () {
|
|
227
|
+
_this.logger.info('ClusterService', 'Failover completed successfully');
|
|
228
|
+
})
|
|
229
|
+
.catch(function (error) {
|
|
230
|
+
_this.logger.error('ClusterService', 'Failover failed', error);
|
|
231
|
+
// If failover fails, shutdown the client to prevent further issues
|
|
232
|
+
_this.client.shutdown();
|
|
233
|
+
})
|
|
234
|
+
.finally(function () {
|
|
235
|
+
_this.failoverInProgress = false;
|
|
236
|
+
});
|
|
237
|
+
};
|
|
238
|
+
ClusterService.prototype.isAddressKnownDown = function (address) {
|
|
239
|
+
var addressStr = address.toString();
|
|
240
|
+
var downTime = this.downAddresses.get(addressStr);
|
|
241
|
+
if (!downTime) {
|
|
242
|
+
return false;
|
|
243
|
+
}
|
|
244
|
+
var now = Date.now();
|
|
245
|
+
var timeSinceDown = now - downTime;
|
|
246
|
+
// If address has been down for longer than block duration, unblock it
|
|
247
|
+
if (timeSinceDown > this.addressBlockDuration) {
|
|
248
|
+
this.logger.debug('ClusterService', "Unblocking address " + addressStr + " after " + this.addressBlockDuration + "ms");
|
|
249
|
+
this.downAddresses.delete(addressStr);
|
|
250
|
+
return false;
|
|
251
|
+
}
|
|
252
|
+
// Address is still blocked
|
|
253
|
+
var remainingBlockTime = this.addressBlockDuration - timeSinceDown;
|
|
254
|
+
this.logger.debug('ClusterService', "Address " + addressStr + " is blocked for " + remainingBlockTime + "ms more");
|
|
255
|
+
return true;
|
|
256
|
+
};
|
|
257
|
+
ClusterService.prototype.markAddressAsDown = function (address) {
|
|
258
|
+
var _this = this;
|
|
259
|
+
var addressStr = address.toString();
|
|
260
|
+
var now = Date.now();
|
|
261
|
+
this.downAddresses.set(addressStr, now);
|
|
262
|
+
this.logger.warn('ClusterService', "Marked address " + addressStr + " as down, will be blocked for " + this.addressBlockDuration + "ms");
|
|
263
|
+
// Schedule cleanup of this address after block duration
|
|
264
|
+
setTimeout(function () {
|
|
265
|
+
if (_this.downAddresses.has(addressStr)) {
|
|
266
|
+
_this.logger.info('ClusterService', "Unblocking address " + addressStr + " after block duration");
|
|
267
|
+
_this.downAddresses.delete(addressStr);
|
|
268
|
+
}
|
|
269
|
+
}, this.addressBlockDuration);
|
|
270
|
+
};
|
|
271
|
+
ClusterService.prototype.getDownAddressesInfo = function () {
|
|
272
|
+
var _this = this;
|
|
273
|
+
var now = Date.now();
|
|
274
|
+
var downInfo = [];
|
|
275
|
+
this.downAddresses.forEach(function (downTime, address) {
|
|
276
|
+
var timeSinceDown = now - downTime;
|
|
277
|
+
var remainingTime = Math.max(0, _this.addressBlockDuration - timeSinceDown);
|
|
278
|
+
downInfo.push(address + " (" + Math.ceil(remainingTime / 1000) + "s remaining)");
|
|
279
|
+
});
|
|
280
|
+
return downInfo.length > 0 ? downInfo.join(', ') : 'none';
|
|
281
|
+
};
|
|
282
|
+
ClusterService.prototype.tryConnectingToAddresses = function (index, remainingAttemptLimit, attemptPeriod, cause) {
|
|
283
|
+
var _this = this;
|
|
284
|
+
this.logger.debug('ClusterService', 'Trying to connect to addresses, remaining attempt limit: ' + remainingAttemptLimit
|
|
285
|
+
+ ', attempt period: ' + attemptPeriod + ', down addresses: ' + this.getDownAddressesInfo());
|
|
286
|
+
if (this.knownAddresses.length <= index) {
|
|
287
|
+
remainingAttemptLimit = remainingAttemptLimit - 1;
|
|
288
|
+
if (remainingAttemptLimit === 0) {
|
|
289
|
+
var errorMessage = 'Unable to connect to any of the following addresses: ' +
|
|
290
|
+
this.knownAddresses.map(function (element) {
|
|
291
|
+
return element.toString();
|
|
292
|
+
}).join(', ');
|
|
293
|
+
this.logger.debug('ClusterService', errorMessage);
|
|
294
|
+
var error = new HazelcastError_1.IllegalStateError(errorMessage, cause);
|
|
295
|
+
return Promise.reject(error);
|
|
296
|
+
}
|
|
297
|
+
else {
|
|
298
|
+
var deferred_1 = Util_1.DeferredPromise();
|
|
299
|
+
setTimeout(function () {
|
|
300
|
+
_this.tryConnectingToAddresses(0, remainingAttemptLimit, attemptPeriod).then(function () {
|
|
301
|
+
deferred_1.resolve();
|
|
302
|
+
}).catch(function (e) {
|
|
303
|
+
deferred_1.reject(e);
|
|
304
|
+
});
|
|
305
|
+
}, attemptPeriod);
|
|
306
|
+
return deferred_1.promise;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
var currentAddress_1 = this.knownAddresses[index];
|
|
311
|
+
// Skip addresses that are known to be down
|
|
312
|
+
if (this.isAddressKnownDown(currentAddress_1)) {
|
|
313
|
+
this.logger.debug('ClusterService', "Skipping known down address: " + currentAddress_1.toString());
|
|
314
|
+
return this.tryConnectingToAddresses(index + 1, remainingAttemptLimit, attemptPeriod, cause);
|
|
315
|
+
}
|
|
316
|
+
return this.client.getConnectionManager().getOrConnect(currentAddress_1, true).then(function (connection) {
|
|
317
|
+
connection.setAuthenticatedAsOwner(true);
|
|
318
|
+
_this.ownerConnection = connection;
|
|
319
|
+
_this.logger.info('ClusterService', "Successfully connected to owner node: " + currentAddress_1.toString());
|
|
320
|
+
return _this.initMembershipListener();
|
|
321
|
+
}).catch(function (e) {
|
|
322
|
+
_this.logger.warn('ClusterService', "Failed to connect to " + currentAddress_1.toString() + ":", e);
|
|
323
|
+
_this.markAddressAsDown(currentAddress_1);
|
|
324
|
+
return _this.tryConnectingToAddresses(index + 1, remainingAttemptLimit, attemptPeriod, e);
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
ClusterService.prototype.handleMember = function (member, eventType) {
|
|
329
|
+
if (eventType === MemberEvent.ADDED) {
|
|
330
|
+
this.logger.info('ClusterService', member.toString() + ' added to cluster');
|
|
331
|
+
this.memberAdded(member);
|
|
332
|
+
}
|
|
333
|
+
else if (eventType === MemberEvent.REMOVED) {
|
|
334
|
+
this.logger.info('ClusterService', member.toString() + ' removed from cluster');
|
|
335
|
+
this.memberRemoved(member);
|
|
336
|
+
}
|
|
337
|
+
this.client.getPartitionService().refresh();
|
|
338
|
+
};
|
|
339
|
+
ClusterService.prototype.handleMemberList = function (members) {
|
|
340
|
+
var prevMembers = this.members;
|
|
341
|
+
this.members = members;
|
|
342
|
+
this.client.getPartitionService().refresh();
|
|
343
|
+
this.logger.info('ClusterService', 'Members received.', this.members);
|
|
344
|
+
var events = this.detectMembershipEvents(prevMembers);
|
|
345
|
+
for (var _i = 0, events_1 = events; _i < events_1.length; _i++) {
|
|
346
|
+
var event = events_1[_i];
|
|
347
|
+
this.fireMembershipEvent(event);
|
|
348
|
+
}
|
|
349
|
+
};
|
|
350
|
+
ClusterService.prototype.detectMembershipEvents = function (prevMembers) {
|
|
351
|
+
var events = [];
|
|
352
|
+
var eventMembers = Array.from(this.members);
|
|
353
|
+
var addedMembers = [];
|
|
354
|
+
var deletedMembers = Array.from(prevMembers);
|
|
355
|
+
for (var _i = 0, _a = this.members; _i < _a.length; _i++) {
|
|
356
|
+
var member = _a[_i];
|
|
357
|
+
var idx = deletedMembers.findIndex(member.equals, member);
|
|
358
|
+
if (idx === -1) {
|
|
359
|
+
addedMembers.push(member);
|
|
360
|
+
}
|
|
361
|
+
else {
|
|
362
|
+
deletedMembers.splice(idx, 1);
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
// removal events should be added before added events
|
|
366
|
+
for (var _b = 0, deletedMembers_1 = deletedMembers; _b < deletedMembers_1.length; _b++) {
|
|
367
|
+
var member = deletedMembers_1[_b];
|
|
368
|
+
events.push(new MembershipEvent_1.MembershipEvent(member, MemberEvent.REMOVED, eventMembers));
|
|
369
|
+
}
|
|
370
|
+
for (var _c = 0, addedMembers_1 = addedMembers; _c < addedMembers_1.length; _c++) {
|
|
371
|
+
var member = addedMembers_1[_c];
|
|
372
|
+
events.push(new MembershipEvent_1.MembershipEvent(member, MemberEvent.ADDED, eventMembers));
|
|
373
|
+
}
|
|
374
|
+
return events;
|
|
375
|
+
};
|
|
376
|
+
ClusterService.prototype.fireMembershipEvent = function (membershipEvent) {
|
|
377
|
+
this.membershipListeners.forEach(function (membershipListener, registrationId) {
|
|
378
|
+
if (membershipEvent.eventType === MemberEvent.ADDED) {
|
|
379
|
+
if (membershipListener && membershipListener.memberAdded) {
|
|
380
|
+
membershipListener.memberAdded(membershipEvent);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
else if (membershipEvent.eventType === MemberEvent.REMOVED) {
|
|
384
|
+
if (membershipListener && membershipListener.memberRemoved) {
|
|
385
|
+
membershipListener.memberRemoved(membershipEvent);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
});
|
|
389
|
+
};
|
|
390
|
+
ClusterService.prototype.handleMemberAttributeChange = function (uuid, key, operationType, value) {
|
|
391
|
+
var _this = this;
|
|
392
|
+
this.membershipListeners.forEach(function (membershipListener, registrationId) {
|
|
393
|
+
if (membershipListener && membershipListener.memberAttributeChanged) {
|
|
394
|
+
var member = _this.getMember(uuid);
|
|
395
|
+
var memberAttributeEvent = new MemberAttributeEvent_1.MemberAttributeEvent(member, key, operationType, value);
|
|
396
|
+
membershipListener.memberAttributeChanged(memberAttributeEvent);
|
|
397
|
+
}
|
|
398
|
+
});
|
|
399
|
+
};
|
|
400
|
+
ClusterService.prototype.memberAdded = function (member) {
|
|
401
|
+
this.members.push(member);
|
|
402
|
+
var membershipEvent = new MembershipEvent_1.MembershipEvent(member, MemberEvent.ADDED, this.members);
|
|
403
|
+
this.fireMembershipEvent(membershipEvent);
|
|
404
|
+
};
|
|
405
|
+
ClusterService.prototype.memberRemoved = function (member) {
|
|
406
|
+
var memberIndex = this.members.findIndex(member.equals, member);
|
|
407
|
+
if (memberIndex !== -1) {
|
|
408
|
+
var removedMemberList = this.members.splice(memberIndex, 1);
|
|
409
|
+
assert(removedMemberList.length === 1);
|
|
410
|
+
}
|
|
411
|
+
this.client.getConnectionManager().destroyConnection(member.address);
|
|
412
|
+
var membershipEvent = new MembershipEvent_1.MembershipEvent(member, MemberEvent.REMOVED, this.members);
|
|
413
|
+
this.fireMembershipEvent(membershipEvent);
|
|
414
|
+
};
|
|
415
|
+
return ClusterService;
|
|
416
|
+
}());
|
|
417
|
+
exports.ClusterService = ClusterService;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="bluebird" />
|
|
2
|
+
import * as Promise from 'bluebird';
|
|
3
|
+
import HazelcastClient from '../HazelcastClient';
|
|
4
|
+
import { ClientConnection } from './ClientConnection';
|
|
5
|
+
import ClientMessage = require('../ClientMessage');
|
|
6
|
+
export declare class ConnectionAuthenticator {
|
|
7
|
+
private connection;
|
|
8
|
+
private client;
|
|
9
|
+
private clusterService;
|
|
10
|
+
private logger;
|
|
11
|
+
constructor(connection: ClientConnection, client: HazelcastClient);
|
|
12
|
+
authenticate(asOwner: boolean): Promise<void>;
|
|
13
|
+
createCredentials(asOwner: boolean): ClientMessage;
|
|
14
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2008-2021, Hazelcast, Inc. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
var ClientAuthenticationCodec_1 = require("../codec/ClientAuthenticationCodec");
|
|
19
|
+
var ClientAuthenticationCustomCodec_1 = require("../codec/ClientAuthenticationCustomCodec");
|
|
20
|
+
var HazelcastError_1 = require("../HazelcastError");
|
|
21
|
+
var BuildInfo_1 = require("../BuildInfo");
|
|
22
|
+
var AuthenticationStatus;
|
|
23
|
+
(function (AuthenticationStatus) {
|
|
24
|
+
AuthenticationStatus[AuthenticationStatus["AUTHENTICATED"] = 0] = "AUTHENTICATED";
|
|
25
|
+
AuthenticationStatus[AuthenticationStatus["CREDENTIALS_FAILED"] = 1] = "CREDENTIALS_FAILED";
|
|
26
|
+
AuthenticationStatus[AuthenticationStatus["SERIALIZATION_VERSION_MISMATCH"] = 2] = "SERIALIZATION_VERSION_MISMATCH";
|
|
27
|
+
})(AuthenticationStatus || (AuthenticationStatus = {}));
|
|
28
|
+
var ConnectionAuthenticator = /** @class */ (function () {
|
|
29
|
+
function ConnectionAuthenticator(connection, client) {
|
|
30
|
+
this.connection = connection;
|
|
31
|
+
this.client = client;
|
|
32
|
+
this.logger = this.client.getLoggingService().getLogger();
|
|
33
|
+
this.clusterService = this.client.getClusterService();
|
|
34
|
+
}
|
|
35
|
+
ConnectionAuthenticator.prototype.authenticate = function (asOwner) {
|
|
36
|
+
var _this = this;
|
|
37
|
+
var credentials = this.createCredentials(asOwner);
|
|
38
|
+
return this.client.getInvocationService()
|
|
39
|
+
.invokeOnConnection(this.connection, credentials)
|
|
40
|
+
.then(function (msg) {
|
|
41
|
+
var authResponse = ClientAuthenticationCodec_1.ClientAuthenticationCodec.decodeResponse(msg);
|
|
42
|
+
switch (authResponse.status) {
|
|
43
|
+
case 0 /* AUTHENTICATED */:
|
|
44
|
+
_this.connection.setAddress(authResponse.address);
|
|
45
|
+
_this.connection.setConnectedServerVersion(authResponse.serverHazelcastVersion);
|
|
46
|
+
if (asOwner) {
|
|
47
|
+
_this.clusterService.uuid = authResponse.uuid;
|
|
48
|
+
_this.clusterService.ownerUuid = authResponse.ownerUuid;
|
|
49
|
+
}
|
|
50
|
+
_this.logger.info('ConnectionAuthenticator', 'Connection to ' +
|
|
51
|
+
_this.connection.getAddress().toString() + ' authenticated');
|
|
52
|
+
break;
|
|
53
|
+
case 1 /* CREDENTIALS_FAILED */:
|
|
54
|
+
_this.logger.error('ConnectionAuthenticator', 'Invalid Credentials');
|
|
55
|
+
throw new Error('Invalid Credentials, could not authenticate connection to ' +
|
|
56
|
+
_this.connection.getAddress().toString());
|
|
57
|
+
case 2 /* SERIALIZATION_VERSION_MISMATCH */:
|
|
58
|
+
_this.logger.error('ConnectionAuthenticator', 'Serialization version mismatch');
|
|
59
|
+
throw new Error('Serialization version mismatch, could not authenticate connection to ' +
|
|
60
|
+
_this.connection.getAddress().toString());
|
|
61
|
+
default:
|
|
62
|
+
_this.logger.error('ConnectionAuthenticator', 'Unknown authentication status: '
|
|
63
|
+
+ authResponse.status);
|
|
64
|
+
throw new HazelcastError_1.AuthenticationError('Unknown authentication status: ' + authResponse.status +
|
|
65
|
+
' , could not authenticate connection to ' +
|
|
66
|
+
_this.connection.getAddress().toString());
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
ConnectionAuthenticator.prototype.createCredentials = function (asOwner) {
|
|
71
|
+
var groupConfig = this.client.getConfig().groupConfig;
|
|
72
|
+
var uuid = this.clusterService.uuid;
|
|
73
|
+
var ownerUuid = this.clusterService.ownerUuid;
|
|
74
|
+
var customCredentials = this.client.getConfig().customCredentials;
|
|
75
|
+
var clientMessage;
|
|
76
|
+
var clientVersion = BuildInfo_1.BuildInfo.getClientVersion();
|
|
77
|
+
if (customCredentials != null) {
|
|
78
|
+
var credentialsPayload = this.client.getSerializationService().toData(customCredentials);
|
|
79
|
+
clientMessage = ClientAuthenticationCustomCodec_1.ClientAuthenticationCustomCodec.encodeRequest(credentialsPayload, uuid, ownerUuid, asOwner, 'NJS', 1, clientVersion);
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
clientMessage = ClientAuthenticationCodec_1.ClientAuthenticationCodec.encodeRequest(groupConfig.name, groupConfig.password, uuid, ownerUuid, asOwner, 'NJS', 1, clientVersion);
|
|
83
|
+
}
|
|
84
|
+
return clientMessage;
|
|
85
|
+
};
|
|
86
|
+
return ConnectionAuthenticator;
|
|
87
|
+
}());
|
|
88
|
+
exports.ConnectionAuthenticator = ConnectionAuthenticator;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/// <reference types="bluebird" />
|
|
2
|
+
import { Buffer } from 'safe-buffer';
|
|
3
|
+
import * as Promise from 'bluebird';
|
|
4
|
+
import HazelcastClient from '../HazelcastClient';
|
|
5
|
+
import { ClientConnection } from './ClientConnection';
|
|
6
|
+
import Address = require('../Address');
|
|
7
|
+
import ClientMessage = require('../ClientMessage');
|
|
8
|
+
/**
|
|
9
|
+
* A request to be sent to a hazelcast node.
|
|
10
|
+
*/
|
|
11
|
+
export declare class Invocation {
|
|
12
|
+
client: HazelcastClient;
|
|
13
|
+
invocationService: InvocationService;
|
|
14
|
+
/**
|
|
15
|
+
* Representatiton of the request in binary form.
|
|
16
|
+
*/
|
|
17
|
+
request: ClientMessage;
|
|
18
|
+
/**
|
|
19
|
+
* Partition id of the request. If request is not bound to a specific partition, should be set to -1.
|
|
20
|
+
*/
|
|
21
|
+
partitionId: number;
|
|
22
|
+
/**
|
|
23
|
+
* Address of the request. If request is not bound to any specific address, should be set to null.
|
|
24
|
+
*/
|
|
25
|
+
address: Address;
|
|
26
|
+
/**
|
|
27
|
+
* Deadline of validity. Client will not try to send this request to server after the deadline passes.
|
|
28
|
+
*/
|
|
29
|
+
deadline: number;
|
|
30
|
+
/**
|
|
31
|
+
* Connection of the request. If request is not bound to any specific address, should be set to null.
|
|
32
|
+
*/
|
|
33
|
+
connection: ClientConnection;
|
|
34
|
+
/**
|
|
35
|
+
* Connection on which the request was written. May be different from `connection`.
|
|
36
|
+
*/
|
|
37
|
+
sendConnection: ClientConnection;
|
|
38
|
+
/**
|
|
39
|
+
* Promise managing object.
|
|
40
|
+
*/
|
|
41
|
+
deferred: Promise.Resolver<ClientMessage>;
|
|
42
|
+
invokeCount: number;
|
|
43
|
+
/**
|
|
44
|
+
* If this is an event listener registration, handler should be set to the function to be called on events.
|
|
45
|
+
* Otherwise, should be set to null.
|
|
46
|
+
*/
|
|
47
|
+
handler: (...args: any[]) => any;
|
|
48
|
+
constructor(client: HazelcastClient, request: ClientMessage, timeoutMillis?: number);
|
|
49
|
+
private static isRetrySafeError(err);
|
|
50
|
+
shouldRetry(err: Error): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* @returns {boolean}
|
|
53
|
+
*/
|
|
54
|
+
hasPartitionId(): boolean;
|
|
55
|
+
isAllowedToRetryOnSelection(err: Error): boolean;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Sends requests to appropriate nodes. Resolves waiting promises with responses.
|
|
59
|
+
*/
|
|
60
|
+
export declare class InvocationService {
|
|
61
|
+
doInvoke: (invocation: Invocation) => void;
|
|
62
|
+
private correlationCounter;
|
|
63
|
+
private readonly eventHandlers;
|
|
64
|
+
private readonly pending;
|
|
65
|
+
private client;
|
|
66
|
+
private readonly invocationRetryPauseMillis;
|
|
67
|
+
private readonly invocationTimeoutMillis;
|
|
68
|
+
private readonly cleanResourcesMillis;
|
|
69
|
+
private readonly redoOperation;
|
|
70
|
+
private logger;
|
|
71
|
+
private cleanResourcesTask;
|
|
72
|
+
private isShutdown;
|
|
73
|
+
private readonly maxRetryAttempts;
|
|
74
|
+
private readonly partitionFailureBackoff;
|
|
75
|
+
constructor(hazelcastClient: HazelcastClient);
|
|
76
|
+
start(): void;
|
|
77
|
+
shutdown(): void;
|
|
78
|
+
redoOperationEnabled(): boolean;
|
|
79
|
+
invoke(invocation: Invocation): Promise<ClientMessage>;
|
|
80
|
+
/**
|
|
81
|
+
* Invokes given invocation on specified connection.
|
|
82
|
+
* @param connection
|
|
83
|
+
* @param request
|
|
84
|
+
* @param handler called with values returned from server for this invocation.
|
|
85
|
+
* @returns
|
|
86
|
+
*/
|
|
87
|
+
invokeOnConnection(connection: ClientConnection, request: ClientMessage, handler?: (...args: any[]) => any): Promise<ClientMessage>;
|
|
88
|
+
/**
|
|
89
|
+
* Invokes given invocation on the node that owns given partition.
|
|
90
|
+
* @param request
|
|
91
|
+
* @param partitionId
|
|
92
|
+
* @param timeoutMillis optional override for the invocation timeout
|
|
93
|
+
* @returns
|
|
94
|
+
*/
|
|
95
|
+
invokeOnPartition(request: ClientMessage, partitionId: number, timeoutMillis?: number): Promise<ClientMessage>;
|
|
96
|
+
/**
|
|
97
|
+
* Invokes given invocation on the host with given address.
|
|
98
|
+
* @param request
|
|
99
|
+
* @param target
|
|
100
|
+
* @returns
|
|
101
|
+
*/
|
|
102
|
+
invokeOnTarget(request: ClientMessage, target: Address): Promise<ClientMessage>;
|
|
103
|
+
/**
|
|
104
|
+
* Invokes given invocation on any host.
|
|
105
|
+
* Useful when an operation is not bound to any host but a generic operation.
|
|
106
|
+
* @param request
|
|
107
|
+
* @returns
|
|
108
|
+
*/
|
|
109
|
+
invokeOnRandomTarget(request: ClientMessage): Promise<ClientMessage>;
|
|
110
|
+
getInvocationTimeoutMillis(): number;
|
|
111
|
+
getInvocationRetryPauseMillis(): number;
|
|
112
|
+
/**
|
|
113
|
+
* Removes the handler for all event handlers with a specific correlation id.
|
|
114
|
+
* @param id correlation id
|
|
115
|
+
*/
|
|
116
|
+
removeEventHandler(id: number): void;
|
|
117
|
+
/**
|
|
118
|
+
* Extract codec specific properties in a protocol message and resolves waiting promise.
|
|
119
|
+
* @param buffer
|
|
120
|
+
*/
|
|
121
|
+
processResponse(buffer: Buffer): void;
|
|
122
|
+
private scheduleCleanResourcesTask(periodMillis);
|
|
123
|
+
private invokeSmart(invocation);
|
|
124
|
+
private invokeNonSmart(invocation);
|
|
125
|
+
private invokeOnOwner(invocation);
|
|
126
|
+
private invokeOnAddress(invocation, address);
|
|
127
|
+
private invokeOnPartitionOwner(invocation, partitionId);
|
|
128
|
+
private send(invocation, connection);
|
|
129
|
+
private notifyError(invocation, error);
|
|
130
|
+
/**
|
|
131
|
+
* Determines if an error is retryable. The given invocation is rejected with approprate error if the error is not retryable.
|
|
132
|
+
* @param invocation
|
|
133
|
+
* @param error
|
|
134
|
+
* @returns `true` if invocation is rejected, `false` otherwise
|
|
135
|
+
*/
|
|
136
|
+
private rejectIfNotRetryable(invocation, error);
|
|
137
|
+
private registerInvocation(invocation);
|
|
138
|
+
}
|