You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hugegraph.apache.org by "javeme (via GitHub)" <gi...@apache.org> on 2023/07/12 13:04:29 UTC
[GitHub] [incubator-hugegraph-commons] javeme commented on a diff in pull request #132: refact(common): add more construction methods for convenient
javeme commented on code in PR #132:
URL: https://github.com/apache/incubator-hugegraph-commons/pull/132#discussion_r1261149583
##########
hugegraph-common/src/main/java/org/apache/hugegraph/event/EventHub.java:
##########
@@ -49,21 +49,27 @@ public class EventHub {
// Event executor
private static ExecutorService executor = null;
- private String name;
- private Map<String, List<EventListener>> listeners;
+ private final String name;
+ private final Map<String, List<EventListener>> listeners;
public EventHub() {
this("hub");
}
public EventHub(String name) {
LOG.debug("Create new EventHub: {}", name);
-
this.name = name;
this.listeners = new ConcurrentHashMap<>();
EventHub.init(1);
}
+ public EventHub(String name, int threadSize) {
Review Comment:
just let `EventHub(String name)` call `EventHub(name, 1)`
##########
hugegraph-common/src/main/java/org/apache/hugegraph/rest/RestResult.java:
##########
@@ -43,6 +43,12 @@ public RestResult(Response response) {
this.content = response.readEntity(String.class);
}
+ public RestResult(int status, String content, MultivaluedMap<String, Object> headers) {
Review Comment:
ditto
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org