Ejemplo n.º 1
0
 /** Armazenamento de cache em disco. */
 public static synchronized void store() {
   if (OWNER_CHANGED) {
     try {
       long time = System.currentTimeMillis();
       File file = new File("owner.map");
       FileOutputStream outputStream = new FileOutputStream(file);
       try {
         SerializationUtils.serialize(OWNER_MAP, outputStream);
         // Atualiza flag de atualização.
         OWNER_CHANGED = false;
       } finally {
         outputStream.close();
       }
       Server.logStore(time, file);
     } catch (Exception ex) {
       Server.logError(ex);
     }
   }
 }