Mercurial > hg > monetdb-java
view src/main/java/nl/cwi/monetdb/mcl/protocol/embedded/EmbeddedProtocol.java @ 74:17365ed26611 embedded
In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
author | Pedro Ferreira <pedro.ferreira@monetdbsolutions.com> |
---|---|
date | Thu, 15 Dec 2016 11:25:04 +0100 (2016-12-15) |
parents | 953422c41194 |
children | 0ae34196c54e |
line wrap: on
line source
package nl.cwi.monetdb.mcl.protocol.embedded; import nl.cwi.monetdb.jdbc.MonetConnection; import nl.cwi.monetdb.mcl.connection.embedded.JDBCEmbeddedConnection; import nl.cwi.monetdb.mcl.protocol.*; import nl.cwi.monetdb.mcl.responses.AutoCommitResponse; import nl.cwi.monetdb.mcl.responses.DataBlockResponse; import nl.cwi.monetdb.mcl.responses.ResultSetResponse; import nl.cwi.monetdb.mcl.responses.UpdateResponse; import java.io.IOException; import java.util.Map; /** * Created by ferreira on 11/30/16. */ public class EmbeddedProtocol extends AbstractProtocol { private final JDBCEmbeddedConnection connection; public EmbeddedProtocol(JDBCEmbeddedConnection con) { this.connection = con; } public JDBCEmbeddedConnection getEmbeddedConnection() { return this.connection; } @Override public ServerResponses waitUntilPrompt() throws IOException { return null; } @Override public void fetchNextResponseData() throws IOException { } @Override public Object getCurrentData() { return new Object[0]; } @Override public StarterHeaders getNextStarterHeader() { return null; } @Override public ResultSetResponse getNextResultSetResponse(MonetConnection con, MonetConnection.ResponseList list, int seqnr) throws ProtocolException { return null; } @Override public UpdateResponse getNextUpdateResponse() throws ProtocolException { return null; } @Override public AutoCommitResponse getNextAutoCommitResponse() throws ProtocolException { return null; } @Override public DataBlockResponse getNextDatablockResponse(Map<Integer, ResultSetResponse> rsresponses) throws ProtocolException { return null; } @Override public TableResultHeaders getNextTableHeader(Object line, String[] stringValues, int[] intValues) throws ProtocolException { return null; } @Override public int parseTupleLine(int lineNumber, Object line, int[] typesMap, Object[] values, boolean[] nulls) throws ProtocolException { return 0; } @Override public String getRemainingStringLine(int startIndex) { return null; } @Override public void writeNextQuery(String prefix, String query, String suffix) throws IOException { } }