# PSF-LoginServer - master - net.psforever.services.account.AccountPersistenceService
PSF - LoginServer - master - net.psforever.services.account.AccountPersistenceService
Keywords: PSF LoginServer master net.psforever.services.account.AccountPersistenceService

PSF-LoginServer - master < Back


# Packages

-  package root
  Definition Classes
    root
-  package net
  Definition Classes
    root
-  package psforever
  Definition Classes
    net
-  package services
  Definition Classes
    psforever
-  package account
  Definition Classes
    services
- AccountIntermediaryService
- AccountPersistenceService
- IPAddress
- PersistenceMonitor
- PlayerToken
- ReceiveAccountData
- ReceiveIPAddress
- RetrieveAccountData
- RetrieveIPAddress
- StoreAccountData
- StoreIPAddress

c

net.psforever.services.account

# AccountPersistenceService 

###
Companion object AccountPersistenceService

#### class AccountPersistenceService extends Actor

A global service that manages user behavior as divided into the following three categories: persistence (ongoing participation in the game world), relogging (short-term client connectivity issue resolution), and logout (end-of-life conditions involving the separation of a user from the game world).
A user polls this service and the service either creates a new `PersistenceMonitor` entity or returns whatever `PersistenceMonitor` entity currently exists. Performing informative updates to the monitor about the user's eventual player avatar instance (which can be performed by messaging the service indirectly, though sending directly to the monitor is recommended) facilitate the management of persistence. If connectivity issues with the client are encountered by the user, within a reasonable amount of time to connection restoration, the user may regain control of their existing persistence monitor and, thus, the same player avatar. End of life is mainly managed by the monitors internally and the monitors only communicate up to this service when executing their "end-of-life" operations.

Source
  AccountPersistenceService.scala

Linear Supertypes
Actor, AnyRef, Any

Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. AccountPersistenceService
2. Actor
3. AnyRef
4. Any

1. Hide All
2. Show All

Visibility

1. Public
2. Protected

### Instance Constructors

1.  new AccountPersistenceService()

### Type Members

1.  type Receive = PartialFunction[Any, Unit]
   Definition Classes
     Actor

### Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##: Int
   Definition Classes
     AnyRef → Any
3.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
4.  def CreateNewPlayerToken(name: String): ActorRef

   Enqueue a new persistency monitor object for this player.

   Enqueue a new persistency monitor object for this player.

   name

     the unique name of the player

   returns

     the persistence monitor object

5.  def NextPlayerIndex(name: String): Int

   Get the next account unique login index.

   Get the next account unique login index. The index suggests the number of times the player has logged into the game. The main purpose is to give each player a meaninfgul ordinal number of logging agencies whose names did not interfere with each other (`Actor` name uniqueness).

   name

     the text personal descriptor used by the player

   returns

     the next index for this player, starting at 0

6.  val Setup: Receive

   Process the system event service hooks when they arrive, before starting proper persistence monitoring.

   Process the system event service hooks when they arrive, before starting proper persistence monitoring.

   See also

     `ServiceManager.LookupResult`

7.  val Started: Receive

   Entry point for persistence monitoring setup.

   Entry point for persistence monitoring setup. Primarily intended to deal with the initial condition of verifying/assuring of an enqueued persistence monitor. Updates to persistence can be received and will be distributed, if possible; but, updating should be reserved for individual persistence monitor callback (by the user who is being monitored).

8.  val accounts: Map[String, ActorRef]

   an association of user test descriptors - player names - and their current monitor
   key - player name, value - player monitor

9.  def aroundPostRestart(reason: Throwable): Unit
   Attributes
     protected[akka]
   Definition Classes
     Actor
   Annotations
     @InternalApi()
10.  def aroundPostStop(): Unit
    Attributes
      protected[akka]
    Definition Classes
      Actor
    Annotations
      @InternalApi()
11.  def aroundPreRestart(reason: Throwable, message: Option[Any]): Unit
    Attributes
      protected[akka]
    Definition Classes
      Actor
    Annotations
      @InternalApi()
12.  def aroundPreStart(): Unit
    Attributes
      protected[akka]
    Definition Classes
      Actor
    Annotations
      @InternalApi()
13.  def aroundReceive(receive: akka.actor.Actor.Receive, msg: Any): Unit
    Attributes
      protected[akka]
    Definition Classes
      Actor
    Annotations
      @InternalApi()
14.  final def asInstanceOf[T0]: T0
    Definition Classes
      Any
15.  def clone(): AnyRef
    Attributes
      protected[lang]
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.CloneNotSupportedException]) @native()
16.  implicit val context: ActorContext
    Definition Classes
      Actor
17.  final def eq(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
18.  def equals(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef → Any
19.  def finalize(): Unit
    Attributes
      protected[lang]
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.Throwable])
20.  final def getClass(): Class[_ <: AnyRef]
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
21.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
22.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
23.  val log: Logger

    log, for trace and warnings only

24.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
25.  final def notify(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
26.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
27.  def postRestart(reason: Throwable): Unit
    Definition Classes
      Actor
    Annotations
      @throws(classOf[java.lang.Exception])
28.  def postStop(): Unit
    Definition Classes
      AccountPersistenceService → Actor
29.  def preRestart(reason: Throwable, message: Option[Any]): Unit
    Definition Classes
      Actor
    Annotations
      @throws(classOf[java.lang.Exception])
30.  def preStart(): Unit

    Retrieve the required system event service hooks.

    Retrieve the required system event service hooks.

    Definition Classes
      AccountPersistenceService → Actor
    See also

      `ServiceManager.LookupResult`

31.  def receive: Receive
    Definition Classes
      AccountPersistenceService → Actor
32.  implicit final val self: ActorRef
    Definition Classes
      Actor
33.  final def sender(): ActorRef
    Definition Classes
      Actor
34.  var squad: ActorRef

    squad service event hook

35.  def supervisorStrategy: SupervisorStrategy
    Definition Classes
      Actor
36.  final def synchronized[T0](arg0: => T0): T0
    Definition Classes
      AnyRef
37.  def toString(): String
    Definition Classes
      AnyRef → Any
38.  def unhandled(message: Any): Unit
    Definition Classes
      Actor
39.  var userIndices: Map[String, Int]

    an association of user text descriptors - player names - and their current monitor indices
    key - player name, value - monitor index

40.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException])
41.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException])
42.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException]) @native()

### Inherited from Actor

### Inherited from AnyRef

### Inherited from Any

### Ungrouped