public final class BerkeleyWriter extends Object implements IBackendWriter
IBackendWriter
-interface. It inherits and overrides some
reader methods because of the transaction layer.Constructor and Description |
---|
BerkeleyWriter(com.sleepycat.je.Environment pEnv,
com.sleepycat.je.Database pDatabase,
com.sleepycat.bind.tuple.TupleBinding<IBucket> pBucketBinding)
Simple constructor starting with an
Environment and a Storage . |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closing the write access.
|
IBucket |
read(long pKey)
Getting a reference for the given pointer.
|
UberBucket |
readUber()
Reading the UberBucket
|
void |
write(IBucket bucket)
Writing a bucket related to the reference.
|
void |
writeUberBucket(UberBucket pBucket)
Writing the
UberBucket including the pointer to the bucket. |
public BerkeleyWriter(com.sleepycat.je.Environment pEnv, com.sleepycat.je.Database pDatabase, com.sleepycat.bind.tuple.TupleBinding<IBucket> pBucketBinding) throws TTIOException
Environment
and a Storage
.pEnv
- env to create new readerpDatabase
- Storage
reference where the data should be written topBucketBinding
- TupleBinding
for de/-serializing bucketsTTIOException
- if something odd happenspublic void write(IBucket bucket) throws TTIOException
write
in interface IBackendWriter
bucket
- bucket to be writtenTTIOException
public IBucket read(long pKey) throws TTIOException
read
in interface IBackendReader
pKey
- the reference for the bucket to be determinedIBucket
as the base for a bucketTTIOException
public void close() throws TTIOException
close
in interface IBackendReader
close
in interface IBackendWriter
TTIOException
- if closing failspublic UberBucket readUber() throws TTIOException
readUber
in interface IBackendReader
TTIOException
public void writeUberBucket(UberBucket pBucket) throws TTException
UberBucket
including the pointer to the bucket.writeUberBucket
in interface IBackendWriter
pBucket
- the UberBucket to be written.TTException
Copyright © 2013. All Rights Reserved.