/** * Get the next trace object id for this object type. * * @param type the object type * @return the new trace object id */ protected static int getNextId(int type) { return ID.getAndIncrement(type); }
void incSentCount(Dimse dimse) { dimseCounters.getAndIncrement(dimse.ordinal()); }
void incReceivedCount(Dimse dimse) { dimseCounters.getAndIncrement(23 + dimse.ordinal()); }
void incSentCount(Dimse dimse) { dimseCounters.getAndIncrement(dimse.ordinal()); }
void incReceivedCount(Dimse dimse) { dimseCounters.getAndIncrement(23 + dimse.ordinal()); }
void add(long time) { clear(time); int index = (int) (time % size); long current = lastTime.longValue(); if (time > current) { int oldValue = counts.get(index); if (lastTime.compareAndSet(current, time)) { counts.getAndAdd(index, 1 - oldValue); } else { counts.getAndIncrement(index); } } else { counts.getAndIncrement(index); } }
int isInitStarted = clientTypesInitStarted.getAndIncrement(clientTypeIndex); int isInitFinished = clientTypesInitFinished.get(clientTypeIndex); clientTypesInitFinished.getAndIncrement(clientTypeIndex); } else if (isInitFinished > 0) {
long queue_offset = ioThread.queue_counter.getAndIncrement((int) which_queue_in_this_io_thread);
public void addOrCreate(int phase, int element) { if (offsets.get(phase) != 0) { final int offset = offsets.getAndIncrement(phase); queue[phase] = ArrayUtil.grow(queue[phase], offset + 1); queue[phase][offset] = element; return; } boolean done = false; while (!done) { int current = offsets.get(phase); done = offsets.compareAndSet(phase, current, current + 1); if (current == 0) { queue[phase] = new int[1]; } queue[phase] = ArrayUtil.grow(queue[phase], current + 1); queue[phase][current] = element; } }
public void addOrCreate(int phase, int element) { if (offsets.get(phase) != 0) { final int offset = offsets.getAndIncrement(phase); queue[phase] = ArrayUtil.grow(queue[phase], offset + 1); queue[phase][offset] = element; return; } boolean done = false; while (!done) { int current = offsets.get(phase); done = offsets.compareAndSet(phase, current, current + 1); if (current == 0) { queue[phase] = new int[1]; } queue[phase] = ArrayUtil.grow(queue[phase], current + 1); queue[phase][current] = element; } }