You are viewing a plain text version of this content. The canonical link for it is here.
Posted to s4-commits@incubator.apache.org by mm...@apache.org on 2012/09/10 16:34:46 UTC
[2/2] git commit: removed Key class from s4-core (use class from
s4-base)
removed Key class from s4-core (use class from s4-base)
Project: http://git-wip-us.apache.org/repos/asf/incubator-s4/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-s4/commit/ad1b1bf4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-s4/tree/ad1b1bf4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-s4/diff/ad1b1bf4
Branch: refs/heads/S4-95
Commit: ad1b1bf42efdf6a11e59bd78cd29ac6132f2922b
Parents: 89c91d8
Author: Matthieu Morel <mm...@apache.org>
Authored: Thu Aug 30 15:46:49 2012 +0200
Committer: Matthieu Morel <mm...@apache.org>
Committed: Thu Aug 30 15:46:49 2012 +0200
----------------------------------------------------------------------
.../src/main/java/org/apache/s4/core/Key.java | 54 ---------------
.../main/java/org/apache/s4/core/RemoteStream.java | 1 +
.../src/main/java/org/apache/s4/core/Stream.java | 1 +
3 files changed, 2 insertions(+), 54 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/ad1b1bf4/subprojects/s4-core/src/main/java/org/apache/s4/core/Key.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/Key.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/Key.java
deleted file mode 100644
index 2a78213..0000000
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/Key.java
+++ /dev/null
@@ -1,54 +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.s4.core;
-
-import java.util.List;
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.s4.base.Event;
-import org.apache.s4.base.KeyFinder;
-
-/**
- * The Key class is used to get the value of the key on a specific type of event. This is done to abstract all the
- * complexity required to get the value. The method for getting the value is implemented in a method of an object of
- * type KeyFinder<T>.
- *
- * The application programmer provides the events and the corresponding finders. The framework will use it to key on
- * events.
- */
-public class Key<T extends Event> {
-
- final private KeyFinder<T> finder;
- final private String separator;
-
- public Key(KeyFinder<T> finder, String separator) {
- this.finder = finder;
- this.separator = separator;
- }
-
- public List<String> getList(T event) {
- return finder.get(event);
- }
-
- public String get(T event) {
- List<String> keys = getList(event);
-
- return StringUtils.join(keys, separator);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/ad1b1bf4/subprojects/s4-core/src/main/java/org/apache/s4/core/RemoteStream.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/RemoteStream.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/RemoteStream.java
index a588535..c4a3798 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/RemoteStream.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/RemoteStream.java
@@ -22,6 +22,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import org.apache.s4.base.Event;
import org.apache.s4.base.Hasher;
+import org.apache.s4.base.Key;
import org.apache.s4.base.KeyFinder;
import org.apache.s4.comm.topology.RemoteStreams;
import org.slf4j.Logger;
http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/ad1b1bf4/subprojects/s4-core/src/main/java/org/apache/s4/core/Stream.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/Stream.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/Stream.java
index 6616d0f..aa54dfc 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/Stream.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/Stream.java
@@ -25,6 +25,7 @@ import java.util.concurrent.BlockingQueue;
import org.apache.s4.base.Event;
import org.apache.s4.base.EventMessage;
import org.apache.s4.base.GenericKeyFinder;
+import org.apache.s4.base.Key;
import org.apache.s4.base.KeyFinder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;