INT-2040 changed signature of MessageStore.getMessageCount() to return long. Changed affected implementations
This commit is contained in:
@@ -61,6 +61,6 @@ public interface MessageStore {
|
||||
* @throws UnsupportedOperationException if not implemented
|
||||
*/
|
||||
@ManagedAttribute
|
||||
int getMessageCount();
|
||||
long getMessageCount();
|
||||
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ public class SimpleMessageStore extends AbstractMessageGroupStore implements Mes
|
||||
}
|
||||
|
||||
@ManagedAttribute
|
||||
public int getMessageCount() {
|
||||
public long getMessageCount() {
|
||||
return idToMessage.size();
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ public class GemfireMessageStore implements MessageStore {
|
||||
return this.region.remove(id);
|
||||
}
|
||||
|
||||
public int getMessageCount() {
|
||||
public long getMessageCount() {
|
||||
return this.region.size();
|
||||
}
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@ public class JdbcMessageStore extends AbstractMessageGroupStore implements Messa
|
||||
}
|
||||
|
||||
@ManagedAttribute
|
||||
public int getMessageCount() {
|
||||
public long getMessageCount() {
|
||||
return jdbcTemplate.queryForInt(getQuery(GET_MESSAGE_COUNT), region);
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ public class MongoDbMessageStore implements MessageStore, BeanClassLoaderAware {
|
||||
return this.template.findOne(this.idQuery(id), Message.class, this.collectionName);
|
||||
}
|
||||
|
||||
public int getMessageCount() {
|
||||
public long getMessageCount() {
|
||||
// TODO: long to int
|
||||
return new Long(this.template.getCollection(DEFAULT_COLLECTION_NAME).getCount()).intValue();
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ public class RedisMessageStore extends AbstractMessageGroupStore implements Mess
|
||||
}
|
||||
|
||||
|
||||
public int getMessageCount() {
|
||||
public long getMessageCount() {
|
||||
return redisTemplate.execute(new RedisCallback<Integer>() {
|
||||
public Integer doInRedis(RedisConnection connection)
|
||||
throws DataAccessException {
|
||||
|
||||
Reference in New Issue
Block a user