Interface PermissionCache.Creator

Enclosing interface:
PermissionCache
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface PermissionCache.Creator
Creates independent logical cache generations for repository, user, and branch scopes.
Author:
Eike Stepper
  • Method Summary

    Modifier and Type
    Method
    Description
    create(IRepository repository, String userID, CDOBranch branch)
    Creates a non-null, logically empty cache generation for exactly the supplied repository, user, and branch.
  • Method Details

    • create

      PermissionCache create(IRepository repository, String userID, CDOBranch branch)
      Creates a non-null, logically empty cache generation for exactly the supplied repository, user, and branch.

      Each invocation creates a generation independent of generations returned by earlier invocations. A newly created generation must not expose their entries. An authorization that already captured an older generation may still call PermissionCache.get(CDOID, boolean) or PermissionCache.put(CDOID, boolean, CDOPermission) on it after a newer generation has been created. Such late writes must remain isolated in the obsolete generation and must never become visible through the newer one.

      Parameters:
      repository - the repository whose authorization uses the generation
      userID - the ID of the user whose permissions are cached
      branch - the branch whose current-head resource permissions are cached
      Returns:
      a new, non-null permission-cache generation for the supplied scope