Package storage
Class StorageObject
- java.lang.Object
-
- storage.StorageObject
-
- All Implemented Interfaces:
StubItf
- Direct Known Subclasses:
DataClayObject
public abstract class StorageObject extends Object implements StubItf
This class intends to offer a basic API for DCObject.
-
-
Constructor Summary
Constructors Constructor Description StorageObject()StorageObject(String alias)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeletePersistent()voiddeletePersistent(boolean recursive)ObjectexecuteRemoteImplementation(String methodSignature, String implIDAsStr, Object[] params)Set<BackendID>getAllLocations()StringgetID()BackendIDgetLocation()MetaClassIDgetMetaClassID()ObjectIDgetObjectID()voidmakePersistent()voidmakePersistent(boolean recursive)voidmakePersistent(boolean recursive, BackendID optionalBackendID)voidmakePersistent(BackendID optionalBackendID)voidmakePersistent(String alias)voidmakePersistent(String alias, boolean recursive)voidmakePersistent(String alias, BackendID optionalBackendID)voidmakePersistent(String alias, BackendID optionalBackendID, boolean recursive)voidmoveObject(BackendID srcLocID, BackendID destLocID)voidmoveObject(BackendID srcLocID, BackendID destLocID, boolean recursive)BackendIDnewReplica()BackendIDnewReplica(boolean recursive)BackendIDnewReplica(BackendID optionalBackendID)BackendIDnewReplica(BackendID optionalBackendID, boolean recursive)voidsetObjectReadOnly()voidsetObjectReadWrite()
-
-
-
Constructor Detail
-
StorageObject
public StorageObject()
-
StorageObject
public StorageObject(String alias)
-
-
Method Detail
-
getObjectID
public ObjectID getObjectID()
- Returns:
- The ObjectID
-
getMetaClassID
public MetaClassID getMetaClassID()
- Returns:
- Class ID
-
getID
public String getID()
-
makePersistent
public void makePersistent()
- Specified by:
makePersistentin interfaceStubItf
-
makePersistent
public void makePersistent(BackendID optionalBackendID)
- Parameters:
optionalBackendID- optional backend where the object must be stored
-
makePersistent
public void makePersistent(String alias)
- Specified by:
makePersistentin interfaceStubItf- Parameters:
alias- the alias associated to this object
-
makePersistent
public void makePersistent(boolean recursive)
- Parameters:
recursive- Indicates if all referenced objects from this objects that are not already persistent must also be stored. If true, all referenced objects are also stored. If the object is already persistent i.e. contains a DataClay objectID this function will fail.
-
makePersistent
public void makePersistent(boolean recursive, BackendID optionalBackendID)- Parameters:
recursive- Indicates if all referenced objects from this objects that are not already persistent must also be stored. If true, all referenced objects are also stored. If the object is already persistent i.e. contains a DataClay objectID this function will fail.optionalBackendID- ID of the backend in which the object should be stored. If null, any backend is accepted.
-
makePersistent
public void makePersistent(String alias, BackendID optionalBackendID)
- Parameters:
alias- alias for the objectoptionalBackendID- ID of the backend in which the object should be stored. If null, any backend is accepted.
-
makePersistent
public void makePersistent(String alias, boolean recursive)
- Parameters:
alias- alias for the objectrecursive- Indicates if all referenced objects from this objects that are not already persistent must also be stored. If true, all referenced objects are also stored. If the object is already persistent i.e. contains a DataClay objectID this function will fail.
-
makePersistent
public void makePersistent(String alias, BackendID optionalBackendID, boolean recursive)
- Parameters:
alias- alias for the objectoptionalBackendID- ID of the backend in which the object should be stored. If null, any backend is accepted.recursive- Indicates if all referenced objects from this objects that are not already persistent must also be stored. If true, all referenced objects are also stored. If the object is already persistent i.e. contains a DataClay objectID this function will fail.
-
deletePersistent
public void deletePersistent()
- Specified by:
deletePersistentin interfaceStubItf
-
deletePersistent
public void deletePersistent(boolean recursive)
- Parameters:
recursive- Indicates remove must be recursive or not
-
newReplica
public BackendID newReplica()
- Parameters:
recursive- Indicates if all sub-objects must be replicated as well.- Returns:
- The ID of the backend in which the replica was created.
-
newReplica
public BackendID newReplica(boolean recursive)
- Parameters:
recursive- Indicates if all sub-objects must be replicated as well.- Returns:
- The ID of the backend in which the replica was created.
-
newReplica
public BackendID newReplica(BackendID optionalBackendID)
- Parameters:
optionalBackendID- ID of the backend in which to create the replica. If null, any backend is accepted. If the object is not persistent i.e. does not contain a DataClay objectID this function will fail.- Returns:
- The ID of the backend in which the replica was created.
-
newReplica
public BackendID newReplica(BackendID optionalBackendID, boolean recursive)
- Parameters:
optionalBackendID- ID of the backend in which to create the replica. If null, any backend is accepted. If the object is not persistent i.e. does not contain a DataClay objectID this function will fail.recursive- Indicates if all sub-objects must be replicated as well.- Returns:
- The ID of the backend in which the replica was created.
-
moveObject
public void moveObject(BackendID srcLocID, BackendID destLocID)
- Parameters:
srcLocID- of the source location in which the object is stored.destLocID- of the destination location in which the object should be moved.
-
moveObject
public void moveObject(BackendID srcLocID, BackendID destLocID, boolean recursive)
- Parameters:
srcLocID- of the source location in which the object is stored.destLocID- of the destination location in which the object should be moved.recursive- Indicates if all sub-objects must be moved as well.
-
setObjectReadOnly
public void setObjectReadOnly()
-
setObjectReadWrite
public void setObjectReadWrite()
-
getLocation
public BackendID getLocation()
- Returns:
- ID of the backend in which the object is stored. If the object is not persistent i.e. does not contain a DataClay objectID this function will fail.
-
getAllLocations
public Set<BackendID> getAllLocations()
- Returns:
- A set of IDs of the backend in which this object or its replicas are stored. If the object is not persistent i.e. does not contain a DataClay objectID this function will fail.
-
-