Skip to content

Commit

Permalink
[Java CDK] : Remove isHeartbeatSupported() from target position inter…
Browse files Browse the repository at this point in the history
…face
  • Loading branch information
akashkulk committed Feb 20, 2024
1 parent 40a5edc commit 0ea8b41
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,6 @@ default boolean reachedTargetPosition(final T positionFromHeartbeat) {
throw new UnsupportedOperationException();
}

/**
* Indicates whether the implementation supports heartbeat position.
*
* @return true if heartbeats are supported
*/
default boolean isHeartbeatSupported() {
return false;
}

/**
* Returns a position value from a heartbeat event offset.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public void close() throws Exception {
}

private boolean isHeartbeatEvent(final ChangeEvent<String, String> event) {
return targetPosition.isHeartbeatSupported() && Objects.nonNull(event) && !event.value().contains("source");
return Objects.nonNull(event) && !event.value().contains("source");
}

private boolean heartbeatPosNotChanging() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ java {
airbyteJavaConnector {
cdkVersionRequired = '0.20.6'
features = ['db-sources', 'datastore-postgres']
useLocalCdk = false
useLocalCdk = true
}

application {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,6 @@ private PgLsn extractLsn(final JsonNode valueAsJson) {
.orElseThrow(() -> new IllegalStateException("Could not find LSN"));
}

@Override
public boolean isHeartbeatSupported() {
return true;
}

@Override
public Long extractPositionFromHeartbeatOffset(final Map<String, ?> sourceOffset) {
return (long) sourceOffset.get("lsn");
Expand Down

0 comments on commit 0ea8b41

Please sign in to comment.