@@ -88,39 +88,6 @@ private void basicAck()
8888 basicAck (latestTag , false );
8989 }
9090
91- private abstract class NackMethod {
92- abstract public void nack (long tag , boolean requeue )
93- throws IOException ;
94-
95- public void nack (boolean requeue )
96- throws IOException
97- {
98- nack (latestTag , requeue );
99- }
100-
101- public void nack ()
102- throws IOException
103- {
104- nack (latestTag , true );
105- }
106- }
107-
108- private NackMethod basicNack = new NackMethod () {
109- public void nack (long tag , boolean requeue )
110- throws IOException
111- {
112- channel .basicNack (tag , false , requeue );
113- }
114- };
115-
116- private NackMethod basicReject = new NackMethod () {
117- public void nack (long tag , boolean requeue )
118- throws IOException
119- {
120- channel .basicReject (tag , requeue );
121- }
122- };
123-
12491 /*
12592 publishes are embargoed until commit
12693 */
@@ -363,6 +330,39 @@ public void testShuffleAcksBeforeRollback()
363330 txCommit ();
364331 }
365332
333+ private abstract class NackMethod {
334+ abstract public void nack (long tag , boolean requeue )
335+ throws IOException ;
336+
337+ public void nack (boolean requeue )
338+ throws IOException
339+ {
340+ nack (latestTag , requeue );
341+ }
342+
343+ public void nack ()
344+ throws IOException
345+ {
346+ nack (latestTag , true );
347+ }
348+ }
349+
350+ private NackMethod basicNack = new NackMethod () {
351+ public void nack (long tag , boolean requeue )
352+ throws IOException
353+ {
354+ channel .basicNack (tag , false , requeue );
355+ }
356+ };
357+
358+ private NackMethod basicReject = new NackMethod () {
359+ public void nack (long tag , boolean requeue )
360+ throws IOException
361+ {
362+ channel .basicReject (tag , requeue );
363+ }
364+ };
365+
366366 /*
367367 messages with nacks get requeued after the transaction commit.
368368 messages with nacks with requeue = false are not requeued.
0 commit comments