Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,13 @@ public RewrittenStatement rewrite(String sql, Binding params, StatementContext c
}

@Override
protected String getPayloadType()
public String getPayloadType()
{
return PAYLOAD_TYPE;
}

@Override
protected String getSerialType()
public String getSerialType()
{
return SERIAL_TYPE;
}
Expand All @@ -197,7 +197,7 @@ public String getQuoteString()
}

@Override
protected int getStreamingFetchSize()
public int getStreamingFetchSize()
{
return DEFAULT_STREAMING_RESULT_SIZE;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,19 +148,19 @@ public MySQLConnector(
}

@Override
protected String getPayloadType()
public String getPayloadType()
{
return PAYLOAD_TYPE;
}

@Override
protected String getSerialType()
public String getSerialType()
{
return SERIAL_TYPE;
}

@Override
protected String getCollation()
public String getCollation()
{
return COLLATION;
}
Expand All @@ -172,7 +172,7 @@ public String getQuoteString()
}

@Override
protected int getStreamingFetchSize()
public int getStreamingFetchSize()
{
// this is MySQL's way of indicating you want results streamed back
// see http://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-implementation-notes.html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@ public PostgreSQLConnector(
}

@Override
protected String getPayloadType()
public String getPayloadType()
{
return PAYLOAD_TYPE;
}

@Override
protected String getSerialType()
public String getSerialType()
{
return SERIAL_TYPE;
}
Expand All @@ -139,7 +139,7 @@ public String getQuoteString()
}

@Override
protected int getStreamingFetchSize()
public int getStreamingFetchSize()
{
return DEFAULT_STREAMING_RESULT_SIZE;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,7 @@ public SQLMetadataConnector(
{
this.config = config;
this.tablesConfigSupplier = tablesConfigSupplier;
this.shouldRetry = new Predicate<Throwable>()
{
@Override
public boolean apply(Throwable e)
{
return isTransientException(e);
}
};
this.shouldRetry = this::isTransientException;
}

/**
Expand All @@ -90,7 +83,7 @@ public boolean apply(Throwable e)
*
* @return String representing the SQL type
*/
protected String getPayloadType()
public String getPayloadType()
{
return PAYLOAD_TYPE;
}
Expand All @@ -100,7 +93,7 @@ protected String getPayloadType()
*
* @return the collation for the character set
*/
protected String getCollation()
public String getCollation()
{
return COLLATION;
}
Expand All @@ -114,15 +107,15 @@ protected String getCollation()
*
* @return String representing the SQL type and auto-increment statement
*/
protected abstract String getSerialType();
public abstract String getSerialType();

/**
* Returns the value that should be passed to statement.setFetchSize to ensure results
* are streamed back from the database instead of fetching the entire result set in memory.
*
* @return optimal fetch size to stream results back
*/
protected abstract int getStreamingFetchSize();
public abstract int getStreamingFetchSize();

/**
* @return the string that should be used to quote string fields
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public boolean tableExists(Handle handle, String tableName)
}

@Override
protected String getSerialType()
public String getSerialType()
{
return SERIAL_TYPE;
}
Expand All @@ -102,7 +102,7 @@ public DBI getDBI()
}

@Override
protected int getStreamingFetchSize()
public int getStreamingFetchSize()
{
// Derby only supports fetch size of 1
return 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,13 @@ public TestSQLMetadataConnector(
}

@Override
protected String getSerialType()
public String getSerialType()
{
return null;
}

@Override
protected int getStreamingFetchSize()
public int getStreamingFetchSize()
{
return 0;
}
Expand Down