private void doSlotChange() {
        // first thing first - move the slot
        final I expiredSlot = currentSlot;
        try {
            currentSlot = config.getSlotSupplier().get();
        } catch (final Exception e) {
            LOG.error("Slot creation failed: {}", e.getMessage());
        }

        // compute the start time of the new slot
        final long diff = elapsedTimeMillis();
        final long numberOfExpiredSlots = diff / config.getTimeSlotSpan();
        startTime += numberOfExpiredSlots * config.getTimeSlotSpan();

        // Manage the queue of expired slots:
        // the expiredSlot must be added and older than configured slotsNumber (expired slots) must be dropped
        if (numberOfExpiredSlots > config.getSlotsNumber()) {
            // no need to keep expired slots
            queue.clear();
        } else {
            if (numberOfExpiredSlots > 1) {
                // add (numberOfExpiredSlots - 1) empty slots
                // -1 because the latest expired slot will be added as well
                try {
                    final I emptySlot = config.getSlotSupplier().get();
                    for (int i = 0; i < numberOfExpiredSlots - 1; i++) {
                        queue.add(emptySlot);
                    }
                } catch (final Exception e) {
                    LOG.error("Slot creation failed: {}", e.getMessage());
                }
            }
            queue.add(expiredSlot);
        }

        // compute the aggregated data
        data = config.getSlotsAggregator().aggregate(queue.iterator(), expiredSlot);
        if (LOG.isDebugEnabled()) {
            LOG.debug("aggregated: {}", data);
        }
    }