Sender: |
|
Date: |
Wed, 23 Mar 2016 15:41:03 +0100 |
Reply-To: |
|
Message-ID: |
|
Subject: |
|
MIME-Version: |
1.0 |
Content-Transfer-Encoding: |
8bit |
In-Reply-To: |
|
Content-Type: |
text/plain; charset=UTF-8 |
From: |
|
Parts/Attachments: |
|
|
Hi Ernesto,
If I need to save my Agent instances, and Agent extends MasonGeometry,
I simply use GeoMason to create a spatial layer with all the Agent
instances as spatial features. I do not see the advantage of using
classical serialisation in this case.
Cheers,
Luís
On 23 March 2016 at 15:18, Ernesto Carrella <[log in to unmask]> wrote:
> Well for starters you only really care about the serializable interface if
> you are planning on writing objects to file and back (I think it's a
> necessary for MASON checkpointing, but I could be wrong about that).
> The idea is that if you implement Serializable (and if you extend Mason
> Geometry you do) is that you need to make sure all the fields of your Agent
> class are also serializable (writable to file). This is a bit confusing
> since Serializable is really a marker interface for some behind the curtain
> java stuff rather than your classic method interfaces.
>
> There is a long description of what's needed here:
> http://docs.oracle.com/javase/7/docs/platform/serialization/spec/serial-arch.html#4176
>
> In practice however I didn't mean to scare anyone, this is really only
> needed when you are looking to generate persistent objects
>
>
> On Wed, Mar 23, 2016 at 9:02 AM Luís de Sousa <[log in to unmask]>
> wrote:
>>
>> On 23 March 2016 at 09:52, Nick Malleson <[log in to unmask]> wrote:
>> >
>> > Ernesto, what are the implications of having to make Agent serializable?
>>
>> And would ask why it must be made serializable? I never did it myself...
>>
>> Luís
|
|
|