You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2015/08/31 04:01:26 UTC
[43/50] [abbrv] ignite git commit: Moved platform
CachePartialUpdateException to Ignite.
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-843
Commit: 26f0ee0ad7ce9df573dd180a96ff0bf2a366495f
Parents: 63ac8cd
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Fri Aug 28 13:51:08 2015 +0300
Committer: vozerov-gridgain <vo...@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);
+ }
+}