Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 11D3E18C98 for ; Tue, 19 May 2015 15:15:32 +0000 (UTC) Received: (qmail 88972 invoked by uid 500); 19 May 2015 15:15:32 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 88941 invoked by uid 500); 19 May 2015 15:15:32 -0000 Mailing-List: contact commits-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list commits@ignite.incubator.apache.org Received: (qmail 88930 invoked by uid 99); 19 May 2015 15:15:31 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 May 2015 15:15:31 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 8536C182929 for ; Tue, 19 May 2015 15:15:31 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.771 X-Spam-Level: * X-Spam-Status: No, score=1.771 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id nxbwsED2GPXR for ; Tue, 19 May 2015 15:15:21 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with SMTP id 3CC452603A for ; Tue, 19 May 2015 15:15:12 +0000 (UTC) Received: (qmail 88605 invoked by uid 99); 19 May 2015 15:15:12 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 May 2015 15:15:12 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0544AE2F6F; Tue, 19 May 2015 15:15:12 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: vozerov@apache.org To: commits@ignite.incubator.apache.org Date: Tue, 19 May 2015 15:15:11 -0000 Message-Id: <4669f827999c4d55b3fc6e35cdee4b94@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] incubator-ignite git commit: # GG-9614 review Repository: incubator-ignite Updated Branches: refs/heads/ignite-gg-9614 01eddc65d -> f0c0af9d7 # GG-9614 review Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/e49c66ff Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e49c66ff Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e49c66ff Branch: refs/heads/ignite-gg-9614 Commit: e49c66ff3eebb1f68eec6beea577e5705daf5958 Parents: da43ab2 Author: ptupitsyn Authored: Tue May 19 18:14:13 2015 +0300 Committer: ptupitsyn Committed: Tue May 19 18:14:13 2015 +0300 ---------------------------------------------------------------------- .../internal/GridEventConsumeHandler.java | 8 ++--- .../interop/InteropAwareEventFilter.java | 38 ++++++++++++++++++++ .../internal/interop/InteropEventFilter.java | 38 -------------------- .../eventstorage/GridEventStorageManager.java | 4 +-- 4 files changed, 44 insertions(+), 44 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e49c66ff/modules/core/src/main/java/org/apache/ignite/internal/GridEventConsumeHandler.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridEventConsumeHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/GridEventConsumeHandler.java index a653542..505204d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/GridEventConsumeHandler.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/GridEventConsumeHandler.java @@ -125,8 +125,8 @@ class GridEventConsumeHandler implements GridContinuousHandler { if (filter != null) ctx.resource().injectGeneric(filter); - if (filter instanceof InteropEventFilter) - ((InteropEventFilter)filter).initialize(ctx); + if (filter instanceof InteropAwareEventFilter) + ((InteropAwareEventFilter)filter).initialize(ctx); final boolean loc = nodeId.equals(ctx.localNodeId()); @@ -196,8 +196,8 @@ class GridEventConsumeHandler implements GridContinuousHandler { RuntimeException err = null; try { - if (filter instanceof InteropEventFilter) - ((InteropEventFilter)filter).close(); + if (filter instanceof InteropAwareEventFilter) + ((InteropAwareEventFilter)filter).close(); } catch(RuntimeException ex) { err = ex; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e49c66ff/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropAwareEventFilter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropAwareEventFilter.java b/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropAwareEventFilter.java new file mode 100644 index 0000000..3aeb53d --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropAwareEventFilter.java @@ -0,0 +1,38 @@ +/* + * 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.ignite.internal.interop; + +import org.apache.ignite.*; +import org.apache.ignite.events.*; +import org.apache.ignite.internal.*; +import org.apache.ignite.lang.*; + +/** + * Special version of predicate for events with initialize/close callbacks. + */ +public interface InteropAwareEventFilter extends IgnitePredicate { + /** + * Initializes the filter. + */ + public void initialize(GridKernalContext ctx); + + /** + * Closes the filter. + */ + public void close(); +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e49c66ff/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropEventFilter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropEventFilter.java b/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropEventFilter.java deleted file mode 100644 index 7afb6fe..0000000 --- a/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropEventFilter.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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.ignite.internal.interop; - -import org.apache.ignite.*; -import org.apache.ignite.events.*; -import org.apache.ignite.internal.*; -import org.apache.ignite.lang.*; - -/** - * Special version of predicate for events with initialize/close callbacks. - */ -public interface InteropEventFilter extends IgnitePredicate { - /** - * Initializes the filter. - */ - public void initialize(GridKernalContext ctx); - - /** - * Closes the filter. - */ - public void close(); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e49c66ff/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java index bccc920..95c5eb1 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java @@ -761,8 +761,8 @@ public class GridEventStorageManager extends GridManagerAdapter public Collection localEvents(IgnitePredicate p) { assert p != null; - if (p instanceof InteropEventFilter) { - InteropEventFilter p0 = (InteropEventFilter)p; + if (p instanceof InteropAwareEventFilter) { + InteropAwareEventFilter p0 = (InteropAwareEventFilter)p; p0.initialize(ctx);