Skip to content

Commit 126bf12

Browse files
author
Gustavo Xavier
committed
Add RestEasyClient connection pool size
1 parent 408cff8 commit 126bf12

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>br.com.quintoandar</groupId>
88
<artifactId>urlencoder</artifactId>
9-
<version>1.0.0</version>
9+
<version>1.0.1</version>
1010

1111
<dependencies>
1212
<dependency>

src/main/java/br/com/quintoandar/urlencoder/YourlsApiService.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@ public class YourlsApiService {
99

1010
@Getter
1111
private YourlsApi instance;
12+
13+
private static final Integer CONNECTION_POOL_SIZE = 20;
1214

1315
public YourlsApiService(String uri) {
1416
this.instance = createService(uri);
1517
}
1618

1719
private YourlsApi createService(String uri) {
18-
ResteasyClient client = new ResteasyClientBuilder().build();
20+
ResteasyClient client = new ResteasyClientBuilder()
21+
.connectionPoolSize(CONNECTION_POOL_SIZE)
22+
.build();
1923
ResteasyWebTarget target = client.target(uri);
2024
return target.proxy(YourlsApi.class);
2125
}

0 commit comments

Comments
 (0)