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 void
deletePersistent()
void
deletePersistent(boolean recursive)
Object
executeRemoteImplementation(String methodSignature, String implIDAsStr, Object[] params)
Set<BackendID>
getAllLocations()
String
getID()
BackendID
getLocation()
MetaClassID
getMetaClassID()
ObjectID
getObjectID()
void
makePersistent()
void
makePersistent(boolean recursive)
void
makePersistent(boolean recursive, BackendID optionalBackendID)
void
makePersistent(BackendID optionalBackendID)
void
makePersistent(String alias)
void
makePersistent(String alias, boolean recursive)
void
makePersistent(String alias, BackendID optionalBackendID)
void
makePersistent(String alias, BackendID optionalBackendID, boolean recursive)
void
moveObject(BackendID srcLocID, BackendID destLocID)
void
moveObject(BackendID srcLocID, BackendID destLocID, boolean recursive)
BackendID
newReplica()
BackendID
newReplica(boolean recursive)
BackendID
newReplica(BackendID optionalBackendID)
BackendID
newReplica(BackendID optionalBackendID, boolean recursive)
void
setObjectReadOnly()
void
setObjectReadWrite()
-
-
-
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:
makePersistent
in 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:
makePersistent
in 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:
deletePersistent
in 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.
-
-