当前位置: 首页>>代码示例>>Java>>正文


Java SessionMovedException类代码示例

本文整理汇总了Java中org.apache.zookeeper.KeeperException.SessionMovedException的典型用法代码示例。如果您正苦于以下问题:Java SessionMovedException类的具体用法?Java SessionMovedException怎么用?Java SessionMovedException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SessionMovedException类属于org.apache.zookeeper.KeeperException包,在下文中一共展示了SessionMovedException类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: checkSession

import org.apache.zookeeper.KeeperException.SessionMovedException; //导入依赖的package包/类
public void checkSession(long sessionId, Object owner)
        throws SessionExpiredException, SessionMovedException  {
    if (localSessionTracker != null) {
        try {
            localSessionTracker.checkSession(sessionId, owner);
            return;
        } catch (UnknownSessionException e) {
            // Check whether it's a global session. We can ignore those
            // because they are handled at the leader, but if not, rethrow.
            // We check local session status first to avoid race condition
            // with session upgrading.
            if (!isGlobalSession(sessionId)) {
                throw new SessionExpiredException();
            }
        }
    }
}
 
开发者ID:didichuxing2,项目名称:https-github.com-apache-zookeeper,代码行数:18,代码来源:LearnerSessionTracker.java

示例2: checkGlobalSession

import org.apache.zookeeper.KeeperException.SessionMovedException; //导入依赖的package包/类
public void checkGlobalSession(long sessionId, Object owner)
        throws SessionExpiredException, SessionMovedException {
    try {
        globalSessionTracker.checkSession(sessionId, owner);
    } catch (UnknownSessionException e) {
        // For global session, if we don't know it, it is already expired
        throw new SessionExpiredException();
    }
}
 
开发者ID:didichuxing2,项目名称:https-github.com-apache-zookeeper,代码行数:10,代码来源:LeaderSessionTracker.java

示例3: checkSession

import org.apache.zookeeper.KeeperException.SessionMovedException; //导入依赖的package包/类
@Override
public void checkSession(long sessionId, Object owner)
        throws SessionExpiredException, SessionMovedException {
    // TODO Auto-generated method stub
    
}
 
开发者ID:maoling,项目名称:fuck_zookeeper,代码行数:7,代码来源:PrepRequestProcessorTest.java

示例4: checkSession

import org.apache.zookeeper.KeeperException.SessionMovedException; //导入依赖的package包/类
@Override
public void checkSession(long sessionId, Object owner)
        throws SessionExpiredException, SessionMovedException {
    // TODO Auto-generated method stub
}
 
开发者ID:didichuxing2,项目名称:https-github.com-apache-zookeeper,代码行数:6,代码来源:PrepRequestProcessorTest.java

示例5: checkGlobalSession

import org.apache.zookeeper.KeeperException.SessionMovedException; //导入依赖的package包/类
@Override
public void checkGlobalSession(long sessionId, Object owner)
        throws SessionExpiredException, SessionMovedException {
    // TODO Auto-generated method stub
}
 
开发者ID:didichuxing2,项目名称:https-github.com-apache-zookeeper,代码行数:6,代码来源:PrepRequestProcessorTest.java

示例6: checkSession

import org.apache.zookeeper.KeeperException.SessionMovedException; //导入依赖的package包/类
/**
 * Checks whether the SessionTracker is aware of this session, the session
 * is still active, and the owner matches. If the owner wasn't previously
 * set, this sets the owner of the session.
 *
 * UnknownSessionException should never been thrown to the client. It is
 * only used internally to deal with possible local session from other
 * machine
 *
 * @param sessionId
 * @param owner
 */
public void checkSession(long sessionId, Object owner)
        throws KeeperException.SessionExpiredException,
        KeeperException.SessionMovedException,
        KeeperException.UnknownSessionException;
 
开发者ID:didichuxing2,项目名称:https-github.com-apache-zookeeper,代码行数:17,代码来源:SessionTracker.java

示例7: checkGlobalSession

import org.apache.zookeeper.KeeperException.SessionMovedException; //导入依赖的package包/类
/**
 * Strictly check that a given session is a global session or not
 * @param sessionId
 * @param owner
 * @throws KeeperException.SessionExpiredException
 * @throws KeeperException.SessionMovedException
 */
public void checkGlobalSession(long sessionId, Object owner)
        throws KeeperException.SessionExpiredException,
        KeeperException.SessionMovedException;
 
开发者ID:didichuxing2,项目名称:https-github.com-apache-zookeeper,代码行数:11,代码来源:SessionTracker.java

示例8: checkSession

import org.apache.zookeeper.KeeperException.SessionMovedException; //导入依赖的package包/类
void checkSession(long sessionId, Object owner) throws KeeperException.SessionExpiredException, SessionMovedException; 
开发者ID:maoling,项目名称:fuck_zookeeper,代码行数:2,代码来源:SessionTracker.java


注:本文中的org.apache.zookeeper.KeeperException.SessionMovedException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。