james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Charles <e...@apache.org>
Subject Re: great news
Date Sat, 23 Jul 2011 10:17:14 GMT
On 23/07/11 09:39, Ioan Eugen Stan wrote:
> 2011/7/23 Norman Maurer<norman.maurer@googlemail.com>:
>> hi there,
>>
>> comments inside...
>
> Thanks Norman,
>
>>>
>>> 1. I have only access to the Message and Mailbox interfaces when
>>> saving/deleting messages?
>>
>> Sorry dont understand the question..
>
> I tried to cast Message to HBaseMessage, but when I ran
> HBaseMessageManagerTest it failed due to a ClassCast exception while
> trying to cast a SimpleMessage to HBaseMessage. So it seemed that I
> have to relay only on the interfaces. So I asked to make sure this was
> the case.
>

Not sure in which case you encounter the exception.

As a general rule of thumb, if the interface has the methods you need, 
simply use/declare interface. If you need additional methods in the 
implementation, you need to use/declare the concrete.

If SimpleMessage has what you need, but still you want additional 
behavior, HBaseMessage could extend SimpleMessage. The drawback is that 
you are not immune to SimpleMessage refactoring.

>>
>>> 4. What exactly are Properties from JPAMessage implementation and why
>>> is order important? Are they the header fields?
>>
>> its about extra infos that are needed for part fetches. The order is not
>> important, i think I changed the interface to not extend comperable
>> anymore..
>
> My main source for inspiration is JPA implementation. JPAProperties
> implementation keeps track of the order, but I think I will useorg.
> apache.​james.​mailbox.​store.​mail.​model.​impl.SimpleProperty
> instead of my own implementation.
>

If SimpleProperty has enough, you can use it.
It also depends if you want a separate table of Property, or use 
columns/qualifiers on Message entry.  If you are going to separate 
table, you will need to think on the hbase key generation/accessor on 
your Property object (SimpleProperty has no such key accessor...).

To which table schema are you going to?

>>
>> bye
>> norman
>>
>
> Regards,


-- 
Eric Charles
http://about.echarles.net

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message