Resolve a distributed work manager
@param address The work manager address
@return The value
177880
public DistributedWorkManager resolveDistributedWorkManager(Address address)
   {
      if (trace)
      {
         log.tracef("resolveDistributedWorkManager(%s)", address);
         log.tracef("  ActiveWorkManagers: %s", activeWorkmanagers);
      }

      WorkManager wm = activeWorkmanagers.get(address.getWorkManagerId());

      if (wm != null)
      {
         if (wm instanceof DistributedWorkManager)
         {
            if (trace)
               log.tracef(" WorkManager: %s", wm);

            return (DistributedWorkManager)wm;
         }
         else
         {
            if (trace)
               log.tracef(" WorkManager not distributable: %s", wm);

            return null;
         }
      }

      try
      {
         // Create a new instance
         WorkManager template = workmanagers.get(address.getWorkManagerName());

         if (template != null)
         {
            wm = template.clone();
            wm.setId(address.getWorkManagerId());

            if (wm instanceof DistributedWorkManager)
            {
               DistributedWorkManager dwm = (DistributedWorkManager)wm;
               dwm.initialize();

               activeWorkmanagers.put(address.getWorkManagerId(), dwm);
               refCountWorkmanagers.put(address.getWorkManagerId(), Integer.valueOf(0));
               
               if (trace)
                  log.tracef("Created WorkManager: %s", dwm);
               
               return dwm;
            }
         }
      }
      catch (Throwable t)
      {
         //throw new IllegalStateException("The WorkManager couldn't be created: " + name);
      }

      return null;
   }
129858
public function resolveBucket(string $address, string &$name = null): string
    {
        $bucket = null;
        $length = 0;
        foreach ($this->prefixes as $id => $prefix) {
            if (strpos($address, $prefix) === 0 && strlen($prefix) > $length) {
                $bucket = $id;
                $length = strlen($prefix);
            }
        }

        if (empty($bucket)) {
            throw new ResolveException("Unable to resolve bucket of `{$address}`.");
        }

        $name = substr($address, $length);

        return $bucket;
    }
1082743
public BoltServerAddress resolve() throws UnknownHostException
    {
        String ipAddress = InetAddress.getByName( host ).getHostAddress();
        if ( ipAddress.equals( host ) )
        {
            return this;
        }
        else
        {
            return new BoltServerAddress( host, ipAddress, port );
        }
    }
255669
public ResourceAddress resolve(String... wildcards) {
        return resolve(new StatementContext() {
            @Override
            public String get(String key) {
                return null;
            }

            @Override
            public String[] getTuple(String key) {
                return null;
            }

            @Override
            public String resolve(String key) {
                return null;
            }

            @Override
            public String[] resolveTuple(String key) {
                return null;
            }

            @Override
            public LinkedList<String> collect(String key) {
                return null;
            }

            @Override
            public LinkedList<String[]> collectTuples(String key) {
                return null;
            }
        }, wildcards);
    }
657418
protected Map<Address, Long> getSelectionMap(String wmId, DistributableWork work)
   {
      if (trace)
      {
         log.tracef("getSelectionMap(%s, %s)", wmId, work);
         log.tracef("ShortRunning: %s", shortRunning);
         log.tracef("LongRunning: %s", longRunning);
      }

      Map<Address, Long> sorted = null;

      if (WorkManagerUtil.isLongRunning(work) && longRunning.get(wmId) != null)
      {
         sorted = new HashMap<Address, Long>(longRunning.get(wmId));
      }

      if (sorted == null && shortRunning.get(wmId) != null)
         sorted = new HashMap<Address, Long>(shortRunning.get(wmId));

      return sorted;
   }
467262
public static InetAddress resolveLocalAddress() {
        Set<InetAddress> addrs = resolveLocalAddresses();
        if (addrs != null && !addrs.isEmpty()) return addrs.iterator().next();
        return null;
    }
727751
@Nullable
  public static InetSocketAddress parseInetSocketAddress(String address) throws IOException {
    if (address == null) {
      return null;
    }
    String[] strArr = address.split(":");
    if (strArr.length != 2) {
      throw new IOException("Invalid InetSocketAddress " + address);
    }
    return new InetSocketAddress(strArr[0], Integer.parseInt(strArr[1]));
  }
