/** * @param timeout Timeout for this object. */ protected GridTimeoutObjectAdapter(long timeout) { this(GridUuid.randomUuid(), timeout); }
/** * @return Pre-generated UUID. */ private GridUuid uuid() { return GridUuid.randomUuid(); }
/** * Create event with given parameters. * * @param nid Node where events were lost. */ public VisorGridEventsLost(UUID nid) { super(EVT_VISOR_EVENTS_LOST, GridUuid.randomUuid(), "EVT_VISOR_EVENTS_LOST", nid, U.currentTimeMillis(), "Some Visor events were lost and Visor may show inconsistent results. " + "Configure your grid to disable not important events.", ""); } }
/** * @param cctx Context. * @param tx Transaction. */ public GridDhtColocatedTxPrepareFuture(GridCacheContext<K, V> cctx, final GridDhtColocatedTxLocal<K, V> tx) { super(cctx.kernalContext(), new GridReducer<GridCacheTxEx<K, V>, GridCacheTxEx<K, V>>() { @Override public boolean collect(GridCacheTxEx<K, V> e) { return true; } @Override public GridCacheTxEx<K, V> reduce() { // Nothing to aggregate. return tx; } }); assert cctx != null; assert tx != null; this.cctx = cctx; this.tx = tx; futId = GridUuid.randomUuid(); log = U.logger(ctx, logRef, GridDhtColocatedTxPrepareFuture.class); }
/** * @param cctx Context. * @param tx Transaction. */ public GridNearTxPrepareFuture(GridCacheContext<K, V> cctx, final GridNearTxLocal<K, V> tx) { super(cctx.kernalContext(), new GridReducer<GridCacheTxEx<K, V>, GridCacheTxEx<K, V>>() { @Override public boolean collect(GridCacheTxEx<K, V> e) { return true; } @Override public GridCacheTxEx<K, V> reduce() { // Nothing to aggregate. return tx; } }); assert cctx != null; assert tx != null; this.cctx = cctx; this.tx = tx; futId = GridUuid.randomUuid(); log = U.logger(ctx, logRef, GridNearTxPrepareFuture.class); }
this.id = id == null ? GridUuid.randomUuid() : id; this.len = isDir ? 0 : len; this.blockSize = isDir ? 0 : blockSize;
/** * @param cctx Context. * @param tx Transaction. */ public GridDhtColocatedTxFinishFuture(GridCacheContext<K, V> cctx, GridDhtColocatedTxLocal<K, V> tx) { super(cctx.kernalContext(), F.<GridCacheTx>identityReducer(tx)); this.cctx = cctx; this.tx = tx; ignoreInterrupts(true); mappings = tx.mappings(); futId = GridUuid.randomUuid(); log = U.logger(ctx, logRef, GridDhtColocatedTxFinishFuture.class); }
/** * @param plc Communication policy. * @param topic Communication topic. * @param nodeId Node ID. * @param timeout Timeout. * @param skipOnTimeout Whether message can be skipped on timeout. * @param msg Message to add immediately. */ GridCommunicationMessageSet(GridIoPolicy plc, Object topic, UUID nodeId, long timeout, boolean skipOnTimeout, GridIoMessage msg) { assert nodeId != null; assert topic != null; assert plc != null; assert msg != null; this.plc = plc; this.nodeId = nodeId; this.topic = topic; this.timeout = timeout == 0 ? ctx.config().getNetworkTimeout() : timeout; this.skipOnTimeout = skipOnTimeout; endTime = endTime(timeout); timeoutId = GridUuid.randomUuid(); lastTs = U.currentTimeMillis(); msgs.add(F.t(msg, lastTs)); }
/** * @param cctx Context. * @param tx Transaction. * @param commit Commit flag. */ public GridNearTxFinishFuture(GridCacheContext<K, V> cctx, GridNearTxLocal<K, V> tx, boolean commit) { super(cctx.kernalContext(), F.<GridCacheTx>identityReducer(tx)); this.cctx = cctx; this.tx = tx; this.commit = commit; ignoreInterrupts(true); mappings = tx.mappings(); futId = GridUuid.randomUuid(); log = U.logger(ctx, logRef, GridNearTxFinishFuture.class); }
/** * @param cctx Context. * @param tx Transaction. * @param commit Commit flag. */ public GridDhtTxFinishFuture(GridCacheContext<K, V> cctx, GridDhtTxLocalAdapter<K, V> tx, boolean commit) { super(cctx.kernalContext(), F.<GridCacheTx>identityReducer(tx)); assert cctx != null; this.cctx = cctx; this.tx = tx; this.commit = commit; dhtMap = tx.dhtMap(); nearMap = tx.nearMap(); futId = GridUuid.randomUuid(); log = U.logger(ctx, logRef, GridDhtTxFinishFuture.class); }
private GridUuid id = GridUuid.randomUuid();
futId = GridUuid.randomUuid();
this.lastBackups = lastBackups; futId = GridUuid.randomUuid();
futId = GridUuid.randomUuid();
hdr = new GridCacheSetHeader(GridUuid.randomUuid(), collocated);
/** * Set lock on file info. * * @param info File info. * @return New file info with lock set. * @throws GridException In case lock is already set on that file. */ public GridGgfsFileInfo lockInfo(GridGgfsFileInfo info) throws GridException { if (busyLock.enterBusy()) { try { assert info != null; if (info.lockId() != null) throw new GridException("Failed to lock file (file is being concurrently written) [fileId=" + info.id() + ", lockId=" + info.lockId() + ']'); return new GridGgfsFileInfo(info, GridUuid.randomUuid(), info.modificationTime()); } finally { busyLock.leaveBusy(); } } else throw new IllegalStateException("Failed to get lock info because Grid is stopping: " + info); }
futId = GridUuid.randomUuid();
/** * Set lock on file info. * * @param info File info. * @return New file info with lock set. * @throws GridException In case lock is already set on that file. */ public GridGgfsFileInfo lockInfo(GridGgfsFileInfo info) throws GridException { if (busyLock.enterBusy()) { try { assert info != null; if (info.lockId() != null) throw new GridException("Failed to lock file (file is being concurrently written) [fileId=" + info.id() + ", lockId=" + info.lockId() + ']'); return new GridGgfsFileInfo(info, GridUuid.randomUuid(), info.modificationTime()); } finally { busyLock.leaveBusy(); } } else throw new IllegalStateException("Failed to get lock info because Grid is stopping: " + info); }
private final GridUuid id = GridUuid.randomUuid();
private GridUuid id = GridUuid.randomUuid();