@Immutable protected class Connectors.Snapshot extends Object
Modifier | Constructor and Description |
---|---|
protected |
Snapshot(Collection<RepositoryConfiguration.Component> components,
Set<String> externalSources,
Map<String,List<RepositoryConfiguration.ProjectionConfiguration>> preconfiguredProjections) |
protected |
Snapshot(Connectors.Snapshot original) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsProjectionForExternalNode(String externalNodeKey)
Determine if this snapshot contains a projection that uses the supplied external node key.
|
boolean |
containsProjectionForInternalNode(String internalNodeKey)
Determine if this snapshot contains a projection that uses the supplied internal node key.
|
protected Set<String> |
externalSources() |
Collection<Connector> |
getConnectors()
Get the
Connector instances. |
Connector |
getConnectorWithSourceKey(String sourceKey)
Get the
Connector instance that has the same source key (generated from the connector's
source name ). |
Connectors.PathMappings |
getPathMappings(Connector connector)
Get the immutable mappings from connector-specific external paths to projected, repository paths.
|
List<RepositoryConfiguration.ProjectionConfiguration> |
getProjectionConfigurationsForWorkspace(String workspaceName)
Get all of the
RepositoryConfiguration.ProjectionConfiguration s that apply to the workspace with the given name. |
Connectors.Projection |
getProjectionForExternalNode(String externalNodeKey)
Get the projection that uses the supplied external node key.
|
Collection<Connectors.Projection> |
getProjections()
Get the
Connectors.Projection instances in this snapshot. |
String |
getSourceNameAtKey(String sourceKey)
Returns the name of the external source mapped at the given key.
|
Collection<String> |
getWorkspacesWithProjections()
Get the names of the workspaces that contain at least one projection.
|
Set<String> |
getWorkspacesWithProjectionsFor(Connector connector)
Get the set of workspace names that contain projections of the supplied connector.
|
boolean |
hasConnectors()
Determine if this snapshot contains any
Connector instances. |
boolean |
hasExternalProjection(String alias,
String externalNodeKey)
Determine if this snapshot contains a projection with the given alias and external node key
|
boolean |
hasInternalProjection(String alias,
String projectedNodeKey)
Determine if this snapshot contains a projection with the given alias and projected (internal) node key
|
protected boolean |
hasReadonlyConnectors() |
protected boolean |
isUnused(String sourceName) |
protected void |
shutdownConnectors() |
protected void |
shutdownUnusedConnectors() |
protected Connectors.Snapshot |
withOnlyProjectionConfigurations()
Create a new snapshot that contains only the same
projection configurations that this
snapshot contains. |
protected Connectors.Snapshot |
withoutConnectors(Iterable<Connector> connectors)
Create a new snapshot that is a copy of this snapshot but which excludes any of the supplied connector instances.
|
protected Connectors.Snapshot |
withoutProjection(String externalNodeKey)
Create a new snapshot that excludes any existing projection that uses the supplied external node key.
|
protected Connectors.Snapshot |
withoutProjections(Connectors.Projection... projections)
Create a new snapshot that is a copy of this snapshot but without the supplied projections.
|
protected Connectors.Snapshot |
withProjection(Connectors.Projection projection)
Create a new snapshot that is a copy of this snapshot but which includes the supplied projection.
|
protected Connectors.Snapshot |
withProjections(Iterable<Connectors.Projection> projections)
Create a new snapshot that is a copy of this snapshot but which includes the supplied projections.
|
protected Snapshot(Collection<RepositoryConfiguration.Component> components, Set<String> externalSources, Map<String,List<RepositoryConfiguration.ProjectionConfiguration>> preconfiguredProjections)
protected Snapshot(Connectors.Snapshot original)
protected void shutdownUnusedConnectors()
protected void shutdownConnectors()
public boolean hasConnectors()
Connector
instances.public Connector getConnectorWithSourceKey(String sourceKey)
Connector
instance that has the same source key (generated from the connector's
source name
).sourceKey
- the source keypublic String getSourceNameAtKey(String sourceKey)
sourceKey
- the key of the source; may not be nullpublic Collection<Connector> getConnectors()
Connector
instances.public Collection<String> getWorkspacesWithProjections()
getProjectionConfigurationsForWorkspace(String)
public List<RepositoryConfiguration.ProjectionConfiguration> getProjectionConfigurationsForWorkspace(String workspaceName)
RepositoryConfiguration.ProjectionConfiguration
s that apply to the workspace with the given name.workspaceName
- the name of the workspacegetWorkspacesWithProjections()
public Set<String> getWorkspacesWithProjectionsFor(Connector connector)
connector
- the connectorpublic boolean hasInternalProjection(String alias, String projectedNodeKey)
alias
- the aliasprojectedNodeKey
- the node key of the projected (internal) nodepublic boolean hasExternalProjection(String alias, String externalNodeKey)
alias
- the aliasexternalNodeKey
- the node key of the external nodepublic Collection<Connectors.Projection> getProjections()
Connectors.Projection
instances in this snapshot.public Connectors.Projection getProjectionForExternalNode(String externalNodeKey)
externalNodeKey
- the node key for the external nodepublic boolean containsProjectionForExternalNode(String externalNodeKey)
externalNodeKey
- the node key for the external nodepublic boolean containsProjectionForInternalNode(String internalNodeKey)
internalNodeKey
- the node key for the internal nodeprotected Connectors.Snapshot withoutProjection(String externalNodeKey)
externalNodeKey
- the node key for the external nodeprotected Connectors.Snapshot withoutConnectors(Iterable<Connector> connectors)
connectors
- the connectorsshould be called after this Snapshot is no longer accessible, so that any previous
Connector instance is {@link Connector#shutdown()}
protected Connectors.Snapshot withProjection(Connectors.Projection projection)
projection
- the projectionprotected Connectors.Snapshot withoutProjections(Connectors.Projection... projections)
projections
- the projectionprotected Connectors.Snapshot withProjections(Iterable<Connectors.Projection> projections)
projections
- the projectionsprotected Connectors.Snapshot withOnlyProjectionConfigurations()
projection configurations
that this
snapshot contains.public Connectors.PathMappings getPathMappings(Connector connector)
connector
- the connector for which the path mappings are requested; may not be nullprotected boolean hasReadonlyConnectors()
protected boolean isUnused(String sourceName)
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.