001 package org.apache.ojb.otm;
002
003 /* Copyright 2003-2005 The Apache Software Foundation
004 *
005 * Licensed under the Apache License, Version 2.0 (the "License");
006 * you may not use this file except in compliance with the License.
007 * You may obtain a copy of the License at
008 *
009 * http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017
018 import org.apache.ojb.broker.Identity;
019 import org.apache.ojb.broker.PBKey;
020 import org.apache.ojb.otm.copy.ObjectCopyStrategy;
021 import org.apache.ojb.otm.core.Transaction;
022 import org.apache.ojb.otm.lock.map.LockMap;
023 import org.apache.ojb.otm.lock.wait.LockWaitStrategy;
024 import org.apache.ojb.otm.swizzle.Swizzling;
025
026 /**
027 * The Kit provides the point of entry for any OTM client
028 *
029 * @author <a href="mailto:mattbaird@yahoo.com">Matthew Baird</a>
030 */
031 public interface Kit
032 {
033 /**
034 * Acquire an open OTMConnection
035 *
036 * @param pbKey
037 * @return
038 */
039 OTMConnection acquireConnection(PBKey pbKey);
040
041 /**
042 * Obtain the transaction this connection is bound to
043 */
044 Transaction getTransaction(OTMConnection conn);
045
046 /**
047 * @todo document
048 */
049 Swizzling getSwizzlingStrategy();
050
051 /**
052 * @todo document
053 */
054 LockWaitStrategy getLockWaitStrategy();
055
056 /**
057 * @todo document
058 */
059 LockMap getLockMap();
060
061 /**
062 * @todo document
063 */
064 ObjectCopyStrategy getCopyStrategy(Identity oid);
065
066 /**
067 * @todo document
068 */
069 boolean isImplicitLockingUsed();
070
071 }