Esempio n. 1
0
 public long getHighestPossibleIdInUse(Class<?> clazz) {
   Store store = idGenerators.get(clazz);
   if (store == null) {
     throw new IdGenerationFailedException("No IdGenerator for: " + clazz);
   }
   return store.getHighestPossibleIdInUse();
 }
Esempio n. 2
0
 public long getNumberOfIdsInUse(Class<?> clazz) {
   Store store = idGenerators.get(clazz);
   if (store == null) {
     throw new IdGenerationFailedException("No IdGenerator for: " + clazz);
   }
   return store.getNumberOfIdsInUse();
 }
Esempio n. 3
0
  public long nextId(Class<?> clazz) {
    Store store = idGenerators.get(clazz);

    if (store == null) {
      throw new IdGenerationFailedException("No IdGenerator for: " + clazz);
    }
    return store.nextId();
  }