public void saveIndexSignature(File tgt, IndexSignature sig) throws IOException { File tgtFile = new File(tgt, DirectoryManager.INDEX_DIRECTORY); DefaultDirectoryManager.saveSignature(sig, tgtFile); } public static Calendar getCalendarTime(String date) throws ParseException
public void saveIndexSignature(File tgt, IndexSignature sig) throws IOException { File tgtFile = new File(tgt, DirectoryManager.INDEX_DIRECTORY); DefaultDirectoryManager.saveSignature(sig, tgtFile); }
public void saveIndexSignature(File tgt, IndexSignature sig) throws IOException { File tgtFile = new File(tgt, DirectoryManager.INDEX_DIRECTORY); DefaultDirectoryManager.saveSignature(sig, tgtFile); }
@Override public void setVersion(String version) throws IOException { // update new index file File directoryFile = new File(_location, INDEX_DIRECTORY); IndexSignature sig = readSignature(directoryFile); sig.updateVersion(version); try { // make sure atomicity of the index publication File tmpFile = new File(_location, INDEX_DIRECTORY + ".new"); saveSignature(sig, tmpFile); File tmpFile2 = new File(_location, INDEX_DIRECTORY + ".tmp"); directoryFile.renameTo(tmpFile2); tmpFile.renameTo(directoryFile); tmpFile2.delete(); } catch (IOException e) { throw e; } }
@Override public void setVersion(String version) throws IOException { // update new index file File directoryFile = new File(_location, INDEX_DIRECTORY); IndexSignature sig = readSignature(directoryFile); sig.updateVersion(version); try { // make sure atomicity of the index publication File tmpFile = new File(_location, INDEX_DIRECTORY + ".new"); saveSignature(sig, tmpFile); File tmpFile2 = new File(_location, INDEX_DIRECTORY + ".tmp"); directoryFile.renameTo(tmpFile2); tmpFile.renameTo(directoryFile); tmpFile2.delete(); } catch (IOException e) { throw e; } }
public void setVersion(String version) throws IOException { // update new index file File directoryFile = new File(_location, INDEX_DIRECTORY); IndexSignature sig = readSignature(directoryFile); sig.updateVersion(version); try { // make sure atomicity of the index publication File tmpFile = new File(_location, INDEX_DIRECTORY + ".new"); saveSignature(sig, tmpFile); File tmpFile2 = new File(_location, INDEX_DIRECTORY + ".tmp"); directoryFile.renameTo(tmpFile2); tmpFile.renameTo(directoryFile); tmpFile2.delete(); } catch (IOException e) { throw e; } }
IndexSignature sig = new IndexSignature(null); try { DefaultDirectoryManager.saveSignature(sig, directoryFile); } catch (IOException e) { log.error(e.getMessage(), e);
IndexSignature sig = new IndexSignature(null); try { DefaultDirectoryManager.saveSignature(sig, directoryFile); } catch (IOException e) { log.error(e.getMessage(), e);
try DefaultDirectoryManager.saveSignature(sig, directoryFile);
sig = new IndexSignature(null); try { saveSignature(sig, directoryFile); } catch (IOException e) { throw e;
sig = new IndexSignature(null); try { saveSignature(sig, directoryFile); } catch (IOException e) { throw e;
try saveSignature(sig, directoryFile);