Class: Valkyrie::Persistence::Memory::MetadataAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/valkyrie/persistence/memory/metadata_adapter.rb

Overview

Note:

Documentation for instance methods on other MetadataAdapters are copied from the Memory implementation via ‘(see Valkyrie::Persistence::Memory#method)` to reduce duplication.

MetadataAdapter for the memory adapter.

Direct Known Subclasses

DeleteTrackingBuffer

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cacheHash

Returns The in-memory data cache.

Returns:

  • (Hash)

    The in-memory data cache.



24
25
26
# File 'lib/valkyrie/persistence/memory/metadata_adapter.rb', line 24

def cache
  @cache ||= {}
end

Instance Method Details

#idValkyrie::ID

Returns Identifier for this metadata adapter.

Returns:



29
30
31
# File 'lib/valkyrie/persistence/memory/metadata_adapter.rb', line 29

def id
  @id ||= Valkyrie::ID.new(Digest::MD5.hexdigest(self.class.to_s))
end

#persisterValkyrie::Persistence::Memory::Persister

Returns A memory persister for this adapter.

Returns:



13
14
15
# File 'lib/valkyrie/persistence/memory/metadata_adapter.rb', line 13

def persister
  Valkyrie::Persistence::Memory::Persister.new(self)
end

#query_serviceValkyrie::Persistence::Memory::QueryService

Returns A query service for this adapter.

Returns:



19
20
21
# File 'lib/valkyrie/persistence/memory/metadata_adapter.rb', line 19

def query_service
  @query_service ||= Valkyrie::Persistence::Memory::QueryService.new(adapter: self)
end