ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [28/33] ignite git commit: Moved platform CachePartialUpdateException to Ignite.
Date Fri, 28 Aug 2015 14:01:59 GMT
Moved platform CachePartialUpdateException to Ignite.


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

Branch: refs/heads/ignite-1093
Commit: 26f0ee0ad7ce9df573dd180a96ff0bf2a366495f
Parents: 63ac8cd
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Fri Aug 28 13:51:08 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Fri Aug 28 13:51:08 2015 +0300

----------------------------------------------------------------------
 .../PlatformCachePartialUpdateException.java    | 68 ++++++++++++++++++++
 1 file changed, 68 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/26f0ee0a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCachePartialUpdateException.java
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCachePartialUpdateException.java
b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCachePartialUpdateException.java
new file mode 100644
index 0000000..925b0b2
--- /dev/null
+++ b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCachePartialUpdateException.java
@@ -0,0 +1,68 @@
+/*
+ * 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.processors.platform.cache;
+
+import org.apache.ignite.cache.*;
+import org.apache.ignite.internal.portable.*;
+import org.apache.ignite.internal.processors.platform.*;
+import org.apache.ignite.internal.processors.platform.utils.*;
+
+import java.util.*;
+
+/**
+ * Interop cache partial update exception.
+ */
+public class PlatformCachePartialUpdateException extends PlatformException implements PlatformExtendedException
{
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Platform context. */
+    private final PlatformContext ctx;
+
+    /** Keep portable flag. */
+    private final boolean keepPortable;
+
+    /**
+     * Constructor.
+     *
+     * @param cause Root cause.
+     * @param ctx Context.
+     * @param keepPortable Keep portable flag.
+     */
+    public PlatformCachePartialUpdateException(CachePartialUpdateException cause, PlatformContext
ctx,
+        boolean keepPortable) {
+        super(cause);
+
+        this.ctx = ctx;
+        this.keepPortable = keepPortable;
+    }
+
+    /** {@inheritDoc} */
+    @Override public PlatformContext context() {
+        return ctx;
+    }
+
+    /** {@inheritDoc} */
+    @Override public void writeData(PortableRawWriterEx writer) {
+        Collection keys = ((CachePartialUpdateException)getCause()).failedKeys();
+
+        writer.writeBoolean(keepPortable);
+
+        PlatformUtils.writeNullableCollection(writer, keys);
+    }
+}


Mime
View raw message