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 intThe amount of seconds aMatchThis is set to something considerably larger than what will ever be practically necessary, but allows clients to read a history of the associatedMongoMatchin order to sync state appropriately. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetLock()org.bson.types.ObjectIdgetScope()inthashCode()voidvoidvoidsetLastUpdatedTimestamp(Date lastUpdatedTimestamp) voidsetLock(MongoMatchLock lock) voidsetMetadata(Map<String, Object> metadata) voidsetObjectId(org.bson.types.ObjectId objectId) voidsetOpponent(MongoProfile opponent) voidsetPlayer(MongoProfile player) voidvoidtoString()
-
Field Details
-
MATCH_EXPIRATION_SECONDS
public static final int MATCH_EXPIRATION_SECONDSThe amount of seconds aMatchThis is set to something considerably larger than what will ever be practically necessary, but allows clients to read a history of the associatedMongoMatchin order to sync state appropriately. In reality aMongoMatchshould 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
-