@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,10 @@
|
|
|
1
|
+
/// <reference types="bluebird" />
|
|
2
|
+
import * as Promise from 'bluebird';
|
|
3
|
+
import HazelcastClient from '../HazelcastClient';
|
|
4
|
+
import { BaseProxy } from './BaseProxy';
|
|
5
|
+
export declare class PartitionSpecificProxy extends BaseProxy {
|
|
6
|
+
private partitionId;
|
|
7
|
+
constructor(client: HazelcastClient, serviceName: string, name: string);
|
|
8
|
+
protected encodeInvoke<T>(codec: any, ...codecArguments: any[]): Promise<T>;
|
|
9
|
+
protected encodeInvokeWithTimeout<T>(timeoutMillis: number, codec: any, ...codecArguments: any[]): Promise<T>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
var __extends = (this && this.__extends) || (function () {
|
|
18
|
+
var extendStatics = Object.setPrototypeOf ||
|
|
19
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
20
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
21
|
+
return function (d, b) {
|
|
22
|
+
extendStatics(d, b);
|
|
23
|
+
function __() { this.constructor = d; }
|
|
24
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
25
|
+
};
|
|
26
|
+
})();
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
var BaseProxy_1 = require("./BaseProxy");
|
|
29
|
+
var PartitionSpecificProxy = /** @class */ (function (_super) {
|
|
30
|
+
__extends(PartitionSpecificProxy, _super);
|
|
31
|
+
function PartitionSpecificProxy(client, serviceName, name) {
|
|
32
|
+
var _this = _super.call(this, client, serviceName, name) || this;
|
|
33
|
+
_this.partitionId = _this.client.getPartitionService().getPartitionId(_this.getPartitionKey());
|
|
34
|
+
return _this;
|
|
35
|
+
}
|
|
36
|
+
PartitionSpecificProxy.prototype.encodeInvoke = function (codec) {
|
|
37
|
+
var codecArguments = [];
|
|
38
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
39
|
+
codecArguments[_i - 1] = arguments[_i];
|
|
40
|
+
}
|
|
41
|
+
return this.encodeInvokeOnPartition.apply(this, [codec, this.partitionId].concat(codecArguments));
|
|
42
|
+
};
|
|
43
|
+
PartitionSpecificProxy.prototype.encodeInvokeWithTimeout = function (timeoutMillis, codec) {
|
|
44
|
+
var codecArguments = [];
|
|
45
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
46
|
+
codecArguments[_i - 2] = arguments[_i];
|
|
47
|
+
}
|
|
48
|
+
return this.encodeInvokeOnPartitionWithTimeout.apply(this, [timeoutMillis, codec, this.partitionId].concat(codecArguments));
|
|
49
|
+
};
|
|
50
|
+
return PartitionSpecificProxy;
|
|
51
|
+
}(BaseProxy_1.BaseProxy));
|
|
52
|
+
exports.PartitionSpecificProxy = PartitionSpecificProxy;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/// <reference types="bluebird" />
|
|
2
|
+
import * as Promise from 'bluebird';
|
|
3
|
+
import { DistributedObject } from '../DistributedObject';
|
|
4
|
+
import HazelcastClient from '../HazelcastClient';
|
|
5
|
+
import { HazelcastError } from '../HazelcastError';
|
|
6
|
+
import { DistributedObjectListener } from '../core/DistributedObjectListener';
|
|
7
|
+
export declare class ProxyManager {
|
|
8
|
+
static readonly MAP_SERVICE: string;
|
|
9
|
+
static readonly SET_SERVICE: string;
|
|
10
|
+
static readonly LOCK_SERVICE: string;
|
|
11
|
+
static readonly QUEUE_SERVICE: string;
|
|
12
|
+
static readonly LIST_SERVICE: string;
|
|
13
|
+
static readonly MULTIMAP_SERVICE: string;
|
|
14
|
+
static readonly RINGBUFFER_SERVICE: string;
|
|
15
|
+
static readonly REPLICATEDMAP_SERVICE: string;
|
|
16
|
+
static readonly SEMAPHORE_SERVICE: string;
|
|
17
|
+
static readonly ATOMICLONG_SERVICE: string;
|
|
18
|
+
static readonly FLAKEID_SERVICE: string;
|
|
19
|
+
static readonly PNCOUNTER_SERVICE: string;
|
|
20
|
+
static readonly RELIABLETOPIC_SERVICE: string;
|
|
21
|
+
readonly service: {
|
|
22
|
+
[serviceName: string]: any;
|
|
23
|
+
};
|
|
24
|
+
private readonly proxies;
|
|
25
|
+
private readonly client;
|
|
26
|
+
private readonly logger;
|
|
27
|
+
private readonly invocationTimeoutMillis;
|
|
28
|
+
private readonly invocationRetryPauseMillis;
|
|
29
|
+
constructor(client: HazelcastClient);
|
|
30
|
+
init(): void;
|
|
31
|
+
getOrCreateProxy(name: string, serviceName: string, createAtServer?: boolean): Promise<DistributedObject>;
|
|
32
|
+
destroyProxy(name: string, serviceName: string): Promise<void>;
|
|
33
|
+
addDistributedObjectListener(distributedObjectListener: DistributedObjectListener): Promise<string>;
|
|
34
|
+
removeDistributedObjectListener(listenerId: string): Promise<boolean>;
|
|
35
|
+
protected isRetryable(error: HazelcastError): boolean;
|
|
36
|
+
private createProxy(proxyObject);
|
|
37
|
+
private findNextAddress();
|
|
38
|
+
private initializeProxy(proxyObject, promise, deadline);
|
|
39
|
+
private createDistributedObjectListener();
|
|
40
|
+
}
|
|
@@ -0,0 +1,202 @@
|
|
|
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 ClientAddDistributedObjectListenerCodec_1 = require("../codec/ClientAddDistributedObjectListenerCodec");
|
|
19
|
+
var ClientCreateProxyCodec_1 = require("../codec/ClientCreateProxyCodec");
|
|
20
|
+
var ClientDestroyProxyCodec_1 = require("../codec/ClientDestroyProxyCodec");
|
|
21
|
+
var ClientRemoveDistributedObjectListenerCodec_1 = require("../codec/ClientRemoveDistributedObjectListenerCodec");
|
|
22
|
+
var HazelcastError_1 = require("../HazelcastError");
|
|
23
|
+
var InvocationService_1 = require("../invocation/InvocationService");
|
|
24
|
+
var AtomicLongProxy_1 = require("./AtomicLongProxy");
|
|
25
|
+
var FlakeIdGeneratorProxy_1 = require("./FlakeIdGeneratorProxy");
|
|
26
|
+
var ListProxy_1 = require("./ListProxy");
|
|
27
|
+
var LockProxy_1 = require("./LockProxy");
|
|
28
|
+
var MapProxy_1 = require("./MapProxy");
|
|
29
|
+
var MultiMapProxy_1 = require("./MultiMapProxy");
|
|
30
|
+
var NearCachedMapProxy_1 = require("./NearCachedMapProxy");
|
|
31
|
+
var PNCounterProxy_1 = require("./PNCounterProxy");
|
|
32
|
+
var QueueProxy_1 = require("./QueueProxy");
|
|
33
|
+
var ReplicatedMapProxy_1 = require("./ReplicatedMapProxy");
|
|
34
|
+
var RingbufferProxy_1 = require("./ringbuffer/RingbufferProxy");
|
|
35
|
+
var SemaphoreProxy_1 = require("./SemaphoreProxy");
|
|
36
|
+
var SetProxy_1 = require("./SetProxy");
|
|
37
|
+
var ReliableTopicProxy_1 = require("./topic/ReliableTopicProxy");
|
|
38
|
+
var DistributedObjectListener_1 = require("../core/DistributedObjectListener");
|
|
39
|
+
var Util_1 = require("../Util");
|
|
40
|
+
var ProxyManager = /** @class */ (function () {
|
|
41
|
+
function ProxyManager(client) {
|
|
42
|
+
this.service = {};
|
|
43
|
+
this.proxies = {};
|
|
44
|
+
this.client = client;
|
|
45
|
+
this.logger = this.client.getLoggingService().getLogger();
|
|
46
|
+
this.invocationTimeoutMillis = this.client.getInvocationService().getInvocationTimeoutMillis();
|
|
47
|
+
this.invocationRetryPauseMillis = this.client.getInvocationService().getInvocationRetryPauseMillis();
|
|
48
|
+
}
|
|
49
|
+
ProxyManager.prototype.init = function () {
|
|
50
|
+
this.service[ProxyManager.MAP_SERVICE] = MapProxy_1.MapProxy;
|
|
51
|
+
this.service[ProxyManager.SET_SERVICE] = SetProxy_1.SetProxy;
|
|
52
|
+
this.service[ProxyManager.QUEUE_SERVICE] = QueueProxy_1.QueueProxy;
|
|
53
|
+
this.service[ProxyManager.LIST_SERVICE] = ListProxy_1.ListProxy;
|
|
54
|
+
this.service[ProxyManager.LOCK_SERVICE] = LockProxy_1.LockProxy;
|
|
55
|
+
this.service[ProxyManager.MULTIMAP_SERVICE] = MultiMapProxy_1.MultiMapProxy;
|
|
56
|
+
this.service[ProxyManager.RINGBUFFER_SERVICE] = RingbufferProxy_1.RingbufferProxy;
|
|
57
|
+
this.service[ProxyManager.REPLICATEDMAP_SERVICE] = ReplicatedMapProxy_1.ReplicatedMapProxy;
|
|
58
|
+
this.service[ProxyManager.SEMAPHORE_SERVICE] = SemaphoreProxy_1.SemaphoreProxy;
|
|
59
|
+
this.service[ProxyManager.ATOMICLONG_SERVICE] = AtomicLongProxy_1.AtomicLongProxy;
|
|
60
|
+
this.service[ProxyManager.FLAKEID_SERVICE] = FlakeIdGeneratorProxy_1.FlakeIdGeneratorProxy;
|
|
61
|
+
this.service[ProxyManager.PNCOUNTER_SERVICE] = PNCounterProxy_1.PNCounterProxy;
|
|
62
|
+
this.service[ProxyManager.RELIABLETOPIC_SERVICE] = ReliableTopicProxy_1.ReliableTopicProxy;
|
|
63
|
+
};
|
|
64
|
+
ProxyManager.prototype.getOrCreateProxy = function (name, serviceName, createAtServer) {
|
|
65
|
+
var _this = this;
|
|
66
|
+
if (createAtServer === void 0) { createAtServer = true; }
|
|
67
|
+
var fullName = serviceName + name;
|
|
68
|
+
if (this.proxies[fullName]) {
|
|
69
|
+
return this.proxies[fullName];
|
|
70
|
+
}
|
|
71
|
+
var deferred = Util_1.DeferredPromise();
|
|
72
|
+
var newProxy;
|
|
73
|
+
if (serviceName === ProxyManager.MAP_SERVICE && this.client.getConfig().getNearCacheConfig(name)) {
|
|
74
|
+
newProxy = new NearCachedMapProxy_1.NearCachedMapProxy(this.client, serviceName, name);
|
|
75
|
+
}
|
|
76
|
+
else if (serviceName === ProxyManager.RELIABLETOPIC_SERVICE) {
|
|
77
|
+
newProxy = new ReliableTopicProxy_1.ReliableTopicProxy(this.client, serviceName, name);
|
|
78
|
+
if (createAtServer) {
|
|
79
|
+
newProxy.setRingbuffer().then(function () {
|
|
80
|
+
return _this.createProxy(newProxy);
|
|
81
|
+
}).then(function () {
|
|
82
|
+
deferred.resolve(newProxy);
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
this.proxies[fullName] = deferred.promise;
|
|
86
|
+
return deferred.promise;
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
newProxy = new this.service[serviceName](this.client, serviceName, name);
|
|
90
|
+
}
|
|
91
|
+
if (createAtServer) {
|
|
92
|
+
this.createProxy(newProxy).then(function () {
|
|
93
|
+
deferred.resolve(newProxy);
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
this.proxies[fullName] = deferred.promise;
|
|
97
|
+
return deferred.promise;
|
|
98
|
+
};
|
|
99
|
+
ProxyManager.prototype.destroyProxy = function (name, serviceName) {
|
|
100
|
+
delete this.proxies[serviceName + name];
|
|
101
|
+
var clientMessage = ClientDestroyProxyCodec_1.ClientDestroyProxyCodec.encodeRequest(name, serviceName);
|
|
102
|
+
clientMessage.setPartitionId(-1);
|
|
103
|
+
return this.client.getInvocationService().invokeOnRandomTarget(clientMessage).return();
|
|
104
|
+
};
|
|
105
|
+
ProxyManager.prototype.addDistributedObjectListener = function (distributedObjectListener) {
|
|
106
|
+
var handler = function (clientMessage) {
|
|
107
|
+
var converterFunc = function (objectName, serviceName, eventType) {
|
|
108
|
+
eventType = eventType.toLowerCase();
|
|
109
|
+
var distributedObjectEvent = new DistributedObjectListener_1.DistributedObjectEvent(eventType, serviceName, objectName);
|
|
110
|
+
distributedObjectListener(distributedObjectEvent);
|
|
111
|
+
};
|
|
112
|
+
ClientAddDistributedObjectListenerCodec_1.ClientAddDistributedObjectListenerCodec.handle(clientMessage, converterFunc, null);
|
|
113
|
+
};
|
|
114
|
+
var codec = this.createDistributedObjectListener();
|
|
115
|
+
return this.client.getListenerService().registerListener(codec, handler);
|
|
116
|
+
};
|
|
117
|
+
ProxyManager.prototype.removeDistributedObjectListener = function (listenerId) {
|
|
118
|
+
return this.client.getListenerService().deregisterListener(listenerId);
|
|
119
|
+
};
|
|
120
|
+
ProxyManager.prototype.isRetryable = function (error) {
|
|
121
|
+
if (error instanceof HazelcastError_1.ClientNotActiveError) {
|
|
122
|
+
return false;
|
|
123
|
+
}
|
|
124
|
+
return true;
|
|
125
|
+
};
|
|
126
|
+
ProxyManager.prototype.createProxy = function (proxyObject) {
|
|
127
|
+
var promise = Util_1.DeferredPromise();
|
|
128
|
+
this.initializeProxy(proxyObject, promise, Date.now() + this.invocationTimeoutMillis);
|
|
129
|
+
return promise.promise;
|
|
130
|
+
};
|
|
131
|
+
ProxyManager.prototype.findNextAddress = function () {
|
|
132
|
+
var members = this.client.getClusterService().getMembers();
|
|
133
|
+
var liteMember = null;
|
|
134
|
+
for (var _i = 0, members_1 = members; _i < members_1.length; _i++) {
|
|
135
|
+
var member = members_1[_i];
|
|
136
|
+
if (member != null && member.isLiteMember === false) {
|
|
137
|
+
return member.address;
|
|
138
|
+
}
|
|
139
|
+
else if (member != null && member.isLiteMember) {
|
|
140
|
+
liteMember = member;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
if (liteMember != null) {
|
|
144
|
+
return liteMember.address;
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
return null;
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
ProxyManager.prototype.initializeProxy = function (proxyObject, promise, deadline) {
|
|
151
|
+
var _this = this;
|
|
152
|
+
if (Date.now() <= deadline) {
|
|
153
|
+
var address = this.findNextAddress();
|
|
154
|
+
var request = ClientCreateProxyCodec_1.ClientCreateProxyCodec.encodeRequest(proxyObject.getName(), proxyObject.getServiceName(), address);
|
|
155
|
+
var invocation = new InvocationService_1.Invocation(this.client, request);
|
|
156
|
+
invocation.address = address;
|
|
157
|
+
this.client.getInvocationService().invoke(invocation).then(function (response) {
|
|
158
|
+
promise.resolve(response);
|
|
159
|
+
}).catch(function (error) {
|
|
160
|
+
if (_this.isRetryable(error)) {
|
|
161
|
+
_this.logger.warn('ProxyManager', 'Create proxy request for ' + proxyObject.getName() +
|
|
162
|
+
' failed. Retrying in ' + _this.invocationRetryPauseMillis + 'ms. ' + error);
|
|
163
|
+
setTimeout(_this.initializeProxy.bind(_this, proxyObject, promise, deadline), _this.invocationRetryPauseMillis);
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
_this.logger.warn('ProxyManager', 'Create proxy request for ' + proxyObject.getName() + ' failed ' + error);
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
promise.reject('Create proxy request timed-out for ' + proxyObject.getName());
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
ProxyManager.prototype.createDistributedObjectListener = function () {
|
|
175
|
+
return {
|
|
176
|
+
encodeAddRequest: function (localOnly) {
|
|
177
|
+
return ClientAddDistributedObjectListenerCodec_1.ClientAddDistributedObjectListenerCodec.encodeRequest(localOnly);
|
|
178
|
+
},
|
|
179
|
+
decodeAddResponse: function (msg) {
|
|
180
|
+
return ClientAddDistributedObjectListenerCodec_1.ClientAddDistributedObjectListenerCodec.decodeResponse(msg).response;
|
|
181
|
+
},
|
|
182
|
+
encodeRemoveRequest: function (listenerId) {
|
|
183
|
+
return ClientRemoveDistributedObjectListenerCodec_1.ClientRemoveDistributedObjectListenerCodec.encodeRequest(listenerId);
|
|
184
|
+
},
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
ProxyManager.MAP_SERVICE = 'hz:impl:mapService';
|
|
188
|
+
ProxyManager.SET_SERVICE = 'hz:impl:setService';
|
|
189
|
+
ProxyManager.LOCK_SERVICE = 'hz:impl:lockService';
|
|
190
|
+
ProxyManager.QUEUE_SERVICE = 'hz:impl:queueService';
|
|
191
|
+
ProxyManager.LIST_SERVICE = 'hz:impl:listService';
|
|
192
|
+
ProxyManager.MULTIMAP_SERVICE = 'hz:impl:multiMapService';
|
|
193
|
+
ProxyManager.RINGBUFFER_SERVICE = 'hz:impl:ringbufferService';
|
|
194
|
+
ProxyManager.REPLICATEDMAP_SERVICE = 'hz:impl:replicatedMapService';
|
|
195
|
+
ProxyManager.SEMAPHORE_SERVICE = 'hz:impl:semaphoreService';
|
|
196
|
+
ProxyManager.ATOMICLONG_SERVICE = 'hz:impl:atomicLongService';
|
|
197
|
+
ProxyManager.FLAKEID_SERVICE = 'hz:impl:flakeIdGeneratorService';
|
|
198
|
+
ProxyManager.PNCOUNTER_SERVICE = 'hz:impl:PNCounterService';
|
|
199
|
+
ProxyManager.RELIABLETOPIC_SERVICE = 'hz:impl:reliableTopicService';
|
|
200
|
+
return ProxyManager;
|
|
201
|
+
}());
|
|
202
|
+
exports.ProxyManager = ProxyManager;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference types="bluebird" />
|
|
2
|
+
import * as Promise from 'bluebird';
|
|
3
|
+
import { ItemListener } from '../core/ItemListener';
|
|
4
|
+
import { IQueue } from './IQueue';
|
|
5
|
+
import { PartitionSpecificProxy } from './PartitionSpecificProxy';
|
|
6
|
+
export declare class QueueProxy<E> extends PartitionSpecificProxy implements IQueue<E> {
|
|
7
|
+
add(item: E): Promise<boolean>;
|
|
8
|
+
addAll(items: E[]): Promise<boolean>;
|
|
9
|
+
addItemListener(listener: ItemListener<E>, includeValue: boolean): Promise<string>;
|
|
10
|
+
clear(): Promise<void>;
|
|
11
|
+
contains(item: E): Promise<boolean>;
|
|
12
|
+
containsAll(items: E[]): Promise<boolean>;
|
|
13
|
+
drainTo(arr: E[], maxElements?: number): Promise<number>;
|
|
14
|
+
isEmpty(): Promise<boolean>;
|
|
15
|
+
offer(item: E, time?: number): Promise<boolean>;
|
|
16
|
+
peek(): Promise<E>;
|
|
17
|
+
poll(time?: number): Promise<E>;
|
|
18
|
+
put(item: E): Promise<void>;
|
|
19
|
+
remainingCapacity(): Promise<number>;
|
|
20
|
+
remove(item: E): Promise<boolean>;
|
|
21
|
+
removeAll(items: E[]): Promise<boolean>;
|
|
22
|
+
removeItemListener(registrationId: string): Promise<boolean>;
|
|
23
|
+
retainAll(items: E[]): Promise<boolean>;
|
|
24
|
+
size(): Promise<number>;
|
|
25
|
+
take(): Promise<E>;
|
|
26
|
+
toArray(): Promise<E[]>;
|
|
27
|
+
private createEntryListener(name, includeValue);
|
|
28
|
+
}
|
|
@@ -0,0 +1,198 @@
|
|
|
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
|
+
var __extends = (this && this.__extends) || (function () {
|
|
18
|
+
var extendStatics = Object.setPrototypeOf ||
|
|
19
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
20
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
21
|
+
return function (d, b) {
|
|
22
|
+
extendStatics(d, b);
|
|
23
|
+
function __() { this.constructor = d; }
|
|
24
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
25
|
+
};
|
|
26
|
+
})();
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
var QueueAddAllCodec_1 = require("../codec/QueueAddAllCodec");
|
|
29
|
+
var QueueAddListenerCodec_1 = require("../codec/QueueAddListenerCodec");
|
|
30
|
+
var QueueClearCodec_1 = require("../codec/QueueClearCodec");
|
|
31
|
+
var QueueCompareAndRemoveAllCodec_1 = require("../codec/QueueCompareAndRemoveAllCodec");
|
|
32
|
+
var QueueCompareAndRetainAllCodec_1 = require("../codec/QueueCompareAndRetainAllCodec");
|
|
33
|
+
var QueueContainsAllCodec_1 = require("../codec/QueueContainsAllCodec");
|
|
34
|
+
var QueueContainsCodec_1 = require("../codec/QueueContainsCodec");
|
|
35
|
+
var QueueDrainToCodec_1 = require("../codec/QueueDrainToCodec");
|
|
36
|
+
var QueueDrainToMaxSizeCodec_1 = require("../codec/QueueDrainToMaxSizeCodec");
|
|
37
|
+
var QueueIsEmptyCodec_1 = require("../codec/QueueIsEmptyCodec");
|
|
38
|
+
var QueueIteratorCodec_1 = require("../codec/QueueIteratorCodec");
|
|
39
|
+
var QueueOfferCodec_1 = require("../codec/QueueOfferCodec");
|
|
40
|
+
var QueuePeekCodec_1 = require("../codec/QueuePeekCodec");
|
|
41
|
+
var QueuePollCodec_1 = require("../codec/QueuePollCodec");
|
|
42
|
+
var QueuePutCodec_1 = require("../codec/QueuePutCodec");
|
|
43
|
+
var QueueRemainingCapacityCodec_1 = require("../codec/QueueRemainingCapacityCodec");
|
|
44
|
+
var QueueRemoveCodec_1 = require("../codec/QueueRemoveCodec");
|
|
45
|
+
var QueueRemoveListenerCodec_1 = require("../codec/QueueRemoveListenerCodec");
|
|
46
|
+
var QueueSizeCodec_1 = require("../codec/QueueSizeCodec");
|
|
47
|
+
var QueueTakeCodec_1 = require("../codec/QueueTakeCodec");
|
|
48
|
+
var ItemListener_1 = require("../core/ItemListener");
|
|
49
|
+
var HazelcastError_1 = require("../HazelcastError");
|
|
50
|
+
var PartitionSpecificProxy_1 = require("./PartitionSpecificProxy");
|
|
51
|
+
var QueueProxy = /** @class */ (function (_super) {
|
|
52
|
+
__extends(QueueProxy, _super);
|
|
53
|
+
function QueueProxy() {
|
|
54
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
55
|
+
}
|
|
56
|
+
QueueProxy.prototype.add = function (item) {
|
|
57
|
+
return this.offer(item).then(function (ret) {
|
|
58
|
+
if (ret) {
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
throw new HazelcastError_1.IllegalStateError('Queue is full.');
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
QueueProxy.prototype.addAll = function (items) {
|
|
67
|
+
var rawList = [];
|
|
68
|
+
var toData = this.toData.bind(this);
|
|
69
|
+
items.forEach(function (item) {
|
|
70
|
+
rawList.push(toData(item));
|
|
71
|
+
});
|
|
72
|
+
return this.encodeInvoke(QueueAddAllCodec_1.QueueAddAllCodec, rawList);
|
|
73
|
+
};
|
|
74
|
+
QueueProxy.prototype.addItemListener = function (listener, includeValue) {
|
|
75
|
+
var _this = this;
|
|
76
|
+
var handler = function (message) {
|
|
77
|
+
QueueAddListenerCodec_1.QueueAddListenerCodec.handle(message, function (item, uuid, eventType) {
|
|
78
|
+
var responseObject;
|
|
79
|
+
if (item == null) {
|
|
80
|
+
responseObject = null;
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
responseObject = _this.toObject(item);
|
|
84
|
+
}
|
|
85
|
+
var member = _this.client.getClusterService().getMember(uuid);
|
|
86
|
+
var name = _this.name;
|
|
87
|
+
var itemEvent = new ItemListener_1.ItemEvent(name, eventType, responseObject, member);
|
|
88
|
+
if (eventType === ItemListener_1.ItemEventType.ADDED && listener.itemAdded) {
|
|
89
|
+
listener.itemAdded.apply(null, [itemEvent]);
|
|
90
|
+
}
|
|
91
|
+
else if (eventType === ItemListener_1.ItemEventType.REMOVED && listener.itemRemoved) {
|
|
92
|
+
listener.itemRemoved.apply(null, [itemEvent]);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
var codec = this.createEntryListener(this.name, includeValue);
|
|
97
|
+
return this.client.getListenerService().registerListener(codec, handler);
|
|
98
|
+
};
|
|
99
|
+
QueueProxy.prototype.clear = function () {
|
|
100
|
+
return this.encodeInvoke(QueueClearCodec_1.QueueClearCodec);
|
|
101
|
+
};
|
|
102
|
+
QueueProxy.prototype.contains = function (item) {
|
|
103
|
+
var itemData = this.toData(item);
|
|
104
|
+
return this.encodeInvoke(QueueContainsCodec_1.QueueContainsCodec, itemData);
|
|
105
|
+
};
|
|
106
|
+
QueueProxy.prototype.containsAll = function (items) {
|
|
107
|
+
var toData = this.toData.bind(this);
|
|
108
|
+
var rawItems = items.map(toData);
|
|
109
|
+
return this.encodeInvoke(QueueContainsAllCodec_1.QueueContainsAllCodec, rawItems);
|
|
110
|
+
};
|
|
111
|
+
QueueProxy.prototype.drainTo = function (arr, maxElements) {
|
|
112
|
+
if (maxElements === void 0) { maxElements = null; }
|
|
113
|
+
var toObject = this.toObject.bind(this);
|
|
114
|
+
var promise;
|
|
115
|
+
if (maxElements === null) {
|
|
116
|
+
promise = this.encodeInvoke(QueueDrainToCodec_1.QueueDrainToCodec);
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
promise = this.encodeInvoke(QueueDrainToMaxSizeCodec_1.QueueDrainToMaxSizeCodec, maxElements);
|
|
120
|
+
}
|
|
121
|
+
return promise.then(function (rawArr) {
|
|
122
|
+
rawArr.forEach(function (rawItem) {
|
|
123
|
+
arr.push(toObject(rawItem));
|
|
124
|
+
});
|
|
125
|
+
return rawArr.length;
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
QueueProxy.prototype.isEmpty = function () {
|
|
129
|
+
return this.encodeInvoke(QueueIsEmptyCodec_1.QueueIsEmptyCodec);
|
|
130
|
+
};
|
|
131
|
+
QueueProxy.prototype.offer = function (item, time) {
|
|
132
|
+
if (time === void 0) { time = 0; }
|
|
133
|
+
var itemData = this.toData(item);
|
|
134
|
+
return this.encodeInvoke(QueueOfferCodec_1.QueueOfferCodec, itemData, time);
|
|
135
|
+
};
|
|
136
|
+
QueueProxy.prototype.peek = function () {
|
|
137
|
+
return this.encodeInvoke(QueuePeekCodec_1.QueuePeekCodec);
|
|
138
|
+
};
|
|
139
|
+
QueueProxy.prototype.poll = function (time) {
|
|
140
|
+
if (time === void 0) { time = 0; }
|
|
141
|
+
return this.encodeInvoke(QueuePollCodec_1.QueuePollCodec, time);
|
|
142
|
+
};
|
|
143
|
+
QueueProxy.prototype.put = function (item) {
|
|
144
|
+
var itemData = this.toData(item);
|
|
145
|
+
return this.encodeInvoke(QueuePutCodec_1.QueuePutCodec, itemData);
|
|
146
|
+
};
|
|
147
|
+
QueueProxy.prototype.remainingCapacity = function () {
|
|
148
|
+
return this.encodeInvoke(QueueRemainingCapacityCodec_1.QueueRemainingCapacityCodec);
|
|
149
|
+
};
|
|
150
|
+
QueueProxy.prototype.remove = function (item) {
|
|
151
|
+
var itemData = this.toData(item);
|
|
152
|
+
return this.encodeInvoke(QueueRemoveCodec_1.QueueRemoveCodec, itemData);
|
|
153
|
+
};
|
|
154
|
+
QueueProxy.prototype.removeAll = function (items) {
|
|
155
|
+
var toData = this.toData.bind(this);
|
|
156
|
+
var rawItems = items.map(toData);
|
|
157
|
+
return this.encodeInvoke(QueueCompareAndRemoveAllCodec_1.QueueCompareAndRemoveAllCodec, rawItems);
|
|
158
|
+
};
|
|
159
|
+
QueueProxy.prototype.removeItemListener = function (registrationId) {
|
|
160
|
+
return this.client.getListenerService().deregisterListener(registrationId);
|
|
161
|
+
};
|
|
162
|
+
QueueProxy.prototype.retainAll = function (items) {
|
|
163
|
+
var toData = this.toData.bind(this);
|
|
164
|
+
var rawItems = items.map(toData);
|
|
165
|
+
return this.encodeInvoke(QueueCompareAndRetainAllCodec_1.QueueCompareAndRetainAllCodec, rawItems);
|
|
166
|
+
};
|
|
167
|
+
QueueProxy.prototype.size = function () {
|
|
168
|
+
return this.encodeInvoke(QueueSizeCodec_1.QueueSizeCodec);
|
|
169
|
+
};
|
|
170
|
+
QueueProxy.prototype.take = function () {
|
|
171
|
+
return this.encodeInvoke(QueueTakeCodec_1.QueueTakeCodec);
|
|
172
|
+
};
|
|
173
|
+
QueueProxy.prototype.toArray = function () {
|
|
174
|
+
var arr = [];
|
|
175
|
+
var toObject = this.toObject.bind(this);
|
|
176
|
+
return this.encodeInvoke(QueueIteratorCodec_1.QueueIteratorCodec).then(function (dataArray) {
|
|
177
|
+
dataArray.forEach(function (data) {
|
|
178
|
+
arr.push(toObject(data));
|
|
179
|
+
});
|
|
180
|
+
return arr;
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
QueueProxy.prototype.createEntryListener = function (name, includeValue) {
|
|
184
|
+
return {
|
|
185
|
+
encodeAddRequest: function (localOnly) {
|
|
186
|
+
return QueueAddListenerCodec_1.QueueAddListenerCodec.encodeRequest(name, includeValue, localOnly);
|
|
187
|
+
},
|
|
188
|
+
decodeAddResponse: function (msg) {
|
|
189
|
+
return QueueAddListenerCodec_1.QueueAddListenerCodec.decodeResponse(msg).response;
|
|
190
|
+
},
|
|
191
|
+
encodeRemoveRequest: function (listenerId) {
|
|
192
|
+
return QueueRemoveListenerCodec_1.QueueRemoveListenerCodec.encodeRequest(name, listenerId);
|
|
193
|
+
},
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
return QueueProxy;
|
|
197
|
+
}(PartitionSpecificProxy_1.PartitionSpecificProxy));
|
|
198
|
+
exports.QueueProxy = QueueProxy;
|