Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZEO
Commits
3765adf4
Commit
3765adf4
authored
Apr 28, 1999
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refinement
parent
81501bca
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
7 deletions
+43
-7
src/ZODB/Connection.py
src/ZODB/Connection.py
+15
-2
src/ZODB/DB.py
src/ZODB/DB.py
+14
-2
src/ZODB/FileStorage.py
src/ZODB/FileStorage.py
+9
-3
src/ZODB/ZApplication.py
src/ZODB/ZApplication.py
+3
-0
src/ZODB/ZopeToDo
src/ZODB/ZopeToDo
+2
-0
No files found.
src/ZODB/Connection.py
View file @
3765adf4
...
...
@@ -47,8 +47,8 @@
##############################################################################
"""Database connection support
$Id: Connection.py,v 1.
1 1998/11/11 02:00:55
jim Exp $"""
__version__
=
'$Revision: 1.
1
$'
[
11
:
-
2
]
$Id: Connection.py,v 1.
2 1999/04/28 11:10:48
jim Exp $"""
__version__
=
'$Revision: 1.
2
$'
[
11
:
-
2
]
from
PickleCache
import
PickleCache
from
bpthread
import
allocate_lock
...
...
@@ -327,6 +327,19 @@ class Connection:
invalidate
=
self
.
_db
.
invalidate
for
oid
in
self
.
_invalidating
:
invalidate
(
oid
,
self
)
def
exportFile
(
self
,
oid
,
file
=
None
):
pass
# Not implemented yet
def
importFile
(
self
,
file
):
pass
# Not implemented yet
######################################################################
# BoboPOS 2 compat.
def
export_file
(
self
,
o
,
file
=
None
):
return
self
.
exportFile
(
o
.
_p_oid
,
file
)
import_file
=
importFile
class
tConnection
(
Connection
):
def
close
(
self
):
...
...
src/ZODB/DB.py
View file @
3765adf4
...
...
@@ -47,8 +47,8 @@
##############################################################################
"""Database objects
$Id: DB.py,v 1.
1 1998/11/11 02:00:55
jim Exp $"""
__version__
=
'$Revision: 1.
1
$'
[
11
:
-
2
]
$Id: DB.py,v 1.
2 1999/04/28 11:10:48
jim Exp $"""
__version__
=
'$Revision: 1.
2
$'
[
11
:
-
2
]
import
cPickle
,
cStringIO
,
sys
from
Connection
import
Connection
...
...
@@ -225,6 +225,8 @@ class DB:
self
.
_connectionMap
(
f
)
return
m
[
0
]
def
close
(
self
):
self
.
_storage
.
close
()
def
commitVersion
(
self
,
source
,
destination
=
''
):
raise
'Not yet implemented'
...
...
@@ -384,6 +386,16 @@ class DB:
def
setVersionCacheSize
(
self
,
v
):
self
.
_version_cache_size
=
v
def
setVersionPoolSize
(
self
,
v
):
self
.
_version_pool_size
=
v
def
getCacheDeactivateAfter
(
self
):
return
self
.
_cache_deactivate_after
def
getCacheSize
(
self
):
return
self
.
_cache_size
def
getPoolSize
(
self
):
return
self
.
_pool_size
def
getVersionCacheDeactivateAfter
(
self
):
return
self
.
_version_cache_deactivate_after
def
getVersionCacheSize
(
self
):
return
self
.
_version_cache_size
def
getVersionPoolSize
(
self
):
return
self
.
_version_pool_size
def
cacheStatistics
(
self
):
return
()
# :(
def
versionEmpty
(
self
,
version
):
return
self
.
_storage
.
versionEmpty
(
version
)
...
...
src/ZODB/FileStorage.py
View file @
3765adf4
...
...
@@ -47,7 +47,7 @@
##############################################################################
"""File-based BoboPOS3 storage
"""
__version__
=
'$Revision: 1.
1
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
2
$'
[
11
:
-
2
]
import
struct
,
time
,
os
,
bpthread
now
=
time
.
time
...
...
@@ -142,6 +142,10 @@ class FileStorage:
pos
=
unpack
(
">i"
,
h
[
-
4
:])[
0
]
finally
:
self
.
_r
()
def
close
(
self
):
self
.
_file
.
close
()
# Eventuallly, we should save_index
def
commitVersion
(
self
,
src
,
dest
):
self
.
_a
()
try
:
...
...
@@ -415,7 +419,7 @@ class FileStorage:
def
tpc_abort
(
self
,
transaction
):
self
.
_a
()
try
:
if
transaction
!=
self
.
_transaction
:
return
if
transaction
is
not
self
.
_transaction
:
return
del
self
.
_tindex
[:]
self
.
_transaction
=
None
self
.
_cr
()
...
...
@@ -436,7 +440,7 @@ class FileStorage:
def
tpc_finish
(
self
,
transaction
,
f
=
None
):
self
.
_a
()
try
:
if
transaction
!=
self
.
_transaction
:
return
if
transaction
is
not
self
.
_transaction
:
return
if
f
is
not
None
:
f
()
file
=
self
.
_file
write
=
file
.
write
...
...
@@ -498,6 +502,8 @@ class FileStorage:
finally
:
self
.
_r
()
packed_version
=
'FS10'
def
read_index
(
file
,
index
,
vindex
,
tindex
,
stop
=
'
\
377
'
*
8
):
indexpos
=
index
.
get
...
...
src/ZODB/
Bobo
Application.py
→
src/ZODB/
Z
Application.py
View file @
3765adf4
...
...
@@ -86,6 +86,9 @@ class BoboApplication:
v
=
conn
.
root
()[
aname
]
if
name
is
not
None
:
if
hasattr
(
v
,
'__bobo_traverse__'
):
return
v
.
__bobo_traverse__
(
REQUEST
,
name
)
if
hasattr
(
v
,
name
):
return
getattr
(
v
,
name
)
return
v
[
name
]
...
...
src/ZODB/ZopeToDo
0 → 100644
View file @
3765adf4
Need Globals to have a DB attribute, which is the ZODB DB.
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