Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions assembly/dependencies-apache-ignite-lgpl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
<exclude>${project.groupId}:ignite-commons</exclude>
<exclude>${project.groupId}:ignite-binary-api</exclude>
<exclude>${project.groupId}:ignite-binary-impl</exclude>
<exclude>${project.groupId}:ignite-thin-client-api</exclude>
<exclude>${project.groupId}:ignite-clients</exclude>
<exclude>${project.groupId}:ignite-spring</exclude>
<exclude>${project.groupId}:ignite-tools</exclude>
Expand Down
1 change: 1 addition & 0 deletions assembly/dependencies-apache-ignite-slim.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
<exclude>${project.groupId}:ignite-commons</exclude>
<exclude>${project.groupId}:ignite-binary-api</exclude>
<exclude>${project.groupId}:ignite-binary-impl</exclude>
<exclude>${project.groupId}:ignite-thin-client-api</exclude>
<exclude>${project.groupId}:ignite-clients</exclude>
<exclude>${project.groupId}:ignite-spring</exclude>
<exclude>${project.groupId}:ignite-tools</exclude>
Expand Down
1 change: 1 addition & 0 deletions assembly/dependencies-apache-ignite.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
<exclude>${project.groupId}:ignite-commons</exclude>
<exclude>${project.groupId}:ignite-binary-api</exclude>
<exclude>${project.groupId}:ignite-binary-impl</exclude>
<exclude>${project.groupId}:ignite-thin-client-api</exclude>
<exclude>${project.groupId}:ignite-clients</exclude>
<exclude>${project.groupId}:ignite-spring</exclude>
<exclude>${project.groupId}:ignite-tools</exclude>
Expand Down
5 changes: 5 additions & 0 deletions modules/bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,11 @@
<artifactId>ignite-commons</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ignite-thin-client-api</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ignite-codegen</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
package org.apache.ignite.cache;

import javax.cache.processor.EntryProcessor;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.transactions.Transaction;
import org.jetbrains.annotations.Nullable;

