Get the proper channel type. Always returns {@link ChannelType} NIO if EPOLL is not available.

@param key the property key for looking up the configured channel type
@return the channel type to use
491114
private static ChannelType getChannelType(PropertyKey key, AlluxioConfiguration conf) {
    if (!isNettyEpollAvailable()) {
      return ChannelType.NIO;
    }
    return conf.getEnum(key, ChannelType.class);
  }
710788
protected <T> T getProperty(String key, Class<T> type) {
        Object returnValue = getProperty(key);
        if (returnValue != null) {
            return (T) returnValue;
        } else {
            return null;
        }
    }
827423
public static Class<? extends Channel> getClientChannelClass(boolean isDomainSocket,
      AlluxioConfiguration conf) {
    ChannelType userChannelType = getUserChannel(conf);
    if (isDomainSocket) {
      Preconditions.checkState(userChannelType == ChannelType.EPOLL,
          "Domain sockets are only supported with EPOLL channel type.");
      return EpollDomainSocketChannel.class;
    }
    switch (userChannelType) {
      case NIO:
        return NioSocketChannel.class;
      case EPOLL:
        return EpollSocketChannel.class;
      default:
        throw new IllegalArgumentException("Unknown io type: " + userChannelType);
    }
  }
135067
private String getInternal(String key) {
		Preconditions.checkArgument(configuredOptions.containsKey(key),
			"The configuration " + key + " has not been configured.");

		return configuredOptions.get(key);
	}
301183
public String get(String key) {
        return System.getProperty(key, System.getenv(key));
    }
1313015
public <T> T getOutputValue (String key, Class<T> type)
	{
		try {
			String s = mapper.writeValueAsString(_findOutputValue(key));
			return (mapper.readValue(s, type));
		}
		catch (IOException e) {
			return null;
		}
	}
1087288
FilteredView getFilteredViewWithKey(String key) {
        if (key == null) {
            throw new IllegalArgumentException("A key must be specified.");
        }

        return filteredViews.stream().filter(v -> key.equals(v.getKey())).findFirst().orElse(null);
    }
1136445
private <T> T getTyped(PropertyKey key, Class<T> clazz) {
        Property p = getProperty(key.m_key);
        
        if (null == p || null == p.getData()) {
            return clazz.cast(m_defaults.get(key));
        }

        return clazz.cast(p.getData());
    }
748404
public static String getOption(Properties props, String key) throws IOException {
    String val = props.getProperty(key);
    if (val == null) {
      throw new IOException("Undefined property: " + key);
    }
    return val;
  }
1269144
@SuppressWarnings("unchecked") public <R, W> Converter<R, W> getTypeConverter(Class<?> key) {
        return (Converter<R, W>) typeConverts.get(key);
    }
271971
public <T> T get(Key<T> key) {
        checkState(ht);
        Object o = ht.get(key);
        if (o instanceof Factory<?>) {
            Factory<?> fac = (Factory<?>)o;
            o = fac.make(this);
            if (o instanceof Factory<?>)
                throw new AssertionError("T extends Context.Factory");
            Assert.check(ht.get(key) == o);
        }

        /* The following cast can't fail unless there was
         * cheating elsewhere, because of the invariant on ht.
         * Since we found a key of type Key<T>, the value must
         * be of type T.
         */
        return Context.<T>uncheckedCast(o);
    }
938241
public static Key<?> getProvidedKey(Key<?> key) {
    Type providerType = key.getTypeLiteral().getType();

    // If the Provider has no type parameter (raw Provider)...
    Preconditions.checkArgument(providerType instanceof ParameterizedType,
        "Expected all providers to be parameterized, but %s wasn't", key);

    Type entryType = ((ParameterizedType) providerType).getActualTypeArguments()[0];

    return key.ofType(entryType);
  }
81514
public static Class<? extends ServerChannel> getServerChannelClass(boolean isDomainSocket,
      AlluxioConfiguration conf) {
    ChannelType workerChannelType = getWorkerChannel(conf);
    if (isDomainSocket) {
      Preconditions.checkState(workerChannelType == ChannelType.EPOLL,
          "Domain sockets are only supported with EPOLL channel type.");
      return EpollServerDomainSocketChannel.class;
    }
    switch (workerChannelType) {
      case NIO:
        return NioServerSocketChannel.class;
      case EPOLL:
        return EpollServerSocketChannel.class;
      default:
        throw new IllegalArgumentException("Unknown io type: " + workerChannelType);
    }
  }
162293
public java.lang.String getHttpHeadersOrThrow(
      java.lang.String key) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, java.lang.String> map =
        internalGetHttpHeaders().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }
1328460
public function getChannel($key)
    {
        if (array_key_exists($key, $this->channels)) {
            return $this->channels[$key];
        }
        return null;
    }
176896
public static String getLatkeProperty(final String key) {
        String ret = latkeProps.getProperty(key);
        if (StringUtils.isBlank(ret)) {
            return ret;
        }

        ret = replaceEnvVars(ret);

        return ret;
    }
1214891
public String getProperty(String key)
    {
        if (properties == null)
            return null;
        String value = properties.get(key);
        if (value == null)
        {
            if (key.startsWith(PROPERTY_PREFIX))
                value = properties.get(key.substring(PROPERTY_PREFIX.length()));
            else
                value = properties.get(PROPERTY_PREFIX + key);
        }
        return value;
    }