use of com.tvd12.calabash.persist.action.PersistAction in project calabash by youngmonkeys.
the class SimpleEntityMapPersistExecutor method addPersistActionToQueue.
protected void addPersistActionToQueue(EntityMapSetting setting, PersistAction action) {
String mapName = setting.getMapName();
EntityMapPersistSetting persistSetting = setting.getPersistSetting();
long writeDelay = persistSetting.getWriteDelay();
PersistActionQueue queue = writeDelay > 0 ? actionQueueManager.getDelayedQueue(mapName) : actionQueueManager.getImmediateQueue(mapName);
queue.add(action);
}
use of com.tvd12.calabash.persist.action.PersistAction in project calabash by youngmonkeys.
the class PersistDeleteActionBulk method execute.
@Override
public void execute() {
Set<Object> keys = new HashSet<>();
for (PersistAction action : actions) {
if (action.getType() == PersistActionType.DELETE_ONE) {
keys.add(((PersistDeleteOneAction) action).getKey());
} else {
keys.addAll(((PersistDeleteManyAction) action).getKeys());
}
}
((EntityMapPersist) mapPersist).delete(keys);
}
Aggregations