Created an alias to TransactionalRef; Ref
This commit is contained in:
parent
d40ee7dab3
commit
7104076f04
3 changed files with 26 additions and 5 deletions
|
|
@ -53,6 +53,17 @@ trait Committable {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Alias to TransactionalRef.
|
||||||
|
*
|
||||||
|
* @author <a href="http://jonasboner.com">Jonas Bonér</a>
|
||||||
|
*/
|
||||||
|
object Ref {
|
||||||
|
def apply[T]() = new Ref[T]
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Alias to Ref.
|
||||||
|
*
|
||||||
* @author <a href="http://jonasboner.com">Jonas Bonér</a>
|
* @author <a href="http://jonasboner.com">Jonas Bonér</a>
|
||||||
*/
|
*/
|
||||||
object TransactionalRef {
|
object TransactionalRef {
|
||||||
|
|
@ -65,8 +76,17 @@ object TransactionalRef {
|
||||||
def apply[T]() = new TransactionalRef[T]
|
def apply[T]() = new TransactionalRef[T]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implements a transactional managed reference.
|
||||||
|
* Alias to TransactionalRef.
|
||||||
|
*
|
||||||
|
* @author <a href="http://jonasboner.com">Jonas Bonér</a>
|
||||||
|
*/
|
||||||
|
class Ref[T] extends TransactionalRef[T]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements a transactional managed reference.
|
* Implements a transactional managed reference.
|
||||||
|
* Alias to Ref.
|
||||||
*
|
*
|
||||||
* @author <a href="http://jonasboner.com">Jonas Bonér</a>
|
* @author <a href="http://jonasboner.com">Jonas Bonér</a>
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -87,8 +87,9 @@ trait ChatStorage extends Actor
|
||||||
*/
|
*/
|
||||||
class RedisChatStorage extends ChatStorage {
|
class RedisChatStorage extends ChatStorage {
|
||||||
lifeCycle = Some(LifeCycle(Permanent))
|
lifeCycle = Some(LifeCycle(Permanent))
|
||||||
|
val CHAT_LOG = "akka.chat.log"
|
||||||
private var chatLog = atomic { RedisStorage.getVector("akka.chat.log") }
|
|
||||||
|
private var chatLog = atomic { RedisStorage.getVector(CHAT_LOG) }
|
||||||
|
|
||||||
log.info("Redis-based chat storage is starting up...")
|
log.info("Redis-based chat storage is starting up...")
|
||||||
|
|
||||||
|
|
@ -106,7 +107,7 @@ class RedisChatStorage extends ChatStorage {
|
||||||
reply(ChatLog(messageList))
|
reply(ChatLog(messageList))
|
||||||
}
|
}
|
||||||
|
|
||||||
override def postRestart(reason: Throwable) = chatLog = RedisStorage.getVector("akka.chat.log")
|
override def postRestart(reason: Throwable) = chatLog = RedisStorage.getVector(CHAT_LOG)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -127,11 +127,11 @@ class AkkaParent(info: ProjectInfo) extends DefaultProject(info) {
|
||||||
// ------------------------------------------------------------
|
// ------------------------------------------------------------
|
||||||
// publishing
|
// publishing
|
||||||
override def managedStyle = ManagedStyle.Maven
|
override def managedStyle = ManagedStyle.Maven
|
||||||
val publishTo = Resolver.file("maven-local", new java.io.File((Path.userHome / ".m2" / "repository").toString))
|
val publishTo = Resolver.file("maven-local", Path.userHome / ".m2" / "repository" asFile)
|
||||||
|
|
||||||
// Credentials(Path.userHome / ".akka_publish_credentials", log)
|
// Credentials(Path.userHome / ".akka_publish_credentials", log)
|
||||||
val sourceArtifact = Artifact(artifactID, "src", "jar", Some("sources"), Nil, None)
|
val sourceArtifact = Artifact(artifactID, "src", "jar", Some("sources"), Nil, None)
|
||||||
// val docsArtifact = Artifact(artifactID, "docs", "jar", Some("javadoc"), Nil, None)
|
//val docsArtifact = Artifact(artifactID, "docs", "jar", Some("javadoc"), Nil, None)
|
||||||
|
|
||||||
override def packageDocsJar = defaultJarPath("-javadoc.jar")
|
override def packageDocsJar = defaultJarPath("-javadoc.jar")
|
||||||
override def packageSrcJar= defaultJarPath("-sources.jar")
|
override def packageSrcJar= defaultJarPath("-sources.jar")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue