8000 Merge branch 'master' of https://github.com/arangodb/arangodb-java-dr… · anderick/arangodb-java-driver@91429c6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 91429c6

Browse files
committed
2 parents 7251ed8 + 05f797c commit 91429c6

File tree

9 files changed

+535
-295
lines changed

9 files changed

+535
-295
lines changed

src/main/java/com/arangodb/ArangoDriver.java

Lines changed: 448 additions & 226 deletions
Large diffs are not rendered by default.

src/main/java/com/arangodb/entity/StatisticsEntity.java

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
/**
2323
* @author tamtam180 - kirscheless at gmail.com
24+
* @author gschwab
2425
*
2526
*/
2627
public class StatisticsEntity extends BaseEntity {
@@ -52,50 +53,59 @@ public void setClient(Client client) {
5253
public void setServer(Server server) {
5354
this.server = server;
5455
}
55-
56-
56+
5757
public static class FigureValue implements Serializable {
5858
double sum;
5959
long count;
6060
long[] counts;
61+
6162
public double getSum() {
6263
return sum;
6364
}
65+
6466
public long getCount() {
6567
return count;
6668
}
69+
6770
public long[] getCounts() {
6871
return counts;
6972
}
73+
7074
public void setSum(double sum) {
7175
this.sum = sum;
7276
}
77+
7378
public void setCount(long count) {
7479
this.count = count;
7580
}
81+
7682
public void setCounts(long[] counts) {
7783
this.counts = counts;
7884
}
79-
85+
8086
}
81-
87+
8288
public static class Client implements Serializable {
8389
int httpConnections;
8490
Map<String, FigureValue> figures;
91+
8592
public int getHttpConnections() {
8693
return httpConnections;
8794
}
95+
8896
public Map<String, FigureValue> getFigures() {
8997
return figures;
9098
}
99+
91100
public void setHttpConnections(int httpConnections) {
92101
this.httpConnections = httpConnections;
93102
}
103+
94104
public void setFigures(Map<String, FigureValue> figures) {
95105
this.figures = figures;
96106
}
97107
}
98-
108+
99109
public static class Server implements Serializable {
100110
double uptime;
101111

@@ -106,63 +116,75 @@ public double getUptime() {
106116
public void setUptime(double uptime) {
107117
this.uptime = uptime;
108118
}
109-
119+
110120
}
111-
121+
112122
public static class System implements Serializable {
113-
123+
114124
long minorPageFaults;
115125
long majorPageFaults;
116126
double userTime;
117127
double systemTime;
118128
int numberOfThreads;
119129
long residentSize;
120130
long virtualSize;
121-
131+
122132
public long getMinorPageFaults() {
123133
return minorPageFaults;
124134
}
135+
125136
public long getMajorPageFaults() {
126137
return majorPageFaults;
127138
}
139+
128140
public double getUserTime() {
129141
return userTime;
130142
}
143+
131144
public double getSystemTime() {
132145
return systemTime;
133146
}
147+
134148
public int getNumberOfThreads() {
135149
return numberOfThreads;
136150
}
151+
137152
public long getResidentSize() {
138153
return residentSize;
139154
}
155+
140156
public long getVirtualSize() {
141157
return virtualSize;
142158
}
159+
143160
public void setMinorPageFaults(long minorPageFaults) {
144161
this.minorPageFaults = minorPageFaults;
145162
}
163+
146164
public void setMajorPageFaults(long majorPageFaults) {
147165
this.majorPageFaults = majorPageFaults;
148166
}
167+
149168
public void setUserTime(double userTime) {
150169
this.userTime = userTime;
151170
}
171+
152172
public void setSystemTime(double systemTime) {
153173
this.systemTime = systemTime;
154174
}
175+
155176
public void setNumberOfThreads(int numberOfThreads) {
156177
this.numberOfThreads = numberOfThreads;
157178
}
179+
158180
public void setResidentSize(long residentSize) {
159181
this.residentSize = residentSize;
160182
}
183+
161184
public void setVirtualSize(long virtualSize) {
162185
this.virtualSize = virtualSize;
163186
}
164-
187+
165188
}
166189

167-
168190
}

src/main/java/com/arangodb/entity/StreamEntity.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,22 @@
2020

2121
/**
2222
* @author tamtam180 - kirscheless at gmail.com
23+
* @author gschwab
2324
*
2425
*/
2526
public class StreamEntity extends BaseEntity {
26-
27+
2728
public StreamEntity() {
28-
29+
2930
}
30-
31+
3132
public StreamEntity(InputStream stream) {
3233
this.stream = stream;
3334
}
34-
35+
36+
/**
37+
* Input stream.
38+
*/
3539
InputStream stream;
3640

3741
public InputStream getStream() {
@@ -41,5 +45,5 @@ public InputStream getStream() {
4145
public void setStream(InputStream stream) {
4246
this.stream = stream;
4347
}
44-
48+
4549
}

src/main/java/com/arangodb/entity/StringsEntity.java

Lines changed: 0 additions & 37 deletions
This file was deleted.

src/main/java/com/arangodb/entity/StringsResultEntity.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@
2020

2121
/**
2222
* @author tamtam180 - kirscheless at gmail.com
23+
* @author gschwab
2324
*
2425
*/
2526
public class StringsResultEntity extends BaseEntity {
2627

28+
/**
29+
* List of strings
30+
*/
2731
List<String> result;
2832

2933
public List<String> getResult() {
@@ -33,5 +37,5 @@ public List<String> getResult() {
3337
public void setResult(List<String> result) {
3438
this.result = result;
3539
}
36-
40+
3741
}

src/main/java/com/arangodb/entity/TransactionEntity.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616

1717 BEA9
package com.arangodb.entity;
1818

19-
import java.io.Serializable;
2019
import java.util.ArrayList;
21-
import java.util.Date;
2220
import java.util.List;
2321

2422
/**
@@ -34,7 +32,6 @@ public class ReadWriteCollections {
3432
List<String> write = new ArrayList<String>();
3533
}
3634

37-
3835
ReadWriteCollections collections = new ReadWriteCollections();
3936

4037
String action;
@@ -57,11 +54,11 @@ public void setCollections(ReadWriteCollections collections) {
5754
this.collections = collections;
5855
}
5956

60-
public void addReadCollection (String collection) {
57+
public void addReadCollection(String collection) {
6158
this.collections.read.add(collection);
6259
}
6360

64-
public void addWriteCollection (String collection) {
61+
public void addWriteCollection(String collection) {
6562
this.collections.write.add(collection);
6663
}
6764

src/main/java/com/arangodb/entity/TransactionResultEntity.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,19 @@
1616

1717
package com.arangodb.entity;
1818

19-
import java.util.ArrayList;
20-
import java.util.List;
21-
2219
/**
2320
* @author tamtam180 - kirscheless at gmail.com
21+
* @author gschwab
2422
*
2523
*/
2624
public class TransactionResultEntity extends BaseEntity {
2725

26+
/**
27+
* Result object of transaction.
28+
*/
2829
private Object result;
2930

30-
3131
public <T> T getResult() {
32-
T r = (T) this.result;
3332
return (T) this.result;
3433
}
3534

@@ -58,7 +57,6 @@ public int getResultAsInt() {
5857
return number.intValue();
5958
}
6059

61-
6260
public void setResult(Object result) {
6361
this.result = result;
6462
}

src/main/java/com/arangodb/entity/UserEntity.java

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,50 +22,72 @@
2222

2323
/**
2424
* @author tamtam180 - kirscheless at gmail.com
25-
*
25+
* @author gschwab
2626
*/
2727
public class UserEntity extends BaseEntity {
2828

29+
/**
30+
* Name of the user.
31+
*/
2932
@SerializedName("username")
3033
String username;
34+
35+
/**
36+
* Password of the user.
37+
*/
3138
@SerializedName("passwd")
3239
String password;
40+
41+
/**
42+
* Indicates, if user is active.
43+
*/
3344
Boolean active;
45+
46+
/**
47+
* Additional information on user.
48+
*/
3449
Map<String, Object> extra;
35-
50+
3651
public UserEntity() {
3752
}
53+
3854
public UserEntity(String username, String password, Boolean active, Map<String, Object> extra) {
3955
this.username = username;
4056
this.password = password;
4157
this.active = active;
4258
this.extra = extra;
4359
}
4460

45-
4661
public String getUsername() {
4762
return username;
4863
}
64+
4965
public String getPassword() {
5066
return password;
5167
}
68+
5269
public Boolean isActive() {
5370
return active;
5471
}
72+
5573
public Map<String, Object> getExtra() {
5674
return extra;
5775
}
76+
5877
public void setUsername(String username) {
5978
this.username = username;
6079
}
80+
6181
public void setPassword(String password) {
6282
this.password = password;
6383
}
84+
6485
public void setActive(Boolean active) {
6586
this.active = active;
6687
}
88+
6789
public void setExtra(Map<String, Object> extra) {
6890
this.extra = extra;
6991
}
70-
92+
7193
}

0 commit comments

Comments
 (0)
0