1 13 package org.jahia.services.lock; 14 15 import java.util.HashMap ; 16 17 import org.jahia.services.JahiaService; 18 import org.jahia.services.usermanager.JahiaUser; 19 20 public abstract class LockService extends JahiaService { 21 22 32 public abstract boolean acquire (LockKey lockKey, JahiaUser owner, 33 String lockID, int timeout); 34 35 44 public abstract boolean isAcquireable (LockKey lockKey, JahiaUser owner, 45 String lockID); 46 47 60 public abstract boolean reserve(LockKey lockKey, JahiaUser owner, 61 String lockID, int timeout, int delay); 62 63 70 public abstract void release(LockKey lockKey, JahiaUser owner, 71 String lockID); 72 73 79 public abstract HashMap getInfo(LockKey lockKey); 80 81 87 public abstract Long getTimeRemaining(LockKey lockKey); 88 89 98 public abstract void steal(LockKey lockKey, JahiaUser newOwner, 99 String lockID); 100 101 112 public abstract void nuke(LockKey lockKey, JahiaUser owner, String lockID); 113 114 120 public abstract boolean isStealed(LockKey lockKey); 121 122 128 public abstract boolean isAlreadyAcquired(LockKey lockKey); 129 130 138 public abstract boolean isStealedInContext(LockKey lockKey, JahiaUser owner, String lockID); 139 140 149 public abstract boolean isAlreadyAcquiredInContext(LockKey lockKey, 150 JahiaUser owner, String lockID); 151 152 160 public abstract boolean canRelease(LockKey lockKey, JahiaUser owner, 161 String lockID); 162 163 170 public abstract boolean hasAdminRights(LockKey lockKey, JahiaUser owner); 171 172 178 public abstract void purgeLocks(); 179 180 } | Popular Tags |