• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

still confuse with the unreferenced()

 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
1>I still confuse with the unreferenced().
I use the record number as the key in my LockManager and the object of RemoteAccess as the
values.In my unreferenced() method(in RemoteAccess),I just call unlock(this) which will
iterate all the records in Map and remove it.
Is that right?
2>Did you refresh the combox and when ?
I think when add a new record ,maybe there will add some new origin airport,dest airpot or carrier?
 
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ray,


In my unreferenced() method(in RemoteAccess),I just call unlock(this) which will
iterate all the records in Map and remove it.
Is that right?


Probably not. You need to keep a set of locked records in each remote connection object. Then, when unreferenced() is called on that object, you iterate thru that set and call unlock() on each lock in the clint's set.
Hope this helps,
Michael Morris
 
Ray Cheeny
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Probably not. You need to keep a set of locked records in each remote connection object.


I have those in my LockManager.Do you mean I should have another in my RemoteDataAccess?
Or I have a set of locks which only this object have?

when unreferenced() is called on that object, you iterate thru that set and call unlock() on each lock in the clint's set.


If the unreferenced() is called ,I should unlock
all the locks even if it dose not belong to that object?

2>Did you refresh the combox and when ?
I think when add a new record ,maybe there will add some new origin airport,dest airpot or carrier?


Could you answer it?Thanks a lot.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic