Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZODB
Commits
eff611f0
Commit
eff611f0
authored
Oct 26, 2004
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge revs 28249 and 28250 from trunk.
Document _p_invalidate().
parent
2f9dbfde
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
src/persistent/interfaces.py
src/persistent/interfaces.py
+11
-1
No files found.
src/persistent/interfaces.py
View file @
eff611f0
...
@@ -149,7 +149,8 @@ class IPersistent(Interface):
...
@@ -149,7 +149,8 @@ class IPersistent(Interface):
- call _p_deactivate()
- call _p_deactivate()
- set _p_changed to None
- set _p_changed to None
There is one way to invalidate an object: delete its _p_changed
There are two ways to invalidate an object: call the
_p_invalidate() method (preferred) or delete its _p_changed
attribute. This cannot be ignored, and is used when semantics
attribute. This cannot be ignored, and is used when semantics
require invalidation. Normally, an invalidated object transitions
require invalidation. Normally, an invalidated object transitions
to the ghost state. However, some objects cannot be ghosts. When
to the ghost state. However, some objects cannot be ghosts. When
...
@@ -235,6 +236,15 @@ class IPersistent(Interface):
...
@@ -235,6 +236,15 @@ class IPersistent(Interface):
may choose to keep an object in the saved state.
may choose to keep an object in the saved state.
"""
"""
def
_p_invalidate
():
"""Invalidate the object.
Invalidate the object. This causes any data to be thrown
away, even if the object is in the changed state. The object
is moved to the ghost state; further accesses will cause
object data to be reloaded.
"""
class
IPersistentNoReadConflicts
(
IPersistent
):
class
IPersistentNoReadConflicts
(
IPersistent
):
def
_p_independent
():
def
_p_independent
():
"""Hook for subclasses to prevent read conflict errors.
"""Hook for subclasses to prevent read conflict errors.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment