You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2022/05/12 09:33:59 UTC

[GitHub] [ignite] ptupitsyn commented on a diff in pull request #10019: IGNITE-16857 Java thin: Add AtomicLong

ptupitsyn commented on code in PR #10019:
URL: https://github.com/apache/ignite/pull/10019#discussion_r871168493


##########
modules/core/src/main/java/org/apache/ignite/client/ClientAtomicConfiguration.java:
##########
@@ -0,0 +1,135 @@
+/*
+ * 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.client;
+
+import org.apache.ignite.IgniteAtomicSequence;
+import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.internal.util.typedef.internal.S;
+import static org.apache.ignite.cache.CacheMode.PARTITIONED;
+
+/**
+ * Configuration for atomic data structures.
+ */
+public class ClientAtomicConfiguration {
+    /** */
+    public static final int DFLT_BACKUPS = 1;
+
+    /** */
+    public static final CacheMode DFLT_CACHE_MODE = PARTITIONED;
+
+    /** Default atomic sequence reservation size. */
+    public static final int DFLT_ATOMIC_SEQUENCE_RESERVE_SIZE = 1000;

Review Comment:
   Done.



##########
modules/core/src/main/java/org/apache/ignite/client/ClientAtomicConfiguration.java:
##########
@@ -0,0 +1,135 @@
+/*
+ * 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.client;
+
+import org.apache.ignite.IgniteAtomicSequence;
+import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.internal.util.typedef.internal.S;
+import static org.apache.ignite.cache.CacheMode.PARTITIONED;
+
+/**
+ * Configuration for atomic data structures.
+ */
+public class ClientAtomicConfiguration {
+    /** */
+    public static final int DFLT_BACKUPS = 1;
+
+    /** */
+    public static final CacheMode DFLT_CACHE_MODE = PARTITIONED;
+
+    /** Default atomic sequence reservation size. */
+    public static final int DFLT_ATOMIC_SEQUENCE_RESERVE_SIZE = 1000;
+
+    /** Default batch size for all cache's sequences. */
+    private int seqReserveSize = DFLT_ATOMIC_SEQUENCE_RESERVE_SIZE;
+
+    /** Cache mode. */
+    private CacheMode cacheMode = DFLT_CACHE_MODE;
+
+    /** Number of backups. */
+    private int backups = DFLT_BACKUPS;
+
+    /** Group name. */
+    private String grpName;
+
+    /**
+     * @return Number of backup nodes.
+     */
+    public int getBackups() {
+        return backups;
+    }
+
+    /**
+     * Constructor.

Review Comment:
   Fixed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org