Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

.

  • Loading branch information...
commit 8682d9f903a45de3b0afb954e63e7e94b5ffc2d3 1 parent af48db7
@fwbrasil authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/main/scala/net/fwbrasil/radon/ref/Ref.scala
View
8 src/main/scala/net/fwbrasil/radon/ref/Ref.scala
@@ -69,6 +69,9 @@ class Ref[T](pValueOption: Option[T])(implicit val context: TransactionContext)
private[fwbrasil] def setRefContent(pValue: Option[T], pReadTimestamp: Long, pWriteTimestamp: Long, pDestroyedFlag: Boolean): Unit =
_refContent = RefContent[T](pValue, pReadTimestamp, pWriteTimestamp, pDestroyedFlag)
+ private[fwbrasil] def destroyInternal =
+ setRefContent(None, readTimestamp, writeTimestamp, true)
+
private[radon] def readTimestamp = refContent.readTimestamp
private[radon] def writeTimestamp = refContent.writeTimestamp
private[radon] def destroyedFlag = refContent.destroyedFlag
@@ -115,8 +118,9 @@ class Ref[T](pValueOption: Option[T])(implicit val context: TransactionContext)
get
else
"destroyed"
- } else
- refContent.value
+ } else if (!_refContent.destroyedFlag)
+ _refContent.value
+ else "destroyed"
override def toString =
"Ref(" + snapshot + ")"
Please sign in to comment.
Something went wrong with that request. Please try again.