@@ -0,0 +1,2851 @@
+/*%0A * Copyright 2009-2013 by The Regents of the University of California%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * you may obtain a copy of the License from%0A * %0A *     http://www.apache.org/licenses/LICENSE-2.0%0A * %0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage edu.uci.ics.asterix.transaction.management.service.locking;%0A%0Aimport java.io.IOException;%0Aimport java.io.OutputStream;%0A%0Aimport edu.uci.ics.asterix.common.exceptions.ACIDException;%0Aimport edu.uci.ics.asterix.common.transactions.DatasetId;%0Aimport edu.uci.ics.asterix.common.transactions.ILockManager;%0Aimport edu.uci.ics.asterix.common.transactions.ITransactionContext;%0Aimport edu.uci.ics.asterix.transaction.management.service.transaction.TransactionSubsystem;%0Aimport edu.uci.ics.hyracks.api.lifecycle.ILifeCycleComponent;%0A%0A%0A/**%0A * A dummy implementation of the ILockManager interface. It assumes that all%0A * requests are successful. It can be used to for jobs that are known to be%0A * conflict free, but it'll yield terrible results if there are conflicts.%0A * %0A * @author tillw%0A *%0A */%0Apublic class DummyLockManager implements ILockManager, ILifeCycleComponent %7B%0A%0A    public DummyLockManager(TransactionSubsystem transactionSubsystem) %7B%0A    %7D%0A%0A    @Override%0A    public void start() %7B%0A    %7D%0A%0A    @Override%0A    public void stop(boolean dumpState, OutputStream ouputStream) throws IOException %7B%0A    %7D%0A%0A    @Override%0A    public void lock(DatasetId datasetId, int entityHashValue, byte lockMode, ITransactionContext txnContext)%0A            throws ACIDException %7B%0A    %7D%0A%0A    @Override%0A    public void releaseLocks(ITransactionContext txnContext) throws ACIDException %7B%0A    %7D%0A%0A    @Override%0A    public void unlock(DatasetId datasetId, int entityHashValue, byte lockMode, ITransactionContext txnContext)%0A            throws ACIDException %7B%0A    %7D%0A%0A    @Override%0A    public void instantLock(DatasetId datasetId, int entityHashValue, byte lockMode, ITransactionContext context)%0A            throws ACIDException %7B%0A    %7D%0A%0A    @Override%0A    public boolean tryLock(DatasetId datasetId, int entityHashValue, byte lockMode, ITransactionContext context)%0A            throws ACIDException %7B%0A        return true;%0A    %7D%0A%0A    @Override%0A    public boolean instantTryLock(DatasetId datasetId, int entityHashValue, byte lockMode,%0A            ITransactionContext txnContext) throws ACIDException %7B%0A        return true;%0A    %7D%0A%0A    @Override%0A    public String prettyPrint() throws ACIDException %7B%0A        return %22DummyLockManager%22;%0A    %7D%0A%0A%7D%0A

add DummyLockManager