You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2015/08/26 08:13:04 UTC

ignite git commit: Moving platform utility closures to Ignite.

Repository: ignite
Updated Branches:
  refs/heads/master 2e6d91571 -> c47a7061f


Moving platform utility closures to Ignite.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c47a7061
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c47a7061
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c47a7061

Branch: refs/heads/master
Commit: c47a7061f042f60a73fd9014091e98b2c656bfb4
Parents: 2e6d915
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Wed Aug 26 09:13:45 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Wed Aug 26 09:13:45 2015 +0300

----------------------------------------------------------------------
 .../platform/utils/PlatformReaderBiClosure.java | 34 ++++++++++++++++++++
 .../platform/utils/PlatformReaderClosure.java   | 34 ++++++++++++++++++++
 .../platform/utils/PlatformWriterBiClosure.java | 34 ++++++++++++++++++++
 .../platform/utils/PlatformWriterClosure.java   | 33 +++++++++++++++++++
 4 files changed, 135 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/c47a7061/modules/platform/src/main/java/org/apache/ignite/internal/platform/utils/PlatformReaderBiClosure.java
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/java/org/apache/ignite/internal/platform/utils/PlatformReaderBiClosure.java b/modules/platform/src/main/java/org/apache/ignite/internal/platform/utils/PlatformReaderBiClosure.java
new file mode 100644
index 0000000..0280ba8
--- /dev/null
+++ b/modules/platform/src/main/java/org/apache/ignite/internal/platform/utils/PlatformReaderBiClosure.java
@@ -0,0 +1,34 @@
+/*
+ * 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.platform.utils;
+
+import org.apache.ignite.internal.portable.*;
+import org.apache.ignite.lang.*;
+
+/**
+ * Reader bi-closure.
+ */
+public interface PlatformReaderBiClosure<T1, T2> {
+    /**
+     * Read object from reader.
+     *
+     * @param reader Reader.
+     * @return Object.
+     */
+    IgniteBiTuple<T1, T2> read(PortableRawReaderEx reader);
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c47a7061/modules/platform/src/main/java/org/apache/ignite/internal/platform/utils/PlatformReaderClosure.java
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/java/org/apache/ignite/internal/platform/utils/PlatformReaderClosure.java b/modules/platform/src/main/java/org/apache/ignite/internal/platform/utils/PlatformReaderClosure.java
new file mode 100644
index 0000000..73a24d1
--- /dev/null
+++ b/modules/platform/src/main/java/org/apache/ignite/internal/platform/utils/PlatformReaderClosure.java
@@ -0,0 +1,34 @@
+/*
+ * 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.platform.utils;
+
+import org.apache.ignite.internal.portable.*;
+
+/**
+ * Reader closure.
+ */
+public interface PlatformReaderClosure<T> {
+
+    /**
+     * Read object from reader.
+     *
+     * @param reader Reader.
+     * @return Object.
+     */
+    T read(PortableRawReaderEx reader);
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c47a7061/modules/platform/src/main/java/org/apache/ignite/internal/platform/utils/PlatformWriterBiClosure.java
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/java/org/apache/ignite/internal/platform/utils/PlatformWriterBiClosure.java b/modules/platform/src/main/java/org/apache/ignite/internal/platform/utils/PlatformWriterBiClosure.java
new file mode 100644
index 0000000..cbd34fa
--- /dev/null
+++ b/modules/platform/src/main/java/org/apache/ignite/internal/platform/utils/PlatformWriterBiClosure.java
@@ -0,0 +1,34 @@
+/*
+ * 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.platform.utils;
+
+import org.apache.ignite.internal.portable.*;
+
+/**
+ * Interop writer bi-closure.
+ */
+public interface PlatformWriterBiClosure<T1, T2> {
+    /**
+     * Write values.
+     *
+     * @param writer Writer.
+     * @param val1 Value 1.
+     * @param val2 Value 2.
+     */
+    public void write(PortableRawWriterEx writer, T1 val1, T2 val2);
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c47a7061/modules/platform/src/main/java/org/apache/ignite/internal/platform/utils/PlatformWriterClosure.java
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/java/org/apache/ignite/internal/platform/utils/PlatformWriterClosure.java b/modules/platform/src/main/java/org/apache/ignite/internal/platform/utils/PlatformWriterClosure.java
new file mode 100644
index 0000000..d9953ca
--- /dev/null
+++ b/modules/platform/src/main/java/org/apache/ignite/internal/platform/utils/PlatformWriterClosure.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.ignite.internal.platform.utils;
+
+import org.apache.ignite.internal.portable.*;
+
+/**
+ * Interop writer closure.
+ */
+public interface PlatformWriterClosure<T> {
+    /**
+     * Write value.
+     *
+     * @param writer Writer.
+     * @param val Value.
+     */
+    public void write(PortableRawWriterEx writer, T val);
+}