Search in sources :

Example 1 with MutableLong

use of org.apache.asterix.common.transactions.MutableLong in project asterixdb by apache.

the class TransactionContext method registerIndexAndCallback.

@Override
public void registerIndexAndCallback(long resourceId, ILSMIndex index, AbstractOperationCallback callback, boolean isPrimaryIndex) {
    synchronized (indexMap) {
        if (isPrimaryIndex && primaryIndex == null) {
            primaryIndex = index;
            primaryIndexCallback = callback;
            primaryIndexOpTracker = (PrimaryIndexOperationTracker) index.getOperationTracker();
        }
        tempResourceIdForRegister.set(resourceId);
        if (!indexMap.containsKey(tempResourceIdForRegister)) {
            indexMap.put(new MutableLong(resourceId), ((AbstractLSMIOOperationCallback) index.getIOOperationCallback()));
        }
    }
}
Also used : AbstractLSMIOOperationCallback(org.apache.asterix.common.ioopcallbacks.AbstractLSMIOOperationCallback) MutableLong(org.apache.asterix.common.transactions.MutableLong)

Aggregations

AbstractLSMIOOperationCallback (org.apache.asterix.common.ioopcallbacks.AbstractLSMIOOperationCallback)1 MutableLong (org.apache.asterix.common.transactions.MutableLong)1