Author: pnedonosko
Date: 2010-01-13 11:32:21 -0500 (Wed, 13 Jan 2010)
New Revision: 1379
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/PendingChangesLog.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/WorkspaceDataManagerProxy.java
Log:
EXOJCR-378: jcr.ext merge with OPT
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java
===================================================================
---
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java 2010-01-13
16:24:32 UTC (rev 1378)
+++
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java 2010-01-13
16:32:21 UTC (rev 1379)
@@ -299,6 +299,16 @@
transactionManager = null;
}
}
+
+ /**
+ * Get Items Cache.
+ *
+ * @return WorkspaceStorageCache
+ */
+ public WorkspaceStorageCache getCache()
+ {
+ return cache;
+ }
/**
* {@inheritDoc}
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/PendingChangesLog.java
===================================================================
---
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/PendingChangesLog.java 2010-01-13
16:24:32 UTC (rev 1378)
+++
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/PendingChangesLog.java 2010-01-13
16:32:21 UTC (rev 1379)
@@ -471,6 +471,8 @@
*/
public void restore() throws IOException
{
+ // TODO same code as in BackupWorkspaceInitializer?
+
List<ItemState> listItemState = itemDataChangesLog.getAllStates();
for (int i = 0; i < this.listFixupStream.size(); i++)
{
@@ -478,11 +480,12 @@
ItemData itemData = itemState.getData();
TransientPropertyData propertyData = (TransientPropertyData)itemData;
- TransientValueData transientValueData =
+ TransientValueData tvd =
(TransientValueData)(propertyData.getValues().get(listFixupStream.get(i).getValueDataId()));
- transientValueData.setStream(new FileInputStream(listFile.get(i)));
- transientValueData.setFileCleaner(fileCleaner);
- transientValueData.isByteArray();
+
+ // re-init the value
+ tvd.delegate(new TransientValueData(tvd.getOrderNumber(), null, null,
listFile.get(i), fileCleaner, -1,
+ null, true));
}
if (listRandomAccessFile != null)
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/WorkspaceDataManagerProxy.java
===================================================================
---
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/WorkspaceDataManagerProxy.java 2010-01-13
16:24:32 UTC (rev 1378)
+++
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/WorkspaceDataManagerProxy.java 2010-01-13
16:32:21 UTC (rev 1379)
@@ -72,9 +72,15 @@
this.listeners = new ArrayList<ItemsPersistenceListener>();
listeners.add(dataManager.getCache());
if (searchIndex != null)
+ {
listeners.add(searchIndex);
+ }
+
if (lockManager != null)
+ {
listeners.add(lockManager);
+ }
+
log.info("WorkspaceDataManagerProxy is instantiated");
}
@@ -98,7 +104,10 @@
{
listener.onSaveItems(changesLog);
}
+
if (log.isDebugEnabled())
+ {
log.debug("ChangesLog sent to " + listeners);
+ }
}
}
Show replies by date