directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r471343 - /directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/store/derby/DerbyReplicationStore.java
Date Sun, 05 Nov 2006 02:46:03 GMT
Author: akarasulu
Date: Sat Nov  4 18:46:02 2006
New Revision: 471343

URL: http://svn.apache.org/viewvc?view=rev&rev=471343
Log:
using generics where appropriate

Modified:
    directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/store/derby/DerbyReplicationStore.java

Modified: directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/store/derby/DerbyReplicationStore.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/store/derby/DerbyReplicationStore.java?view=diff&rev=471343&r1=471342&r2=471343
==============================================================================
--- directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/store/derby/DerbyReplicationStore.java
(original)
+++ directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/store/derby/DerbyReplicationStore.java
Sat Nov  4 18:46:02 2006
@@ -68,7 +68,7 @@
     private String metadataTableName;
     private String uuidTableName;
     private String logTableName;
-    private Set knownReplicaIds;
+    private Set<ReplicaId> knownReplicaIds;
     private final Object knownReplicaIdsLock = new Object();
     private final OperationCodec operationCodec = new OperationCodec();
 
@@ -249,7 +249,7 @@
             // Get known replica IDs.
             ps = con.prepareStatement( "SELECT DISTINCT CSN_REPLICA_ID FROM " + logTableName
);
             rs = ps.executeQuery();
-            knownReplicaIds = new HashSet();
+            knownReplicaIds = new HashSet<ReplicaId>();
             while ( rs.next() )
             {
                 knownReplicaIds.add( new ReplicaId( rs.getString( 1 ) ) );
@@ -300,9 +300,9 @@
     }
 
 
-    public Set getKnownReplicaIds()
+    public Set<ReplicaId> getKnownReplicaIds()
     {
-        return new HashSet( knownReplicaIds );
+        return new HashSet<ReplicaId>( knownReplicaIds );
     }
 
 
@@ -468,7 +468,7 @@
         {
             synchronized ( knownReplicaIdsLock )
             {
-                Set newKnownReplicaIds = new HashSet( knownReplicaIds );
+                Set<ReplicaId> newKnownReplicaIds = new HashSet<ReplicaId>( knownReplicaIds
);
                 newKnownReplicaIds.add( csn.getReplicaId() );
                 knownReplicaIds = newKnownReplicaIds;
             }
@@ -547,10 +547,10 @@
         CSNVector newUV = new CSNVector();
         synchronized ( knownReplicaIds )
         {
-            Iterator i = knownReplicaIds.iterator();
+            Iterator<ReplicaId> i = knownReplicaIds.iterator();
             while ( i.hasNext() )
             {
-                newUV.setCSN( new SimpleCSN( 0, ( ReplicaId ) i.next(), 0 ) );
+                newUV.setCSN( new SimpleCSN( 0, i.next(), 0 ) );
             }
         }
 
@@ -710,10 +710,10 @@
             ps = con.prepareStatement( "SELECT CSN_TIMESTAMP, CSN_OP_SEQ FROM " + logTableName
                 + " WHERE CSN_REPLICA_ID=? ORDER BY CSN_TIMESTAMP " + ORDER + ", CSN_OP_SEQ
" + ORDER );
 
-            Iterator it = knownReplicaIds.iterator();
+            Iterator<ReplicaId> it = knownReplicaIds.iterator();
             while ( it.hasNext() )
             {
-                ReplicaId replicaId = ( ReplicaId ) it.next();
+                ReplicaId replicaId = it.next();
                 ps.setString( 1, replicaId.getId() );
                 rs = ps.executeQuery();
                 if ( rs.next() )



Mime
View raw message