code: public DataRestore getDataRestorer(DataRestoreContext context) throws BackupException
     {
        List<LockData> locks = new ArrayList<LockData>();
  
        ObjectInputStream in = null;
        try
        {
           File contentFile = new File((File)context.getObject(DataRestoreContext.STORAGE_DIR), 
                    "CacheLocks" + DBBackup.CONTENT_FILE_SUFFIX);
  
           // it is possible that backup was created on configuration without Backupable WorkspaceLockManager class
           if (!PrivilegedFileHelper.exists(contentFile))
           {
              return new DummyDataRestore();
           }
  
           in = new ObjectInputStream(PrivilegedFileHelper.fileInputStream(contentFile));
  
           int count = in.readInt();
           for (int i = 0; i < count; i++)
           {
              LockData lockData = new LockData();
              lockData.readExternal(in);
  
              locks.add(lockData);
           }
        }
        catch (FileNotFoundException e)
        {
           throw new BackupException(e);
        }
        catch (IOException e)
        {
           throw new BackupException(e);
        }
        catch (ClassNotFoundException e)
        {
           throw new BackupException(e);
        }
        finally
        {
           if (in != null)
           {
              try
              {
                 in.close();
              }
              catch (IOException e)
              {
                 LOG.error("Can't close output stream", e);
              }
           }
        }
  
        return new CacheLocksRestore(locks);
     }
docs: {@inheritDoc}