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 Details

    • MATCH_EXPIRATION_SECONDS

      public static final int MATCH_EXPIRATION_SECONDS
      The amount of seconds a Match This is set to something considerably larger than what will ever be practically necessary, but allows clients to read a history of the associated MongoMatch in order to sync state appropriately. In reality a MongoMatch 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

      public String getScheme()
    • setScheme

      public void setScheme(String scheme)
    • getScope

      public String getScope()
    • setScope

      public void setScope(String scope)
    • getPlayer

      public MongoProfile getPlayer()
    • setPlayer

      public void setPlayer(MongoProfile player)
    • getOpponent

      public MongoProfile getOpponent()
    • setOpponent

      public void setOpponent(MongoProfile opponent)
    • getLastUpdatedTimestamp

      public Date getLastUpdatedTimestamp()
    • setLastUpdatedTimestamp

      public void setLastUpdatedTimestamp(Date lastUpdatedTimestamp)
    • getGameId

      public String getGameId()
    • setGameId

      public void setGameId(String gameId)
    • getExpiry

      public Date getExpiry()
    • setExpiry

      public void setExpiry(Date expiry)
    • getLock

      public MongoMatchLock getLock()
    • setLock

      public void setLock(MongoMatchLock lock)
    • getMetadata

      public Map<String,Object> getMetadata()
    • setMetadata

      public void setMetadata(Map<String,Object> metadata)
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object