/** * Converts any string into a string that is safe to use as a file name. The * result will only include ascii characters and numbers, and the "-","_", * and "." characters. * * @param name * @return safe name of the directory */ public static String toFileSystemDirectorySafeName(String name) { return toFileSystemSafeName(name, true, MAX_DIR_NAME_LENGTH); }
public static String toFileSystemSafeName(String name) { return toFileSystemSafeName(name, false, MAX_FILE_NAME_LENGTH); }
private File getMainPageFile() { return new File(directory, IOHelper.toFileSystemSafeName(name) + PAGEFILE_SUFFIX); }
public File getFreeFile() { return new File(directory, IOHelper.toFileSystemSafeName(name) + FREE_FILE_SUFFIX); }
public File getRecoveryFile() { return new File(directory, IOHelper.toFileSystemSafeName(name) + RECOVERY_FILE_SUFFIX); }
protected File getTempFile() { if (txFile == null) { txFile = new File(getPageFile().getDirectory(), IOHelper.toFileSystemSafeName("tx-" + Long.toString(getWriteTransactionId()) + "-" + Long.toString(System.currentTimeMillis()) + ".tmp")); } return txFile; }
public static String nameFromDestinationFilter(ActiveMQDestination destination) { if (destination.getQualifiedName().length() > IOHelper.getMaxFileNameLength()) { LOG.warn("Destination name is longer than 'MaximumFileNameLength' system property, " + "potential problem with recovery can result from name truncation."); } return IOHelper.toFileSystemSafeName(destination.getQualifiedName()); }
/** * Converts any string into a string that is safe to use as a file name. The * result will only include ascii characters and numbers, and the "-","_", * and "." characters. * * @param name * @return safe name of the directory */ public static String toFileSystemDirectorySafeName(String name) { return toFileSystemSafeName(name, true, MAX_DIR_NAME_LENGTH); }
/** * Converts any string into a string that is safe to use as a file name. The * result will only include ascii characters and numbers, and the "-","_", * and "." characters. * * @param name * @return safe name of the directory */ public static String toFileSystemDirectorySafeName(String name) { return toFileSystemSafeName(name, true, MAX_DIR_NAME_LENGTH); }
/** * Converts any string into a string that is safe to use as a file name. * The result will only include ascii characters and numbers, and the "-","_", and "." characters. * * @param name * @return */ public static String toFileSystemDirectorySafeName(String name) { return toFileSystemSafeName(name, true, MAX_DIR_NAME_LENGTH); }
/** * Converts any string into a string that is safe to use as a file name. The * result will only include ascii characters and numbers, and the "-","_", * and "." characters. * * @param name * @return safe name of the directory */ public static String toFileSystemDirectorySafeName(String name) { return toFileSystemSafeName(name, true, MAX_DIR_NAME_LENGTH); }
protected void openIndexFile() throws IOException { if (indexFile == null) { file = new File(directory, NAME_PREFIX + IOHelper.toFileSystemSafeName(name)); IOHelper.mkdirs(file.getParentFile()); indexFile = new RandomAccessFile(file, "rw"); } }
private void openIndexFile() throws IOException { if (indexFile == null) { file = new File(directory, NAME_PREFIX + IOHelper.toFileSystemSafeName(name)); IOHelper.mkdirs(file.getParentFile()); indexFile = new RandomAccessFile(file, "rw"); } }
/** * @return the dataDirectory */ public File getDataDirectory() { if (this.dataDirectory == null) { this.dataDirectory = new File(IOHelper.getDefaultDataDirectory(), IOHelper.toFileSystemSafeName(brokerName)); } return this.dataDirectory; }
protected File getTempFile() { if (txFile == null) { txFile = new File(getPageFile().getDirectory(), IOHelper.toFileSystemSafeName("tx-" + Long.toString(getWriteTransactionId()) + "-" + Long.toString(System.currentTimeMillis()) + ".tmp")); } return txFile; }
protected File getTempFile() { if (txFile == null) { txFile = new File(getPageFile().getDirectory(), IOHelper.toFileSystemSafeName("tx-" + Long.toString(getWriteTransactionId()) + "-" + Long.toString(System.currentTimeMillis()) + ".tmp")); } return txFile; }
protected File getTempFile() { if (txFile == null) { txFile = new File(getPageFile().getDirectory(), IOHelper.toFileSystemSafeName("tx-" + Long.toString(getWriteTransactionId()) + "-" + Long.toString(System.currentTimeMillis()) + ".tmp")); } return txFile; }
public static String nameFromDestinationFilter(ActiveMQDestination destination) { if (destination.getQualifiedName().length() > IOHelper.getMaxFileNameLength()) { LOG.warn("Destination name is longer than 'MaximumFileNameLength' system property, " + "potential problem with recovery can result from name truncation."); } return IOHelper.toFileSystemSafeName(destination.getQualifiedName()); }
public static String nameFromDestinationFilter(ActiveMQDestination destination) { if (destination.getQualifiedName().length() > IOHelper.getMaxFileNameLength()) { LOG.warn("Destination name is longer than 'MaximumFileNameLength' system property, " + "potential problem with recovery can result from name truncation."); } return IOHelper.toFileSystemSafeName(destination.getQualifiedName()); }
public static String nameFromDestinationFilter(ActiveMQDestination destination) { if (destination.getQualifiedName().length() > IOHelper.getMaxFileNameLength()) { LOG.warn("Destination name is longer than 'MaximumFileNameLength' system property, " + "potential problem with recovery can result from name truncation."); } return IOHelper.toFileSystemSafeName(destination.getQualifiedName()); }