This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag 
org.apache.sling.discovery.commons-1.0.0
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-discovery-commons.git

commit 26e1a7b053883381b26f52fa201da16aabc257ea
Author: Stefan Egli <[email protected]>
AuthorDate: Fri Oct 23 11:28:41 2015 +0000

    SLING-5094 / SLING-5173 / SLING-4603 related : ensure that before invoking 
the ConsistencyService.sync no async events are still in the queue. This is 
achieved by enqueueing an async event too that once it gets triggered ensures 
that no async events are left. This mechanism ensures that before the syncToken 
is written, all TopologyEventListeners have received a TOPOLOGY_CHANGING - and 
only that guarantees that the syncToken mechanism carries a high guarantee.
    
    git-svn-id: 
https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/discovery/commons@1710176
 13f79535-47bb-0310-9956-ffa450edef68
---
 .../commons/providers/base/AsyncEvent.java         | 33 ++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git 
a/src/main/java/org/apache/sling/discovery/commons/providers/base/AsyncEvent.java
 
b/src/main/java/org/apache/sling/discovery/commons/providers/base/AsyncEvent.java
new file mode 100644
index 0000000..8c3f17f
--- /dev/null
+++ 
b/src/main/java/org/apache/sling/discovery/commons/providers/base/AsyncEvent.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.discovery.commons.providers.base;
+
+/**
+ * An AsyncEvent can be enqueued to the AsyncEventSender for
+ * later, asynchronous triggering
+ */
+public interface AsyncEvent {
+
+    /**
+     * As soon as this AsyncEvent is at the front of AsyncEventSender's
+     * FIFO queue it will be invoked via this trigger() method.
+     */
+    void trigger();
+    
+}

-- 
To stop receiving notification emails like this one, please contact
"[email protected]" <[email protected]>.

Reply via email to