## Apache Zeta Components Manual :: File Source for meta_data_storage.php

## Source for file meta_data_storage.php

Documentation is available at meta_data_storage.php

1. <?php
2. /**
3. * File containing the ezcCacheStackMetaDataStorage interface.
4. *
5. * Licensed to the Apache Software Foundation (ASF) under one
6. * or more contributor license agreements. See the NOTICE file
7. * distributed with this work for additional information
8. * regarding copyright ownership. The ASF licenses this file
9. * to you under the Apache License, Version 2.0 (the
10. * "License"); you may not use this file except in compliance
11. * with the License. You may obtain a copy of the License at
12. *
13. * http://www.apache.org/licenses/LICENSE-2.0
14. *
15. * Unless required by applicable law or agreed to in writing,
16. * software distributed under the License is distributed on an
17. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18. * KIND, either express or implied. See the License for the
19. * specific language governing permissions and limitations
20. * under the License.
21. *
22. * @package Cache
23. * @version //autogentag//
24. * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
25. * @filesource
26. */
28. /**
29. * Interface that must be implemented by stack meta data storages.
30. *
31. * If a storage is capable to store meta data used by an {@link ezcCacheStack},
32. * it must implement this interface. Beside the store and restore methods for
33. * the meta data itself, it must implement methods to lock and unlock the
34. * complete storage, to ensure that meta data is kept consistent and not
35. * affected by race conditions of concurring requests.
36. *
37. * @package Cache
38. * @version //autogentag//
39. */
40. interface ezcCacheStackMetaDataStorage
41. {
42. /**
43. * Restores and returns the meta data struct.
44. *
45. * This method fetches the meta data stored in the storage and returns the
46. * according object implementing {@link ezcCacheStackMetaData}, that was
47. * stored using {@link storeMetaData()}. The meta data must be stored
48. * inside the storage, but should not be visible as normal cache items to
49. * the user. If no meta data is found, null must be returned.
50. *
51. * @return ezcCacheStackMetaData|null
52. */
53. public function restoreMetaData ();
55. /**
56. * Stores the given meta data struct.
57. *
58. * This method stores the given $metaData inside the storage. The data must
59. * be stored with the same mechanism that the storage itself uses. However,
60. * it should not be stored as a normal cache item, if possible, to avoid
61. * accedental user manipulation. The class of $metaData must be stored in
62. * addition, to reconstruct the correct {@link ezcCacheStackMetaData}
63. * implementing class on {@link restoreMetaData}.
64. *
65. * @param ezcCacheStackMetaData $metaData
66. */
67. public function storeMetaData ( ezcCacheStackMetaData $metaData );
69. /**
70. * Acquire a lock on the storage.
71. *
72. * This method acquires a lock on the storage. If locked, the storage must
73. * block all other method calls until the lock is freed again using {@link }
74. * ezcCacheStackMetaDataStorage::unlock()}. Methods that are called within
75. * the request that successfully acquired the lock must succeed as usual.
76. *
77. * @return void
78. */
79. public function lock ();
81. /**
82. * Release a lock on the storage.
83. *
84. * This method releases the lock of the storage, that has been acquired via
85. * {@link ezcCacheStackMetaDataStorage::lock()}. After this method has been
86. * called, blocked method calls (including calls to lock()) can suceed
87. * again.
88. *
89. * @return void
90. */
91. public function unlock ();
92. }
94. ?>

Documentation generated by phpDocumentor 1.4.3