<commit_before><commit_msg>Add class provider<commit_after>import akka.actor.Actor
import akka.actor.Actor.Receive


object Provider {

  def apply(default : Actor) = {
  new Provider(default)
  }

}

class Provider(default : Actor) extends Actor {

  var map_ID_Actor = Map.empty[Int,Actor]
  var map_ID_Client = Map.empty[Int,Actor]

  override def receive: Receive = {

    case AddClient(id: String, client: Actor) => {
      map_ID_Actor[id] = default
      default ! AddClient(id,client)
      map_ID_Client[id] = client
    }

    case DeleteClient(id : String) => {
      default ! DeleteClient(id)
      map_ID_Actor[id] = null
      map_ID_Client[id] = null
    }

    case Command(id:  String, txt : String) =>{
      map_ID_Actor[id] ! Command(id,txt)
    }

    case ChangeActor(id: String, Actor nextActor) =>{
      nextActor ! AddClient(id,map_ID_Client[id] )
      map_ID_Actor[id] = nextActor
    }
  }


}

{'fraction_non_alphanumeric': 0.11567567567567567, 'fraction_numerical': 0.0, 'mean_word_length': 3.171171171171171, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3821392', 'n_tokens_mistral': 334, 'n_tokens_neox': 315, 'n_words': 64}