* @version $Revision$
*****************************************************************************/
-package org.splat.service;
+package org.splat.service;
import org.splat.exception.LockAlreadyExistsException;
import org.splat.exception.LockNotExistsException;
import org.splat.log.AppLogger;
/**
+ * The service to lock objects in the database.
+ *
* @author Maria KRUCHININA
- *
*/
public class LockServiceImpl implements LockService {
-
+
/**
* logger.
*/
- private final static AppLogger LOG = AppLogger.getLogger(LockService.class);
+ private final static AppLogger LOG = AppLogger.getLogger(LockService.class); // RKV: NOPMD: TODO: Complete the service.
/**
* Lock timeout period in milliseconds. A 24 hours by default.
*/
- private long _timeoutPeriod = 86400000L;
+ private final long _timeoutPeriod = 86400000L; // RKV: NOPMD: TODO: Complete the service.
/**
* Lock a data row or update lock on a data row for one user.
- * @param rowUid Row uid
- * @param tableUid Table uid
- * @param userUid User uid
- * @throws LockAlreadyExistsException when a lock already exists for row uid and another user id
+ *
+ * @param rowUid
+ * Row uid
+ * @param tableUid
+ * Table uid
+ * @param userUid
+ * User uid
+ * @throws LockAlreadyExistsException
+ * when a lock already exists for row uid and another user id
*/
- public void lock(final String rowUid, final String tableUid, final String userUid) throws LockAlreadyExistsException {
- //TODO:
+ public void lock(final String rowUid, final String tableUid,
+ final String userUid) throws LockAlreadyExistsException {
+ // TODO:
}
-
+
/**
* Unlock a data row for one user.
- * @param rowUid Row uid
- * @param tableUid Table uid
- * @param userUid User uid
- * @throws LockNotExistsException when lock does not exist
- * @throws LockProtectedException lock exists for another user
+ *
+ * @param rowUid
+ * Row uid
+ * @param tableUid
+ * Table uid
+ * @param userUid
+ * User uid
+ * @throws LockNotExistsException
+ * when lock does not exist
+ * @throws LockProtectedException
+ * lock exists for another user
*/
- public void unlock(final String rowUid, final String tableUid, final String userUid) throws LockNotExistsException, LockProtectedException {
- //TODO:
+ public void unlock(final String rowUid, final String tableUid,
+ final String userUid) throws LockNotExistsException,
+ LockProtectedException {
+ // TODO:
}
- /**
+ /**
* Unlock all datas rox for one user.
- * @param userUid User uid
+ *
+ * @param userUid
+ * User uid
*/
@Override
- public void unlockAll(String userUid) {
+ public void unlockAll(final String userUid) {
// TODO Auto-generated method stub
}
-
+
/**
* Check lock on a data row in a table for a user.
- * @param rowUid Row uid
- * @param tableUid Table uid
- * @param userUid User uid
- * @throws LockNotExistsException when lock does not exist
- * @throws LockProtectedException lock exists for another user
- * @throws LockOutdatedException when lock on object is in timeout but the
- * owner of lock is another user
+ *
+ * @param rowUid
+ * Row uid
+ * @param tableUid
+ * Table uid
+ * @param userUid
+ * User uid
+ * @throws LockNotExistsException
+ * when lock does not exist
+ * @throws LockProtectedException
+ * lock exists for another user
+ * @throws LockOutdatedException
+ * when lock on object is in timeout but the owner of lock is another user
*/
- public void check(final String rowUid, final String tableUid, final String userUid) throws LockNotExistsException, LockProtectedException, LockOutdatedException {
- //TODO:
+ public void check(final String rowUid, final String tableUid,
+ final String userUid) throws LockNotExistsException,
+ LockProtectedException, LockOutdatedException {
+ // TODO:
}
-
}