Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
7f0f249
#102 Provided stored procedure tests
nyavro Dec 12, 2014
42b5a11
#102 Test passing input parameters into stored procedure
nyavro Dec 12, 2014
39a7b52
#102 remove procedure test
nyavro Dec 16, 2014
b16812c
Merge branch 'master' into issue102
nyavro Dec 30, 2014
4a9a9fd
Add support for UUID
dragisak Jan 29, 2015
16f9f18
Ignore errors generated by AsyncObjectPool.giveBack
dylex Feb 11, 2015
008b8d0
Merge pull request #129 from dragisak/master
mauricio Feb 19, 2015
9681419
Merge pull request #117 from nyavro/issue102
mauricio Feb 19, 2015
ef0bee8
Merge pull request #133 from dylex/master
mauricio Feb 28, 2015
f0ca8e0
Merge pull request #6 from mauricio/master
beenokle Mar 11, 2015
6e7c09c
Merge branch 'master' into embedded_netty
davydkov Mar 11, 2015
73fea36
Updated netty and merges from upstream
davydkov Mar 11, 2015
de19f1e
Update to latest netty 4.0.x
davydkov Mar 11, 2015
efaacba
Add LISTEN/NOTIFY to README
nkgm Mar 19, 2015
55a7ba8
Merge pull request #136 from nkgm/listen-notify-readme
mauricio Mar 19, 2015
29c2362
Include transaction specs for both MySQL and PostgreSQL
mauricio May 3, 2015
edabfa9
1. fix connection leak by returning an error on inactive channel insi…
haski Jun 24, 2015
1328b72
Merge pull request #141 from outbrain/master
mauricio Jun 25, 2015
37e5fc5
Fix PostgreSQL pool spec
mauricio Jun 25, 2015
7a0fc6c
TimeAndDateSpec should test LocalTime printing/encoding using a prepa…
Jul 7, 2015
708e2fc
Merge pull request #143 from emergentcypher/master
mauricio Jul 11, 2015
8d20500
Don't use a formatter with an optional value when producing times - f…
mauricio Jul 11, 2015
c201c41
Add test for processing LocalDateTime objects
mauricio Jul 11, 2015
c06eb58
Closing 0.2.17
mauricio Jul 13, 2015
19d7269
Removing timeout implementation for MySQL, client code should be resp…
mauricio Jul 24, 2015
77226d8
Add timeout support for queries
lifey Jul 28, 2015
01d7c70
fix PartitionedAsyncObjectPoolSpec factory can't return the same int …
lifey Jul 28, 2015
73d9ade
Merge pull request #147 from lifey/master
mauricio Aug 4, 2015
2c18a42
Using option for the timeout, letting connections declare their event…
mauricio Aug 4, 2015
7588e3c
Updating SBT and JDK versions
mauricio Aug 4, 2015
ed4f06a
Closing 0.2.18
mauricio Aug 8, 2015
2f93fd1
Starting next development cycle
mauricio Aug 8, 2015
14e232f
Updated changelog
mauricio Aug 8, 2015
654a377
Updating to latest version
mauricio Aug 9, 2015
1c9b98d
array row data refactoring. Avoiding copy data by columns.
antonzherdev Aug 10, 2015
f39a2da
Fix package name for the test and removing unused imports
antonzherdev Aug 10, 2015
cf705f8
Merge pull request #149 from antonzherdev/row-data-refactoring
mauricio Aug 10, 2015
936afcf
Merge pull request #150 from antonzherdev/fix-package-name
mauricio Aug 10, 2015
e5e725f
Added types field to MutableResultSet. This will allow inferring the …
Aug 26, 2015
7e3937e
Merge pull request #154 from iforiq/add_column_types
mauricio Aug 26, 2015
9a2297a
Merge pull request #7 from mauricio/master
davydkov Sep 12, 2015
b19d933
Merge branch 'master' into embedded_netty
davydkov Sep 12, 2015
f136352
Switch to netty 4.0.29
davydkov Sep 12, 2015
2031f34
Switch to netty 4.0.29
davydkov Sep 12, 2015
db675e2
Before internal publish
davydkov Sep 12, 2015
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
databases/*
out/*
generate_bundles.rb
.cache
Expand Down
10 changes: 8 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
language: scala
scala:
- 2.10.4
- 2.11.0
- 2.11.7
jdk:
- oraclejdk7
- openjdk7
- oraclejdk8
services:
- postgresql
- mysql
cache:
directories:
- vendor/bundle
- $HOME/.m2
- $HOME/.ivy2
- $HOME/.sbt
before_script:
- ./script/prepare_build.sh

Expand Down
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,14 @@

# Changelog

## 0.2.17 - in progresss
## 0.2.18 - 2015-08-08

* Timeouts implemented queries for MySQL and PostgreSQL - @lifey - #147

## 0.2.17 - 2015-07-13

* Fixed pool leak issue - @haski
* Fixed date time formatting issue - #142

## 0.2.16 - 2015-01-04

Expand Down
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
postgresql: postgres -D /Users/mauricio/databases/postgresql
postgresql: postgres -D databases/postgresql
mysql: mysqld --log-warnings --console
5 changes: 4 additions & 1 deletion copynetty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ rm -rf db-async-common/src/main/java/com/github/mauricio/netty/bootstrap
cp -r netty/transport/src/main/java/io/netty/bootstrap db-async-common/src/main/java/io/netty

rm -rf db-async-common/src/main/java/com/github/mauricio/netty/channel
cp -r netty/transport/src/main/java/io/netty/channel db-async-common/src/main/java/io/netty
cp -r netty/transport/src/main/java/io/netty/channel db-async-common/src/main/java/io/netty

cp -r db-async-common/src/main/java/io/netty/* db-async-common/src/main/java/com/github/mauricio/netty
rm -rf db-async-common/src/main/java/io/netty
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
*/
public abstract class AbstractBootstrap<B extends AbstractBootstrap<B, C>, C extends Channel> implements Cloneable {

private volatile EventLoopGroup group;
volatile EventLoopGroup group;
private volatile ChannelFactory<? extends C> channelFactory;
private volatile SocketAddress localAddress;
private final Map<ChannelOption<?>, Object> options = new LinkedHashMap<ChannelOption<?>, Object>();
Expand All @@ -71,7 +71,7 @@ public abstract class AbstractBootstrap<B extends AbstractBootstrap<B, C>, C ext
}

