/** * If <code>delta == null</code> the cache is cleared unconditionally. * If <code>delta != null</code> the cache is cleared only if the delta can have an impact on the resource tree structure. */ public synchronized void clearResourcePathCacheIfNecessary(CDORevisionDelta delta) { if (resourcePathCache != null && !resourcePathCache.isEmpty()) { if (delta == null) { resourcePathCache.clear(); } else { CDOID rootResourceID = getSession().getRepositoryInfo().getRootResourceID(); if (canHaveResourcePathImpact(delta, rootResourceID)) { resourcePathCache.clear(); } } } }
@Override protected Object eval(CDOSession session) { return session.getRepositoryInfo().isSupportingAudits(); } });
@Override protected Object eval(CDOSession session) { return session.getRepositoryInfo().isSupportingBranches(); } });
CDOID rootResourceID = repositoryInfo.getRootResourceID(); for (CDORevisionKey changedObject : changedObjects) boolean auditing = repositoryInfo.isSupportingAudits(); boolean branching = repositoryInfo.isSupportingBranches(); boolean ensuringReferentialIntegrity = repositoryInfo.isEnsuringReferentialIntegrity(); CDOBranch transactionBranch = getBranch();
revisionManager.setSupportingAudits(repository.isSupportingAudits()); revisionManager.setSupportingBranches(repository.isSupportingBranches()); revisionManager.setRevisionLoader(sessionProtocol); revisionManager.setRevisionLocker(this); branchManager.initMainBranch(isMainBranchLocal(), repository.getCreationTime()); branchManager.activate(); repository.getTimeStamp(true);
@Override public String toString() { String name = repositoryInfo == null ? "?" : repositoryInfo.getName(); //$NON-NLS-1$ return MessageFormat.format("Session{0} [{1}]", sessionID, name); //$NON-NLS-1$ }
@Override protected Object eval(CDOSession session) { return session.getRepositoryInfo().getUUID(); } });
protected InternalCDOSession openRemoteSession() { CDOSessionConfiguration configuration = remoteSessionConfigurationFactory.createSessionConfiguration(); InternalCDOSession session = (InternalCDOSession)configuration.openSession(); CDORepositoryInfo repositoryInfo = session.getRepositoryInfo(); if (!repositoryInfo.isSupportingAudits()) { session.close(); throw new IllegalStateException("Remote repository does not support auditing"); } IDGenerationLocation remoteLocation = repositoryInfo.getIDGenerationLocation(); if (!remoteLocation.equals(idGenerationLocation)) { session.close(); throw new IllegalStateException("Remote repository uses different ID generation location: " + remoteLocation); } return session; }
@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(); }
@Override protected Object eval(CDOSession session) { return session.getRepositoryInfo().getIDGenerationLocation(); } });
@Override protected Object eval(CDOSession session) { return CDOCommonUtil.formatTimeStamp(session.getRepositoryInfo().getCreationTime()); } });
@Override protected Object eval(CDOSession session) { return session.getRepositoryInfo().isEnsuringReferentialIntegrity(); } });
@Override protected Object eval(CDOSession session) { return session.getRepositoryInfo().getState(); } });
@Override protected Object eval(CDOSession session) { StringBuilder builder = new StringBuilder(); for (CDOID.ObjectType objectIDType : session.getRepositoryInfo().getObjectIDTypes()) { if (builder.length() != 0) { builder.append(", "); //$NON-NLS-1$ } builder.append(objectIDType); } return builder; } });
@Override public String toString() { String name = repositoryInfo == null ? "?" : repositoryInfo.getName(); //$NON-NLS-1$ return MessageFormat.format("Session{0} [{1}]", sessionID, name); //$NON-NLS-1$ }
@Override protected Object eval(CDOSession session) { return session.getRepositoryInfo().getUUID(); } });
@Override protected Object eval(CDOSession session) { return session.getRepositoryInfo().getIDGenerationLocation(); } });
@Override protected Object eval(CDOSession session) { return CDOCommonUtil.formatTimeStamp(session.getRepositoryInfo().getCreationTime()); } });