public class MockRiverSource extends Object implements RiverSource<MockRiverContext>
Constructor and Description |
---|
MockRiverSource() |
public MockRiverSource()
public String strategy()
strategy
in interface RiverSource<MockRiverContext>
public RiverSource<MockRiverContext> newInstance()
newInstance
in interface RiverSource<MockRiverContext>
public RiverSource setRiverContext(MockRiverContext context)
setRiverContext
in interface RiverSource<MockRiverContext>
public void beforeFetch() throws Exception
beforeFetch
in interface RiverSource<MockRiverContext>
Exception
public void afterFetch() throws Exception
afterFetch
in interface RiverSource<MockRiverContext>
Exception
public void fetch() throws SQLException, IOException
fetch
in interface RiverSource<MockRiverContext>
SQLException
IOException
public RiverSource setUrl(String url)
setUrl
in interface RiverSource<MockRiverContext>
public RiverSource setUser(String user)
setUser
in interface RiverSource<MockRiverContext>
public RiverSource setPassword(String password)
setPassword
in interface RiverSource<MockRiverContext>
public Connection getConnectionForReading() throws SQLException
getConnectionForReading
in interface RiverSource<MockRiverContext>
SQLException
public Connection getConnectionForWriting() throws SQLException
getConnectionForWriting
in interface RiverSource<MockRiverContext>
SQLException
public PreparedStatement prepareQuery(String sql) throws SQLException
prepareQuery
in interface RiverSource<MockRiverContext>
SQLException
public PreparedStatement prepareUpdate(String sql) throws SQLException
prepareUpdate
in interface RiverSource<MockRiverContext>
SQLException
public RiverSource bind(PreparedStatement statement, List<Object> values) throws SQLException
bind
in interface RiverSource<MockRiverContext>
SQLException
public RiverSource register(CallableStatement statement, Map<String,Object> values) throws SQLException
register
in interface RiverSource<MockRiverContext>
SQLException
public ResultSet executeQuery(PreparedStatement statement) throws SQLException
executeQuery
in interface RiverSource<MockRiverContext>
SQLException
public ResultSet executeQuery(Statement statement, String sql) throws SQLException
executeQuery
in interface RiverSource<MockRiverContext>
SQLException
public RiverSource executeUpdate(PreparedStatement statement) throws SQLException
executeUpdate
in interface RiverSource<MockRiverContext>
SQLException
public RiverSource executeUpdate(Statement statement, String sql) throws SQLException
executeUpdate
in interface RiverSource<MockRiverContext>
SQLException
public void beforeRows(ResultSet result, KeyValueStreamListener listener) throws SQLException, IOException
beforeRows
in interface RiverSource<MockRiverContext>
SQLException
IOException
public void beforeRows(SQLCommand command, ResultSet result, KeyValueStreamListener listener) throws SQLException, IOException
beforeRows
in interface RiverSource<MockRiverContext>
SQLException
IOException
public boolean nextRow(ResultSet result, KeyValueStreamListener listener) throws SQLException, IOException
nextRow
in interface RiverSource<MockRiverContext>
SQLException
IOException
public boolean nextRow(SQLCommand command, ResultSet result, KeyValueStreamListener listener) throws SQLException, IOException
nextRow
in interface RiverSource<MockRiverContext>
SQLException
IOException
public void afterRows(ResultSet result, KeyValueStreamListener listener) throws SQLException, IOException
afterRows
in interface RiverSource<MockRiverContext>
SQLException
IOException
public void afterRows(SQLCommand command, ResultSet result, KeyValueStreamListener listener) throws SQLException, IOException
afterRows
in interface RiverSource<MockRiverContext>
SQLException
IOException
public Object parseType(ResultSet result, Integer num, int type, Locale locale) throws SQLException, IOException, ParseException
parseType
in interface RiverSource<MockRiverContext>
SQLException
IOException
ParseException
public RiverSource close(ResultSet result) throws SQLException
close
in interface RiverSource<MockRiverContext>
SQLException
public RiverSource close(Statement statement) throws SQLException
close
in interface RiverSource<MockRiverContext>
SQLException
public RiverSource closeReading()
closeReading
in interface RiverSource<MockRiverContext>
public RiverSource closeWriting()
closeWriting
in interface RiverSource<MockRiverContext>
public RiverSource setLocale(Locale locale)
setLocale
in interface RiverSource<MockRiverContext>
public Locale getLocale()
getLocale
in interface RiverSource<MockRiverContext>
public RiverSource setTimeZone(TimeZone timezone)
setTimeZone
in interface RiverSource<MockRiverContext>
public TimeZone getTimeZone()
getTimeZone
in interface RiverSource<MockRiverContext>
public void suspend() throws Exception
suspend
in interface RiverSource<MockRiverContext>
Exception
public void resume() throws Exception
resume
in interface RiverSource<MockRiverContext>
Exception
public void shutdown() throws IOException
shutdown
in interface RiverSource<MockRiverContext>
IOException
elasticsearch-river-jdbc