private IoFuture<ConnectionPeerIdentity> getConnection(final AbstractInvocationContext context, final URI target, @NotNull AuthenticationContext authenticationContext) throws Exception { Affinity affinity = context.getLocator().getAffinity(); String cluster = (affinity instanceof ClusterAffinity) ? ((ClusterAffinity) affinity).getClusterName() : context.getInitialCluster(); if (cluster != null) { return doPrivileged((PrivilegedAction<IoFuture<ConnectionPeerIdentity>>) () -> discoveredNodeRegistry.getConnectedIdentityUsingClusterEffective(Endpoint.getCurrent(), target, "ejb", "jboss", authenticationContext, cluster)); } return doPrivileged((PrivilegedAction<IoFuture<ConnectionPeerIdentity>>) () -> Endpoint.getCurrent().getConnectedIdentity(target, "ejb", "jboss", authenticationContext)); } }
final String selectedNode = selector.selectNode(((ClusterAffinity) locator.getAffinity()).getClusterName(), connectedNodes.toArray(NO_STRINGS), availableNodes.toArray(NO_STRINGS)); if (selectedNode == null) { throw withSuppressed(Logs.MAIN.selectorReturnedNull(selector), problems);
final String clusterName = strongAffinityUpdate.getClusterName(); final byte[] bytes = clusterName.getBytes(StandardCharsets.UTF_8); PackedInteger.writePackedInteger(os, bytes.length);
if (weakAffinity instanceof NodeAffinity) { filterSpec = FilterSpec.all( FilterSpec.equal(FILTER_ATTR_CLUSTER, ((ClusterAffinity) affinity).getClusterName()), FilterSpec.equal(FILTER_ATTR_NODE, ((NodeAffinity) weakAffinity).getNodeName()) ); fallbackFilterSpec = FilterSpec.all( FilterSpec.equal(FILTER_ATTR_CLUSTER, ((ClusterAffinity) affinity).getClusterName()), FilterSpec.hasAttribute(FILTER_ATTR_NODE) ); FilterSpec.equal(FILTER_ATTR_CLUSTER, ((ClusterAffinity) affinity).getClusterName()) ); return doClusterDiscovery(context, filterSpec);
final String clusterName = strongAffinityUpdate.getClusterName(); final byte[] bytes = clusterName.getBytes(StandardCharsets.UTF_8); PackedInteger.writePackedInteger(os, bytes.length);
private IoFuture<ConnectionPeerIdentity> getConnection(final AbstractInvocationContext context, final URI target, @NotNull AuthenticationContext authenticationContext) throws Exception { Affinity affinity = context.getLocator().getAffinity(); String cluster = (affinity instanceof ClusterAffinity) ? ((ClusterAffinity) affinity).getClusterName() : context.getInitialCluster(); if (cluster != null) { return doPrivileged((PrivilegedAction<IoFuture<ConnectionPeerIdentity>>) () -> discoveredNodeRegistry.getConnectedIdentityUsingClusterEffective(Endpoint.getCurrent(), target, "ejb", "jboss", authenticationContext, cluster)); } return doPrivileged((PrivilegedAction<IoFuture<ConnectionPeerIdentity>>) () -> Endpoint.getCurrent().getConnectedIdentity(target, "ejb", "jboss", authenticationContext)); } }
private IoFuture<ConnectionPeerIdentity> getConnection(final AbstractInvocationContext context, final URI target, @NotNull AuthenticationContext authenticationContext) throws Exception { Affinity affinity = context.getLocator().getAffinity(); String cluster = (affinity instanceof ClusterAffinity) ? ((ClusterAffinity) affinity).getClusterName() : context.getInitialCluster(); if (cluster != null) { return doPrivileged((PrivilegedAction<IoFuture<ConnectionPeerIdentity>>) () -> discoveredNodeRegistry.getConnectedIdentityUsingClusterEffective(Endpoint.getCurrent(), target, "ejb", "jboss", authenticationContext, cluster)); } return doPrivileged((PrivilegedAction<IoFuture<ConnectionPeerIdentity>>) () -> Endpoint.getCurrent().getConnectedIdentity(target, "ejb", "jboss", authenticationContext)); } }
final String selectedNode = selector.selectNode(((ClusterAffinity) locator.getAffinity()).getClusterName(), connectedNodes.toArray(NO_STRINGS), availableNodes.toArray(NO_STRINGS)); if (selectedNode == null) { throw withSuppressed(Logs.MAIN.selectorReturnedNull(selector), problems);
final String selectedNode = selector.selectNode(((ClusterAffinity) locator.getAffinity()).getClusterName(), connectedNodes.toArray(NO_STRINGS), availableNodes.toArray(NO_STRINGS)); if (selectedNode == null) { throw withSuppressed(Logs.MAIN.selectorReturnedNull(selector), problems);
final String clusterName = strongAffinityUpdate.getClusterName(); final byte[] bytes = clusterName.getBytes(StandardCharsets.UTF_8); PackedInteger.writePackedInteger(os, bytes.length);
final String clusterName = strongAffinityUpdate.getClusterName(); final byte[] bytes = clusterName.getBytes(StandardCharsets.UTF_8); PackedInteger.writePackedInteger(os, bytes.length);
if (weakAffinity instanceof NodeAffinity) { filterSpec = FilterSpec.all( FilterSpec.equal(FILTER_ATTR_CLUSTER, ((ClusterAffinity) affinity).getClusterName()), FilterSpec.equal(FILTER_ATTR_NODE, ((NodeAffinity) weakAffinity).getNodeName()) ); fallbackFilterSpec = FilterSpec.all( FilterSpec.equal(FILTER_ATTR_CLUSTER, ((ClusterAffinity) affinity).getClusterName()), FilterSpec.hasAttribute(FILTER_ATTR_NODE) ); FilterSpec.equal(FILTER_ATTR_CLUSTER, ((ClusterAffinity) affinity).getClusterName()) ); return doClusterDiscovery(context, filterSpec);
if (weakAffinity instanceof NodeAffinity) { filterSpec = FilterSpec.all( FilterSpec.equal(FILTER_ATTR_CLUSTER, ((ClusterAffinity) affinity).getClusterName()), FilterSpec.equal(FILTER_ATTR_NODE, ((NodeAffinity) weakAffinity).getNodeName()) ); fallbackFilterSpec = FilterSpec.all( FilterSpec.equal(FILTER_ATTR_CLUSTER, ((ClusterAffinity) affinity).getClusterName()), FilterSpec.hasAttribute(FILTER_ATTR_NODE) ); FilterSpec.equal(FILTER_ATTR_CLUSTER, ((ClusterAffinity) affinity).getClusterName()) ); return doClusterDiscovery(context, filterSpec);
final String clusterName = strongAffinityUpdate.getClusterName(); final byte[] bytes = clusterName.getBytes(StandardCharsets.UTF_8); PackedInteger.writePackedInteger(os, bytes.length);
final String clusterName = strongAffinityUpdate.getClusterName(); final byte[] bytes = clusterName.getBytes(StandardCharsets.UTF_8); PackedInteger.writePackedInteger(os, bytes.length);