/**
Expand All @@ -28,14 +26,14 @@
* used whenever transactions and explicit locking are not needed. Note that in {@link #ATOMIC}
* mode cache will still maintain full data consistency across all cache nodes.
* <p>
* Cache atomicity may be set via {@link org.apache.ignite.configuration.CacheConfiguration#getAtomicityMode()}
* Cache atomicity may be set via {@ignitelink org.apache.ignite.configuration.CacheConfiguration#getAtomicityMode()}
* configuration property.
*/
public enum CacheAtomicityMode {
/**
* Enables fully {@code ACID}-compliant transactional cache behavior for the key-value API.
* <p>
* See {@link Transaction} for more information about transactions.
* See {@ignitelink org.apache.ignite.transactions.Transaction} for more information about transactions.
*/
TRANSACTIONAL,

Expand All @@ -47,7 +45,7 @@ public enum CacheAtomicityMode {
* In addition to transactions and locking, one of the main differences in {@code ATOMIC} mode
* is that bulk writes, such as {@code putAll(...)}, {@code removeAll(...)}, and {@code transformAll(...)}
* methods, become simple batch operations which can partially fail. In case of partial
* failure {@link CachePartialUpdateException} will be thrown
* failure {@ignitelink org.apache.ignite.cache.CachePartialUpdateException} will be thrown
* which will contain a list of keys for which the update failed. It is recommended that bulk writes are used
* whenever multiple keys need to be inserted or updated in cache, as they reduce number of network trips and
* provide better performance.
Expand Down Expand Up @@ -77,7 +75,7 @@ public enum CacheAtomicityMode {
* <li>
* For operations {@code putIfAbsent(K, V)}, {@code replace(K, V, V)} and {@code remove(K, V)} return
* value on primary node crash may be incorrect because of the automatic retries. It is recommended
* to disable retries with {@link IgniteCache#withNoRetries()} and manually restore primary-backup
* to disable retries with {@ignitelink org.apache.ignite.IgniteCache#withNoRetries()} and manually restore primary-backup
* consistency in case of update failure.
* </li>
* </ul>
Expand All @@ -87,7 +85,7 @@ public enum CacheAtomicityMode {
* <p>
* Note! Consistency behavior of atomic cache will be improved in future releases.
*
* @see IgniteCache#withNoRetries()
* @see {@ignitelink org.apache.ignite.IgniteCache#withNoRetries()}
*/
ATOMIC;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,17 @@
package org.apache.ignite.cache;

import java.util.stream.Stream;
import org.apache.ignite.cache.affinity.AffinityFunction;
import org.apache.ignite.configuration.NearCacheConfiguration;
import org.jetbrains.annotations.Nullable;

/**
* Enumeration of all supported caching modes. Cache mode is specified in {@link org.apache.ignite.configuration.CacheConfiguration}
* Enumeration of all supported caching modes. Cache mode is specified in {@ignitelink org.apache.ignite.configuration.CacheConfiguration}
* and cannot be changed after cache has started.
*/
public enum CacheMode {
/**
* Specifies fully replicated cache behavior. In this mode all the keys are distributed
* to all participating nodes. User still has affinity control
* over subset of nodes for any given key via {@link AffinityFunction}
* over subset of nodes for any given key via {@ignitelink org.apache.ignite.cache.affinity.AffinityFunction}
* configuration.
*/
REPLICATED((byte)1),
Expand All @@ -39,12 +37,13 @@ public enum CacheMode {
* Specifies partitioned cache behaviour. In this mode the overall
* key set will be divided into partitions and all partitions will be split
* equally between participating nodes. User has affinity
* control over key assignment via {@link AffinityFunction}
* control over key assignment via {@ignitelink org.apache.ignite.cache.affinity.AffinityFunction}
* configuration.
* <p>
* Note that partitioned cache is always fronted by local
* {@code 'near'} cache which stores most recent data. You
* can configure the size of near cache via {@link NearCacheConfiguration#getNearEvictionPolicyFactory()}
* can configure the size of near cache via
* {@ignitelink org.apache.ignite.configuration.NearCacheConfiguration#getNearEvictionPolicyFactory()}
* configuration property.
*/
PARTITIONED((byte)2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@

package org.apache.ignite.cache;

import org.apache.ignite.IgniteCache;
import org.jetbrains.annotations.Nullable;

/**
* Enumeration of all supported cache peek modes. Peek modes can be passed
* into {@link IgniteCache#localPeek(Object, CachePeekMode...)},
* {@link IgniteCache#localEntries(CachePeekMode...)},
* {@link IgniteCache#localSize(CachePeekMode...)} and
* {@link IgniteCache#size(CachePeekMode...)} methods.
* into {@ignitelink org.apache.ignite.IgniteCache#localPeek(Object, CachePeekMode...)},
* {@ignitelink org.apache.ignite.IgniteCache#localEntries(CachePeekMode...)},
* {@ignitelink org.apache.ignite.IgniteCache#localSize(CachePeekMode...)} and
* {@ignitelink org.apache.ignite.IgniteCache#size(CachePeekMode...)} methods.
* <p>
* The following modes are supported:
* <ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,16 @@

package org.apache.ignite.cache;

import org.apache.ignite.cache.affinity.AffinityFunction;
import org.jetbrains.annotations.Nullable;

/**
* Cache rebalance mode. When rebalancing is enabled (i.e. has value other than {@link #NONE}), distributed caches
* will attempt to rebalance all necessary values from other grid nodes. This enumeration is used to configure
* rebalancing via {@link org.apache.ignite.configuration.CacheConfiguration#getRebalanceMode()} configuration property. If not configured
* explicitly, then {@link org.apache.ignite.configuration.CacheConfiguration#DFLT_REBALANCE_MODE} is used.
* rebalancing via {@ignitelink org.apache.ignite.configuration.CacheConfiguration#getRebalanceMode()} configuration property.
* If not configured explicitly, then {@ignitelink org.apache.ignite.configuration.CacheConfiguration#DFLT_REBALANCE_MODE} is used.
* <p>
* Replicated caches will try to load the full set of cache entries from other nodes (or as defined by
* pluggable {@link AffinityFunction}), while partitioned caches will only load the entries for which
* pluggable {@ignitelink org.apache.ignite.cache.affinity.AffinityFunction}), while partitioned caches will only load the entries for which
* current node is primary or back up.
* <p>
* Note that rebalance mode only makes sense for {@link CacheMode#REPLICATED} and {@link CacheMode#PARTITIONED}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

package org.apache.ignite.cache;

import org.apache.ignite.transactions.Transaction;
import org.jetbrains.annotations.Nullable;

/**
Expand All @@ -28,7 +27,8 @@
* Note that regardless of write synchronization mode, cache data will always remain fully
* consistent across all participating nodes.
* <p>
* Write synchronization mode may be configured via {@link org.apache.ignite.configuration.CacheConfiguration#getWriteSynchronizationMode()}
* Write synchronization mode may be configured via
* {@ignitelink org.apache.ignite.configuration.CacheConfiguration#getWriteSynchronizationMode()}
* configuration property.
*/
public enum CacheWriteSynchronizationMode {
Expand All @@ -42,7 +42,7 @@ public enum CacheWriteSynchronizationMode {
/**
* Flag indicating that Ignite will not wait for write or commit responses from participating nodes,
* which means that remote nodes may get their state updated a bit after any of the cache write methods
* complete, or after {@link Transaction#commit()} method completes.
* complete, or after {@ignitelink org.apache.ignite.transactions.Transaction#commit()} method completes.
*/
FULL_ASYNC,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@

package org.apache.ignite.cache;

import java.util.Collection;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
import org.jetbrains.annotations.Nullable;

/**
Expand All @@ -29,14 +26,14 @@
* A partition is considered <em>lost</em> if all owning nodes had left a topology.
* <p>
* All <code>*_SAFE</code> policies prevent a user from interaction with partial data in lost partitions until
* {@link Ignite#resetLostPartitions(Collection)} method is called. <code>*_ALL</code> policies allow working with
* {@ignitelink org.apache.ignite.Ignite#resetLostPartitions(Collection)} method is called. <code>*_ALL</code> policies allow working with
* partial data in lost partitions.
* <p>
* <code>READ_ONLY_*</code> and <code>READ_WRITE_*</code> policies do not automatically change partition state
* and thus do not change rebalancing assignments for such partitions.
*
* @see Ignite#resetLostPartitions(Collection)
* @see IgniteCache#lostPartitions()
* @see {@ignitelink org.apache.ignite.Ignite#resetLostPartitions(Collection)}
* @see {@ignitelink org.apache.ignite.IgniteCache#lostPartitions()}
*/
public enum PartitionLossPolicy {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,11 @@
import org.apache.ignite.internal.processors.cache.query.QueryEntityClassProperty;
import org.apache.ignite.internal.processors.cache.query.QueryEntityTypeDescriptor;
import org.apache.ignite.internal.processors.query.GridQueryIndexDescriptor;
import org.apache.ignite.internal.processors.query.QueryUtils;
import org.apache.ignite.internal.util.CommonUtils;
import org.apache.ignite.internal.util.tostring.GridToStringInclude;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.internal.A;
import org.apache.ignite.internal.util.typedef.internal.S;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

Expand Down Expand Up @@ -493,7 +492,7 @@ private static QueryEntity convert(QueryEntityTypeDescriptor desc) {
entity.setValueType(desc.valueClass().getName());

for (QueryEntityClassProperty prop : desc.properties().values())
entity.addQueryField(prop.fullName(), U.box(prop.type()).getName(), prop.alias());
entity.addQueryField(prop.fullName(), CommonUtils.box(prop.type()).getName(), prop.alias());

entity.setKeyFields(desc.keyProperties());

Expand Down Expand Up @@ -539,10 +538,10 @@ private static QueryEntity convert(QueryEntityTypeDescriptor desc) {

txtIdx.setIndexType(QueryIndexType.FULLTEXT);

txtIdx.setFieldNames(Arrays.asList(QueryUtils.VAL_FIELD_NAME), true);
txtIdx.setFieldNames(Arrays.asList(CommonUtils.VAL_FIELD_NAME), true);
}
else
txtIdx.getFields().put(QueryUtils.VAL_FIELD_NAME, true);
txtIdx.getFields().put(CommonUtils.VAL_FIELD_NAME, true);
}

if (txtIdx != null)
Expand Down Expand Up @@ -590,14 +589,14 @@ private static QueryEntityTypeDescriptor processKeyAndValueClasses(
*/
private static void processAnnotationsInClass(boolean key, Class<?> cls, QueryEntityTypeDescriptor type,
@Nullable QueryEntityClassProperty parent) {
if (U.isJdk(cls) || U.isGeometryClass(cls)) {
if (parent == null && !key && QueryUtils.isSqlType(cls)) { // We have to index primitive _val.
String idxName = cls.getSimpleName() + "_" + QueryUtils.VAL_FIELD_NAME + "_idx";
if (CommonUtils.isJdk(cls) || CommonUtils.isGeometryClass(cls)) {
if (parent == null && !key && CommonUtils.isSqlType(cls)) { // We have to index primitive _val.
String idxName = cls.getSimpleName() + "_" + CommonUtils.VAL_FIELD_NAME + "_idx";

type.addIndex(idxName, U.isGeometryClass(cls) ?
type.addIndex(idxName, CommonUtils.isGeometryClass(cls) ?
QueryIndexType.GEOSPATIAL : QueryIndexType.SORTED, QueryIndex.DFLT_INLINE_SIZE);

type.addFieldToIndex(idxName, QueryUtils.VAL_FIELD_NAME, 0, false);
type.addFieldToIndex(idxName, CommonUtils.VAL_FIELD_NAME, 0, false);
}

return;
Expand Down Expand Up @@ -673,7 +672,7 @@ private static void processAnnotation(boolean key, QuerySqlField sqlAnn, QueryTe
if (cls != curCls)
idxName = cls.getSimpleName() + "_" + idxName;

desc.addIndex(idxName, U.isGeometryClass(prop.type()) ?
desc.addIndex(idxName, CommonUtils.isGeometryClass(prop.type()) ?
QueryIndexType.GEOSPATIAL : QueryIndexType.SORTED, sqlAnn.inlineSize());

desc.addFieldToIndex(idxName, prop.fullName(), 0, sqlAnn.descending());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.Objects;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.internal.util.tostring.GridToStringInclude;
import org.apache.ignite.internal.util.typedef.internal.S;

Expand Down Expand Up @@ -262,8 +261,8 @@ public QueryIndex setIndexType(QueryIndexType type) {
* <li>positive value - fixed index inline</li>
* </ul>
* When set to {@code -1}, Ignite will try to detect inline size automatically. It will be no more than
* {@link CacheConfiguration#getSqlIndexMaxInlineSize()}. Index inline will be enabled for all fixed-length types,
* but <b>will not be enabled</b> for {@code String}.
* {@ignitelink org.apache.ignite.configuration.CacheConfiguration#getSqlIndexMaxInlineSize()}.
* Index inline will be enabled for all fixed-length types, but <b>will not be enabled</b> for {@code String}.
*
* @return Index inline size in bytes.
*/
Expand All @@ -282,8 +281,8 @@ public int getInlineSize() {
* <li>positive value - fixed index inline</li>
* </ul>
* When set to {@code -1}, Ignite will try to detect inline size automatically. It will be no more than
* {@link CacheConfiguration#getSqlIndexMaxInlineSize()}. Index inline will be enabled for all fixed-length types,
* but <b>will not be enabled</b> for {@code String}.
* {@ignitelink org.apache.ignite.configuration.CacheConfiguration#getSqlIndexMaxInlineSize()}.
* Index inline will be enabled for all fixed-length types, but <b>will not be enabled</b> for {@code String}.
*
* @param inlineSize Inline size.
* @return {@code this} for chaining.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* otherwise known as {@code Collocation Of Computations And Data}.
* <p>
* <h1 class="header">Mapping Cache Keys</h1>
* The default implementation of {@link AffinityKeyMapper}, which will be used
* The default implementation of {@ignitelink org.apache.ignite.cache.affinity.AffinityKeyMapper}, which will be used
* if no explicit affinity mapper is specified in cache configuration, will first look
* for any field annotated with {@code @AffinityKeyMapped} annotation.
* If such field is not found, then the cache key itself will be used for
Expand Down Expand Up @@ -74,8 +74,8 @@
* </pre>
* <p>
* <h2 class="header">AffinityKey</h2>
* For convenience, you can also optionally use {@link AffinityKey} class. Here is how a
* {@code PersonKey} defined above would look using {@link AffinityKey}:
* For convenience, you can also optionally use {@ignitelink org.apache.ignite.cache.affinity.AffinityKey} class. Here is how a
* {@code PersonKey} defined above would look using {@ignitelink org.apache.ignite.cache.affinity.AffinityKey}:
* <pre name="code" class="java">
* Object personKey1 = new AffinityKey("myPersonId1", "myCompanyId");
* Object personKey2 = new AffinityKey("myPersonId2", "myCompanyId");
Expand All @@ -90,21 +90,21 @@
* It is also possible to route computations to the nodes where the data is cached. This concept
* is otherwise known as {@code Collocation Of Computations And Data}. In this case,
* {@code @AffinityKeyMapped} annotation allows to specify a routing affinity key for a
* {@link org.apache.ignite.compute.ComputeJob} or any other grid computation, such as {@link Runnable},
* {@ignitelink org.apache.ignite.compute.ComputeJob} or any other grid computation, such as {@link Runnable},
* {@link Callable}, or {@link org.apache.ignite.lang.IgniteClosure}. It should be attached to a field
* that provides affinity key for the computation. Only one annotation per class is allowed.
* Whenever such annotation is detected, then {@link org.apache.ignite.spi.loadbalancing.LoadBalancingSpi}
* Whenever such annotation is detected, then {@ignitelink org.apache.ignite.spi.loadbalancing.LoadBalancingSpi}
* will be bypassed, and computation will be routed to the grid node where the specified affinity key is cached.
* <p>
* For more information about cache affinity also see {@link AffinityKeyMapper} and
* {@link AffinityFunction} documentation.
* For more information about cache affinity also see {@ignitelink org.apache.ignite.cache.affinity.AffinityKeyMapper} and
* {@ignitelink org.apache.ignite.cache.affinity.AffinityFunction} documentation.
* Affinity for a key can be found from any node, regardless of whether it has cache started
* or not. If cache is not started, affinity function will be fetched from the remote node
* which does have the cache running.
*
* @see AffinityFunction
* @see AffinityKeyMapper
* @see AffinityKey
* @see {@ignitelink org.apache.ignite.cache.affinity.AffinityFunction}
* @see {@ignitelink org.apache.ignite.cache.affinity.AffinityKeyMapper}
* @see {@ignitelink org.apache.ignite.cache.affinity.AffinityKey}
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
Expand Down
Loading
Loading