http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheEntry.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheEntry.java b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheEntry.java index 9e9c4d9..725f377 100644 --- a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheEntry.java +++ b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheEntry.java @@ -9,6 +9,7 @@ package org.gridgain.grid.cache; +import org.apache.ignite.*; import org.apache.ignite.lang.*; import org.gridgain.grid.*; import org.jetbrains.annotations.*; @@ -99,18 +100,18 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware * * @param modes See {@link GridCacheProjection#peek(Object, Collection)}. * @return See {@link GridCacheProjection#peek(Object, Collection)}. - * @throws GridException See {@link GridCacheProjection#peek(Object, Collection)}. + * @throws IgniteCheckedException See {@link GridCacheProjection#peek(Object, Collection)}. */ - @Nullable public V peek(@Nullable Collection<GridCachePeekMode> modes) throws GridException; + @Nullable public V peek(@Nullable Collection<GridCachePeekMode> modes) throws IgniteCheckedException; /** * This method has the same semantic as * {@link GridCacheProjection#reload(Object)} method. * * @return See {@link GridCacheProjection#reload(Object)}. - * @throws GridException See {@link GridCacheProjection#reload(Object)}. + * @throws IgniteCheckedException See {@link GridCacheProjection#reload(Object)}. */ - @Nullable public V reload() throws GridException; + @Nullable public V reload() throws IgniteCheckedException; /** * This method has the same semantic as @@ -196,7 +197,7 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware /** * This method has the same semantic as {@link #get()} method, however it - * wraps {@link GridException} into {@link GridRuntimeException} if failed in order to + * wraps {@link IgniteCheckedException} into {@link IgniteException} if failed in order to * comply with {@link Entry} interface. * * @return See {@link #get()} @@ -208,9 +209,9 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware * {@link GridCacheProjection#get(Object)} method. * * @return See {@link GridCacheProjection#get(Object)}. - * @throws GridException See {@link GridCacheProjection#get(Object)}. + * @throws IgniteCheckedException See {@link GridCacheProjection#get(Object)}. */ - @Nullable public V get() throws GridException; + @Nullable public V get() throws IgniteCheckedException; /** * This method has the same semantic as @@ -222,7 +223,7 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware /** * This method has the same semantic as {@link #set(Object, org.apache.ignite.lang.IgnitePredicate[])} method, however it - * wraps {@link GridException} into {@link GridRuntimeException} if failed in order to + * wraps {@link IgniteCheckedException} into {@link IgniteException} if failed in order to * comply with {@link Entry} interface. * * @return See {@link #set(Object, org.apache.ignite.lang.IgnitePredicate[])} @@ -236,9 +237,9 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware * @param val See {@link GridCacheProjection#put(Object, Object, org.apache.ignite.lang.IgnitePredicate[])} * @param filter See {@link GridCacheProjection#put(Object, Object, org.apache.ignite.lang.IgnitePredicate[])}. * @return See {@link GridCacheProjection#put(Object, Object, org.apache.ignite.lang.IgnitePredicate[])}. - * @throws GridException See {@link GridCacheProjection#put(Object, Object, org.apache.ignite.lang.IgnitePredicate[])}. + * @throws IgniteCheckedException See {@link GridCacheProjection#put(Object, Object, org.apache.ignite.lang.IgnitePredicate[])}. */ - @Nullable public V set(V val, @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) throws GridException; + @Nullable public V set(V val, @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) throws IgniteCheckedException; /** * This method has the same semantic as @@ -256,9 +257,9 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware * * @param val See {@link GridCacheProjection#putIfAbsent(Object, Object)} * @return See {@link GridCacheProjection#putIfAbsent(Object, Object)}. - * @throws GridException See {@link GridCacheProjection#putIfAbsent(Object, Object)}. + * @throws IgniteCheckedException See {@link GridCacheProjection#putIfAbsent(Object, Object)}. */ - @Nullable public V setIfAbsent(V val) throws GridException; + @Nullable public V setIfAbsent(V val) throws IgniteCheckedException; /** * This method has the same semantic as @@ -276,10 +277,10 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware * @param val See {@link GridCacheProjection#putx(Object, Object, org.apache.ignite.lang.IgnitePredicate[])} * @param filter See {@link GridCacheProjection#putx(Object, Object, org.apache.ignite.lang.IgnitePredicate[])}. * @return See {@link GridCacheProjection#putx(Object, Object, org.apache.ignite.lang.IgnitePredicate[])}. - * @throws GridException See {@link GridCacheProjection#putx(Object, Object, org.apache.ignite.lang.IgnitePredicate[])}. + * @throws IgniteCheckedException See {@link GridCacheProjection#putx(Object, Object, org.apache.ignite.lang.IgnitePredicate[])}. */ public boolean setx(V val, @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) - throws GridException; + throws IgniteCheckedException; /** * This method has the same semantic as @@ -298,9 +299,9 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware * * @param val See {@link GridCacheProjection#putxIfAbsent(Object, Object)} * @return See {@link GridCacheProjection#putxIfAbsent(Object, Object)}. - * @throws GridException See {@link GridCacheProjection#putxIfAbsent(Object, Object)}. + * @throws IgniteCheckedException See {@link GridCacheProjection#putxIfAbsent(Object, Object)}. */ - public boolean setxIfAbsent(@Nullable V val) throws GridException; + public boolean setxIfAbsent(@Nullable V val) throws IgniteCheckedException; /** * This method has the same semantic as @@ -317,10 +318,10 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware * * @param transformer Closure to be applied to the previous value in cache. If this closure returns * {@code null}, the associated value will be removed from cache. - * @throws GridException If cache update failed. + * @throws IgniteCheckedException If cache update failed. * @see GridCacheProjection#transform(Object, org.apache.ignite.lang.IgniteClosure) */ - public void transform(IgniteClosure<V, V> transformer) throws GridException; + public void transform(IgniteClosure<V, V> transformer) throws IgniteCheckedException; /** * This method has the same semantic as @@ -338,9 +339,9 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware * * @param val See {@link GridCacheProjection#replace(Object, Object)} * @return See {@link GridCacheProjection#replace(Object, Object)}. - * @throws GridException See {@link GridCacheProjection#replace(Object, Object)}. + * @throws IgniteCheckedException See {@link GridCacheProjection#replace(Object, Object)}. */ - @Nullable public V replace(V val) throws GridException; + @Nullable public V replace(V val) throws IgniteCheckedException; /** * This method has the same semantic as @@ -357,9 +358,9 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware * * @param val See {@link GridCacheProjection#replacex(Object, Object)} * @return See {@link GridCacheProjection#replacex(Object, Object)}. - * @throws GridException See {@link GridCacheProjection#replacex(Object, Object)}. + * @throws IgniteCheckedException See {@link GridCacheProjection#replacex(Object, Object)}. */ - public boolean replacex(V val) throws GridException; + public boolean replacex(V val) throws IgniteCheckedException; /** * This method has the same semantic as @@ -377,9 +378,9 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware * @param oldVal See {@link GridCacheProjection#replace(Object, Object, Object)} * @param newVal See {@link GridCacheProjection#replace(Object, Object, Object)} * @return See {@link GridCacheProjection#replace(Object, Object)}. - * @throws GridException See {@link GridCacheProjection#replace(Object, Object)}. + * @throws IgniteCheckedException See {@link GridCacheProjection#replace(Object, Object)}. */ - public boolean replace(V oldVal, V newVal) throws GridException; + public boolean replace(V oldVal, V newVal) throws IgniteCheckedException; /** * This method has the same semantic as @@ -397,9 +398,9 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware * * @param filter See {@link GridCacheProjection#remove(Object, org.apache.ignite.lang.IgnitePredicate[])}. * @return See {@link GridCacheProjection#remove(Object, org.apache.ignite.lang.IgnitePredicate[])}. - * @throws GridException See {@link GridCacheProjection#remove(Object, org.apache.ignite.lang.IgnitePredicate[])}. + * @throws IgniteCheckedException See {@link GridCacheProjection#remove(Object, org.apache.ignite.lang.IgnitePredicate[])}. */ - @Nullable public V remove(@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) throws GridException; + @Nullable public V remove(@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) throws IgniteCheckedException; /** * This method has the same semantic as @@ -416,9 +417,9 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware * * @param filter See {@link GridCacheProjection#removex(Object, org.apache.ignite.lang.IgnitePredicate[])}. * @return See {@link GridCacheProjection#removex(Object, org.apache.ignite.lang.IgnitePredicate[])}. - * @throws GridException See {@link GridCacheProjection#removex(Object, org.apache.ignite.lang.IgnitePredicate[])}. + * @throws IgniteCheckedException See {@link GridCacheProjection#removex(Object, org.apache.ignite.lang.IgnitePredicate[])}. */ - public boolean removex(@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) throws GridException; + public boolean removex(@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) throws IgniteCheckedException; /** * This method has the same semantic as @@ -435,9 +436,9 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware * * @param val See {@link GridCacheProjection#remove(Object, Object)}. * @return See {@link GridCacheProjection#remove(Object, Object)}. - * @throws GridException See {@link GridCacheProjection#remove(Object, Object)}. + * @throws IgniteCheckedException See {@link GridCacheProjection#remove(Object, Object)}. */ - public boolean remove(V val) throws GridException; + public boolean remove(V val) throws IgniteCheckedException; /** * This method has the same semantic as @@ -468,10 +469,10 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware * Optimizes the size of this entry. If entry is expired at the time * of the call then entry is removed locally. * - * @throws GridException If failed to compact. + * @throws IgniteCheckedException If failed to compact. * @return {@code true} if entry was cleared from cache (if value was {@code null}). */ - public boolean compact() throws GridException; + public boolean compact() throws IgniteCheckedException; /** * Synchronously acquires lock on a cached object associated with this entry @@ -491,11 +492,11 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware * @param filter Optional filter to validate prior to acquiring the lock. * @return {@code True} if all filters passed and lock was acquired, * {@code false} otherwise. - * @throws GridException If lock acquisition resulted in error. + * @throws IgniteCheckedException If lock acquisition resulted in error. * @throws GridCacheFlagException If flags validation failed. */ public boolean lock(long timeout, @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) - throws GridException; + throws IgniteCheckedException; /** * Asynchronously acquires lock on a cached object associated with this entry @@ -535,10 +536,10 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware * {@link GridCacheFlag#LOCAL}, {@link GridCacheFlag#READ}. * * @param filter Optional filter that needs to pass prior to unlock taking effect. - * @throws GridException If unlock execution resulted in error. + * @throws IgniteCheckedException If unlock execution resulted in error. * @throws GridCacheFlagException If flags validation failed. */ - public void unlock(IgnitePredicate<GridCacheEntry<K, V>>... filter) throws GridException; + public void unlock(IgnitePredicate<GridCacheEntry<K, V>>... filter) throws IgniteCheckedException; /** * Checks whether entry is currently present in cache or not. If entry is not in @@ -553,7 +554,7 @@ public interface GridCacheEntry<K, V> extends Map.Entry<K, V>, GridMetadataAware * Gets size of serialized key and value in addition to any overhead added by {@code GridGain} itself. * * @return size in bytes. - * @throws GridException If failed to evaluate entry size. + * @throws IgniteCheckedException If failed to evaluate entry size. */ - public int memorySize() throws GridException; + public int memorySize() throws IgniteCheckedException; }
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheFlagException.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheFlagException.java b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheFlagException.java index 1ad5d27..6d2fbe1 100644 --- a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheFlagException.java +++ b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheFlagException.java @@ -9,7 +9,7 @@ package org.gridgain.grid.cache; -import org.gridgain.grid.*; +import org.apache.ignite.*; import org.gridgain.grid.util.typedef.*; import org.jetbrains.annotations.*; @@ -18,7 +18,7 @@ import java.util.*; /** * Exception thrown when projection flags check fails. */ -public class GridCacheFlagException extends GridRuntimeException { +public class GridCacheFlagException extends IgniteException { /** */ private static final long serialVersionUID = 0L; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/cache/GridCachePartialUpdateException.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/GridCachePartialUpdateException.java b/modules/core/src/main/java/org/gridgain/grid/cache/GridCachePartialUpdateException.java index 5818a2b..dd41e55 100644 --- a/modules/core/src/main/java/org/gridgain/grid/cache/GridCachePartialUpdateException.java +++ b/modules/core/src/main/java/org/gridgain/grid/cache/GridCachePartialUpdateException.java @@ -9,7 +9,7 @@ package org.gridgain.grid.cache; -import org.gridgain.grid.*; +import org.apache.ignite.*; import java.util.*; @@ -17,7 +17,7 @@ import java.util.*; * Exception thrown from non-transactional cache in case when update succeeded only partially. * One can get list of keys for which update failed with method {@link #failedKeys()}. */ -public class GridCachePartialUpdateException extends GridException { +public class GridCachePartialUpdateException extends IgniteCheckedException { /** */ private static final long serialVersionUID = 0L; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheProjection.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheProjection.java b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheProjection.java index b3cdf0a..92d7c99 100644 --- a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheProjection.java +++ b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheProjection.java @@ -9,9 +9,9 @@ package org.gridgain.grid.cache; +import org.apache.ignite.*; import org.apache.ignite.cluster.*; import org.apache.ignite.lang.*; -import org.gridgain.grid.*; import org.gridgain.grid.cache.affinity.*; import org.gridgain.grid.cache.query.*; import org.gridgain.grid.cache.store.*; @@ -377,9 +377,9 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * * @param key Key to reload. * @return Reloaded value or current value if entry was updated while reloading. - * @throws GridException If reloading failed. + * @throws IgniteCheckedException If reloading failed. */ - @Nullable public V reload(K key) throws GridException; + @Nullable public V reload(K key) throws IgniteCheckedException; /** * Asynchronously reloads a single key from persistent storage. This method @@ -400,9 +400,9 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * This method does not participate in transactions, however it does not violate * cache integrity and can be used safely with or without transactions. * - * @throws GridException If reloading failed. + * @throws IgniteCheckedException If reloading failed. */ - public void reloadAll() throws GridException; + public void reloadAll() throws IgniteCheckedException; /** * Asynchronously reloads all specified entries from underlying @@ -422,9 +422,9 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * cache integrity and can be used safely with or without transactions. * * @param keys Keys to reload. - * @throws GridException if reloading failed. + * @throws IgniteCheckedException if reloading failed. */ - public void reloadAll(@Nullable Collection<? extends K> keys) throws GridException; + public void reloadAll(@Nullable Collection<? extends K> keys) throws IgniteCheckedException; /** * Asynchronously reloads all specified entries from underlying @@ -469,10 +469,10 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * @param key Entry key. * @param modes Optional set of peek modes. * @return Peeked value. - * @throws GridException If peek operation failed. + * @throws IgniteCheckedException If peek operation failed. * @throws NullPointerException If key is {@code null}. */ - @Nullable public V peek(K key, @Nullable Collection<GridCachePeekMode> modes) throws GridException; + @Nullable public V peek(K key, @Nullable Collection<GridCachePeekMode> modes) throws IgniteCheckedException; /** * Retrieves value mapped to the specified key from cache. Value will only be returned if @@ -493,11 +493,11 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * * @param key Key to retrieve the value for. * @return Value for the given key. - * @throws GridException If get operation failed. + * @throws IgniteCheckedException If get operation failed. * @throws GridCacheFlagException If failed projection flags validation. * @throws NullPointerException if the key is {@code null}. */ - @Nullable public V get(K key) throws GridException; + @Nullable public V get(K key) throws IgniteCheckedException; /** * Asynchronously retrieves value mapped to the specified key from cache. Value will only be returned if @@ -542,10 +542,10 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * * @param keys Keys to get. * @return Map of key-value pairs. - * @throws GridException If get operation failed. + * @throws IgniteCheckedException If get operation failed. * @throws GridCacheFlagException If failed projection flags validation. */ - public Map<K, V> getAll(@Nullable Collection<? extends K> keys) throws GridException; + public Map<K, V> getAll(@Nullable Collection<? extends K> keys) throws IgniteCheckedException; /** * Asynchronously retrieves values mapped to the specified keys from cache. Value will only be returned if @@ -601,11 +601,11 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * if entry did not pass the filter, or if there was no mapping for the key in swap * or in persistent storage. * @throws NullPointerException If either key or value are {@code null}. - * @throws GridException If put operation failed. + * @throws IgniteCheckedException If put operation failed. * @throws GridCacheFlagException If projection flags validation failed. */ @Nullable public V put(K key, V val, @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) - throws GridException; + throws IgniteCheckedException; /** * Asynchronously stores given key-value pair in cache. If filters are provided, then entries will @@ -669,11 +669,11 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * {@code false} otherwise. Note that this method will return {@code true} if filter is not * specified. * @throws NullPointerException If either key or value are {@code null}. - * @throws GridException If put operation failed. + * @throws IgniteCheckedException If put operation failed. * @throws GridCacheFlagException If projection flags validation failed. */ public boolean putx(K key, V val, @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) - throws GridException; + throws IgniteCheckedException; /** * Stores given key-value pair in cache. If filters are provided, then entries will @@ -731,9 +731,9 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * @param transformer Closure to be applied to the previous value in cache. If this closure returns * {@code null}, the associated value will be removed from cache. * @throws NullPointerException If either key or transform closure is {@code null}. - * @throws GridException On any error occurred while storing value in cache. + * @throws IgniteCheckedException On any error occurred while storing value in cache. */ - public void transform(K key, IgniteClosure<V, V> transformer) throws GridException; + public void transform(K key, IgniteClosure<V, V> transformer) throws IgniteCheckedException; /** * Applies {@code transformer} closure to the previous value associated with given key in cache, @@ -749,9 +749,9 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * @param key Key to store in cache. * @param transformer Closure to be applied to the previous value in cache. * @return Value computed by the closure. - * @throws GridException On any error occurred while storing value in cache. + * @throws IgniteCheckedException On any error occurred while storing value in cache. */ - public <R> R transformAndCompute(K key, IgniteClosure<V, IgniteBiTuple<V, R>> transformer) throws GridException; + public <R> R transformAndCompute(K key, IgniteClosure<V, IgniteBiTuple<V, R>> transformer) throws IgniteCheckedException; /** * Stores result of applying {@code transformer} closure to the previous value associated with @@ -808,10 +808,10 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * @param val Value to be associated with the given key. * @return Previously contained value regardless of whether put happened or not. * @throws NullPointerException If either key or value are {@code null}. - * @throws GridException If put operation failed. + * @throws IgniteCheckedException If put operation failed. * @throws GridCacheFlagException If projection flags validation failed. */ - @Nullable public V putIfAbsent(K key, V val) throws GridException; + @Nullable public V putIfAbsent(K key, V val) throws IgniteCheckedException; /** * Asynchronously stores given key-value pair in cache only if cache had no previous mapping for it. If cache @@ -865,10 +865,10 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * @param val Value to be associated with the given key. * @return {@code true} if value is stored in cache and {@code false} otherwise. * @throws NullPointerException If either key or value are {@code null}. - * @throws GridException If put operation failed. + * @throws IgniteCheckedException If put operation failed. * @throws GridCacheFlagException If projection flags validation failed. */ - public boolean putxIfAbsent(K key, V val) throws GridException; + public boolean putxIfAbsent(K key, V val) throws IgniteCheckedException; /** * Asynchronously stores given key-value pair in cache only if cache had no previous mapping for it. @@ -920,10 +920,10 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * @param val Value to be associated with the given key. * @return Previously contained value regardless of whether replace happened or not. * @throws NullPointerException If either key or value are {@code null}. - * @throws GridException If replace operation failed. + * @throws IgniteCheckedException If replace operation failed. * @throws GridCacheFlagException If projection flags validation failed. */ - @Nullable public V replace(K key, V val) throws GridException; + @Nullable public V replace(K key, V val) throws IgniteCheckedException; /** * Asynchronously stores given key-value pair in cache only if there is a previous mapping for it. If cache @@ -975,10 +975,10 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * @param val Value to be associated with the given key. * @return {@code True} if replace happened, {@code false} otherwise. * @throws NullPointerException If either key or value are {@code null}. - * @throws GridException If replace operation failed. + * @throws IgniteCheckedException If replace operation failed. * @throws GridCacheFlagException If projection flags validation failed. */ - public boolean replacex(K key, V val) throws GridException; + public boolean replacex(K key, V val) throws IgniteCheckedException; /** * Asynchronously stores given key-value pair in cache only if only if there is a previous mapping for it. @@ -1025,10 +1025,10 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * @param newVal Value to be associated with the given key. * @return {@code True} if replace happened, {@code false} otherwise. * @throws NullPointerException If either key or value are {@code null}. - * @throws GridException If replace operation failed. + * @throws IgniteCheckedException If replace operation failed. * @throws GridCacheFlagException If projection flags validation failed. */ - public boolean replace(K key, V oldVal, V newVal) throws GridException; + public boolean replace(K key, V oldVal, V newVal) throws IgniteCheckedException; /** * Asynchronously stores given key-value pair in cache only if only if the previous value is equal to the @@ -1071,11 +1071,11 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * @param m Key-value pairs to store in cache. * @param filter Optional entry filter. If provided, then entry will * be stored only if the filter returned {@code true}. - * @throws GridException If put operation failed. + * @throws IgniteCheckedException If put operation failed. * @throws GridCacheFlagException If projection flags validation failed. */ public void putAll(@Nullable Map<? extends K, ? extends V> m, - @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) throws GridException; + @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) throws IgniteCheckedException; /** * Stores result of applying transform closures from the given map to previous values associated @@ -1099,9 +1099,9 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * {@link GridCacheFlag#LOCAL}, {@link GridCacheFlag#READ}. * * @param m Map containing keys and closures to be applied to values. - * @throws GridException On any error occurred while storing value in cache. + * @throws IgniteCheckedException On any error occurred while storing value in cache. */ - public void transformAll(@Nullable Map<? extends K, ? extends IgniteClosure<V, V>> m) throws GridException; + public void transformAll(@Nullable Map<? extends K, ? extends IgniteClosure<V, V>> m) throws IgniteCheckedException; /** * Stores result of applying the specified transform closure to previous values associated @@ -1127,9 +1127,9 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * @param keys Keys for entries, to which the transformation closure will be applied. * If the collection is {@code null} or empty, this method is no-op. * @param transformer Transformation closure to be applied to each value. - * @throws GridException On any error occurred while storing value in cache. + * @throws IgniteCheckedException On any error occurred while storing value in cache. */ - public void transformAll(@Nullable Set<? extends K> keys, IgniteClosure<V, V> transformer) throws GridException; + public void transformAll(@Nullable Set<? extends K> keys, IgniteClosure<V, V> transformer) throws IgniteCheckedException; /** * Asynchronously stores given key-value pairs in cache. If filters are provided, then entries will @@ -1205,10 +1205,10 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * If the collection is {@code null} or empty, this method is no-op. * @param transformer Transformation closure to be applied to each value. * @return Future for operation. - * @throws GridException On any error occurred while storing value in cache. + * @throws IgniteCheckedException On any error occurred while storing value in cache. */ public IgniteFuture<?> transformAllAsync(@Nullable Set<? extends K> keys, IgniteClosure<V, V> transformer) - throws GridException; + throws IgniteCheckedException; /** * Set of keys cached on this node. You can remove elements from this set, but you cannot add elements @@ -1380,11 +1380,11 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * @param isolation Cache transaction isolation level. * @return Started transaction. * @throws IllegalStateException If transaction is already started by this thread. - * @throws GridException If local node is not primary for any of provided keys. + * @throws IgniteCheckedException If local node is not primary for any of provided keys. * @throws UnsupportedOperationException If cache is {@link GridCacheAtomicityMode#ATOMIC}. */ public GridCacheTx txStartAffinity(Object affinityKey, GridCacheTxConcurrency concurrency, - GridCacheTxIsolation isolation, long timeout, int txSize) throws IllegalStateException, GridException; + GridCacheTxIsolation isolation, long timeout, int txSize) throws IllegalStateException, IgniteCheckedException; /** * Starts {@code partition-group-locked} transaction based on partition ID. In this mode the whole partition @@ -1416,11 +1416,11 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * @param isolation Cache transaction isolation level. * @return Started transaction. * @throws IllegalStateException If transaction is already started by this thread. - * @throws GridException If local node is not primary for any of provided keys. + * @throws IgniteCheckedException If local node is not primary for any of provided keys. * @throws UnsupportedOperationException If cache is {@link GridCacheAtomicityMode#ATOMIC}. */ public GridCacheTx txStartPartition(int partId, GridCacheTxConcurrency concurrency, - GridCacheTxIsolation isolation, long timeout, int txSize) throws IllegalStateException, GridException; + GridCacheTxIsolation isolation, long timeout, int txSize) throws IllegalStateException, IgniteCheckedException; /** * Gets transaction started by this thread or {@code null} if this thread does @@ -1540,11 +1540,11 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * <p> * This method is identical to calling {@link #globalClearAll(long) globalClearAll(0)}. * - * @throws GridException In case of cache could not be cleared on any of the nodes. + * @throws IgniteCheckedException In case of cache could not be cleared on any of the nodes. * @deprecated Deprecated in favor of {@link #globalClearAll(long)} method. */ @Deprecated - public void globalClearAll() throws GridException; + public void globalClearAll() throws IgniteCheckedException; /** * Clears cache on all nodes that store it's data. That is, caches are cleared on remote @@ -1556,24 +1556,24 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * * @param timeout Timeout for clear all task in milliseconds (0 for never). * Set it to larger value for large caches. - * @throws GridException In case of cache could not be cleared on any of the nodes. + * @throws IgniteCheckedException In case of cache could not be cleared on any of the nodes. */ - public void globalClearAll(long timeout) throws GridException; + public void globalClearAll(long timeout) throws IgniteCheckedException; /** * Clears serialized value bytes from entry (if any) leaving only object representation. * * @param key Key to compact. - * @throws GridException If failed to compact. + * @throws IgniteCheckedException If failed to compact. * @return {@code true} if entry was deleted from cache (i.e. was expired). */ - public boolean compact(K key) throws GridException; + public boolean compact(K key) throws IgniteCheckedException; /** * Clears serialized value bytes from cache entries (if any) leaving only object representation. - * @throws GridException If failed to compact. + * @throws IgniteCheckedException If failed to compact. */ - public void compactAll() throws GridException; + public void compactAll() throws IgniteCheckedException; /** * Removes given key mapping from cache. If cache previously contained value for the given key, @@ -1602,11 +1602,11 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * @return Previous value associated with specified key, or {@code null} * if there was no value for this key. * @throws NullPointerException If key is {@code null}. - * @throws GridException If remove operation failed. + * @throws IgniteCheckedException If remove operation failed. * @throws GridCacheFlagException If projection flags validation failed. */ @Nullable public V remove(K key, @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) - throws GridException; + throws IgniteCheckedException; /** * Asynchronously removes given key mapping from cache. If cache previously contained value for the given key, @@ -1659,11 +1659,11 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * @return {@code True} if filter passed validation and entry was removed, {@code false} otherwise. * Note that if filter is not specified, this method will return {@code true}. * @throws NullPointerException if the key is {@code null}. - * @throws GridException If remove failed. + * @throws IgniteCheckedException If remove failed. * @throws GridCacheFlagException If projection flags validation failed. */ public boolean removex(K key, @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) - throws GridException; + throws IgniteCheckedException; /** * Asynchronously removes given key mapping from cache. @@ -1709,10 +1709,10 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * @return {@code True} if entry was removed and passed in value matched the cached one, * {@code false} otherwise. * @throws NullPointerException if the key or value is {@code null}. - * @throws GridException If remove failed. + * @throws IgniteCheckedException If remove failed. * @throws GridCacheFlagException If projection flags validation failed. */ - public boolean remove(K key, V val) throws GridException; + public boolean remove(K key, V val) throws IgniteCheckedException; /** * Asynchronously removes given key mapping from cache if one exists and value is equal to the passed in value. @@ -1754,11 +1754,11 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * @param keys Keys whose mappings are to be removed from cache. * @param filter Optional filter to check prior to removing value form cache. Note * that filter is checked atomically together with remove operation. - * @throws GridException If remove failed. + * @throws IgniteCheckedException If remove failed. * @throws GridCacheFlagException If flags validation failed. */ public void removeAll(@Nullable Collection<? extends K> keys, - @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) throws GridException; + @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) throws IgniteCheckedException; /** * Asynchronously removes given key mappings from cache for entries for which the optionally @@ -1804,11 +1804,11 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * * @param filter Filter used to supply keys for remove operation (if {@code null}, * then nothing will be removed). - * @throws GridException If remove failed. + * @throws IgniteCheckedException If remove failed. * @throws GridCacheFlagException If flags validation failed. */ public void removeAll(@Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) - throws GridException; + throws IgniteCheckedException; /** * Asynchronously removes mappings from cache for entries for which the optionally passed in filters do @@ -1855,11 +1855,11 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * @param filter Optional filter to validate prior to acquiring the lock. * @return {@code True} if all filters passed and lock was acquired, * {@code false} otherwise. - * @throws GridException If lock acquisition resulted in error. + * @throws IgniteCheckedException If lock acquisition resulted in error. * @throws GridCacheFlagException If flags validation failed. */ public boolean lock(K key, long timeout, @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) - throws GridException; + throws IgniteCheckedException; /** * Asynchronously acquires lock on a cached object with given @@ -1907,11 +1907,11 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * to be acquired. * @return {@code True} if all filters passed and locks were acquired before * timeout has expired, {@code false} otherwise. - * @throws GridException If lock acquisition resulted in error. + * @throws IgniteCheckedException If lock acquisition resulted in error. * @throws GridCacheFlagException If flags validation failed. */ public boolean lockAll(@Nullable Collection<? extends K> keys, long timeout, - @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) throws GridException; + @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) throws IgniteCheckedException; /** * All or nothing synchronous lock for passed in keys. This method @@ -1954,10 +1954,10 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * * @param key Key to unlock. * @param filter Optional filter that needs to pass prior to unlock taking effect. - * @throws GridException If unlock execution resulted in error. + * @throws IgniteCheckedException If unlock execution resulted in error. * @throws GridCacheFlagException If flags validation failed. */ - public void unlock(K key, IgnitePredicate<GridCacheEntry<K, V>>... filter) throws GridException; + public void unlock(K key, IgnitePredicate<GridCacheEntry<K, V>>... filter) throws IgniteCheckedException; /** * Unlocks given keys only if current thread owns the locks. Only the keys @@ -1976,11 +1976,11 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * @param keys Keys to unlock. * @param filter Optional filter which needs to pass for individual entries * to be unlocked. - * @throws GridException If unlock execution resulted in error. + * @throws IgniteCheckedException If unlock execution resulted in error. * @throws GridCacheFlagException If flags validation failed. */ public void unlockAll(@Nullable Collection<? extends K> keys, - @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) throws GridException; + @Nullable IgnitePredicate<GridCacheEntry<K, V>>... filter) throws IgniteCheckedException; /** * Checks if any node owns a lock for this key. @@ -2022,7 +2022,7 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * * @return Total cache size across all nodes. */ - public int globalSize() throws GridException; + public int globalSize() throws IgniteCheckedException; /** * Gets size of near cache key set. This method will return count of all entries in near @@ -2055,7 +2055,7 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * * @return Total primary cache size across all nodes. */ - public int globalPrimarySize() throws GridException; + public int globalPrimarySize() throws IgniteCheckedException; /** * This method promotes cache entry by given key, if any, from offheap or swap storage @@ -2068,10 +2068,10 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * * @param key Key to promote entry for. * @return Unswapped entry value or {@code null} for non-existing key. - * @throws GridException If promote failed. + * @throws IgniteCheckedException If promote failed. * @throws GridCacheFlagException If flags validation failed. */ - @Nullable public V promote(K key) throws GridException; + @Nullable public V promote(K key) throws IgniteCheckedException; /** * This method unswaps cache entries by given keys, if any, from swap storage @@ -2083,8 +2083,8 @@ public interface GridCacheProjection<K, V> extends Iterable<GridCacheEntry<K, V> * {@link GridCacheFlag#SKIP_SWAP}, {@link GridCacheFlag#READ}. * * @param keys Keys to promote entries for. - * @throws GridException If promote failed. + * @throws IgniteCheckedException If promote failed. * @throws GridCacheFlagException If flags validation failed. */ - public void promoteAll(@Nullable Collection<? extends K> keys) throws GridException; + public void promoteAll(@Nullable Collection<? extends K> keys) throws IgniteCheckedException; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTx.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTx.java b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTx.java index 8d3c33d..6e8c5bd 100644 --- a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTx.java +++ b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTx.java @@ -9,6 +9,7 @@ package org.gridgain.grid.cache; +import org.apache.ignite.*; import org.apache.ignite.lang.*; import org.gridgain.grid.*; @@ -215,16 +216,16 @@ public interface GridCacheTx extends GridMetadataAware, AutoCloseable { /** * Commits this transaction by initiating {@code two-phase-commit} process. * - * @throws GridException If commit failed. + * @throws IgniteCheckedException If commit failed. */ - public void commit() throws GridException; + public void commit() throws IgniteCheckedException; /** * Ends the transaction. Transaction will be rolled back if it has not been committed. * - * @throws GridException If transaction could not be gracefully ended. + * @throws IgniteCheckedException If transaction could not be gracefully ended. */ - @Override public void close() throws GridException; + @Override public void close() throws IgniteCheckedException; /** * Asynchronously commits this transaction by initiating {@code two-phase-commit} process. @@ -236,7 +237,7 @@ public interface GridCacheTx extends GridMetadataAware, AutoCloseable { /** * Rolls back this transaction. * - * @throws GridException If rollback failed. + * @throws IgniteCheckedException If rollback failed. */ - public void rollback() throws GridException; + public void rollback() throws IgniteCheckedException; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTxHeuristicException.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTxHeuristicException.java b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTxHeuristicException.java index a950bd4..4633659 100644 --- a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTxHeuristicException.java +++ b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTxHeuristicException.java @@ -9,7 +9,7 @@ package org.gridgain.grid.cache; -import org.gridgain.grid.*; +import org.apache.ignite.*; /** * Exception thrown whenever grid transaction enters an unknown state. @@ -18,7 +18,7 @@ import org.gridgain.grid.*; * integrity, by invalidating all values participating in this transaction * on remote nodes. */ -public class GridCacheTxHeuristicException extends GridException { +public class GridCacheTxHeuristicException extends IgniteCheckedException { /** */ private static final long serialVersionUID = 0L; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTxOptimisticException.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTxOptimisticException.java b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTxOptimisticException.java index 2d1cbe0..992f9c7 100644 --- a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTxOptimisticException.java +++ b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTxOptimisticException.java @@ -9,12 +9,12 @@ package org.gridgain.grid.cache; -import org.gridgain.grid.*; +import org.apache.ignite.*; /** * Exception thrown whenever grid transactions fail optimistically. */ -public class GridCacheTxOptimisticException extends GridException { +public class GridCacheTxOptimisticException extends IgniteCheckedException { /** */ private static final long serialVersionUID = 0L; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTxRollbackException.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTxRollbackException.java b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTxRollbackException.java index 9ad3e78..0516575 100644 --- a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTxRollbackException.java +++ b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTxRollbackException.java @@ -9,12 +9,12 @@ package org.gridgain.grid.cache; -import org.gridgain.grid.*; +import org.apache.ignite.*; /** * Exception thrown whenever grid transactions has been automatically rolled back. */ -public class GridCacheTxRollbackException extends GridException { +public class GridCacheTxRollbackException extends IgniteCheckedException { /** */ private static final long serialVersionUID = 0L; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTxTimeoutException.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTxTimeoutException.java b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTxTimeoutException.java index 23c61d3..3f4c44a 100644 --- a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTxTimeoutException.java +++ b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTxTimeoutException.java @@ -9,12 +9,12 @@ package org.gridgain.grid.cache; -import org.gridgain.grid.*; +import org.apache.ignite.*; /** * Exception thrown whenever grid transactions time out. */ -public class GridCacheTxTimeoutException extends GridException { +public class GridCacheTxTimeoutException extends IgniteCheckedException { /** */ private static final long serialVersionUID = 0L; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/cache/affinity/rendezvous/GridCacheRendezvousAffinityFunction.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/affinity/rendezvous/GridCacheRendezvousAffinityFunction.java b/modules/core/src/main/java/org/gridgain/grid/cache/affinity/rendezvous/GridCacheRendezvousAffinityFunction.java index a4ea024..ee3cdb6 100644 --- a/modules/core/src/main/java/org/gridgain/grid/cache/affinity/rendezvous/GridCacheRendezvousAffinityFunction.java +++ b/modules/core/src/main/java/org/gridgain/grid/cache/affinity/rendezvous/GridCacheRendezvousAffinityFunction.java @@ -9,6 +9,7 @@ package org.gridgain.grid.cache.affinity.rendezvous; +import org.apache.ignite.*; import org.apache.ignite.cluster.*; import org.apache.ignite.lang.*; import org.apache.ignite.marshaller.*; @@ -66,7 +67,7 @@ public class GridCacheRendezvousAffinityFunction implements GridCacheAffinityFun catch (NoSuchAlgorithmException e) { assert false : "Should have failed in constructor"; - throw new GridRuntimeException("Failed to obtain message digest (digest was available in constructor)", + throw new IgniteException("Failed to obtain message digest (digest was available in constructor)", e); } } @@ -157,7 +158,7 @@ public class GridCacheRendezvousAffinityFunction implements GridCacheAffinityFun MessageDigest.getInstance("MD5"); } catch (NoSuchAlgorithmException e) { - throw new GridRuntimeException("Failed to obtain MD5 message digest instance.", e); + throw new IgniteException("Failed to obtain MD5 message digest instance.", e); } } @@ -305,8 +306,8 @@ public class GridCacheRendezvousAffinityFunction implements GridCacheAffinityFun lst.add(F.t(hash, node)); } - catch (GridException e) { - throw new GridRuntimeException(e); + catch (IgniteCheckedException e) { + throw new IgniteException(e); } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/cache/cloner/GridCacheBasicCloner.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/cloner/GridCacheBasicCloner.java b/modules/core/src/main/java/org/gridgain/grid/cache/cloner/GridCacheBasicCloner.java index a45c634..7903f20 100644 --- a/modules/core/src/main/java/org/gridgain/grid/cache/cloner/GridCacheBasicCloner.java +++ b/modules/core/src/main/java/org/gridgain/grid/cache/cloner/GridCacheBasicCloner.java @@ -9,7 +9,7 @@ package org.gridgain.grid.cache.cloner; -import org.gridgain.grid.*; +import org.apache.ignite.*; import org.gridgain.grid.util.typedef.*; /** @@ -20,7 +20,7 @@ import org.gridgain.grid.util.typedef.*; */ public class GridCacheBasicCloner implements GridCacheCloner { /** {@inheritDoc} */ - @Override public <T> T cloneValue(T val) throws GridException { + @Override public <T> T cloneValue(T val) throws IgniteCheckedException { return X.cloneObject(val, false, true); } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/cache/cloner/GridCacheCloner.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/cloner/GridCacheCloner.java b/modules/core/src/main/java/org/gridgain/grid/cache/cloner/GridCacheCloner.java index 8854a91..1042d21 100644 --- a/modules/core/src/main/java/org/gridgain/grid/cache/cloner/GridCacheCloner.java +++ b/modules/core/src/main/java/org/gridgain/grid/cache/cloner/GridCacheCloner.java @@ -9,7 +9,7 @@ package org.gridgain.grid.cache.cloner; -import org.gridgain.grid.*; +import org.apache.ignite.*; import org.gridgain.grid.cache.*; import org.jetbrains.annotations.*; @@ -43,8 +43,8 @@ import org.jetbrains.annotations.*; public interface GridCacheCloner { /** * @param val Object to make a clone for. - * @throws GridException If failed to clone given object. + * @throws IgniteCheckedException If failed to clone given object. * @return Clone for given object. */ - @Nullable public <T> T cloneValue(T val) throws GridException; + @Nullable public <T> T cloneValue(T val) throws IgniteCheckedException; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/cache/cloner/GridCacheDeepCloner.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/cloner/GridCacheDeepCloner.java b/modules/core/src/main/java/org/gridgain/grid/cache/cloner/GridCacheDeepCloner.java index 48bb0a3..710b29e 100644 --- a/modules/core/src/main/java/org/gridgain/grid/cache/cloner/GridCacheDeepCloner.java +++ b/modules/core/src/main/java/org/gridgain/grid/cache/cloner/GridCacheDeepCloner.java @@ -9,7 +9,7 @@ package org.gridgain.grid.cache.cloner; -import org.gridgain.grid.*; +import org.apache.ignite.*; import org.gridgain.grid.util.typedef.*; /** @@ -25,7 +25,7 @@ import org.gridgain.grid.util.typedef.*; * constructor. If it does, then it will be instantiated using such constructor. * Otherwise an empty constructor will be fetched from JDK and used instead. * Note that this behavior may not work on some JDKs in which case - * {@link #cloneValue(Object)} method will result in {@link GridException} + * {@link #cloneValue(Object)} method will result in {@link IgniteCheckedException} * being thrown. */ public class GridCacheDeepCloner implements GridCacheCloner { @@ -73,7 +73,7 @@ public class GridCacheDeepCloner implements GridCacheCloner { } /** {@inheritDoc} */ - @Override public <T> T cloneValue(T val) throws GridException { + @Override public <T> T cloneValue(T val) throws IgniteCheckedException { return X.cloneObject(val, true, honorCloneable); } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheAtomicLong.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheAtomicLong.java b/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheAtomicLong.java index 7c3d0b6..cd44bb0 100644 --- a/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheAtomicLong.java +++ b/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheAtomicLong.java @@ -9,7 +9,7 @@ package org.gridgain.grid.cache.datastructures; -import org.gridgain.grid.*; +import org.apache.ignite.*; /** * This interface provides a rich API for working with distributedly cached atomic long value. @@ -66,68 +66,68 @@ public interface GridCacheAtomicLong { * Gets current value of atomic long. * * @return Current value of atomic long. - * @throws GridException If operation failed. + * @throws IgniteCheckedException If operation failed. */ - public long get() throws GridException; + public long get() throws IgniteCheckedException; /** * Increments and gets current value of atomic long. * * @return Value. - * @throws GridException If operation failed. + * @throws IgniteCheckedException If operation failed. */ - public long incrementAndGet() throws GridException; + public long incrementAndGet() throws IgniteCheckedException; /** * Gets and increments current value of atomic long. * * @return Value. - * @throws GridException If operation failed. + * @throws IgniteCheckedException If operation failed. */ - public long getAndIncrement() throws GridException; + public long getAndIncrement() throws IgniteCheckedException; /** * Adds {@code l} and gets current value of atomic long. * * @param l Number which will be added. * @return Value. - * @throws GridException If operation failed. + * @throws IgniteCheckedException If operation failed. */ - public long addAndGet(long l) throws GridException; + public long addAndGet(long l) throws IgniteCheckedException; /** * Gets current value of atomic long and adds {@code l}. * * @param l Number which will be added. * @return Value. - * @throws GridException If operation failed. + * @throws IgniteCheckedException If operation failed. */ - public long getAndAdd(long l) throws GridException; + public long getAndAdd(long l) throws IgniteCheckedException; /** * Decrements and gets current value of atomic long. * * @return Value. - * @throws GridException If operation failed. + * @throws IgniteCheckedException If operation failed. */ - public long decrementAndGet() throws GridException; + public long decrementAndGet() throws IgniteCheckedException; /** * Gets and decrements current value of atomic long. * * @return Value. - * @throws GridException If operation failed. + * @throws IgniteCheckedException If operation failed. */ - public long getAndDecrement() throws GridException; + public long getAndDecrement() throws IgniteCheckedException; /** * Gets current value of atomic long and sets new value {@code l} of atomic long. * * @param l New value of atomic long. * @return Value. - * @throws GridException If operation failed. + * @throws IgniteCheckedException If operation failed. */ - public long getAndSet(long l) throws GridException; + public long getAndSet(long l) throws IgniteCheckedException; /** * Atomically compares current value to the expected value, and if they are equal, sets current value @@ -136,9 +136,9 @@ public interface GridCacheAtomicLong { * @param expVal Expected atomic long's value. * @param newVal New atomic long's value to set if current value equal to expected value. * @return {@code True} if comparison succeeded, {@code false} otherwise. - * @throws GridException If failed. + * @throws IgniteCheckedException If failed. */ - public boolean compareAndSet(long expVal, long newVal) throws GridException; + public boolean compareAndSet(long expVal, long newVal) throws IgniteCheckedException; /** * Gets status of atomic. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheAtomicReference.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheAtomicReference.java b/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheAtomicReference.java index de33480..eff866c 100644 --- a/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheAtomicReference.java +++ b/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheAtomicReference.java @@ -9,7 +9,7 @@ package org.gridgain.grid.cache.datastructures; -import org.gridgain.grid.*; +import org.apache.ignite.*; /** * This interface provides a rich API for working with distributed atomic reference. @@ -53,17 +53,17 @@ public interface GridCacheAtomicReference<T> { * Gets current value of an atomic reference. * * @return current value of an atomic reference. - * @throws GridException If operation failed. + * @throws IgniteCheckedException If operation failed. */ - public T get() throws GridException; + public T get() throws IgniteCheckedException; /** * Unconditionally sets the value. * * @param val Value. - * @throws GridException If operation failed. + * @throws IgniteCheckedException If operation failed. */ - public void set(T val) throws GridException; + public void set(T val) throws IgniteCheckedException; /** * Conditionally sets the new value. That will be set if {@code expVal} is equal @@ -72,9 +72,9 @@ public interface GridCacheAtomicReference<T> { * @param expVal Expected value. * @param newVal New value. * @return Result of operation execution. If {@code true} than value have been updated. - * @throws GridException If operation failed. + * @throws IgniteCheckedException If operation failed. */ - public boolean compareAndSet(T expVal, T newVal) throws GridException; + public boolean compareAndSet(T expVal, T newVal) throws IgniteCheckedException; /** * Gets status of atomic. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheAtomicSequence.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheAtomicSequence.java b/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheAtomicSequence.java index e98bce1..0579efa 100644 --- a/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheAtomicSequence.java +++ b/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheAtomicSequence.java @@ -9,7 +9,7 @@ package org.gridgain.grid.cache.datastructures; -import org.gridgain.grid.*; +import org.apache.ignite.*; /** * This interface provides a rich API for working with distributed atomic sequence. @@ -61,43 +61,43 @@ public interface GridCacheAtomicSequence { * Gets current value of atomic sequence. * * @return Value of atomic sequence. - * @throws GridException If operation failed. + * @throws IgniteCheckedException If operation failed. */ - public long get() throws GridException; + public long get() throws IgniteCheckedException; /** * Increments and returns the value of atomic sequence. * * @return Value of atomic sequence after increment. - * @throws GridException If operation failed. + * @throws IgniteCheckedException If operation failed. */ - public long incrementAndGet() throws GridException; + public long incrementAndGet() throws IgniteCheckedException; /** * Gets and increments current value of atomic sequence. * * @return Value of atomic sequence before increment. - * @throws GridException If operation failed. + * @throws IgniteCheckedException If operation failed. */ - public long getAndIncrement() throws GridException; + public long getAndIncrement() throws IgniteCheckedException; /** * Adds {@code l} elements to atomic sequence and gets value of atomic sequence. * * @param l Number of added elements. * @return Value of atomic sequence. - * @throws GridException If operation failed. + * @throws IgniteCheckedException If operation failed. */ - public long addAndGet(long l) throws GridException; + public long addAndGet(long l) throws IgniteCheckedException; /** * Gets current value of atomic sequence and adds {@code l} elements. * * @param l Number of added elements. * @return Value of atomic sequence. - * @throws GridException If operation failed. + * @throws IgniteCheckedException If operation failed. */ - public long getAndAdd(long l) throws GridException; + public long getAndAdd(long l) throws IgniteCheckedException; /** * Gets local batch size for this atomic sequence. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheAtomicStamped.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheAtomicStamped.java b/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheAtomicStamped.java index 0064a43..224164c 100644 --- a/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheAtomicStamped.java +++ b/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheAtomicStamped.java @@ -9,8 +9,8 @@ package org.gridgain.grid.cache.datastructures; +import org.apache.ignite.*; import org.apache.ignite.lang.*; -import org.gridgain.grid.*; /** * This interface provides a rich API for working with distributed atomic stamped value. @@ -62,18 +62,18 @@ public interface GridCacheAtomicStamped<T, S> { * Gets both current value and current stamp of atomic stamped. * * @return both current value and current stamp of atomic stamped. - * @throws GridException If operation failed. + * @throws IgniteCheckedException If operation failed. */ - public IgniteBiTuple<T, S> get() throws GridException; + public IgniteBiTuple<T, S> get() throws IgniteCheckedException; /** * Unconditionally sets the value and the stamp. * * @param val Value. * @param stamp Stamp. - * @throws GridException If operation failed. + * @throws IgniteCheckedException If operation failed. */ - public void set(T val, S stamp) throws GridException; + public void set(T val, S stamp) throws IgniteCheckedException; /** * Conditionally sets the new value and new stamp. They will be set if {@code expVal} @@ -84,25 +84,25 @@ public interface GridCacheAtomicStamped<T, S> { * @param expStamp Expected stamp. * @param newStamp New stamp. * @return Result of operation execution. If {@code true} than value and stamp will be updated. - * @throws GridException If operation failed. + * @throws IgniteCheckedException If operation failed. */ - public boolean compareAndSet(T expVal, T newVal, S expStamp, S newStamp) throws GridException; + public boolean compareAndSet(T expVal, T newVal, S expStamp, S newStamp) throws IgniteCheckedException; /** * Gets current stamp. * * @return Current stamp. - * @throws GridException If operation failed. + * @throws IgniteCheckedException If operation failed. */ - public S stamp() throws GridException; + public S stamp() throws IgniteCheckedException; /** * Gets current value. * * @return Current value. - * @throws GridException If operation failed. + * @throws IgniteCheckedException If operation failed. */ - public T value() throws GridException; + public T value() throws IgniteCheckedException; /** * Gets status of atomic. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheCountDownLatch.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheCountDownLatch.java b/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheCountDownLatch.java index a7f57fe..80e1efa 100644 --- a/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheCountDownLatch.java +++ b/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheCountDownLatch.java @@ -9,6 +9,7 @@ package org.gridgain.grid.cache.datastructures; +import org.apache.ignite.*; import org.gridgain.grid.*; import java.util.concurrent.*; @@ -79,11 +80,11 @@ public interface GridCacheCountDownLatch { * then {@link GridInterruptedException} is thrown and the current thread's * interrupted status is cleared. * - * @throws GridException If operation failed. + * @throws IgniteCheckedException If operation failed. * @throws GridInterruptedException if the current thread is interrupted * while waiting */ - public void await() throws GridException; + public void await() throws IgniteCheckedException; /** * Causes the current thread to wait until the latch has counted down to @@ -122,9 +123,9 @@ public interface GridCacheCountDownLatch { * if the waiting time elapsed before the count reached zero. * @throws GridInterruptedException If the current thread is interrupted * while waiting. - * @throws GridException If operation failed. + * @throws IgniteCheckedException If operation failed. */ - public boolean await(long timeout) throws GridException; + public boolean await(long timeout) throws IgniteCheckedException; /** * Causes the current thread to wait until the latch has counted down to @@ -165,9 +166,9 @@ public interface GridCacheCountDownLatch { * if the waiting time elapsed before the count reached zero. * @throws GridInterruptedException If the current thread is interrupted * while waiting. - * @throws GridException If operation failed. + * @throws IgniteCheckedException If operation failed. */ - public boolean await(long timeout, TimeUnit unit) throws GridException; + public boolean await(long timeout, TimeUnit unit) throws IgniteCheckedException; /** * Decrements the count of the latch, releasing all waiting threads @@ -180,9 +181,9 @@ public interface GridCacheCountDownLatch { * If the current count equals zero then nothing happens. * * @return Count after decrement. - * @throws GridException If operation failed. + * @throws IgniteCheckedException If operation failed. */ - public int countDown() throws GridException; + public int countDown() throws IgniteCheckedException; /** * Decreases the count of the latch using passed in value, @@ -196,18 +197,18 @@ public interface GridCacheCountDownLatch { * * @param val Value to decrease counter on. * @return Count after decreasing. - * @throws GridException If operation failed. + * @throws IgniteCheckedException If operation failed. */ - public int countDown(int val) throws GridException; + public int countDown(int val) throws IgniteCheckedException; /** * Counts down this latch to zero, releasing all waiting threads on all nodes. * <p> * If the current count equals zero then nothing happens. * - * @throws GridException If operation failed. + * @throws IgniteCheckedException If operation failed. */ - public void countDownAll() throws GridException; + public void countDownAll() throws IgniteCheckedException; /** * Gets {@code removed} status of the latch. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheDataStructureInvalidException.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheDataStructureInvalidException.java b/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheDataStructureInvalidException.java index 025495e..8167fc9 100644 --- a/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheDataStructureInvalidException.java +++ b/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheDataStructureInvalidException.java @@ -9,7 +9,7 @@ package org.gridgain.grid.cache.datastructures; -import org.gridgain.grid.*; +import org.apache.ignite.*; import org.jetbrains.annotations.*; /** @@ -23,7 +23,7 @@ import org.jetbrains.annotations.*; * Note that data structures throw runtime exceptions out of methods that don't have * checked exceptions in the signature. */ -public class GridCacheDataStructureInvalidException extends GridException { +public class GridCacheDataStructureInvalidException extends IgniteCheckedException { /** */ private static final long serialVersionUID = 0L; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheDataStructureInvalidRuntimeException.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheDataStructureInvalidRuntimeException.java b/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheDataStructureInvalidRuntimeException.java index 0fb6311..823fc83 100644 --- a/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheDataStructureInvalidRuntimeException.java +++ b/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheDataStructureInvalidRuntimeException.java @@ -9,7 +9,7 @@ package org.gridgain.grid.cache.datastructures; -import org.gridgain.grid.*; +import org.apache.ignite.*; import org.jetbrains.annotations.*; /** @@ -23,7 +23,7 @@ import org.jetbrains.annotations.*; * Note that data structures throw runtime exceptions out of methods that don't have * checked exceptions in the signature. */ -public class GridCacheDataStructureInvalidRuntimeException extends GridRuntimeException { +public class GridCacheDataStructureInvalidRuntimeException extends IgniteException { /** */ private static final long serialVersionUID = 0L; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheDataStructureRemovedException.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheDataStructureRemovedException.java b/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheDataStructureRemovedException.java index a34a37f..c580e1c 100644 --- a/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheDataStructureRemovedException.java +++ b/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheDataStructureRemovedException.java @@ -9,7 +9,7 @@ package org.gridgain.grid.cache.datastructures; -import org.gridgain.grid.*; +import org.apache.ignite.*; import org.jetbrains.annotations.*; /** @@ -18,7 +18,7 @@ import org.jetbrains.annotations.*; * Note that data structures throw runtime exceptions out of methods that don't have * checked exceptions in the signature. */ -public class GridCacheDataStructureRemovedException extends GridException { +public class GridCacheDataStructureRemovedException extends IgniteCheckedException { /** */ private static final long serialVersionUID = 0L; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheDataStructureRemovedRuntimeException.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheDataStructureRemovedRuntimeException.java b/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheDataStructureRemovedRuntimeException.java index 907ccfa..8eead78 100644 --- a/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheDataStructureRemovedRuntimeException.java +++ b/modules/core/src/main/java/org/gridgain/grid/cache/datastructures/GridCacheDataStructureRemovedRuntimeException.java @@ -9,7 +9,7 @@ package org.gridgain.grid.cache.datastructures; -import org.gridgain.grid.*; +import org.apache.ignite.*; import org.jetbrains.annotations.*; /** @@ -18,7 +18,7 @@ import org.jetbrains.annotations.*; * Note that data structures throw runtime exceptions out of methods that don't have * checked exceptions in the signature. */ -public class GridCacheDataStructureRemovedRuntimeException extends GridRuntimeException { +public class GridCacheDataStructureRemovedRuntimeException extends IgniteException { /** */ private static final long serialVersionUID = 0L;