/** * Delegates to the wrapped {@link HystrixRequestVariableLifecycle} * @return T with initial value or null if none. */ @Override public T initialValue() { return lifecycle.initialValue(); }
/** * Delegates to the wrapped {@link HystrixRequestVariableLifecycle} * @param value * of request variable to allow cleanup activity. * <p> * If nothing needs to be cleaned up then nothing needs to be done in this method. */ @Override public void shutdown(T value) { lifecycle.shutdown(value); }
/** * Delegates to the wrapped {@link HystrixRequestVariableLifecycle} * @return T with initial value or null if none. */ @Override public T initialValue() { return lifecycle.initialValue(); }
@Override public void shutdown(T value) { rv.shutdown(value); } }
@Override public T initialValue() { return rv.initialValue(); }
/** * Delegates to the wrapped {@link HystrixRequestVariableLifecycle} * @param value * of request variable to allow cleanup activity. * <p> * If nothing needs to be cleaned up then nothing needs to be done in this method. */ @Override public void shutdown(T value) { lifecycle.shutdown(value); }
@Override public T initialValue() { return rv.initialValue(); }
@Override public void shutdown(final T value) { rv.shutdown(value); } };
@Override @SuppressWarnings("unchecked") public T get() { Execution execution = getExecution(); HystrixCommandCache commandCache = execution.maybeGet(HystrixCommandCache.class) .orElseGet(() -> { HystrixCommandCache cache = new HystrixCommandCache(); execution.add(cache); return cache; }); Object command = commandCache.get(this); if (command == null) { command = rv.initialValue(); commandCache.putIfAbsent(this, command); } return (T) command; }