Author: tolusha
Date: 2011-03-14 11:20:54 -0400 (Mon, 14 Mar 2011)
New Revision: 4081
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ChangesKey.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/IndexInfosKey.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/IndexUpdateKey.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheId.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheKey.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheNodesId.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CachePropsId.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheQPath.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheRefsId.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainer.java
Log:
EXOJCR-834: fix CacheKey' id
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ChangesKey.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ChangesKey.java 2011-03-14
10:08:56 UTC (rev 4080)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ChangesKey.java 2011-03-14
15:20:54 UTC (rev 4081)
@@ -57,7 +57,7 @@
if (obj instanceof ChangesKey)
{
ChangesKey key = (ChangesKey)obj;
- return (key.hash == hash && key.id.equals(id));
+ return (key.hash == hash && key.fullId.equals(fullId));
}
else
{
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/IndexInfosKey.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/IndexInfosKey.java 2011-03-14
10:08:56 UTC (rev 4080)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/IndexInfosKey.java 2011-03-14
15:20:54 UTC (rev 4081)
@@ -33,7 +33,7 @@
IndexInfosKey(String id)
{
- super("IndexInfos" + id);
+ super(id);
}
/**
@@ -45,7 +45,7 @@
if (obj instanceof IndexInfosKey)
{
IndexInfosKey key = (IndexInfosKey)obj;
- return (key.hash == hash && key.id.equals(id));
+ return (key.hash == hash && key.fullId.equals(fullId));
}
else
{
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/IndexUpdateKey.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/IndexUpdateKey.java 2011-03-14
10:08:56 UTC (rev 4080)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/IndexUpdateKey.java 2011-03-14
15:20:54 UTC (rev 4081)
@@ -33,7 +33,7 @@
IndexUpdateKey(String id)
{
- super("UpdateMonitor" + id);
+ super(id);
}
/**
@@ -45,7 +45,7 @@
if (obj instanceof IndexUpdateKey)
{
IndexUpdateKey key = (IndexUpdateKey)obj;
- return (key.hash == hash && key.id.equals(id));
+ return (key.hash == hash && key.fullId.equals(fullId));
}
else
{
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheId.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheId.java 2011-03-14
10:08:56 UTC (rev 4080)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheId.java 2011-03-14
15:20:54 UTC (rev 4081)
@@ -45,7 +45,7 @@
if (obj instanceof CacheId)
{
CacheId cacheId = (CacheId)obj;
- return (cacheId.hash == hash && cacheId.id.equals(id));
+ return (cacheId.hash == hash && cacheId.fullId.equals(fullId));
}
else
{
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheKey.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheKey.java 2011-03-14
10:08:56 UTC (rev 4080)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheKey.java 2011-03-14
15:20:54 UTC (rev 4081)
@@ -22,7 +22,7 @@
/**
* Created by The eXo Platform SAS. <br/>
- *
+ * RE
* Base class for WorkspaceCache keys.<br/>
*
* Date: 10.06.2008<br/>
@@ -33,20 +33,20 @@
public abstract class CacheKey implements Serializable, Comparable<CacheKey>
{
- protected final String id;
+ protected final String fullId;
protected final int hash;
public CacheKey(String id)
{
- this.id = id;
- this.hash = id.hashCode();
+ this.fullId = this.getClass().getSimpleName() + "-" + id;
+ this.hash = this.fullId.hashCode();
}
public CacheKey(String id, int hash)
{
- this.id = id;
- this.hash = hash;
+ this.fullId = this.getClass().getSimpleName() + "-" + id;
+ this.hash = this.fullId.hashCode();
}
/**
@@ -64,7 +64,7 @@
@Override
public String toString()
{
- return this.id.toString();
+ return this.fullId;
}
/**
@@ -72,7 +72,7 @@
*/
public int compareTo(CacheKey o)
{
- return id.compareTo(o.id);
+ return fullId.compareTo(o.fullId);
}
/**
@@ -80,4 +80,4 @@
*/
@Override
public abstract boolean equals(Object obj);
-}
+}
\ No newline at end of file
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheNodesId.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheNodesId.java 2011-03-14
10:08:56 UTC (rev 4080)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheNodesId.java 2011-03-14
15:20:54 UTC (rev 4081)
@@ -42,7 +42,7 @@
if (obj instanceof CacheNodesId)
{
CacheNodesId cacheNodesId = (CacheNodesId)obj;
- return (cacheNodesId.hash == hash && cacheNodesId.id.equals(id));
+ return (cacheNodesId.hash == hash &&
cacheNodesId.fullId.equals(fullId));
}
else
{
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CachePropsId.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CachePropsId.java 2011-03-14
10:08:56 UTC (rev 4080)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CachePropsId.java 2011-03-14
15:20:54 UTC (rev 4081)
@@ -42,7 +42,7 @@
if (obj instanceof CachePropsId)
{
CachePropsId cachePropsId = (CachePropsId)obj;
- return (cachePropsId.hash == hash && cachePropsId.id.equals(id));
+ return (cachePropsId.hash == hash &&
cachePropsId.fullId.equals(fullId));
}
else
{
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheQPath.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheQPath.java 2011-03-14
10:08:56 UTC (rev 4080)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheQPath.java 2011-03-14
15:20:54 UTC (rev 4081)
@@ -52,7 +52,7 @@
if (obj instanceof CacheQPath)
{
CacheQPath cacheQPath = (CacheQPath)obj;
- return (cacheQPath.hash == hash && cacheQPath.id.equals(id));
+ return (cacheQPath.hash == hash && cacheQPath.fullId.equals(fullId));
}
else
{
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheRefsId.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheRefsId.java 2011-03-14
10:08:56 UTC (rev 4080)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheRefsId.java 2011-03-14
15:20:54 UTC (rev 4081)
@@ -31,11 +31,9 @@
public class CacheRefsId extends CacheKey
{
- public static final String PREFIX = "R";
-
CacheRefsId(String id)
{
- super(PREFIX + id);
+ super(id);
}
@Override
@@ -44,7 +42,7 @@
if (obj instanceof CacheRefsId)
{
CacheRefsId cachePropsId = (CacheRefsId)obj;
- return (cachePropsId.hash == hash && cachePropsId.id.equals(id));
+ return (cachePropsId.hash == hash &&
cachePropsId.fullId.equals(fullId));
}
else
{
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainer.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainer.java 2011-03-14
10:08:56 UTC (rev 4080)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainer.java 2011-03-14
15:20:54 UTC (rev 4081)
@@ -1184,6 +1184,7 @@
*/
public DataRestor getDataRestorer(File storageDir, Connection jdbcConn) throws
BackupException
{
+
List<DataRestor> restorers = new ArrayList<DataRestor>();
ObjectReader backupInfo = null;
Show replies by date