Squeak Class Documentation category index | class index  
 
ObjectOut
  category: Kernel-Objects
  superclass: ProtoObject
  subclasses: MorphObjectOut

I am a stand-in for an object that is out on the disk. The object that is out on the disk is the head of a tree of objects that are out. See SqueakPage.

When any message is sent to me, I don't understand it, and bring in my true object. I become myself with the objects and resend the message.

I may not represent the object nil.
The file is represented as a url, and that url may point at any file on the net.

page is a SqueakPage.
If the cache already has an object, widely in use, that claims to be the object for my url, what do I do? I can't become him, since others believe that he is the true object. Run through memory and replace refs to me with refs to him. Be careful not to trigger a fault. Become me to a string, then find pointers and replace?

[[[They don't want to end up holding an ObjectOut. (would oscillate back and forth) This is a problem. A user could bring in two trees that both refer to a 3rd url. (check with cache before installing any new ObjectOut) Two trees could be written to the same url.
Or, I remain an ObjectOut, and keep getting notUnderstood, and keep returning the other guy.
Or I smash the cache, and install MY page and object. Other guy is a copy -- still in, but with no place in the cache. When we both write to the same url, there will be trouble.] No -- search and replace.]]]

instance methods
  access
  sqkPage
url
url:
xxxReset

  basics
  isInMemory
xxxClass
xxxClone
xxxInstVarAt:
xxxInstVarAt:put:

  fetch from disk
  doesNotUnderstand:
xxxFetch
xxxFixup
xxxSetUrl:page:

  object storage
  comeFullyUpOnReload:
objectForDataStream:
readDataFrom:size:
storeDataOn:
veryDeepCopyWith:

class methods
  no messages
 

instance methods
  access top  
 

sqkPage


 

url


 

url:


 

xxxReset

mark as never brought in


  basics top  
 

isInMemory

We are a place holder for an object that is out.


 

xxxClass

Primitive. Answer the object which is the receiver's class. Essential. See
Object documentation whatIsAPrimitive.


 

xxxClone


 

xxxInstVarAt:

Primitive. Answer a fixed variable in an object. The numbering of the
variables corresponds to the named instance variables. Fail if the index
is not an Integer or is not the index of a fixed variable. Essential. See
Object documentation whatIsAPrimitive.


 

xxxInstVarAt:put:

Primitive. Store a value into a fixed variable in the receiver. The
numbering of the variables corresponds to the named instance variables.
Fail if the index is not an Integer or is not the index of a fixed variable.
Answer the value stored as the result. Using this message violates the
principle that each object has sovereign control over the storing of
values into its instance variables. Essential. See Object documentation
whatIsAPrimitive.


  fetch from disk top  
 

doesNotUnderstand:

Bring in the object, install, then resend aMessage


 

xxxFetch

Bring in my object and replace all references to me with references to him. First try looking up my url in the pageCache. Then try the page (and install it, under its url). Then start from scratch with the url.


 

xxxFixup

There is already an object in memory for my url. All pointers to me need to be pointers to him. Can't use become, because other pointers to him must stay valid.


 

xxxSetUrl:page:


  object storage top  
 

comeFullyUpOnReload:

Normally this read-in object is exactly what we want to store. Try to dock first. If it is here already, use that one.


 

objectForDataStream:

Return an object to store on a data stream (externalize myself).


 

readDataFrom:size:

Make self be an object based on the contents of aDataStream, which was generated by the object's storeDataOn: method. Return self.


 

storeDataOn:

Store myself on a DataStream. See also objectToStoreOnDataStream.
must send 'aDataStream beginInstance:size:'


 

veryDeepCopyWith:

Copy me and the entire tree of objects I point to. An object in the tree twice is copied once, and both references point to him. deepCopier holds a dictionary of objects we have seen. Some classes refuse to be copied. Some classes are picky about which fields get deep copied.


class methods
  no messages top