week 10 bug fix submission (SF PDK version): Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License
"Eclipse Public License v1.0" which accompanies this distribution,
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
Nokia Corporation - initial contribution.
Contributors:
-->
<!DOCTYPE concept
PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept xml:lang="en" id="GUID-34E19A27-F61D-5190-8709-151523CB0BE1"><title>Reclamation and compaction, incrementally</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>Both space reclamation and compaction can be done incrementally, i.e. broken down into smaller steps. This allows an application to alternate reclamation and compaction with other processing and remain responsive to other events.</p> <p>To do this, construct an object of type <codeph>RStoreReclaim</codeph> and call:</p> <ul><li id="GUID-4C8737BC-BCEA-5D06-9F31-5E823EE39C46"><p><codeph>RStoreReclaim::OpenL()</codeph> or <codeph>RStoreReclaim::OpenLC()</codeph> to prepare the <codeph>RStoreReclaim</codeph> object to perform space reclamation.</p> </li> <li id="GUID-49C343FC-1C3F-5D92-A846-FC65EBEBDFA8"><p><codeph>RStoreReclaim::CompactL()</codeph> or <codeph>RStoreReclaim::CompactLC()</codeph> to prepare the <codeph>RStoreReclaim</codeph> object to perform compaction.</p> </li> </ul> <p>Each stage of space reclamation and compaction is performed or initiated by calling the appropriate variant of <codeph>RStoreReclaim::Next()</codeph> or <codeph>RStoreReclaim::NextL()</codeph>. The class provides both synchronous and asynchronous variants of these two functions. The asynchronous versions initiate the next stage of space reclamation and compaction.</p> <p>At any time during space reclamation or compaction, the <codeph>RStoreReclaim::Available()</codeph> returns a running total of free space discovered so far.</p> <p>Compaction and normal access to the store interact in the following ways:</p> <ul><li id="GUID-CE0ADA7E-0790-55A6-B9E3-4A237DACEE1E"><p>if a compaction step is in progress, committing the store causes the compaction step to be abandoned and to complete or leave with <codeph>KErrNotReady</codeph>. All subsequent attempts to initiate a compaction step, complete or leave with <codeph>KErrNotReady</codeph>. Compaction can be restarted by first doing a reset, i.e. by calling <codeph>ResetL()</codeph>.</p> </li> <li id="GUID-86F776A3-D1C0-55DB-A365-C085BFEFA28F"><p>a compaction step which needs to physically move a stream, completes or leaves with <codeph>KErrInUse</codeph>, if any stream within the store is open. The stream must be closed before initiating another compaction step.</p> </li> </ul> <p>Once compaction is complete, the store must be committed.</p> <p>Doing an incremental space reclamation or compaction asynchronously requires the use of active objects. </p> <section><title>See also</title> <p><xref href="GUID-6EE0CB66-A759-5E0C-884D-90895F35F267.dita">Transactions</xref> </p> <p><xref href="GUID-C2608BF5-CDA7-530A-B67A-0414C7FA585D.dita">High level asynchronous service handling</xref> </p> </section> </conbody></concept>