本文整理了Java中javax.jcr.lock.Lock.isSessionScoped()
方法的一些代码示例,展示了Lock.isSessionScoped()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Lock.isSessionScoped()
方法的具体详情如下:
包路径:javax.jcr.lock.Lock
类名称:Lock
方法名:isSessionScoped
[英]Returns true
if this is a session-scoped lock and the scope is bound to the current session. Returns false
otherwise.
[中]如果这是一个会话作用域锁,并且该作用域已绑定到当前会话,则返回true
。否则返回false
。
代码示例来源:origin: org.onehippo.cms7/hippo-repository-engine
@Override
public boolean isSessionScoped() {
synchronized (session) {
return lock.isSessionScoped();
}
}
代码示例来源:origin: apache/jackrabbit
/**
* @return The scope of this lock, which may either by an {@link Scope#EXCLUSIVE exclusive}
* or {@link ItemResourceConstants#EXCLUSIVE_SESSION exclusive session scoped}
* lock.
* @see ActiveLock#getScope()
*/
public Scope getScope() {
return (lock.isSessionScoped()) ? ItemResourceConstants.EXCLUSIVE_SESSION : Scope.EXCLUSIVE;
}
}
代码示例来源:origin: apache/jackrabbit
/** {@inheritDoc} */
public boolean isSessionScoped() throws RemoteException {
return lock.isSessionScoped();
}
代码示例来源:origin: net.adamcin.oakpal/oakpal-core
@Override
public boolean isSessionScoped() {
return delegate.isSessionScoped();
}
代码示例来源:origin: org.apache.jackrabbit/jackrabbit-ocm
public boolean isSessionScoped() {
return lock.isSessionScoped();
}
代码示例来源:origin: org.apache/jackrabbit-ocm
public boolean isSessionScoped() {
return lock.isSessionScoped();
}
代码示例来源:origin: apache/jackrabbit
/**
* Test {@link javax.jcr.lock.Lock#isSessionScoped()}
*/
public void testIsSessionScoped() {
assertEquals("Lock.isSessionScoped must be consistent with lock call.", isSessionScoped(), lock.isSessionScoped());
}
代码示例来源:origin: apache/jackrabbit
/**
* Test Lock.isSessionScoped()
*/
public void testIsSessionScoped() throws RepositoryException,
NotExecutableException {
// create two lockable nodes
Node n1 = testRootNode.addNode(nodeName1, testNodeType);
ensureMixinType(n1, mixLockable);
Node n2 = testRootNode.addNode(nodeName2, testNodeType);
ensureMixinType(n2, mixLockable);
testRootNode.getSession().save();
// lock node 1 session-scoped
Lock lock1 = n1.lock(false, true);
assertTrue("Lock.isSessionScoped() must be true if the lock " +
"is session-scoped",
lock1.isSessionScoped());
// lock node 2 open-scoped
Lock lock2 = n2.lock(false, false);
assertFalse("Lock.isSessionScoped() must be false if the lock " +
"is open-scoped",
lock2.isSessionScoped());
n2.unlock();
}
代码示例来源:origin: org.onehippo.cms7/hippo-repository-engine
lock = lockManager.lock(lock.getNode().getPath(), lock.isDeep(), lock.isSessionScoped(), timeout, lock.getLockOwner());
setTimeout(lock, timeout);
success = true;
代码示例来源:origin: org.apache.jackrabbit/jackrabbit-spi2jcr
/**
* Creates a new lock info for the given JCR lock object.
*
* @param lock the lock.
* @param idFactory the id factory.
* @throws RepositoryException if an error occurs while the node from the
* given lock or while creating the node id.
*/
private LockInfoImpl(Lock lock, IdFactoryImpl idFactory) throws RepositoryException {
super(lock.getLockToken(), lock.getLockOwner(), lock.isDeep(),
lock.isSessionScoped(), lock.getSecondsRemaining(), lock.isLockOwningSession(),
idFactory.createNodeId(lock.getNode()));
}
代码示例来源:origin: apache/jackrabbit
/**
* Creates a new lock info for the given JCR lock object.
*
* @param lock the lock.
* @param idFactory the id factory.
* @throws RepositoryException if an error occurs while the node from the
* given lock or while creating the node id.
*/
private LockInfoImpl(Lock lock, IdFactoryImpl idFactory) throws RepositoryException {
super(lock.getLockToken(), lock.getLockOwner(), lock.isDeep(),
lock.isSessionScoped(), lock.getSecondsRemaining(), lock.isLockOwningSession(),
idFactory.createNodeId(lock.getNode()));
}
内容来源于网络,如有侵权,请联系作者删除!