@Override protected Object eval(CDOSession session) { return session.getRepositoryInfo().getIDGenerationLocation(); } });
@Override protected Object eval(CDOSession session) { return session.getRepositoryInfo().getIDGenerationLocation(); } });
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(); InternalCDOSession session = getSession(); if (session.getRepositoryInfo().getIDGenerationLocation() == IDGenerationLocation.STORE) { idGenerator = new TempIDGenerator(); } else { idGenerator = session.getIDGenerator(); if (idGenerator == null) { idGenerator = CDOIDGenerator.UUID; } } }
@Override protected void doActivate() throws Exception { super.doActivate(); InternalCDOSession session = getSession(); if (session.getRepositoryInfo().getIDGenerationLocation() == IDGenerationLocation.STORE) { idGenerator = new TempIDGenerator(); } else { idGenerator = session.getIDGenerator(); if (idGenerator == null) { idGenerator = CDOIDGenerator.UUID; } } }
public synchronized ApplyChangeSetResult applyChangeSet(CDOChangeSetData changeSetData, CDORevisionProvider ancestorProvider, CDORevisionProvider targetProvider, CDOBranchPoint source, boolean keepVersions) throws ChangeSetOutdatedException { ApplyChangeSetResult result = new ApplyChangeSetResult(); // Merges from local offline branches may require additional ID mappings: localID -> tempID if (source != null && source.getBranch().isLocal() && getSession().getRepositoryInfo().getIDGenerationLocation() == IDGenerationLocation.STORE) { applyLocalIDMapping(changeSetData, result); } CDOChangeSetData resultData = result.getChangeSetData(); // New objects applyNewObjects(changeSetData.getNewObjects(), resultData.getNewObjects()); // Detached objects Set<CDOObject> detachedSet = applyDetachedObjects(changeSetData.getDetachedObjects(), resultData.getDetachedObjects()); // Changed objects Map<CDOID, InternalCDORevision> oldRevisions = applyChangedObjects(changeSetData.getChangedObjects(), ancestorProvider, targetProvider, keepVersions, resultData.getChangedObjects()); // Delta notifications Collection<CDORevisionDelta> notificationDeltas = lastSavepoint.getRevisionDeltas2().values(); if (!notificationDeltas.isEmpty() || !detachedSet.isEmpty()) { sendDeltaNotifications(notificationDeltas, detachedSet, oldRevisions); } return result; }