Search in sources :

Example 1 with IgniteTxLocalEx

use of org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalEx in project ignite by apache.

the class GridNearCacheAdapter method loadAsync.

/**
 * @param tx Transaction.
 * @param keys Keys to load.
 * @param forcePrimary Force primary flag.
 * @param subjId Subject ID.
 * @param taskName Task name.
 * @param deserializeBinary Deserialize binary flag.
 * @param expiryPlc Expiry policy.
 * @param skipVal Skip value flag.
 * @param skipStore Skip store flag.
 * @param needVer Need version.
 * @return Loaded values.
 */
public IgniteInternalFuture<Map<K, V>> loadAsync(@Nullable IgniteInternalTx tx, @Nullable Collection<KeyCacheObject> keys, boolean forcePrimary, @Nullable UUID subjId, String taskName, boolean deserializeBinary, boolean recovery, @Nullable ExpiryPolicy expiryPlc, boolean skipVal, boolean skipStore, boolean needVer) {
    if (F.isEmpty(keys))
        return new GridFinishedFuture<>(Collections.<K, V>emptyMap());
    IgniteTxLocalEx txx = (tx != null && tx.local()) ? (IgniteTxLocalEx) tx : null;
    final IgniteCacheExpiryPolicy expiry = expiryPolicy(expiryPlc);
    GridNearGetFuture<K, V> fut = new GridNearGetFuture<>(ctx, keys, !skipStore, forcePrimary, txx, subjId, taskName, deserializeBinary, expiry, skipVal, needVer, false, recovery);
    // init() will register future for responses if future has remote mappings.
    fut.init(null);
    return fut;
}
Also used : IgniteTxLocalEx(org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalEx) IgniteCacheExpiryPolicy(org.apache.ignite.internal.processors.cache.IgniteCacheExpiryPolicy)

Example 2 with IgniteTxLocalEx

use of org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalEx in project ignite by apache.

the class GridNearCacheAdapter method loadAsync.

/**
 * @param tx Transaction.
 * @param keys Keys to load.
 * @param forcePrimary Force primary flag.
 * @param taskName Task name.
 * @param deserializeBinary Deserialize binary flag.
 * @param expiryPlc Expiry policy.
 * @param skipVal Skip value flag.
 * @param skipStore Skip store flag.
 * @param needVer Need version.
 * @return Loaded values.
 */
public IgniteInternalFuture<Map<K, V>> loadAsync(@Nullable IgniteInternalTx tx, @Nullable Collection<KeyCacheObject> keys, boolean forcePrimary, String taskName, boolean deserializeBinary, boolean recovery, @Nullable ExpiryPolicy expiryPlc, boolean skipVal, boolean skipStore, boolean needVer) {
    if (F.isEmpty(keys))
        return new GridFinishedFuture<>(Collections.<K, V>emptyMap());
    IgniteTxLocalEx txx = (tx != null && tx.local()) ? (IgniteTxLocalEx) tx : null;
    final IgniteCacheExpiryPolicy expiry = expiryPolicy(expiryPlc);
    GridNearGetFuture<K, V> fut = new GridNearGetFuture<>(ctx, keys, !skipStore, forcePrimary, txx, taskName, deserializeBinary, expiry, skipVal, needVer, false, recovery);
    // init() will register future for responses if future has remote mappings.
    fut.init(null);
    return fut;
}
Also used : IgniteTxLocalEx(org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalEx) IgniteCacheExpiryPolicy(org.apache.ignite.internal.processors.cache.IgniteCacheExpiryPolicy)

Aggregations

IgniteCacheExpiryPolicy (org.apache.ignite.internal.processors.cache.IgniteCacheExpiryPolicy)2 IgniteTxLocalEx (org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalEx)2