From 2278740878264362fd0f51e5f782715a89e4964f Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Tue, 19 Sep 2006 06:07:30 +0000 Subject: Removed all cursor synchronization. It just adds overhead and no real (or needed) thread safety. --- src/main/java/com/amazon/carbonado/repo/jdbc/JDBCCursor.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java/com/amazon/carbonado/repo/jdbc') diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCCursor.java b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCCursor.java index 7ef2510..f0a3752 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCCursor.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCCursor.java @@ -52,7 +52,7 @@ class JDBCCursor extends AbstractCursor { mResultSet = statement.executeQuery(); } - public synchronized void close() throws FetchException { + public void close() throws FetchException { if (mResultSet != null) { try { mResultSet.close(); @@ -66,7 +66,7 @@ class JDBCCursor extends AbstractCursor { } } - public synchronized boolean hasNext() throws FetchException { + public boolean hasNext() throws FetchException { ResultSet rs = mResultSet; if (rs == null) { return false; @@ -84,7 +84,7 @@ class JDBCCursor extends AbstractCursor { return mHasNext; } - public synchronized S next() throws FetchException, NoSuchElementException { + public S next() throws FetchException, NoSuchElementException { if (!hasNext()) { throw new NoSuchElementException(); } @@ -97,7 +97,7 @@ class JDBCCursor extends AbstractCursor { } } - public synchronized int skipNext(int amount) throws FetchException { + public int skipNext(int amount) throws FetchException { if (amount <= 0) { if (amount < 0) { throw new IllegalArgumentException("Cannot skip negative amount: " + amount); -- cgit v1.2.3