trait TableBasedMetadata[T] extends GeoMesaMetadata[T] with LazyLogging
Metadata persisted in a database table. The underlying table will be lazily created when required. Metadata values are cached with a configurable timeout to save repeated database reads.
- T
type param
- Alphabetic
- By Inheritance
- TableBasedMetadata
- LazyLogging
- GeoMesaMetadata
- Closeable
- AutoCloseable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
checkIfTableExists: Boolean
Checks if the underlying table exists
Checks if the underlying table exists
- Attributes
- protected
-
abstract
def
close(): Unit
- Definition Classes
- Closeable → AutoCloseable
- Annotations
- @throws( classOf[java.io.IOException] )
-
abstract
def
createEmptyBackup(timestamp: String): TableBasedMetadata[T]
Create an instance to use for backup
Create an instance to use for backup
- timestamp
formatted timestamp for the current time
- Attributes
- protected
-
abstract
def
createTable(): Unit
Creates the underlying table
Creates the underlying table
- Attributes
- protected
-
abstract
def
delete(typeName: String, keys: Seq[String]): Unit
Deletes multiple rows
Deletes multiple rows
- typeName
simple feature type name
- keys
keys
- Attributes
- protected
-
abstract
def
scanKeys(): CloseableIterator[(String, String)]
Reads all row keys from the underlying table
Reads all row keys from the underlying table
- returns
matching tuples of (typeName, key)
- Attributes
- protected
-
abstract
def
scanValue(typeName: String, key: String): Option[Array[Byte]]
Reads a value from the underlying table
Reads a value from the underlying table
- typeName
simple feature type name
- key
key
- returns
value, if it exists
- Attributes
- protected
-
abstract
def
scanValues(typeName: String, prefix: String = ""): CloseableIterator[(String, Array[Byte])]
Reads row keys from the underlying table
Reads row keys from the underlying table
- typeName
simple feature type name
- prefix
scan prefix, or empty string for all values
- returns
matching tuples of (key, value)
- Attributes
- protected
-
abstract
def
serializer: MetadataSerializer[T]
Serializer
-
abstract
def
write(typeName: String, rows: Seq[(String, Array[Byte])]): Unit
Writes key/value pairs
Writes key/value pairs
- rows
keys/values
- Attributes
- protected
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
backup(typeName: String): Unit
Create a back up of this metadata
Create a back up of this metadata
- typeName
simple feature type name
- Definition Classes
- TableBasedMetadata → GeoMesaMetadata
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
def
delete(typeName: String): Unit
Deletes all values associated with a given feature type
Deletes all values associated with a given feature type
- typeName
simple feature type name
- Definition Classes
- TableBasedMetadata → GeoMesaMetadata
- def ensureTableExists(): Unit
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
getFeatureTypes: Array[String]
Returns existing simple feature types
Returns existing simple feature types
- returns
simple feature type names
- Definition Classes
- TableBasedMetadata → GeoMesaMetadata
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
insert(typeName: String, kvPairs: Map[String, T]): Unit
Insert multiple values at once - may be more efficient than single inserts
Insert multiple values at once - may be more efficient than single inserts
- typeName
simple feature type name
- kvPairs
key/values
- Definition Classes
- TableBasedMetadata → GeoMesaMetadata
-
def
insert(typeName: String, key: String, value: T): Unit
Insert a value - any existing value under the given key will be overwritten
Insert a value - any existing value under the given key will be overwritten
- typeName
simple feature type name
- key
key
- value
value
- Definition Classes
- TableBasedMetadata → GeoMesaMetadata
-
def
invalidateCache(typeName: String, key: String): Unit
Invalidates any cached value for the given key
Invalidates any cached value for the given key
- typeName
simple feature type name
- key
key
- Definition Classes
- TableBasedMetadata → GeoMesaMetadata
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
lazy val
logger: Logger
- Attributes
- protected
- Definition Classes
- LazyLogging
- Annotations
- @transient()
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
read(typeName: String, key: String, cache: Boolean): Option[T]
Reads a value
Reads a value
- typeName
simple feature type name
- key
key
- cache
may return a cached value if true, otherwise may use a slower lookup
- returns
value, if present
- Definition Classes
- TableBasedMetadata → GeoMesaMetadata
-
def
readRequired(typeName: String, key: String): T
Reads a value.
Reads a value. Throws an exception if value is missing
- typeName
simple feature type name
- key
key
- returns
value
- Definition Classes
- GeoMesaMetadata
-
def
remove(typeName: String, keys: Seq[String]): Unit
Delete multiple keys at once - may be more efficient than single deletes
Delete multiple keys at once - may be more efficient than single deletes
- typeName
simple feature type name
- keys
keys
- Definition Classes
- TableBasedMetadata → GeoMesaMetadata
-
def
remove(typeName: String, key: String): Unit
Delete a key
Delete a key
- typeName
simple feature type name
- key
key
- Definition Classes
- TableBasedMetadata → GeoMesaMetadata
-
def
resetCache(): Unit
table cache should be cleared up when catalog is deleted in database
table cache should be cleared up when catalog is deleted in database
- Definition Classes
- TableBasedMetadata → GeoMesaMetadata
-
def
scan(typeName: String, prefix: String, cache: Boolean): Seq[(String, T)]
Scan for keys starting with a given prefix
Scan for keys starting with a given prefix
- typeName
simple feature type name
- prefix
key prefix
- cache
may return a cached value if true, otherwise may use a slower lookup
- returns
keys -> values
- Definition Classes
- TableBasedMetadata → GeoMesaMetadata
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated