/** * Get the name of the workspace in which the changes were made. * * @return the workspace name; may be null only when workspaces are added or removed * @see org.modeshape.jcr.cache.change.ChangeSet#getWorkspaceName() */ public String getWorkspaceName() { return content.getWorkspaceName(); }
/** * Get the name of the workspace in which the changes were made. * * @return the workspace name; may be null only when workspaces are added or removed * @see org.modeshape.jcr.cache.change.ChangeSet#getWorkspaceName() */ public String getWorkspaceName() { return content.getWorkspaceName(); }
private boolean acceptBasedOnOriginatingWorkspace( ChangeSet changeSet ) { boolean sameWorkspace = getWorkspaceName().equalsIgnoreCase(changeSet.getWorkspaceName()); boolean isSystemWorkspace = getSystemWorkspaceName().equalsIgnoreCase(changeSet.getWorkspaceName()); return sameWorkspace || isSystemWorkspace; }
private boolean acceptBasedOnOriginatingWorkspace( ChangeSet changeSet ) { boolean sameWorkspace = getWorkspaceName().equalsIgnoreCase(changeSet.getWorkspaceName()); boolean isSystemWorkspace = getSystemWorkspaceName().equalsIgnoreCase(changeSet.getWorkspaceName()); return sameWorkspace || isSystemWorkspace; }
@Override public void notify( ChangeSet changeSet ) { if (systemWorkspaceName.equals(changeSet.getWorkspaceName())) { // The change affects the 'system' workspace, and we likely have some system nodes cached. So we have // to clear out from our cache any changed system nodes evictChangedNodes(changeSet); } } }
@Override public void notify( ChangeSet changeSet ) { if (systemWorkspaceName.equals(changeSet.getWorkspaceName())) { // we already processed it via SystemChangeNotifier ... return; } // A workspace cache might contain a cached node that is federated, shared, or a system node. // Because of this, those nodes might be changed in other workspaces and we might still have a cached // representation. Therefore, we need to expell all nodes that have changed, even if they are changed // in other workspaces ... evictChangedNodes(changeSet); } }
@Override public void notify( ChangeSet changeSet ) { if (systemWorkspaceName.equals(changeSet.getWorkspaceName())) { // we already processed it via SystemChangeNotifier ... return; } // A workspace cache might contain a cached node that is federated, shared, or a system node. // Because of this, those nodes might be changed in other workspaces and we might still have a cached // representation. Therefore, we need to expell all nodes that have changed, even if they are changed // in other workspaces ... evictChangedNodes(changeSet); } }
@Override public void notify( ChangeSet changeSet ) { if (systemWorkspaceName.equals(changeSet.getWorkspaceName())) { // The change affects the 'system' workspace, and we likely have some system nodes cached. So we have // to clear out from our cache any changed system nodes evictChangedNodes(changeSet); } } }
@Override public final void notify( ChangeSet changeSet ) { if (changeSet.getWorkspaceName() != null) { // This is a change in the content of a workspace ... managedIndex.getIndexChangeAdapter().notify(changeSet); } }
@Override public final void notify( ChangeSet changeSet ) { if (changeSet.getWorkspaceName() != null) { // This is a change in the content of a workspace ... managedIndex.getIndexChangeAdapter().notify(changeSet); } }
@Override public void notify( ChangeSet changeSet ) { //do not store records from jcr:system boolean systemWorkspaceChanges = RepositoryConfiguration.SYSTEM_WORKSPACE_NAME.equalsIgnoreCase(changeSet.getWorkspaceName()); if (changeSet.isEmpty() || systemWorkspaceChanges) { return; } addRecords(new JournalRecord(changeSet)); }
@Override public void notify( ChangeSet changeSet ) { //do not store records from jcr:system boolean systemWorkspaceChanges = RepositoryConfiguration.SYSTEM_WORKSPACE_NAME.equalsIgnoreCase(changeSet.getWorkspaceName()); if (changeSet.isEmpty() || systemWorkspaceChanges) { return; } addRecords(new JournalRecord(changeSet)); }
@Override public void notify( ChangeSet changeSet ) { // Track all changes, even those that originate in remote processes ... increment(ValueMetric.NODE_CHANGES, changeSet.changedNodes().size()); if (changeSet.getWorkspaceName() == null) { // This is a change in the workspaces or repository metadata ... for (Change change : changeSet) { if (change instanceof WorkspaceAdded) { increment(ValueMetric.WORKSPACE_COUNT); } else if (change instanceof WorkspaceRemoved) { decrement(ValueMetric.WORKSPACE_COUNT); } } } // ValueMetric.SESSION_SAVES are tracked in JcrSession.save() ... }
@Override public void notify( ChangeSet changeSet ) { // Track all changes, even those that originate in remote processes ... increment(ValueMetric.NODE_CHANGES, changeSet.changedNodes().size()); if (changeSet.getWorkspaceName() == null) { // This is a change in the workspaces or repository metadata ... for (Change change : changeSet) { if (change instanceof WorkspaceAdded) { increment(ValueMetric.WORKSPACE_COUNT); } else if (change instanceof WorkspaceRemoved) { decrement(ValueMetric.WORKSPACE_COUNT); } } } // ValueMetric.SESSION_SAVES are tracked in JcrSession.save() ... }
if (changeSet.getWorkspaceName() == null) {
if (changeSet.getWorkspaceName() == null) {
protected final void logSendOperation( ChangeSet changeSet ) { if (LOGGER.isTraceEnabled()) { LOGGER.trace("Sending to cluster '{0}' {1} changes on workspace {2} made by {3} from process '{4}' at {5}", clusteringService.toString(), changeSet.size(), changeSet.getWorkspaceName(), changeSet.getUserData(), changeSet.getProcessKey(), changeSet.getTimestamp()); } }
protected final void logReceivedOperation( ChangeSet changeSet ) { if (LOGGER.isTraceEnabled()) { LOGGER.trace("Received from cluster '{0}' {1} changes on workspace {2} made by {3} from process '{4}' at {5}", clusteringService.toString(), changeSet.size(), changeSet.getWorkspaceName(), changeSet.getUserId(), changeSet.getProcessKey(), changeSet.getTimestamp()); } }
protected final void logSendOperation( ChangeSet changeSet ) { if (LOGGER.isTraceEnabled()) { LOGGER.trace("Sending to cluster '{0}' {1} changes on workspace {2} made by {3} from process '{4}' at {5}", clusteringService.toString(), changeSet.size(), changeSet.getWorkspaceName(), changeSet.getUserData(), changeSet.getProcessKey(), changeSet.getTimestamp()); } }
protected final void logReceivedOperation( ChangeSet changeSet ) { if (LOGGER.isTraceEnabled()) { LOGGER.trace("Received from cluster '{0}' {1} changes on workspace {2} made by {3} from process '{4}' at {5}", clusteringService.toString(), changeSet.size(), changeSet.getWorkspaceName(), changeSet.getUserId(), changeSet.getProcessKey(), changeSet.getTimestamp()); } }