package com.platform.utils; import java.util.List; import com.platform.entities.FolderNode; import com.platform.glusterfs.GetTreeData; import com.platform.glusterfs.VolumeInfo; public class VolumeThread extends Thread implements Runnable{ /** * 挂载点路径 */ private static String pointPath = "/home"; public VolumeThread() { // TODO Auto-generated constructor stub } public VolumeThread(String path) { if (null != path && !"".equals(path.trim())) { VolumeThread.pointPath = path; } } /** gfs目录树形展示 */ private GetTreeData gfsTree = new GetTreeData(); @Override public void run() { super.run(); while(true){ FolderNode folders = gfsTree.getDatas(pointPath); //TODO CacheTreeData.setFolders(folders); try { Thread.sleep(Constant.get_volume_sleep_time); } catch (InterruptedException e) { } } } public static String getPointPath() { return pointPath; } public static void setPointPath(String pointPath) { VolumeThread.pointPath = pointPath; } }