Skip to content

Commit 23e7ba0

Browse files
Merge pull request #696 from wangqiandeniangniang/main_friendly_tips
refactor:
2 parents ebc3e29 + 430412d commit 23e7ba0

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

src/main/java/com/rabbitmq/client/impl/recovery/RecordedEntity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
/**
2121
* @since 3.3.0
2222
*/
23-
public class RecordedEntity {
23+
public abstract class RecordedEntity {
2424
protected final AutorecoveringChannel channel;
2525

2626
public RecordedEntity(AutorecoveringChannel channel) {

src/main/java/com/rabbitmq/client/impl/recovery/RecordedExchange.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public RecordedExchange(AutorecoveringChannel channel, String name) {
3131
super(channel, name);
3232
}
3333

34+
@Override
3435
public void recover() throws IOException {
3536
this.channel.getDelegate().exchangeDeclare(this.name, this.type, this.durable, this.autoDelete, this.arguments);
3637
}

src/main/java/com/rabbitmq/client/impl/recovery/RecordedNamedEntity.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,20 @@
1515

1616
package com.rabbitmq.client.impl.recovery;
1717

18+
import java.io.IOException;
1819
/**
1920
* @since 3.3.0
2021
*/
21-
public class RecordedNamedEntity extends RecordedEntity {
22+
public abstract class RecordedNamedEntity extends RecordedEntity {
2223
protected String name;
2324

2425
public RecordedNamedEntity(AutorecoveringChannel channel, String name) {
2526
super(channel);
2627
this.name = name;
2728
}
2829

30+
public abstract void recover() throws IOException;
31+
2932
public String getName() {
3033
return name;
3134
}

src/main/java/com/rabbitmq/client/impl/recovery/RecordedQueue.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public boolean isServerNamed() {
5555
return this.serverNamed;
5656
}
5757

58+
@Override
5859
public void recover() throws IOException {
5960
this.name = this.channel.getDelegate().queueDeclare(this.getNameToUseForRecovery(),
6061
this.durable,
@@ -71,7 +72,7 @@ public RecordedQueue durable(boolean value) {
7172
this.durable = value;
7273
return this;
7374
}
74-
75+
7576
public boolean isDurable() {
7677
return this.durable;
7778
}
@@ -80,7 +81,7 @@ public RecordedQueue autoDelete(boolean value) {
8081
this.autoDelete = value;
8182
return this;
8283
}
83-
84+
8485
public boolean isAutoDelete() {
8586
return this.autoDelete;
8687
}

src/main/java/com/rabbitmq/client/impl/recovery/RecordedQueueBinding.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public RecordedQueueBinding(AutorecoveringChannel channel) {
2727

2828
@Override
2929
public void recover() throws IOException {
30-
this.channel.getDelegate().queueBind(this.getDestination(), this.getSource(), this.routingKey, this.arguments);
30+
this.channel.getDelegate().queueBind(this.destination, this.source, this.routingKey, this.arguments);
3131
}
3232

3333
@Override

0 commit comments

Comments
 (0)