Class MongoMatch
java.lang.Object
dev.getelements.elements.dao.mongo.model.match.MongoMatch
@Entity(value="match",
useDiscriminator=false)
@Index(fields=@Field("gameId")) @Index(fields=@Field("lock.uuid")) @Index(fields=@Field("expiry"),options=@IndexOptions(expireAfterSeconds=86400))
public class MongoMatch
extends Object
Created by patricktwohig on 7/21/17.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The amount of seconds aMatch
This is set to something considerably larger than what will ever be practically necessary, but allows clients to read a history of the associatedMongoMatch
in order to sync state appropriately. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
getLock()
org.bson.types.ObjectId
getScope()
int
hashCode()
void
void
void
setLastUpdatedTimestamp
(Date lastUpdatedTimestamp) void
setLock
(MongoMatchLock lock) void
setMetadata
(Map<String, Object> metadata) void
setObjectId
(org.bson.types.ObjectId objectId) void
setOpponent
(MongoProfile opponent) void
setPlayer
(MongoProfile player) void
void
toString()
-
Field Details
-
MATCH_EXPIRATION_SECONDS
public static final int MATCH_EXPIRATION_SECONDSThe amount of seconds aMatch
This is set to something considerably larger than what will ever be practically necessary, but allows clients to read a history of the associatedMongoMatch
in order to sync state appropriately. In reality aMongoMatch
should only need to live for a short period after match has been completed.- See Also:
-
-
Constructor Details
-
MongoMatch
public MongoMatch()
-
-
Method Details
-
getObjectId
public org.bson.types.ObjectId getObjectId() -
setObjectId
public void setObjectId(org.bson.types.ObjectId objectId) -
getScheme
-
setScheme
-
getScope
-
setScope
-
getPlayer
-
setPlayer
-
getOpponent
-
setOpponent
-
getLastUpdatedTimestamp
-
setLastUpdatedTimestamp
-
getGameId
-
setGameId
-
getExpiry
-
setExpiry
-
getLock
-
setLock
-
getMetadata
-
setMetadata
-
equals
-
hashCode
public int hashCode() -
toString
-