INT-2040 changed signature of MessageStore.getMessageCount() to return long. Changed affected implementations

This commit is contained in:
Oleg Zhurakousky
2011-08-11 13:07:41 -04:00
parent 94dea0855d
commit 521a602dad
6 changed files with 6 additions and 6 deletions

View File

@@ -61,6 +61,6 @@ public interface MessageStore {
* @throws UnsupportedOperationException if not implemented * @throws UnsupportedOperationException if not implemented
*/ */
@ManagedAttribute @ManagedAttribute
int getMessageCount(); long getMessageCount();
} }

View File

@@ -76,7 +76,7 @@ public class SimpleMessageStore extends AbstractMessageGroupStore implements Mes
} }
@ManagedAttribute @ManagedAttribute
public int getMessageCount() { public long getMessageCount() {
return idToMessage.size(); return idToMessage.size();
} }

View File

@@ -50,7 +50,7 @@ public class GemfireMessageStore implements MessageStore {
return this.region.remove(id); return this.region.remove(id);
} }
public int getMessageCount() { public long getMessageCount() {
return this.region.size(); return this.region.size();
} }

View File

@@ -249,7 +249,7 @@ public class JdbcMessageStore extends AbstractMessageGroupStore implements Messa
} }
@ManagedAttribute @ManagedAttribute
public int getMessageCount() { public long getMessageCount() {
return jdbcTemplate.queryForInt(getQuery(GET_MESSAGE_COUNT), region); return jdbcTemplate.queryForInt(getQuery(GET_MESSAGE_COUNT), region);
} }

View File

@@ -89,7 +89,7 @@ public class MongoDbMessageStore implements MessageStore, BeanClassLoaderAware {
return this.template.findOne(this.idQuery(id), Message.class, this.collectionName); return this.template.findOne(this.idQuery(id), Message.class, this.collectionName);
} }
public int getMessageCount() { public long getMessageCount() {
// TODO: long to int // TODO: long to int
return new Long(this.template.getCollection(DEFAULT_COLLECTION_NAME).getCount()).intValue(); return new Long(this.template.getCollection(DEFAULT_COLLECTION_NAME).getCount()).intValue();
} }

View File

@@ -106,7 +106,7 @@ public class RedisMessageStore extends AbstractMessageGroupStore implements Mess
} }
public int getMessageCount() { public long getMessageCount() {
return redisTemplate.execute(new RedisCallback<Integer>() { return redisTemplate.execute(new RedisCallback<Integer>() {
public Integer doInRedis(RedisConnection connection) public Integer doInRedis(RedisConnection connection)
throws DataAccessException { throws DataAccessException {