Symbian3/PDK/Source/GUID-34E19A27-F61D-5190-8709-151523CB0BE1.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Fri, 22 Jan 2010 18:26:19 +0000
changeset 1 25a17d01db0c
child 3 46218c8b8afa
permissions -rw-r--r--
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     1
<?xml version="1.0" encoding="utf-8"?>
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     2
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     3
<!-- This component and the accompanying materials are made available under the terms of the License 
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     4
"Eclipse Public License v1.0" which accompanies this distribution, 
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     5
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     6
<!-- Initial Contributors:
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     7
    Nokia Corporation - initial contribution.
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     8
Contributors: 
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     9
-->
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    10
<!DOCTYPE concept
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    11
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    12
<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>