protected int findPrevMatch(BinaryIdContentPair oldPair, ArrayList<BinaryIdContentPair> bucket) { if (bucket == null) return -1; for (int x = bucket.size(); --x >= 0;) { BinaryIdContentPair pair = bucket.get(x); if (pair.getContent().equals(oldPair.getContent())) return locationTable.get(pair.getId()); } return -1; }
public int processBinarySavable(Savable object) throws IOException { if (object == null) { return -1; } Class<? extends Savable> clazz = object.getClass(); BinaryClassObject bco = classes.get(object.getClass().getName()); // is this class been looked at before? in tagTable? if (bco == null) { bco = createClassObject(object.getClass()); } // is object in contentTable? if (contentTable.get(object) != null) { return (contentTable.get(object).getId()); } BinaryIdContentPair newPair = generateIdContentPair(bco); BinaryIdContentPair old = contentTable.put(object, newPair); if (old == null) { contentKeys.add(object); } object.write(this); newPair.getContent().finish(); return newPair.getId(); }
protected int findPrevMatch(BinaryIdContentPair oldPair, ArrayList<BinaryIdContentPair> bucket) { if (bucket == null) return -1; for (int x = bucket.size(); --x >= 0;) { BinaryIdContentPair pair = bucket.get(x); if (pair.getContent().equals(oldPair.getContent())) return locationTable.get(pair.getId()); } return -1; }
protected int findPrevMatch(BinaryIdContentPair oldPair, ArrayList<BinaryIdContentPair> bucket) { if (bucket == null) return -1; for (int x = bucket.size(); --x >= 0;) { BinaryIdContentPair pair = bucket.get(x); if (pair.getContent().equals(oldPair.getContent())) return locationTable.get(pair.getId()); } return -1; }
public int processBinarySavable(Savable object) throws IOException { if (object == null) { return -1; } Class<? extends Savable> clazz = object.getClass(); BinaryClassObject bco = classes.get(object.getClass().getName()); // is this class been looked at before? in tagTable? if (bco == null) { bco = createClassObject(object.getClass()); } // is object in contentTable? if (contentTable.get(object) != null) { return (contentTable.get(object).getId()); } BinaryIdContentPair newPair = generateIdContentPair(bco); BinaryIdContentPair old = contentTable.put(object, newPair); if (old == null) { contentKeys.add(object); } object.write(this); newPair.getContent().finish(); return newPair.getId(); }
public int processBinarySavable(Savable object) throws IOException { if (object == null) { return -1; } Class<? extends Savable> clazz = object.getClass(); BinaryClassObject bco = classes.get(object.getClass().getName()); // is this class been looked at before? in tagTable? if (bco == null) { bco = createClassObject(object.getClass()); } // is object in contentTable? if (contentTable.get(object) != null) { return (contentTable.get(object).getId()); } BinaryIdContentPair newPair = generateIdContentPair(bco); BinaryIdContentPair old = contentTable.put(object, newPair); if (old == null) { contentKeys.add(object); } object.write(this); newPair.getContent().finish(); return newPair.getId(); }