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>
|
||||
*/
|
||||
object TransactionalRef {
|
||||
|
|
@ -67,6 +78,15 @@ object TransactionalRef {
|
|||
|
||||
/**
|
||||
* 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.
|
||||
* Alias to Ref.
|
||||
*
|
||||
* @author <a href="http://jonasboner.com">Jonas Bonér</a>
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -87,8 +87,9 @@ trait ChatStorage extends Actor
|
|||
*/
|
||||
class RedisChatStorage extends ChatStorage {
|
||||
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...")
|
||||
|
||||
|
|
@ -106,7 +107,7 @@ class RedisChatStorage extends ChatStorage {
|
|||
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,7 +127,7 @@ class AkkaParent(info: ProjectInfo) extends DefaultProject(info) {
|
|||
// ------------------------------------------------------------
|
||||
// publishing
|
||||
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)
|
||||
val sourceArtifact = Artifact(artifactID, "src", "jar", Some("sources"), Nil, None)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue