jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dpfis...@apache.org
Subject svn commit: r471760 [3/3] - in /jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core: ./ cluster/ config/ lock/ nodetype/virtual/ observation/ state/ version/
Date Mon, 06 Nov 2006 15:22:31 GMT
Modified: jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImpl.java?view=diff&rev=471760&r1=471759&r2=471760
==============================================================================
--- jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImpl.java
Mon Nov  6 07:22:29 2006
@@ -37,6 +37,8 @@
 import org.apache.jackrabbit.core.state.SharedItemStateManager;
 import org.apache.jackrabbit.core.state.ItemStateListener;
 import org.apache.jackrabbit.core.state.ItemState;
+import org.apache.jackrabbit.core.cluster.UpdateEventChannel;
+import org.apache.jackrabbit.core.cluster.UpdateEventListener;
 import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.core.virtual.VirtualItemStateProvider;
 import org.apache.jackrabbit.name.MalformedPathException;
@@ -60,7 +62,7 @@
 /**
  * This Class implements a VersionManager.
  */
-public class VersionManagerImpl extends AbstractVersionManager implements ItemStateListener
{
+public class VersionManagerImpl extends AbstractVersionManager implements ItemStateListener,
UpdateEventListener {
 
     /**
      * the default logger
@@ -378,6 +380,16 @@
     }
 
     /**
+     * Set an event channel to inform about updates.
+     *
+     * @param eventChannel event channel
+     */
+    public void setEventChannel(UpdateEventChannel eventChannel) {
+        sharedStateMgr.setEventChannel(eventChannel);
+        eventChannel.setListener(this);
+    }
+
+    /**
      * {@inheritDoc}
      */
     protected void itemDiscarded(InternalVersionItem item) {
@@ -481,6 +493,18 @@
      * Not used.
      */
     public void stateDiscarded(ItemState discarded) {}
+
+    //--------------------------------------------------< UpdateEventListener >
+
+    /**
+     * {@inheritDoc}
+     */
+    public void externalUpdate(ChangeLog changes, List events) throws RepositoryException
{
+        EventStateCollection esc = getEscFactory().createEventStateCollection();
+        esc.addAll(events);
+
+        sharedStateMgr.externalUpdate(changes, esc);
+    }
 
     //--------------------------------------------------------< inner classes >
     /**



Mime
View raw message