EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Acquire/Release Object in S3 Storage

Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.
Posted: 02/28/2011 16:20:57
by Eric Lenington (Standard support level)
Joined: 12/06/2010
Posts: 37

I've been studying the S3 demo and the related documentation, but I can't determine what the purpose of AcquireObject (which is never used in the demo) and ReleaseObject is (as well as AcquireBucket/ReleaseBucket, although neither of these are used in the demo). Can you explain?
Posted: 02/28/2011 17:50:18
by Ken Ivanov (EldoS Corp.)

AcquireObject() only returns a TElAWSS3DataStorageObject object by the supplied bucket and/or key name. This is a legal way to obtain an object object (sic) without calling the List() method.

Call ReleaseObject() method to free the object obtained from the AcquireObject() method. In fact, ReleaseObject() only calls FreeAndNil() for the passed object, but this behaviour may differ for different storage types that may be implemented in future. So a good practice would be to pair all the AcquireObject() calls with the corresponding ReleaseObject() call.

The same logic applies to the AcquireBucket()/ReleaseBucket() methods, i.e. it's just a way to get TElAWSS3DataStorageBucket object by the bucket name.
Posted: 02/28/2011 19:03:58
by Eric Lenington (Standard support level)
Joined: 12/06/2010
Posts: 37

Thanks for the quick reply. So if I'm only using ReadObject and WriteObject, and never using a TElAWSS3DataStorageObject, then I don't have to use either of these, right?
Posted: 02/28/2011 19:08:49
by Ken Ivanov (EldoS Corp.)

Yes, exactly.



Topic viewed 686 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!