private void updateState(final long procId, final boolean isDeleted) { int bitmapIndex = getBitmapIndex(procId); int wordIndex = bitmapIndex >> ADDRESS_BITS_PER_WORD; long value = (1L << bitmapIndex); updated[wordIndex] |= value; if (isDeleted) { deleted[wordIndex] |= value; } else { deleted[wordIndex] &= ~value; } }
public DeleteState isDeleted(final long procId) { int bitmapIndex = getBitmapIndex(procId); int wordIndex = bitmapIndex >> ADDRESS_BITS_PER_WORD; if (wordIndex >= deleted.length) { return DeleteState.MAYBE; } return (deleted[wordIndex] & (1L << bitmapIndex)) != 0 ? DeleteState.YES : DeleteState.NO; }
private boolean isUpdated(final long procId) { int bitmapIndex = getBitmapIndex(procId); int wordIndex = bitmapIndex >> ADDRESS_BITS_PER_WORD; if (wordIndex >= updated.length) { return false; } return (updated[wordIndex] & (1L << bitmapIndex)) != 0; }
private void updateState(final long procId, final boolean isDeleted) { int bitmapIndex = getBitmapIndex(procId); int wordIndex = bitmapIndex >> ADDRESS_BITS_PER_WORD; long value = (1L << bitmapIndex); if (isDeleted) { updated[wordIndex] |= value; deleted[wordIndex] |= value; } else { updated[wordIndex] |= value; deleted[wordIndex] &= ~value; } }
public DeleteState isDeleted(final long procId) { int bitmapIndex = getBitmapIndex(procId); int wordIndex = bitmapIndex >> ADDRESS_BITS_PER_WORD; if (wordIndex >= deleted.length) { return DeleteState.MAYBE; } return (deleted[wordIndex] & (1L << bitmapIndex)) != 0 ? DeleteState.YES : DeleteState.NO; }
private boolean isUpdated(final long procId) { int bitmapIndex = getBitmapIndex(procId); int wordIndex = bitmapIndex >> ADDRESS_BITS_PER_WORD; if (wordIndex >= updated.length) { return false; } return (updated[wordIndex] & (1L << bitmapIndex)) != 0; }