/**
* The {@link EventLoopGroup} which is used to handle all the events for the to-be-creates
* The {@link EventLoopGroup} which is used to handle all the events for the to-be-created
* {@link Channel}
*/
@SuppressWarnings("unchecked")
Expand Down Expand Up @@ -174,6 +174,7 @@ public <T> B option(ChannelOption<T> option, T value) {
* Allow to specify an initial attribute of the newly created {@link Channel}. If the {@code value} is
* {@code null}, the attribute of the specified {@code key} is removed.
*/
@SuppressWarnings("unchecked")
public <T> B attr(AttributeKey<T> key, T value) {
if (key == null) {
throw new NullPointerException("key");
Expand All @@ -187,10 +188,7 @@ public <T> B attr(AttributeKey<T> key, T value) {
attrs.put(key, value);
}
}

@SuppressWarnings("unchecked")
B b = (B) this;
return b;
return (B) this;
}

/**
Expand Down Expand Up @@ -277,7 +275,7 @@ private ChannelFuture doBind(final SocketAddress localAddress) {
}

if (regFuture.isDone()) {
// At this point we know that the registration was complete and succesful.
// At this point we know that the registration was complete and successful.
ChannelPromise promise = channel.newPromise();
doBind0(regFuture, channel, localAddress, promise);
return promise;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import com.github.mauricio.netty.channel.ChannelOption;
import com.github.mauricio.netty.channel.ChannelPipeline;
import com.github.mauricio.netty.channel.ChannelPromise;
import com.github.mauricio.netty.channel.EventLoopGroup;
import com.github.mauricio.netty.util.AttributeKey;
import com.github.mauricio.netty.util.internal.logging.InternalLogger;
import com.github.mauricio.netty.util.internal.logging.InternalLoggerFactory;
Expand Down Expand Up @@ -216,6 +217,17 @@ public Bootstrap clone() {
return new Bootstrap(this);
}

/**
* Returns a deep clone of this bootstrap which has the identical configuration except that it uses
* the given {@link EventLoopGroup}. This method is useful when making multiple {@link Channel}s with similar
* settings.
*/
public Bootstrap clone(EventLoopGroup group) {
Bootstrap bs = new Bootstrap(this);
bs.group = group;
return bs;
}

@Override
public String toString() {
if (remoteAddress == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public ServerBootstrap group(EventLoopGroup group) {

/**
* Set the {@link EventLoopGroup} for the parent (acceptor) and the child (client). These
* {@link EventLoopGroup}'s are used to handle all the events and IO for {@link SocketChannel} and
* {@link EventLoopGroup}'s are used to handle all the events and IO for {@link ServerChannel} and
* {@link Channel}'s.
*/
public ServerBootstrap group(EventLoopGroup parentGroup, EventLoopGroup childGroup) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1178,4 +1178,8 @@ protected final void ensureAccessible() {
throw new IllegalReferenceCountException(0);
}
}

void discardMarks() {
markedReaderIndex = markedWriterIndex = 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,20 @@ public final ByteBuf retain(int increment) {

@Override
public final boolean release() {
return unwrap().release();
if (unwrap().release()) {
deallocate();
return true;
}
return false;
}

@Override
public final boolean release(int decrement) {
return unwrap().release(decrement);
if (unwrap().release(decrement)) {
deallocate();
return true;
}
return false;
}

@Override
Expand All @@ -64,4 +72,9 @@ public ByteBuffer internalNioBuffer(int index, int length) {
public ByteBuffer nioBuffer(int index, int length) {
return unwrap().nioBuffer(index, length);
}

/**
* Called when the wrapped {@link ByteBuf} was released due calling of {@link #release()} or {@link #release(int)}.
*/
protected void deallocate() { }
}
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@
* <p>
* In case a completely fresh copy of an existing buffer is required, please
* call {@link #copy()} method instead.
* <p>
* Also be aware that obtaining derived buffers will NOT call {@link #retain()} and so the
* reference count will NOT be increased.
*
* <h3>Conversion to existing JDK types</h3>
*
Expand Down Expand Up @@ -1190,6 +1193,9 @@ public abstract class ByteBuf implements ReferenceCounted, Comparable<ByteBuf> {
* Returns a new slice of this buffer's sub-region starting at the current
* {@code readerIndex} and increases the {@code readerIndex} by the size
* of the new slice (= {@code length}).
* <p>
* Also be aware that this method will NOT call {@link #retain()} and so the
* reference count will NOT be increased.
*
* @param length the size of the new slice
*
Expand Down Expand Up @@ -1660,6 +1666,9 @@ public abstract class ByteBuf implements ReferenceCounted, Comparable<ByteBuf> {
* identical to {@code buf.slice(buf.readerIndex(), buf.readableBytes())}.
* This method does not modify {@code readerIndex} or {@code writerIndex} of
* this buffer.
* <p>
* Also be aware that this method will NOT call {@link #retain()} and so the
* reference count will NOT be increased.
*/
public abstract ByteBuf slice();

Expand All @@ -1669,6 +1678,9 @@ public abstract class ByteBuf implements ReferenceCounted, Comparable<ByteBuf> {
* they maintain separate indexes and marks.
* This method does not modify {@code readerIndex} or {@code writerIndex} of
* this buffer.
* <p>
* Also be aware that this method will NOT call {@link #retain()} and so the
* reference count will NOT be increased.
*/
public abstract ByteBuf slice(int index, int length);

Expand All @@ -1679,6 +1691,9 @@ public abstract class ByteBuf implements ReferenceCounted, Comparable<ByteBuf> {
* This method is identical to {@code buf.slice(0, buf.capacity())}.
* This method does not modify {@code readerIndex} or {@code writerIndex} of
* this buffer.
* <p>
* The reader and writer marks will not be duplicated. Also be aware that this method will
* NOT call {@link #retain()} and so the reference count will NOT be increased.
*/
public abstract ByteBuf duplicate();

Expand Down
Loading