Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sboikov committed Jan 23, 2015
1 parent f53c0eb commit a4065d1
Show file tree
Hide file tree
Showing 647 changed files with 1,481 additions and 1,512 deletions.
Expand Up @@ -19,15 +19,14 @@

import org.apache.ignite.*;
import org.apache.ignite.cache.*;
import org.apache.ignite.cache.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.spi.discovery.tcp.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;

import java.util.*;

import static org.apache.ignite.cache.GridCacheAtomicityMode.*;
import static org.apache.ignite.cache.GridCacheMode.*;
import static org.apache.ignite.cache.CacheAtomicityMode.*;
import static org.apache.ignite.cache.CacheMode.*;
import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*;

/**
Expand Down Expand Up @@ -85,7 +84,7 @@ public static IgniteConfiguration configuration() throws IgniteCheckedException
* @param atomicityMode Atomicity mode.
* @return Cache configuration.
*/
private static CacheConfiguration cacheConfiguration(String name, GridCacheAtomicityMode atomicityMode) {
private static CacheConfiguration cacheConfiguration(String name, CacheAtomicityMode atomicityMode) {
CacheConfiguration ccfg = new CacheConfiguration();

ccfg.setName(name);
Expand Down
Expand Up @@ -33,8 +33,8 @@
* as your master or reference data, while <i>facts</i> are usually large data sets of events or
* other objects that continuously come into the system and may change frequently. In GridGain
* such architecture is supported via cross-cache queries. By storing <i>dimensions</i> in
* {@link GridCacheMode#REPLICATED REPLICATED} caches and <i>facts</i> in much larger
* {@link GridCacheMode#PARTITIONED PARTITIONED} caches you can freely execute distributed joins across
* {@link org.apache.ignite.cache.CacheMode#REPLICATED REPLICATED} caches and <i>facts</i> in much larger
* {@link org.apache.ignite.cache.CacheMode#PARTITIONED PARTITIONED} caches you can freely execute distributed joins across
* your whole in-memory data grid, thus querying your in memory data without any limitations.
* <p>
* In this example we have two <i>dimensions</i>, {@link DimProduct} and {@link DimStore} and
Expand Down
Expand Up @@ -21,7 +21,7 @@

/**
* Represents a product available for purchase. In our {@code snowflake} schema a {@code product}
* is a {@code 'dimension'} and will be cached in {@link org.apache.ignite.cache.GridCacheMode#REPLICATED}
* is a {@code 'dimension'} and will be cached in {@link org.apache.ignite.cache.CacheMode#REPLICATED}
* cache.
*/
public class DimProduct {
Expand Down
Expand Up @@ -21,7 +21,7 @@

/**
* Represents a physical store location. In our {@code snowflake} schema a {@code store}
* is a {@code 'dimension'} and will be cached in {@link org.apache.ignite.cache.GridCacheMode#REPLICATED}
* is a {@code 'dimension'} and will be cached in {@link org.apache.ignite.cache.CacheMode#REPLICATED}
* cache.
*/
public class DimStore {
Expand Down
Expand Up @@ -21,7 +21,7 @@

/**
* Represents a purchase record. In our {@code snowflake} schema purchase
* is a {@code 'fact'} and will be cached in larger {@link org.apache.ignite.cache.GridCacheMode#PARTITIONED}
* is a {@code 'fact'} and will be cached in larger {@link org.apache.ignite.cache.CacheMode#PARTITIONED}
* cache.
*/
public class FactPurchase {
Expand Down
Expand Up @@ -29,7 +29,7 @@
import javax.cache.configuration.*;
import java.util.*;

import static org.apache.ignite.cache.GridCacheAtomicityMode.*;
import static org.apache.ignite.cache.CacheAtomicityMode.*;

/**
* Starts up an empty node with example cache configuration.
Expand Down
Expand Up @@ -28,7 +28,7 @@
import java.util.*;

import static org.apache.ignite.configuration.IgniteDeploymentMode.*;
import static org.apache.ignite.cache.GridCacheAtomicityMode.*;
import static org.apache.ignite.cache.CacheAtomicityMode.*;
import static org.apache.ignite.cache.GridCachePreloadMode.*;
import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*;

Expand Down
Expand Up @@ -17,12 +17,12 @@

package org.gridgain.scalar.examples

import org.apache.ignite.cache.{GridCacheMode, GridCacheFlag, GridCacheProjection}
import org.apache.ignite.cache.{CacheMode, GridCacheFlag, GridCacheProjection}
import org.apache.ignite.cache.affinity.GridCacheAffinityKey
import org.gridgain.scalar._
import scalar._
import org.apache.ignite._
import GridCacheMode._
import CacheMode._
import java.util._

/**
Expand Down
Expand Up @@ -34,8 +34,8 @@ import org.jdk8.backport.ThreadLocalRandom8
* as your master or reference data, while <i>facts</i> are usually large data sets of events or
* other objects that continuously come into the system and may change frequently. In GridGain
* such architecture is supported via cross-cache queries. By storing <i>dimensions</i> in
* `GridCacheMode#REPLICATED REPLICATED` caches and <i>facts</i> in much larger
* `GridCacheMode#PARTITIONED PARTITIONED` caches you can freely execute distributed joins across
* `CacheMode#REPLICATED REPLICATED` caches and <i>facts</i> in much larger
* `CacheMode#PARTITIONED PARTITIONED` caches you can freely execute distributed joins across
* your whole in-memory data grid, thus querying your in memory data without any limitations.
* <p>
* In this example we have two <i>dimensions</i>, `DimProduct` and `DimStore` and
Expand Down Expand Up @@ -192,7 +192,7 @@ object ScalarSnowflakeSchemaExample {

/**
* Represents a physical store location. In our `snowflake` schema a `store`
* is a `dimension` and will be cached in `GridCacheMode#REPLICATED` cache.
* is a `dimension` and will be cached in `CacheMode#REPLICATED` cache.
*
* @param id Primary key.
* @param name Store name.
Expand Down Expand Up @@ -225,7 +225,7 @@ class DimStore(

/**
* Represents a product available for purchase. In our `snowflake` schema a `product`
* is a `dimension` and will be cached in `GridCacheMode#REPLICATED` cache.
* is a `dimension` and will be cached in `CacheMode#REPLICATED` cache.
*
* @param id Product ID.
* @param name Product name.
Expand Down Expand Up @@ -258,7 +258,7 @@ class DimProduct(

/**
* Represents a purchase record. In our `snowflake` schema purchase
* is a `fact` and will be cached in larger `GridCacheMode#PARTITIONED` cache.
* is a `fact` and will be cached in larger `CacheMode#PARTITIONED` cache.
*
* @param id Purchase ID.
* @param productId Purchased product ID.
Expand Down
Expand Up @@ -43,9 +43,9 @@
import java.util.concurrent.*;
import java.util.concurrent.atomic.*;

import static org.apache.ignite.cache.GridCacheAtomicityMode.*;
import static org.apache.ignite.cache.CacheAtomicityMode.*;
import static org.apache.ignite.cache.GridCacheDistributionMode.*;
import static org.apache.ignite.cache.GridCacheMode.*;
import static org.apache.ignite.cache.CacheMode.*;
import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*;
import static org.apache.ignite.testframework.GridTestUtils.*;

Expand Down
Expand Up @@ -27,7 +27,7 @@
import java.util.*;

import static org.apache.ignite.IgniteSystemProperties.*;
import static org.apache.ignite.cache.GridCacheMode.*;
import static org.apache.ignite.cache.CacheMode.*;
import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*;

/**
Expand Down
Expand Up @@ -48,9 +48,9 @@
import java.util.concurrent.atomic.*;

import static java.util.concurrent.TimeUnit.*;
import static org.apache.ignite.cache.GridCacheAtomicityMode.*;
import static org.apache.ignite.cache.CacheAtomicityMode.*;
import static org.apache.ignite.cache.GridCacheDistributionMode.*;
import static org.apache.ignite.cache.GridCacheMode.*;
import static org.apache.ignite.cache.CacheMode.*;
import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*;

/**
Expand Down
Expand Up @@ -45,7 +45,7 @@
import java.util.concurrent.atomic.*;

import static org.apache.ignite.IgniteSystemProperties.*;
import static org.apache.ignite.cache.GridCacheMode.*;
import static org.apache.ignite.cache.CacheMode.*;
import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*;
import static org.apache.ignite.testframework.GridTestUtils.*;

Expand Down
Expand Up @@ -37,7 +37,7 @@
import java.util.*;
import java.util.concurrent.*;

import static org.apache.ignite.cache.GridCacheMode.*;
import static org.apache.ignite.cache.CacheMode.*;
import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*;

/**
Expand Down
Expand Up @@ -29,7 +29,7 @@

import java.util.*;

import static org.apache.ignite.cache.GridCacheMode.*;
import static org.apache.ignite.cache.CacheMode.*;
import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*;

/**
Expand Down
Expand Up @@ -37,7 +37,7 @@
import java.util.*;

import static org.apache.ignite.client.GridClientProtocol.*;
import static org.apache.ignite.cache.GridCacheMode.*;
import static org.apache.ignite.cache.CacheMode.*;
import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*;

/**
Expand Down
Expand Up @@ -30,9 +30,9 @@
import java.io.*;
import java.sql.*;

import static org.apache.ignite.cache.GridCacheAtomicityMode.*;
import static org.apache.ignite.cache.CacheAtomicityMode.*;
import static org.apache.ignite.cache.GridCacheDistributionMode.*;
import static org.apache.ignite.cache.GridCacheMode.*;
import static org.apache.ignite.cache.CacheMode.*;
import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*;

/**
Expand Down
Expand Up @@ -26,7 +26,7 @@

import java.sql.*;

import static org.apache.ignite.cache.GridCacheMode.*;
import static org.apache.ignite.cache.CacheMode.*;
import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*;

/**
Expand Down
Expand Up @@ -28,7 +28,7 @@
import java.sql.*;
import java.util.*;

import static org.apache.ignite.cache.GridCacheMode.*;
import static org.apache.ignite.cache.CacheMode.*;
import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*;
import static org.apache.ignite.jdbc.IgniteJdbcDriver.*;

Expand Down
Expand Up @@ -32,7 +32,7 @@
import java.util.*;

import static java.sql.Types.*;
import static org.apache.ignite.cache.GridCacheMode.*;
import static org.apache.ignite.cache.CacheMode.*;
import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*;

/**
Expand Down
Expand Up @@ -32,7 +32,7 @@
import java.util.Date;

import static java.sql.Types.*;
import static org.apache.ignite.cache.GridCacheMode.*;
import static org.apache.ignite.cache.CacheMode.*;
import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*;

/**
Expand Down
Expand Up @@ -35,7 +35,7 @@
import java.util.*;
import java.util.concurrent.*;

import static org.apache.ignite.cache.GridCacheMode.*;
import static org.apache.ignite.cache.CacheMode.*;
import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*;

/**
Expand Down
Expand Up @@ -29,7 +29,7 @@
import java.io.*;
import java.sql.*;

import static org.apache.ignite.cache.GridCacheMode.*;
import static org.apache.ignite.cache.CacheMode.*;
import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*;

/**
Expand Down
Expand Up @@ -129,7 +129,7 @@ public interface IgniteCache<K, V> extends javax.cache.Cache<K, V>, IgniteAsyncS
/**
* Stores given key-value pair in cache only if cache had no previous mapping for it. If cache
* previously contained value for the given key, then this value is returned.
* In case of {@link org.apache.ignite.cache.GridCacheMode#PARTITIONED} or {@link org.apache.ignite.cache.GridCacheMode#REPLICATED} caches,
* In case of {@link org.apache.ignite.cache.CacheMode#PARTITIONED} or {@link org.apache.ignite.cache.CacheMode#REPLICATED} caches,
* the value will be loaded from the primary node, which in its turn may load the value
* from the swap storage, and consecutively, if it's not in swap,
* from the underlying persistent storage. If value has to be loaded from persistent
Expand Down
Expand Up @@ -32,7 +32,7 @@ public interface IgniteTransactions {
*
* @return New transaction
* @throws IllegalStateException If transaction is already started by this thread.
* @throws UnsupportedOperationException If cache is {@link org.apache.ignite.cache.GridCacheAtomicityMode#ATOMIC}.
* @throws UnsupportedOperationException If cache is {@link org.apache.ignite.cache.CacheAtomicityMode#ATOMIC}.
*/
public IgniteTx txStart() throws IllegalStateException;

Expand All @@ -43,7 +43,7 @@ public interface IgniteTransactions {
* @param isolation Isolation.
* @return New transaction.
* @throws IllegalStateException If transaction is already started by this thread.
* @throws UnsupportedOperationException If cache is {@link org.apache.ignite.cache.GridCacheAtomicityMode#ATOMIC}.
* @throws UnsupportedOperationException If cache is {@link org.apache.ignite.cache.CacheAtomicityMode#ATOMIC}.
*/
public IgniteTx txStart(IgniteTxConcurrency concurrency, IgniteTxIsolation isolation);

Expand All @@ -57,7 +57,7 @@ public interface IgniteTransactions {
* @param txSize Number of entries participating in transaction (may be approximate).
* @return New transaction.
* @throws IllegalStateException If transaction is already started by this thread.
* @throws UnsupportedOperationException If cache is {@link org.apache.ignite.cache.GridCacheAtomicityMode#ATOMIC}.
* @throws UnsupportedOperationException If cache is {@link org.apache.ignite.cache.CacheAtomicityMode#ATOMIC}.
*/
public IgniteTx txStart(IgniteTxConcurrency concurrency, IgniteTxIsolation isolation, long timeout,
int txSize);
Expand Down Expand Up @@ -93,7 +93,7 @@ public IgniteTx txStart(IgniteTxConcurrency concurrency, IgniteTxIsolation isola
* @return Started transaction.
* @throws IllegalStateException If transaction is already started by this thread.
* @throws IgniteCheckedException If local node is not primary for any of provided keys.
* @throws UnsupportedOperationException If cache is {@link org.apache.ignite.cache.GridCacheAtomicityMode#ATOMIC}.
* @throws UnsupportedOperationException If cache is {@link org.apache.ignite.cache.CacheAtomicityMode#ATOMIC}.
*/
public IgniteTx txStartAffinity(String cacheName, Object affinityKey, IgniteTxConcurrency concurrency,
IgniteTxIsolation isolation, long timeout, int txSize) throws IllegalStateException, IgniteCheckedException;
Expand Down Expand Up @@ -129,7 +129,7 @@ public IgniteTx txStartAffinity(String cacheName, Object affinityKey, IgniteTxCo
* @return Started transaction.
* @throws IllegalStateException If transaction is already started by this thread.
* @throws IgniteCheckedException If local node is not primary for any of provided keys.
* @throws UnsupportedOperationException If cache is {@link org.apache.ignite.cache.GridCacheAtomicityMode#ATOMIC}.
* @throws UnsupportedOperationException If cache is {@link org.apache.ignite.cache.CacheAtomicityMode#ATOMIC}.
*/
public IgniteTx txStartPartition(String cacheName, int partId, IgniteTxConcurrency concurrency,
IgniteTxIsolation isolation, long timeout, int txSize) throws IllegalStateException, IgniteCheckedException;
Expand Down
Expand Up @@ -22,7 +22,7 @@
/**
* Exception thrown when atomic operation timeout occurs.
*/
public class GridCacheAtomicUpdateTimeoutException extends IgniteCheckedException {
public class CacheAtomicUpdateTimeoutException extends IgniteCheckedException {
/** */
private static final long serialVersionUID = 0L;

Expand All @@ -31,7 +31,7 @@ public class GridCacheAtomicUpdateTimeoutException extends IgniteCheckedExceptio
*
* @param msg Error message.
*/
public GridCacheAtomicUpdateTimeoutException(String msg) {
public CacheAtomicUpdateTimeoutException(String msg) {
super(msg);
}

Expand All @@ -41,7 +41,7 @@ public GridCacheAtomicUpdateTimeoutException(String msg) {
* @param msg Error message.
* @param cause Optional nested exception (can be <tt>null</tt>).
*/
public GridCacheAtomicUpdateTimeoutException(String msg, Throwable cause) {
public CacheAtomicUpdateTimeoutException(String msg, Throwable cause) {
super(msg, cause);
}
}
Expand Up @@ -20,7 +20,7 @@
import org.jetbrains.annotations.*;

/**
* Cache write ordering mode. This enumeration is taken into account only in {@link GridCacheAtomicityMode#ATOMIC}
* Cache write ordering mode. This enumeration is taken into account only in {@link CacheAtomicityMode#ATOMIC}
* atomicity mode. Write ordering mode determines which node assigns the write version, sender or the primary node.
* <p>
* For example, {@link #CLOCK} mode assigns write versions on a sender node which generally leads to better
Expand All @@ -32,7 +32,7 @@
* {@link #CLOCK} mode will be automatically configured only with {@link GridCacheWriteSynchronizationMode#FULL_SYNC}
* write synchronization mode, as for other synchronization modes it does not render better performance.
*/
public enum GridCacheAtomicWriteOrderMode {
public enum CacheAtomicWriteOrderMode {
/**
* In this mode, write versions are assigned on a sender node which generally leads to better
* performance in {@link GridCacheWriteSynchronizationMode#FULL_SYNC} synchronization mode, since in this case
Expand All @@ -50,15 +50,15 @@ public enum GridCacheAtomicWriteOrderMode {
PRIMARY;

/** Enumerated values. */
private static final GridCacheAtomicWriteOrderMode[] VALS = values();
private static final CacheAtomicWriteOrderMode[] VALS = values();

/**
* Efficiently gets enumerated value from its ordinal.
*
* @param ord Ordinal value.
* @return Enumerated value or {@code null} if ordinal out of range.
*/
@Nullable public static GridCacheAtomicWriteOrderMode fromOrdinal(byte ord) {
@Nullable public static CacheAtomicWriteOrderMode fromOrdinal(byte ord) {
return ord >= 0 && ord < VALS.length ? VALS[ord] : null;
}
}

0 comments on commit a4065d1

Please sign in to comment.