本文整理汇总了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();
}
}
}
}
示例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();
}
}
示例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
}
示例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
}
示例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
}
示例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;
示例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;
示例8: checkSession
import org.apache.zookeeper.KeeperException.SessionMovedException; //导入依赖的package包/类
void checkSession(long sessionId, Object owner) throws KeeperException.SessionExpiredException, SessionMovedException;