You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.1 KiB
55 lines
1.1 KiB
package com.platform.utils;
|
|
|
|
import java.util.List;
|
|
|
|
import com.platform.entities.FolderNode;
|
|
import com.platform.entities.VolumeDataEntity;
|
|
|
|
/** 存储gfs服务的 volume信息和目录结构
|
|
* @author chen
|
|
*
|
|
*/
|
|
public class CacheTreeData {
|
|
|
|
/**
|
|
* 所有目录
|
|
*/
|
|
private static List<FolderNode> folders = null;
|
|
|
|
/**
|
|
* 所有 volume
|
|
*/
|
|
private static List<VolumeDataEntity> volumeList = null;
|
|
|
|
/** 获得所有目录
|
|
* @return
|
|
*/
|
|
public static List<FolderNode> getFolders() {
|
|
return folders;
|
|
}
|
|
|
|
/** 重置所有的目录
|
|
* @param folders
|
|
*/
|
|
public synchronized static void setFolders(List<FolderNode> folders) {
|
|
CacheTreeData.folders = folders;
|
|
}
|
|
|
|
/** 获得 所有的 volume
|
|
* @return the volumeList
|
|
*/
|
|
public static List<VolumeDataEntity> getVolumeList() {
|
|
return volumeList;
|
|
}
|
|
|
|
/** 重置所有的 volume
|
|
* @param volumeList the volumeList to set
|
|
*/
|
|
public synchronized static void setVolumeList(List<VolumeDataEntity> volumeList) {
|
|
CacheTreeData.volumeList = volumeList;
|
|
}
|
|
|
|
}
|
|
|
|
|