changeset 593:ec13e741ec71

Added interface, annotation and enum for Lock mechanism.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 25 Mar 2015 16:17:41 +0100 (2015-03-25)
parents 519fcf6e738c
children b2af88e8eb15
files src/main/java/de/intevation/lada/lock/LockConfig.java src/main/java/de/intevation/lada/lock/LockType.java src/main/java/de/intevation/lada/lock/ObjectLocker.java
diffstat 3 files changed, 29 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/main/java/de/intevation/lada/lock/LockConfig.java	Wed Mar 25 16:17:41 2015 +0100
@@ -0,0 +1,19 @@
+package de.intevation.lada.lock;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+@Qualifier
+@Retention(RetentionPolicy.RUNTIME)
+@Target({
+    ElementType.TYPE,
+    ElementType.FIELD,
+    ElementType.METHOD,
+    ElementType.PARAMETER})
+public @interface LockConfig {
+    LockType type() default LockType.NONE;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/main/java/de/intevation/lada/lock/LockType.java	Wed Mar 25 16:17:41 2015 +0100
@@ -0,0 +1,5 @@
+package de.intevation.lada.lock;
+
+public enum LockType {
+    NONE, TIMESTAMP
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/main/java/de/intevation/lada/lock/ObjectLocker.java	Wed Mar 25 16:17:41 2015 +0100
@@ -0,0 +1,5 @@
+package de.intevation.lada.lock;
+
+public interface ObjectLocker {
+    boolean isLocked(Object o);
+}
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)