[Lada-commits] [PATCH 5 of 8] Added interface, annotation and enum for Lock mechanism

Wald Commits scm-commit at wald.intevation.org
Wed Mar 25 16:26:27 CET 2015


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1427296661 -3600
# Node ID ec13e741ec7127e9881a21d86c5da3850e65b50a
# Parent  519fcf6e738cd3ee2a0cd4dcb1392e2226d65e77
Added interface, annotation and enum for Lock mechanism.

diff -r 519fcf6e738c -r ec13e741ec71 src/main/java/de/intevation/lada/lock/LockConfig.java
--- /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;
+
+ at Qualifier
+ at Retention(RetentionPolicy.RUNTIME)
+ at Target({
+    ElementType.TYPE,
+    ElementType.FIELD,
+    ElementType.METHOD,
+    ElementType.PARAMETER})
+public @interface LockConfig {
+    LockType type() default LockType.NONE;
+}
diff -r 519fcf6e738c -r ec13e741ec71 src/main/java/de/intevation/lada/lock/LockType.java
--- /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
+}
diff -r 519fcf6e738c -r ec13e741ec71 src/main/java/de/intevation/lada/lock/ObjectLocker.java
--- /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);
+}


More information about the Lada-commits mailing list