git://wamblee.org
/
utils
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(no commit message)
[utils]
/
support
/
general
/
src
/
main
/
java
/
org
/
wamblee
/
cache
/
ComputedValue.java
diff --git
a/support/general/src/main/java/org/wamblee/cache/ComputedValue.java
b/support/general/src/main/java/org/wamblee/cache/ComputedValue.java
index 24bbe5b0c159477bf053f34da32e3322ec3b2b31..4acafe6a432d8e3f224609148ecc4fd3579302c7 100644
(file)
--- a/
support/general/src/main/java/org/wamblee/cache/ComputedValue.java
+++ b/
support/general/src/main/java/org/wamblee/cache/ComputedValue.java
@@
-63,7
+63,7
@@
public class ComputedValue<T> {
private Computation<T> computedValue;
private Boolean busy;
private Computation<T> computedValue;
private Boolean busy;
- private T value;
+ private T value;
/**
* Constructs the compute guard
/**
* Constructs the compute guard
@@
-77,7
+77,7
@@
public class ComputedValue<T> {
lock = aLock;
computedValue = aComputation;
busy = false;
lock = aLock;
computedValue = aComputation;
busy = false;
- value = null;
+ value = null;
}
/**
}
/**
@@
-122,24
+122,27
@@
public class ComputedValue<T> {
return value;
}
}
return value;
}
}
-
+
/**
/**
- * Gets the currently cached value. No recomputation is performed.
- * @return Cached value.
+ * Gets the currently cached value. No recomputation is performed.
+ *
+ * @return Cached value.
*/
*/
- public T getCached() {
- synchronized
(lock) {
- return value;
+ public T getCached() {
+ synchronized
(lock) {
+ return value;
}
}
-
+
}
}
-
+
/**
/**
- * Sets the value explicitly.
- * @param aValue value to set.
+ * Sets the value explicitly.
+ *
+ * @param aValue
+ * value to set.
*/
*/
- public void set(T aValue) {
- synchronized
(lock) {
+ public void set(T aValue) {
+ synchronized
(lock) {
value = aValue;
}
}
value = aValue;
}
}