1 package org.xvsm.coordinators;
2
3 import org.xvsm.core.Entry;
4 import org.xvsm.internal.exceptions.ContainerFullException;
5 import org.xvsm.internal.exceptions.TransactionLockException;
6 import org.xvsm.selectors.LifoSelector;
7 import org.xvsm.selectors.Selector;
8 import org.xvsm.transactions.Transaction;
9
10 /***
11 *
12 * @author Christian Schreiber, Michael Proestler
13 *
14 */
15 public class LifoCoordinator extends FifoCoordinator {
16
17 /***
18 * The SerialVersionUID of this Class.
19 */
20 private static final long serialVersionUID = -5287274278986530418L;
21
22 /***
23 * {@inheritDoc}.
24 */
25 @Override
26 public void write(Entry e, Transaction tx, Selector s)
27 throws ContainerFullException, TransactionLockException {
28 super.aquireLock(true, tx);
29
30 this.entries.add(0, e);
31
32 }
33
34 /***
35 * {@inheritDoc}.
36 */
37 @Override
38 public Class<? extends Selector> getDefaultSelector() {
39 return LifoSelector.class;
40 }
41
42 }