public class Alias
extends java.lang.Object
implements java.io.Serializable
DatabaseManager
.Recall that in RockSack, a database is a tablespace directory that contains class instances which are RocksDB directories containing the serialized object instances. An alias allows us to define a macro that indicates the set of class instances that make up a database. For instance; If we have a tablespace directory of /home/db, then we can define a database as /home/db/test.
Instances of serialized classes will then be created under /home/db/testjava.lang.String, /home/db/testcom.yourpackage.yourclass subdirectories that contain the RocksDB SST and log files. etc.
If we define an alias as:
Alias testDb = new Alias("test");
we can then call:
DatabaseManager.setTableSpaceAlias(testDb, "/home/db/"),
and thereafter refer to testDb when obtaining and subsequently operating on a BufferedMap
or TransactionalMap
, and the data for those maps will be placed under our /home/db/test...
series of subdirectories.
Constructor and Description |
---|
Alias() |
Alias(byte[] alias) |
Alias(java.lang.String alias) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAlias() |
int |
hashCode() |
void |
setAlias(byte[] alias) |
void |
setAlias(java.lang.String alias) |
java.lang.String |
toString() |
public Alias()
public Alias(java.lang.String alias)
public Alias(byte[] alias)
public java.lang.String getAlias()
public void setAlias(java.lang.String alias)
public void setAlias(byte[] alias)
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object