-
Which methods should be thread safe?
I am creating a data file with methods
insertRecord
updateRecord
deleteRecord
findRecords
getSize
Which methods need to be syncronized? Any input would be appreciated..
-
Re: Which methods should be thread safe?
It depends on the degree of concurrency and lock granularity that you want
to implement. Any method that updates a resource in a way that may cause
a conflict it should be synchronized.
updateRecord and deleteRecord will have to be synchronized in all cases.
Good Luck,
Ako
"J Alder" <jAdler@feverton.gov> wrote:
>
>I am creating a data file with methods
>
>insertRecord
>
>updateRecord
>
>deleteRecord
>
>findRecords
>
>getSize
>
>Which methods need to be syncronized? Any input would be appreciated..
-
Re: Which methods should be thread safe?
Thanks for the response AKO.. I'll do it!
"Ako" <ays73@hotmail.com> wrote:
>
>It depends on the degree of concurrency and lock granularity that you want
>to implement. Any method that updates a resource in a way that may cause
>a conflict it should be synchronized.
>
>
>updateRecord and deleteRecord will have to be synchronized in all cases.
>
>Good Luck,
>
>Ako
>
>
>
>"J Alder" <jAdler@feverton.gov> wrote:
>>
>>I am creating a data file with methods
>>
>>insertRecord
>>
>>updateRecord
>>
>>deleteRecord
>>
>>findRecords
>>
>>getSize
>>
>>Which methods need to be syncronized? Any input would be appreciated..
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks