SMILA 1.0 API documentation

org.eclipse.smila.jobmanager.definitions
Class Bucket

java.lang.Object
  extended by org.eclipse.smila.jobmanager.definitions.Bucket

public class Bucket
extends java.lang.Object

Class supporting the handling of a BucketDefinition.


Field Summary
static java.lang.String UUID_PARAMETER
          used for special handling of uuid.
 
Constructor Summary
Bucket(BucketDefinition bucketDef, DataObjectTypeDefinition dot, boolean isPersistent, AnyMap parameters)
          Constructs a new Bucket.
 
Method Summary
static java.lang.String createBulkId()
          Creates an unique id for bulks.
 BulkInfo createDataObject()
          Creates and returns a BulkInfo pointing to the store object.
 BulkInfo createDataObject(AnyMap variableValues)
          Creates and returns a BulkInfo pointing to the store object.
 BucketDefinition getBucketDefinition()
           
 java.lang.String getBucketId()
           
 java.lang.String getDataObjectNamePrefix()
           
 DataObjectTypeDefinition getDataObjectTypeDefinition()
           
 java.util.Map<java.lang.String,java.lang.String> getDataObjectVariableValues(java.lang.String objectId)
           
 DataObjectTypeDefinition.Mode getMode()
           
 java.lang.String getStoreName()
           
 boolean isPersistent()
           
 boolean isTransient()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UUID_PARAMETER

public static final java.lang.String UUID_PARAMETER
used for special handling of uuid.

See Also:
Constant Field Values
Constructor Detail

Bucket

public Bucket(BucketDefinition bucketDef,
              DataObjectTypeDefinition dot,
              boolean isPersistent,
              AnyMap parameters)
Constructs a new Bucket.

Parameters:
bucketDef - The BucketDefinition.
dot - The DataObjectTypeDefinition for the BucketDefinition.
isPersistent - 'true' if the bucket is persistent, 'false' if it is transient.
parameters - The parameters used for constructing the objects in the store.
Method Detail

createBulkId

public static java.lang.String createBulkId()
Creates an unique id for bulks.

Returns:
unique id

getBucketDefinition

public BucketDefinition getBucketDefinition()
Returns:
The BucketDefinition of this Bucket.

getDataObjectTypeDefinition

public DataObjectTypeDefinition getDataObjectTypeDefinition()
Returns:
The DataObjectTypeDefinition of this Bucket.

getBucketId

public java.lang.String getBucketId()
Returns:
The (generated) id of the bucket.

getStoreName

public java.lang.String getStoreName()
Returns:
The name of the store.

isPersistent

public boolean isPersistent()
Returns:
'true' if the bucket is persistent, 'false' if not.

isTransient

public boolean isTransient()
Returns:
'true' if the bucket is transient, 'false' if not.

getMode

public DataObjectTypeDefinition.Mode getMode()
Returns:
the bucket mode (TRANSIENT / PERSISTENT)

createDataObject

public BulkInfo createDataObject()
Creates and returns a BulkInfo pointing to the store object.

Returns:
The BulkInfo object pointing to the objects in the store.

createDataObject

public BulkInfo createDataObject(AnyMap variableValues)
Creates and returns a BulkInfo pointing to the store object.

Parameters:
variableValues - values for data object name variables extracted from input object(s). If it contains no value for variable UUID_PARAMETER , a new value is created.
Returns:
The BulkInfo object pointing to the objects in the store.

getDataObjectNamePrefix

public java.lang.String getDataObjectNamePrefix()
Returns:
the prefix of the data object names for this bucket.

getDataObjectVariableValues

public java.util.Map<java.lang.String,java.lang.String> getDataObjectVariableValues(java.lang.String objectId)
Parameters:
objectId - an object name in this bucket.
Returns:
values for the variables in the object name template.

SMILA 1.0 API documentation