- private static final class NamespaceSpecificIds {
- private final Collection<PathArgument> asPath;
- private final Collection<PathArgument> locPref;
- private final Collection<PathArgument> med;
- private final Collection<PathArgument> orig;
- private final NodeIdentifier asSetNid;
- private final NodeIdentifier asSeqNid;
-
- NamespaceSpecificIds(final QName namespace) {
- NodeIdentifier container = new NodeIdentifier(QName.create(namespace, AsPath.QNAME.getLocalName().intern()));
- NodeIdentifier leaf = new NodeIdentifier(QName.create(namespace, "segments").intern());
- this.asPath = ImmutableList.<PathArgument>of(container, leaf);
-
- container = new NodeIdentifier(QName.create(namespace, LocalPref.QNAME.getLocalName()).intern());
- leaf = new NodeIdentifier(QName.create(namespace, "pref").intern());
- this.locPref = ImmutableList.<PathArgument>of(container, leaf);
-
- container = new NodeIdentifier(QName.create(namespace, MultiExitDisc.QNAME.getLocalName()).intern());
- leaf = new NodeIdentifier(QName.create(namespace, "med").intern());
- this.med = ImmutableList.<PathArgument>of(container, leaf);
-
- container = new NodeIdentifier(QName.create(namespace, Origin.QNAME.getLocalName()).intern());
- leaf = new NodeIdentifier(QName.create(namespace, "value").intern());
- this.orig = ImmutableList.<PathArgument>of(container, leaf);
-
- this.asSetNid = new NodeIdentifier(QName.create(namespace, "as-set").intern());
- this.asSeqNid = new NodeIdentifier(QName.create(namespace, "as-sequence").intern());
- }
-
- Collection<PathArgument> getAsPath() {
- return this.asPath;
- }
-
- Collection<PathArgument> getLocPref() {
- return this.locPref;
- }
-
- Collection<PathArgument> getMed() {
- return this.med;
- }
-
- Collection<PathArgument> getOrig() {
- return this.orig;
- }
-
- NodeIdentifier getAsSet() {
- return this.asSetNid;
- }
-
- NodeIdentifier getAsSeq() {
- return this.asSeqNid;
- }
- }
-
- private static final Logger LOG = LoggerFactory.getLogger(BestPathStateImpl.class);
- private static final Cache<QNameModule, NamespaceSpecificIds> PATH_CACHE = CacheBuilder.newBuilder().weakKeys().weakValues().build();
-