|
15 | 15 | */ |
16 | 16 | package io.aeron.cluster; |
17 | 17 |
|
| 18 | +import io.aeron.Aeron; |
18 | 19 | import io.aeron.CommonContext; |
19 | 20 | import io.aeron.ExclusivePublication; |
20 | 21 | import io.aeron.Publication; |
@@ -455,17 +456,40 @@ boolean backupQuery( |
455 | 456 | final int version, |
456 | 457 | final String responseChannel, |
457 | 458 | final byte[] encodedCredentials) |
| 459 | + { |
| 460 | + return backupQuery( |
| 461 | + publication, |
| 462 | + correlationId, |
| 463 | + responseStreamId, |
| 464 | + version, |
| 465 | + Aeron.NULL_VALUE, |
| 466 | + responseChannel, |
| 467 | + encodedCredentials); |
| 468 | + } |
| 469 | + |
| 470 | + boolean backupQuery( |
| 471 | + final ExclusivePublication publication, |
| 472 | + final long correlationId, |
| 473 | + final int responseStreamId, |
| 474 | + final int version, |
| 475 | + final long logPosition, |
| 476 | + final String responseChannel, |
| 477 | + final byte[] encodedCredentials) |
458 | 478 | { |
459 | 479 | if (null == publication) |
460 | 480 | { |
461 | 481 | return false; |
462 | 482 | } |
463 | 483 |
|
| 484 | + final long logPositionValue = Aeron.NULL_VALUE != logPosition ? logPosition : |
| 485 | + BackupQueryEncoder.logPositionNullValue(); |
| 486 | + |
464 | 487 | backupQueryEncoder |
465 | 488 | .wrapAndApplyHeader(buffer, 0, messageHeaderEncoder) |
466 | 489 | .correlationId(correlationId) |
467 | 490 | .responseStreamId(responseStreamId) |
468 | 491 | .version(version) |
| 492 | + .logPosition(logPositionValue) |
469 | 493 | .responseChannel(responseChannel) |
470 | 494 | .putEncodedCredentials(encodedCredentials, 0, encodedCredentials.length); |
471 | 495 |
|
|
0 commit comments