1154240
public static BitSet getSwitchGroupAddress(String address) {
        if (address.length() != 5) {
            throw new IllegalArgumentException("the switchGroupAddress must consist of exactly 5 bits!");
        }
        BitSet bitSet = new BitSet(5);
        for (int i = 0; i < 5; i++) {
            bitSet.set(i, address.charAt(i) == '1');
        }
        return bitSet;
    }
1086199
public static Address from(String address) {
    int lastColon = address.lastIndexOf(':');
    int openBracket = address.indexOf('[');
    int closeBracket = address.indexOf(']');

    String host;
    if (openBracket != -1 && closeBracket != -1) {
      host = address.substring(openBracket + 1, closeBracket);
    } else if (lastColon != -1) {
      host = address.substring(0, lastColon);
    } else {
      host = address;
    }

    int port;
    if (lastColon != -1) {
      try {
        port = Integer.parseInt(address.substring(lastColon + 1));
      } catch (NumberFormatException e) {
        throw new MalformedAddressException(address, e);
      }
    } else {
      port = DEFAULT_PORT;
    }
    return new Address(host, port);
  }
521007
public static InetAddress resolveLocalNet(String host, 
                                              String netInterface) 
    	throws IOException {
        
        return resolveLocalNet(host, netInterface, null);
    }
998959
public static ModelNode getParentAddress(final ModelNode address) {
        if (address.getType() != ModelType.LIST) {
            throw new IllegalArgumentException("The address type must be a list.");
        }
        final ModelNode result = new ModelNode();
        final List<Property> addressParts = address.asPropertyList();
        if (addressParts.isEmpty()) {
            throw new IllegalArgumentException("The address is empty.");
        }
        for (int i = 0; i < addressParts.size() - 1; ++i) {
            final Property property = addressParts.get(i);
            result.add(property.getName(), property.getValue());
        }
        return result;
    }
487983
public alluxio.grpc.WorkerNetAddressOrBuilder getWorkerNetAddressOrBuilder() {
    return workerNetAddress_ == null ? alluxio.grpc.WorkerNetAddress.getDefaultInstance() : workerNetAddress_;
  }
1358380
public void localWorkManagerAdd(Address address, T physicalAddress)
   {
      if (trace)
         log.tracef("LOCAL_WORKMANAGER_ADD(%s, %s)", address, physicalAddress);

      join(address, physicalAddress);
   }
990488
public static SocketAddress resolve(RedisURI redisURI, DnsResolver dnsResolver) {

        if (redisURI.getSocket() != null) {
            return redisURI.getResolvedAddress();
        }

        try {
            InetAddress[] inetAddress = dnsResolver.resolve(redisURI.getHost());

            if (inetAddress.length == 0) {
                return InetSocketAddress.createUnresolved(redisURI.getHost(), redisURI.getPort());
            }

            return new InetSocketAddress(inetAddress[0], redisURI.getPort());
        } catch (UnknownHostException e) {
            return redisURI.getResolvedAddress();
        }
    }
731007
function resolveAddresses(provider, value, paramType) {
    if (Array.isArray(paramType)) {
        var promises_1 = [];
        paramType.forEach(function (paramType, index) {
            var v = null;
            if (Array.isArray(value)) {
                v = value[index];
            }
            else {
                v = value[paramType.name];
            }
            promises_1.push(resolveAddresses(provider, v, paramType));
        });
        return Promise.all(promises_1);
    }
    if (paramType.type === 'address') {
        return provider.resolveName(value);
    }
    if (paramType.type === 'tuple') {
        return resolveAddresses(provider, value, paramType.components);
    }
    // Strips one level of array indexing off the end to recuse into
    var isArrayMatch = paramType.type.match(/(.*)(\[[0-9]*\]$)/);
    if (isArrayMatch) {
        if (!Array.isArray(value)) {
            throw new Error('invalid value for array');
        }
        var promises = [];
        var subParamType = {
            components: paramType.components,
            type: isArrayMatch[1],
        };
        value.forEach(function (v) {
            promises.push(resolveAddresses(provider, v, subParamType));
        });
        return Promise.all(promises);
    }
    return Promise.resolve(value);
}
499409
public Iterable<DUser> queryByAddress1(java.lang.String address1) {
    return queryByField(null, DUserMapper.Field.ADDRESS1.getFieldName(), address1);
  }
983625
public static Member member(MemberId memberId, Address address) {
    return builder(memberId)
        .withAddress(address)
        .build();
  }