private Object createKey(final MethodInvocation invocation, Object defaultKey) { Object generatedKey = defaultKey; if (this.keyGenerator != null) { generatedKey = this.keyGenerator.getKey(invocation.getArguments()); } if (generatedKey == null) { // If there's a generator and he still says the key is null, that means he // really doesn't want to retry. return null; } if (this.useRawKey) { return generatedKey; } String name = StringUtils.hasText(label) ? label : invocation.getMethod().toGenericString(); return Arrays.asList(name, generatedKey); }
private Object createKey(final MethodInvocation invocation, Object defaultKey) { Object generatedKey = defaultKey; if (this.keyGenerator != null) { generatedKey = this.keyGenerator.getKey(invocation.getArguments()); } if (generatedKey == null) { // If there's a generator and he still says the key is null, that means he // really doesn't want to retry. return null; } if (this.useRawKey) { return generatedKey; } String name = StringUtils.hasText(label) ? label : invocation.getMethod().toGenericString(); return Arrays.asList(name, generatedKey); }