private void loadPartitions(File partitionsFile) { this.partitions = readObject(partitionsFile); if (this.partitions == null) { if (isDebugEnabled()) { FILE_STORE_LOGGER.debugf("No partitions to load from %s", partitionsFile.getPath()); } this.partitions = new ConcurrentHashMap<String, FilePartition>(); } else { if (isDebugEnabled()) { FILE_STORE_LOGGER.debugf("Loading [%s] Partition(s) from %s", this.partitions.size(), partitionsFile.getPath()); } Set<Entry<String, FilePartition>> entrySet = this.partitions.entrySet(); for (Entry<String, FilePartition> entry : entrySet) { initPartition(entry.getKey()); } } }
private void loadPartitions(File partitionsFile) { this.partitions = readObject(partitionsFile); if (this.partitions == null) { if (isDebugEnabled()) { FILE_STORE_LOGGER.debugf("No partitions to load from %s", partitionsFile.getPath()); } this.partitions = new ConcurrentHashMap<String, FilePartition>(); } else { if (isDebugEnabled()) { FILE_STORE_LOGGER.debugf("Loading [%s] Partition(s) from %s", this.partitions.size(), partitionsFile.getPath()); } Set<Entry<String, FilePartition>> entrySet = this.partitions.entrySet(); for (Entry<String, FilePartition> entry : entrySet) { initPartition(entry.getKey()); } } }
private void init() { initWorkingDirectory(); File partitionsFile = createFileIfNotExists(getWorkingDirFile(PARTITIONS_FILE_NAME)); loadPartitions(partitionsFile); Map<String, Map<String, FileRelationship>> relationships = readObject(createFileIfNotExists(getWorkingDirFile(RELATIONSHIPS_FILE_NAME))); if (relationships == null) { relationships = new ConcurrentHashMap<String, Map<String, FileRelationship>>(); } this.relationships = relationships; Map<String, FileAttribute> attributes = readObject(createFileIfNotExists(getWorkingDirFile(ATTRIBUTES_FILE_NAME))); if (attributes == null) { attributes = new ConcurrentHashMap<String, FileAttribute>(); } this.attributes = attributes; Map<String, FileAttributedType> attrubtedTypes = readObject(createFileIfNotExists(getWorkingDirFile(ATTRIBUTED_TYPES__FILE_NAME))); if (attrubtedTypes == null) { attrubtedTypes = new ConcurrentHashMap<String, FileAttributedType>(); } this.attributedTypes = attrubtedTypes; if (this.configuration.isAsyncWrite()) { FILE_STORE_LOGGER.fileAsyncWriteEnabled(this.configuration.getAsyncThreadPool()); this.executorService = Executors.newFixedThreadPool(this.configuration.getAsyncThreadPool()); } }
private void init() { initWorkingDirectory(); File partitionsFile = createFileIfNotExists(getWorkingDirFile(PARTITIONS_FILE_NAME)); loadPartitions(partitionsFile); Map<String, Map<String, FileRelationship>> relationships = readObject(createFileIfNotExists(getWorkingDirFile(RELATIONSHIPS_FILE_NAME))); if (relationships == null) { relationships = new ConcurrentHashMap<String, Map<String, FileRelationship>>(); } this.relationships = relationships; Map<String, FileAttribute> attributes = readObject(createFileIfNotExists(getWorkingDirFile(ATTRIBUTES_FILE_NAME))); if (attributes == null) { attributes = new ConcurrentHashMap<String, FileAttribute>(); } this.attributes = attributes; Map<String, FileAttributedType> attrubtedTypes = readObject(createFileIfNotExists(getWorkingDirFile(ATTRIBUTED_TYPES__FILE_NAME))); if (attrubtedTypes == null) { attrubtedTypes = new ConcurrentHashMap<String, FileAttributedType>(); } this.attributedTypes = attrubtedTypes; if (this.configuration.isAsyncWrite()) { FILE_STORE_LOGGER.fileAsyncWriteEnabled(this.configuration.getAsyncThreadPool()); this.executorService = Executors.newFixedThreadPool(this.configuration.getAsyncThreadPool()); } }
Map<String, Map<String, FileIdentityType>> identityTypes = readObject(agentsFile); Map<String, Map<String, List<FileCredentialStorage>>> credentials = readObject(credentialsFile); Map<String, List<FilePermission>> permissions = readObject(permissionsFile);
Map<String, Map<String, FileIdentityType>> identityTypes = readObject(agentsFile); Map<String, Map<String, List<FileCredentialStorage>>> credentials = readObject(credentialsFile); Map<String, List<FilePermission>> permissions = readObject(permissionsFile);