< prev index next >

src/share/vm/classfile/placeholders.hpp

Print this page




 146     }
 147   }
 148 #endif // PRODUCT
 149 };
 150 
 151 // Placeholder objects represent classes currently being loaded.
 152 // All threads examining the placeholder table must hold the
 153 // SystemDictionary_lock, so we don't need special precautions
 154 // on store ordering here.
 155 // The system dictionary is the only user of this class.
 156 
 157 class PlaceholderEntry : public HashtableEntry<Symbol*, mtClass> {
 158   friend class VMStructs;
 159 
 160 
 161  private:
 162   ClassLoaderData*  _loader_data;   // initiating loader
 163   bool              _havesupername; // distinguish between null supername, and unknown
 164   Symbol*           _supername;
 165   Thread*           _definer;       // owner of define token
 166   Klass*            _instanceKlass; // InstanceKlass from successful define
 167   SeenThread*       _superThreadQ;  // doubly-linked queue of Threads loading a superclass for this class
 168   SeenThread*       _loadInstanceThreadQ;  // loadInstance thread
 169                                     // can be multiple threads if classloader object lock broken by application
 170                                     // or if classloader supports parallel classloading
 171 
 172   SeenThread*       _defineThreadQ; // queue of Threads trying to define this class
 173                                     // including _definer
 174                                     // _definer owns token
 175                                     // queue waits for and returns results from _definer
 176 
 177  public:
 178   // Simple accessors, used only by SystemDictionary
 179   Symbol*            klassname()           const { return literal(); }
 180 
 181   ClassLoaderData*   loader_data()         const { return _loader_data; }
 182   void               set_loader_data(ClassLoaderData* loader_data) { _loader_data = loader_data; }
 183 
 184   bool               havesupername()       const { return _havesupername; }
 185   void               set_havesupername(bool havesupername) { _havesupername = havesupername; }
 186 
 187   Symbol*            supername()           const { return _supername; }
 188   void               set_supername(Symbol* supername) {
 189     _supername = supername;
 190     if (_supername != NULL) _supername->increment_refcount();
 191   }
 192 
 193   Thread*            definer()             const {return _definer; }
 194   void               set_definer(Thread* definer) { _definer = definer; }
 195 
 196   Klass*             instance_klass()      const {return _instanceKlass; }
 197   void               set_instance_klass(Klass* ik) { _instanceKlass = ik; }
 198 
 199   SeenThread*        superThreadQ()        const { return _superThreadQ; }
 200   void               set_superThreadQ(SeenThread* SeenThread) { _superThreadQ = SeenThread; }
 201 
 202   SeenThread*        loadInstanceThreadQ() const { return _loadInstanceThreadQ; }
 203   void               set_loadInstanceThreadQ(SeenThread* SeenThread) { _loadInstanceThreadQ = SeenThread; }
 204 
 205   SeenThread*        defineThreadQ()        const { return _defineThreadQ; }
 206   void               set_defineThreadQ(SeenThread* SeenThread) { _defineThreadQ = SeenThread; }
 207 
 208   PlaceholderEntry* next() const {
 209     return (PlaceholderEntry*)HashtableEntry<Symbol*, mtClass>::next();
 210   }
 211 
 212   PlaceholderEntry** next_addr() {
 213     return (PlaceholderEntry**)HashtableEntry<Symbol*, mtClass>::next_addr();
 214   }
 215 
 216   // Test for equality
 217   // Entries are unique for class/classloader name pair




 146     }
 147   }
 148 #endif // PRODUCT
 149 };
 150 
 151 // Placeholder objects represent classes currently being loaded.
 152 // All threads examining the placeholder table must hold the
 153 // SystemDictionary_lock, so we don't need special precautions
 154 // on store ordering here.
 155 // The system dictionary is the only user of this class.
 156 
 157 class PlaceholderEntry : public HashtableEntry<Symbol*, mtClass> {
 158   friend class VMStructs;
 159 
 160 
 161  private:
 162   ClassLoaderData*  _loader_data;   // initiating loader
 163   bool              _havesupername; // distinguish between null supername, and unknown
 164   Symbol*           _supername;
 165   Thread*           _definer;       // owner of define token
 166   InstanceKlass*    _instanceKlass; // InstanceKlass from successful define
 167   SeenThread*       _superThreadQ;  // doubly-linked queue of Threads loading a superclass for this class
 168   SeenThread*       _loadInstanceThreadQ;  // loadInstance thread
 169                                     // can be multiple threads if classloader object lock broken by application
 170                                     // or if classloader supports parallel classloading
 171 
 172   SeenThread*       _defineThreadQ; // queue of Threads trying to define this class
 173                                     // including _definer
 174                                     // _definer owns token
 175                                     // queue waits for and returns results from _definer
 176 
 177  public:
 178   // Simple accessors, used only by SystemDictionary
 179   Symbol*            klassname()           const { return literal(); }
 180 
 181   ClassLoaderData*   loader_data()         const { return _loader_data; }
 182   void               set_loader_data(ClassLoaderData* loader_data) { _loader_data = loader_data; }
 183 
 184   bool               havesupername()       const { return _havesupername; }
 185   void               set_havesupername(bool havesupername) { _havesupername = havesupername; }
 186 
 187   Symbol*            supername()           const { return _supername; }
 188   void               set_supername(Symbol* supername) {
 189     _supername = supername;
 190     if (_supername != NULL) _supername->increment_refcount();
 191   }
 192 
 193   Thread*            definer()             const {return _definer; }
 194   void               set_definer(Thread* definer) { _definer = definer; }
 195 
 196   InstanceKlass*     instance_klass()      const {return _instanceKlass; }
 197   void               set_instance_klass(InstanceKlass* ik) { _instanceKlass = ik; }
 198 
 199   SeenThread*        superThreadQ()        const { return _superThreadQ; }
 200   void               set_superThreadQ(SeenThread* SeenThread) { _superThreadQ = SeenThread; }
 201 
 202   SeenThread*        loadInstanceThreadQ() const { return _loadInstanceThreadQ; }
 203   void               set_loadInstanceThreadQ(SeenThread* SeenThread) { _loadInstanceThreadQ = SeenThread; }
 204 
 205   SeenThread*        defineThreadQ()        const { return _defineThreadQ; }
 206   void               set_defineThreadQ(SeenThread* SeenThread) { _defineThreadQ = SeenThread; }
 207 
 208   PlaceholderEntry* next() const {
 209     return (PlaceholderEntry*)HashtableEntry<Symbol*, mtClass>::next();
 210   }
 211 
 212   PlaceholderEntry** next_addr() {
 213     return (PlaceholderEntry**)HashtableEntry<Symbol*, mtClass>::next_addr();
 214   }
 215 
 216   // Test for equality
 217   // Entries are unique for class/classloader name pair


< prev index next >