- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {FileOutputStream f =
File file;new FileOutputStream(file)
String name;new FileOutputStream(name)
File file;new FileOutputStream(file, true)
- Smart code suggestions by Codota
}
@Deprecated public static <T> List<AstrixRemoteResult<T>> convertToAstrixRemoteResults(SpaceRemotingResult<T>[] results) { List<AstrixRemoteResult<T>> converted = new ArrayList<AstrixRemoteResult<T>>(results.length); for (SpaceRemotingResult<T> result : results) { if (result.getException() != null) { converted.add(AstrixRemoteResult.<T>failure(toRuntimeException(result.getException()), CorrelationId.undefined())); } else { converted.add(AstrixRemoteResult.successful(result.getResult())); } } return converted; }
@SuppressWarnings("unchecked") protected final <T> AstrixRemoteResult<T> toRemoteResult(AstrixServiceInvocationResponse response, Type returnType) { if (response.isServiceUnavailable()) { return AstrixRemoteResult.unavailable(response.getExceptionMsg(), CorrelationId.valueOf(response.getCorrelationId())); } if (response.hasThrownException()) { CorrelationId correlationId = CorrelationId.valueOf(response.getCorrelationId()); return AstrixRemoteResult.failure(createClientSideException(response, apiVersion), correlationId); } if (returnType.equals(Void.TYPE) || returnType.equals(Void.class)) { return AstrixRemoteResult.voidResult(); } if (isOptionalType(returnType)) { return AstrixRemoteResult.successful(restoreOptional(response, returnType)); } T result = unmarshall(response, returnType, apiVersion); return AstrixRemoteResult.successful(result); }