@Override public void writeToDisk() { if (this.diskRegion == null) { DataPolicy dp = getDataPolicy(); if (dp.isEmpty()) { throw new IllegalStateException( String.format("Cannot write a region with data-policy %s to disk.", dp)); } else if (!dp.withPersistence() && !isOverflowEnabled()) { throw new IllegalStateException( "Cannot write a region that is not configured to access disks."); } } else { this.diskRegion.asynchForceFlush(); } }