1 /* $HeadURL:: $
2 * $Id$
3 *
4 * Copyright (c) 2009-2010 DuraSpace
5 * http://duraspace.org
6 *
7 * In collaboration with Topaz Inc.
8 * http://www.topazproject.org
9 *
10 * Licensed under the Apache License, Version 2.0 (the "License");
11 * you may not use this file except in compliance with the License.
12 * You may obtain a copy of the License at
13 *
14 * http://www.apache.org/licenses/LICENSE-2.0
15 *
16 * Unless required by applicable law or agreed to in writing, software
17 * distributed under the License is distributed on an "AS IS" BASIS,
18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 * See the License for the specific language governing permissions and
20 * limitations under the License.
21 */
22
23 package org.akubraproject.txn;
24
25 import java.io.IOException;
26 import java.net.URI;
27
28 import org.akubraproject.BlobStore;
29 import org.akubraproject.impl.AbstractBlobStore;
30
31 /**
32 * A basic superclass for transactional stores.
33 *
34 * <p>Subclasses must implement {@link BlobStore#openConnection openConnection}.
35 *
36 * @author Ronald Tschalär
37 */
38 public abstract class AbstractTransactionalStore extends AbstractBlobStore {
39 /** the underlying blob-store used for the actual storage */
40 protected final BlobStore wrappedStore;
41
42 /**
43 * Create a new transactional store.
44 *
45 * @param id the id of this store
46 * @param wrappedStore the wrapped non-transactional store
47 */
48 protected AbstractTransactionalStore(URI id, BlobStore wrappedStore) throws IOException {
49 super(id);
50 this.wrappedStore = wrappedStore;
51 }
52 }