Class: CephStorage::StorageObject::RadosStorageObject
- Inherits:
-
CephRuby::RadosObject
- Object
- CephRuby::RadosObject
- CephStorage::StorageObject::RadosStorageObject
show all
- Extended by:
- RadosWrapper
- Includes:
- CephStorage::StorageObject
- Defined in:
- lib/ceph_storage/storage_object/rados_storage_object.rb
Overview
Instance Attribute Summary collapse
#name
Instance Method Summary
collapse
wrap_me
#copy, #copy_xattrs, #log, #move, supports_xattr?, #xattr_supported?
Constructor Details
Returns a new instance of RadosStorageObject.
9
10
11
12
13
|
# File 'lib/ceph_storage/storage_object/rados_storage_object.rb', line 9
def initialize(pool_factory, name)
log("init #{name}")
self.pool_factory = pool_factory
super(nil, name)
end
|
Instance Attribute Details
#pool_factory ⇒ Object
Returns the value of attribute pool_factory.
7
8
9
|
# File 'lib/ceph_storage/storage_object/rados_storage_object.rb', line 7
def pool_factory
@pool_factory
end
|
Instance Method Details
#path ⇒ Object
36
37
38
|
# File 'lib/ceph_storage/storage_object/rados_storage_object.rb', line 36
def path
"ceph://#{pool_factory.cluster.cluster}/#{pool_factory.name}/#{name}"
end
|
#read_file ⇒ Object
18
19
20
21
|
# File 'lib/ceph_storage/storage_object/rados_storage_object.rb', line 18
def read_file
log('read file')
read_full
end
|
#write_file(contents) ⇒ Object
23
24
25
26
|
# File 'lib/ceph_storage/storage_object/rados_storage_object.rb', line 23
def write_file(contents)
log("write file #{contents.length}")
overwrite(contents)
end
|
#xattr(name, &block) ⇒ Object
28
29
30
|
# File 'lib/ceph_storage/storage_object/rados_storage_object.rb', line 28
def xattr(name, &block)
Xattr.new(self, name, &block)
end
|
#xattr_enumerator(&block) ⇒ Object
32
33
34
|
# File 'lib/ceph_storage/storage_object/rados_storage_object.rb', line 32
def xattr_enumerator(&block)
XattrEnumerator.new(self, &block)
end
|