com.sun.sgs.impl.service.data
Class ClassesTable

java.lang.Object
  extended by com.sun.sgs.impl.service.data.ClassesTable

final class ClassesTable
extends Object

Manages information about class descriptors used to serialize managed objects. This class caches information about class descriptors and class IDs that it obtains from the data store. The cache is filled on demand, and uses soft and weak references, so it can be cleared by the GC as needed.


Constructor Summary
ClassesTable(DataStore store)
          Creates an instance with the specified data store.
 
Method Summary
(package private)  ClassSerialization createClassSerialization(Transaction txn)
          Returns an implementation of ClassSerialization that uses this table to lookup class descriptors, uses the specified transaction when making requests of the data store, and uses Int30 to represent class IDs.
(package private)  int getClassId(Transaction txn, ObjectStreamClass classDesc)
          Returns the class ID associated with a class descriptor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassesTable

ClassesTable(DataStore store)
Creates an instance with the specified data store.

Method Detail

createClassSerialization

ClassSerialization createClassSerialization(Transaction txn)
Returns an implementation of ClassSerialization that uses this table to lookup class descriptors, uses the specified transaction when making requests of the data store, and uses Int30 to represent class IDs.


getClassId

int getClassId(Transaction txn,
               ObjectStreamClass classDesc)
Returns the class ID associated with a class descriptor.

Parameters:
txn - the transaction under which the operation should take place
classDesc - the class descriptor
Returns:
the class ID
Throws:
ObjectIOException - if a problem occurs serializing the class descriptor
TransactionAbortedException - if the data store was consulted and the transaction was aborted due to a lock conflict or timeout
TransactionNotActiveException - if the data store was consulted and the transaction is not active
IllegalStateException - if the data store was consulted and the operation failed because of a problem with the current transaction

RedDwarf, Version 0.10.1
2010-03-14 10:56:12

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved