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
Joshua
zodb
Commits
df0ebdb6
Commit
df0ebdb6
authored
Oct 26, 2004
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
document _p_invalidate()
parent
8ff1520f
Changes
1
Hide 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 @
df0ebdb6
...
@@ -140,7 +140,8 @@ class IPersistent(Interface):
...
@@ -140,7 +140,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
...
@@ -226,6 +227,15 @@ class IPersistent(Interface):
...
@@ -226,6 +227,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 inthe 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