private static <R, S, P extends Message, Q extends Message, T extends Message> R getCellValueFromProto(ColumnInterpreter<R, S, P, Q, T> ci, AggregateResponse resp, int firstPartIndex) throws IOException { Q q = getParsedGenericInstance(ci.getClass(), 3, resp.getFirstPart(firstPartIndex)); return ci.getCellValueFromProto(q); }
private static <R, S, P extends Message, Q extends Message, T extends Message> S getPromotedValueFromProto(ColumnInterpreter<R, S, P, Q, T> ci, AggregateResponse resp, int firstPartIndex) throws IOException { T t = getParsedGenericInstance(ci.getClass(), 4, resp.getFirstPart(firstPartIndex)); return ci.getPromotedValueFromProto(t); }
@SuppressWarnings("unchecked") // Used server-side too by Aggregation Coprocesor Endpoint. Undo this interdependence. TODO. ColumnInterpreter<T,S,P,Q,R> constructColumnInterpreterFromRequest( AggregateRequest request) throws IOException { String className = request.getInterpreterClassName(); try { ColumnInterpreter<T,S,P,Q,R> ci; Class<?> cls = Class.forName(className); ci = (ColumnInterpreter<T, S, P, Q, R>) cls.getDeclaredConstructor().newInstance(); if (request.hasInterpreterSpecificBytes()) { ByteString b = request.getInterpreterSpecificBytes(); P initMsg = getParsedGenericInstance(ci.getClass(), 2, b); ci.initialize(initMsg); } return ci; } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) { throw new IOException(e); } }
private static <R, S, P extends Message, Q extends Message, T extends Message> R getCellValueFromProto(ColumnInterpreter<R, S, P, Q, T> ci, AggregateResponse resp, int firstPartIndex) throws IOException { Q q = getParsedGenericInstance(ci.getClass(), 3, resp.getFirstPart(firstPartIndex)); return ci.getCellValueFromProto(q); }
private static <R, S, P extends Message, Q extends Message, T extends Message> S getPromotedValueFromProto(ColumnInterpreter<R, S, P, Q, T> ci, AggregateResponse resp, int firstPartIndex) throws IOException { T t = getParsedGenericInstance(ci.getClass(), 4, resp.getFirstPart(firstPartIndex)); return ci.getPromotedValueFromProto(t); }
private static <R, S, P extends Message, Q extends Message, T extends Message> S getPromotedValueFromProto(ColumnInterpreter<R, S, P, Q, T> ci, AggregateResponse resp, int firstPartIndex) throws IOException { T t = getParsedGenericInstance(ci.getClass(), 4, resp.getFirstPart(firstPartIndex)); return ci.getPromotedValueFromProto(t); }
private static <R, S, P extends Message, Q extends Message, T extends Message> R getCellValueFromProto(ColumnInterpreter<R, S, P, Q, T> ci, AggregateResponse resp, int firstPartIndex) throws IOException { Q q = getParsedGenericInstance(ci.getClass(), 3, resp.getFirstPart(firstPartIndex)); return ci.getCellValueFromProto(q); }
@SuppressWarnings("unchecked") // Used server-side too by Aggregation Coprocesor Endpoint. Undo this interdependence. TODO. ColumnInterpreter<T,S,P,Q,R> constructColumnInterpreterFromRequest( AggregateRequest request) throws IOException { String className = request.getInterpreterClassName(); try { ColumnInterpreter<T,S,P,Q,R> ci; Class<?> cls = Class.forName(className); ci = (ColumnInterpreter<T, S, P, Q, R>) cls.getDeclaredConstructor().newInstance(); if (request.hasInterpreterSpecificBytes()) { ByteString b = request.getInterpreterSpecificBytes(); P initMsg = getParsedGenericInstance(ci.getClass(), 2, b); ci.initialize(initMsg); } return ci; } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) { throw new IOException(e); } }
@SuppressWarnings("unchecked") // Used server-side too by Aggregation Coprocesor Endpoint. Undo this interdependence. TODO. ColumnInterpreter<T,S,P,Q,R> constructColumnInterpreterFromRequest( AggregateRequest request) throws IOException { String className = request.getInterpreterClassName(); try { ColumnInterpreter<T,S,P,Q,R> ci; Class<?> cls = Class.forName(className); ci = (ColumnInterpreter<T, S, P, Q, R>) cls.getDeclaredConstructor().newInstance(); if (request.hasInterpreterSpecificBytes()) { ByteString b = request.getInterpreterSpecificBytes(); P initMsg = getParsedGenericInstance(ci.getClass(), 2, b); ci.initialize(initMsg); } return ci; } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) { throw new IOException(e); } }