68 return (ProtectionDomainCacheEntry*) Hashtable<ClassLoaderWeakHandle, mtClass>::bucket(i); 69 } 70 71 // The following method is not MT-safe and must be done under lock. 72 ProtectionDomainCacheEntry** bucket_addr(int i) { 73 return (ProtectionDomainCacheEntry**) Hashtable<ClassLoaderWeakHandle, mtClass>::bucket_addr(i); 74 } 75 76 ProtectionDomainCacheEntry* new_entry(unsigned int hash, ClassLoaderWeakHandle protection_domain) { 77 ProtectionDomainCacheEntry* entry = (ProtectionDomainCacheEntry*) 78 Hashtable<ClassLoaderWeakHandle, mtClass>::new_entry(hash, protection_domain); 79 return entry; 80 } 81 82 static unsigned int compute_hash(Handle protection_domain); 83 84 int index_for(Handle protection_domain); 85 ProtectionDomainCacheEntry* add_entry(int index, unsigned int hash, Handle protection_domain); 86 ProtectionDomainCacheEntry* find_entry(int index, Handle protection_domain); 87 88 public: 89 ProtectionDomainCacheTable(int table_size); 90 ProtectionDomainCacheEntry* get(Handle protection_domain); 91 92 void unlink(); 93 94 void print_on(outputStream* st) const; 95 void verify(); 96 }; 97 98 99 class ProtectionDomainEntry :public CHeapObj<mtClass> { 100 friend class VMStructs; 101 public: 102 ProtectionDomainEntry* _next; 103 ProtectionDomainCacheEntry* _pd_cache; 104 105 ProtectionDomainEntry(ProtectionDomainCacheEntry* pd_cache, ProtectionDomainEntry* next) { 106 _pd_cache = pd_cache; 107 _next = next; 108 } 109 110 ProtectionDomainEntry* next() { return _next; } 111 void set_next(ProtectionDomainEntry* entry) { _next = entry; } 112 oop object(); 113 oop object_no_keepalive(); 114 }; 115 #endif // SHARE_VM_CLASSFILE_PROTECTIONDOMAINCACHE_HPP | 68 return (ProtectionDomainCacheEntry*) Hashtable<ClassLoaderWeakHandle, mtClass>::bucket(i); 69 } 70 71 // The following method is not MT-safe and must be done under lock. 72 ProtectionDomainCacheEntry** bucket_addr(int i) { 73 return (ProtectionDomainCacheEntry**) Hashtable<ClassLoaderWeakHandle, mtClass>::bucket_addr(i); 74 } 75 76 ProtectionDomainCacheEntry* new_entry(unsigned int hash, ClassLoaderWeakHandle protection_domain) { 77 ProtectionDomainCacheEntry* entry = (ProtectionDomainCacheEntry*) 78 Hashtable<ClassLoaderWeakHandle, mtClass>::new_entry(hash, protection_domain); 79 return entry; 80 } 81 82 static unsigned int compute_hash(Handle protection_domain); 83 84 int index_for(Handle protection_domain); 85 ProtectionDomainCacheEntry* add_entry(int index, unsigned int hash, Handle protection_domain); 86 ProtectionDomainCacheEntry* find_entry(int index, Handle protection_domain); 87 88 bool _dead_entries; 89 90 public: 91 ProtectionDomainCacheTable(int table_size); 92 ProtectionDomainCacheEntry* get(Handle protection_domain); 93 94 void unlink(); 95 96 void print_on(outputStream* st) const; 97 void verify(); 98 99 bool has_work() { return _dead_entries; } 100 void trigger_cleanup(); 101 }; 102 103 104 class ProtectionDomainEntry :public CHeapObj<mtClass> { 105 friend class VMStructs; 106 public: 107 ProtectionDomainEntry* _next; 108 ProtectionDomainCacheEntry* _pd_cache; 109 110 ProtectionDomainEntry(ProtectionDomainCacheEntry* pd_cache, ProtectionDomainEntry* next) { 111 _pd_cache = pd_cache; 112 _next = next; 113 } 114 115 ProtectionDomainEntry* next() { return _next; } 116 void set_next(ProtectionDomainEntry* entry) { _next = entry; } 117 oop object(); 118 oop object_no_keepalive(); 119 }; 120 #endif // SHARE_VM_CLASSFILE_PROTECTIONDOMAINCACHE_HPP |