chore: add @Override tag on some methods (#6304)
This commit is contained in:
parent
5edcdeecde
commit
d4ea997523
|
|
@ -105,6 +105,7 @@
|
|||
<module name="TypeName">
|
||||
<property name="format" value="(^[A-Z][a-zA-Z0-9]*$)|(^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$)"/>
|
||||
</module>
|
||||
<module name="MissingOverride"/>
|
||||
|
||||
<!--whitespace-->
|
||||
<module name="GenericWhitespace"/>
|
||||
|
|
|
|||
|
|
@ -54,18 +54,22 @@ public class AtomicRangeInteger extends Number implements Serializable {
|
|||
return this.values.get(VALUE_OFFSET);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int intValue() {
|
||||
return this.values.get(VALUE_OFFSET);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long longValue() {
|
||||
return this.values.get(VALUE_OFFSET);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float floatValue() {
|
||||
return this.values.get(VALUE_OFFSET);
|
||||
}
|
||||
|
||||
@Override
|
||||
public double doubleValue() {
|
||||
return this.values.get(VALUE_OFFSET);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -176,6 +176,7 @@ public class CorrelationContext {
|
|||
/**
|
||||
* Clone the context data, work for capture to cross-thread.
|
||||
*/
|
||||
@Override
|
||||
public CorrelationContext clone() {
|
||||
final CorrelationContext context = new CorrelationContext();
|
||||
context.data.putAll(this.data);
|
||||
|
|
|
|||
|
|
@ -37,10 +37,12 @@ public enum ThrowableTransformer {
|
|||
stackMessage.append(printExceptionInfo(causeException));
|
||||
|
||||
boolean isLookDeeper = printStackElement(causeException.getStackTrace(), new AppendListener() {
|
||||
@Override
|
||||
public void append(String value) {
|
||||
stackMessage.append(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean overMaxLength() {
|
||||
return stackMessage.length() > maxLength;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ public class ProtectiveShieldMatcher<T> extends ElementMatcher.Junction.Abstract
|
|||
this.matcher = matcher;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean matches(T target) {
|
||||
try {
|
||||
return this.matcher.matches(target);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -63,451 +63,563 @@ public class SWPreparedStatement implements PreparedStatement {
|
|||
this.sql = sql;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultSet executeQuery(String sql) throws SQLException {
|
||||
return PreparedStatementTracing.execute(realStatement, connectInfo, "executeQuery", sql, new PreparedStatementTracing.Executable<ResultSet>() {
|
||||
@Override
|
||||
public ResultSet exe(PreparedStatement realStatement, String sql) throws SQLException {
|
||||
return realStatement.executeQuery(sql);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public int executeUpdate(String sql) throws SQLException {
|
||||
return PreparedStatementTracing.execute(realStatement, connectInfo, "executeUpdate", sql, new PreparedStatementTracing.Executable<Integer>() {
|
||||
@Override
|
||||
public Integer exe(PreparedStatement realStatement, String sql) throws SQLException {
|
||||
return realStatement.executeUpdate(sql);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() throws SQLException {
|
||||
realStatement.close();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFieldSize() throws SQLException {
|
||||
return realStatement.getMaxFieldSize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMaxFieldSize(int max) throws SQLException {
|
||||
realStatement.setMaxFieldSize(max);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxRows() throws SQLException {
|
||||
return realStatement.getMaxRows();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMaxRows(int max) throws SQLException {
|
||||
realStatement.setMaxRows(max);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEscapeProcessing(boolean enable) throws SQLException {
|
||||
realStatement.setEscapeProcessing(enable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getQueryTimeout() throws SQLException {
|
||||
return realStatement.getQueryTimeout();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setQueryTimeout(int seconds) throws SQLException {
|
||||
realStatement.setQueryTimeout(seconds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cancel() throws SQLException {
|
||||
realStatement.cancel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SQLWarning getWarnings() throws SQLException {
|
||||
return realStatement.getWarnings();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearWarnings() throws SQLException {
|
||||
realStatement.clearWarnings();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCursorName(String name) throws SQLException {
|
||||
realStatement.setCursorName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(String sql) throws SQLException {
|
||||
return PreparedStatementTracing.execute(realStatement, connectInfo, "execute", sql, new PreparedStatementTracing.Executable<Boolean>() {
|
||||
@Override
|
||||
public Boolean exe(PreparedStatement realStatement, String sql) throws SQLException {
|
||||
return realStatement.execute(sql);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultSet getResultSet() throws SQLException {
|
||||
return realStatement.getResultSet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getUpdateCount() throws SQLException {
|
||||
return realStatement.getUpdateCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getMoreResults() throws SQLException {
|
||||
return realStatement.getMoreResults();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFetchDirection(int direction) throws SQLException {
|
||||
realStatement.setFetchDirection(direction);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFetchDirection() throws SQLException {
|
||||
return realStatement.getFetchDirection();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFetchSize(int rows) throws SQLException {
|
||||
realStatement.setFetchSize(rows);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFetchSize() throws SQLException {
|
||||
return realStatement.getFetchSize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getResultSetConcurrency() throws SQLException {
|
||||
return realStatement.getResultSetConcurrency();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getResultSetType() throws SQLException {
|
||||
return realStatement.getResultSetType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBatch(String sql) throws SQLException {
|
||||
realStatement.addBatch(sql);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearBatch() throws SQLException {
|
||||
realStatement.clearBatch();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] executeBatch() throws SQLException {
|
||||
return PreparedStatementTracing.execute(realStatement, connectInfo, "executeBatch", "", new PreparedStatementTracing.Executable<int[]>() {
|
||||
@Override
|
||||
public int[] exe(PreparedStatement realStatement, String sql) throws SQLException {
|
||||
return realStatement.executeBatch();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public Connection getConnection() throws SQLException {
|
||||
return realConnection;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getMoreResults(int current) throws SQLException {
|
||||
return realStatement.getMoreResults(current);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultSet getGeneratedKeys() throws SQLException {
|
||||
return realStatement.getGeneratedKeys();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int executeUpdate(String sql, final int autoGeneratedKeys) throws SQLException {
|
||||
return PreparedStatementTracing.execute(realStatement, connectInfo, "executeUpdate", sql, new PreparedStatementTracing.Executable<Integer>() {
|
||||
@Override
|
||||
public Integer exe(PreparedStatement realStatement, String sql) throws SQLException {
|
||||
return realStatement.executeUpdate(sql, autoGeneratedKeys);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public int executeUpdate(String sql, final int[] columnIndexes) throws SQLException {
|
||||
return PreparedStatementTracing.execute(realStatement, connectInfo, "executeUpdate", sql, new PreparedStatementTracing.Executable<Integer>() {
|
||||
@Override
|
||||
public Integer exe(PreparedStatement realStatement, String sql) throws SQLException {
|
||||
return realStatement.executeUpdate(sql, columnIndexes);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public int executeUpdate(String sql, final String[] columnNames) throws SQLException {
|
||||
return PreparedStatementTracing.execute(realStatement, connectInfo, "executeUpdate", sql, new PreparedStatementTracing.Executable<Integer>() {
|
||||
@Override
|
||||
public Integer exe(PreparedStatement realStatement, String sql) throws SQLException {
|
||||
return realStatement.executeUpdate(sql, columnNames);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(String sql, final int autoGeneratedKeys) throws SQLException {
|
||||
return PreparedStatementTracing.execute(realStatement, connectInfo, "execute", sql, new PreparedStatementTracing.Executable<Boolean>() {
|
||||
@Override
|
||||
public Boolean exe(PreparedStatement realStatement, String sql) throws SQLException {
|
||||
return realStatement.execute(sql, autoGeneratedKeys);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(String sql, final int[] columnIndexes) throws SQLException {
|
||||
return PreparedStatementTracing.execute(realStatement, connectInfo, "execute", sql, new PreparedStatementTracing.Executable<Boolean>() {
|
||||
@Override
|
||||
public Boolean exe(PreparedStatement realStatement, String sql) throws SQLException {
|
||||
return realStatement.execute(sql, columnIndexes);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(String sql, final String[] columnNames) throws SQLException {
|
||||
return PreparedStatementTracing.execute(realStatement, connectInfo, "execute", sql, new PreparedStatementTracing.Executable<Boolean>() {
|
||||
@Override
|
||||
public Boolean exe(PreparedStatement realStatement, String sql) throws SQLException {
|
||||
return realStatement.execute(sql, columnNames);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getResultSetHoldability() throws SQLException {
|
||||
return realStatement.getResultSetHoldability();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isClosed() throws SQLException {
|
||||
return realStatement.isClosed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPoolable(boolean poolable) throws SQLException {
|
||||
realStatement.setPoolable(poolable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPoolable() throws SQLException {
|
||||
return realStatement.isPoolable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeOnCompletion() throws SQLException {
|
||||
realStatement.closeOnCompletion();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCloseOnCompletion() throws SQLException {
|
||||
return realStatement.isCloseOnCompletion();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T unwrap(Class<T> iface) throws SQLException {
|
||||
return realStatement.unwrap(iface);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isWrapperFor(Class<?> iface) throws SQLException {
|
||||
return realStatement.isWrapperFor(iface);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultSet executeQuery() throws SQLException {
|
||||
return PreparedStatementTracing.execute(realStatement, connectInfo, "executeQuery", sql, new PreparedStatementTracing.Executable<ResultSet>() {
|
||||
@Override
|
||||
public ResultSet exe(PreparedStatement realStatement, String sql) throws SQLException {
|
||||
return realStatement.executeQuery();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public int executeUpdate() throws SQLException {
|
||||
return PreparedStatementTracing.execute(realStatement, connectInfo, "executeUpdate", sql, new PreparedStatementTracing.Executable<Integer>() {
|
||||
@Override
|
||||
public Integer exe(PreparedStatement realStatement, String sql) throws SQLException {
|
||||
return realStatement.executeUpdate();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNull(int parameterIndex, int sqlType) throws SQLException {
|
||||
realStatement.setNull(parameterIndex, sqlType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBoolean(int parameterIndex, boolean x) throws SQLException {
|
||||
realStatement.setBoolean(parameterIndex, x);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setByte(int parameterIndex, byte x) throws SQLException {
|
||||
realStatement.setByte(parameterIndex, x);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setShort(int parameterIndex, short x) throws SQLException {
|
||||
realStatement.setShort(parameterIndex, x);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInt(int parameterIndex, int x) throws SQLException {
|
||||
realStatement.setInt(parameterIndex, x);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLong(int parameterIndex, long x) throws SQLException {
|
||||
realStatement.setLong(parameterIndex, x);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFloat(int parameterIndex, float x) throws SQLException {
|
||||
realStatement.setFloat(parameterIndex, x);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDouble(int parameterIndex, double x) throws SQLException {
|
||||
realStatement.setDouble(parameterIndex, x);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException {
|
||||
realStatement.setBigDecimal(parameterIndex, x);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setString(int parameterIndex, String x) throws SQLException {
|
||||
realStatement.setString(parameterIndex, x);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBytes(int parameterIndex, byte[] x) throws SQLException {
|
||||
realStatement.setBytes(parameterIndex, x);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDate(int parameterIndex, Date x) throws SQLException {
|
||||
realStatement.setDate(parameterIndex, x);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTime(int parameterIndex, Time x) throws SQLException {
|
||||
realStatement.setTime(parameterIndex, x);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException {
|
||||
realStatement.setTimestamp(parameterIndex, x);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException {
|
||||
realStatement.setAsciiStream(parameterIndex, x, length);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public void setUnicodeStream(int parameterIndex, InputStream x, int length) throws SQLException {
|
||||
realStatement.setUnicodeStream(parameterIndex, x, length);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException {
|
||||
realStatement.setBinaryStream(parameterIndex, x, length);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearParameters() throws SQLException {
|
||||
realStatement.clearParameters();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException {
|
||||
realStatement.setObject(parameterIndex, x, targetSqlType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setObject(int parameterIndex, Object x) throws SQLException {
|
||||
realStatement.setObject(parameterIndex, x);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute() throws SQLException {
|
||||
return PreparedStatementTracing.execute(realStatement, connectInfo, "execute", sql, new PreparedStatementTracing.Executable<Boolean>() {
|
||||
@Override
|
||||
public Boolean exe(PreparedStatement realStatement, String sql) throws SQLException {
|
||||
return realStatement.execute();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBatch() throws SQLException {
|
||||
realStatement.addBatch();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException {
|
||||
realStatement.setCharacterStream(parameterIndex, reader, length);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRef(int parameterIndex, Ref x) throws SQLException {
|
||||
realStatement.setRef(parameterIndex, x);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlob(int parameterIndex, Blob x) throws SQLException {
|
||||
realStatement.setBlob(parameterIndex, x);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setClob(int parameterIndex, Clob x) throws SQLException {
|
||||
realStatement.setClob(parameterIndex, x);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setArray(int parameterIndex, Array x) throws SQLException {
|
||||
realStatement.setArray(parameterIndex, x);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultSetMetaData getMetaData() throws SQLException {
|
||||
return realStatement.getMetaData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException {
|
||||
realStatement.setDate(parameterIndex, x, cal);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException {
|
||||
realStatement.setTime(parameterIndex, x, cal);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException {
|
||||
realStatement.setTimestamp(parameterIndex, x, cal);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNull(int parameterIndex, int sqlType, String typeName) throws SQLException {
|
||||
realStatement.setNull(parameterIndex, sqlType, typeName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setURL(int parameterIndex, URL x) throws SQLException {
|
||||
realStatement.setURL(parameterIndex, x);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ParameterMetaData getParameterMetaData() throws SQLException {
|
||||
return realStatement.getParameterMetaData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRowId(int parameterIndex, RowId x) throws SQLException {
|
||||
realStatement.setRowId(parameterIndex, x);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNString(int parameterIndex, String value) throws SQLException {
|
||||
realStatement.setNString(parameterIndex, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException {
|
||||
realStatement.setNCharacterStream(parameterIndex, value, length);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNClob(int parameterIndex, NClob value) throws SQLException {
|
||||
realStatement.setNClob(parameterIndex, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setClob(int parameterIndex, Reader reader, long length) throws SQLException {
|
||||
realStatement.setClob(parameterIndex, reader, length);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException {
|
||||
realStatement.setBlob(parameterIndex, inputStream, length);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException {
|
||||
realStatement.setNClob(parameterIndex, reader, length);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException {
|
||||
realStatement.setSQLXML(parameterIndex, xmlObject);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength) throws SQLException {
|
||||
realStatement.setObject(parameterIndex, x, targetSqlType, scaleOrLength);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException {
|
||||
realStatement.setAsciiStream(parameterIndex, x, length);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException {
|
||||
realStatement.setBinaryStream(parameterIndex, x, length);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException {
|
||||
realStatement.setCharacterStream(parameterIndex, reader, length);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException {
|
||||
realStatement.setAsciiStream(parameterIndex, x);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException {
|
||||
realStatement.setBinaryStream(parameterIndex, x);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException {
|
||||
realStatement.setCharacterStream(parameterIndex, reader);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException {
|
||||
realStatement.setNCharacterStream(parameterIndex, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setClob(int parameterIndex, Reader reader) throws SQLException {
|
||||
realStatement.setClob(parameterIndex, reader);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException {
|
||||
realStatement.setBlob(parameterIndex, inputStream);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNClob(int parameterIndex, Reader reader) throws SQLException {
|
||||
realStatement.setNClob(parameterIndex, reader);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,218 +42,272 @@ public class SWStatement implements java.sql.Statement {
|
|||
this.connectInfo = connectInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T unwrap(Class<T> iface) throws SQLException {
|
||||
return realStatement.unwrap(iface);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isWrapperFor(Class<?> iface) throws SQLException {
|
||||
return realStatement.isWrapperFor(iface);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultSet executeQuery(String sql) throws SQLException {
|
||||
return StatementTracing.execute(realStatement, connectInfo, "executeQuery", sql, new StatementTracing.Executable<ResultSet>() {
|
||||
@Override
|
||||
public ResultSet exe(java.sql.Statement realStatement, String sql) throws SQLException {
|
||||
return realStatement.executeQuery(sql);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public int executeUpdate(String sql) throws SQLException {
|
||||
return StatementTracing.execute(realStatement, connectInfo, "executeUpdate", sql, new StatementTracing.Executable<Integer>() {
|
||||
@Override
|
||||
public Integer exe(java.sql.Statement realStatement, String sql) throws SQLException {
|
||||
return realStatement.executeUpdate(sql);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() throws SQLException {
|
||||
realStatement.close();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFieldSize() throws SQLException {
|
||||
return realStatement.getMaxFieldSize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMaxFieldSize(int max) throws SQLException {
|
||||
realStatement.setMaxFieldSize(max);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxRows() throws SQLException {
|
||||
return realStatement.getMaxRows();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMaxRows(int max) throws SQLException {
|
||||
realStatement.setMaxRows(max);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEscapeProcessing(boolean enable) throws SQLException {
|
||||
realStatement.setEscapeProcessing(enable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getQueryTimeout() throws SQLException {
|
||||
return realStatement.getQueryTimeout();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setQueryTimeout(int seconds) throws SQLException {
|
||||
realStatement.setQueryTimeout(seconds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cancel() throws SQLException {
|
||||
realStatement.cancel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SQLWarning getWarnings() throws SQLException {
|
||||
return realStatement.getWarnings();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearWarnings() throws SQLException {
|
||||
realStatement.clearWarnings();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCursorName(String name) throws SQLException {
|
||||
realStatement.setCursorName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(String sql) throws SQLException {
|
||||
return StatementTracing.execute(realStatement, connectInfo, "execute", sql, new StatementTracing.Executable<Boolean>() {
|
||||
@Override
|
||||
public Boolean exe(java.sql.Statement realStatement, String sql) throws SQLException {
|
||||
return realStatement.execute(sql);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultSet getResultSet() throws SQLException {
|
||||
return realStatement.getResultSet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getUpdateCount() throws SQLException {
|
||||
return realStatement.getUpdateCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getMoreResults() throws SQLException {
|
||||
return realStatement.getMoreResults();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFetchDirection(int direction) throws SQLException {
|
||||
realStatement.setFetchDirection(direction);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFetchDirection() throws SQLException {
|
||||
return realStatement.getFetchDirection();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFetchSize(int rows) throws SQLException {
|
||||
realStatement.setFetchSize(rows);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFetchSize() throws SQLException {
|
||||
return realStatement.getFetchSize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getResultSetConcurrency() throws SQLException {
|
||||
return realStatement.getResultSetConcurrency();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getResultSetType() throws SQLException {
|
||||
return realStatement.getResultSetType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBatch(String sql) throws SQLException {
|
||||
realStatement.addBatch(sql);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearBatch() throws SQLException {
|
||||
realStatement.clearBatch();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] executeBatch() throws SQLException {
|
||||
return StatementTracing.execute(realStatement, connectInfo, "executeBatch", "", new StatementTracing.Executable<int[]>() {
|
||||
@Override
|
||||
public int[] exe(java.sql.Statement realStatement, String sql) throws SQLException {
|
||||
return realStatement.executeBatch();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public Connection getConnection() throws SQLException {
|
||||
return this.realConnection;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getMoreResults(int current) throws SQLException {
|
||||
return realStatement.getMoreResults(current);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultSet getGeneratedKeys() throws SQLException {
|
||||
return realStatement.getGeneratedKeys();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int executeUpdate(String sql, final int autoGeneratedKeys) throws SQLException {
|
||||
return StatementTracing.execute(realStatement, connectInfo, "executeUpdate", sql, new StatementTracing.Executable<Integer>() {
|
||||
@Override
|
||||
public Integer exe(java.sql.Statement realStatement, String sql) throws SQLException {
|
||||
return realStatement.executeUpdate(sql, autoGeneratedKeys);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public int executeUpdate(String sql, final int[] columnIndexes) throws SQLException {
|
||||
return StatementTracing.execute(realStatement, connectInfo, "executeUpdate", sql, new StatementTracing.Executable<Integer>() {
|
||||
@Override
|
||||
public Integer exe(java.sql.Statement realStatement, String sql) throws SQLException {
|
||||
return realStatement.executeUpdate(sql, columnIndexes);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public int executeUpdate(String sql, final String[] columnNames) throws SQLException {
|
||||
return StatementTracing.execute(realStatement, connectInfo, "executeUpdate", sql, new StatementTracing.Executable<Integer>() {
|
||||
@Override
|
||||
public Integer exe(java.sql.Statement realStatement, String sql) throws SQLException {
|
||||
return realStatement.executeUpdate(sql, columnNames);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(String sql, final int autoGeneratedKeys) throws SQLException {
|
||||
return StatementTracing.execute(realStatement, connectInfo, "execute", sql, new StatementTracing.Executable<Boolean>() {
|
||||
@Override
|
||||
public Boolean exe(java.sql.Statement realStatement, String sql) throws SQLException {
|
||||
return realStatement.execute(sql, autoGeneratedKeys);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(String sql, final int[] columnIndexes) throws SQLException {
|
||||
return StatementTracing.execute(realStatement, connectInfo, "execute", sql, new StatementTracing.Executable<Boolean>() {
|
||||
@Override
|
||||
public Boolean exe(java.sql.Statement realStatement, String sql) throws SQLException {
|
||||
return realStatement.execute(sql, columnIndexes);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(String sql, final String[] columnNames) throws SQLException {
|
||||
return StatementTracing.execute(realStatement, connectInfo, "execute", sql, new StatementTracing.Executable<Boolean>() {
|
||||
@Override
|
||||
public Boolean exe(java.sql.Statement realStatement, String sql) throws SQLException {
|
||||
return realStatement.execute(sql, columnNames);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getResultSetHoldability() throws SQLException {
|
||||
return realStatement.getResultSetHoldability();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isClosed() throws SQLException {
|
||||
return realStatement.isClosed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPoolable(boolean poolable) throws SQLException {
|
||||
realStatement.setPoolable(poolable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPoolable() throws SQLException {
|
||||
return realStatement.isPoolable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeOnCompletion() throws SQLException {
|
||||
realStatement.closeOnCompletion();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCloseOnCompletion() throws SQLException {
|
||||
return realStatement.isCloseOnCompletion();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,5 +73,6 @@ public abstract class AbstractNutzHttpInstrumentation extends ClassInstanceMetho
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected abstract ClassMatch enhanceClass();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch;
|
|||
|
||||
public class NutzHttpFilePostSenderInstrumentation extends AbstractNutzHttpInstrumentation {
|
||||
|
||||
@Override
|
||||
protected ClassMatch enhanceClass() {
|
||||
return NameMatch.byName("org.nutz.http.sender.FilePostSender");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
<option name="CLASS_NAMES_IN_JAVADOC" value="3" />
|
||||
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
|
||||
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
|
||||
<option name="INSERT_OVERRIDE_ANNOTATION" value="true" />
|
||||
<option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
|
||||
<value />
|
||||
</option>
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ public abstract class PercentileMetrics extends Metrics implements MultiIntValue
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getValues() {
|
||||
return percentileValues.sortedValues(Comparator.comparingInt(Integer::parseInt))
|
||||
.stream()
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ public class MetricsStreamProcessor implements StreamProcessor<Metrics> {
|
|||
return PROCESSOR;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void in(Metrics metrics) {
|
||||
MetricsAggregateWorker worker = entryWorkers.get(metrics.getClass());
|
||||
if (worker != null) {
|
||||
|
|
@ -93,6 +94,7 @@ public class MetricsStreamProcessor implements StreamProcessor<Metrics> {
|
|||
* @param stream definition of the metrics class.
|
||||
* @param metricsClass data type of the streaming calculation.
|
||||
*/
|
||||
@Override
|
||||
public void create(ModuleDefineHolder moduleDefineHolder, Stream stream, Class<? extends Metrics> metricsClass) throws StorageException {
|
||||
this.create(moduleDefineHolder, StreamDefinition.from(stream), metricsClass);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ public class RecordStreamProcessor implements StreamProcessor<Record> {
|
|||
return PROCESSOR;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void in(Record record) {
|
||||
RecordPersistentWorker worker = workers.get(record.getClass());
|
||||
if (worker != null) {
|
||||
|
|
@ -53,6 +54,7 @@ public class RecordStreamProcessor implements StreamProcessor<Record> {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void create(ModuleDefineHolder moduleDefineHolder, Stream stream, Class<? extends Record> recordClass) throws StorageException {
|
||||
if (DisableRegister.INSTANCE.include(stream.name())) {
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ public class TopNStreamProcessor implements StreamProcessor<TopN> {
|
|||
return PROCESSOR;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void create(ModuleDefineHolder moduleDefineHolder, Stream stream, Class<? extends TopN> topNClass) throws StorageException {
|
||||
if (DisableRegister.INSTANCE.include(stream.name())) {
|
||||
|
|
@ -88,6 +89,7 @@ public class TopNStreamProcessor implements StreamProcessor<TopN> {
|
|||
workers.put(topNClass, persistentWorker);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void in(TopN topN) {
|
||||
TopNWorker worker = workers.get(topN.getClass());
|
||||
if (worker != null) {
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ public abstract class ModelInstaller implements ModelCreator.CreatingListener {
|
|||
protected final Client client;
|
||||
private final ModuleManager moduleManager;
|
||||
|
||||
@Override
|
||||
public void whenCreating(Model model) throws StorageException {
|
||||
if (RunningMode.isNoInitMode()) {
|
||||
while (!isExists(model)) {
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ public class DynamicSslContext extends AbstractSslContext {
|
|||
super(caFile);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateContext(String caFile) {
|
||||
try {
|
||||
setCtx(GrpcSslContexts.forClient().trustManager(Paths.get(caFile).toFile()).build());
|
||||
|
|
@ -58,6 +59,7 @@ public class DynamicSslContext extends AbstractSslContext {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateContext(final String privateKeyFile, final String certChainFile) {
|
||||
try {
|
||||
setCtx(GrpcSslContexts
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ public class CustomThreadFactory implements ThreadFactory {
|
|||
namePrefix = name + "-" + poolNumber.getAndIncrement() + "-thread-";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Thread newThread(Runnable r) {
|
||||
Thread t = new Thread(group, r, namePrefix + threadNumber.getAndIncrement(), 0);
|
||||
if (t.isDaemon())
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ public class HttpDynamicSslContext extends AbstractSslContext {
|
|||
super(caFile);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateContext(String caFile) {
|
||||
try {
|
||||
setCtx(SslContextBuilder.forClient().trustManager(Paths.get(caFile).toFile()).build());
|
||||
|
|
@ -51,6 +52,7 @@ public class HttpDynamicSslContext extends AbstractSslContext {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateContext(final String privateKeyFile, final String certChainFile) {
|
||||
try {
|
||||
setCtx(SslContextBuilder
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ public class JaegerGRPCHandler extends CollectorServiceGrpc.CollectorServiceImpl
|
|||
this.config = config;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postSpans(Collector.PostSpansRequest request,
|
||||
StreamObserver<Collector.PostSpansResponse> responseObserver) {
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ public class AlarmQueryEsDAO extends EsDAO implements IAlarmQueryDAO {
|
|||
super(client);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Alarms getAlarm(final Integer scopeId, final String keyword, final int limit, final int from,
|
||||
final long startTB, final long endTB) throws IOException {
|
||||
SearchSourceBuilder sourceBuilder = SearchSourceBuilder.searchSource();
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ public class StorageEs7Installer extends StorageEsInstaller {
|
|||
super(client, moduleManager, config);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
protected Map<String, Object> createMapping(Model model) {
|
||||
Map<String, Object> mapping = super.createMapping(model);
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@ public class ElasticSearch7Client extends ElasticSearchClient {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean createIndex(String indexName) throws IOException {
|
||||
indexName = formatIndexName(indexName);
|
||||
|
||||
|
|
@ -111,6 +112,7 @@ public class ElasticSearch7Client extends ElasticSearchClient {
|
|||
return response.isAcknowledged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean createIndex(String indexName, Map<String, Object> settings,
|
||||
Map<String, Object> mapping) throws IOException {
|
||||
indexName = formatIndexName(indexName);
|
||||
|
|
@ -141,6 +143,7 @@ public class ElasticSearch7Client extends ElasticSearchClient {
|
|||
return new ArrayList<>(alias.getAliases().keySet());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean deleteIndex(String indexName, boolean formatIndexName) throws IOException {
|
||||
if (formatIndexName) {
|
||||
indexName = formatIndexName(indexName);
|
||||
|
|
@ -151,12 +154,14 @@ public class ElasticSearch7Client extends ElasticSearchClient {
|
|||
return response.isAcknowledged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isExistsIndex(String indexName) throws IOException {
|
||||
indexName = formatIndexName(indexName);
|
||||
GetIndexRequest request = new GetIndexRequest(indexName);
|
||||
return client.indices().exists(request, RequestOptions.DEFAULT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isExistsTemplate(String indexName) throws IOException {
|
||||
indexName = formatIndexName(indexName);
|
||||
|
||||
|
|
@ -165,6 +170,7 @@ public class ElasticSearch7Client extends ElasticSearchClient {
|
|||
return client.indices().existsTemplate(indexTemplatesExistRequest, RequestOptions.DEFAULT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean createTemplate(String indexName, Map<String, Object> settings,
|
||||
Map<String, Object> mapping) throws IOException {
|
||||
indexName = formatIndexName(indexName);
|
||||
|
|
@ -182,6 +188,7 @@ public class ElasticSearch7Client extends ElasticSearchClient {
|
|||
return acknowledgedResponse.isAcknowledged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteTemplate(String indexName) throws IOException {
|
||||
indexName = formatIndexName(indexName);
|
||||
|
||||
|
|
@ -209,6 +216,7 @@ public class ElasticSearch7Client extends ElasticSearchClient {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetResponse get(String indexName, String id) throws IOException {
|
||||
indexName = formatIndexName(indexName);
|
||||
GetRequest request = new GetRequest(indexName, id);
|
||||
|
|
@ -222,6 +230,7 @@ public class ElasticSearch7Client extends ElasticSearchClient {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public SearchResponse ids(String indexName, String[] ids) throws IOException {
|
||||
indexName = formatIndexName(indexName);
|
||||
|
||||
|
|
@ -237,6 +246,7 @@ public class ElasticSearch7Client extends ElasticSearchClient {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void forceInsert(String indexName, String id, XContentBuilder source) throws IOException {
|
||||
IndexRequest request = (IndexRequest) prepareInsert(indexName, id, source);
|
||||
request.setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE);
|
||||
|
|
@ -249,6 +259,7 @@ public class ElasticSearch7Client extends ElasticSearchClient {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void forceUpdate(String indexName, String id, XContentBuilder source) throws IOException {
|
||||
org.elasticsearch.action.update.UpdateRequest request = (org.elasticsearch.action.update.UpdateRequest) prepareUpdate(
|
||||
indexName, id, source);
|
||||
|
|
@ -262,16 +273,19 @@ public class ElasticSearch7Client extends ElasticSearchClient {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public InsertRequest prepareInsert(String indexName, String id, XContentBuilder source) {
|
||||
indexName = formatIndexName(indexName);
|
||||
return new ElasticSearch7InsertRequest(indexName, id).source(source);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UpdateRequest prepareUpdate(String indexName, String id, XContentBuilder source) {
|
||||
indexName = formatIndexName(indexName);
|
||||
return new ElasticSearch7UpdateRequest(indexName, id).doc(source);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int delete(String indexName, String timeBucketColumnName, long endTimeBucket) throws IOException {
|
||||
indexName = formatIndexName(indexName);
|
||||
|
||||
|
|
@ -286,6 +300,7 @@ public class ElasticSearch7Client extends ElasticSearchClient {
|
|||
return HttpStatus.SC_OK;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void synchronousBulk(BulkRequest request) {
|
||||
request.timeout(TimeValue.timeValueMinutes(2));
|
||||
request.setRefreshPolicy(WriteRequest.RefreshPolicy.WAIT_UNTIL);
|
||||
|
|
@ -300,6 +315,7 @@ public class ElasticSearch7Client extends ElasticSearchClient {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BulkProcessor createBulkProcessor(int bulkActions, int flushInterval, int concurrentRequests) {
|
||||
BulkProcessor.Listener listener = createBulkListener();
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ public class AlarmQueryEs7DAO extends EsDAO implements IAlarmQueryDAO {
|
|||
super(client);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Alarms getAlarm(final Integer scopeId, final String keyword, final int limit, final int from,
|
||||
final long startTB, final long endTB) throws IOException {
|
||||
SearchSourceBuilder sourceBuilder = SearchSourceBuilder.searchSource();
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@ public class MetricsQueryEs7DAO extends MetricsQueryEsDAO {
|
|||
return defaultValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void functionAggregation(Function function, TermsAggregationBuilder parentAggBuilder, String valueCName) {
|
||||
switch (function) {
|
||||
case Avg:
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ public class MySQLLogQueryDAO extends H2LogQueryDAO {
|
|||
return "select count(1) total " + sql;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void buildLimit(StringBuilder sql, int from, int limit) {
|
||||
sql.append(" LIMIT ").append(from).append(", ").append(limit);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,10 +34,12 @@ public class HealthCheckMetrics implements HealthChecker {
|
|||
metrics.setValue(-1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void health() {
|
||||
metrics.setValue(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unHealth(Throwable t) {
|
||||
log.error("Health check fails", t);
|
||||
metrics.setValue(1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue