org.openorb.pss.connector.file
Class TransactionalDataManager

java.lang.Object
  extended by org.openorb.pss.connector.file.DataManager
      extended by org.openorb.pss.connector.file.TransactionalDataManager
Direct Known Subclasses:
TransactionalDataManagerSerializable

public class TransactionalDataManager
extends DataManager

This class is a transactional resource this is used to write/read data into the datastore

Author:
Jerome Daniel

Constructor Summary
TransactionalDataManager(DataManager delegated)
          Constructor
 
Method Summary
 void begin()
          This operation is used to begin a transaction
 boolean begun()
          Is the transaction begun ?
 void close()
           
 void commit()
          This operation is used to commit a transaction
 java.util.Enumeration content()
          Return the datastore content under an enumeration format
 long datastoreSize()
          Return the datastore length
 void finalize()
          Finalize operation
 void flush()
           
 void forget()
          This operation is used to forget the transaction
 void free_all()
           
 java.util.Hashtable get_index_table()
          Return the index table
 java.lang.String home()
          Return home base name
 void invalidate_entry(PID pid)
          Invalidate an entry
 java.lang.String key()
          Return the hashtable key
 void lock_flush(boolean lock)
          Disable or enable flush
 java.lang.Object lock()
          Return the current lock
 long nextFreeID()
          This operation returns a new free ID.
 DataEntry read_entry_from_index(org.omg.CORBA.LongHolder index)
          The operation reads an entry from its PID.
 DataEntry read_entry(PID pid)
          Read an entry from its PID.
 void resume_waited()
          The transaction is ended, we can now resume all threads
 void rollback()
          This operation is used to rollback a transaction
 void share()
          Increment the shared value counter
 boolean shared()
          Is this data manager shared ?
 void write_entry(DataEntry entry)
          Add a data into the cache.
 
Methods inherited from class org.openorb.pss.connector.file.DataManager
addListener, destroy, get_clean_table, read_entry_from_clean_table, transaction_lock, transaction_lock, transaction_unlock
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionalDataManager

public TransactionalDataManager(DataManager delegated)
Constructor

Method Detail

begun

public boolean begun()
Is the transaction begun ?


begin

public void begin()
This operation is used to begin a transaction


rollback

public void rollback()
This operation is used to rollback a transaction


commit

public void commit()
This operation is used to commit a transaction


forget

public void forget()
This operation is used to forget the transaction


resume_waited

public void resume_waited()
The transaction is ended, we can now resume all threads


share

public void share()
Increment the shared value counter

Overrides:
share in class DataManager

shared

public boolean shared()
Is this data manager shared ?

Overrides:
shared in class DataManager

key

public java.lang.String key()
Return the hashtable key

Overrides:
key in class DataManager

finalize

public void finalize()
Finalize operation

Overrides:
finalize in class DataManager

read_entry

public DataEntry read_entry(PID pid)
                     throws NotFoundException
Read an entry from its PID. If the entry is already in the cache, return it.

Overrides:
read_entry in class DataManager
Throws:
NotFoundException

invalidate_entry

public void invalidate_entry(PID pid)
Invalidate an entry

Overrides:
invalidate_entry in class DataManager

write_entry

public void write_entry(DataEntry entry)
Add a data into the cache.

Overrides:
write_entry in class DataManager

flush

public void flush()
Overrides:
flush in class DataManager

free_all

public void free_all()
Overrides:
free_all in class DataManager

close

public void close()
Overrides:
close in class DataManager

nextFreeID

public long nextFreeID()
This operation returns a new free ID.

Overrides:
nextFreeID in class DataManager

read_entry_from_index

public DataEntry read_entry_from_index(org.omg.CORBA.LongHolder index)
The operation reads an entry from its PID.

Overrides:
read_entry_from_index in class DataManager

lock_flush

public void lock_flush(boolean lock)
Disable or enable flush

Overrides:
lock_flush in class DataManager

home

public java.lang.String home()
Return home base name

Overrides:
home in class DataManager

content

public java.util.Enumeration content()
Return the datastore content under an enumeration format

Overrides:
content in class DataManager

datastoreSize

public long datastoreSize()
Return the datastore length

Overrides:
datastoreSize in class DataManager

get_index_table

public java.util.Hashtable get_index_table()
Return the index table

Overrides:
get_index_table in class DataManager

lock

public java.lang.Object lock()
Return the current lock

Overrides:
lock in class DataManager