/**
   * Default constructor.
   *
   * @param name Sequence name.
   * @param key Sequence key.
   * @param seqView Sequence projection.
   * @param ctx CacheContext.
   * @param locVal Local counter.
   * @param upBound Upper bound.
   */
  public GridCacheAtomicSequenceImpl(
      String name,
      GridCacheInternalStorableKey key,
      GridCacheProjection<GridCacheInternalStorableKey, GridCacheAtomicSequenceValue> seqView,
      GridCacheContext ctx,
      long locVal,
      long upBound) {
    assert key != null;
    assert seqView != null;
    assert ctx != null;
    assert locVal <= upBound;

    batchSize = ctx.config().getAtomicSequenceReserveSize();
    this.ctx = ctx;
    this.key = key;
    this.seqView = seqView;
    this.upBound = upBound;
    this.locVal = locVal;
    this.name = name;

    log = ctx.gridConfig().getGridLogger().getLogger(getClass());
  }
 /** @param ctx Context. */
 public GridNearCache(GridCacheContext<K, V> ctx) {
   super(ctx, ctx.config().getNearStartSize());
 }
示例#3
0
  /** @param ctx Cache registry. */
  public GridLocalCache(GridCacheContext<K, V> ctx) {
    super(ctx, ctx.config().getStartSize());

    preldr = new GridCachePreloaderAdapter<K, V>(ctx);
  }
 /** @param ctx Cache registry. */
 public GridReplicatedCache(GridCacheContext<K, V> ctx) {
   super(ctx, ctx.config().getStartSize());
 }
 /** @return Synchronous flag. */
 private boolean isSync() {
   return cctx.config().getWriteSynchronizationMode()
       != GridCacheWriteSynchronizationMode.FULL_ASYNC;
 }