Package com.adobe.testing.s3mock.store
Record Class BucketMetadata
java.lang.Object
java.lang.Record
com.adobe.testing.s3mock.store.BucketMetadata
public record BucketMetadata(String name, String creationDate, ObjectLockConfiguration objectLockConfiguration, BucketLifecycleConfiguration bucketLifecycleConfiguration, Path path, Map<String,UUID> objects)
extends Record
Represents a bucket in S3, used to serialize and deserialize all metadata locally.
-
Constructor Summary
ConstructorsConstructorDescriptionBucketMetadata(String name, String creationDate, ObjectLockConfiguration objectLockConfiguration, BucketLifecycleConfiguration bucketLifecycleConfiguration, Path path) BucketMetadata(String name, String creationDate, ObjectLockConfiguration objectLockConfiguration, BucketLifecycleConfiguration bucketLifecycleConfiguration, Path path, Map<String, UUID> objects) Creates an instance of aBucketMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebucketLifecycleConfigurationrecord component.Returns the value of thecreationDaterecord component.booleandoesKeyExist(String key) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.Returns the value of theobjectLockConfigurationrecord component.objects()Returns the value of theobjectsrecord component.path()Returns the value of thepathrecord component.booleanfinal StringtoString()Returns a string representation of this record class.withBucketLifecycleConfiguration(BucketLifecycleConfiguration bucketLifecycleConfiguration) withObjectLockConfiguration(ObjectLockConfiguration objectLockConfiguration)
-
Constructor Details
-
BucketMetadata
public BucketMetadata(String name, String creationDate, ObjectLockConfiguration objectLockConfiguration, BucketLifecycleConfiguration bucketLifecycleConfiguration, Path path) -
BucketMetadata
public BucketMetadata(String name, String creationDate, ObjectLockConfiguration objectLockConfiguration, BucketLifecycleConfiguration bucketLifecycleConfiguration, Path path, Map<String, UUID> objects) Creates an instance of aBucketMetadatarecord class.- Parameters:
name- the value for thenamerecord componentcreationDate- the value for thecreationDaterecord componentobjectLockConfiguration- the value for theobjectLockConfigurationrecord componentbucketLifecycleConfiguration- the value for thebucketLifecycleConfigurationrecord componentpath- the value for thepathrecord componentobjects- the value for theobjectsrecord component
-
-
Method Details
-
withObjectLockConfiguration
-
withBucketLifecycleConfiguration
public BucketMetadata withBucketLifecycleConfiguration(BucketLifecycleConfiguration bucketLifecycleConfiguration) -
doesKeyExist
-
addKey
-
removeKey
-
getID
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
creationDate
Returns the value of thecreationDaterecord component.- Returns:
- the value of the
creationDaterecord component
-
objectLockConfiguration
Returns the value of theobjectLockConfigurationrecord component.- Returns:
- the value of the
objectLockConfigurationrecord component
-
bucketLifecycleConfiguration
Returns the value of thebucketLifecycleConfigurationrecord component.- Returns:
- the value of the
bucketLifecycleConfigurationrecord component
-
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
objects
Returns the value of theobjectsrecord component.- Returns:
- the value of the
objectsrecord component
-