• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Invalidate vs Refresh vs Refault
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Invalidate vs Refresh vs Refault


  • Subject: Re: Invalidate vs Refresh vs Refault
  • From: Kieran Kelleher <email@hidden>
  • Date: Mon, 11 Dec 2006 09:52:05 -0500

Freshen the current editing context is easy .......

editingContext.setFetchTimestamp( new java.util.Date().getTime() );

Now any EO's that you touch will be refreshed if their fetch timestamp is older than the time at which you executed the above statement.

On Dec 9, 2006, at 9:48 AM, Dov Rosenberg wrote:

The main reason for my question centers around the fact that in some places
of our app we needed to use JDBC directly for performance reasons (mainly
the bulk operations). Of course when that happens the object graph can get
out of sync with reality.


All editingcontexts (including the shared editing contexts) would need to be
informed. In our case doing an invalidate would probably be pretty costly
since it might get triggered on a frequent basis.


If we wanted to freshen only the current editing context is there a way to
do that?


Dov Rosenberg



On 12/8/06 11:26 PM, "Chuck Hill" <email@hidden> wrote:

This always makes my head hurt, but I will take a stab at it.

invalidate: tosses the snapshot, affects all editing contexts.
Forces the data to be refetched from the database.

refault: changes the eo back into a fault in the EC.  Depending on
the EC's fetch timestamp and the snapshot's age, it _may_ go back to
the database for fresh data when the fault is fired.  I think this
discards any uncommited changes.

refresh: pretty much the same as refault, but merges uncommitted
changes back into eo.

I have found problems with refault() and refresh() and created my own
versions that you can find in EOObject in our GVCEOFExtensions
framework.  Sorry, but I don't recall the details right now.

Chuck


On Dec 8, 2006, at 2:10 PM, Dov Rosenberg wrote:

What is the difference between Invalidating an object versus
refreshing versus refaulting?

It seems that some of the methods call the others. Any commentary
on which should be used and when would be appreciated. Thanks in
advance


-- Dov Rosenberg Conviveon/Inquira Knowledge Management Experts http://www.conviveon.com http://www.inquira.com

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net

This email sent to email@hidden

-- Dov Rosenberg Inquira Inc 370 Centerpointe Circle, ste 1178 Altamonte Springs, FL 32701 (407) 339-1177 x 102 (407) 339-6704 (fax) (407) 310-8316 (cell) email@hidden AOL IM: dovrosenberg


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Invalidate vs Refresh vs Refault
      • From: Chuck Hill <email@hidden>
References: 
 >Re: Invalidate vs Refresh vs Refault (From: Dov Rosenberg <email@hidden>)

  • Prev by Date: Re: Question about Session
  • Next by Date: OT: FrontBase Scheduled Backups
  • Previous by thread: Re: Invalidate vs Refresh vs Refault
  • Next by thread: Re: Invalidate vs Refresh vs Refault
  • Index(es):
    • Date
    • Thread