Class DeleteServiceImpl

java.lang.Object
ch.tocco.nice2.persist.entity.impl.delete.DeleteServiceImpl
All Implemented Interfaces:
DeleteService

@Component public class DeleteServiceImpl extends Object implements DeleteService
  • Field Details

    • DELETE_LIMIT

      public static final int DELETE_LIMIT
      We can't delete too many entities at once, because the deletion is executed in a single transaction which would consume too much heap space if it contained too many entities. It is difficult to predict how many entities we could delete in a single request, because in this limit isn't represented whatever some listeners might do when triggered and, thus, it isn't the same for all entity models. This limit of 10k is derived by deleting `Membership` entities and measuring memory usage for it -> A total of 10k entities (including related entities, not only Membership entities) already takes up about 300M of the heap space. We shouldn't go higher than that (e.g. a limit of 20k in this constellation already leads to OOM and a crash for a Nice instance with a total memory of 1G).
      See Also:
  • Constructor Details

  • Method Details