예제 #1
0
 public void run() throws Exception {
   MultiMapContainer container = getOrCreateContainer();
   recordId = container.nextId();
   MultiMapRecord record = new MultiMapRecord(recordId, isBinary() ? value : toObject(value));
   Collection<MultiMapRecord> coll =
       container.getOrCreateMultiMapWrapper(dataKey).getCollection(false);
   if (index == -1) {
     response = coll.add(record);
   } else {
     try {
       ((List<MultiMapRecord>) coll).add(index, record);
       response = true;
     } catch (IndexOutOfBoundsException e) {
       response = e;
     }
   }
 }