I'd rather have the operation treated as a miss or failure rather than
having the key(s) get mapped to a different server in the pool.

Thanks

Search Discussions

  • Michael Thomas at Jul 23, 2012 at 6:19 pm
    I believe the behavior that you want can be accomplished by creating a
    custom "NodeFailurePolicy" that never "fails" a node. If for some reason a
    node can't be reached, calls to it will just fail until it comes back
    online. As far as I can tell (from testing and reading the source) keys
    will not be remapped.

    *config.SocketPool.FailurePolicyFactory = new NeverFailPolicyFactory();*

    public class NeverFailPolicyFactory : INodeFailurePolicyFactory

    {

    public INodeFailurePolicy Create(IMemcachedNode node)

    {

    return NeverFailPolicy.Instance;

    }

    }


    public class NeverFailPolicy : INodeFailurePolicy

    {

    public static NeverFailPolicy Instance = new NeverFailPolicy();


    public bool ShouldFail()

    {

    return false;

    }

    }

    On Wednesday, June 27, 2012 6:54:32 AM UTC-7, NCSUWolf99 wrote:

    I'd rather have the operation treated as a miss or failure rather than
    having the key(s) get mapped to a different server in the pool.

    Thanks

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupenyim-memcached @
categoriesmemcached
postedJun 27, '12 at 1:56p
activeJul 23, '12 at 6:19p
posts2
users2
websitememcached.org

2 users in discussion

NCSUWolf99: 1 post Michael Thomas: 1 post

People

Translate

site design / logo © 2021 Grokbase