MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / remove

Method remove

samples/JGroups/src/S3_PING.java:152–167  ·  view source on GitHub ↗
(String clustername, Address addr)

Source from the content-addressed store, hash-verified

150
151
152 protected void remove(String clustername, Address addr) {
153 if(clustername == null || addr == null)
154 return;
155 String filename=addr instanceof org.jgroups.util.UUID? ((org.jgroups.util.UUID)addr).toStringLong() : addr.toString();
156 String key=clustername + "/" + filename;
157 try {
158 Map headers=new TreeMap();
159 headers.put("Content-Type", Arrays.asList("text/plain"));
160 conn.delete(location, key, headers).connection.getResponseMessage();
161 if(log.isTraceEnabled())
162 log.trace("removing " + location + "/" + key);
163 }
164 catch(Exception e) {
165 log.error("failure removing data", e);
166 }
167 }
168
169
170

Callers 1

runMethod · 0.95

Calls 4

putMethod · 0.65
toStringMethod · 0.45
deleteMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected