1 24 25 package org.objectweb.perseus.concurrency.distributed; 26 27 import org.objectweb.perseus.distribution.util.action.AbstractBlockingAction; 28 29 30 abstract public class AbstractLockingAction extends AbstractBlockingAction { 31 public byte lck; 32 33 public AbstractLockingAction(String name, byte expBehaviour, 34 byte execMode, byte lck) { 35 super(name, expBehaviour, execMode); 36 this.lck = lck; 37 } 38 static public String lckString(byte lck) { 39 switch (lck) { 40 case 0: return "N"; 41 case 1: return "R"; 42 case 2: return "U"; 43 case 3: return "W"; 44 } 45 return "?"; 46 } 47 public String toString() { 48 return getBrief() + lckString(lck) + name ; 49 } 50 abstract protected String getBrief(); 51 abstract protected String getLockingDescription(); 52 53 54 final public String getDescription() { 55 return getLockingDescription() + " " + lckString(lck); 56 } 57 58 59 } 60 | Popular Tags |