Project

General

Profile

Task #2312

Story #2250: Build release of d1_libclient_java

minor refactor of ObjectFormatCache for better stability

Added by Rob Nahf about 12 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Category:
d1_libclient_java
Start date:
Due date:
% Done:

100%

Milestone:
CCI-1.0.0
Product Version:
*
Story Points:
Sprint:

Description

Current Issues:
1. providing 'mock' detail codes when exceptions generated from the client - red herring
2. public constructor for singleton (OFCImpl)
3. doesn't trap NPE when going from OFID to OFID.getValue()
4. addition of a public getFormat(String formatIDstr) reduces type safety - need to eat our own dog-food
5. recasting all BaseExceptions to NotFound exceptions
6. OFC extends OFCImpl, but completely hides all properties

History

#1 Updated by Rob Nahf about 12 years ago

  • Category set to d1_libclient_java
  • % Done changed from 0 to 50
  • Priority changed from Normal to Urgent
  • Status changed from New to In Progress

#2 Updated by Rob Nahf about 12 years ago

  • % Done changed from 50 to 80

Refactored ObjectFormatServiceImpl to expose the formatMap and list properties to subclasses. ObjectFormatCache now overwrites the map, instead of calling when needed. Since the default ObjectFormatList from the d1_common_java jar is likely to be stale (perhaps same identifiers, but different property values in the ObjectFormat), I changed the behavior to always refresh the cache if hasn't made successful call to cn.listFormats(). This also fixed the behavior of an unsuccessful call to cn.listFormats() causing the objectFormatCache to revert to the (stale, incomplete) default list.

Need to add a throttling mechanism to reduce the number of cache refreshing calls to cn.listFormats(). We've already encountered situations in Metacat migration where a long list of .getFormats() to unknown formatId's causes successive cache refreshes many times per minute.

Need to deprecate getFormat(formatID_string), if not remove it altogether, but that might cause problems.

#3 Updated by Rob Nahf about 12 years ago

  • translation missing: en.field_remaining_hours changed from 2.0 to 0.0
  • Status changed from In Progress to Closed

#4 Updated by Rob Nahf about 12 years ago

  • Parent task changed from #2252 to #2250

#5 Updated by Rob Nahf about 12 years ago

  • % Done changed from 80 to 100

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 14.8 MB)