Thread Safe Map für JavaJava

Java-Forum
Anonymous
 Thread Safe Map für Java

Post by Anonymous »

Ich brauche eine Thread -Safe -Karte, ich habe so etwas: (Ich bin sehr neu in Java) < /p>

Code: Select all

 public static class Manager
{
static
{
//something wrong here, doesn't compile
list = new java.util.Collections
.synchronizedMap(new Map());
}

static Map list;

public static void AddClient(Client client)
{
// thread safe add client to the list
}

public static void RemoveClient(Client client)
{
// thread safe remove client to the list
}

}

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post