@Immutable public class Sequencers extends Object implements ChangeSetListener
listener
of cache changes.
This class keeps a cache of the SequencerPathExpression
instances (and the corresponding Sequencer
implementation) for each workspace. This is so that it's much easier and more efficient to process the events, which happens
very frequently. Also, that structure is a bit backward compared to how the sequencers are defined in the configuration.
Modifier and Type | Class and Description |
---|---|
protected class |
Sequencers.SequencingConfiguration
This class represents a single
SequencerPathExpression and the corresponding Sequencer implementation that
should be used if the path expression matches. |
protected static class |
Sequencers.SequencingContext |
static class |
Sequencers.SequencingWorkItem |
protected class |
Sequencers.SequencingWorkQueue |
protected static interface |
Sequencers.WorkQueue |
Modifier and Type | Field and Description |
---|---|
protected JcrRepository.RunningState |
repository |
protected ExecutorService |
sequencingExecutor |
Modifier | Constructor and Description |
---|---|
protected |
Sequencers(JcrRepository.RunningState repository,
RepositoryConfiguration config,
Iterable<String> workspaceNames) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
acceptsWork() |
protected Set<SequencerPathExpression> |
buildPathExpressionSet(Sequencer sequencer) |
Sequencer |
getSequencer(String sequencerName) |
protected Sequencer |
getSequencer(UUID id) |
protected void |
initialize() |
boolean |
isEmpty()
Determine if there are no sequencers configured.
|
void |
notify(ChangeSet changeSet)
This method is called when changes are persisted to the repository.
|
protected void |
shutdown() |
protected RepositoryStatistics |
statistics() |
protected ValueFactory<String> |
stringFactory() |
protected void |
submitWork(Sequencers.SequencingConfiguration sequencingConfig,
SequencerPathExpression.Matcher matcher,
String inputWorkspaceName,
String propertyName,
String userId) |
protected Sequencers |
with(JcrRepository.RunningState repository) |
protected void |
workspaceAdded(String workspaceName)
Signal that a new workspace was added.
|
protected void |
workspaceRemoved(String workspaceName)
Signal that a new workspace was removed.
|
protected final JcrRepository.RunningState repository
protected final ExecutorService sequencingExecutor
protected Sequencers(JcrRepository.RunningState repository, RepositoryConfiguration config, Iterable<String> workspaceNames)
protected Sequencers with(JcrRepository.RunningState repository)
protected void initialize()
public boolean isEmpty()
protected void workspaceAdded(String workspaceName)
workspaceName
- the workspace name; may not be nullprotected void workspaceRemoved(String workspaceName)
workspaceName
- the workspace name; may not be nullprotected final ValueFactory<String> stringFactory()
protected final void shutdown()
protected final RepositoryStatistics statistics()
protected void submitWork(Sequencers.SequencingConfiguration sequencingConfig, SequencerPathExpression.Matcher matcher, String inputWorkspaceName, String propertyName, String userId)
protected Set<SequencerPathExpression> buildPathExpressionSet(Sequencer sequencer) throws InvalidSequencerPathExpression
InvalidSequencerPathExpression
protected boolean acceptsWork()
public void notify(ChangeSet changeSet)
notify
in interface ChangeSetListener
changeSet
- the changesCopyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.