Skip to content

Commit

Permalink
remove connection
Browse files Browse the repository at this point in the history
  • Loading branch information
firestar committed Oct 26, 2023
1 parent f0663b7 commit 6807023
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion buildSrc/src/main/groovy/nucleodb.app.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

group = 'com.nucleodb'
version = '1.7.3'
version = '1.7.4'

repositories {
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/groovy/nucleodb.library.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

group = 'com.nucleodb'
version = '1.9.3'
version = '1.9.4'

repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,21 @@ private void addConnection(Connection connection){
this.putConnectionInKey(connection.getFromKey()+connection.getToKey()+connection.getLabel(), connection);
allConnections.add(connection);
}
private void removeConnection(Connection connection){
connectionByUUID.remove(connection.getUuid());
String key = connection.getFromKey();

private void removeByKey(String key, Connection connection){
if(connections.containsKey(key)){
allConnections.remove(connection);
connections.get(key).remove(connection);
}
}

private void removeConnection(Connection connection){
connectionByUUID.remove(connection.getUuid());
String connectionKey = connection.getFromKey();
this.removeByKey(connectionKey, connection);
this.removeByKey(connection.getFromKey()+connection.getLabel(), connection);
this.removeByKey(connection.getFromKey()+connection.getToKey()+connection.getLabel(), connection);
allConnections.remove(connection);
}
public void consume() {
if (this.config.getBootstrap() != null) {
String consumer = UUID.randomUUID().toString();
Expand Down

0 comments on commit 6807023

Please sign in to comment.