diff --git a/spring-integration-jdbc/src/main/java/org/springframework/integration/jdbc/store/JdbcChannelMessageStore.java b/spring-integration-jdbc/src/main/java/org/springframework/integration/jdbc/store/JdbcChannelMessageStore.java index f5a172fa8e..80f5efd2a1 100644 --- a/spring-integration-jdbc/src/main/java/org/springframework/integration/jdbc/store/JdbcChannelMessageStore.java +++ b/spring-integration-jdbc/src/main/java/org/springframework/integration/jdbc/store/JdbcChannelMessageStore.java @@ -65,17 +65,14 @@ import org.springframework.util.StringUtils; * database via JDBC. * * This message store shall be used for message channels only. - *
** As such, the {@link JdbcChannelMessageStore} uses database specific SQL queries. - *
** Contrary to the {@link JdbcMessageStore}, this implementation uses a single database table, * optimized to operate like a queue. * The SQL scripts for creating the table are packaged * under {@code org/springframework/integration/jdbc/schema-*.sql}, * where {@code *} denotes the target database type. - *
* * @author Gunnar Hillert * @author Artem Bilan @@ -114,6 +111,8 @@ public class JdbcChannelMessageStore implements PriorityCapableChannelMessageSto DELETE_MESSAGE } + private final Map{@link #DEFAULT_REGION}.
+ * for different purposes. Defaults to {@link #DEFAULT_REGION}.
* @param region the region name to set
*/
public void setRegion(String region) {
@@ -333,7 +330,7 @@ public class JdbcChannelMessageStore implements PriorityCapableChannelMessageSto
*
* }
*
- * @param usingIdCache When true the id cache will be used.
+ * @param usingIdCache When {@code true} the id cache will be used.
*/
public void setUsingIdCache(boolean usingIdCache) {
this.usingIdCache = usingIdCache;
@@ -439,9 +436,8 @@ public class JdbcChannelMessageStore implements PriorityCapableChannelMessageSto
}
/**
- * Method not implemented.
+ * Return the number of message groups in the store for configured region.
* @return The message group count.
- * @throws UnsupportedOperationException Method not supported.
*/
@ManagedAttribute
public int getMessageGroupCount() {
@@ -465,7 +461,7 @@ public class JdbcChannelMessageStore implements PriorityCapableChannelMessageSto
}
/**
- * Returns the number of messages persisted for the specified channel id (groupId)
+ * Return the number of messages persisted for the specified channel id (groupId)
* and the specified region ({@link #setRegion(String)}).
* @return The message group size.
*/
@@ -488,7 +484,7 @@ public class JdbcChannelMessageStore implements PriorityCapableChannelMessageSto
}
/**
- * Polls the database for a new message that is persisted for the given
+ * Poll the database for a new message that is persisted for the given
* group id which represents the channel identifier.
*/
@Override
@@ -582,21 +578,20 @@ public class JdbcChannelMessageStore implements PriorityCapableChannelMessageSto
boolean result = updated != 0;
if (result) {
- LOGGER.debug(LogMessage.format("Message with id '%s' was deleted.", id));
+ LOGGER.debug(() -> "Message with id '" + id + "' was deleted.");
}
else {
- LOGGER.warn(LogMessage.format("Message with id '%s' was not deleted.", id));
+ LOGGER.warn(() -> "Message with id '" + id + "' was not deleted.");
}
return result;
}
/**
- * Remove a Message Id from the idCache. Should be used in conjunction + * Remove a Message Id from the idCache. Should be used in conjunction * with the Spring Integration Transaction Synchronization feature to remove * a message from the Message Id cache once a transaction either succeeded or - * rolled back.
- *Only applicable if {@link #setUsingIdCache(boolean)} is set to
- * true