// 
// Decompiled by Procyon v0.6.0
// 

package io.netty.util.internal.shaded.org.jctools.queues;

import io.netty.util.internal.shaded.org.jctools.util.UnsafeAccess;

abstract class MpmcArrayQueueConsumerIndexField<E> extends MpmcArrayQueueL2Pad<E>
{
    private static final long C_INDEX_OFFSET;
    private volatile long consumerIndex;
    
    MpmcArrayQueueConsumerIndexField(final int capacity) {
        super(capacity);
    }
    
    @Override
    public final long lvConsumerIndex() {
        return this.consumerIndex;
    }
    
    final boolean casConsumerIndex(final long expect, final long newValue) {
        return UnsafeAccess.UNSAFE.compareAndSwapLong(this, MpmcArrayQueueConsumerIndexField.C_INDEX_OFFSET, expect, newValue);
    }
    
    static {
        C_INDEX_OFFSET = UnsafeAccess.fieldOffset(MpmcArrayQueueConsumerIndexField.class, "consumerIndex");
    }
}
