Пример #1
0
        internal override bool AddInternal(object key, Alachisoft.NCache.Caching.AutoExpiration.ExpirationHint eh, OperationContext operationContext)
        {
            int bucketId = GetBucketId(key as string);

            if (IsBucketTransfered(bucketId))
            {
                throw new StateTransferException("I am no more the owner of this bucket");
            }

            return(base.AddInternal(key, eh, operationContext));
        }
Пример #2
0
        internal override bool RemoveInternal(object key, Alachisoft.NCache.Caching.AutoExpiration.ExpirationHint eh)
        {
            int bucketId = GetBucketId(key as string);

            if (_logMgr.IsOperationAllowed(bucketId) && LocalBuckets.Contains(bucketId))
            {
                return(base.RemoveInternal(key, eh));
            }

            throw new StateTransferException("I am no more the owner of this bucket");
        }