/** * Removes key in all nodes in the cluster, both from their local hashmaps and L1 caches * @param key The key, needs to be serializable */ @ManagedOperation public void remove(K key) { remove(key, false); // by default we use asynchronous removals }
public void remove(String path, boolean synchronous) { if(path == null) return; GridFile.Metadata md=metadata.get(path); if(md == null) return; int num_chunks=md.getLength() / md.getChunkSize() + 1; for(int i=0; i < num_chunks; i++) data.remove(path + ".#" + i, synchronous); } }
key=(String)model.getValueAt(row, 0); if(key != null) cache.remove(key);
public boolean delete(boolean synchronous) { if(!exists()) return false; if(isFile()) { fs.remove(getPath(), synchronous); // removes all the chunks belonging to the file cache.remove(getPath(), synchronous); // removes the metadata information return true; } if(isDirectory()) { File[] files=listFiles(); if(files != null && files.length > 0) return false; fs.remove(getPath(), synchronous); // removes all the chunks belonging to the file cache.remove(getPath(), synchronous); // removes the metadata information } return true; }
/** * Removes key in all nodes in the cluster, both from their local hashmaps and L1 caches * @param key The key, needs to be serializable */ @ManagedOperation public void remove(K key) { remove(key, false); // by default we use asynchronous removals }
public void remove(String path, boolean synchronous) { if(path == null) return; GridFile.Metadata md=metadata.get(path); if(md == null) return; int num_chunks=md.getLength() / md.getChunkSize() + 1; for(int i=0; i < num_chunks; i++) data.remove(path + ".#" + i, synchronous); } }
key=(String)model.getValueAt(row, 0); if(key != null) cache.remove(key);
public boolean delete(boolean synchronous) { if(!exists()) return false; if(isFile()) { fs.remove(getPath(), synchronous); // removes all the chunks belonging to the file cache.remove(getPath(), synchronous); // removes the metadata information return true; } if(isDirectory()) { File[] files=listFiles(); if(files != null && files.length > 0) return false; fs.remove(getPath(), synchronous); // removes all the chunks belonging to the file cache.remove(getPath(), synchronous); // removes the metadata information } return true; }