code: public void backup(File storageDir) throws BackupException
     {
        LOG.info("Start to backup lock data");
        ObjectOutputStream out = null;
        try
        {
           File contentFile = new File(storageDir, "CacheLocks" + DBBackup.CONTENT_FILE_SUFFIX);
           out = new ObjectOutputStream(new BufferedOutputStream(PrivilegedFileHelper.fileOutputStream(contentFile)));
           
           List<LockData> locks = getLockList();
  
           out.writeInt(locks.size());
           for (LockData lockData : locks)
           {
              lockData.writeExternal(out);
           }
        }
        catch (FileNotFoundException e)
        {
           throw new BackupException(e);
        }
        catch (IOException e)
        {
           throw new BackupException(e);
        }
        finally
        {
           if (out != null)
           {
              try
              {
                 out.flush();
                 out.close();
              }
              catch (IOException e)
              {
                 LOG.error("Can't close output stream", e);
              }
           }
        }
     }
docs: {@inheritDoc}