コード例 #1
0
 public Set<EntityKey> getEntityKeys() {
   Set<EntityKey> entityKeys = Sets.newHashSet();
   for (SessionStatistics s : sessionStatistics) {
     @SuppressWarnings("unchecked")
     Set<EntityKey> shardEntityKeys = (Set<EntityKey>) s.getEntityKeys();
     entityKeys.addAll(shardEntityKeys);
   }
   return entityKeys;
 }
コード例 #2
0
 public Set<CollectionKey> getCollectionKeys() {
   Set<CollectionKey> collectionKeys = Sets.newHashSet();
   for (SessionStatistics s : sessionStatistics) {
     @SuppressWarnings("unchecked")
     Set<CollectionKey> shardCollectionKeys = (Set<CollectionKey>) s.getCollectionKeys();
     collectionKeys.addAll(shardCollectionKeys);
   }
   return collectionKeys;
 }
コード例 #3
0
 public ShardedSessionStatistics(ShardedSessionImplementor session) {
   sessionStatistics = Sets.newHashSet();
   for (Shard s : session.getShards()) {
     if (s.getSession() != null) {
       sessionStatistics.add(s.getSession().getStatistics());
     } else {
       OpenSessionEvent ose =
           new OpenSessionEvent() {
             public void onOpenSession(Session session) {
               sessionStatistics.add(session.getStatistics());
             }
           };
       s.addOpenSessionEvent(ose);
     }
   }
 }