(String clustername)
| 97 | } |
| 98 | |
| 99 | protected List<PingData> readAll(String clustername) { |
| 100 | if(clustername == null) |
| 101 | return null; |
| 102 | |
| 103 | List<PingData> retval=new ArrayList<PingData>(); |
| 104 | try { |
| 105 | ListBucketResponse rsp=conn.listBucket(location, clustername, null, null, null); |
| 106 | if(rsp.entries != null) { |
| 107 | for(Iterator<ListEntry> it=rsp.entries.iterator(); it.hasNext();) { |
| 108 | ListEntry key=it.next(); |
| 109 | GetResponse val=conn.get(location, key.key, null); |
| 110 | if(val.object != null) { |
| 111 | byte[] buf=val.object.data; |
| 112 | if(buf != null) { |
| 113 | try { |
| 114 | PingData data=(PingData)Util.objectFromByteBuffer(buf); |
| 115 | retval.add(data); |
| 116 | } |
| 117 | catch(Exception e) { |
| 118 | log.error("failed marshalling buffer to address", e); |
| 119 | } |
| 120 | } |
| 121 | } |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | return retval; |
| 126 | } |
| 127 | catch(IOException ex) { |
| 128 | log.error("failed reading addresses", ex); |
| 129 | return retval; |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | |
| 134 | protected void writeToFile(PingData data, String clustername) { |
nothing calls this directly
no test coverage detected