org.objectweb.perseus.distribution.api
Interface DistResCoordinatorFactory
public interface DistResCoordinatorFactory
Copyright (C) 2003-2004
- France Telecom R&D
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Release: 1.0
Authors: Olivier Lobry (olivier.lobry@rd.francetelecom.com)
newCoordinator
public DistResCoordinator newCoordinator(DistResCoordinatorService drcs,
Serializable nodeId,
Object copy,
Object resId)
This method is called each time a coordinator of an resource needs to
be created.
However, either a new coordinator instance can be created for each
resource or the same one can be shared for several or all resources. Thus
the method can return a reference to an already existing object.
A copy is passed if the call is a consuquence of a coordinator migration
or replication. It contains the state relative to the resource that
has been returned by the freeze method of the migrated/replicated
coordinator. In a implementation with one coordinator per ressource,
the freeze method of the coordinator returns 'this' and all the factory
has to do is to initialize the field of the object that haven't been
transmitted (e.g. the reference to the coordinator service).
drcs
- the service that will have to be used for this resource by
the coordinatornodeId
- the id of the local nodecopy
- a copy of the state relative to the resource if the call is
due to a coordinator replication or a migrationresId
- the id of the related resource
- a new coordinator, or an exesting one if it manages multiple
resources
Copyright © 2000-2002 France Telecom S.A., INRIA, IMAG-LSR All Rights Reserved.