protected boolean canProcess(Invalidation invalidation) { if (options().isPassiveUpdateEnabled()) { long previousTimeStamp = invalidation.getPreviousTimeStamp(); long lastUpdateTime = getLastUpdateTime(); return previousTimeStamp <= lastUpdateTime; // Can be smaller in replication scenarios } return unfinishedLocalCommits.size() == 1; // Ourselves }
if (!getSession().options().isPassiveUpdateEnabled())
if (!getSession().options().isPassiveUpdateEnabled())
nextPreviousTimeStamp = currentCommitInfo.getTimeStamp(); if (options.isPassiveUpdateEnabled())
if (options.isPassiveUpdateEnabled()/* || sender != null */)
private LockObjectsResult lockOnMaster(InternalView view, LockType type, List<CDORevisionKey> revKeys, boolean recursive, long timeout) throws InterruptedException { // Delegate locking to the master InternalCDOSession remoteSession = getSynchronizer().getRemoteSession(); CDOSessionProtocol sessionProtocol = remoteSession.getSessionProtocol(); String areaID = view.getDurableLockingID(); if (areaID == null) { throw new IllegalStateException("Durable locking is not enabled for view " + view); } LockObjectsResult masterLockingResult = sessionProtocol.delegateLockObjects(areaID, revKeys, view.getBranch(), type, recursive, timeout); if (masterLockingResult.isSuccessful() && masterLockingResult.isWaitForUpdate()) { if (!getSynchronizer().getRemoteSession().options().isPassiveUpdateEnabled()) { throw new AssertionError( "Master lock result requires clone to wait, but clone does not have passiveUpdates enabled."); } long requiredTimestamp = masterLockingResult.getRequiredTimestamp(); remoteSession.waitForUpdate(requiredTimestamp); } return masterLockingResult; }
@Override protected void doActivate() throws Exception { super.doActivate(); EmbeddedClientSessionProtocol protocol = new EmbeddedClientSessionProtocol(this); setSessionProtocol(protocol); protocol.activate(); protocol.openSession(options().isPassiveUpdateEnabled()); setLastUpdateTime(repository.getLastCommitTimeStamp()); setRepositoryInfo(new RepositoryInfo(this)); InternalCDORevisionManager revisionManager = (InternalCDORevisionManager)CDORevisionUtil.createRevisionManager(); setRevisionManager(revisionManager); revisionManager.setSupportingAudits(getRepositoryInfo().isSupportingAudits()); revisionManager.setSupportingBranches(getRepositoryInfo().isSupportingBranches()); revisionManager.setCache(CDORevisionCache.NOOP); revisionManager.setRevisionLoader(getSessionProtocol()); revisionManager.setRevisionLocker(this); revisionManager.activate(); }
public boolean isSticky() { return !options().isPassiveUpdateEnabled() && getRepositoryInfo().isSupportingAudits(); }
/** * @since 2.0 */ public long refresh() { checkActive(); if (options().isPassiveUpdateEnabled()) { return CDOBranchPoint.UNSPECIFIED_DATE; } return refresh(false); }
public boolean isSticky() { return !options().isPassiveUpdateEnabled() && getRepositoryInfo().isSupportingAudits(); }
@Override protected Object eval(CDOSession session) { return session.options().isPassiveUpdateEnabled(); } });
@Override protected Object eval(CDOSession session) { return session.options().isPassiveUpdateEnabled(); } });
/** * @since 2.0 */ public long refresh() { checkActive(); if (options().isPassiveUpdateEnabled()) { return CDOBranchPoint.UNSPECIFIED_DATE; } return refresh(false); }