TAILIEUCHUNG - Introducing Windows Azure- P19

Introducing Windows Azure- P19:The cloud platform is getting more and more attractive to the computing world. Today, service-oriented architecture (SOA) and aspect-oriented programming (AOP) techniques are widely used in enterprise solutions. A question an IT management team or a software development team may ask is, what is the next trend going to be? Cloud computing seems to be the right answer. | CHAPTER 2 ACCESS CLOUD TABLE STORAGE user as User Listing2-26. Recursively Loop the Embedded Entity Object to Insert a Relational Data Set to Cloud Storage Tables virtual public bool Insert ICloudEntity entity bool success false ICloudEntity dependency null try entity dependency while null dependency CloudTableServiceFactory cloudTableFactory new CloudTableServiceFactory dependency .Insert dependency dependency success true catch return success To delete a set of relational data entities from cloud table storage a parent entity object is responsible for passing the partition key that is the RowKey of the child record. The list of dependency entities is the one we built up when constructing each entity instance . The highlighted lines from Listing 2-27 show how to accomplish this task. Listing2-27. Recursively Loop the Embedded Entity Object to Delete a Relational Data Set virtual public bool Delete ICloudEntity entity bool success false foreach ICloudEntity entityType in ICloudEntity dependency QueryDependencyEntity entityType entity as TableStorageEntity .RowKey 63 CHAPTER 2 ACCESS CLOUD TABLE STORAGE if null dependency dependency .Delete dependency try entity entity success true catch return success The implementation for the Update method is relatively simple as shown in Listing 2-28. It is just a combination call to the Delete and Insert methods based upon the strategy updating cloud storage data in buckets. Listing 2-28. Updating Relational Entities in Buckets virtual public bool Update ICloudEntity entity bool success false try if Delete entity success Insert entity catch return .

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.