Permalink
Browse files

fix javadoc complaints and some small edits to replication comments (#…

…832)

* fix javadoc complaints and some small edits to replication comments

* fix checkstyle
  • Loading branch information...
davecramer committed May 30, 2017
1 parent 394b3a2 commit 2d0bfcebb0641ddb73d9297e6211f75537238b15
@@ -394,20 +394,20 @@
"Enable optimization to rewrite and collapse compatible INSERT statements that are batched."),

/**
* <p>Connection parameter for startup message Available value(true, database). A Boolean value of
* true tells the backend to go into walsender mode, wherein a small set of replication commands
* can be issued instead of SQL statements. Only the simple query protocol can be used in
* walsender mode. Passing database as the value instructs walsender to connect to the database
* specified in the dbname parameter, which will allow the connection to be used for logical
* replication from that database. <p>Parameter should be use together with {@link
* <p>Connection parameter passed in the startup message. This parameter accepts two values; "true"
* and "database". Passing "true" tells the backend to go into walsender mode, wherein a small set
* of replication commands can be issued instead of SQL statements. Only the simple query protocol
* can be used in walsender mode. Passing "database" as the value instructs walsender to connect
* to the database specified in the dbname parameter, which will allow the connection to be used
* for logical replication from that database. <p>Parameter should be use together with {@link
* PGProperty#ASSUME_MIN_SERVER_VERSION} with parameter &gt;= 9.4 (backend &gt;= 9.4)
*/
REPLICATION("replication", null,
"Connection parameter for startup message Available value(true, database). "
+ "A Boolean value of true tells the backend to go into walsender mode, "
"Connection parameter passed in startup message, one of 'true' or 'database' "
+ "Passing 'true' tells the backend to go into walsender mode, "
+ "wherein a small set of replication commands can be issued instead of SQL statements. "
+ "Only the simple query protocol can be used in walsender mode. "
+ "Passing database as the value instructs walsender to connect "
+ "Passing 'database' as the value instructs walsender to connect "
+ "to the database specified in the dbname parameter, "
+ "which will allow the connection to be used for logical replication "
+ "from that database. "
@@ -223,6 +223,7 @@ Object createQueryKey(String sql, boolean escapeProcessing, boolean isParameteri
* cannot do this as it is prone to deadlock, so the higher level caller must be responsible which
* requires exposing this method. This variant supports blocking for the given time in millis.
*
* @param timeoutMillis number of milliseconds to block for
* @throws SQLException if and error occurs while fetching notifications
*/
void processNotifies(int timeoutMillis) throws SQLException;
@@ -20,12 +20,14 @@
* @param options not null options for logical replication stream
* @return not null stream instance from which available fetch wal logs that was decode by output
* plugin
* @throws SQLException on error
*/
PGReplicationStream startLogical(LogicalReplicationOptions options) throws SQLException;

/**
* @param options not null options for physical replication stream
* @return not null stream instance from which available fetch wal logs
* @throws SQLException on error
*/
PGReplicationStream startPhysical(PhysicalReplicationOptions options) throws SQLException;
}
@@ -41,10 +41,15 @@

/**
* @param copyDual bidirectional copy protocol
* @param startLSN the position in the WAL that we want to initiate replication from
* usually the currentLSN returned by calling pg_current_wal_lsn()for v10
* above or pg_current_xlog_location() depending on the version of the
* server
* @param updateIntervalMs the number of millisecond between status packets sent back to the
* server. A value of zero disables the periodic status updates
* completely, although an update will still be sent when requested by the
* server, to avoid timeout disconnect.
* @param replicationType LOGICAL or PHYSICAL
*/
public V3PGReplicationStream(CopyDual copyDual, LogSequenceNumber startLSN, long updateIntervalMs,
ReplicationType replicationType
@@ -993,14 +993,15 @@ public void setSocketFactoryArg(String socketFactoryArg) {
}

/**
* @param replication replication argument
* @param replication set to 'database' for logical replication or 'true' for physical replication
* @see PGProperty#REPLICATION
*/
public void setReplication(String replication) {
PGProperty.REPLICATION.set(properties, replication);
}

/**
* @return null, 'database', or 'true
* @see PGProperty#REPLICATION
*/
public String getReplication() {
@@ -18,11 +18,13 @@
* rows which could cause a recovery conflict even when the standby is disconnected.
*
* @param slotName not null unique replication slot name for create.
* @return T a slot builder
*/
T withSlotName(String slotName);

/**
* Create slot with specified parameters in database
* @throws SQLException on error
*/
void make() throws SQLException;
}
@@ -21,7 +21,7 @@
String getSlotName();

/**
* @return not null position from which need start replicate changes
* @return the position to start replication. This cannot be null.
*/
LogSequenceNumber getStartLSNPosition();

@@ -30,6 +30,8 @@
* for easier monitoring of the progress from server. A value of zero disables the periodic status
* updates completely, although an update will still be sent when requested by the server, to
* avoid timeout disconnect. The default value is 10 seconds.
*
* @return the current status interval
*/
int getStatusInterval();
}
@@ -21,6 +21,7 @@
* use for test logical replication api
*
* @param outputPlugin not null name of the output plugin used for logical decoding
* @return the logical slot builder
*/
ChainedLogicalCreateSlotBuilder withOutputPlugin(String outputPlugin);
}
@@ -17,15 +17,40 @@
* Open logical replication stream
*
* @return not null PGReplicationStream available for fetch data in logical form
* @throws SQLException if there are errors
*/
PGReplicationStream start() throws SQLException;

/**
*
* @param optionName name of option
* @param optionValue boolean value
* @return ChainedLogicalStreamBuilder
*/

ChainedLogicalStreamBuilder withSlotOption(String optionName, boolean optionValue);

/**
*
* @param optionName name of option
* @param optionValue integer value
* @return ChainedLogicalStreamBuilder
*/
ChainedLogicalStreamBuilder withSlotOption(String optionName, int optionValue);

/**
*
* @param optionName name of option
* @param optionValue String value
* @return ChainedLogicalStreamBuilder
*/
ChainedLogicalStreamBuilder withSlotOption(String optionName, String optionValue);

/**
*
* @param options properties
* @return ChainedLogicalStreamBuilder
*/
ChainedLogicalStreamBuilder withSlotOptions(Properties options);

}
@@ -17,6 +17,7 @@
* Open physical replication stream
*
* @return not null PGReplicationStream available for fetch wal logs in binary form
* @throws SQLException on error
*/
PGReplicationStream start() throws SQLException;
}

0 comments on commit 2d0bfce

Please sign in to comment.