Beispiel #1
0
 private Core getCoreBySchema(Schema schema)
 {
     List<Core> cores = coreMap[schema.GetId()];
     foreach (Core core in cores)
     {
         Schema temp = core.getSchema();
         if (temp == schema)
         {
             return core;
         }
     }
     return null;
 }
Beispiel #2
0
 public void logoutFromSchema(Schema schema)
 {
     Core core = getCoreBySchema(schema);
     List<Core> cores = coreMap[schema.GetId()];
     if (cores != null)
     {
         cores.Remove(core);
     }
     List<Schema> schemas = schemaMap[schema.GetId()];
     if (schemas != null)
     {
         schemas.Remove(schema);
     }
     SessionMetaData sessionMetaData = core.getSessionMetaData();
     Command command = commandBuilder.buildLogoutCommand(sessionMetaData.GetSessionId(), sessionMetaData.getSchemaId(), key);
     distributionManager.produceTcp(command);
     core.close();
 }