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:40:51 UTC
ignite git commit: Moved "AbstractBootstrap" class to Ignite.
Repository: ignite
Updated Branches:
refs/heads/master 2225f8d2a -> 203f00c77
Moved "AbstractBootstrap" class to Ignite.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/203f00c7
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/203f00c7
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/203f00c7
Branch: refs/heads/master
Commit: 203f00c774e6dd2eddf7a530b70c22e75feb3429
Parents: 2225f8d
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Wed Aug 26 09:41:32 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Wed Aug 26 09:41:32 2015 +0300
----------------------------------------------------------------------
.../platform/PlatformAbstractBootstrap.java | 47 ++++++++++++++++++++
1 file changed, 47 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/203f00c7/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/PlatformAbstractBootstrap.java
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/PlatformAbstractBootstrap.java b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/PlatformAbstractBootstrap.java
new file mode 100644
index 0000000..4db3c1e
--- /dev/null
+++ b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/PlatformAbstractBootstrap.java
@@ -0,0 +1,47 @@
+/*
+ * 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;
+
+import org.apache.ignite.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.processors.platform.memory.*;
+import org.apache.ignite.lang.*;
+
+/**
+ * Base interop bootstrap implementation.
+ */
+public abstract class PlatformAbstractBootstrap implements PlatformBootstrap {
+ /** {@inheritDoc} */
+ @Override public PlatformProcessor start(IgniteConfiguration cfg, long envPtr, long dataPtr) {
+ Ignition.setClientMode(new PlatformExternalMemory(null, dataPtr).input().readBoolean());
+
+ IgniteConfiguration cfg0 = closure(envPtr).apply(cfg);
+
+ IgniteEx node = (IgniteEx) Ignition.start(cfg0);
+
+ return node.context().platform();
+ }
+
+ /**
+ * Get configuration transformer closure.
+ *
+ * @param envPtr Environment pointer.
+ * @return Closure.
+ */
+ protected abstract IgniteClosure<IgniteConfiguration, IgniteConfiguration> closure(long envPtr);
+}